[Paper Review] Towards the automation of Monte Carlo simulation on GPU for particle physics processes
This paper presents MadFlow, a new framework that automates GPU-accelerated Monte Carlo simulation for particle physics processes by integrating MadGraph5_aMC@NLO with GPU-optimized libraries VegasFlow and PDFFlow. It enables end-to-end simulation of leading-order matrix elements and phase space generation on CPUs and GPUs, achieving statistical agreement with standard MC tools and demonstrating significant performance gains—up to 10x speedup—on GPU hardware while maintaining accuracy within 0.02%.
In this proceedings we present MadFlow, a new framework for the automation of Monte Carlo (MC) simulation on graphics processing units (GPU) for particle physics processes. In order to automate MC simulation for a generic number of processes, we design a program which provides to the user the possibility to simulate custom processes through the MadGraph5_aMC@NLO framework. The pipeline includes a first stage where the analytic expressions for matrix elements and phase space are generated and exported in a GPU-like format. The simulation is then performed using the VegasFlow and PDFFlow libraries which deploy automatically the full simulation on systems with different hardware acceleration capabilities, such as multi-threading CPU, single-GPU and multi-GPU setups. We show some preliminary results for leading-order simulations on different hardware configurations.
Motivation & Objective
- To address the growing computational demand of Monte Carlo simulations in high-energy physics by enabling GPU acceleration.
- To automate the deployment of parton-level matrix elements and phase space generation for arbitrary processes on hardware accelerators.
- To provide a maintainable, developer-friendly framework that integrates seamlessly with existing HEP tools like MadGraph5_aMC@NLO.
- To enable high-performance, portable simulations across CPU, single-GPU, and multi-GPU configurations without low-level hardware coding.
- To lay the foundation for future support of NLO computations and integration with deep learning-based simulation techniques.
Proposed method
- The framework uses MadGraph5_aMC@NLO to generate process-specific matrix elements and phase space expressions in a standard format.
- It exports these expressions into a GPU-compatible format using a custom Python plugin that translates Feynman rules into TensorFlow-compatible operations.
- Matrix element evaluation is vectorized using TensorFlow control flow to handle conditional statements in wavefunctions and vertices.
- Phase space generation and kinematic evaluation are performed on GPU using VegasFlow, which supports high-dimensional integration with hardware acceleration.
- Parton distribution functions are evaluated via PDFFlow, a GPU-optimized library for fast PDF interpolation.
- The full pipeline runs entirely on GPU, minimizing CPU-GPU data transfer and enabling end-to-end acceleration.
Experimental results
Research questions
- RQ1Can a fully automated pipeline be built to generate GPU-ready Monte Carlo simulations for arbitrary particle physics processes?
- RQ2How accurately does the GPU-accelerated simulation match standard CPU-based results in terms of cross-section predictions?
- RQ3To what extent does GPU acceleration improve performance compared to CPU-only execution for leading-order processes?
- RQ4Can the framework maintain numerical stability and accuracy when replacing CPU-based integrators with GPU-optimized ones?
- RQ5What is the performance portability of the framework across different hardware configurations, including multi-GPU setups?
Key findings
- The MadFlow framework achieves statistical agreement with standard MG5_aMC results, with a relative difference of less than 0.02% in the differential cross section for gluon-gluon fusion at 14 TeV.
- The GPU-accelerated implementation using a single NVIDIA Titan V GPU achieves a performance improvement of up to 10x over the CPU-only version of MG5_aMC.
- The CPU-only version of VegasFlow already outperforms the original MG5_aMC integrator due to superior parallelization, confirming the efficiency of the underlying library design.
- All computations in the benchmark were performed entirely on GPU, with no asynchronous CPU evaluation, demonstrating full GPU offloading capability.
- The framework successfully handles complex matrix element evaluations involving conditional logic in wavefunctions, proving the feasibility of GPU porting for non-trivial HEP amplitudes.
- The results validate the entire pipeline from analytic matrix element generation to GPU execution, paving the way for NLO and future deep learning-based simulation extensions.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.