All models

SymbolicGPT

A GPT-style model that reads a set of data points and writes the equation that fits them.

275 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (26 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
30.6M
Operations
275
Framework
PyTorch
Recurrent
No
Published
2021
Cited by
208 (as of 29 November 2026)
Authors
Mojtaba Valipour, Bowen You, Maysum Panju, Ali Ghodsi
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20689
Graph hash
595ca70a7059bee1e25942169b7d7bb1c94a1173f2942b5d004e3e9e6b09da6b
Skeleton hash
2fc0ee92b0be8b8fc524b6c7ac8cfb82e9516a3250a9318c9aed3c4c14f07796
Architecture hash
176e4d490679619c698a55bc6d67a6a5f972d61703ee58f2a8c4de7ece67e380
Diagram SHA-256
17693c17139dd37977434f97e65c1b95303b367e6d399892e4556165d9ccf54a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

SymbolicGPT treats symbolic regression, the search for a mathematical expression that fits a dataset of inputs and outputs, as a language modeling task. The paper frames it as captioning: the input is a cloud of points and the model returns the equation that describes them. One language model is trained once and then solves each new regression instance by inference.

The method has three stages: a T-net produces an order-invariant embedding of the input dataset, a GPT language model generates a skeleton equation, and constant values are then optimized to fill in the skeleton. The T-net ends in a global max pool, which removes the dependence on both the number of points and the order in which they are given. The constants are fitted afterwards with BFGS optimization and replace placeholder tokens in the skeleton.

In the paper's experiments the T-net embedding has size 512 and the output equation is capped at 200 tokens. On its randomly generated test instances, the paper reports that SymbolicGPT given datasets of just 50 points achieves lower regression error than the compared algorithms do with up to 500 points.

Key idea. SymbolicGPT recasts symbolic regression as language modeling, pairing an order-invariant T-net embedding of the data points with a GPT model that writes the equation skeleton.

  • SymbolicGPT
  • symbolic regression
  • equation discovery
  • generative transformer
  • order-invariant embedding
  • equation skeleton
  • language model for symbolic mathematics

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{valipour2021symbolicgptgenerativetransformermodel,
      title={SymbolicGPT: A Generative Transformer Model for Symbolic Regression}, 
      author={Mojtaba Valipour and Bowen You and Maysum Panju and Ali Ghodsi},
      year={2021},
      eprint={2106.14131},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2106.14131}, 
}