(008) / 012
SparseNetworksforJetClassification
A sparsity-aware residual network for CMS calorimeter data, and a pruning study measuring how much of it can be removed.
- Category
- Deep learning · Model efficiency
- Year
- 2026
- Last pushed
- Mar 2026
- Primary language
- Jupyter Notebook
(01) Overview
An ML4SCI Google Summer of Code evaluation task: build and benchmark sparse neural network architectures for binary classification of CMS calorimeter jet data, and analyse the efficiency–accuracy trade-off under progressive weight pruning.
(02) Problem statement
Calorimeter data is extremely sparse — most detector cells record zero energy. A standard dense CNN spends most of its computation on empty space. Two questions follow:
- Does a sparsity-aware architecture outperform a standard dense CNN on this data?
- How does global L1 pruning affect accuracy as weight sparsity rises and effective FLOPs fall?
(03) Technical approach
Build a dense baseline and a sparsity-aware network, train both under the same setup, then prune the better one step by step and measure what is lost.
The key idea in SparseResNet is the sparse residual block: it computes a binary mask from the input and zeroes activations at empty detector cells after each residual computation, so the network does not propagate signal through physically meaningless regions.
(04) System architecture
Stage 01 — Calorimeter data
10,000 labelled samples, 125 × 125 × 8, split 70 / 15 / 15.
(05) Implementation details
Input samples are 125 × 125 grids with 8 detector channels, max-normalised per sample to keep relative energy structure. The 10,000 samples are split 70 / 15 / 15. Both models are trained for 10 epochs with Adam at a learning rate of 1e-3, binary cross-entropy with logits, batch size 32, a reduce-on-plateau scheduler and a fixed seed.
Pruning is global and L1-unstructured at ratios from 0.2 to 0.8, with two epochs of fine-tuning after each step.
(06) Main features
- 01DenseCNN baseline with about 5.9k parameters.
- 02SparseResNet: residual blocks that mask activations at empty detector cells.
- 03Global L1-unstructured pruning at five ratios, each followed by fine-tuning.
- 04Effective FLOPs measured alongside accuracy and AUC.
(07) Technology stack
(08) Engineering challenges
- A fair comparison. SparseResNet has about 13 times the parameters of the dense baseline, so its accuracy gain cannot be attributed to masking alone. The pruning study is what speaks to efficiency: most of those weights can be removed.
- Measuring cost, not just size. Weight sparsity is reported alongside effective FLOPs, since unstructured sparsity does not automatically mean faster inference.
- Reproducibility. Seeds, splits and hyperparameters are fixed in a config file, and result tables are committed.
(09) Evaluation and results
SparseResNet improves on the dense baseline by 6.2 percentage points of accuracy on the held-out test set. With 80% of its weights pruned, accuracy drops by about 1.3 points while effective FLOPs fall to a fifth. The plots below are the actual outputs committed to the repository.
| DenseCNN | 0.8127 accAUC 0.8731 · 5,889 parameters |
|---|---|
| SparseResNet | 0.8747 accAUC 0.9333 · 75,777 parameters |
| SparseResNet, 60% pruned | 0.8693 accAUC 0.9319 · 67.73M FLOPs (from 169.32M) |
| SparseResNet, 80% pruned | 0.8613 accAUC 0.9316 · 33.86M FLOPs |
Source: results/tables/model_comparison.csv · pruning_results.csv


Links
- Repositorygithub.com/harshsuiiii/ML4SCI-Task-2d-Sparse-Neural-Networks-for-End-to-End-Event-Classification
Live demoNo hosted demo — run it locally from the repository.