Pith. sign in

REVIEW 3 major objections 6 minor 1 cited by

MAD-NG, a standalone multiplatform tool for linear and non-linear optics design and optimisation

T0 review · 3 major / 6 minor · reviewed 2026-08-11 · deepseek-v4-flash

Pith's one-line read The paper claims that MAD-NG, a standalone accelerator-optics code built on GTPSA and LuaJIT, reproduces MADX-PTC's resonance-driving-term results while running 30 to 80 times faster, turning multi-thousand-second nonlinear matching…

desk verdict Genuinely new parametric normal-form machinery in a real shipping tool; the speed-up claims need a benchmark appendix before they can be trusted. read the letter →

arxiv 2412.16006 v2 pith:WCWB3ABJ submitted 2024-12-20 cs.CE

classification cs.CE PACS 29.20.-c41.85.-p
keywords MAD-NGparticleacceleratoropticsnonlinearbeamdynamicstruncatedpowerseriesalgebraGTPSAparametricnormalformsresonancedrivingtermsLuaJIT
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

Methodical Accelerator Design Next Generation (MAD-NG) is a from-scratch, standalone replacement for the standard MAD-X/MADX-PTC workflow in particle-accelerator optics design and optimization. The paper's central claim is that by pairing the LuaJIT just-in-time compiler with a new Generalized Truncated Power Series Algebra (GTPSA) library, MAD-NG produces the same non-linear normal-form quantities—resonance-driving terms (RDTs) and their knob sensitivities—as MADX-PTC while running 30 to 80 times faster. If the claim holds, high-order nonlinear matching on machines like the LHC and FCC-ee shifts from batch jobs lasting thousands of seconds to interactive runs lasting under a minute, which would make repeated optics re-design, machine-learning training, and online model updates practical. The worked demonstration is a 32-knob octupolar-resonance optimization of LHC injection optics that converges in 65 seconds with MAD-NG versus 2730 seconds for the same study with MADX-PTC.

What carries the argument

The load-bearing object is the Generalized Truncated Power Series Algebra (GTPSA), a truncated multivariate Taylor-series algebra that keeps phase-space variables and knob parameters distinct, allows per-variable inhomogeneous orders, and uses a compact monomial-indexing scheme scaled for hundreds of parameters. It carries the argument because every high-order operation—tracking, composition, Lie operators, normal forms—runs on GTPSA objects rather than dense block-wise tensors. The companion machinery is the parametric normal-form routine: it forms the one-turn map $m$ on the closed orbit, decomposes it as $m = a \circ r \circ a^{-1}$, and reads both the resonant coefficients and their exact knob derivatives from the same map, giving the optimizer a one-shot Jacobian.

What would settle it

Re-run the same fifth-order 32-knob LHC injection-optics match in MAD-NG and MADX-PTC on the same computer with identical lattices, radiation settings, and convergence tolerances, and compare final RDT values and wall-clock times; disagreement beyond round-off or a time ratio far outside 30–80× would refute the central claim.

Watch

Extended reading notes

Core claim

The discovery is that a differential-algebra representation built around parameters rather than extra phase-space variables makes parametric normal forms practical at high order. In MAD-NG the one-turn map is computed by tracking a GTPSA-based DA map through the lattice on the closed orbit, then reducing it to a nonlinear normal form $m = a\circ r\circ a^{-1}$, where the normalizing map $a$ is tracked along the lattice to extract optical functions and RDTs. Because knob strengths are embedded as GTPSA parameters, the same map yields exact derivatives $\partial f_{\mathrm{RDT}}/\partial K_k$ with respect to every knob, so one map evaluation replaces the $1+32$ finite-difference evaluations a conventional optimizer would need. The reported result is agreement with MADX-PTC for RDT calculations on several accelerators, at speeds 30 to 80 times faster, with the worked example above as the concrete evidence.

Load-bearing premise

The speed and equivalence claims rest on the assumption that the comparisons against MADX-PTC used identical physics models, lattices, hardware, and convergence criteria; the paper reports speed ratios without specifying those conditions.

Editorial extensions

If this is right

  • A 32-knob octupolar-resonance match that took 342 evaluations and 2730 seconds with MADX-PTC converges in 21 evaluations and 65 seconds with MAD-NG on the reported study.
  • Because RDT results are claimed to agree with MADX-PTC, existing PTC-based nonlinear analyses can be re-run inside MAD-NG without re-establishing the physics from scratch.
  • The exact Jacobian obtained from parametric maps removes finite-difference step-size fragility, so nonlinear matching should converge in fewer evaluations and with more stable final knob settings.
  • The improved LHC injection optics produced through this workflow are linked in the paper to observed beam-lifetime gains, connecting the speedup to demonstrated machine performance.
  • The speed makes high-order parametric analysis affordable for training machine-learning surrogate models and for feeding online models with response times short enough for operation.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • Because the GTPSA indexing is designed for hundreds of parameters, the same one-map-per-optimization strategy should scale well beyond the 32 knobs demonstrated here, making whole-lattice sensitivity tables—every corrector, alignment error, or element length as a knob—a plausible next application.
  • The speed advantage is likely concentrated in high-order parametric studies, where the finite-difference baseline pays a factor of $n_{\mathrm{knobs}}+1$ per optimizer iteration; for low-order linear twiss runs the multiple over MADX-PTC may be far smaller than 30×.
  • A controlled side-by-side benchmark with identical physics models, lattices, hardware, and convergence tolerances would be the direct way to learn how the 65-versus-2730-second ratio generalizes to other machines and matching problems.
  • If the one-shot Jacobian proves robust in routine use, the same parametric-normal-form machinery could be extended to online optics corrections, where resonance-driving-term sensitivities computed in about a minute could guide knob adjustments during accelerator operation.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 6 minor

Summary. The paper presents MAD-NG, a standalone, multiplatform accelerator optics design and optimization tool built on LuaJIT and a custom Generalized Truncated Power Series Algebra (GTPSA) library. It describes the tool's ecosystem, scripting interface, sequence/element model, survey/track/twiss commands, parametric DA maps, parametric normal forms, matching, radiation, and tapering, with code examples and figures from studies on HL-LHC and FCC-ee. The central quantitative claims are that MAD-NG gives the same resonant driving term (RDT) results as MADX-PTC while being 30 to 80 times faster, with a matching example reported as 65 s versus 2730 s.

Significance. If the performance and correctness claims hold, this is a substantial contribution: high-order nonlinear optics optimization and RDT sensitivity studies for large machines such as HL-LHC and FCC-ee would become much cheaper to run, and the parametric normal-form approach could enable new workflows. The paper gives concrete code examples, a clear description of the GTPSA design, and evidence of use in real studies (LHC injection optics, FCC-ee tapering). The work is also open source and appears to ship with test infrastructure. However, the load-bearing quantitative claims are not accompanied by reproducible benchmark methodology or quantitative validation data, which is essential for a computational tool paper; the stated speedups are also internally inconsistent (50 to 80 times versus 30 to 80 times).

major comments (3)
  1. [Overview; Parametric Normal Forms; Parametric Optimisation] The central performance claim is stated inconsistently and without benchmark evidence. The Overview says 'With performance speeds 50 to 80 times faster than MADX-PTC,' while the Parametric Normal Forms section says 'an improved calculation speed ranging from ×30 to ×80 faster.' The only concrete comparison, in the Parametric Optimisation section (21 evaluations and 65 s for MAD-NG versus 342 evaluations and 2730 s for MADX-PTC), does not specify the hardware, compiler flags, software versions (MAD-NG, MAD-X, PTC), lattice file versions, physics settings (slicing, fringe fields, integrator order), convergence tolerances, or the optimization algorithm and stopping criteria used for MADX-PTC. Without this information, the speedup ratio is not interpretable; the difference in evaluation counts (21 vs. 342) may reflect different Jacobian strategies rather than raw speed. Please provide a reproducible benchmark description, include the exact input files and commands, and report raw wall-clock times and version identifiers for both tools.
  2. [Parametric Normal Forms] The assertion that 'the comparison of MAD-NG versus MADX-PTC has proven to give the same results for RDTs calculation in many studies on several CERN accelerators' is unsupported. No quantitative comparison is given: there is no table, no plot, no maximum absolute or relative discrepancy, no count of compared RDTs, no order of the calculation, and no specification of the RDT conventions (e.g., the phase convention for f_jklm). As written, the correctness claim cannot be checked. Please include at least one detailed comparison for a named lattice (e.g., HL-LHC), listing RDT values at several s-locations from both codes, and state the tolerance within which they agree.
  3. [GTPSA and DA Maps] The GTPSA benchmarks in Figures 13 and 14 compare multiplication, composition, and indexing operations against BTPSA and YTPSA; they do not benchmark the end-to-end twiss/track/normal-form workflow against MADX-PTC. The paper should not use these figures to support the application-level speedup claim. If the speedup is intended to be a consequence of GTPSA, a pipeline-level benchmark isolating the GTPSA contribution (e.g., the same lattice and normal-form algorithm with the two DA packages) is needed.
minor comments (6)
  1. [Abstract] The phrase 'The paper will provide' should be 'This paper provides.'
  2. [MAD-NG ecosystem] The text 'much less then a hundred kilobytes' contains a typo: 'then' should be 'than.'
  3. [Conclusions] The phrase 'it doesnottrigunexpected behaviors' should read 'it does not trigger unexpected behaviors.'
  4. [Parametric Optimisation] The code snippet defining the Jacobian contains malformed tokens ('ja co bia n', extra closing parentheses in the equality expressions). Please ensure all code listings are syntactically consistent with the surrounding prose.
  5. [Figures 13-14] The manuscript appears to contain an extended passage from the GTPSA conference paper (reference [15]) embedded between Figures 13 and 14. This is likely a layout artifact and should be removed or clearly presented as a reproduction, because it interrupts the narrative.
  6. [Optimization with match] The statement that the match command offers 'about 20 algorithms' would be more useful if the algorithms were named or the relevant manual section cited, since the choice of optimizer is relevant to the reported convergence behavior.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the paper is a tool overview whose central speed/RDT claims are empirical benchmark assertions, not derivations from fitted inputs or load-bearing self-citations.

full rationale

The paper is a software/tool overview rather than a derivation chain, so the circularity patterns do not apply in a literal sense. The headline claims (30–80x speedup over MADX-PTC and RDT agreement) are empirical benchmark assertions; they rest on an undocumented comparison with no versions, hardware, tolerances, or discrepancy tables, which makes them unverifiable, but unverifiability is not circularity. No fitted parameter is renamed as a prediction, no target result is assumed in its own derivation, and the normal-form algorithm is attributed to external references [9,16] (Forest) rather than to an unverified self-citation. The self-citations present are to MAD-NG's own manual and repository [1,2] and to the author's earlier GTPSA paper [15]; the GTPSA performance claims are additionally supported by in-paper benchmarks against Berz's and Yang's TPSA libraries (Figures 13–14), which are external points of comparison. The unsupported MADX-PTC speed/RDT comparison is a real evidence gap and should be treated as a correctness risk, but it does not reduce to the paper's own inputs by construction.

Assumptions & free parameters 0 free parameters · 3 assumptions · 0 invented entities

The paper is a tool overview, so it does not fit parameters to data in the scientific sense. Its central claims rest on the correctness of the underlying differential algebra framework and on fair, reproducible benchmarking, neither of which is established inside the paper.

assumptions (3)
  • standard math Truncated Power Series Algebra and its composition and multiplication algorithms compute exact derivatives as stated.
    The paper relies on GTPSA as an exact differential algebra for tracking and normal form computations; this background comes from Berz and Forest's published framework and is not re-derived here.
  • domain assumption The PTC/FPP reference implementations used in MADX-PTC produce correct results for RDTs and optics, so agreement with them validates MAD-NG.
    The paper compares MAD-NG with MADX-PTC but provides no independent physical measurement; the validity of the comparison rests on the reference's correctness.
  • ad hoc to paper The benchmark environment (hardware, compiler flags, lattice versions, physics settings) is representative and fair for all compared tools.
    Speed ratios are stated without methodology; the paper implicitly assumes controlled comparison conditions, which is a load-bearing premise for the performance claims.

how reviews work

0 comments
Cite this review

Pith. "Pith review of MAD-NG, a standalone multiplatform tool for linear and non-linear optics design and optimisation." pith.science (2026). https://pith.science/paper/WCWB3ABJ

@misc{pith2026241216006,
  author       = {Pith},
  title        = {Pith review of: MAD-NG, a standalone multiplatform tool for linear and non-linear optics design and optimisation},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/WCWB3ABJ}},
  note         = {Machine review of arXiv:2412.16006}
}
read the original abstract

The paper will provide an overview of the capabilities of the Methodical Accelerator Design Next Generation (MAD-NG) tool. MAD-NG is a standalone, all-in-one, multi-platform tool well-suited for linear and nonlinear optics design and optimization, and has already been used in large-scale studies such as HiLumi-LHC or FCC-ee. It embeds LuaJIT, an extremely fast tracing just-in-time compiler for the Lua programming language, delivering exceptional versatility and performance for the forefront of computational physics. The core of MAD-NG relies on the fast Generalized Truncated Power Series Algebra (GTPSA) library, which has been specially developed to handle many parameters and high-order differential algebra, including Lie map operators. This ecosystem offers powerful features for the analysis and optimization of linear and nonlinear optics, thanks to the fast parametric nonlinear normal forms and the polyvalent matching command. A few examples and results will complete this overview of the MAD-NG application.

Figures

Figures reproduced from arXiv: 2412.16006 by the authors.

Figure 1
Figure 1. MAD-NG ecosystem with all main components [PITH_FULL_IMAGE:figures/full_fig_p002_1.png] view at source ↗
Figure 3
Figure 3. The object model uses prototypal inheritance [PITH_FULL_IMAGE:figures/full_fig_p002_3.png] view at source ↗
Figure 4
Figure 4. Example of plot using survey to build the lattice layout (top), and track to calculate the particle coordinates 𝑥, 𝑦 (left axis) and first derivatives 𝜕𝑥 𝜕𝑝𝑡 = 𝑅16, 𝜕𝑦 𝜕𝑝𝑡 = 𝑅36 (right axis) along 𝑠 around LHC IP5 (bottom axis). All axes are in meters. BE Beams Department Laurent Deniau, CERN BE/ABP, 1211 Geneva 23, laurent.deniau@cern.ch LHC D1 with True RBends local frame (s) global frame (Z) X RBEND (L ) (PTC tru… view at source ↗
Figures from the paper (11 more)
Figure 5
Figure 5. Figure 5: Example using survey and track results to recon￾struct the horizontal motion of the reference particle for the upstream (purple) and downstream (green) beams in the lo￾cal frame (𝑥, 𝑠) on the left, and in the global frame (𝑋, 𝑍) on the right. deviation, to evaluate how…
Figure 7
Figure 7. Figure 7: Example using survey and twiss results to plot the scaled horizontal beta function 𝛽𝑥 in the global frame (𝑋, 𝑍) on top of the layout made of 25 FODO cells. local nc = 25 local mb = sbend { l =2 , angle = pi / nc } local mq = quadrupole { l =1 } local cell = bline { mq…
Figure 9
Figure 9. Figure 9: Schematic behavior of the generic element tracker [PITH_FULL_IMAGE:figures/full_fig_p005_9.png]
Figure 10
Figure 10. Figure 10: Representation of misalignment of a sbend using BE [PITH_FULL_IMAGE:figures/full_fig_p006_10.png]
Figure 11
Figure 11. Figure 11: Schematic representation of parametric DA maps [PITH_FULL_IMAGE:figures/full_fig_p006_11.png]
Figure 5
Figure 5. Figure 5: Relative performance of the multiplications. ed Power Series Alg the good locality of the data ensures cache fidllthGTPSA [PITH_FULL_IMAGE:figures/full_fig_p007_5.png]
Figure 6
Figure 6. Figure 6: Relative performance of the compositions. te esutg oogeeous poyoas Rare independent of each otherso par [PITH_FULL_IMAGE:figures/full_fig_p007_6.png]
Figure 15
Figure 15. Figure 15: Example of tapering the FCC-ee GHC optics at [PITH_FULL_IMAGE:figures/full_fig_p008_15.png]
Figure 16
Figure 16. Figure 16: The parametric normal form principle in twiss consists of tracking a high-order DA map on the found closed orbit (optionally) equipped with parameters ®𝑘 (knobs) to obtain the one-turn map 𝑚, then compute the closed non-linear normal form 𝑚 = 𝑎 ◦ 𝑟 ◦ 𝑎 −1 and track th…
Figure 17
Figure 17. Figure 17: HiLumi LHC octupolar RDTs (top) and the sen [PITH_FULL_IMAGE:figures/full_fig_p011_17.png]
Figure 18
Figure 18. Figure 18: Dynamic aperture for beam 1 old (top) and new [PITH_FULL_IMAGE:figures/full_fig_p012_18.png]

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Differentiable simulations for particle tracking in accelerators: analysis, benchmarking and optimization

    physics.acc-ph 2025-07 conditional novelty 6.0 of 10

    Automatic differentiation computes beamline optimization gradients faster than finite differences on CPU and usually on GPU.

Reference graph

Works this paper leans on

20 extracted references · 20 canonical work pages · cited by 1 Pith paper

  1. [1]

    MAD-NG’s Reference Manual

    L. Deniau, “MAD-NG’s Reference Manual”, https:// cern.ch/mad/releases/madng/html

  2. [2]

    DeniauMAD-NG Source Repository, https://github

    L. DeniauMAD-NG Source Repository, https://github. com/MethodicalAcceleratorDesign/MAD/

  3. [3]

    The MAD program version 8.10 ; user’s reference manual

    H. Grote, F.C. Iselin, “The MAD program version 8.10 ; user’s reference manual”, CERN Report, 1993. https://cds.cern.ch/record/248416/files/ CM-P00049316.pdf

  4. [4]

    MAD-X : An Upgrade from MAD8

    H. Grote, F. Schmidt, “MAD-X : An Upgrade from MAD8”, 20th IEEE Particle Accelerator Conference, Portland USA,

  5. [5]

    MAD-X Home Page, http://cern.ch/madx

  6. [6]

    MAD-X Source Repository , https://github.com/ MethodicalAcceleratorDesign/MAD-X/

  7. [7]

    PTC/FPP Source Repository , https://github.com/ jceepf/fpp_book

  8. [8]

    Introduction to the Polymorphic Tracking Code: Fibre Bundles, Polymorphic Taylor Types and Exact Tracking

    E. Forest,et al., “Introduction to the Polymorphic Tracking Code: Fibre Bundles, Polymorphic Taylor Types and Exact Tracking”, CERN-SL-2002-044-AP, KEK-REPORT-2002-3,

Show all 20 references
  1. [9]

    From Tracking Code to Analysis, Gener- alised Courant-Snyder Theory for any Accelerator Models

    E. Forest, “From Tracking Code to Analysis, Gener- alised Courant-Snyder Theory for any Accelerator Models”, Springer, 2015

  2. [10]

    MAD Version 9

    F.C. Iselin, et al., “MAD Version 9”, 7th European Particle Accelerator Conference, Vienna, Austria, 2000. https://cds.cern.ch/record/446805/files/ sl-2000-026.pdf

  3. [11]

    MAD-X PTC Integration

    F. Schmidt, et al., “MAD-X PTC Integration”, 21st IEEE Particle Accelerator Conference, Knoxville USA,

  4. [12]

    The Programming Language Lua, https://lua.org

  5. [13]

    The Just-In-Time Compiler for the Lua Programming Lan- guage, https://luajit.org

  6. [14]

    PyMAD-NG: a Python interface to MAD- NG

    J. Gray, "PyMAD-NG: a Python interface to MAD- NG", https://pymadng.readthedocs.io/en/latest/ index.html

  7. [15]

    Generalised Truncated Power Series Algebra For Fast Particle Accelerator Transport Maps

    L. Deniau, C. Tomoiagă, “Generalised Truncated Power Series Algebra For Fast Particle Accelerator Transport Maps”, IPAC’15, 2015.https://cds.cern.ch/record/ 2141771/files/mopje039.pdf

  8. [16]

    Normal Form Methods for Complicated Pe- riodicSystemsusingDifferentialAlgebraandLieOperators

    E. Forest,et al., “Normal Form Methods for Complicated Pe- riodicSystemsusingDifferentialAlgebraandLieOperators”, Part. Accel., Vol 24, 1989

  9. [17]

    Optics for Landau damping with mini- mized octupolar resonances in the LHC

    R. Tomás,et al., “Optics for Landau damping with mini- mized octupolar resonances in the LHC”, these proceedings, HB2023

  10. [2002]

    http://cds.cern.ch/record/573082

  11. [2003]

    https://accelconf.web.cern.ch/p03/PAPERS/ FPAG014.pdf

  12. [2005]

    https://accelconf.web.cern.ch/p05/PAPERS/ MPPE012.PDF

Pith tools

Reviewed August 11, 2026 · model on record in the stance chip above.