Source-linked AI summary

Memory Aware Synapses: Learning what (not) to forget

Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, Tinne Tuytelaars

arXiv:1711.09601v4cs.CVcs.AIstat.ML

TL;DR

Lifelong-learning systems must decide what to preserve when model capacity is limited and tasks continue indefinitely, rather than attempting to prevent all forgetting. MAS estimates parameter importance online from unlabeled inputs by measuring output-function sensitivity, then protects important parameters during new-task learning; the paper reports state-of-the-art performance and adaptation to test conditions.

  • Problem

    Limited model capacity and unlimited evolving tasks make selective preservation and forgetting necessary in lifelong learning.

  • Method

    MAS estimates neural-network parameter importance online and unsupervised from output-function sensitivity on available inputs, then penalizes changes to important parameters.

  • Results

    MAS achieves better performance than state-of-the-art methods across object recognition and <subject, predicate, object> triplet prediction, including adaptation to specific test conditions.

  • Takeaways & Limitations

    MAS adapts which parameters are protected to unlabeled data encountered in the operating environment, rather than preserving all previously learned knowledge equally.

Abstract

from arXiv · show

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 so far has focused mainly on accumulating knowledge over tasks and overcoming catastrophic forgetting. In this paper, we argue that, given the limited model capacity and the unlimited new information to be learned, knowledge has to be preserved or erased selectively. Inspired by neuroplasticity, we propose a novel approach for lifelong learning, coined Memory Aware Synapses (MAS). It computes the importance of the parameters of a neural network in an unsupervised and online manner. Given a new sample which is fed to the network, MAS accumulates an importance measure for each parameter of the network, based on how sensitive the predicted output function is to a change in this parameter. When learning a new task, changes to important parameters can then be penalized, effectively preventing important knowledge related to previous tasks from being overwritten. Further, we show an interesting connection between a local version of our method and Hebb's rule,which is a model for the learning process in the brain. We test our method on a sequence of object recognition tasks and on the challenging problem of learning an embedding for predicting $<$subject, predicate, object$>$ triplets. We show state-of-the-art performance and, for the first time, the ability to adapt the importance of the parameters based on unlabeled data towards what the network needs (not) to forget, which may vary depending on test conditions.

1 Introduction

Continuous streams make frozen supervised models obsolete, while lifelong learning must selectively preserve knowledge because model capacity is limited. MAS estimates parameter importance from unlabeled data and penalizes changes to important parameters, enabling adaptation to usage and test conditions.

  • Motivation: Continuously evolving content requires learning systems that can adapt rather than remain frozen after supervised training.New images, videos, topics, and trends can differ substantially from prior training data.
  • Motivation: Retraining on old and new data becomes intractable when streaming data disappears, cannot be stored, or raises privacy constraints.
  • Lifelong learning: Lifelong learning trains one model across sequential tasks without storing previous-task data, but must overcome catastrophic forgetting.
  • Lifelong learning: With limited capacity and never-ending tasks, selectively deciding what can be forgotten becomes as important as preventing forgetting altogether.
  • MAS: MAS estimates parameter importance online and unsupervised from output-function sensitivity, allowing unlabeled data to adapt what the model preserves.
  • MAS: MAS achieved better performance than state-of-the-art methods across standard and test-condition-adaptive object-recognition and triplet-prediction settings.

2 Related Work

Related lifelong-learning methods are evaluated against requirements including constant memory, broad applicability, pretrained-model reuse, unlabeled-data learning, and setting-specific selective forgetting. MAS is a model-based alternative that computes importance online from test-adaptive unlabeled data and reports state-of-the-art performance.

  • Desired characteristics: Desired lifelong-learning methods should use constant memory, remain problem agnostic, build on pretrained models, learn from unlabeled data, and adapt forgetting to user settings.
  • Prior approaches: Existing methods divide mainly into data-based and model-based approaches, while data-storage methods are excluded from this comparison.
  • Prior approaches: Model-based methods estimate parameter importance and penalize changes to important parameters, but prior methods derive importance from uncertainty or loss changes during training.
  • MAS: MAS computes parameter importance online and unsupervised using data from the network’s test conditions, while requiring constant memory.
  • MAS: MAS is reported to achieve state-of-the-art performance while adapting importance weights to what the system needs to remember.

3 Background

Standard lifelong learning uses a shared network trained sequentially on disjoint tasks, where only current-task data is available and catastrophic forgetting is the central challenge. MAS contrasts loss-based importance estimation with output-function sensitivity and uses unlabeled samples to preserve important functions while adapting other parameters.

  • Standard LLL setup: The standard setup trains a single shared network sequentially on disjoint classification tasks, with only the current task’s data accessible.
  • Standard LLL setup: Unlike joint multitask learning, sequential lifelong learning must prevent catastrophic forgetting because tasks are not trained simultaneously.
  • Parameter importance: Prior methods estimate parameter importance from loss comparisons using labeled training data, whereas MAS uses learned-function sensitivity after convergence and can include unlabeled data.
  • Parameter importance: MAS assigns importance values to network parameters to indicate their relevance to previously learned tasks.

4 Our Approach

MAS estimates parameter importance from the sensitivity of the learned output function, then protects important parameters while allowing less important ones to change during new-task learning. Its global and local variants support online, unlabeled-data updates, with the local form connected to Hebbian learning.

  • Global importance estimation: MAS estimates each parameter’s importance from the sensitivity of the learned function’s output to parameter changes rather than loss sensitivity.For a data point x_k, the method uses the gradient of the output function with respect to parameter θ_ij.
  • Global importance estimation: Importance weights are accumulated over data points and updated online as new samples reach the network.The method can compute importance on available data representing training, validation, or test conditions.
  • Efficient estimation: For multidimensional outputs, MAS uses the gradient of the squared ℓ2 norm to obtain one scalar per sample and require only one backward pass.This replaces separate gradient computations for each output dimension and estimates parameter importance from the resulting gradients.
  • Protecting prior knowledge: Parameters with low importance can change to reduce subsequent-task loss, whereas parameters with high importance are penalized or ideally left unchanged.The regularizer permits reuse of important parameters through model sharing while discouraging changes to them.
  • Local variant: The local variant preserves each layer’s output separately by applying the same importance idea to layer functions rather than the whole network.It decomposes the network into a sequence of layer functions and accumulates gradients evaluated at different inputs.
  • Connection to Hebbian learning: The local method is equivalent in form to Hebbian importance estimation, which measures parameter importance through correlations between connected neurons’ activations.The global and local variants can use unlabeled data; the local version computes importance by multiplying connecting neurons’ input and output activations.

5 Experiments

The experiments evaluate MAS on sequential object-recognition tasks and fact learning, including long task sequences and adaptation to unlabeled test data. MAS shows minimal forgetting, competitive or improved performance, and benefits from importance estimation tailored to encountered data.

  • Experimental settings: The evaluation covers standard sequential object recognition and continual fact learning of <subject, predicate, object> triplets in an embedding space.The object-recognition setup includes two-task and eight-task sequences, while fact learning uses shared network layers.
  • Design choice: Using the squared ℓ2 norm of the output is n times faster than vector-output gradients without loss in performance.Across three random trials, first-task drops were 0.51% ± 0.18 for vector output and 0.50% ± 0.19 for the ℓ2 norm.
  • Longer Sequence: 0.49% average forgetting: MAS shows minimal or no forgetting across the eight-task object-recognition sequence.Its average performance, including the last task, is 2% better than SI.
  • Adaptation Test: 2% forgetting on a selected flower class versus 8% on the full Flower dataset when MAS importance is computed only on that encountered subset.This tests adaptation of importance weights to specific unlabeled test conditions.
  • Four tasks experiments: 6% better MAP on the first two fact-learning tasks than SI demonstrates stronger preservation of earlier tasks.The comparison uses a four-task sequence formed by randomly splitting facts into four groups.
  • Four tasks experiments: 0.29 overall MAP for MAS versus 0.25 for SI and 0.18 for Finetune on four-task fact learning.Using both training and test data to compute importance further raises overall performance to 0.30.

6 Conclusion

The conclusion argues that limited capacity and unlimited evolving tasks require selective forgetting rather than preserving all prior knowledge. MAS estimates parameter importance from active input data without supervision, connects locally to Hebb’s rule, and performs across object recognition and continual fact learning.

  • Selective forgetting: Limited model capacity and unlimited evolving tasks make it impossible to preserve all previous knowledge, motivating selective forgetting.The paper links this principle to preserving knowledge according to how frequently it is used.
  • MAS and synaptic plasticity: MAS learns network-parameter importance from input data in an unsupervised manner and uses it to protect knowledge from being overwritten.A local variant is interpreted as an application of Hebb’s rule for learning parameter importance.
  • Evaluation: The paper evaluates MAS first on sequential object recognition and then on continual learning of image-based facts in an embedding space.These experiments address both traditional lifelong learning and a more challenging shared-layer setting.
  • Findings: The experiments show that MAS can estimate importance using training data, test data, or both while achieving state-of-the-art performance.The conclusion presents these abilities as the paper’s main empirical findings.

A Additional adaptation experiment

The additional experiment tests whether MAS can adapt parameter importance to specific unlabeled test conditions. It also details the local derivation linking MAS to Hebbian learning.

  • Adaptation experiment: MAS estimates importance weights on one test-data subset and evaluates preservation separately on that subset and another.The experiment splits the first task’s test data into T11 and T12, using one subset to compute importance weights.
  • Adaptation experiment: 0.472 versus 0.451: MAS preserves higher T11 performance when importance is learned on T11 rather than T12.These are mean average precision values for the two-task fact-learning experiment on the 6DS dataset.
  • Adaptation experiment: The results indicate less forgetting on the subset used to estimate parameter importance than on the unconsidered subset.This provides empirical evidence that MAS can adapt importance estimates to what the network is actively tested on.
  • Connection to Hebbian Learning: The local MAS variant decomposes the network function into a sequence of layer-specific functions and analyzes each layer separately.The network function is represented as a composition F(xk) = FL(FL−1(...(F1(xk)))).
  • Connection to Hebbian Learning: For fully connected ReLU layers, the derivation uses neuron activations and parameter connections to obtain a rule remarkably similar to Hebbian learning.The supporting derivation defines activations and connection parameters, treats ReLU’s two derivative cases, and states the resulting similarity to Hebbian learning.

C Experimental Details

This section provides supplementary visualizations and tabulated performance for the eight-task learning sequence. It reports accuracies by task and separates training memory from storage between tasks.

  • Performance: The eight-task sequence is evaluated by reporting each method’s accuracy on every learned task at the sequence’s end.Table C1 supplies the accuracy values underlying the main paper’s Figure 5a bar plot.
  • Memory analysis: Figure C1 shows memory requirements during training for each method in the eight-task sequence.It complements Figure C2, which covers storage requirements between tasks.
  • Memory analysis: Figure C2 shows storage requirements for each compared method across the eight-task sequence.The supplementary analysis separates between-task storage from training-phase memory.

C2 Details on methods’ memory requirements estimation

The memory analysis distinguishes training-phase requirements from storage between tasks and compares how methods allocate memory across these phases.

  • Estimation protocol: The analysis splits overall memory consumption into training-phase memory and storage between tasks.Figures C1 and C2 provide the corresponding detailed estimates.
  • Compared methods: Finetuning uses only the model and task heads, whereas IMM’s offline storage grows linearly with the number of tasks.IMM stores a Fisher information matrix and previous-task models.
  • Compared methods: LwF loads the last-task model and all previous heads during training but matches Finetuning’s offline storage between tasks.Its training-time loading requirement differs from its between-task storage requirement.
  • Compared methods: SI and MAS have the same offline storage requirements, but SI additionally stores accumulated parameter contributions during training.The additional SI memory tracks each parameter’s contribution to change in the loss.
  • Experimental setup: The fact-learning setup balances facts and corresponding training and test images by selecting the best candidate from 100 random trials.This procedure is described for the random fact splits used in the experiments.

C4 Fact learning adaptation test experimental setup

The adaptation test groups facts semantically and computes importance weights for facts represented in the agent’s intervening activity. It also examines how MAS distributes importance across parameters.

  • Fact grouping: Facts are grouped by similarity in word2vec space using agglomerative clustering and Euclidean distance.The clustering builds a dendrogram and uses a cut of four clusters.
  • Fact grouping: The four clusters represent human actions, objects, musical-instrument interactions, and human interactions.Examples include riding a bike, objects such as dogs and cars, playing flute, and arguing with another person.
  • Fact grouping: The experiment also selects seven sports-related facts, including batting, bowling, tennis, croquet, volleyball, and frisbee activities.The selected facts are expressed as subject–predicate–object triplets.
  • Adaptation protocol: Importance weights are computed for facts in image subsets on which the agent is active between learning steps, targeting preservation of their performance.This operationalizes adaptation to particular test conditions.
  • Importance distribution: MAS assigns near-zero importance to many parameters while concentrating higher importance in a sparse tail of crucial parameters.The histogram suggests that changes to unused parameters can proceed while changes to task-critical parameters are penalized.

E Correlation between the parameters importance computed on different sets

The experiments compare parameter-importance estimates across training, test, and task subsets. Importance values are similar across training and test data, while different subsets assign importance according to their shared or distinct parameters.

  • Experimental scope: The analysis examines whether importance assignments differ across training, test, and partial task subsets.These comparisons assess whether the method can compute importance adequately from different unlabeled data sets.
  • Importance distribution: The parameter-importance distribution is highly concentrated: few parameters receive very high values, while most remain inexpensive to adapt.This pattern indicates that only a small number of parameters are treated as crucial for the specific task.
  • Training and test data: Importance estimates computed on training and test data are closely correlated for the top 1000 parameters in the Birds→Scenes experiment.The test-data values form a tight grouping around the line representing identical importance values.
  • Subset-specific importance: Importance computed on one subset of facts improves preservation of that subset more than preservation of an unused subset.The comparison uses two disjoint groups of facts from the first task under the fact learning setting.
  • Subset-specific importance: When two subsets share important parameters, their importance values are correlated; when they differ, different parameters receive subset-specific importance.Figures E3 and E4 visualize this relationship in the last convolutional layer.

F Visualizing the learned embedding on the adaptation experiment

The adaptation experiment visualizes the learned embedding after the second, third, and fourth tasks, while testing preservation of a frequently encountered sports-fact subset. The method reduced forgetting on this subset most among competitors without this capability.

  • The learned embedding is projected into two dimensions after training the third task.
  • The learned embedding is projected into two dimensions after training the second task.
  • The learned embedding is projected into two dimensions after training the fourth task.
  • The adaptation test selected a sports-heavy subset from the first task and found that the method reduced forgetting on it most among competitors lacking this capability.
Loading 1711.09601v4…