Skip to main content
Back

Rutgers Researcher Hits 99%+ Solve Rate on Physics Equations AI Couldn't Crack

A self-supervised approach reduces complex physics expressions to compact forms by learning from reversed scrambling trajectories, hitting near-perfect solve rates.

Pro

  • New self-supervised method for symbolic simplification hits 99.9% on dilogarithms and 99.4-99.9% on scattering amplitudes.
  • Training data comes from scrambling simple expressions forward, then reversing to get oracle trajectories.
  • A permutation-equivariant transformer with ~165K parameters predicts which identity to apply to which term.
  • Multi-label soft loss handles algebraic symmetries, boosting 4-point amplitude solve rate from 73% to 98%.
  • Combined with contrastive grouping and beam search, hits 100% on 5-point Yang-Mills gluon amplitudes up to 228 terms.
  • Code available at RL_dilogs_claude and RL_amplitudes_claude.

Symbolic simplification sits at an awkward intersection of mathematics and machine learning: the goal is well defined, the rules are known, but choosing which identity to apply at which point in a growing expression is a combinatorial minefield. A new paper from David Shih at Rutgers attacks this problem with a deceptively simple trick: if simplifying is hard, but making something more complicated is easy, then generate training data by scrambling simple expressions and reversing the recorded operations. The resulting model reaches near-perfect solve rates on two high-energy physics benchmarks where prior transformer approaches plateaued at 92 to 98 percent.

Why simplification breaks conventional ML

Physicists rely on identities to reduce Feynman diagram outputs into interpretable expressions, but no general algorithm exists to decide which identity to apply where. The difficulty is combinatorial: at each step, many possible identities could be applied to many parts of the expression, and the right choice often temporarily increases complexity before subsequent cancellations yield a simpler form.

Two prior efforts framed this as a translation problem. Dersy, Schwartz, and Zhang (DSZ) for dilogarithms and Cheung, Dersy, and Schwartz (CDS) for scattering amplitudes started from simplified expressions, applied identities to scramble them into complicated expressions, and then trained a seq2seq transformer to regress the simplified form from the scrambled input. DSZ also tried reinforcement learning, which performed worse than the regression baseline. The core weakness is that end-to-end regression asks the model to make a single global leap from complex to simple, with no intermediate supervision.

The scramble-and-reverse trick

The new approach reframes simplification as a Markov decision process where states are expressions, actions are identity applications, and transitions are deterministic. Rather than train with sparse rewards, it uses what the author calls oracle trajectories.

The central insight is that while simplification is hard, complexification is easy: one can always make an expression more complicated by applying identities in the forward direction. By recording the inverse operations during forward scrambling, one can obtain a near limitless supply of oracle trajectories.

The procedure has three parts:

  1. Build a simple target expression from the goal set.
  2. Scramble it forward by applying random identities, recording every intermediate state.
  3. Reverse the sequence, and for each consecutive pair find the inverse action by brute-force searching all valid identities.

Because states at every difficulty level appear naturally in the scramble path, the model sees dense coverage of the space, which sidesteps a classic weakness of behavioral cloning where small mistakes push the agent into unfamiliar states.

Architecture choices that matter

The policy network is a compact transformer encoder with roughly 165K parameters: embedding dimension 64, four attention heads, three layers. Two design choices are worth noting for anyone thinking about symbolic tasks:

  • No positional encoding. The terms in a mathematical expression form an unordered set, so positional encoding would impose a spurious ordering. Each term gets its own feature vector, and a learnable [CLS] token aggregates global information.
  • Multi-label soft loss. Algebraic symmetries mean multiple actions can produce the same result. Penalizing valid alternatives is counterproductive, so equivalent oracle actions each receive target probability 1/k. For amplitude simplification, where the Schouten identity creates on average 6.2 equivalent inverse actions per transition, switching from single-label to multi-label loss improves the 4-point solve rate from 73% to 98%.

At inference, greedy rollout is augmented by anti-cycle detection (masking previously taken actions from the current state), backtracking to checkpoints at locally minimal complexity, and a Reject Term Increase filter that blocks actions which would grow the term count beyond a threshold.

Results on the two physics benchmarks

On the DSZ dilogarithm test set of 4,737 cleaned expressions, the model produces 2 source-relative failures and 6 target-relative failures. The seq2seq model of DSZ fails to simplify 8.4% of the expressions (399 out of 4,737), a much higher failure rate than the new approach. Notably, the model was trained on scramble depths up to 7 but maintains solve rates above 99.6% out to depth 10, and often finds shorter simplification paths than the number of scrambles applied.

On spinor-helicity scattering amplitudes evaluated against the CDS test sets:

SettingNew model (target-rel failures)CDS with beam search B=20
4-point (9,869 samples)11176
5-point (10,256 samples)36414
6-point (9,934 samples)63304

Failure rates stay below 0.7% even at 6-point, despite an action space of 29,760 identity-bracket-term combinations. Interestingly, the two models' failure sets are nearly disjoint: the new model solves greater than 96% of CDS target-relative failures, and only 5 to 11 expressions per multiplicity are unsolved by either model.

Scaling to real Feynman-diagram output

The CDS test set averages 4 to 10 source terms. Real 5-point tree-level gluon amplitudes from Feynman diagrams are another beast entirely: expressions range from 8 to 228 terms with a mean around 90, far exceeding both the CDS test set complexity and the model's input capacity of 25 terms. All of them collapse to the single-term Parke-Taylor formula after enough cancellations.

To bridge this gap, the pipeline combines the trained policy with two additional pieces:

  1. Greedy contrastive grouping. A pretrained contrastive encoder embeds each numerator term. Pairwise cosine similarity identifies groups of at most 25 terms likely to simplify together, and the model acts on each sub-expression. From a mean of 90 terms, this reduces to a mean output of around 32 terms, and 17 of the 103 forms are solved directly to the Parke-Taylor formula in this phase alone.
  2. Beam search over identity sequences. The remaining forms feed into a beam of size 20, ranked by term and bracket count, with global deduplication of visited states and patience-based termination.

All 103 forms are successfully simplified to the 1-term Parke-Taylor formula, a 100% solve rate. Of these, 17 are solved in the greedy phase alone and the remaining 86 require beam search. The hardest form (starting at 178 terms) required 98 beam search steps to reach the target. The CDS sequential simplification, by comparison, drops below 50% for expressions with more than 100 terms.

The real breakthrough

Beyond the headline solve rates, the more general lesson is that decomposing a hard global mapping into a sequence of local supervised steps generalizes far better than end-to-end regression. The dilogarithm model was trained on at most 7 scrambles and holds up at depth 10. The amplitude model was trained on expressions of about 10 terms and, wrapped in contrastive grouping and beam search, handles 228-term Feynman outputs. This is the classic argument for step-by-step supervision, and it carries any symbolic domain with reversible rewrite rules and known simple forms.

One other detail worth flagging: the author notes in the acknowledgements that the work was done in full collaboration with Claude Code, which wrote the code, trained and evaluated the models, and contributed to the writing under supervision. It is one of the more transparent statements yet about AI-assisted research at this level of technical depth.

Availability

Two repositories accompany the paper: RL_dilogs_claude for dilogarithm simplification and RL_amplitudes_claude for spinor-helicity amplitudes. Both benchmarks reuse the test sets published by DSZ and CDS, making head-to-head comparisons straightforward.