DDML: Detector Description + Machine Learning
- DDML is a C++ library integrating deep generative models with full-scale DD4hep detector simulation, replacing Geant4 calorimeter showers with fast surrogates.
- Its modular interfaces, including Trigger, Model, Inference, Geometry, and HitMaker, ensure seamless integration while preserving standard reconstruction and physics analysis.
- Benchmark results show that surrogate models like ConvL2LFlows and CaloClouds3 achieve significant speed-ups and maintain high fidelity in energy, angular, and geometry resolution.
DDML (Detector Description + Machine Learning) is a C++ library designed to enable the seamless integration of deep generative calorimeter surrogates into full-scale detector simulation and reconstruction workflows that utilize the DD4hep toolkit. Developed in response to the computational bottleneck posed by Geant4-based calorimeter shower simulations—especially in highly granular detectors—DDML allows any PyTorch or ONNX-exported model to function as a fast, modular replacement within a realistic detector chain. It replaces Geant4 showers with surrogate-generated hits directly in the DD4hep geometry, preserving compatibility with standard reconstruction (e.g., PandoraPFA) and physics-level analyses. No lemma or concept termed "LEMMA" is defined in the context of DDML (Buss et al., 21 Nov 2025).
1. Motivation and Rationale
Calorimeter simulation using Geant4 provides accurate physics modeling but incurs prohibitive computational costs for high-statistics requirements at future collider experiments. This challenge is acute in highly granular calorimeters, where a single electromagnetic or hadronic shower can generate tens or hundreds of thousands of simulated energy deposits. Deep generative models—including GANs, VAEs, normalizing flows, diffusion models, and point-cloud-based surrogates—have been proposed to accelerate calorimeter simulations. However, prior work largely restricted benchmarking to idealized, simplified detector geometries or single-particle scenarios with fixed incident conditions, without embedding the surrogates into a full workflow encompassing realistic geometry, digitization, pattern recognition, and physics evaluation. DDML addresses this gap by providing a generic interface for generative surrogates to interoperate transparently within the DD4hep/Geant4 simulation framework (Buss et al., 21 Nov 2025).
2. System Architecture and Software Interfaces
DDML is structured around five key C++ interfaces, each responsible for a functional aspect of surrogate-based simulation:
- TriggerInterface: Encapsulates a Geant4 fast-simulation trigger, allowing selective interception of tracks (e.g., photons or electrons above a certain energy in designated regions). Supports region and type-based vetoing for problematic geometries (module boundaries, absorber gaps).
- ModelInterface: Manages input preparation and output translation. Prepares input representations—comprising local entry coordinates, momentum direction, energy, and a random seed—for the neural surrogate, and post-processes network outputs (e.g., voxel grids, point clouds) to uniform local-space hit lists.
- InferenceInterface: Provides a backend interface to inference engines such as LibTorch or ONNX-Runtime, accepting pre-packed input tensors and returning raw model predictions. Can be stubbed with HDF5-based library lookups for rapid development cycles.
- GeometryInterface: Contains methods for converting global track parameters to a "shower frame" (local coordinate system aligned with the calorimeter surface and magnetic field) and for mapping generated local-space hits back into the segmented DD4hep detector geometry.
- HitMaker: A helper class that injects surrogate-generated hits into the Geant4 hit or step collections, emulating the native Geant4 mechanism.
The replacement loop pseudocode, executed for each intercepted track, is:
1 This loop enables DDML to insert replacement surrogates at run time with minimal overhead, leaving all downstream digitization, reconstruction, and analysis components unchanged (Buss et al., 21 Nov 2025).
3. Supported Generative Surrogate Models
DDML's flexibility allows implementation-agnostic deployment of various generative surrogates. Two state-of-the-art classes are:
- ConvL2LFlows (Regular-Grid Normalizing-Flow Surrogate):
- Operates on voxel grids (, ninefold improved lateral granularity over the 5 mm 5 mm baseline).
- Employs convolutional coupling layers with Neural Spline Flows, featuring U-Net style conditioning on incident direction and layer.
- Auto-regressive along the depth axis, with fixed sampling cost independent of incident shower energy.
- Trained via maximum likelihood estimation on the flow Jacobian, with loss:
- CaloClouds3 (Point-Cloud Diffusion Surrogate):
- Generates dequantized point clouds (; 25× finer than the base grid, with jitter for artifact suppression), retaining hits within a cube.
- Combines a PointWiseNet (for denoising local hits) and a ShowerFlow module (enforcing global constraints).
- Sampling employs a score-matching loss:
with , and inference completed in DDIM-style deterministic denoising steps. - Sampling cost scales weakly with energy (number of hits), but realizes speed-up over Geant4 on CPU (Buss et al., 21 Nov 2025).
4. Evaluation Methodology and Metrics
DDML's surrogates are evaluated through a chain that incorporates a full DD4hep detector, Geant4 or surrogate-driven calorimeter response, PandoraPFA reconstruction, and high-level physics analysis. Benchmarks are conducted in three progressive scenarios:
- Single-Photon Showers (10–100 GeV): Used to evaluate basic reproduction of energy profiles, shower shapes, and energy/angular resolution.
- Di-Photon Core Separation (5, 20, 100 GeV pairs): Tests model fidelity for close-by electromagnetic showers and clustering performance.
- Full-Physics 0 hadrons 1 Decays: Assesses physics-level performance for 2 finding in realistic hadronic final states with standard event reconstruction and kinematic fitting.
Key quantitative metrics include:
- Longitudinal/Radial Energy Profiles: 3 in radial annuli, 4 in layer 5.
- Energy Resolution and Linearity: 6, 7 computed from the central 90% interval.
- Angular Resolution: Discrepancy in 8 between PCA-estimated and true shower axes.
- Physics Categorization: 9 identification rates (nGood, nFake, nConfused, nMissed, nTotal), mass peaks (0), and energy/angle residuals.
- Divergences: Jensen–Shannon (JS) divergence or L1 histogram distances quantify fit quality (Buss et al., 21 Nov 2025).
5. Quantitative Results and Comparative Analysis
Performance results for the surrogate models in DDML are summarized as follows:
| Scenario/Metric | Geant4 Reference | ConvL2LFlows (1) | CaloClouds3 (2) |
|---|---|---|---|
| Long. profiles (single-3) | Baseline, ideal | ~few % agreement with Geant4 | 4 agreement |
| Radial profiles | Baseline, ideal | 510–15% loss in edges | 6 agreement |
| Energy resolution | Optimal (7) | 8 deviation | 9 deviation |
| Di-photon separation | Baseline, ideal | 0 deviation | 1 deviation |
| 2 finding (full-physics) | -- | up to 3 deviation | 4 deviation |
| Timing (100 GeV shower) | 52 s/shower | 61.6 s/shower (flat vs 7) | 815 ms/shower (slight 9 dep.) |
| Model size (weights + activations) | -- | 2.5 GB + 4.4 GB | 27 MB + 198 MB |
ConvL2LFlows yields moderate speed-ups (factor 1.2–2) with high geometric fidelity but greater memory usage, while CaloClouds3 achieves 0 speed-up with robust accuracy, especially in fine-grained reconstruction benchmarks (Buss et al., 21 Nov 2025).
6. Deployment Considerations and Extensibility
All DDML benchmarks are performed in the same Key4hep/DD4hep/Geant4/Pandora binary environment, ensuring direct comparability of computational performance. The design allows pluggable inference backends (LibTorch, ONNX-Runtime) and supports arbitrary DD4hep-described calorimeter topologies (barrel, endcap, irregular segmentation). Minimal C++ overhead ensures surrogate timing measurements are true surrogates for full Geant4 simulation. The modular interface design facilitates community-driven model innovation, systematic benchmarking across architectures, and transparent integration into large simulation campaigns (Buss et al., 21 Nov 2025).
7. Terminology Clarification
No definition, derivation, or acronym for "LEMMA" exists within this context. All formal nomenclature centers on DDML (“Detector Description + Machine Learning”) and the individually named generative surrogates. Any reference to “LEMMA” in association with DDML is unsupported in the scientific literature (Buss et al., 21 Nov 2025).