Meta-Learning with Memory-Augmented Neural Networks
Adam SantoroSergey BartunovM. BotvinickDaan WierstraT. Lillicrap
Adam SantoroSergey BartunovM. BotvinickDaan WierstraT. Lillicrap
In the episodic meta-learning framework, model parameters are trained to minimize expected loss across a distribution of datasets :
Each episode presents a dataset , where is an input sample (such as an image or vector) and is its ground-truth target (such as a class label or continuous function value).
To prevent the model from learning static sample-to-class mappings directly in its weights, inputs and labels are presented in a temporally offset sequence:
At time step , the network receives the current input together with the previous target , and is evaluated on predicting the conditional distribution . Class labels are randomly shuffled across episodes so that correct identification on the first instance of a class requires guessing, but subsequent instances within the episode can achieve high accuracy if the model rapidly binds representations in memory.
The Least Recently Used Access (LRUA) module is a content-based memory writing mechanism designed for meta-learning. It writes new information to either the least recently used memory locations or the most recently used memory locations, avoiding sequence-dependent location addressing.
Memory usage is tracked by a usage weight vector across memory slots, decayed by parameter and incremented by read weights and write weights :
The least-used slots are identified by a binary indicator vector :
where represents the -th smallest element of , and equals the number of read heads.
Write weights are computed as a convex combination of previous read weights and previous least-used weights gated by a learnable scalar :
where .
In a Memory-Augmented Neural Network (MANN), an external memory matrix contains row vectors of dimension at time step . A controller network (e.g., an LSTM or feedforward network) processes the current input and emits a query key .
Addressing is performed purely by cosine similarity between the key and each memory row :
A softmax over all memory rows yields normalized read weights :
The retrieved memory vector is formed as the linear combination:
Vector is supplied as input to the classification layer and forwarded as an additional input to the controller at the next step.
In 5-class Omniglot classification episodes using one-hot encoded labels, models and human participants are evaluated on accuracy as the number of instances presented per class increases from the 1st to the 10th presentation within an episode.
The MANN equipped with Least Recently Used Access outperforms humans and non-augmented baselines at every instance. On the 2nd instance (one-shot classification), MANN achieves , exceeding human performance () and standard LSTM (). On the 1st instance, MANN scores (above the chance level), reflecting an educated guessing strategy where it discounts labels already bound in memory to other classes.
Models trained for 100,000 episodes on Omniglot with 5-character string labels ( possible labels) were evaluated on test episodes containing either 5 or 15 distinct classes across 10 instance presentations per class.
The MANN with an LSTM controller and Least Recently Used Access (LRUA) achieves on the 2nd instance and on the 10th instance in the 15-class setting. It significantly outperforms the original Neural Turing Machine (NTM) addressing mechanism ( on the 2nd instance and on the 10th instance), demonstrating the efficacy of pure content-based LRUA for episodic binding over location-based sequence addressing.
The Omniglot dataset contains over 1600 handwritten character classes with 20 examples per class, downscaled to pixels. Data augmentation includes random translations, random continuous rotations, and discrete rotations (). 1200 original classes (plus augmentations) form the training set, while the remaining 423 classes (plus augmentations) form the test set.
Two labeling setups are used:
When the external memory matrix of a MANN is not cleared between consecutive episodes, residual information from previous episodes creates proactive interference.
In 5-class Omniglot classification with persistent memory, learning progresses substantially slower than in the clean-memory condition, and the network fails to develop the rapid spike in accuracy seen when memory is reset between episodes. However, when episode length is extended (e.g., 10 unique classes over episodes of length 75), the network learns to manage slot overwriting and reaches classification accuracies comparable to the memory-wiped baseline.
A curriculum learning strategy scales MANN classification capacity across large numbers of classes. Training begins with episodes of 15 classes, and every 10,000 training episodes the maximum number of classes is increased by 1 (with episode lengths set to 10 times the maximum class count), reaching 25 classes at 100,000 episodes.
When evaluated without additional weight updates on test episodes containing up to 50 and 100 classes, the model maintains high accuracy, exhibiting gradual performance decay as the number of classes approaches 100.
MANNs applied to regression meta-learn to estimate continuous functions from small sample sets. In each episode, target functions are sampled from a Gaussian Process (GP) prior with fixed hyperparameters. The network receives input sequences with inputs for .
Because input -values are sampled continuously and presented only once per episode, exact retrieval is impossible; the model must interpolate by performing content-based reads over proximal stored points. The MANN's negative log-likelihood predictions closely track the true Gaussian Process predictions (which have direct access to ground-truth hyperparameters), and predictive variance appropriately increases for query inputs distant from previously observed data.
Coverage note — None was omitted; all primary architectural components, algorithmic mechanics, and empirical results across classification and regression are captured.
@article{santoro2016meta,
title = {Meta-learning with memory-augmented neural networks},
author = {Santoro, Adam and Bartunov, Sergey and Botvinick, Matthew and Wierstra, Daan and Lillicrap, Timothy},
year = {2016},
journal = {International Conference on Machine Learning},
pages = {1842-1850},
url = {http://proceedings.mlr.press/v48/santoro16.pdf}
}This paper is available from its original source. Click below to access the PDF.
Open PDFLicense: Published with permission