Open Interpretability Models Contributors Research Posts About

Overcoming Catastrophic Forgetting with Hard Attention to the Task

Source

Citation. Joan Serrà, Dídac Surís, Marius Miron and Alexandros Karatzoglou. All four are at Telefónica Research, Barcelona. Surís is also at Universitat Politècnica de Catalunya, and Miron at Universitat Pompeu Fabra. "Overcoming Catastrophic Forgetting with Hard Attention to the Task". Proceedings of the 35th International Conference on Machine Learning, Stockholm, PMLR 80, 2018. arXiv:1801.01423, version 3 of 29 May 2018 (version 1: 4 January 2018). The arXiv comment says "Includes appendix. Accepted for ICML 2018", and the venue agrees with the dates. Code: github.com/joansj/hat. The paper gives no funding statement.

Status. Planned. #4782 (catastrophic interference, weight-space programming and LoRA) would use it. The maintainer designs any campaign to fix a model, so this page reports evidence and records questions only.

Read. On 2026-11-19 we downloaded the arXiv PDF (version 3) and read its text, extracted with pdftotext. We read all of it in the source's own text. That is the abstract, Sections 1 to 5 and Appendices A to E, with Tables 1 to 8. We did not see the figures as images. Figures 3 to 10 are curves, bars and a mask, so this page gives only what the text says of them. The extraction lost some notation in the equations, and we took their meaning from the text around them. No model read the source for us.

Summary

Claim. A network can learn, for each task, an almost binary mask over its units. The masks of past tasks then block the gradient on the weights that those tasks use. The authors say this cuts forgetting "by 45 to 80%" against the best earlier method in four setups.

Method.

Findings, as the source reports them.

Setting Result
Eight tasks, after task 2 (Table 1) HAT ρ≤2 = −0.02 (s.d. 0.03). Best baseline EWC −0.08 (0.06). The authors call this a 75% cut in forgetting
Eight tasks, after task 8 (Table 1) HAT ρ≤8 = −0.06 (0.01). Best baseline PNN −0.11 (0.01), then PathNet −0.17 (0.23), EWC −0.25 (0.03), SGD −0.66 (0.03). The authors call this a 45% cut
Eight tasks, all t (Table 3) HAT falls from −0.01 at t = 1 to −0.06 at t = 8. PNN starts at −0.10 at t = 1. The authors say its fixed share of capacity for each task causes this
Incremental CIFAR, 10 tasks (Table 6) HAT ρ≤10 = −0.09 (0.01). Best baseline EWC −0.18 (0.06). The authors call this a 55% cut
Permuted MNIST, 10 tasks (Table 7) HAT large (5.8 M parameters) 98.6% mean accuracy. SI 97.1% and EWC 96.9% at 5.8 M. HAT small (0.1 M) 91.6%, SI 86.0% at 0.1 M
Split MNIST, 2 tasks (Table 8) HAT 99.0% (s.d. 0.0). CAB 94.9% (0.3), IMM-mode 94.1% (0.3), SGD 71.3% (1.5). All at 1.9 M parameters
Hyperparameters (Figure 4, seed 0) "Any variation" within s_max ∈ [25, 800] and c ∈ [0.1, 2.5] "results in reasonable performance". The default is s_max = 400, c = 0.75
Compression of one task (Table 4) With c = 1.5, HAT keeps 1.2% of the weights on MNIST (99.5% to 99.4%) and 21.4% on CIFAR100 (52.7% to 49.1%)
Training time, eight tasks (Table 5) HAT 2.2 h in total on one Titan X, against 1.4 h for SGD and 3.9 h for EWC

Where the claims go beyond the evidence

The authors give credit to PackNet and DEN, which appeared while they wrote HAT. Appendix D reports the variants that did worse, and says it is not a formal set of results.

Use in this repo