LayerFM

Authors: Martina Mozzanica, Thorsten Buss

LayerFM generates the per-layer structure of a hadronic shower: for each of the 78 layers of the ILD calorimeter, the number of points (hits) and, for the time model, the earliest hit time in that layer, conditioned on the incident energy. It is the first stage of a fast point-cloud shower generator, where these per-layer quantities fix how many points the later stages produce.

Each model is a conditional flow-matching network (CNF). The recommended files are its distilled one-step student, which generates in a single network evaluation.

Code, training and distillation: github.com/FLC-QU-hep/LayerFM

Models

Folder Output per layer Input size Parameters
20260619_124529_LayerFM_PandT_/ number of points + minimum hit time 156 0.75 M per network
20260619_192637_LayerFM_P/ number of points 78 0.30 M per network

Each folder contains:

File Content
compiled_distill.pt distilled one-step student, TorchScript (recommended)
compiled.pt CNF teacher, TorchScript, 50 Heun steps
checkpoint_distill.pt, checkpoint.pt student and teacher state dicts, with optimizer state
conf.yaml training configuration

The compiled*.pt files are self-contained: the fitted preprocessing is built in, so they run with PyTorch alone, without the LayerFM code or the training data. The checkpoints are for fine-tuning or further training with the LayerFM code; rebuilding their preprocessing needs a training file (set data.data_file in conf.yaml).

Usage

import torch
from huggingface_hub import hf_hub_download

path = hf_hub_download("FLC-QU-hep/LayerFM", "20260619_124529_LayerFM_PandT_/compiled_distill.pt")
model = torch.jit.load(path, map_location="cpu")

energy = torch.full((1000, 1), 50.0)       # incident energy in GeV, shape (N, 1)
with torch.no_grad():
    num_points, min_time = model(energy)   # each (N, 78)

num_points = num_points.clamp(min=0).round().int()

20260619_192637_LayerFM_P/ models return a single tensor of shape (N, 78). Minimum times are in ns; layers without points have no meaningful time.

Training data

Geant4 11.2.2 (QGSP_BERT) showers of single π⁺ with energies uniform between 10 and 90 GeV, entering the ILD calorimeter perpendicularly: a silicon–tungsten ECal of 30 layers (5 × 5 mm² cells) and a scintillator–steel HCal of 48 layers (3 × 3 cm² cells). The models were trained on 1 806 445 showers, with 50 000 held out for validation, for 1500 epochs. The student was then trained for 1500 epochs to reproduce the teacher's 200-step Heun samples from the same noise.

Scope: the models are only valid for this detector, single π⁺ at normal incidence and 10–90 GeV.

Citation

LayerFM builds on CaloHadronic (arXiv:2506.21720, JINST 21 (2026) P01042) and on PointCountFM, the point-count model of AllShowers. If you use these models, please cite both:

@article{Buss:2025cyw,
    author        = {Buss, Thorsten and Gaede, Frank and Kasieczka, Gregor and Korol, Anatolii and Kr{\"u}ger, Katja and McKeown, Peter and Mozzanica, Martina},
    title         = {{CaloHadronic: a diffusion model for the generation of hadronic showers}},
    eprint        = {2506.21720},
    archivePrefix = {arXiv},
    primaryClass  = {physics.ins-det},
    doi           = {10.1088/1748-0221/21/01/P01042},
    journal       = {JINST},
    volume        = {21},
    number        = {01},
    pages         = {P01042},
    year          = {2026}
}

@article{Buss:2026yrf,
    author        = {Buss, Thorsten and Day-Hall, Henry and Gaede, Frank and Kasieczka, Gregor and Kr{\"u}ger, Katja},
    title         = {{AllShowers: One model for all calorimeter showers}},
    eprint        = {2601.11716},
    archivePrefix = {arXiv},
    primaryClass  = {physics.ins-det},
    journal       = {arXiv e-prints},
    month         = {1},
    year          = {2026}
}

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Papers for FLC-QU-hep/LayerFM