Skip to main content
QUICK REVIEW

[Paper Review] Alternate Loss Functions for Classification and Robust Regression Can Improve the Accuracy of Artificial Neural Networks

Mathew Mithra Noel, Arindam Banerjee|arXiv (Cornell University)|Mar 17, 2023
Neural Networks and ApplicationsComputer Science3 citations
TL;DR

This paper proposes four new loss functions—L, M, full L, and full M—for classification and a smooth absolute error (SMAE) loss for robust regression, all designed to improve neural network accuracy by offering better error penalization than standard cross-entropy or mean squared error. The new losses, especially SMAE and the L/M variants, significantly outperform traditional losses on image, text, and regression benchmarks with minimal hyperparameter tuning.

ABSTRACT

All machine learning algorithms use a loss, cost, utility or reward function to encode the learning objective and oversee the learning process. This function that supervises learning is a frequently unrecognized hyperparameter that determines how incorrect outputs are penalized and can be tuned to improve performance. This paper shows that training speed and final accuracy of neural networks can significantly depend on the loss function used to train neural networks. In particular derivative values can be significantly different with different loss functions leading to significantly different performance after gradient descent based Backpropagation (BP) training. This paper explores the effect on performance of using new loss functions that are also convex but penalize errors differently compared to the popular Cross-entropy loss. Two new classification loss functions that significantly improve performance on a wide variety of benchmark tasks are proposed. A new loss function call smooth absolute error that outperforms the Squared error, Huber and Log-Cosh losses on datasets with significantly many outliers is proposed. This smooth absolute error loss function is infinitely differentiable and more closely approximates the absolute error loss compared to the Huber and Log-Cosh losses used for robust regression.

Motivation & Objective

  • To investigate whether alternative loss functions can improve the accuracy and training dynamics of deep neural networks beyond standard cross-entropy and mean squared error.
  • To design convex, infinitely differentiable loss functions that better approximate ideal error penalization for classification and robust regression.
  • To evaluate the performance of new loss functions across diverse architectures and datasets, including vision and NLP benchmarks.
  • To propose a smooth, parameter-free alternative to the Huber and Log-Cosh losses for robust regression that better approximates absolute error.
  • To demonstrate that loss functions derived from statistical estimation theory are not necessarily optimal and can be improved through targeted design.

Proposed method

  • Proposed the L and M loss functions as convex alternatives to binary cross-entropy, with L being less punitive and M more punitive toward misclassified samples.
  • Introduced the full L and full M losses as enhanced versions that incorporate both label and prediction uncertainty for improved generalization.
  • Developed the smooth absolute error (SMAE) loss as an infinitely differentiable, parameter-free approximation to mean absolute error (MAE), suitable for robust regression.
  • SMAE is mathematically defined as a smooth, convex function that closely approximates the absolute error without requiring a hyperparameter like the Huber loss.
  • Trained models using Adam optimizer with a fixed learning rate of 1e-5 across multiple benchmarks, including Imagenette, CFPB, and IMDB, using standard architectures like VGG-19, LSTM, and BERT.
  • Compared performance across five loss functions: binary cross-entropy (BCE), L, M, full L, and full M, on training and test accuracy, loss curves, and convergence speed.

Experimental results

Research questions

  • RQ1Can alternative convex loss functions improve classification accuracy beyond standard binary cross-entropy in deep neural networks?
  • RQ2How do L and M loss functions compare to cross-entropy in terms of gradient dynamics and convergence behavior?
  • RQ3Can a smooth, infinitely differentiable loss function outperform Huber and Log-Cosh in robust regression with heavy-tailed outliers?
  • RQ4Does the proposed SMAE loss maintain robustness to outliers without requiring additional hyperparameters?
  • RQ5Do the new loss functions generalize across different architectures and domains, such as computer vision and NLP?

Key findings

  • On the Imagenette benchmark, the full L loss achieved 78% test accuracy, outperforming binary cross-entropy (74%) and other variants.
  • The L and M loss functions improved test accuracy by up to 4 percentage points on the CFPB text classification benchmark compared to binary cross-entropy.
  • On the IMDB sentiment analysis benchmark, the full L loss achieved 85.77% test accuracy, surpassing binary cross-entropy (85.51%) and other losses.
  • The SMAE loss demonstrated superior robustness to outliers in regression tasks, outperforming Huber and Log-Cosh losses without requiring a tuning parameter.
  • Training with L and M losses led to faster convergence and more stable loss curves, as shown in Figures 7 and 8, indicating improved optimization dynamics.
  • The full L and full M losses showed consistent improvements across all evaluated benchmarks, suggesting strong generalization across tasks and architectures.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.