Skip to main content

Summary

ML-based particle flow (MLPF) focuses on developing full event reconstruction for particle detectors using computationally scalable and flexible machine learning models. The project aims to improve particle flow reconstruction across various detector environments, including CMS, as well as future detectors via Key4HEP. We build on existing, open-source simulation software by the experimental collaborations.

Documentation: jpata.github.io/particleflow

Read the documentation for the physics overview, installation and workflow guides, current capabilities, publications, and development priorities. The Markdown source is in docs/.

High-level overview


TLDR; I just want to run the code

You can use uv to set up the repo and test that everything works:

git clone --recurse-submodules https://github.com/jpata/particleflow.git
uv sync --project envs/ort-gpu
uv run ./scripts/local_test_cld.sh
uv run ./scripts/local_test_cms.sh

Before opening a pull request, run the lightweight quality checks with uvx --python 3.12 pre-commit run --all-files. The cyclomatic-complexity check covers the first-party mlpf/ package (not the vendored detector configuration under mlpf/data/key4hep/gen/) and rejects new functions above the transitional complexity ceiling. Prefer small, single-purpose helpers when generating or refactoring code; a local # noqa: C901 should be a reviewed exception, not an automatic workaround.

To run the same all-files check before every local commit, enable the repository hook with git config core.hooksPath .githooks. The hook uses the same pre-commit flags and Python version as GitHub Actions. It requires uv, which installs the lint tool and Python 3.12 if needed.

Alternatively, you can use a prepared container:

apptainer exec --nv https://jpata.web.cern.ch/jpata/pytorch-20260305-08d6950.sif ./scripts/local_test_cld.sh
apptainer exec --nv https://jpata.web.cern.ch/jpata/pytorch-20260305-08d6950.sif ./scripts/local_test_cms.sh

Datasets

See the user documentation to choose a dataset, download and verify published TFDS data, or produce and publish a dataset.

Training

The training guide provides a verified CPU check, a bounded GPU example, expected outputs, and checkpoint continuation.

For CLD hit-based reconstruction, the recommended model is pyg-cld-hits-heptv2-set-v1 (grouped HEPTv2 with tracker-neighborhood features), using the cld_pf_heptv2_default_50k training scenario. See the scenario guide for launch commands.

Model Upload

To upload a trained model to the Hugging Face Hub:

uv run python3 scripts/upload_model_hf.py experiments/pyg-clic-hits-v1_clic_20260328_144021_479374 --version v3.1.0

Model Download & Evaluation

The Key4HEP evaluation guide downloads a published checkpoint and runs it on an example EDM4hep ROOT file. The validation overview explains which checks are needed before interpreting physics performance.

End-to-end workflow

The dataset-generation guide documents the Pixi/Snakemake pipeline from detector simulation through validated TFDS output. Training, evaluation, physics validation, and ONNX validation are covered in the user documentation.


Publications

The following publications trace the development of MLPF from early proofs of concept to full detector simulations and fine-tuning studies across detectors.


Citations and Reuse

You are welcome to reuse the code in accordance with the LICENSE.

How to Cite

  1. Academic Work: Please cite the specific papers listed in the Publications section above relevant to the method you are using (e.g., initial GNN idea, fine-tuning, or specific detector studies).
  2. Code Usage: If you use the code significantly for research, please cite the specific tagged version from Zenodo.
  3. Dataset Usage: Cite the appropriate dataset via the Zenodo link and the corresponding paper.

Contact

For other collaboration ideas, please get in touch via GitHub Discussions.

Metadata

Release files for particleflow 3.2.0

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

Source distribution (sdist)

Source distribution for particleflow 3.2.0
File Size Uploaded Provenance Actions
particleflow-3.2.0.tar.gz 535.1 kB With provenance Details for particleflow-3.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / particleflow-3.2.0.tar.gz

Download URL particleflow-3.2.0.tar.gz
Size 535.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e16f1a61cf8f9e7b99c407afbaef377c906b10176114bb644d60ecdb2c8c0e58
BLAKE2b-256 checksum
How to use checksums
5c6155a0fb8199f63fc8ca64e883a9f8e6642f904cf3f8f9d9f97d742da73150
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / particleflow-3.2.0-py3-none-any.whl

Download URL particleflow-3.2.0-py3-none-any.whl
Size 500.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32c05d081ea40963414b6ee48153e6b93b57a95450fbf1ab5040b462052f8cb
BLAKE2b-256 checksum
How to use checksums
36b1c22d6db9a730ee9b1ce6ab05be70beb2dca06486d28b3954e5f46dd25941
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for particleflow 3.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for particleflow-3.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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

3.2.0 This release

2 release files Full 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