Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Artif. Intell.

Sec. Machine Learning and Artificial Intelligence

HasLoss: A Novel Hassanat Distance-Based Loss Functions for Binary Classification

Provisionally accepted
  • Mutah University, Al Karak, Jordan

The final, formatted version of the article will be published soon.

Loss functions play a critical role in machine learning, particularly in training neural networks for classification tasks. In this work, we introduce a novel adaptation of the Hassanat distance and formulate six variants employed as loss functions, designed specifically for binary classification. 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 show that the proposed Hassanat-based losses achieve competitive performance across evaluation metrics, and on some datasets they surpass existing methods in calibration, convergence speed, precision, recall, F1-score, and AUC, while also exhibiting robustness to outliers and noise. Importantly, Cohen's d effect size analysis shows that some of the proposed variants introduce a larger practical effect size than popular loss functions such as BCE. This study highlights the potential of distance-based loss functions and establishes a foundation for further exploration in robust model training.

Keywords: machine learning, loss functions, neural networks, optimization, Distance metrics

Received: 22 Aug 2025; Accepted: 27 Nov 2025.

Copyright: © 2025 Tarawneh. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Ahmad S. Tarawneh

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.