MadSpace -- Event Generation for the Era of GPUs and ML
summary
The gist
MadSpace is a new modular phase-space and event-generation library written in C++ with native GPU support via CUDA and HIP that provides a unified compute-graph-based framework for phase-space…
In short
MadSpace is a C++ library that creates a unified framework for generating particle events using GPU acceleration (CUDA/HIP). It integrates phase-space construction, adaptive sampling methods like VEGAS and neural importance sampling, and PDF convolutions into a single compute graph. This allows for fast, end-to-end simulations on both CPUs and GPUs.
Key concepts
- Compute Graph Execution Model
- This model structures the simulation like a deep learning framework (e.g., TensorFlow). It strictly separates the physics logic from the hardware implementation, allowing operations to be executed in parallel across CPUs and GPUs without needing to modify global program states, which simplifies correctness and reproducibility.
- UMAMI Interface
- This interface provides a flexible way to call matrix element code used for both phase-space integration and event generation. It supports end-to-end GPU workflows, meaning events can be generated entirely on the GPU without requiring slow data transfers between the main computer memory (host) and the graphics card (device).
Terminology used across episodes
This episode discusses
- MadSpace -- Event Generation for the Era of GPUs and ML · Paper Radio
- Event Generators for High-Energy Physics Experiments
- A comprehensive guide to the physics and usage of PYTHIA 8.3
- Event generation with Sherpa 3
- The Physics of Herwig 7
- The automated computation of tree-level and next-to-leading order differential cross sections, and their matching to parton shower simulations
- The automation of next-to-leading order electroweak calculations
- Machine Learning and LHC Event Generation
- Modern Machine Learning for LHC Physicists
- (Machine) Learning amplitudes for faster event generation
- Optimising simulations for diphoton production at hadron colliders using amplitude neural networks
- A factorisation-aware Matrix element emulator
- Accelerating Monte Carlo event generation -- rejection sampling using neural network event-weight estimates
- Targeting Multi-Loop Integrals with Neural Networks
- Loop Amplitudes from Precision Networks
- One-loop matrix element emulation with factorisation awareness
- Lorentz-Equivariant Geometric Algebra Transformers for High-Energy Physics
- A Lorentz-Equivariant Transformer for All of the LHC
- Accurate Surrogate Amplitudes with Calibrated Uncertainties
- Unweighting multijet event generation using factorisation-aware neural networks
- Amplitude Uncertainties Everywhere All at Once
The paper
MadSpace -- Event Generation for the Era of GPUs and ML · Read on arXiv
Université catholique de Louvain · Università degli Studi di Milano · INFN Sezione di Milano
MadSpace is a new modular phase-space and event-generation library written in C++ with native GPU support via CUDA and HIP. It provides a unified compute-graph-based framework for phase-space construction, adaptive and neural importance sampling, and event unweighting. It includes a wide range of mappings, from the standard MadGraph multi-channel phase space to optimized normalizing flows with analytic inverse transformations. All components operate on batches of events and support end-to-end on-device workflows. A high-level Python interface enables seamless integration with machine-learning libraries such as PyTorch.
Transcript
Introduction to the show: ident: High Energy Physics: Phenomenology. The day in particle phenomenology: models, signatures and constraints.
Kai: We're looking at the paper: "MadSpace -- Event Generation for the Era of GPUs and ML".
Title and authors: Kai: So we're looking at "MadSpace -- Event Generation for the Era of GPUs and ML". It sounds like they're trying to solve a big problem with how fast we can make these simulated events.
Mira: Yeah, it’s about making the simulation pipeline faster, specifically because traditional methods are becoming a bottleneck for future data sets. The authors are Theo Heimel, Olivier Mattelaer and Ramon Winterhalder.
Lev: From my side, I'm thinking about how much overhead these new methods add to actually running things on real hardware. If you have a complex compute graph, that graph execution model they use needs to be super efficient for both CPUs and GPUs simultaneously.
Kai: Exactly. They’re using this whole compute-graph idea to tie everything together—phase space construction, adaptive sampling, and even unweighting of events in one place. It's about unifying those steps so you don't have to manage separate pieces of code for each part of the process.
Mira: And that unification is key because it lets them plug in different methods later, like neural importance sampling or specific mappings, without rewriting the whole simulation chain every time you want to test something new.
Lev: That modularity is good for development, but on a GPU implementation, every component needs to be designed with massive parallelism in mind so that those batches of events don't just sit there waiting for the next step.
Kai: Right. It moves the heavy lifting from sequential steps to parallel graph execution, which is a big shift from how most older generators are structured.
The paper's summary: Mira: They’re tackling the core issue that at leading order, evaluating cross sections and generating unweighted events just boils down to calculating integrals over phase space points, which isn't feasible analytically.
Kai: So they introduce a way to map those points from a unit hypercube onto the actual physical phase space using an invertible mapping. That mapping then gives you a sampling density that helps you optimize how you sample those events for Monte Carlo integration.
Lev: I see the math here, it mentions the Jacobian determinant of that inverse mapping which is what controls the variance of your new integrand, and they say this variance is minimized when you use an ideal mapping.
Kai: They aren't just talking about one mapping; they have several—things like recursive decomposition based on scattering and decay blocks, and analytic mappings for things like resonances, such as the Breit–Wigner mapping for finite-width particles.
Mira: The summary emphasizes that this framework integrates phase-space construction, adaptive sampling routines like VEGAS or normalizing flows, PDF convolutions, and matrix element evaluation into a single compute graph.
Lev: That single graph execution model is what I care about—it enforces that separation between the physics logic and the hardware implementation so you can swap out numerical solvers without breaking the whole thing.
Kai: It also includes an interface called UMAMI, which lets you call matrix elements from CUDACPP plugins without needing process-specific code generation at integration time. That’s a big deal for flexibility on real hardware.
The paper's improvements: Kai: They suggest a couple of key improvements to make it even better, starting with how they handle mappings. Specifically, the FastRambo mapping replaces the numerically expensive polynomial inversion step in RamboOnDiet with a fully analytical rational quadratic transformation.
Mira: That trades perfect flatness for more numerical stability and higher throughput when you use vectorized hardware, which is important because in practice, perfect flatness is rarely what limits performance anymore.
Lev: I agree, stability trumps perfect mathematical accuracy when you’re running simulations that need to finish in a reasonable amount of time on a real cluster. It sounds like they’ve optimized the mapping for speed over theoretical purity here.
Kai: They also suggest a systematic study of neural importance sampling, looking at training strategies and scaling it up to higher-multiplicity final states. That means making the ML sampling methods more robust for more complex physics scenarios.
Mira: And beyond that, they’re looking at differentiability, which would let you compute gradients of weighted observables directly with respect to theory parameters like masses or couplings.
Lev: That’s where it gets interesting for parameter estimation; being able to get gradients at the generator level means you can profile things much more efficiently than running a whole new simulation just to check one parameter.
Kai: They also mention adding support for more phase-space mappings, like sector decompositions related to FKS theory, which lets you handle more complex physics structures beyond the simplest leading order calculations.
Conclusion: Mira: So what we’re looking at with this paper, "MadSpace -- Event Generation for the Era of GPUs and ML," is a C++ library that builds a unified compute graph for event generation that runs natively on both CPUs and GPUs using CUDA or HIP.
Kai: It aims to take those complex steps—from phase space mapping to adaptive sampling—and put them in one place, making end-to-end on-device workflows possible without messy host-device transfers.
Lev: For me, the biggest practical win is that the compute graph structure means we can swap out how the math is solved for sampling or mapping without having to rebuild the entire simulation pipeline from scratch.
Kai: It also provides tools like UMAMI to make calling matrix elements flexible for different hardware, which opens up ways to run these simulations end-to-end on dedicated hardware.
Mira: Overall, this framework gives us a solid building block that handles traditional Monte Carlo integration alongside modern ML approaches within the same infrastructure.
Lev: It’s a tool that helps address the bottleneck where simulation speed limits how much data we can collect at future colliders.
More episodes
- 2610.38463-Gauge-parameter cancellation and finite form factors in one-loop quark scattering in the refined Gribov-Zwanziger framework
- 2610.37198-Searches for new particle physics by methods of classical and neutrino astronomy
- 2511.15779-SURFing to the Fundamental Limit of Jet Tagging
- 2505.01492-Photo- and Hadrodisintegration constraints on massive relics decaying into neutrinos
- 2505.20389-Dispersion relation of the neutrino plasma: Unifying fast, slow, and collisional instabilities
- 2511.10731-Keeping It Renormalizable: Minimal Baryogenesis induced Asymmetric Dark Matter
- 2404.04021-Vacuum correlations of the stress-energy-momentum tensor with constituent quarks
- 2503.02931-Relativistic Navier-Stokes description of the quark-gluon plasma radial flow
- 2606.06105-Bulk viscosity of a binary mixture: the role of the intra-species interaction
- 2607.03343-First look at the evaluation of two-loop Feynman integrals for radiative return processes