This project presents an end-to-end physics-aware pipeline for simulating, augmenting, classifying, and generating particle detector events using deep learning.
The workflow closely mirrors real high-energy physics (HEP) analysis pipelines:
Physics-inspired simulation
↓
Class-conditioned diffusion (data augmentation)
↓
CNN / Vision Transformer classification
↓
Physics-consistent evaluation
The project is suitable for academic research, HEP ML coursework, and BE level experimentation.
| Class ID | Particle | Physical Meaning |
|---|---|---|
| 0 | Muon | Straight minimum-ionizing track |
| 1 | Electron | Compact electromagnetic shower |
| 2 | Hadron | Chaotic hadronic shower |
- Resolution: 64 × 64
- Single-channel grayscale
- Gaussian blur + detector noise
- Normalized per image
- Straight-line trajectory
- Minimal lateral spread
- Low energy deposition
- Compact EM shower
- Radially symmetric
- Moderate energy
- Multi-cluster structure
- Highly stochastic
- Large energy fluctuations
In real experiments, Monte-Carlo generators produce large datasets before reconstruction or classification.
Here, a class-conditioned diffusion model (DDPM) acts as a learned Monte-Carlo generator, producing realistic detector events used to augment training data.
- UNet-based DDPM (
diffusers.UNet2DModel) - Explicit class conditioning
- Noise scheduler:
squaredcos_cap_v2
Generated events are rescaled to satisfy:
Class Target Energy
Muon 300 Electron 2000 Hadron 3500
This mimics calorimeter energy calibration.
- Muons: Straight coherent tracks preserved by diffusion
- Electrons: Smooth compact showers with radial falloff
- Hadrons: Complex multi-cluster stochastic structures
Diffusion successfully captures class-specific topology and energy flow, making it suitable for physics-aware augmentation.
- ImageNet pretrained backbone
- Frozen convolutional layers
- Custom classifier head
- Strong local inductive bias
- Pretrained ViT encoder
- Global self-attention
- Better modeling of complex hadronic topology
Aspect CNN (VGG16) ViT
Feature focus Local Global Physics analogy Local energy deposits Event-level topology Noise robustness Moderate High
| Criterion | CNN (VGG16) | ViT-B/32 |
|---|---|---|
| Training stability | High | Medium |
| Muon classification | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Electron classification | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Hadron classification | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Generalization | Moderate | Strong |
- CNNs excel at localized structures (tracks, compact showers)
- ViTs excel at global reasoning (hadronic fragmentation)
Diffusion-based augmentation: - Increases sample diversity - Reduces overfitting - Improves electron and hadron recognition
Diffusion augments, not replaces, physics simulation.
torch
torchvision
diffusers
numpy
scikit-learn
matplotlib
seaborn
tqdm
- Particle identification
- Detector response modeling
- HEP ML research
- Data augmentation studies
Anurag G.C.
Computer Engineering
IOE Pulchowk Campus
Nepal 🇳🇵





















