Mask-Based Deep Symbolic Regression
Organizations: Kahlert School of Computing University of Utah · Scientific Computing and Imaging Institute University of Utah · Department of Mechanical Engineering University of Utah
Abstract
Diffusion has emerged as a powerful framework for generative modeling, achieving remarkable success in applications such as image and audio synthesis. Enlightened by this progress, we propose a novel diffusion-based approach for symbolic regression. We construct a random mask-based diffusion and denoising process to generate diverse and high-quality equations. We integrate this generative processes with a token-wise Group Relative Policy Optimization (GRPO) method to conduct efficient reinforcement learning on the given measurement dataset. In addition, we introduce a long short-term risk-seeking policy to expand the pool of top-performing candidates, further enhancing performance. Extensive experiments and ablation studies have demonstrated the effectiveness of our approach.
Figures & tables
| Dataset | MDSR | CADSR | MODSR | MMSR | SNIP | TPSR | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Feynman | 0.991 | 17.7 | 0.934 | 16.5 | 0.788 | 16.4 | 0.991 | 20.8 | 0.985 | 31.6 | 0.993 | 57.2 |
| Strogatz | 0.994 | 13.0 | 0.980 | 15.4 | 0.970 | 15.8 | 0.982 | 21.6 | 0.995 | 29.3 | 0.965 | 56.1 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyperparameter | MDSR |
|---|---|
| Variables | {1, (Constant Token), } |
| Unary Functions | {sin, cos, log, , exp} |
| Binary Functions | {+, -, *, /, } |
| Risk Seeking Percent ( ) | |
| Learning Rate | 5E-4 |
| Max Depth | 32 |
| Symbolic Solution Rate (%) | Accuracy Rate (%) | Simplified Complexity | Time (m) | ||||||||||
| Algorithm | 0.0 | 0.001 | 0.01 | 0.1 | 0.0 | 0.001 | 0.01 | 0.1 | 0.0 | 0.001 | 0.01 | 0.1 | Median |
| AFP | 22.3 | 19.9 | 16.9 | 12.9 | 43 | 42 | 40 | 41 | 29.4 | 28.4 | 29.0 | 30.8 | 58.1 |
| AFP_FE | 28.1 | 22.7 | 20.3 | 12.9 | 56 | 50 | 50 | 50 | 34.6 | 35.7 | 34.5 | 36.8 | 480.5 |
| AIFeynman | 61.8 | 31.9 | 12.6 | 0.9 | 74 | 74 | 68 | 10 | 83.3 | 88.7 | 99.3 | 110.5 | 493.2 |
| Bingo | 48.8 | 14.6 | 4.8 | 0.8 | 64 | 60 | 62 | 59 | 15.6 | 19.3 | 21.3 | 22.5 | 375.7 |
| BSR | 2.5 | 0.6 | 0.1 | 0.0 | 12 | 11 | 12 | 7 | 34.3 | 35.5 | 36.8 | 38.4 | 480.0 |
| Dataset | Method | Train | Test | Runtime (s) | Complexity |
|---|---|---|---|---|---|
| Water retention | MODSR | 0.621 | 0.556 | 16.655 | 26.500 |
| E2E | 0.000 | -0.042 | 8.168 | 55.625 | |
| SNIP | 0.887 | 0.860 | 3558.539 | 35.250 | |
| CADSR | 0.689 | 0.622 | 6481.074 | 17.625 | |
| MDSR | 0.864 | 0.835 | 1869.911 | 23.875 | |
| PySR | 0.967 | 0.948 | 3462.261 | 31.500 |
| Model | Run | Train | Test | Best equation |
|---|---|---|---|---|
| MODSR | 49529 | 0.724 | 0.792 | (-1.35e4+(((1.94sin((50.4+(0.598PV))))-(-0.351Flow))-(((0.240Flow)-(-8.58e3arctan(((-5.43e3PV)-(741Size)))))-(-1.23Co)))) |
| E2E | 49529 | 0.004 | 0.117 | (-0.005+(-0.06*((1.6+(-8.6sin(((0.01+(0.2(1/(((-0.724+(0.704*(-1.26+(0.378PV))))(-9+(-0.09*(-1.16+(65.8Coductivity)))))))))+(8+(-0.6cos(((0.09+(0.9*(-2.42+(0.557Flow))))+((0.02+(0.9(-17.3+(16.7Size))))+(0.02+(9(-1.63+(1.98*Co))))))))))))**2)) |
| SNIP | 40320 | 0.972 | 0.975 | (-6.16+((1/((-1.76e-4+(-8.67e-5Co))))((-2.28e-4Size)+((1.47e-3Coductivity)-((-2.15e-4arctan((-36.1+(8.76PV))))-((-3.87e-4arctan((-9.90+(12.5PV))))-(3.23e-5*Flow))))))) |
| PySR | 49059 | 0.968 | 0.970 | (1.09**(Flow/Co**0.853)+sin(1.83/(4.79-PV)))*(sin(sin(2.36/PV)*1.40)+0.602)-4.99 |
| MDSR | 8432 | 0.935 | 0.933 | ((c1**(PV+(((c3+cos(PV))+(log((Co/Flow))+log(Co)))+(PV**c2))))-c0) |
| CADSR | 8432 | 0.917 | 0.889 | (((square(((c5**(PVPV))/c4))-(c3/Size))-(c1/(PV(PV/(c6**Size)))))-((c2/PV)-c0)) |
| Model | Run | Train | Test | Best equation |
|---|---|---|---|---|
| MODSR | 49529 | 0.680 | 0.532 | (-5.28+((1.04PC2)-(-0.371(PC1*(((-0.626Gsta1)-(0.0794Akr7a3))-(((-8.59sin(((-0.207Gsta6)-(4.61cos(((6.56(Cyp3a11PC2))-(-59.4Gsta3)))))))-(3.68Cyp2a3))+(-0.911Cyp2a5))))))) |
| E2E | 40320 | 0.144 | 0.341 | ((-5.2+(0.36*(0.002+(9.42PC1))))+((0.004+(-0.007cos(((-0.03+(9*(-3.68+(0.902Cyp2a5))))+(0.9+(0.9(-4.09+(0.332Cyp3a11))))))))((0.01+(60cos(((0.9+(0.9(-5.62+(0.598Akr7a3))))((0.06+(0.9*(0.0476+(9.52PC2))))+((0.01+(-0.9(-2.4+(0.92Gsta1))))+(0.6+(-2(-4.04+(1.8Cyp2a3))))))))))+((-0.01+(-0.01(-2.32+(0.401Gsta6))))+((-0.01+(-0.01(-2.31+(0.924Gsta3))))+(-0.5+(0.01(-6.08+(0.12*Rsrc1))))))))) |
| SNIP | 40320 | 0.687 | 0.504 | (-5.23+(((2.86PC2)-((-0.271Cyp2a3)+((9.56e-7*(((-2.46e5Cyp2a3)+(9.98(Cyp3a11*((1.6e3Cyp2a3)-(87.5Akr7a3)))))Gsta1))-((-34.3((-0.0752+(0.00184Cyp2a5)))2)-(2.87e-9((-1.23e4+(-5.06e4PC2)))**2)))))((1/((-2.61e4+(2.32e4Gsta1))))(((-0.751*(Cyp3a11Cyp3a11))+(5.68e3(1/((6.36e4+(3.42e3Cyp3a11))))))((412*(Akr7a3PC1))+(-6.49e3PC1)))))) |
| PySR | 49059 | 0.838 | 0.500 | sin((PC1+Gsta1**(-9.091))(Cyp2a3exp(sin(Gsta18.09)+cos(Rsrc1/0.595+0.011/PC1))+sin(Gsta18.090)))-5.229 |
| MDSR | 49059 | 0.452 | 0.539 | (c0/(Cyp2a3**PC1)) |
| CADSR | 40320 | 0.475 | 0.541 | ((PC2+c0)+tan(exp(PC1))) |
Symbolic Regression
Symbolic regression searches data for compact mathematical expressions that balance predictive accuracy with interpretability.
See all 144 papersData Enrichment for Symbolic Regression Using Diffusion Models
GENSR: Symbolic Regression Based in Equation Generative Space
map construction -> coarse localization -> fine search'' paradigm. Specifically, GenSR first pretrains a dual-branch Conditional Variational Autoencoder (CVAE) to reparameterize symbolic equations into a generative latent space with symbolic continuity and local numerical smoothness. This space can be regarded as a well-structured map'' of the equation space, providing directional signals for search. At inference, the CVAE coarsely localizes the input data to promising regions in the latent space. Then, a modified CMA-ES refines the candidate region, leveraging smooth latent gradients. From a Bayesian perspective, GenSR reframes the SR task as maximizing the conditional distribution , with CVAE training achieving this objective through the Evidence Lower Bound (ELBO). This new perspective provides a theoretical guarantee for the effectiveness of GenSR. Extensive experiments show that GenSR jointly optimizes predictive accuracy, expression simplicity, and computational efficiency, while remaining robust under noise.