MorphingNet: Symbolic Regression Where the Network Is the Formula
Organizations: Thrust of Financial Technology, The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, China.
Abstract
We introduce MorphingNet, a network for symbolic regression (SR) whose units change their function continuously. Instead of searching over expressions built from a fixed operator library, MorphingNet trains the form of each function as a parameter, so SR becomes one continuous optimization problem. Its units are either pole-free rational functions or complex exponential--logarithm functions, which move between exponentials, sinusoids, damped oscillations, power laws and logarithms as their parameters change. The network is a readable formula at every step of training, and no operator library is needed to train it; a structure-recovery step afterwards rewrites the trained formula into short elementary expressions. Training is dense linear algebra, so it is GPU-friendly and scales to large data. MorphingNet achieves state-of-the-art accuracy on SRBench, recovers most generating formulas on synthetic benchmarks, and on large data is up to two orders of magnitude faster than the strongest search method. By turning the search for a formula into the training of a network, MorphingNet offers a new paradigm for SR and for scientific discovery from data.
Figures & tables
| Rewrite | Action |
|---|---|
| Unit | Replace a unit by with from the library. A C unit with becomes exactly. |
| Merge | Replace several terms that depend on the same direction by one function. |
| Quadratic | Collect products into a quadratic form and rewrite it with the fewest products by eigendecomposition. |
| Delete | Delete terms; absorb linear terms into the bias of a product factor. |
| Swap | Swap one elementary function for another if the error halves, e.g. . |
| Template | If the gradient outer product has rank two, fit or . |
| Method | 0 | 0.001 | 0.01 | 0.1 |
|---|---|---|---|---|
| MorphingNet-R | 97.0 0.9 | 96.8 1.1 | 96.3 1.0 | 70.1 2.5 |
| MorphingNet-C | 95.3 1.5 | 94.8 1.0 | 92.8 1.6 | 66.4 3.5 |
| MRGP | 88 | 87 | 83 | 3 |
| Operon | 85 | 86 | 85 | 68 |
| SBP-GP | 75 | 74 | 74 | 50 |
| AI Feynman | 74 | 73 | 69 | 12 |
| Noise-free | Noisy | |||||
|---|---|---|---|---|---|---|
| Unit | Variant | Reached | Ratio | Ops | Ratio | Ops |
| Rational | full | 24/40 | 1 | 36 | 1 | 18 |
| first layer on axes | 16/40 | 5.2 | 67 | 1.3 | 30 | |
| no products | 22/40 | 0.72 | 22 | 0.86 | 10 | |
| one prune level | 16/40 | 1.9 | 56 | 1.2 | 27 | |
| Confluent | full | 24/40 | 1 | 60 | 1 | 17 |
| Family | Exact | Before | After | Operon |
|---|---|---|---|---|
| Response | 36/36 | 26/175 | 7/9 | 16/18 |
| Oscillation | 29/34 | 26/250 | 7/8 | 17/14 |
| Reuse | 31/34 | 15/45 | 5/11 | 17/21 |
| Special | 0/34 | 21/115 | 13/23 | 13/14 |
| All | 96/138 | 23/107 | 7/10 | 16/16 |
| Rows | ||||
|---|---|---|---|---|
| Wall time, CPU | 1.0 | 3.3 | 4.9 | 11.4 |
| Wall time, GPU | – | 4.4 | 24.9 | 122.6 |
| Test error | 22 | 11 | 16 | 18 |
| Method | Noise-free | Noisy | Ops / const. |
|---|---|---|---|
| MorphingNet-R | 7.9e-6 | 4.0e-3 | 30/130 |
| MorphingNet-C | 1.3e-5 | 4.8e-3 | 34/130 |
| Brush | 3.9e-5 | 6.5e-3 | 20/17 |
| Operon | 9.7e-5 | 5.5e-3 | 13/16 |
| PySR | 2.4e-3 | 9.1e-3 | 20/13 |
| ParFam | 9.4e-4 | 4.5e-3 | 10/62 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Layers | Units | Products | Degree |
| 1 | 6 | 2 | 3 |
| 2 | 6 | 2 | 3 |
| 3 | 12 | 4 | 5 |
| Setting | Value |
|---|---|
| weight / group weight | / |
| Warm-up without penalty | 200 LM steps |
| Steps per fit and per refit | at most 2000 |
| Control error | checked after every step |
| Stagnation | 40 steps without a relative improvement of |
| Proximal gradient tolerance |
| Unit | Noise | All | Feynman | Strogatz | Plain rule | Ops / const. |
|---|---|---|---|---|---|---|
| Rational | 0 | 97.0 0.9 | 97.8 0.4 | 90.0 8.0 | 97.0 0.9 | 59 / 216 |
| 0.001 | 96.8 1.1 | 97.8 0.6 | 88.6 9.1 | 96.8 1.1 | 39 / 94 | |
| 0.01 | 96.3 1.0 | 98.0 0.4 | 82.1 8.0 | 96.3 1.0 | 36 / 83 | |
| 0.1 | 70.1 2.5 | 76.5 2.9 | 17.1 5.7 | 33.2 3.5 | 30 / 61 | |
| Confluent | 0 | 95.3 1.5 | 96.5 1.0 | 85.7 9.6 | 95.3 1.5 | 50 / 196 |
| 0.001 | 94.8 1.0 | 95.7 0.8 | 87.9 6.4 | 94.8 1.0 | 37 / 100 |