PackNet (Mallya & Lazebnik, 2018) makes one fixed-size network learn many tasks with zero catastrophic forgetting, by never letting a later task touch an earlier task's weights.
for each new task T:
1. train on all currently FREE weights
2. rank free weights by |magnitude|
3. keep top-k% → freeze & assign to T (binary mask m_T)
4. the rest stay free for the next task
5. at inference, apply mask m_T before running task T
Because step 3 permanently freezes the weights it keeps, no future training step can ever modify them — task T's accuracy is fixed forever once its mask is cut, which is exactly why forgetting cannot happen structurally, not just empirically.
This simulator models a toy 256-weight network as a 16×16 grid. Each "Train Next Task" click simulates a training pass on the free slots (random importance scores, standing in for gradient magnitudes), then applies the Keep ratio slider as the pruning threshold: that fraction of the currently-free pool is frozen and colored for the new task, the rest returns to the free pool for the next task.
Accuracy is modeled with a saturating curve typical of parameter-budget vs. performance in pruning literature:
accuracy(n) = 1 − e^(−n / τ)
n = weights frozen for this task
τ = "task difficulty" slider — more difficult tasks need more capacity for the same accuracy
- Keep ratio — how greedily each task claims the remaining free pool; low values conserve capacity for future tasks at the cost of this task's accuracy.
- Task difficulty (τ) — how many frozen weights a task needs to reach high accuracy; harder tasks need a bigger slice.
- Train Next Task — runs one full prune-and-freeze cycle and adds a new colored layer to the grid.
- Watch the bars in "Per-Task Accuracy": once a task is trained its accuracy number never changes again, even as later tasks consume the remaining grid — that invariance is PackNet's whole point.