[Paper Review] Transformer-based Planning for Symbolic Regression
TPSR integrates Monte Carlo Tree Search with pre-trained transformer symbolic regression models to optimize equation generation for fitting accuracy and complexity, achieving better trade-offs than baselines.
Symbolic regression (SR) is a challenging task in machine learning that involves finding a mathematical expression for a function based on its values. Recent advancements in SR have demonstrated the effectiveness of pre-trained transformer-based models in generating equations as sequences, leveraging large-scale pre-training on synthetic datasets and offering notable advantages in terms of inference time over classical Genetic Programming (GP) methods. However, these models primarily rely on supervised pre-training goals borrowed from text generation and overlook equation discovery objectives like accuracy and complexity. To address this, we propose TPSR, a Transformer-based Planning strategy for Symbolic Regression that incorporates Monte Carlo Tree Search into the transformer decoding process. Unlike conventional decoding strategies, TPSR enables the integration of non-differentiable feedback, such as fitting accuracy and complexity, as external sources of knowledge into the transformer-based equation generation process. Extensive experiments on various datasets show that our approach outperforms state-of-the-art methods, enhancing the model's fitting-complexity trade-off, extrapolation abilities, and robustness to noise.
Motivation & Objective
- Motivate symbolic regression as a path to interpretable governing equations across sciences and engineering.
- Address limitations of token-level pre-training losses in SR by incorporating non-differentiable feedback (fitting accuracy and complexity).
- Propose a model-agnostic TPSR framework that augments pre-trained SR transformers with MCTS planning to optimize equation discovery.
Proposed method
- Represent equations in prefix notation to align with transformer decoding.
- Use a pre-trained SR transformer backbone to encode data and generate equation sequences.
- Apply Monte Carlo Tree Search (MCTS) lookahead planning during inference to guide token selection based on a custom reward that balances fit and complexity.
- Incorporate top-k token restrictions and beam-search-based simulations to manage the expansion and evaluation steps within MCTS.
- Define a reward combining normalized MSE-based fit and an exponential penalty for complexity: r = 1/(1+NMSE) + λ exp(-l/L).
- Introduce caching mechanisms (top-k caching and sequence caching) to reduce redundant computations during MCTS.

Experimental results
Research questions
- RQ1Does TPSR outperform beam search and sampling decoding strategies and other baselines on standard SR benchmarks?
- RQ2Can TPSR improve extrapolation and robustness to noise in symbolic regression tasks?
- RQ3Do caching mechanisms in TPSR significantly reduce inference time?
- RQ4What is the impact of individual MCTS components on TPSR’s performance?
Key findings
- TPSR achieves higher fitting accuracy with comparable or lower equation complexity across SRBench and In-domain Synthetic datasets compared with baselines.
- TPSR reaches the first Pareto front in fitting-complexity trade-offs on Feynman and Black-box datasets.
- Caching mechanisms reduce inference time by ~28% overall, with sequence caching offering the most pronounced gains.
- Ablation studies show that increasing rollouts, beams, and max expansions in MCTS generally improves performance, with rollouts contributing most to gains.
- TPSR demonstrates better extrapolation under scale variations and robustness to noise compared to the E2E transformer baseline.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.