Introduction
In deep learning, the loss function serves as the primary signal guiding model optimization. While standard functions like Mean Squared Error (MSE) or Cross-Entropy are widely used, they are often suboptimal for specific tasks or architectures. The emerging field of Loss Function Learning seeks to automate the discovery of these functions. Existing approaches typically fall into two categories: gradient-based meta-learning, which often results in "black-box" neural networks, and evolutionary methods like Genetic Programming (GP), which produce interpretable symbolic formulas but struggle with fine-tuning.
Researchers have introduced EvoMAL (Evolved Model-Agnostic Loss), a hybrid neuro-symbolic framework that combines the structural flexibility of GP with the precision of gradient-based local search. EvoMAL discovers loss functions that are not only high-performing but also highly interpretable and significantly more parameter-efficient than previous state-of-the-art methods.
The EvoMAL Framework
EvoMAL operates through a bilevel optimization loop that bridges the gap between symbolic evolution and continuous optimization.
The Outer Loop: Symbolic Evolution
The system utilizes a GP algorithm to search for the symbolic "skeleton" of a loss function. It uses a set of primitive mathematical operations (e.g., addition, subtraction, protected division) to build expression trees. To ensure these evolved functions are valid and stable, the authors implement constraints that force the inclusion of necessary arguments—such as the model's prediction $f(x)$ and the ground truth $y$—and ensure the output remains non-negative.
The Inner Loop: Gradient-Based Local Search
The core innovation of EvoMAL is the "Transitional Procedure." This process converts a symbolic expression tree into a meta-loss network—a weighted directed acyclic graph. By introducing trainable weights ($\phi$) at every edge of the symbolic formula, the system can "polish" promising candidates using gradients.
Using a technique called unrolled differentiation, the system fine-tunes these weights ($\phi$) based on the performance of a model trained with that specific loss function. This local search allows EvoMAL to achieve high precision much faster than pure evolution could.
Experimental Evaluation
To demonstrate that EvoMAL is truly model-agnostic, the authors evaluated it across four diverse domains:
- Regression: Predicting sine waves.
- Image Classification: MNIST (LeNet-5) and CIFAR-10 (Standard CNN).
- Natural Language Processing: Character-level text recognition on the Surname dataset (LSTM/RNN).
Key Results
- Performance and Convergence: EvoMAL consistently outperformed standard baselines (MSE, BCE, CCE) and previous meta-learning methods like $ML^3$. Notably, models trained with EvoMAL-learned losses converged significantly faster, particularly on complex tasks like the Surname dataset.
- Extreme Efficiency: One of the most significant findings is the compactness of the discovered functions. While previous gradient-based methods required loss networks with over 2,600 parameters, EvoMAL achieved superior results with symbolic expressions containing as few as 30 parameters—a reduction of approximately 99%.
- Interpretability: Because the final output is a symbolic mathematical formula, the learned loss functions are transparent and can be easily analyzed or transferred to other tasks without the overhead of a neural network.
Discussion and Future Work
The success of EvoMAL highlights that hybridization is essential for efficient meta-learning: evolution provides global exploration, while gradient descent provides local exploitation. The use of "GP closure"—ensuring operations like logs and square roots are "protected" against invalid inputs—was also critical for maintaining search stability.
Despite its efficiency, the computational cost of "unrolling" differentiation remains a bottleneck. Future research directions include exploring implicit differentiation to further reduce memory requirements and implementing rejection protocols to automatically discard redundant or unpromising candidate functions early in the evolutionary process.
Summary updated