Skip to main content

MadMiner: ML based inference for particle physics

By Johann Brehmer, Felix Kling, Irina Espejo, Sinclert Pérez, and Kyle Cranmer

PyPI version CI/CD Status Docs Status Gitter chat Code style MIT license DOI reference ArXiv reference

Introduction

Schematics of the simulation and inference workflow

Particle physics processes are usually modeled with complex Monte-Carlo simulations of the hard process, parton shower, and detector interactions. These simulators typically do not admit a tractable likelihood function: given a (potentially high-dimensional) set of observables, it is usually not possible to calculate the probability of these observables for some model parameters. Particle physicists usually tackle this problem of "likelihood-free inference" by hand-picking a few "good" observables or summary statistics and filling histograms of them. But this conventional approach discards the information in all other observables and often does not scale well to high-dimensional problems.

In the three publications "Constraining Effective Field Theories with Machine Learning", "A Guide to Constraining Effective Field Theories with Machine Learning", and "Mining gold from implicit models to improve likelihood-free inference", a new approach has been developed. In a nutshell, additional information is extracted from the simulations that is closely related to the matrix elements that determine the hard process. This "augmented data" can be used to train neural networks to efficiently approximate arbitrary likelihood ratios. We playfully call this process "mining gold" from the simulator, since this information may be hard to get, but turns out to be very valuable for inference.

But the gold does not have to be hard to mine: MadMiner automates these modern multivariate inference strategies. It wraps around the simulators MadGraph and Pythia, with different options for the detector simulation. It streamlines all steps in the analysis chain from the simulation to the extraction of the augmented data, their processing, the training and evaluation of the neural networks, and the statistical analysis are implemented.

Resources

Paper

Our main publication MadMiner: Machine-learning-based inference for particle physics provides an overview over this package. We recommend reading it first before jumping into the code.

Installation instructions

Please have a look at our installation instructions.

Tutorials

In the examples folder in this repository, we provide two tutorials. The first is called Toy simulator, and it is based on a toy problem rather than a full particle-physics simulation. It demonstrates inference with MadMiner without spending much time on the more technical steps of running the simulation. The second, called Particle physics, shows all steps of a particle-physics analysis with MadMiner.

These examples are the basis of the online tutorial built on Jupyter Books. It also walks through how to run MadMiner using Docker so that you do not have to install Fortran, MadGraph, Pythia, Delphes, etc. You can even run it with no install using Binder.

Documentation

The madminer API is documented on Read the Docs.

Support

If you have any questions, please chat to us in our Gitter community.

Citations

If you use MadMiner, please cite our main publication,

@article{Brehmer:2019xox,
      author         = "Brehmer, Johann and Kling, Felix and Espejo, Irina and Cranmer, Kyle",
      title          = "{MadMiner: Machine learning-based inference for particle physics}",
      journal        = "Comput. Softw. Big Sci.",
      volume         = "4",
      year           = "2020",
      number         = "1",
      pages          = "3",
      doi            = "10.1007/s41781-020-0035-2",
      eprint         = "1907.10621",
      archivePrefix  = "arXiv",
      primaryClass   = "hep-ph",
      SLACcitation   = "%%CITATION = ARXIV:1907.10621;%%"
}

The code itself can be cited as

@misc{MadMiner_code,
      author         = "Brehmer, Johann and Kling, Felix and Espejo, Irina and Perez, Sinclert and Cranmer, Kyle",
      title          = "{MadMiner}",
      doi            = "10.5281/zenodo.1489147",
      url            = {https://github.com/madminer-tool/madminer}
}

The main references for the implemented inference techniques are the following:

Acknowledgements

We are immensely grateful to all contributors and bug reporters! In particular, we would like to thank Zubair Bhatti, Philipp Englert, Lukas Heinrich, Alexander Held, Samuel Homiller and Duccio Pappadopulo.

The SCANDAL inference method is based on Masked Autoregressive Flows, where our implementation is a PyTorch port of the original code by George Papamakarios, available at this repository.

IRIS-HEP logo

We are grateful for the support of IRIS-HEP and DIANA-HEP.

Metadata

Release files for madminer 0.9.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for madminer 0.9.6
File Size Uploaded Provenance Actions
madminer-0.9.6.tar.gz 179.6 kB Without provenance Details for madminer-0.9.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for madminer 0.9.6
File Interpreter ABI Platform Actions
madminer-0.9.6-py3-none-any.whl Python 3 none any Details for madminer-0.9.6-py3-none-any.whl

Total release size: 389.8 kB

Release files / madminer-0.9.6.tar.gz

Download URL madminer-0.9.6.tar.gz
Size 179.6 kB
Tags Source
SHA-256 checksum
How to use checksums
17eedd09da79db371530336904f248e8cde00032a53e50bbe36cbbb92f1c0939
BLAKE2b-256 checksum
How to use checksums
2d88a1d87a6642f13ef182eb49e40beb4d69c2f860a9b658ad30bde40b516d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / madminer-0.9.6-py3-none-any.whl

Download URL madminer-0.9.6-py3-none-any.whl
Size 210.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f278edf7204d246727df16cf0229c4df5b5b9c7fdd644ccd5a6d19885acc22e3
BLAKE2b-256 checksum
How to use checksums
95ed38eadac21c42df2ba9756e74d33f5516fc9842d140f40224eec822e8d636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Security for madminer 0.9.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page