TL;DR
Researchers have developed a deep reinforcement learning framework that uses a large recurrent neural network (RNN) to search for the "perfect" small mathematical expression to fit a dataset. By introducing a novel risk-seeking policy gradient that optimizes for best-case rather than average performance, the algorithm outperforms the industry gold standard, Eureqa, in recovering exact symbolic formulas.
What Problem Does This Paper Address?
In the world of machine learning, we often settle for "black-box" models like neural networks that are highly accurate but impossible to interpret. Symbolic Regression (SR) seeks the opposite: a concise, "white-box" mathematical expression (like $y = \sin(x) + x^2$) that explains the data.
The challenge is that the space of all possible mathematical expressions is discrete and grows exponentially with length, making it an NP-hard search problem. Traditionally, this has been the domain of Genetic Programming (GP)—evolving populations of formulas. However, GP scales poorly and is sensitive to hyperparameters. Deep learning has historically struggled here because standard training techniques (like backpropagation) don't play well with discrete, non-differentiable formula trees.
Methods
The authors propose Deep Symbolic Regression (DSR), which bridges the gap between deep learning and symbolic search using three key components:
- The RNN Generator: Instead of a fixed model, they use an RNN to "emit" a mathematical expression one token at a time (e.g.,
+,sin,x). By representing expressions as pre-order traversals of a tree, the RNN can generate variable-length formulas.
- In Situ Constraints: To ensure the RNN doesn't waste time on nonsense (like
ln(exp(x))or nested trigonometric functions), the authors apply constraints during sampling. They simply zero out the probability of "illegal" tokens based on the current state of the expression tree. - Risk-Seeking Policy Gradient: This is the "secret sauce." Standard Reinforcement Learning (like REINFORCE) tries to improve the average reward. But in symbolic regression, we don't care if the average formula is mediocre; we only care about finding the one perfect formula. The authors' new objective function optimizes the expectation of the top $\epsilon$ fraction of samples, forcing the network to focus on "best-case" performance.
For expressions with constants (like $y = c \cdot x$), they use a non-linear optimizer (BFGS) to fine-tune the values of $c$ for every generated expression.
Datasets
The model was evaluated on the Nguyen benchmark suite, a set of 12 classic symbolic regression problems. To push the limits, the authors also tested:
- Noisy Data: Adding Gaussian noise to the target variables.
- Stochastic Rewards: Adding noise directly to the reward signal to test the robustness of the risk-seeking gradient.
- Literature Comparisons: Directly comparing against results from other recent papers using benchmarks like the Jin and Neat suites.
Key Insights and Ideas
- Large Models for Small Models: The core philosophy is using a high-capacity model (the RNN) as a search engine to find low-capacity, interpretable models (the formulas).
- The "Expectation Problem": The paper identifies a mismatch in standard RL for search tasks. If you optimize for the "average" sample, you might never hit the rare, high-reward "perfect" formula. The risk-seeking gradient solves this by essentially saying, "Only listen to the winners."
- Rewriting vs. Editing: Unlike Genetic Programming, which modifies existing trees (often leading to "bloat"), the RNN "rewrites" a new expression from scratch in every iteration, informed by the gradient. This helps it avoid getting stuck in local minima.
Key Results
- State-of-the-Art Recovery: DSR achieved an average recovery rate of 83.6% across the Nguyen benchmarks, significantly beating Eureqa (73.9%), which has long been considered the gold standard in the field.
- Noise Robustness: DSR remained stable under high levels of noise where other methods, particularly Priority Queue Training (PQT), failed.
- Mathematical Discovery: In one test (Neat-6), the algorithm independently discovered a remarkably accurate approximation of the harmonic series, where the Euler-Mascheroni constant ($\gamma$) naturally emerged in the recovered expression.
Limitations and Future Work
While powerful, DSR currently focuses on relatively small expressions (up to 30 tokens). Scaling to extremely high-dimensional datasets or much longer programs remains a challenge.
The authors suggest that the risk-seeking policy gradient is a general-purpose tool. Beyond formulas, it could be applied to any "best-of-N" search problem, such as neural architecture search (NAS), molecular design, or even optimizing for high scores in Atari games rather than just average performance. They also hint at hybrid methods that combine the RNN's search capabilities with GP's evolutionary operators.
Summary updated