Introduction
Genetic Programming (GP) is a powerful tool for automated feature construction, producing interpretable symbolic expressions. However, GP often suffers from overfitting, particularly on small or noisy datasets. This paper introduces SAM-GP, a framework that adapts Sharpness-Aware Minimization (SAM) from deep learning to GP to improve generalization.
The Overfitting Challenge in GP
Traditional GP regularization relies on parsimony pressure—penalizing larger trees. However, model size is an imperfect proxy for complexity; a small, non-linear function can overfit as severely as a large one. SAM-GP addresses this by optimizing for "flat" regions in the semantic space rather than just minimizing training error.
Methodology: SAM-GP
SAM-GP shifts the optimization focus from parameter space to function space (semantics).
Semantic Perturbation and Sharpness Estimation
Since GP trees lack weights, the authors inject Gaussian noise into the outputs (semantics) of subtrees. Sharpness is estimated using a 1-SAM Strategy, identifying the "worst-case" loss increase under these perturbations.
Multi-Objective Optimization
Using NSGA-II, SAM-GP treats training loss and estimated sharpness as dual objectives. This allows the algorithm to find the "knee point" on the Pareto front—the optimal balance between accuracy and robustness.
Key Insights: Flatness vs. Smallness
A core finding is that the "sharpness" of a symbolic feature predicts generalization better than its size. For instance, a multiplicative feature might be simpler in structure but highly sensitive to input noise compared to a more complex additive feature.
Experimental Results
The framework was evaluated on 58 real-world regression datasets from the Penn Machine Learning Benchmark (PMLB).
- Generalization: SAM-GP outperformed standard GP on 36 of 58 datasets.
- Baselines: It surpassed six other complexity measures, including Rademacher complexity.
- SOTA Comparison: The ensemble version, SAM-EGP, proved competitive with fine-tuned models like XGBoost and LightGBM, especially on limited training data.
- Noise Robustness: SAM-GP effectively ignored "spiky" patterns in noisy labels, improving generalization on 31 datasets.
Conclusion and Future Work
SAM-GP demonstrates that sharpness-aware optimization is a viable and effective strategy for symbolic regression. While computationally more intensive—taking roughly three times longer than standard GP—the use of LRU caching mitigates some overhead. Future work includes applying Instance Space Analysis to identify datasets most likely to benefit from this approach and integrating sharpness-aware principles into other symbolic techniques.
Summary updated