Introduction
Standard deep learning practice relies heavily on hand-designed loss functions, most notably Cross-Entropy. While neural architectures have seen rapid evolution, the "North Star" guiding their optimization remains largely static. Previous attempts to automate loss function discovery via Genetic Programming (GP) often resulted in "brittle" tree structures where minor structural changes caused unpredictable functional shifts. This discrete and rugged search space makes finding global optima computationally expensive and difficult.
TaylorGLO (Multivariate Taylor expansion-based genetic loss-function optimization) addresses these challenges by parameterizing loss functions as multivariate Taylor polynomials. By transforming the search into a continuous optimization problem, TaylorGLO discovers novel loss functions that outperform standard baselines while requiring significantly fewer evaluations than previous state-of-the-art methods.
Methodology
The core innovation of TaylorGLO is the representation of a loss function $f(x, y)$ as a vector of coefficients for a multivariate Taylor polynomial. This continuous parameterization allows the use of efficient black-box optimizers like the Covariance Matrix Adaptation Evolutionary Strategy (CMA-ES).
The optimization process involves several key steps:
- Taylor Parameterization: Candidate loss functions are defined by a fixed-length vector of polynomial weights.
- Search Space Refinement: The authors mathematically "trim" the polynomials to exclude terms that do not contribute to the gradient, reducing a third-order expansion from twelve parameters to eight.
- Evolutionary Search: CMA-ES iteratively samples and refines these vectors based on performance.
- Efficient Evaluation: To minimize search time, candidate functions are evaluated using "partial training"—training models for only a few epochs rather than to full convergence.
Experimental Setup
TaylorGLO was evaluated across three standard image classification benchmarks: MNIST, CIFAR-10, and the Street View House Numbers (SVHN) dataset. The researchers tested the evolved functions across diverse architectures, including AlexNet, AllCNN-C, Preactivation ResNet-20, and Wide ResNets, to ensure the discovered functions generalized beyond specific model types.
Analysis of Evolved Functions
A key finding is that the "smoothness" of the Taylor parameterization is critical. Nearby points in the coefficient space result in similar loss functions, creating a locally smooth fitness landscape that facilitates rapid convergence.
Interestingly, the most successful evolved functions were non-monotonic. Unlike Cross-Entropy, which encourages maximum confidence, these functions often featured a "shallow minimum" near the correct label. This behavior acts as an implicit regularizer, penalizing overconfidence and preventing the model from overfitting to labels—a discovery that mirrors manually designed techniques like label smoothing.
Results and Generalization
TaylorGLO demonstrates remarkable efficiency, finding superior loss functions with only 448 partial evaluations—a 96% reduction in search cost compared to the 11,120 evaluations required by previous tree-based methods (GLO).
Performance gains were consistent across datasets:
- MNIST: Accuracy improved to 0.9951 (from a 0.9899 baseline).
- CIFAR-10: Accuracy reached 0.9271 (from 0.8965).
- SVHN: Accuracy reached 0.9727 (from 0.9709).
Furthermore, the evolved functions proved particularly robust in data-scarce scenarios. When training on only 10% of the MNIST dataset, the performance gap between TaylorGLO and Cross-Entropy widened significantly. Analysis of the model's weight space revealed that TaylorGLO leads to "flatter" loss basins, a strong indicator of superior generalization to unseen data.
Conclusion and Future Directions
By moving from discrete tree structures to continuous Taylor polynomials, TaylorGLO makes automated loss function discovery both practical and efficient. While this work focused on third-order expansions and static functions, future research may explore higher-order polynomials or dynamic loss functions that adapt throughout the training process. Additionally, the co-evolution of architectures and loss functions presents a promising frontier for discovering hardware- or task-specific synergies.
Summary updated