Memory Aware Synapses (MAS) for Lifelong Learning
- Memory Aware Synapses (MAS) is a continual learning method that quantifies neural parameter sensitivity to preserve key knowledge and reduce catastrophic forgetting.
- It computes importance measures online from unsupervised data by analyzing gradients of the output function, enabling updates without label dependency.
- MAS integrates a regularization term during new task learning to selectively protect important parameters, showing state-of-the-art performance in experiments.
Searching arXiv for the MAS paper and closely related continual-learning context. arXiv search query: (Aljundi et al., 2017) Memory Aware Synapses (MAS) is a novel approach for lifelong learning that computes the importance of the parameters of a neural network in an unsupervised and online manner. Given a new sample fed to the network, MAS accumulates an importance measure for each parameter based on how sensitive the predicted output function is to a change in that parameter. When learning a new task, changes to important parameters are penalized, effectively preventing important knowledge related to previous tasks from being overwritten. The method is motivated by the claim that, given limited model capacity and unlimited new information to be learned, knowledge has to be preserved or erased selectively rather than only accumulated across tasks (Aljundi et al., 2017).
1. Problem setting and rationale
MAS is framed around continuous learning under finite capacity. The motivating premise is that humans can learn in a continuous manner: old rarely utilized knowledge can be overwritten by new incoming information, while important, frequently used knowledge is prevented from being erased. In artificial learning systems, lifelong learning had focused mainly on accumulating knowledge over tasks and overcoming catastrophic forgetting. MAS argues for a complementary requirement: selective preservation and selective erasure, conditioned by how much the learned function depends on individual parameters (Aljundi et al., 2017).
The central design choice is to measure importance through the learned function itself rather than through labels. In MAS, the importance measure is derived from sensitivity of the output function to parameter perturbations. Because this sensitivity does not require supervision, the method can update parameter importance on any stream of inputs. This is the basis for the paper’s claim that MAS can adapt importance toward what the network needs not to forget, including under test conditions that differ from the original training conditions (Aljundi et al., 2017).
2. Derivation of the parameter-importance measure
Let be the vector of all network parameters . After finishing task , the network has learned a function
MAS asks how sensitive the output of is to a small change in one parameter . Using a first-order Taylor expansion for one input ,
where
To quantify how much a small change 0 affects 1 over all observed inputs 2, MAS defines
3
In practice, 4 often has vector output. Rather than summing one 5 per output dimension and back-propagating once per output, MAS uses the gradient of the squared 6-norm of the output:
7
Then 8 remains as in (1), with a single backward pass per 9 (Aljundi et al., 2017).
The interpretation given in the paper is direct: large 0 means 1 depends strongly on 2, hence 3 is important to preserve. A common misunderstanding is to treat MAS importance as a property of the supervised objective; in the formulation above, the quantity is tied to the learned function’s sensitivity.
3. Online and unsupervised accumulation
Because 4 does not depend on any labels or loss gradients, MAS can accumulate 5 on any stream of inputs, including training, validation, test, and unlabeled data. The online accumulation procedure is:
06
When finishing task 6, one may store the current model 7 and its 8. When proceeding to 9, one can add new contributions to 0 from additional unlabeled data, such as test-time data, and keep a running total
1
This online accumulation is one of the method’s distinctive features: importance can be revised by exposure to new input streams without requiring new labels (Aljundi et al., 2017).
4. Regularization during learning of a new task
Suppose a new task 2 is given with supervised loss 3, for example cross-entropy. To avoid overwriting parameters important to previous tasks, MAS uses the regularized objective
4
Here 5 denotes the parameters at the end of 6, and 7 trades off plasticity versus stability (Aljundi et al., 2017).
The role of the quadratic term is parameter-specific. A large 8 penalizes deviation of 9 from 0 and therefore protects that parameter. A small 1 leaves more freedom for adaptation. In this sense, MAS instantiates selective preservation rather than uniform freezing. This is the mechanism through which the method operationalizes the claim that some knowledge should be preserved and some knowledge may be overwritten.
5. Local MAS and the connection to Hebb’s rule
The paper also describes a local version of MAS. Instead of measuring sensitivity of the global function 2, the same idea can be applied per layer. Consider layer 3 with parameters 4 connecting neuron 5 in layer 6 with activation 7 to neuron 8 in layer 9 with activation 0. Let
1
The sensitivity of 2 to a change in 3 is written as
4
For ReLU activations, and ignoring the non-differentiable kink at zero by subgradient, one obtains
5
Averaging over 6 samples gives
7
Up to the constant 8, this is exactly a Hebbian rule: strengthen connections between neurons whose activations are highly correlated (Aljundi et al., 2017).
This connection is important conceptually. MAS is not presented only as a global sensitivity measure; it also admits a layer-local form with an explicit correlation structure. The paper uses this to relate the method to neuroplasticity.
6. Experimental results
The reported experiments cover a sequence of object recognition tasks and the problem of learning an embedding for predicting 9subject, predicate, object0 triplets. The paper reports state-of-the-art performance and emphasizes the ability to adapt parameter importance from unlabeled data (Aljundi et al., 2017).
For object recognition, the model is AlexNet pretrained on ImageNet. On two-task sequences—Scene1Birds, Birds2Scene, Flower3Birds, and Flower4Scene—the paper reports the following Task 1 retention and Task 2 accuracy:
| Method | Task 1 Acc (drop %) | Task 2 Acc |
|---|---|---|
| FineTune | 45.2 (-8.0) | 57.8 |
| LwF | 51.7 (-2.0) | 55.6 |
| EWC | 52.2 (-1.4) | 55.7 |
| SI | 52.6 (-1.0) | 55.9 |
| MAS (ours) | 53.2 (-0.4) | 55.0 |
The reported interpretation is that MAS has by far the smallest forgetting, with 5 drop versus 6--7 for the listed alternatives.
On the eight-task sequence Flower8Scenes9Birds0Cars1Aircraft2Actions3Letters4SVHN, the average end-of-sequence accuracy is:
| Method | Average end-of-sequence accuracy |
|---|---|
| FineTune | 32.7% |
| LwF | 49.5% |
| IMM | 43.4% |
| SI | 50.5% |
| MAS | 52.7% |
For the same eight-task sequence, average forgetting is reported as MAS 5 drop versus SI 6--7 drop. The memory cost statement is also explicit: MAS only stores one 8-matrix of same size as 9 (constant per task), whereas methods like IMM/EWC store one matrix per task.
For fact learning, the model is VGG-16 and the setting is a four-task random split of 186 facts from the 6DS dataset. The metric is mean-average-precision (mAP) for retrieving images of each task at end of sequence:
| Method | Evaluation | mAP |
|---|---|---|
| FineTune | 0 | 0.19 |
| FineTune | 1 | 0.19 |
| FineTune | 2 | 0.28 |
| FineTune | 3 | 0.71 |
| FineTune | overall | 0.18 |
| SI | 4 | 0.36 |
| SI | 5 | 0.32 |
| SI | 6 | 0.38 |
| SI | 7 | 0.68 |
| SI | overall | 0.25 |
| MAS (ours) | 8 | 0.42 |
| MAS (ours) | 9 | 0.37 |
| MAS (ours) | 0 | 0.41 |
| MAS (ours) | 1 | 0.65 |
| MAS (ours) | overall | 0.29 |
The paper summarizes these numbers by stating that MAS improves 2 mAP over SI (3 versus 4) and 5 over FineTune.
A specialization and adaptation test is also reported. A small “sports” subset of facts from Task 1 is defined, and 6 is computed only on that subset, using unlabeled data. At the end of the four-task sequence, mAP on the sports subset is approximately 7 for FineTune, approximately 8 for SI, and approximately 9 for MAS(adaptive). The paper describes this as MAS learning what not to forget for that subset, boosting mAP from 00 to 01 (Aljundi et al., 2017).
7. Clarifications, scope, and implications
Several points in the paper address likely misunderstandings. First, MAS importance is not tied to labels: 02 does not depend on any labels or loss gradients, and 03 can be accumulated on any stream of inputs, including unlabeled data. Second, computing 04 on test images versus train versus train+test gives nearly identical forgetting on the two-task object-recognition setting, which the paper presents as confirmation that MAS can use any unlabeled data. Third, the local form is not only loosely inspired by Hebbian learning; up to a constant factor of 05, equation (3) is exactly a Hebbian correlation rule (Aljundi et al., 2017).
The reported significance is twofold. Empirically, the method is presented as yielding state-of-the-art continual-learning performance on the reported object-recognition and fact-learning experiments. Methodologically, it is presented as the first demonstration of adapting the importance of parameters based on unlabeled data toward what the network needs not to forget, with the added observation that this target may vary depending on test conditions. A plausible implication is that MAS is particularly suited to settings where the input distribution available after training is informative about which previously learned behavior should remain stable.