Discovering Mathematical Formulas from Data via GPT-guided Monte Carlo Tree Search
Yanjie Li, Weijun Li, Lina Yu, Min Wu, Jingyi Liu, Wenqiang Li, Meilan Hao, Shu Wei, Yusong Deng
TL;DR
The paper tackles symbolic regression, the NP-hard task of discovering concise and interpretable formulas from data, by introducing SR-GPT, a framework that couples a Generative Pre-Trained Transformer (GPT) with Monte Carlo Tree Search (MCTS) to guide and refine expression search. The GPT provides a symbol-policy and state-value, which steer MCTS during expansion and simulation, while self-search data are used to iteratively train the GPT, forming a mutual feedback loop. A novel entropy-aware loss on the GPT and an $S_{NRMSE}$-based reward are introduced to sharpen guidance and address multivariate variable omissions. Across 222 expressions from 10+ datasets, SR-GPT achieves state-of-the-art recovery, shows strong noise robustness, and demonstrates high generalization on the AI Feynman suite, indicating practical potential for interpretable formula discovery.
Abstract
Finding a concise and interpretable mathematical formula that accurately describes the relationship between each variable and the predicted value in the data is a crucial task in scientific research, as well as a significant challenge in artificial intelligence. This problem is referred to as symbolic regression, which is an NP-hard problem. In the previous year, a novel symbolic regression methodology utilizing Monte Carlo Tree Search (MCTS) was advanced, achieving state-of-the-art results on a diverse range of datasets. although this algorithm has shown considerable improvement in recovering target expressions compared to previous methods, the lack of guidance during the MCTS process severely hampers its search efficiency. Recently, some algorithms have added a pre-trained policy network to guide the search of MCTS, but the pre-trained policy network generalizes poorly. To optimize the trade-off between efficiency and versatility, we introduce SR-GPT, a novel algorithm for symbolic regression that integrates Monte Carlo Tree Search (MCTS) with a Generative Pre-Trained Transformer (GPT). By using GPT to guide the MCTS, the search efficiency of MCTS is significantly improved. Next, we utilize the MCTS results to further refine the GPT, enhancing its capabilities and providing more accurate guidance for the MCTS. MCTS and GPT are coupled together and optimize each other until the target expression is successfully determined. We conducted extensive evaluations of SR-GPT using 222 expressions sourced from over 10 different symbolic regression datasets. The experimental results demonstrate that SR-GPT outperforms existing state-of-the-art algorithms in accurately recovering symbolic expressions both with and without added noise.
