TL;DR
Traditional genetic programming for symbolic regression relies on random mutations and crossovers, leading to massive search inefficiencies and "expression bloat." This paper introduces GESR, a framework that replaces blind evolution with data-conditioned "gene editing" guided by two multimodal BERT models. By predicting optimal mutation tokens and crossover points, GESR improves search efficiency by 33% while discovering more compact, interpretable mathematical formulas.
What Problem Does This Paper Address?
Symbolic regression (SR) aims to discover underlying mathematical equations directly from observational data. Genetic Programming (GP) is a classical and powerful approach for this task, representing equations as tree structures that iteratively evolve via mutation and crossover.
However, standard GP is notoriously slow and inefficient because its evolutionary operators are entirely random. This randomness frequently destroys beneficial sub-structures, slows down convergence, and leads to "expression bloat"—the generation of overly complex, uninterpretable equations. While recent deep learning methods attempt to generate equations from scratch or seed initial populations, they fail to guide the actual evolutionary loop. GESR addresses this gap by introducing a data-driven, targeted mechanism to guide mutations and crossovers.
Methods
The authors propose Gene Editing Symbolic Regression (GESR), which treats deep language models as targeted "gene editors" within the GP loop:
- Mutation Guidance: Mathematical expression trees are linearized into sequences via preorder traversal. To simulate mutation, tokens are randomly masked (
[MASK]). A mutation-guiding BERT model takes this masked sequence along with the dataset embedding to predict the most statistically sound and high-fitness replacement symbol. - Crossover Guidance: For crossover, two parent expression sequences are concatenated using a special
[SEP]token. A second crossover-guiding BERT model analyzes the joint sequence and the dataset to predict the exact root nodes of the subtrees that should be exchanged.
To handle numerical data, GESR uses a Set Transformer as a data encoder, ensuring that the data representation remains invariant to the permutation of input samples. After the BERT models perform "gene editing," the constants in the expressions are fine-tuned using the BFGS optimization algorithm.
Datasets
The framework was evaluated across a comprehensive suite of standard and complex benchmarks:
- SRBench Suites: Classic symbolic regression problems including Nguyen, Keijzer, Korns, Constant, Livermore, and Vladislavleva.
- AI Feynman Dataset: A collection of physics-derived equations spanning mechanics, thermodynamics, and electromagnetism.
- 16 Chaotic Dynamical Systems: Used to test vector field learning (e.g., Newton-Liepnik, HyperLorenz, Duffing, and Brusselator systems), where equations must capture complex, highly nonlinear multivariate couplings.
Key Insights and Ideas
- Evolution Doesn't Have to Be Blind: Instead of treating deep learning and genetic programming as competing paradigms, GESR fuses them. GP provides global search flexibility, while BERT acts as a data-driven prior that constrains the search space to mathematically plausible and context-aware structures.
- Masked Language Modeling Maps to Mutation: The core "aha moment" is realizing that BERT's Masked Language Modeling (MLM) objective perfectly mirrors the genetic mutation operator. Predicting a missing word in a sentence is structurally identical to predicting a missing operator or variable in an equation tree.
- Inherent Complexity Control: Traditional GP requires heavy-handed, explicit penalties to prevent expression bloat. GESR naturally suppresses bloat because the BERT models are trained on high-fitness data pairs, meaning they inherently prefer compact, efficient structural modifications over chaotic expansions.
Key Results
- Efficiency Boost: Introducing targeted gene editing improved search efficiency by 33% compared to standard unguided GP methods.
- State-of-the-Art Fitting: Across multiple SRBench and AI Feynman tasks, GESR achieved higher or highly competitive coefficients of determination ($R^2$), frequently hitting near-perfect fits ($R^2 > 0.999$).
- Reduced Complexity: GESR consistently discovered equations with significantly fewer nodes (lower complexity) than baselines like PySR, NGGP, and GPlearn, proving its ability to resist expression bloat.
- Dynamical System Robustness: In vector field learning on chaotic systems, GESR demonstrated superior short-horizon rollout consistency and local trajectory matching, maintaining strong performance even under noisy conditions.
Limitations and Future Work
Despite its strong performance, GESR has a few notable limitations. First, its success is tightly coupled with the quality and diversity of the data used to pretrain the BERT models. Second, the current architecture has a hard limit on input data dimensionality; if a test dataset contains more variables than the range supported during pretraining, the model cannot function properly.
Future work will focus on developing lighter, more transferable symbolic editing models, designing hybrid search mechanisms that better balance guidance and diversity, and exploring scalable frameworks for very large-scale, high-dimensional datasets.
Summary updated