Abstract
Symbolic regression (SR) is the process of finding an unknown mathematical expression given the input and output and has important applications in interpretable machine learning and knowledge discovery. The major difficulty of SR is that finding the expression structure is an NP-hard problem, which makes the entire process time-consuming. In this study, the solution of expression structures was regarded as a classification problem and solved by supervised learning such that SR can be solved quickly by using the solving experience. Techniques for classification tasks, such as equivalent label merging and sample balance, were used to enhance the robustness of the algorithm. We proposed a symbolic network called DeepSymNet to represent symbolic expressions to improve the performance of the algorithm. DeepSymNet has been proven to have a strong representation ability with a shorter label compared to the current popular representation methods, reducing the search space when predicting. Moreover, DeepSymNet conveniently decomposes SR into two smaller subproblems, which makes solving the problem easier. The proposed algorithm was tested on artificially generated expressions and public datasets and compared with other algorithms. The results demonstrate the effectiveness of the proposed algorithm.
Introduction
Symbolic Regression (SR) represents a significant goal in interpretable machine learning: identifying the precise mathematical formula—such as $y = x^2 + \sin(x)$—that underlies a given dataset. Unlike standard "black box" neural networks, SR yields human-readable equations, facilitating knowledge discovery.
However, SR is computationally intensive because determining the optimal combination of operators and variables is an NP-hard combinatorial problem. Traditional approaches, such as Genetic Programming (GP), often struggle with efficiency as they initiate a new search for every problem. While recent deep learning methods attempt to learn SR, they frequently encounter issues with inefficient representation "labels" and mathematical ambiguity, where multiple strings represent the same underlying equation, complicating the training process.
Methods: The DeepSymNet Framework
The authors propose DeepSymNet, a framework that reframes equation discovery as a sequence classification task.
Architecture and the Identity Operator
Instead of the conventional tree-based representation, DeepSymNet utilizes a layered symbolic network. A pivotal innovation is the "id" (identity) operator, which permits information to pass through layers unchanged. This allows the network to reuse mathematical modules across different depths, resulting in significantly shorter and more efficient labels for describing equations.
Two-Step Classification and Labeling
The framework decomposes the SR problem into two distinct subtasks:
- Operator Selection: Identifying the necessary mathematical symbols (e.g., sin, cos, +, etc.).
- Connection Selection: Determining the linkages between these operators and input variables.
By converting the network structure into a numerical vector, the model can treat the discovery process as a classification problem.
Transformer-Based Learning and Optimization
A Transformer model is employed to map input-output data sequences directly to these equation labels. Following the prediction of the equation's "skeleton," the model utilizes the BFGS numerical optimizer to determine precise constant values. To enhance robustness, the authors implemented equivalent label merging (clustering mathematically identical strings) and sample balancing to prevent bias toward simpler expressions.
Performance and Benchmarking
DeepSymNet was evaluated on synthetic datasets with varying complexity (up to six hidden layers) and classic public benchmarks, including Koza, Korns, Keijzer, Vlad, ODE, and AIFeynman.
Key Insights
- Efficiency through Brevity: The use of the "id" operator enables DeepSymNet to produce labels significantly shorter than those of previous state-of-the-art models like NeSymReS. Shorter labels reduce the search space, facilitating more effective learning for the Transformer.
- Classification Advantages: Treating SR as classification allows for the application of standard techniques like label merging, which significantly improves model robustness against mathematical ambiguity.
- Operator Selection as a Bottleneck: Research indicated that the primary challenge in SR is selecting the correct operators. A specialized variant (DSN2) focused on operator selection showed substantial accuracy improvements.
Results
DeepSymNet (DSN2) consistently outperformed other supervised models such as E2E and SymbolicGPT. On the AIFeynman dataset, it achieved higher recovery rates than traditional search-based methods like GP and DSR. Furthermore, DeepSymNet is orders of magnitude faster; while GP may take hundreds of seconds, DeepSymNet predicts structures in a single forward pass. For instance, on AIFeynman, DeepSymNet's execution time was approximately 789 seconds, compared to nearly 8000 seconds for EQL.
Discussion and Future Work
Despite its successes, DeepSymNet faces challenges in scaling to extremely deep, nested equations where accuracy tends to decline. Additionally, performance is sensitive to the sampling interval of test data relative to training data. Future research may explore hybrid models that combine the rapid inference of supervised learning with the iterative refinement capabilities of reinforcement learning or search-based algorithms.
Summary updated