Generating particle physics Lagrangians with transformers

Yong Sheng Koay, Rikard Enberg, Stefano Moretti, Eliel Camargo-Molina
1/16/2025
cs.LGcs.SChep-ph

No confident code implementation found for this paper.

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}.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{koay2025generating,
  title  = {Generating particle physics Lagrangians with transformers},
  author = {Yong Sheng Koay and Rikard Enberg and Stefano Moretti and Eliel Camargo-Molina},
  year   = {2025},
  eprint = {2501.09729},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.09729v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.09729.svg)](https://codeofpaper.com/paper/2501.09729)

Discussion