Improving Generalization of Genetic Programming for High-Dimensional Symbolic Regression with Shapley Value Based Feature Selection

Chunyu Wang, Qi Chen, Bing Xue, Mengjie Zhang

Introduction

Symbolic Regression (SR) is often considered the "holy grail" of mathematical modeling. Unlike traditional regression techniques that optimize coefficients for a predefined equation, SR searches the space of mathematical expressions to discover the underlying functional form of a dataset. Genetic Programming (GP) is the primary engine for this search, evolving tree-like structures of functions and variables through an iterative process of selection and variation.

However, GP faces a significant hurdle known as the "curse of dimensionality." When applied to high-dimensional datasets—those with dozens or hundreds of input variables—GP often becomes overwhelmed by noisy or irrelevant features. This leads to "bloat" (excessively complex equations) and poor generalization, where models perform perfectly on training data but fail on unseen test data. To address this, researchers have introduced GPSHAP, a framework that integrates game-theoretic Shapley values into the GP pipeline to perform robust feature selection.

The GPSHAP Framework

The core innovation of GPSHAP is a two-stage approach designed to filter out noise before the heavy lifting of symbolic discovery begins.

The standard evolutionary process of a Genetic Programming system, which serves as the foundation for the SR stage in GPSHAP.

As shown in the framework below, the process begins with a dedicated feature selection stage:

  1. Candidate Identification: The system runs multiple short, parallel GP iterations to identify which features frequently appear in high-performing models.
  2. Shapley Value Calculation: Borrowed from cooperative game theory, the Shapley value determines the "fair" contribution of each feature to the model's performance. Unlike traditional methods that evaluate features in isolation, Shapley values account for complex interactions between variables.
  3. Sparsity Thresholding: To ensure model compactness, only the top $\log_2(D)$ features (where $D$ is the total number of features) are retained.
The two-stage GPSHAP framework: Stage 1 uses Shapley values for feature selection, and Stage 2 performs the final Symbolic Regression (GPSR) on the refined subset.

In the second stage, a standard GP process (GPSR) is executed using only the refined subset of features to evolve the final, interpretable mathematical model.

Why Game Theory?

The use of Shapley values addresses a critical weakness in standard feature selection: correlation. Traditional "permutation importance" methods, which shuffle a variable to see how much error increases, often fail when features are highly dependent on one another. Shapley values are mathematically designed to distribute "credit" fairly among a coalition of players (features), providing a more accurate measure of a variable's true importance in a multi-variable system.

Key Results and Impact

The researchers evaluated GPSHAP against ten high-dimensional datasets, including synthetic physical laws and real-world data from fields like drug discovery (QSAR) and spectroscopy.

  • Superior Generalization: GPSHAP statistically outperformed standard GP on the majority of test datasets. It was particularly effective on synthetic data, where it successfully ignored 50 added noise variables to find the exact underlying physical law.
  • Model Compactness: By forcing a sparse selection of features, GPSHAP produced models that were at least 27% smaller on average than those produced by standard GP, significantly improving interpretability.
  • Efficiency: Although calculating Shapley values adds initial computational overhead, the narrowed search space in the second stage allows the GP to converge on effective solutions much faster than it would when wading through hundreds of irrelevant variables.

Conclusion and Future Work

GPSHAP demonstrates that pre-filtering high-dimensional data using game-theoretic principles can significantly tame the complexity of Genetic Programming. While the current implementation is a two-stage offline process, future research aims to integrate Shapley-based selection directly into the evolutionary loop (online selection) and explore surrogate models to reduce the computational cost of calculating Shapley values for even larger datasets.

Summary updated

BibTeX
@article{wang2025improving,
  author = {Chunyu Wang and Qi Chen and Bing Xue and Mengjie Zhang},
  title = {{Improving Generalization of Genetic Programming for High-Dimensional Symbolic Regression with Shapley Value Based Feature Selection}},
  journal = {Data Sci. Eng.},
  year = {2025},
  doi = {10.1007/s41019-024-00270-x},
}
Figure