Abstract
Both the human brain and artificial learning agents operating in real-world or comparably complex environments are faced with the challenge of online model selection. In principle this challenge can be overcome: hierarchical Bayesian inference provides a principled method for model selection and it converges on the same posterior for both off-line (i.e. batch) and online learning. However, maintaining a parameter posterior for each model in parallel has in general an even higher memory cost than storing the entire data set and is consequently clearly unfeasible. Alternatively, maintaining only a limited set of models in memory could limit memory requirements. However, sufficient statistics for one model will usually be insufficient for fitting a different kind of model, meaning that the agent loses information with each model change. We propose that episodic memory can circumvent the challenge of limited memory-capacity online model selection by retaining a selected subset of data points. We design a method to compute the quantities necessary for model selection even when the data is discarded and only statistics of one (or few) learnt models are available. We demonstrate on a simple model that a limited-sized episodic memory buffer, when the content is optimised to retain data with statistics not matching the current representation, can resolve the fundamental challenge of online model selection.
Introduction
In the quest for efficient artificial intelligence, a fundamental trade-off exists between storing exhaustive raw data (memory-intensive) and maintaining only a compressed summary of learned information (information-poor). This paper addresses the online model selection problem: how an agent can decide to update its internal model of the world when it has already discarded the raw evidence that might justify such a change.
When an agent builds a "semantic memory"—a compressed statistical model—it typically discards raw data points once they have been processed. However, if the current model is overly simplistic (e.g., assuming a single cluster when two exist), the discarded "noise" often contains the critical evidence required to trigger a transition to a more complex model. Without a mechanism to retain these anomalies, the agent becomes blind to better alternatives, effectively "throwing the baby out with the bathwater."
Methods
The researchers frame this problem using Bayesian inference, comparing three distinct learning strategies:
- Unconstrained Learner (UL): A "batch" learner that retains all historical data.
- Semantic-only Learner (SL): An agent that stores only the parameters of its current best model and discards raw observations.
- Episodic Learner (EL): An agent that maintains a semantic model but also preserves a very small "episodic" buffer of raw data points.
The Surprise Mechanism
The core innovation is the selection criteria for the episodic buffer. Rather than a simple first-in, first-out approach, the agent utilizes Bayesian surprise. It calculates the KL divergence between its current beliefs (prior) and its updated beliefs after observing a new point (posterior). Data points that significantly alter the agent's parameters are deemed "surprising" and prioritized for storage in the episodic memory.
Experimental Setup
The approach was evaluated using a synthetic Mixture of Gaussians (MoG) environment. The agent receives 12 data points sequentially and must determine the correct number of clusters ($k$). Starting with a simple $k=1$ assumption, the agent must "discover" additional clusters ($k=2$ or $k=3$) based on the incoming stream of data.
Key Results
The study demonstrates that semantic learners almost never successfully transition to more complex models because they discard evidence too rapidly to overcome the inherent "Occam's Razor" bias of Bayesian inference.
- Impact of a Tiny Buffer: Remarkably, an episodic memory with a capacity of just two items was sufficient to allow the agent to identify the correct model structure.
- Performance Gains: In difficult transitions (e.g., $k=2 \to 3$), the episodic learner was twice as likely to identify the correct model compared to the semantic-only learner.
- Efficiency: The episodic learner achieved performance levels approaching the unconstrained batch learner while utilizing only a fraction of the memory.
Discussion and Future Work
Episodic memory serves as a critical "bridge" for continual learning. By selectively holding onto anomalies, it provides the collective statistical weight needed to trigger a "Eureka!" moment and a subsequent model shift. While this study utilized a relatively simple Mixture of Gaussians model to allow for analytical precision, it highlights a general principle for intelligent agents.
Future research will explore how this surprise-based episodic buffer scales to high-dimensional data and deep neural networks, as well as methods for dynamically adjusting the surprise threshold in real-world, non-stationary environments.
Reference: Nagy, D. G., & Orban, G. (2017). Episodic memory for continual model learning. 30th Conference on Neural Information Processing Systems (NIPS 2016).
Summary updated