MAGI (Multivariate Autoencoder for particle Generative Inference): a generative Machine Learning framework for accelerated multi-stage particle simulations

arXiv:2611.14710 · astro-ph.IM, hep-ex · Submitted 2026-11-10 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: Astrophysics. The day in astrophysics: observations, models and what the data forces.

Vera: I'm Vera.

Jocelyn: And I'm Jocelyn, here with Subrahmanyan.

Vera: We're looking at the paper: "MAGI (Multivariate Autoencoder for particle Generative Inference)".

Jocelyn: Here's the gist of the paper. Monte Carlo particle simulations are hindered by the computational cost of particle transport This paper introduces MAGI as a conditional variational autoencoder that learns the joint energy, position and direction distribution of particles crossing a closed surface in a multi-stage simulation to be resampled and re-injected in a smaller mass model.

Vera: The core concept of MAGI MAGI models the joint phase-space distribution of particles crossing a virtual surface enclosing the instrument A crossing consists of energy and four quantile-transformed directional/positional variables (ur, uv, ϕr, ϕv).

Jocelyn: The energy head combines a spline-flow continuum with discrete components pinned at fluorescence lines under a focal objective.

Vera: MAGI can also be conditioned on primary type and energy, preserving primary multiplicity.

Paper summary: Vera: So this paper is about this MAGI thing that uses a conditional variational autoencoder to learn the joint energy position and direction distribution of particles crossing a surface in a multi-stage simulation <ref:2611.14710#pg1>. It claims this lets you resample and re-inject those particles into a smaller model <ref:2611.14710#pg2>.

Jocelyn: That sounds like they're trying to solve that big computational cost problem in Monte Carlo simulations, especially when the mass around the sensitive volume is really large <ref:2611.14710#pg2>. The thesis seems to be using this AI framework to bridge the gap between static recorded events and real-time simulation needs <ref:2611.14710#pg2>.

Subrahmanyan: From a theoretical standpoint, if we're dealing with low-background experiments where particle transport through shielding is hard, then having a generative surrogate that models the phase space distribution of crossings could be really useful for sensitivity optimization <ref:2611.14710#pg2>. It moves us away from just looking at fixed geometries like what you see in other generative surrogates <ref:2611.14710#pg2>.

Vera: Exactly, and they are conditioning it on the primary type and energy to keep the primary multiplicity preserved <ref:2611.14710#pg3>. They’re testing this against two benchmark models, the IAPS Triple and SRON XFDM cosmic rays <ref:2611.14710#pg3>.

Jocelyn: And the results are pretty encouraging, showing a ratio R of MAGI events to full Geant4 crossings where at R equals one, the MAGI crossing yields events at the real rate <ref:2611.14710#pg3>.

Subrahmanyan: That ratio on the IAPS Triple benchmark model is zero point nine seven plus or minus zero point zero two across all sources <ref:2611.14710#pg3>. That’s very close to one, which means it gets the real rate of events, and for SRON XFDM cosmic rays, they get a ratio of one point zero five plus or minus zero point zero four between one kilo electron and one mega electron <ref:2611.14710#pg3>.

Vera: So that means in terms of amplification, they measure the detector events gained per generated crossing instead of per thrown primary <ref:2611.14710#pg3>. They also looked at speed-up defined as one over the cost, which is one over chi cprimary ccrossing <ref:2611.14710#pg3>.

Jocelyn: The table shows the net speed-up for different mass models, and they found that the heavily attenuated forty kilo achieves the highest performance in terms of computational cost <ref:2611.14710#pg3>.

Subrahmanyan: That's interesting because it shows how much the simulation time scales with the surrounding matter density <ref:2611.14710#pg3>. If you're thinking about structure formation, this suggests that accurately modeling those dense shielding regions is where the biggest bottleneck lies for these types of simulations <ref:2611.14710#pg3>.

Vera: The authors are being careful with their claims about how much it speeds things up, and they’re also pointing out some structural limits to the MAGI vone point zero version <ref:2611.14710#pg3>. They mention limitations arising from the variational autoencoder's latent capacity bounds, which is a kind of priorposterior mismatch <ref:2611.14710#pg3>.

Paper summary: Jocelyn: And they also noted that the decoding heads are conditionally independent given the latent variable z, which means things like fundamental head decorrelation and shower-context conservation aren't resolved without structural changes <ref:2611.14710#pg3>.

Subrahmanyan: So they are flagging that this version is a starting point, and they’re deferring the implementation of autoregressive prior flows and coupled flow heads to the MAGI vtwo zero architecture in development <ref:2611.14710#pg3>. That tells us there’s clearly a path for improvement beyond what’s currently shown <ref:2611.14710#pg3>.

Vera: So, to summarize this paper, the MAGI paper introduces this conditional variational autoencoder to learn the joint energy position and direction distribution of particles crossing a surface in a multi-stage simulation so they can resample them into a smaller model <ref:2611.14710#pg1>.

Jocelyn: They claim this approach bridges the gap between static recorded events and real-time simulation needs by modeling the phase space distribution of particles crossing an instrument <ref:2611.14710#pg2>.

Subrahmanyan: The key finding is that at a ratio R of one, the MAGI crossing yields events at the real rate, with ratios around zero point nine seven for IAPS Triple and one point zero five for SRON XFDM <ref:2611.14710#pg3>.

Vera: And on a laptop, they report that this tool amplifies statistics by four hundred sixty-four to twelve thousand one hundred seventeen and speeds up the computation by fifty to two forty-seven depending on the mass model <ref:2611.14710#pg3>.

Jocelyn: It seems like a significant step in making particle simulations more affordable, showing feasibility for running this setup on a laptop instead of needing a dedicated cluster <ref:2611.14710#pg3>.

Subrahmanyan: What this means for the bigger picture is that if we can efficiently simulate these background processes, it opens up new avenues for sensitivity optimization in experiments where particle transport through complex surrounding structures is a major bottleneck <ref:2611.14710#pg2>.

Vera: So, looking at the title and authors of this paper, MAGI (Multivariate Autoencoder for particle Generative Inference): a generative Machine Learning framework for accelerated multi-stage particle simulations, it's clear they are focusing on using machine learning to accelerate these complex transport calculations <ref:2611.14710#pg1>.

Jocelyn: The implication is that we can generate statistically relevant data much faster than traditional Monte Carlo methods alone allow <ref:2611.14710#pg3>.

Subrahmanyan: This suggests that future research should focus on pushing those structural limits, specifically addressing the head decorrelation and shower-context conservation issues they mentioned <ref:2611.14710#pg3>.

Vera: So, while this version shows promising amplification and speed-up with results around a ratio R of one, it’s important to remember the structural limits imposed by the variational autoencoder's latent capacity <ref:2611.14710#pg3>.

Jocelyn: That means we need to keep an eye on the development of MAGI vtwo zero for those more complex features like autoregressive prior flows <ref:2611.14710#pg3>.

Subrahmanyan: That's the path forward, connecting these simulation techniques to better understanding how particle backgrounds affect our cosmological measurements <ref:2611.14710#pg2>.

Conclusion: Vera: So, this paper is about MAGI, which stands for Multivariate Autoencoder for particle Generative Inference <ref:2611.14710#pg3>. It’s a machine learning framework that builds a model to speed up those complex multi-stage particle simulations we need.

Jocelyn: Right, so it uses an autoencoder to learn the joint energy, position, and direction distribution of particles crossing a surface in these simulations. It’s essentially trying to figure out where the particles are going without running all that heavy Monte Carlo code every time.

Subrahmanyan: The authors are using this learned distribution to resample and re-inject those particles into a much smaller mass model. The big deal is that it cuts down the computational cost of particle transport significantly.

Vera: They did some validation against real simulations, and they found that at a ratio R equal to one, MAGI crossings yield events at the real rate in both the IAPS Triple and SRON XFDM benchmark models <ref:2611.14710#pg3>.

Jocelyn: That means their method gets close to the actual physical rates, with a ratio of zero point nine seven for one model and one point zero five for another <ref:2611.14710#pg3>. It’s a solid match.

Subrahmanyan: And on top of that, they showed that on a laptop, this tool actually amplifies the statistics by four hundred sixty-four times and speeds up the computation by fifty to two forty-seven depending on the mass model <ref:2611.14710#pg3>.

Vera: That’s a lot of amplification, Jocelyn. It shows that this setup isn't just for supercomputers anymore; it makes running these kinds of simulations feasible on a laptop <ref:2611.14710#pg3>.

Jocelyn: It’s about making the work more accessible, I guess. But they did flag some structural limits for this version, specifically around the latent capacity bounds of the autoencoder <ref:2611.14710#pg3>.

Subrahmanyan: Right, that means while it’s fast and gives good results for these specific models, they aren't solving every single problem in particle transport yet. They deferred things like context-aware shower conditioning to a version two point zero architecture <ref:2611.14710#pg3>.

Vera: So MAGI vone point zero is a really good starting point for getting those kinds of speedups, but they're clearly still working on making the model more robust for even trickier scenarios <ref:2611.14710#pg3>.

Jocelyn: It’s interesting how they’ve framed this as a generative inference framework, treating the particle transport as something that can be learned and then used to generate new, relevant data <ref:2611.14710#pg2>.

Subrahmanyan: And that moves us away from just brute-force simulation toward a method where we learn the underlying physics of particle flow itself, which is what we need for better structure formation studies <ref:2611.14710#pg2>.

Vera: So, the main point here is that if we can get this AI framework to handle those structural limits they mentioned, we could have much more efficient and affordable ways to explore these complex particle backgrounds <ref:2611.14710#pg3>.

Francesco Monastra, Marco Pietrosanto, Giuseppe Angora, Stefano Cavuoti, Francesco Fenui, Simone Lotti, Matteo Perri

INAF-IAPS · INAF-OAR · ASI-SSDC Hub CPU

astro-ph.IM, hep-ex

Submitted: 2026-11-10

Updated: 2026-11-10

Comments: 6 pages, 1 figure, submitted as Conference Proceeding for "International Conference on Machine Learning for Astrophysics 3rd Ed." (ML4ASTRO3)

DOI: 10.5281/zenodo.24119082

Code: https://github.com/francescomonastra/MAGI

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 88/100

The gist: Monte Carlo particle simulations are hindered by the computational cost of particle transport This paper introduces MAGI as a conditional variational autoencoder that learns the joint energy…

Key concepts

MAGI
A conditional variational autoencoder that learns the joint phase-space distribution of particles crossing a virtual surface. It models energy along with four transformed directional/positional variables (ur, uv, ϕr, ϕv). It can be conditioned on primary type and energy to preserve the original particle multiplicity.
Phase-Space Distribution
The complete description of where particles exist in both position and momentum space at a given time. MAGI learns this complex distribution for particles crossing a surface. This allows the model to predict how particles will behave after passing through an instrument, enabling efficient resampling for simulations.
Amplification and Speed-up Metrics
These metrics quantify the efficiency gains of MAGI. Amplification measures detector events gained per generated crossing, while speed-up compares computational cost relative to primary particle generation. The results show significant speed-ups (e.g., 50 to 247) depending on the simulation mass model.
cVAE Latent Capacity Bounds
Structural limitations in the MAGI v1.0 model stem from constraints on the variational autoencoder's latent capacity. This mismatch between the prior distribution and the posterior distribution limits how accurately MAGI can represent complex physical processes without further architectural changes.

Terminology

Summary

Monte Carlo particle simulations are hindered by the computational cost of particle transport This paper introduces MAGI as a conditional variational autoencoder that learns the joint energy, position and direction distribution of particles crossing a closed surface in a multi-stage simulation to be resampled and re-injected in a smaller mass model. p. 0

Where the paper says it

MAGI is a conditional variational autoencoder that learns the joint energy, position and direction distribution of particles crossing a closed surface in a multi-stage simulation, to be resampled and re-injected in a smaller mass model. We validated it generating crossings, variables describing particle features later in the simulation, injecting them into the same Geant4 mass model and comparing the spectrum and counts at detector level with full simulation.

The core concept of MAGI

MAGI models the joint phase-space distribution of particles crossing a virtual surface enclosing the instrument A crossing consists of energy and four quantile-transformed directional/positional variables (ur, uv, ϕr, ϕv). The energy head combines a spline-flow continuum with discrete components pinned at fluorescence lines under a focal objective. p. 1

Where the paper says it

A crossing consists of energy and four quantile-transformed directional/positional variables (ur, uv, ϕr, ϕv). The energy head combines a spline-flow continuum [11] with discrete components pinned at fluorescence lines under a focal objective [12].

MAGI can also be conditioned on primary type and energy, preserving primary multiplicity. p. 1
Where the paper says it

The latent prior uses a conditional coupling transform [13, 14]. MAGI can also be conditioned on primary type and energy, preserving primary multiplicity.

Validation results

The validation compares the full Geant4 simulation against the MAGI re-injection arm using a ratio R = NMAGI events /NMAGI crossings. The results show that at R = 1 a MAGI crossing yields events at the real rate. p. 2

Where the paper says it

4 × 106 re-injected real crossings. At R = 1 a MAGI crossing yields events at the real rate.

For the IAPS Triple benchmark model, the ratio obtained is 0. p. 2
Where the paper says it

4 × 1010 primaries per source, performed on our cluster (Dual socket Xeon 8268, 96 cores per 6 nodes, 384GiB, 540 threads) and the MAGI arm on a MacBookAir (AppleM1, 4 performance and 4 efficiency cores, 16GB) with 8×105 to 4×106 crossings per source. The ratio obtained for this model is 0.

97 ± 0.02 over all sources. p. 2
Where the paper says it

10 8 10 7 10 6 10 5 10 4 10 3 flux [counts s 1 cm 2 keV 1 ] R = 0. 02 (4039 MAGI, 31870 full) (a) IAPS Triple, five sources (v1.

A second benchmark model (SRON XFDM) gives R = 1. p. 2
Where the paper says it

1a) over the sum of all sources. A second benchmark model (SRON XFDM) gives R = 1.

05 ± 0.04 in 1 keV to 1 MeV. p. 2
Where the paper says it

0 × 106 crossings per arm) and 1. 04 in 1 keV to 1 MeV, plotted (Fig.

Amplification and speed-up metrics

Amplification measures detector events gained per generated crossing instead of per thrown primary. Speed-up S compares computational cost, defined as S = 1/χ cprimary ccrossing. p. 2

Where the paper says it

4 Amplification and speed-up Amplification 1/χ measures detector events gained per generated crossing instead of per thrown primary. Speed-up S compares computational cost: a crossing starts inside the assembly and costs more to transport than a primary, so S = 1 χ cprimary ccrossing , (2) with both costs in core-hours, cprimary the whole-run cost per primary and ccrossing the inner-transport cost per injected crossing.

Table 3 reports the net speed-up Snet(A) for different mass models, with the heavily attenuated 40K achieving the highest performance. p. 3
Where the paper says it

The computational gain strictly follows the source rarity. The heavily attenuated 40K achieves the highest performance, reaching S = 247 (SRON XFDM) and 122 (IAPS Triple), with net values of 190 and 108 at A = 103 , followed by the intermediate radioisotopes 232Th and 226Ra.

Limitations and future work

MAGI v1.0 exhibits structural limits arising from cVAE latent capacity bounds (priorposterior mismatch) and the conditional independence of decoding heads given z. p. 3

Where the paper says it

5 Limitations MAGI v1. 0 exhibits structural limits arising from cVAE latent capacity bounds (priorposterior mismatch) and the conditional independence of decoding heads given z.

Fundamental head decorrelation and shower-context conservation cannot be resolved without structural changes. p. 3
Where the paper says it

While localized spectral resolution defects (such as fluorescence line smearing) are mitigated in v1. 0 via explicit delta-line sampling, fundamental head decorrelation and shower-context conservation cannot be resolved without structural changes.

The implementation of autoregressive prior flows, coupled flow heads, and context-aware shower conditioning is deferred to the MAGI v2. p. 3
Where the paper says it

0 via explicit delta-line sampling, fundamental head decorrelation and shower-context conservation cannot be resolved without structural changes. The implementation of autoregressive prior flows, coupled flow heads, and context-aware shower conditioning is deferred to the MAGI v2.

0 architecture in development. p. 3
Where the paper says it

The implementation of autoregressive prior flows, coupled flow heads, and context-aware shower conditioning is deferred to the MAGI v2. 0 architecture in development.

Conclusions

MAGI reproduces the detector response of a full Geant4 run within 3 % (R = 0.97±0.02, five sources pooled) on IAPS Triple and on SRON XFDM (R = 1. p. 4

Where the paper says it

6 Conclusions MAGI reproduces the detector response of a full Geant4 run within 3 % (R = 0. 02, five sources pooled) on IAPS Triple and on SRON XFDM (R = 1.

05±0.04). On a laptop it amplifies statistics by 464 to 12175 and speeds up the computation by 50 to 247 for radioactive sources depending on the mass model. p. 4
Where the paper says it

02, five sources pooled) on IAPS Triple and on SRON XFDM (R = 1. On a laptop it amplifies statistics by 464 to 12175 and speeds up the computation by 50 to 247 for radioactive sources depending on the mass model.

This tool improves the efficiency and the affordability of particle simulations demonstrating also the feasibility of running the same setup on a laptop instead of a dedicated cluster. p. 4
Where the paper says it

On a laptop it amplifies statistics by 464 to 12175 and speeds up the computation by 50 to 247 for radioactive sources depending on the mass model. This tool improves the efficiency and the affordability of particle simulations, demonstrating also the feasibility of running the same setup on a laptop instead of a dedicated cluster.

REFERENCES

[3] Allison, J., et al.: Recent developments in Geant4. p. 4

Where the paper says it

869826 [3] Allison, J. : Recent developments in Geant4.

Nuclear Instruments and Methods in Physics Research A 835, 186–225 (2016) https://doi. p. 4
Where the paper says it

: Recent developments in Geant4. Nuclear Instruments and Methods in Physics Research A 835, 186–225 (2016) https://doi.

org/10.1016/j.nima. 2016.06.125

[4] Lotti, S., et al.: Review of the Particle Background of the Athena X-IFU Instrument. p. 4

Where the paper says it

125 [4] Lotti, S. : Review of the Particle Background of the Athena X-IFU Instrument.

The Astrophysical Journal 909(2), 111 (2021) https://doi. p. 4
Where the paper says it

: Review of the Particle Background of the Athena X-IFU Instrument. The Astrophysical Journal 909(2), 111 (2021) https://doi.

org/10.3847/ 1538-4357/abd94c

[6] Paganini, M., Oliveira, L. p. 4

Where the paper says it

0142367 [6] Paganini, M. , Oliveira, L.

, Nachman, B. p. 4
Where the paper says it

, Oliveira, L. , Nachman, B.

: CaloGAN: Simulating 3D high energy particle showers in multilayer electromagnetic calorimeters with generative adversarial networks. p. 4
Where the paper says it

, Nachman, B. : CaloGAN: Simulating 3D high energy particle showers in multilayer electromagnetic calorimeters with generative adversarial networks.

Physical Review D 97(1), 014021 https://doi. p. 4
Where the paper says it

: CaloGAN: Simulating 3D high energy particle showers in multilayer electromagnetic calorimeters with generative adversarial networks. Physical Review D 97(1), 014021 (2018) https://doi.

org/10.1103/PhysRevD. p. 4
Where the paper says it

Physical Review D 97(1), 014021 (2018) https://doi. 1103/ PhysRevD.

97.014021

[8] Kittelmann, T., Klinkby, E. p. 5

Where the paper says it

05285 [8] Kittelmann, T. , Klinkby, E.

, Knudsen, E. p. 5
Where the paper says it

, Klinkby, E. , Knudsen, E.

B., Willendrup, P. p. 5
Where the paper says it

, Knudsen, E. , Willendrup, P.

, Cai, X.X., Kanaki, K. p. 5
Where the paper says it

, Willendrup, P. , Kanaki, K.

: Monte Carlo Particle Lists: MCPL. p. 1
Where the paper says it

High physical attenuation or low geometric acceptance means that most simulated primaries never interact with the active region, forcing redundant outer transport computations at every inner design iteration. While generative surrogates emulate energy showers in fixed geometries [6, 7] and phase-space interfaces like MCPL (Monte Carlo Particle Lists)[8] resample static recorded events without statistical amplification, MAGI (Multivariate Autoencoder for particle Generative Inference) bridges this gap.

Computer Physics Communications 218, 17–42 (2017) https://doi. p. 5
Where the paper says it

: Monte Carlo Particle Lists: MCPL. Computer Physics Communications 218, 17–42 (2017) https://doi.

org/10.1016/j.cpc.2017.04.012

[9] Kingma, D.P., Welling, M. p. 5

Where the paper says it

012 [9] Kingma, D. , Welling, M.

p. 5
Where the paper says it

012 [9] Kingma, D. , Welling, M.

: Auto-Encoding Variational Bayes. p. 5
Where the paper says it

, Welling, M. : Auto-Encoding Variational Bayes.

In: International Conference on Learning Representations (ICLR) (2014)

[13] Dinh, L., Sohl-Dickstein, J. p. 5

Where the paper says it

In: IEEE International Conference on Computer Vision (ICCV) (2017) [13] Dinh, L. , Sohl-Dickstein, J.

, Bengio, S. p. 5
Where the paper says it

, Sohl-Dickstein, J. , Bengio, S.

: Density Estimation using Real NVP. p. 5
Where the paper says it

, Bengio, S. : Density Estimation using Real NVP.

In: International Conference on Learning Representations (ICLR) (2017)

[14] Tomczak, J.M., Welling, M.: VAE with a VampPrior. p. 5

Where the paper says it

, Welling, M. : VAE with a VampPrior.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. Conditional Variational Autoencoder for particle Generative Inference (MAGI) can learn the joint energy, position and direction distribution of particles crossing a closed surface in a multi-stage simulation. This allows it to generate synthetic crossings for downstream Geant4 re-injection, achieving both computational speed-up and statistical amplification.

  2. MAGI can be conditioned on particle species as well as primary type and energy, preserving primary multiplicity. This enables the system to handle different physical scenarios by learning distributions specific to those conditions.

  3. The system can achieve a net speed-up Snet(A) which tends to S for large A and sits just below 1 at A = 1, demonstrating efficiency gains in simulations where the number of primaries is very large.

  4. MAGI can reproduce detector response of a full Geant4 run within 3 % (R = 0.97±0.02, five sources pooled) on benchmark models, ensuring high fidelity in simulating experimental data with reduced computational overhead.

Abstract

Monte Carlo particle simulations are hindered by the computational cost of particle transport. This is especially true when large mass surrounds a small sensitive volume. MAGI is a conditional variational autoencoder that learns the joint energy, position and direction distribution of particles crossing a closed surface in a multi-stage simulation, to be resampled and re-injected in a smaller mass model. We validated it generating crossings, variables describing particle features later in the simulation, injecting them into the same Geant4 mass model and comparing the spectrum and counts at detector level with full simulation. Rates per injected crossing agree with unity at about1σ on our benchmark models. We measure the gain of MAGI with statistical amplification 1/χ and computational speed-up S: the first goes from 150 for high-statistics cosmic rays to 12000 for rare radioactive decays, while the latter ranges from 2.1 to almost 240, depending on source type and mass model. These first results validate MAGI v1.0.0 released on GitHub.

Sources

Related papers