MadSpace -- Event Generation for the Era of GPUs and ML
Theo Heimel, Olivier Mattelaer, Ramon Winterhalder
TL;DR
MadSpace introduces a GPU- and ML-friendly, compute-graph-based framework for end-to-end LO parton-level event generation. It unifies phase-space construction, adaptive sampling (VEGAS and MadNIS with normalizing flows), PDF interpolation on-device, phase-space cuts, weighted histograms, and on-device unweighting, with a Python interface via DLPack. A Unified Matrix Element Interface (UMAMI) enables batched, device-resident matrix-element calls without process-specific code generation, paving the way for end-to-end GPU workflows and future NLO support. Validation against MG5aMC demonstrates correct phase-space volumes, faithful differential distributions, and substantial throughput improvements, especially on GPUs, aided by binary intermediate formats and in-memory channel orchestration; the work outlines paths toward neural samplers and differentiable event generation as future enhancements.
Abstract
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.
