Agentic Diagrammatica: Towards Autonomous Symbolic Computation in High Energy Physics

Tony Menzo, Alexander Roman, George T. Fleming, Sergei Gleyzer, Konstantin T. Matchev, Stephen Mrenna · 2026

Read Agentic Diagrammatica: Towards Autonomous Symbolic Computation in High Energy Physics by Tony Menzo, Alexander Roman, George T. Fleming, Sergei Gleyzer, Konstantin T. Matchev, Stephen Mrenna (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-26990.txt.

Introduction

Menzo and co-authors present Diagrammatica, a toolkit that lets AI agents run symbolic calculations in particle physics. Language model agents struggle here because math conventions are rarely machine-checkable. The design forces agents into tool calls with fixed, auditable conventions. Agents write a compact diagram specification, and a trusted backend does the algebra. Two paths share that specification: rough rate estimates and exact tree-level calculations via FeynCalc. Validation covers a full catalog of one-to-two decay widths. A muon decay study tests the estimate path's reach.

Catalog record

CREATORTony Menzo, Alexander Roman, George T. Fleming, Sergei Gleyzer, Konstantin T. Matchev, Stephen Mrenna
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE123727
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.26990

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Agentic Diagrammatica: Towards Autonomous Symbolic Computation in High Energy Physics Tony Menzo, Alexander Roman, George T. Fleming, Sergei Gleyzer, Konstantin T. Matchev, Stephen Mrenna Abstract Abstract We present Diagrammatica , a symbolic computation extension to the HEPTAPOD agentic framework, which enables LLM agents to plan and execute multi-step theoretical calculations. Symbolic computation poses a distinctive reliability challenge for LLM agents, as correctness is governed by implicit mathematical conventions that are not encoded in a form that can be easily checked in the computational backend. We identify two complementary remedies, tool-constrained computation and targeted knowledge grounding, and pursue the first as the primary architecture. Concretely, we concentrate the agent’s action distribution onto tool calls with convention-fixing semantics, in which the agent specifies a compact, human-auditable diagram specification and a trusted backend performs the symbolic or numerical manipulations exactly. The toolkit provides two complementary calculation paths consuming a shared diagram specification: Naive Dimensional Analysis (NDA) for order-of-magnitude rate estimates and Exact Diagrammatic Analysis (EDA) for tree-level symbolic calculations via automatic FeynCalc code generation, both supplemented by automatic Feynman diagram enumeration and a navigable theory knowledge base. The architecture is validated on two benchmarks: (1) an exhaustive catalog of all tree-level, single-vertex 1\to 2 partial decay widths across scalar, fermion, and vector parents, with complete massless and threshold limits and Standard Model validation; and (2) an NDA sensitivity study of the muon decay multiplicity \mu\to\nu_{\mu}\bar{\nu}_{e}+n(e^{+}e^{-})+e^{-} , determining the maximum observable n at current and planned muon experiments. 1 Introduction Symbolic computation has a long and distinguished tradition in high-energy physics (HEP), supported by a rich ecosystem of computer algebra systems (CAS) and specialized packages. Dedicated systems such as REDUCE [ 19 ] , FORM [ 45 ] , Cadabra [ 33 ] , and Redberry [ 11 ] provide HEP-oriented symbolic engines, while general-purpose platforms like Mathematica [ 48 ] and SymPy [ 28 ] host widely used packages including FeynCalc [ 27 , 40 ] , FeynArts/FormCalc [ 18 , 17 ] , Package-X [ 31 , 32 ] , and FIRE [ 41 ] . These tools are powerful, but even routine calculations are manual, multi-step processes. For example, computing tree-level decay widths or leading-order cross sections requires: constructing an amplitude from Feynman rules, squaring it, performing spin sums, evaluating Dirac traces, substituting kinematics, and extracting a partial width. Many steps require familiarity with both the physics and the idiosyncrasies of the specific software package being used. This is why hands-on tutorials are now routinely scheduled at graduate-level summer schools and workshops [ 7 ] . Large language models (LLMs) have recently emerged as general-purpose computational interfaces capable of planning and executing multi-step workflows through structured tool invocation [ 16 , 46 ] . In our previous work, we introduced the HEP Toolkit for Agentic Planning/Programming, Orchestration, and Deployment (HEPTAPOD) framework [ 26 ] , demonstrating how an LLM agent can orchestrate Monte Carlo simulation pipelines through schema-validated tool invocation. Since then, a number of papers employing agentic LLMs have appeared that target different stages of the HEP workflow, including event generation [ 34 ] , collider analysis pipelines [ 13 , 36 ] , experimental data analysis [ 15 , 29 ] , experimental design and detector simulation [ 21 ] , theory hypothesis generation and reinterpretation [ 1 ] , lattice QCD automation [ 43 ] , and broader multi-domain science [ 8 ] . In all of these systems the LLM orchestrates domain-specific computational engines rather than replacing them, providing the procedural knowledge that connects individual steps into coherent workflows. This paper introduces Diagrammatica 1 1 1 From the Latinized diagrammatica : “the systematic art of diagrams” and paying homage to M. Veltman’s book [ 44 ] of the same name. , a symbolic computation extension to the HEPTAPOD framework that enables LLM agents to plan and execute multi-step theoretical calculations. Symbolic computation poses a distinctive challenge compared to the Monte Carlo orchestration demonstrated in [ 26 ] . Frontier LLMs are already capable of impressive symbolic manipulation (solving integrals, simplifying expressions, writing working computer algebra code), but reliability , not capability, is the bottleneck. The multi-step calculations typical of HEP phenomenology require dozens of symbolic operations chained together under a shared set of implicit conventions that must remain internally consistent throughout. Autoregressive generation provides no guarantee that this consistency will be maintained across an extended workflow, even when each individual step is well within the model’s capabilities. An LLM navigating this space without external structure can produce plausible but silently wrong results, including dropped terms, misapplied identities, and inconsistent conventions. Even purpose-built transformer models trained to perform specific symbolic subtasks, such as predicting squared amplitudes directly from Feynman diagrams [ 3 ] , can achieve high but imperfect accuracy, illustrating the difficulty of replacing traditional CAS tools for exact symbolic computation. Additionally, auditing free-form symbolic code for such errors is at least as hard as writing it from scratch. In this paper we identify two complementary remedies to this reliability problem. The first is tool-constrained computation : instead of asking the agent to generate the symbolic calculation directly, the action space is restricted to schema-validated tool calls that fix conventions by construction, where the agent specifies a compact, human-auditable diagram specification and a trusted backend performs the algebra exactly. The second is targeted knowledge grounding : delivering domain-specific conventions and worked examples to the agent at the moment of each critical decision, rather than loading reference material in bulk. Tool constraints provide structural reliability that is independent of the model’s knowledge, but bounds the agent’s capabilities to the tool designer’s foresight; knowledge grounding preserves the full action space but offers only probabilistic suppression of errors. This paper primarily pursues the tool-constrained path, realized through a shared diagram specification and deterministic symbolic tools, while using a navigable theory knowledge base as a complementary layer ( section 2.3 ). This approach contrasts with the predominant paradigm in the growing literature on LLM agents in HEP [ 16 , 46 , 34 , 13 , 36 , 15 , 21 , 1 , 43 , 8 , 29 ] , in which the agent writes free-form scripts or shell commands executed against existing software, with the reliability burden falling entirely on the model’s ability to produce correct code from context. The key distinction of the approach pursued here (as well as in Ref. [ 26 ] ) is to design tool schemas that reduce the agent’s action space to a physically meaningful set of choices, fixing domain conventions by construction and providing a more natural computational interface for the LLM. This yields two concrete advantages: reliability , as correctness of the mechanical steps becomes a property of the interface rather than of the model, eliminating entire classes of silent errors independently of model capability, and interpretability , as the agent’s decisions are compressed into a small number of human-readable fields that a domain expert can audit at a glance rather than reviewing pages of generated code where errors may be invisible without re-deriving the calculation from scratch. The toolkit provides two complementary calculation paths at different fidelity levels, both consuming a shared diagram specification: 1. NDA (Naive Dimensional Analysis): Order-of-magnitude

Read the complete text