Introduction Loss functions play a critical role in machine learning, particularly in training neural networks for classification tasks. In this work, we establish a theoretical framework for distance-based loss functions by adapting the Hassanat distance for binary classification. Methods Through gradient analysis, we prove that Hassanat losses exhibit bounded gradients with finite Lipschitz constants, providing convergence guarantees and robustness to outliers. We formulate six variants with different error sensitivities and validate these theoretical properties empirically. Their effectiveness is evaluated on synthetic datasets and nine real-world datasets, ranging from a few hundred to nearly 48,000 samples, under controlled experimental conditions. A comprehensive comparison is conducted against widely used loss functions, including Binary Cross-Entropy (BCE), Focal Loss, Mean Squared Error (MSE), and L1 Loss. Results Results show that the proposed Hassanat-based losses achieve competitive performance across evaluation metrics, with comparable or slightly improved results in calibration, convergence speed (in terms of epochs), precision, recall, F1-score, and AUC on several datasets, while exhibiting notable robustness to outliers and noise. The estimated Floating Point Operations (FLOPs) shows that the wall-clock time difference is due to implementation gap, not algorithmic. Importantly, Cohen's d effect size and confidence interval analyses shows that some of the proposed variants introduce a larger practical effect size than popular loss functions such as BCE. Discussion This work establishes both theoretical foundations and empirical validation for distance-based loss functions. The bounded gradient framework with finite Lipschitz constants provides principled optimization guarantees while explaining observed robustness and convergence behavior. This foundation enables systematic development of robust loss functions tailored to specific application requirements.
Ahmad S. Tarawneh (Tue,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: