TL;DR
SymbolicLM transforms Large Language Models (LLMs) from probabilistic text generators into precise symbolic regressors. By training on a massive new dataset of physically grounded equations and utilizing a novel reinforcement learning framework with physics-aware rewards, the authors enable LLMs to discover exact scientific laws directly from raw data, significantly outperforming both general-purpose models and specialized search-based algorithms.
What Problem Does This Paper Address?
Scientific discovery relies on Symbolic Regression (SR)—the task of finding a mathematical formula (like $F = G \frac{m_1 m_2}{r^2}$) that perfectly describes a set of observed data points. While LLMs are excellent at "approximate reasoning" and generating plausible-sounding text, SR is a "zero-tolerance" task. A single mistake in an operator or exponent causes the entire formula to diverge from the truth.
Current LLM-based approaches treat the model as a "black box" agent that guesses formulas while an external "scaffold" (like a Python interpreter) checks the math. This is computationally expensive, painfully slow (sometimes taking hours for one equation), and fails to teach the model the intrinsic relationship between numbers and symbolic structures. The authors aim to move this capability directly into the model's weights.
Methods
The researchers developed a three-stage framework to instill "intrinsic structural awareness" in LLMs:
- Instruction Tuning (SFT): They fine-tuned a Qwen3-8B model to map numerical observations to formulas written in prefix notation (e.g.,
add(x, 3)instead ofx + 3), which is easier for models to generate sequentially. - Reinforcement Learning (RL): Using Group Relative Policy Optimization (GRPO), they aligned the model using five specific rewards:
- Parse Validity: Is the output a real math formula?
- Dimensional Consistency: Do the units (meters, seconds, etc.) make sense?
- Structural Similarity: Does the "skeleton" of the formula match the ground truth?
- Symbolic Equivalence: Is it algebraically the same as the target?
- Numerical Fit: Does it actually fit the data points ($R^2$ score)?
- SymbolicSGA Refinement: At inference time, they use a lightweight loop that asks the model to "exploit" (tweak a good formula) or "explore" (try a new structure) based on quantitative feedback, as seen in the comparison of frameworks below.
Datasets
The authors introduced PhysSymbArena, a massive benchmark designed to bridge the gap between abstract math and real-world physics.
- Scale: 160,000 diverse equations and 1.8 billion tokens.
- Physical Grounding: Unlike previous datasets that just use raw numbers, PhysSymbArena assigns physical quantities (like "velocity" or "acceleration") and units to variables.
- Evaluation: They also tested on the SRBench-Feynman (119 classic physics equations) and LLM-SRBench-Transform to ensure the model generalizes to formulas it hasn't seen during training.
Key Insights and Ideas
- Physics as a Constraint: One of the most powerful "aha moments" is using dimensional analysis as a reward. By teaching the model that you can't add "meters" to "seconds," the model learns to prune millions of mathematically possible but physically nonsensical formulas.
- Moving Reasoning Inward: By training the model on the relationship between numerical residuals and algebraic edits, they overcome the "feedback bottleneck" where models previously couldn't tell if a poor fit was due to a wrong constant or a fundamentally wrong structure.
- Skeleton Rewards: Instead of rewarding the model for matching tokens exactly, they reward it for matching the structure (the arrangement of operators and variables). This allows the model to find creative, algebraically equivalent solutions.
Key Results
The results demonstrate a massive leap in capability:
- Base Model vs. SymbolicLM: A standard Qwen3-8B model is nearly useless at SR ($R^2 \approx 0.01$). After the proposed training, SymbolicLM achieves an $R^2$ of 0.76.
- The Power of Refinement: Adding the SymbolicSGA refinement loop pushes the $R^2$ to 0.90 and achieves an exact symbolic recovery accuracy of 55% on the PhysSymbArena test set.
- Generalization: On the Feynman physics equations, SymbolicLM achieved a structural recovery accuracy of 64.7%, outperforming specialized symbolic regression tools like PySR and GP-GOMEA.
Limitations and Future Work
While SymbolicLM is a major step forward, the authors note a few areas for improvement:
- Complexity Scaling: The current model is tested on equations with a depth of 4 to 12. Extremely high-dimensional systems with dozens of variables remain a challenge.
- Noise Robustness: The study primarily uses synthetic data. Real-world experimental data is often "messy" and noisy, which can confuse the precise structural requirements of the model.
- Black-Box RL: Like many RL-tuned models, understanding exactly how the model maps specific numerical patterns to symbolic structures remains an open interpretability question.
Summary updated