REVIEW 3 major objections 5 minor 2 cited by
Generating particle physics Lagrangians with transformers
T0 review · 3 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read A transformer trained on field lists can write gauge-invariant particle physics Lagrangians, with over 90 percent accuracy on held-out examples.
desk verdict A real first step in transformer-based Lagrangian generation, with a circularity problem that is honestly acknowledged and should not be fatal, but the physics claims need to be framed as generator imitation until independently validated. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing machinery is a tokenization scheme that turns each field into a sequence of tokens for its spin, its $\mathrm{SU}(3)$ and $\mathrm{SU}(2)$ representations, its $\mathrm{U}(1)$ hypercharge, its helicity, and an identity token used to encode index contractions; derivatives carry the gauge groups they couple to, and each term is followed by explicit contraction information. This token stream is fed to a 357-million-parameter BART-style transformer, a bidirectional encoder paired with an autoregressive decoder, trained with cross-entropy loss on about 280,000 Lagrangians produced by an automated effective-field-theory operator generator plus custom code for kinetic and mass terms. The trained model is then probed by projecting encoder embeddings with t-SNE and by comparing vector offsets between conjugate fields.
What would settle it
Take a field content whose complete gauge-invariant operator basis is known independently from a group-theoretic calculation and check whether the generator used for training misses any allowed term; if it does, the transformer trained on that generator will never output the missing term, showing that its Lagrangian-writing ability is bounded by the generator.
Extended reading notes
Core claim
The paper's central claim is that a transformer, trained purely on input-output pairs of field lists and Lagrangians, can reproduce the gauge-invariance rules of the Standard Model group $\mathrm{SU}(3)\times\mathrm{SU}(2)\times\mathrm{U}(1)$ well enough to write the full Lagrangian for a given field content. On held-out test Lagrangians with up to six matter fields, more than 90 percent of predictions match the reference Lagrangian term-for-term under a score that includes correct contractions and penalizes extra terms; for field contents with seven to ten fields, beyond the training range, over 99 percent of outputs are structurally reasonable, though $\mathrm{U}(1)$ hypercharge conservation gradually degrades. The paper also claims the model has internalized physics concepts rather than memorized strings: embedding analysis shows fields clustered by spin and gauge representation, with conjugation represented as a nearly constant vector offset in embedding space.
Load-bearing premise
The evaluation assumes that the automated generator behind all training and in-distribution test labels produces the complete, correct set of gauge-invariant terms; if that generator has blind spots, the transformer's high scores show fidelity to the generator rather than mastery of particle physics.
Editorial extensions
If this is right
- A learned sequence model can reproduce gauge-invariance constraints from examples: held-out Lagrangians up to six matter fields are generated with over 90 percent exact Lagrangian score, and almost all mistakes are missing or extra terms rather than malformed ones.
- The model's ability to write structurally reasonable Lagrangians survives beyond its training range: for seven to ten input fields more than 99 percent of outputs are reasonable, although U(1) conservation drops from about 91 to 87 percent.
- Training-data design matters: a dataset enriched in short examples and trilinear interactions matches or beats a uniformly sampled dataset on complex terms, supporting the train-set-priming idea for symbolic tasks.
- The embedding analysis indicates that symmetry structure and conjugation are emergent internal representations: fields cluster by spin and gauge representation, and conjugate pairs share a common vector offset.
- Known failure modes point to concrete next steps: counting limitations in bidirectional encoders cause missed terms at high field numbers, and text-based number tokens cause fragile hypercharge arithmetic on out-of-distribution fractions.
Reading between the lines
- Beyond the paper: if the embedding geometry truly tracks gauge representations, one could use the released model to probe which representation pairs it treats as equivalent and to detect where its notion of conjugation silently fails.
- Beyond the paper: because all training and in-distribution labels come from a single automated generator, the reported accuracies are upper bounds on physical correctness; validating that generator on a few small field contents against an independent operator-basis computation would settle how much of the score is physics versus imitation.
- Beyond the paper: the failure on non-minimal fractions suggests that replacing tokenized rationals with a continuous number encoding, as explored in other symbolic-mathematics transformers, could substantially improve out-of-distribution hypercharge conservation.
- Beyond the paper: the tokenization is representation-agnostic enough that the same pipeline could in principle be pointed at larger gauge groups or higher-dimensional EFT operators, though the paper only argues this is easy and does not demonstrate it.
Formalized claims in Lean
-
Claim #1: The paper's central claim is that a transformer, trained purely on input-output pairs of field lists and Lagrangians, can reproduce the gauge-invariance rules of the Standard Model group $\mathrm{SU}(3)\times\mathrm{SU}(2)\times\mathrm{U}(1)$ well enough to write the full Lagrangian for a given field content. On held-out test Lagrangians with up to six matter fields, more than 90 percent of predic
/-- @claim 1 The paper's central claim is that a transformer, trained purely on input-output pairs of field lists and Lagrangians, can reproduce the gauge-invariance rules of the Standard Model group $\mathrm{SU}(3)\times\mathrm{SU}(2)\times\mathrm{U}(1)$ well enough to write the full Lagrangian for a given field content. On held-out test Lagrangians with up to six matter fields, more than 90 percent of predic -/ def central_claim : Prop :=
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper trains a 357M-parameter BART transformer to translate a list of particle fields, with their Standard Model gauge quantum numbers, into a Lagrangian. The training and test data are generated by AutoEFT for interaction terms plus custom code for kinetic and mass terms, using a custom tokenization that encodes fields, derivatives, commutators, and index-contraction information. The authors report over 90% exact Lagrangian scores on held-out in-distribution Lagrangians, study out-of-distribution generalization to 7-10 fields and non-minimal U(1) charge representations, and analyze encoder embeddings for symmetry clusters and a conjugation axis. They release the model, datasets, and an interactive demo, and conclude in Section 8 that transformers are capable of writing the corresponding particle physics Lagrangian.
Significance. If the results hold, this is a useful benchmark for symbolic generation in theoretical physics, and the released model, datasets, and demo are valuable community assets. The paper is honest about the Standard Model shortfall (best score 0.77 in Table 13) and about the degradation of out-of-distribution performance, and it defines explicit evaluation metrics. However, the central validation is circular: accuracy is measured against the same generator that produced the labels, and the OOD "reasonable" check does not test full gauge invariance, so the physical interpretation of the high scores needs independent support before the Section 8 claim can be accepted at face value.
major comments (3)
- [§3.1, §4, §8] The central claim in §8 that the model is capable of writing the corresponding particle physics Lagrangian rests on the unstated premise that the AutoEFT-plus-custom-code generator of §3.1 produces exactly the correct set of gauge-invariant, Lorentz-invariant, renormalizable terms for each field content. Since every training label and every in-distribution test label is that generator's output, the >90% scores in Table 3 quantify agreement with the generator, not with an independent standard of physical correctness. Please validate the generator on a sample of field contents against an independent enumeration (hand calculation or a second package such as Sarah or Sym2Int), and in Appendix D explicitly compare the generator's Standard Model Lagrangian with the known one-generation SM Lagrangian, including the six Yukawa terms the model is said to miss. The Section 1 acknowledgment of the circularity is not a substitute for this validation.
- [§5, Table 4] The OOD reasonable-Lagrangian criterion in §5 checks syntax, quantum-number plausibility, mass dimension, valid contracted indices, completeness, commutator pairing, and U(1) conservation, but it does not check full SU(3)×SU(2) gauge invariance. A predicted term with a forbidden SU(2) contraction or a color combination containing no singlet would still be counted as reasonable, so the >99% figures in Table 4 overstate the OOD generalization claim. Please re-score the OOD predictions with a full invariant check (for example by running each predicted term through AutoEFT or an invariant-theory routine) and report separately the fractions that are fully gauge invariant and those that only conserve U(1).
- [§6.2, Appendix F, Eq. (15)] The conjugation-axis analysis reduces the 1024-dimensional encoder embeddings to three dimensions with t-SNE before computing difference vectors and cosine similarities. t-SNE is stochastic and designed to preserve local neighborhood structure, not global vector offsets, so a preferred direction in the projected space does not establish a consistent conjugation direction in the model's internal representation. Please repeat the analysis on the raw embeddings (or with a linear projection such as PCA) or otherwise justify that the t-SNE projection preserves offset structure; as it stands, the evidence for the claim that the model has learned conjugation as a consistent transformation is not conclusive.
minor comments (5)
- [Table 4] The two-row layout of Table 4 is garbled in the manuscript: for n=2 and n=7 the numbers appear as four entries rather than two, making the reported percentages hard to read.
- [§3.2] The exact sampling algorithm for the uniform dataset is not given beyond the statement that U(1) hypercharges are positive; please provide the concrete distribution or a pointer to the released generation code.
- [§4, Eq. (14)] The Lagrangian score can be negative because of the length penalty, and Figure 3 shows negative values, but the text never explains how a negative score should be interpreted; a sentence on this would help.
- [§4 and Appendix D] The matching rule for terms in the evaluation metrics is not specified for duplicate or repeated predicted terms; the repeated-term failure mode noted for the 2HDM in Appendix D would be easier to interpret with an explicit statement of whether terms are treated as a multiset.
- [Appendix E] The OOD U(1) test set can contain copies of the same Lagrangian with different non-minimal charge representations, but the text does not report how many distinct underlying Lagrangians remain after de-duplication; please state the effective sample sizes for each entry in Tables 15-18.
Circularity Check
No significant circularity: the paper evaluates against a held-out generator and external model benchmarks; the generator-ground-truth caveat is disclosed, not a hidden reduction.
full rationale
The paper's derivation chain is a supervised sequence-modeling benchmark, not a first-principles physical derivation. Training and test labels are both produced by the AutoEFT-plus-custom-code pipeline (Section 3.1), but the test sets are newly generated and explicitly filtered to remove overlap with training data (Section 4). Accuracy therefore measures held-out generalization to the same generator distribution, which is a legitimate, non-circular evaluation: the model can fail, and it does fail on OOD field counts and on the Standard Model benchmark (Appendix D, best SM Lagrangian score 0.77). The paper's central claim, that transformers can write Lagrangians from a field list, is conditional on the AutoEFT generator enumerating correct gauge-invariant, Lorentz-invariant, renormalizable terms; this ground-truth assumption is a benchmark-validity caveat, not a circular reduction. The paper explicitly acknowledges this in Section 1: 'The code we use to generate our dataset can write Lagrangians from a list of particles automatically, which at first might seem like it defeats the purpose of a training a transformer model with data generated by it.' No load-bearing self-citation occurs: AutoEFT [43] is external, and no author-overlapping uniqueness theorem or ansatz is invoked. The embedding and conjugation analyses are interpretability claims, not derivations of the main result. There is no equation-level reduction of a predicted quantity to a fitted parameter or to the input definition, so no circularity step can be exhibited.
Assumptions & free parameters
free parameters (4)
- Dataset field-count sampling probabilities =
{1: 25%, 2: 25%, 3: 25%, 4: 11%, 5: 7%, 6: 7%}
- Trilinear enrichment fraction =
~50% of Lagrangians with >2 fields
- Context length =
2048 tokens
- U(1) hypercharge sampling range =
numerators -9..9, denominators 1..9, simplified fractions
assumptions (4)
- domain assumption AutoEFT and the custom code produce the complete set of allowed gauge-invariant terms for a given field list.
- domain assumption Every term in the Lagrangian must have integer mass dimension and be renormalizable, limiting terms to up to 4 scalars, 2 fermions, or 2 fermions plus 1 scalar.
- standard math SU(2) representations are pseudo-real, so a doublet and its conjugate transform equivalently.
- ad hoc to paper t-SNE projection to 3 dimensions preserves vector-offset structure well enough for cosine-similarity analysis of conjugation.
Cite this review
Pith. "Pith review of Generating particle physics Lagrangians with transformers." pith.science (2026). https://pith.science/paper/BYTPIMFS
@misc{pith2026250109729,
author = {Pith},
title = {Pith review of: Generating particle physics Lagrangians with transformers},
year = {2026},
howpublished = {\url{https://pith.science/paper/BYTPIMFS}},
note = {Machine review of arXiv:2501.09729}
}
abstract
In physics, Lagrangians provide a systematic way to describe laws governing physical systems. In the context of particle physics, they encode the interactions and behavior of the fundamental building blocks of our universe. By treating Lagrangians as complex, rule-based constructs similar to linguistic expressions, we trained a transformer model -- proven to be effective in natural language tasks -- to predict the Lagrangian corresponding to a given list of particles. We report on the transformer's performance in constructing Lagrangians respecting the Standard Model $\mathrm{SU}(3)\times \mathrm{SU}(2)\times \mathrm{U}(1)$ gauge symmetries. The resulting model is shown to achieve high accuracies (over 90\%) with Lagrangians up to six matter fields, with the capacity to generalize beyond the training distribution, albeit within architectural constraints. We show through an analysis of input embeddings that the model has internalized concepts such as group representations and conjugation operations as it learned to generate Lagrangians. We make the model and training datasets available to the community. An interactive demonstration can be found at: \url{https://huggingface.co/spaces/JoseEliel/generate-lagrangians}.
Figures
Figures from the paper (8 more)
Forward citations
Cited by 2 Pith papers
-
Refining Integration-by-Parts Reduction of Feynman Integrals with Machine Learning
Machine learning program search rediscovers state-of-the-art integration-by-parts seeding heuristics and finds a modestly smaller seed set for a single two-loop benchmark integral.
-
HEPTAPOD: Orchestrating High Energy Physics Workflows Towards Autonomous Agency
HEPTAPOD uses LLM agents to drive FeynRules, MadGraph, Pythia, and analysis tools through schema-validated tool calls and run-card templates, demonstrated on a leptoquark signal scan.
Reference graph
Works this paper leans on
-
[1]
A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, Attention is all you need (2023), arXiv:1706.03762 [cs.CL]
arXiv 2023
-
[2]
V . Mikuni and F. Canelli, Eur.Phys.J.Plus135, 463 (2020), arXiv:2001.05311 [hep-ex]
arXiv 2020
-
[3]
B. M. Dillon, R. Mastandrea, and B. Nachman, Physical Review D 106, 10.1103/phys- revd.106.056005 (2022)
doi:10.1103/phys- 2022
-
[4]
V . Mikuni and F. Canelli, Mach. Learn. Sci. Tech. 2, 035027 (2021), arXiv:2102.05073 [physics.data-an]
arXiv 2021
-
[5]
H. Qu, C. Li, and S. Qian, in International Conference on Machine Learning (PMLR, 2022) pp. 18281–18292
work page 2022
-
[6]
S. Qiu, S. Han, X. Ju, B. Nachman, and H. Wang, Phys. Rev. D 107, 114029 (2023), arXiv:2203.05687 [hep-ph] . 30
work page Pith review arXiv 2023
-
[7]
L. Builtjes, S. Caron, P. Moskvitina, C. Nellist, R. R. de Austri, R. Verheyen, and Z. Zhang, (2022), arXiv:2211.05143 [hep-ph]
arXiv 2022
-
[8]
B. Käch, D. Krücker, and I. Melzer-Pellmann, (2022), arXiv:2211.13623 [hep-ex]
arXiv 2022
Show all 53 references
-
[9]
F. A. Di Bello et al., Eur. Phys. J. C 83, 596 (2023), arXiv:2212.01328 [hep-ex]
2023 arXiv
-
[10]
Finke, M
T. Finke, M. Krämer, A. Mück, and J. Tönshoff, JHEP 06, 184, arXiv:2303.07364 [hep-ph]
-
[11]
Butter, N
A. Butter, N. Huetsch, S. Palacios Schweitzer, T. Plehn, P. Sorrenson, and J. Spinner, (2023), arXiv:2305.10475 [hep-ph]
2023 arXiv
-
[12]
J. A. Raine, M. Leigh, K. Zoch, and T. Golling, Phys. Rev. D 109, 012005 (2024), arXiv:2307.02405 [hep-ph]
2024 arXiv
- [13]
-
[14]
A. Li, V . Krishnamohan, R. Kansal, R. Sen, S. Tsan, Z. Zhang, and J. Duarte, in37th Conference on Neural Information Processing Systems (2023) arXiv:2312.04757 [hep-ex]
2023 arXiv
- [15]
-
[16]
Spinner, V
J. Spinner, V . Bresó, P. de Haan, T. Plehn, J. Thaler, and J. Brehmer, (2024), arXiv:2405.14806 [physics.data-an]
2024 arXiv
-
[17]
Blekman, F
F. Blekman, F. Canelli, A. De Moor, K. Gautam, A. Ilg, A. Macchiolo, and E. Ploerer, (2024), arXiv:2406.08590 [hep-ex]
2024 arXiv
-
[18]
Quétant, J
G. Quétant, J. A. Raine, M. Leigh, D. Sengupta, and T. Golling, Phys. Rev. D 110, 076023 (2024), arXiv:2406.13074 [hep-ph]
2024 arXiv
-
[19]
Caron, N
S. Caron, N. Dobreva, A. F. Sánchez, J. D. Martín-Guerrero, U. Odyurt, R. R. Ruiz de Aus- tri Bazan, Z. Wolffs, and Y . Zhao, (2024), arXiv:2407.07179 [hep-ex]
2024 arXiv
-
[20]
Y . Wu, K. Wang, C. Li, H. Qu, and J. Zhu, Chin. Phys. C49, 013110 (2025), arXiv:2407.08682 [hep-ph]
2025 arXiv
-
[21]
Tagami, T
R. Tagami, T. Suehara, and M. Ishino, EPJ Web Conf.315, 03011 (2024), arXiv:2410.11322 [hep-ex]
2024 arXiv
-
[22]
Brehmer, V
J. Brehmer, V . Bresó, P. de Haan, T. Plehn, H. Qu, J. Spinner, and J. Thaler, (2024), arXiv:2411.00446 [hep-ph]
2024
-
[23]
Van Stroud, P
S. Van Stroud, P. Duckett, M. Hart, N. Pond, S. Rettie, G. Facini, and T. Scanlon, (2024), arXiv:2411.07149 [hep-ex]
2024
-
[24]
Tomiya and Y
A. Tomiya and Y . Nagai, PoSLATTICE2023, 001 (2024), arXiv:2310.13222 [hep-lat]
2024 arXiv
- [25]
-
[26]
Cranmer, A
M. Cranmer, A. Sanchez-Gonzalez, P. Battaglia, R. Xu, K. Cranmer, D. Spergel, and S. Ho, (2020), arXiv:2006.11287 [cs.LG]
2020 arXiv
-
[27]
Lemos, N
P. Lemos, N. Jeffrey, M. Cranmer, S. Ho, and P. Battaglia, Rediscovering orbital mechanics with machine learning (2022), arXiv:2202.02306 [astro-ph.EP]
2022 arXiv
-
[28]
Charton, CoRR abs/2112.01898 (2021), 2112.01898
F. Charton, CoRR abs/2112.01898 (2021), 2112.01898
2021 arXiv
-
[29]
Alnuqaydan, S
A. Alnuqaydan, S. Gleyzer, and H. Prosper, Mach. Learn. Sci. Tech. 4, 015007 (2023), arXiv:2206.08901 [hep-ph]
2023 arXiv
-
[30]
T. Cai, G. W. Merz, F. Charton, N. Nolte, M. Wilhelm, K. Cranmer, and L. J. Dixon, Mach. Learn. Sci. Tech. 5, 035073 (2024), arXiv:2405.06107 [cs.LG]
2024 arXiv
-
[31]
Cheung, A
C. Cheung, A. Dersy, and M. D. Schwartz, (2024), arXiv:2408.04720 [hep-th] . 31
2024 arXiv
-
[32]
Dersy, M
A. Dersy, M. D. Schwartz, and X. Zhang, Int. J. Data Sci. Math. Sci. 1, 135 (2024), arXiv:2206.04115 [cs.LG]
2024 arXiv
-
[33]
Charton, in The Twelfth International Conference on Learning Representations(2024)
F. Charton, in The Twelfth International Conference on Learning Representations(2024)
2024
-
[34]
Lample and F
G. Lample and F. Charton, Deep learning for symbolic mathematics (2019), arXiv:1912.01412 [cs.SC]
2019 arXiv
-
[35]
T. R. Harvey and A. Lukas, JHEP 08, 161, arXiv:2103.04759 [hep-th]
-
[36]
Nishimura, C
S. Nishimura, C. Miyao, and H. Otsuka, (2024), arXiv:2409.10023 [hep-ph]
2024
-
[37]
G. N. Wojcik, S. T. Eu, and L. L. Everett, (2024), arXiv:2407.07184 [hep-ph]
2024 arXiv
-
[38]
G. N. Wojcik, S. T. Eu, and L. L. Everett, (2024), arXiv:2407.07203 [hep-ph]
2024 arXiv
-
[39]
Constantin, T
A. Constantin, T. R. Harvey, and A. Lukas, Fortsch. Phys. 70, 2100186 (2022), arXiv:2108.07316 [hep-th]
2022 arXiv
- [40]
-
[41]
M. D. Schwartz, Quantum Field Theory and the Standard Model (Cambridge University Press, 2013)
2013
-
[42]
Mastropietro, (2023), arXiv:2312.11400 [hep-th]
V . Mastropietro, (2023), arXiv:2312.11400 [hep-th]
2023 arXiv
-
[43]
R. V . Harlander and M. C. Schaaf, Computer Physics Communications300, 109198 (2024)
2024
-
[44]
Lewis, arXiv preprint arXiv:1910.13461 (2019)
M. Lewis, arXiv preprint arXiv:1910.13461 (2019)
2019 arXiv
-
[45]
Charton, What is my math transformer doing? – three results on interpretability and general- ization (2022), arXiv:2211.00170 [cs.LG]
F. Charton, What is my math transformer doing? – three results on interpretability and general- ization (2022), arXiv:2211.00170 [cs.LG]
2022 arXiv
-
[46]
Jelassi, S
S. Jelassi, S. d’Ascoli, C. Domingo-Enrich, Y . Wu, Y . Li, and F. Charton, arXiv preprint arXiv:2306.15400 (2023)
2023 arXiv
-
[47]
Sennrich, arXiv preprint arXiv:1508.07909 (2015)
R. Sennrich, arXiv preprint arXiv:1508.07909 (2015)
2015 arXiv
-
[48]
Araabi, C
A. Araabi, C. Monz, and V . Niculae, in Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track), edited by K. Duh and F. Guzmán (Association for Machine Translation in the Americas, Orlando, USA,
-
[49]
Golkar, A
S. Golkar, A. Bietti, M. Pettee, M. Eickenberg, M. Cranmer, K. Hirashima, G. Krawezik, N. Lourie, M. McCabe, R. Morel, et al., arXiv preprint arXiv:2406.02585 (2024)
2024 arXiv
-
[50]
Mikolov, W.-t
T. Mikolov, W.-t. Yih, and G. Zweig, inProceedings of the 2013 Conference of the North Amer- ican Chapter of the Association for Computational Linguistics: Human Language Technologies, edited by L. Vanderwende, H. Daumé III, and K. Kirchhoff (Association for Computational Ling...
2013
-
[51]
T. Wolf, L. Debut, V . Sanh, J. Chaumond, C. Delangue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, J. Davison, S. Shleifer, P. von Platen, C. Ma, Y . Jernite, J. Plu, C. Xu, T. L. Scao, S. Gugger, M. Drame, Q. Lhoest, and A. M. Rush, Huggingface’s transformers: State-o...
2020 arXiv
-
[52]
Georgi and M
H. Georgi and M. Machacek, Nucl. Phys. B 262, 463 (1985)
1985
-
[53]
Golkar, M
S. Golkar, M. Pettee, M. Eickenberg, A. Bietti, M. Cranmer, G. Krawezik, F. Lanusse, M. Mc- Cabe, R. Ohana, L. Parker, B. R.-S. Blancard, T. Tesileanu, K. Cho, and S. Ho, xval: A continuous numerical tokenization for scientific language models (2024), arXiv:2310.02989 [stat.ML] . 32
2024 arXiv
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.