Evaluation of Neural Architectures Trained with Square Loss vs Cross-Entropy in Classification Tasks
By Like Hui, Mikhail Belkin. 2020
206 citations recorded by the source corpus.
Modern neural architectures for classification tasks are trained using the cross-entropy loss, which is widely believed to be empirically superior to the square loss. In this work we provide evidence indicating that this belief may not be well-founded. We explore several major neural architectures and a range of standard benchmark datasets for NLP, automatic speech recognition (ASR) and computer vision tasks to show that these architectures, with the same hyper-parameter settings as reported in the literature, perform comparably or better when trained with the square loss, even after equalizing computational resources. Indeed, we observe that the square loss produces better results in the dominant majority of NLP and ASR experiments. Cross-entropy appears to have a slight edge on computer vision tasks. We argue that there is little compelling empirical or theoretical evidence indicating a clear-cut advantage to the cross-entropy loss. Indeed, in our experiments, performance on nearly all non-vision tasks can be improved, sometimes significantly, by switching to the square loss. Furthermore, training with square loss appears to be less sensitive to the randomness in initialization. We posit that training using the square loss for classification needs to be a part of best practices of modern deep learning on equal footing with cross-entropy.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Stefano Soatto
- Alessandro Achille
- Avinash Ravichandran
- Aditya Golatkar
- Marzia Polito
- J. Kolter
- Jeremy M. Cohen
- Sergey Levine
In Computer Vision and Pattern Recognition
- Stefano Soatto
- Alessandro Achille
- Luc Van Gool
- Avinash Ravichandran
- Dacheng Tao
- Aditya Golatkar
- Trevor Darrell
- Ming-Hsuan Yang
Citations in the corpus
- DLCFT: Deep Linear Continual Fine-Tuning for General Incremental Learning (2022, methodology): “We followed [1,14] and set α = 15.”
- Mixed-Privacy Forgetting in Deep Networks (2020, neutral): “, L2) loss [23, 34, 17]: LMSE D (wu) = 1 2|D| ∑”
- Gradient Descent on Neural Networks Typically Occurs at the Edge of Stability (2021, methodology): “In Figure 3(a), we train using the mean squared error loss for classification (Hui & Belkin, 2020), encoding the correct class with 1 and the other classes with 0.”
- LQF: Linear Quadratic Fine-Tuning (2020, methodology): “The key enablers of LQF are simple and known in the literature, although not frequently used: (i) We replace the cross-entropy loss with the mean-squared error loss, making the optimization problem quadratic [14, 18, 4], (ii) we replace ReLU with Leaky-ReLU [33], and (iii) we perform preconditioning”