“Know how to solve every problem that has been solved.” “What I cannot create, I do not understand.” — Richard Feynman

An Orchestrator: AI-Feynman Decomposition Meets a Solver Portfolio

Machine Learning

Three engines elsewhere on this site attack symbolic regression by three different routes — a genetic search over expression trees, SISSO's compressed-sensing sweep of a feature space, and a trained transformer that generates formulas from a learned prior. All three share one weakness: they degrade as the number of variables grows, because the tree space, the feature count, and the sequence length all explode with dimension. AI-Feynman's contribution is a way to dodge that explosion — use the structure of physics to break a many-variable law into one-variable pieces. This page wires the two ideas together into a single method: AI-Feynman's decomposition on the outside, a portfolio of all three solvers on the inside. The decomposition manufactures exactly the easy case — a single variable — that each engine is strongest on, and the portfolio lets the best tool win each piece.

Separability turns n variables into n problems

The reduction AI-Feynman leans on hardest is separability. Many laws factor: a force that is a product of a charge term and a distance term, an energy that is a sum of a kinetic and a potential piece. If or , then the two variables never actually interact, and finding is really two independent one-variable searches. The trick is detecting this from data alone. Fit a smooth surrogate to the scattered points so you can probe the function anywhere, then hold every variable but one fixed at a base point and read off the resulting one-dimensional profile along each axis. If those profiles add back up to the data, the law is additively separable; if they multiply back, it is multiplicatively separable (which is just additive separability of ). Whichever reconstruction matches is both the diagnosis and the decomposition — the profiles are the one-variable subproblems.

def surrogate(X, y):                 # 1. a smooth stand-in we can probe ANYWHERE
    return RBFInterpolator(X, y, kernel='thin_plate_spline')

def detect(rbf, X, x0):              # 2. hold all but one variable fixed at a base point x0
    # profile_i(t) = f(x0 with coordinate i replaced by t)  -- a 1-D slice of the surface
    profs = [rbf(vary_only(i, x0)) for i in range(n_vars)]
    r2_add = affine_fit(sum(profs),  y)     # do the slices ADD back to the data?
    r2_mul = scale_fit(prod(profs),  y)     # or MULTIPLY back? (mult = additive in log)
    return 'add' if r2_add > r2_mul else 'mul'     # whichever reconstructs f is the structure

def portfolio(x, y):                # 3. every 1-D leaf -> all three engines COMPETE
    cands = [gp_solve(x, y),        #    genetic programming
             sisso_solve(x, y),     #    SISSO
             symgpt_solve(x, y)]    #    the trained transformer
    return simplest_within(cands, tol=0.005)       # keep the cleanest near-best formula

That last function is where the four methods become one. Each one-variable leaf is handed to a portfolio — the genetic search, SISSO, and the transformer all attempt it, and the orchestrator keeps the simplest formula that comes within a whisker of the best fit. This is the piece plain AI-Feynman does not have: it uses a polynomial fit or a brute-force table at its leaves, whereas here three genuinely different symbolic engines compete for each one. And it is the only setting in which the transformer can even play — it was trained on a single variable, so the decomposition is what hands it a problem it can solve. The reductions build the transformer's home turf.

Decompose-and-conquer beats the monolith

Two rows of leaf plots. Top row, a three-variable multiplicative law split into x-squared won by GP, an exponential won by SISSO, and a Lorentzian bump won by GP. Bottom row, a two-variable additive law split into x-cubed won by SISSO and a sine won by GPT. Every fitted curve lies exactly on its data. A side panel notes monolithic GP reaches R-squared 0.997 and 0.994 while the decomposed solver reaches 0.9998 and 1.0000.

Two targets show it working. The first is a three-variable multiplicative law, ; the second an additive one, . Handed all variables at once, the monolithic genetic search gets close but not exact and returns a sprawling expression, while SISSO stalls badly on the product (). The orchestrator detects the separability, splits each into one-variable leaves, and lets the portfolio settle them:

=== f = x^2 * exp(0.5 y) / (1 + z^2)      [3 variables] ===
  monolithic baseline (all variables at once):   GP R2 = 0.997    SISSO R2 = 0.893
  separability detected:  MULTIPLICATIVE
    leaf x:   GP 1.000   SISSO 1.000   GPT  1.000    ->  GP     x^2
    leaf y:   GP 0.999   SISSO 0.999   GPT  0.319    ->  SISSO  sqrt(exp(y)) = exp(0.5 y)
    leaf z:   GP 1.000   SISSO 0.977   GPT -1.223    ->  GP     1 / (1 + z^2)
  recombine (product) + one global fit:           R2 = 0.99984

=== f = x^3 + sin(y)                      [2 variables, additive] ===
  monolithic baseline:                            GP R2 = 0.994    SISSO R2 = 0.984
  separability detected:  ADDITIVE
    leaf x:   GP 1.000   SISSO 1.000   GPT  0.996    ->  SISSO  x^3
    leaf y:   GP 0.909   SISSO 0.845   GPT  1.000    ->  GPT    sin(y)
  recombine (sum) + one global fit:               R2 = 1.00000

The division of labor is the point. On the multiplicative law the genetic search claims the polynomial and the Lorentzian leaves while SISSO recognizes the exponential (as , a single constructed feature); on the additive law SISSO takes the cubic and the transformer — in its trained one-variable regime — nails the sine that the other two only approximate. No single engine wins every leaf, and that is exactly why running all three beats committing to one. Recombine the leaf formulas with a product or a sum, fit one global constant, and the three-variable law lands at and the additive one at — from a data-only start, with an interpretable factored formula rather than the monolith's tangle.

What makes it hard, and what real AI-Feynman adds

The point, for a computational scientist

A real law from a simulation rarely depends on one variable — an adsorption energy varies with coverage and strain and composition at once, a rate with temperature and pressure and concentration. That is the regime where every single-strategy symbolic regressor struggles and where this composition earns its keep: use physics to argue the law separates, and a hard multivariable discovery collapses into a handful of one-variable ones, each dispatched to whichever of the three engines handles it best. It is the capstone of the symbolic-regression canon on this site — not a fourth method, but the argument that the three are complementary tools and that the right move on a hard problem is to reach for a decomposition and then let them compete.

Try First

Each prompt asks a checkable question about the working code or math above — predict an output, derive a sign, state an invariant, find a bug. Commit to an answer before clicking "reveal." That commitment is the whole point: if your answer matched, you understand the piece you were looking at; if it didn't, that's the part worth re-reading.

predict
The detector tests additive separability directly, but it tests multiplicative separability by the same additive machinery applied to . Why does that work, and what class of function would it fail on?
why does this work
On the multiplicative law the genetic search alone already scored attacking all three variables at once. So what did the whole decompose-and-portfolio apparatus actually buy?

Reproduce it

scripts/gen_hybrid_sr.py is the orchestrator: an RBF surrogate, the additive and multiplicative separability tests, a portfolio leaf-solver that calls the genetic-programming engine, SISSO, and the trained SymGPT model in turn, and the recombination with a final global fit. It imports all three engines directly from the rest of this site — nothing is reimplemented — and recovers and from data alone, reporting which engine won each leaf. The decomposition idea is Udrescu and Tegmark, Sci. Adv. 6, eaay2631 (2020); the portfolio of three from-scratch solvers is what this site adds to it.