Synthesizing Physics Formulae with Transformers
Organizations: Department of Computing Science, University of Alberta, 116 Street and 85 Avenue, Edmonton, AB, T6G 2R3, Canada · Filuta AI, 1606 Headway Circle, Austin, TX 78754, USA · Department of Computer Science, Data Science, University of British Columbia, 6200 University Blvd, Vancouver, BC Canada V6T 1Z4, Canada · McKelvey School of Engineering, Washington University in St. Louis, 1 Brookings Drive, St. Louis, MO 63130-4899, USA · Department of Biology, University of Alberta, 116 Street and 85 Avenue, Edmonton, AB, T6G 2R3, Canada
Abstract
Finding a compact formula that fits a set of input-output pairs and predicts outputs on unseen inputs is a fundamental problem in science. Symbolic regression automates the search for such formulae: search-based methods explore the space of possible formulae directly, while transformers pre-trained on synthetic data produce formulae of comparable quality substantially faster. Existing transformers, however, are prone to overfitting --- they find formulae that fit the training data well but do not extrapolate to input ranges unseen during training. We address this by shaping the set of formulae used to train a transformer, and show that the resulting formulae extrapolate substantially better. Fine-tuning the transformer on data with noise-corrupted target values further makes the synthesized formulae robust to noise in the observations. On SRBench and LLM-SRBench our transformer synthesizes a formula in about ten seconds and extrapolates better than all evaluated methods at a comparable budget. Search-based methods surpass our accuracy only when given one to three orders of magnitude more time.
Figures & tables
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Binary | Unary (continued) | ||||
|---|---|---|---|---|---|
| + | - - | ||||
| abs | |||||
| - | pow3 | ||||
| / | tan | ||||
| pow | arcsin | ||||
| Unary | arctan | ||||
| Parameter | Value |
|---|---|
| Architecture | |
| hidden layers | |
| hidden activation | |
| output layer | linear, one unit |
| weights | for variables |
| Input and target scaling | |
| Symbol | Value | Meaning |
| Training data generation (Section 4.1 ) | ||
| largest number of variables in a formula | ||
| smallest number of nodes in a formula | ||
| largest number of nodes in a formula | ||
| decay of the formula size distribution | ||
| data points per training instance | ||