TL;DR
This paper introduces Neural Loss Function Search (NLFS) to discover novel loss functions that outperform standard cross-entropy for large-scale image classification. By developing a more expressive search space and a robust surrogate function, they successfully evolved three new loss functions, NeuroLoss1, NeuroLoss2, and NeuroLoss3, which demonstrate improved accuracy across various architectures and datasets.
What Problem Does This Paper Address?
In image classification, Convolutional Neural Networks (CNNs) are typically trained by minimizing cross-entropy, a loss function derived from information theory. However, the ultimate evaluation metric is often accuracy. While cross-entropy generally correlates well with accuracy, there's no guarantee of a perfect linear relationship, suggesting that alternative loss functions might exist that yield better accuracy. The challenge lies in efficiently searching for these superior loss functions, especially for large-scale CNNs with millions of parameters, where evaluating each candidate loss function is computationally expensive. This paper tackles this by proposing a method for Neural Loss Function Search (NLFS) specifically for large-scale image classification CNNs.
Methods
The core of this work is a mutation-only genetic algorithm called regularized evolution, adapted from previous neural architecture search (NAS) methods. They introduce a novel search space for loss functions, inspired by the NASNet architecture search space, which uses computational graphs with free-floating "hidden state nodes." This allows for more complex and diverse loss function structures compared to previous grammar-based approaches.
To make the search tractable for large CNNs, they developed a surrogate function. This surrogate involves training a smaller CNN (initially a ConvNet, then a ResNet9, and finally settling on EffNetV2Small) on CIFAR-10 with a reduced training schedule. Crucially, they use Kendall's Tau rank correlation to assess how well the ranking of loss functions on the surrogate correlates with their performance on the full, large-scale model.
A rigorous integrity check is implemented to filter out degenerate loss functions early. This check includes verifying for cycles in the computational graph, ensuring the presence of target and prediction values, confirming a single global minimum for binary classification, and preventing simple sign flips. An early stopping mechanism is also employed during training to further prune poorly performing loss functions. Finally, a loss function elimination protocol progressively trains the top candidates on increasingly complex training schedules and regularization techniques to ensure transferability.
Datasets
- CIFAR-10: Used for initial evolutionary runs and as a proxy dataset for developing the surrogate function.
- CIFAR-100: Used for evaluating transferability.
- Stanford-CARS196, Oxford-Flowers102, Caltech101: Larger image resolution datasets used for evaluating transferability.
- ImageNet: Used for fine-tuning models on the larger datasets.
Key Insights and Ideas
- Expressive Search Space is Crucial: Expanding the set of available operations and using a computational graph structure (inspired by NASNet) significantly increases the diversity of explored loss functions, leading to novel discoveries.
- Surrogate Model Correlation is Key: Finding a surrogate model and training strategy that accurately reflects the performance of large-scale CNNs is paramount. The paper highlights the difficulty in achieving good correlation and the importance of using metrics like Kendall's Tau.
- Implicit Regularization in Novel Losses: The evolved NeuroLoss functions exhibit a less steep slope and a global minimum slightly shifted from 1, suggesting they might incorporate implicit regularization, potentially contributing to their improved performance.
- Transferability is Achievable: The proposed NLFS framework, combined with a robust elimination protocol, successfully discovers loss functions that generalize well across different architectures, datasets, and augmentation techniques.
Key Results
- The paper discovered three new loss functions, NeuroLoss1, NeuroLoss2, and NeuroLoss3, which consistently outperformed standard cross-entropy.
- Across various architectures (DavidNet, EffNetV2Small, WideResNet, SEResNeXt) and datasets (CIFAR-10, CIFAR-100, Cars196, Flowers102, Caltech101), the NeuroLoss functions achieved higher mean test accuracy.
- For example, on DavidNet with CIFAR-10 (Cutout), NeuroLoss1 achieved 94.042% accuracy compared to cross-entropy's 93.761%.
- On EffNetV2Small with CIFAR-10, NeuroLoss1 achieved 95.952% accuracy, surpassing cross-entropy's 95.826%.
- The paper also identified "honorable mention" loss functions that showed promise but did not make it into the final top three.
Limitations and Future Work
- Surrogate Model Limitations: The paper acknowledges the difficulty in finding a perfectly transferable surrogate function, noting that initial runs with smaller models showed poor correlation to large-scale CNN performance.
- Computational Cost: While the surrogate function significantly reduces computational cost, the overall process of evolutionary search and elimination is still computationally intensive.
- Future Work: The authors suggest that the proposed NLFS framework and search space could be extended to other domains like image anomaly detection, imbalanced datasets, or even traditional machine learning algorithms. Further investigation into the theoretical underpinnings of why NeuroLoss functions are successful is also warranted.
Summary updated