Accepted at ICML 2026 🎉
Neural networks are notorious for catastrophic forgetting — teach a model something new and it overwrites what it already knew. Replay buffers help, but they're expensive, don't scale, and sometimes aren't even allowed (think GDPR). Architecture expansion works too, but the model keeps growing.
We asked a different question: what if the model already has everything it needs, and we just need to figure out which parts matter?
Shapley Neuron Valuation (SNV) borrows a 70-year-old idea from cooperative game theory — the Shapley value — and applies it to neurons. Instead of treating all neurons equally or making binary keep/discard decisions, SNV computes a fair importance score for every neuron by measuring its marginal contribution across all possible subsets of the network. The important neurons get frozen; the rest stay plastic for the next task.
No replay buffer. No extra parameters. No task labels at test time (in the Class-IL setting). Just a smarter way of deciding what to protect.
Figure 1. SNV overview. After training on each task, Shapley values quantify every neuron's contribution. The most important neurons in each task are frozen to lock in knowledge; the rest remain available for future tasks. The result is zero forgetting by construction.
- Train on the current task, with frozen neurons masked out of the gradient
- Compute mean activations for each neuron on validation data
- Estimate Shapley values via Monte Carlo sampling + truncation + multi-armed bandit acceleration
- Select top-k neurons (k = c · N) as important for this task
- Freeze those neurons by updating the cumulative mask: B_t = B_{t-1} ∪ S_t
- Repeat for the next task
The Shapley estimation is the expensive part — but with truncation (skip evaluations when the model is basically non-functional) and MAB (stop sampling neurons whose importance is already confidently resolved).
git clone https://github.com/<your-username>/snv-continual-learning.git
cd snv-continual-learning
# Create environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtRequirements: Python 3.8+, PyTorch ≥ 1.12, torchvision, numpy, scipy, matplotlib, tqdm.
snv-continual-learning/
├── snv_core.py # Core algorithm: Shapley estimation, masking, MAB
├── models.py # MLP (PMNIST) and ResNet-18 (CIFAR/TinyImageNet)
├── datasets.py # Benchmarks with train/val/test splits
├── metrics.py # ACC, BWT, FWT, PS, AF, Intransigence
├── utils.py # Visualization (accuracy matrices, Shapley heatmaps, etc.)
├── train.py # Main training loop with multi-run aggregation
├── test_snv.py # Unit tests
├── run_experiments.sh # Reproduce all paper experiments
├── requirements.txt
├── figures/ # Paper figures and conceptual diagrams
└── README.md
@inproceedings{snv2026icml,
title = {Shapley Neuron Values for Continual Learning: Which Neurons Matter Most?},
author = {Mohammad Ali Vahedifar, Abhisek Ray, Qi Zhang},
booktitle = {Proceedings of the International Conference on Machine Learning (ICML)},
year = {2026}
}Released under the MIT License.
