# BAM: Bayes with Adaptive Memory

arXiv: https://arxiv.org/abs/2202.02405 · HTML: https://mlsanity.com/paper/2202.02405/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 19 of its 50 references that are in the map.
- First posted on arXiv 4 Feb 2022.

## Builds on (most cited first, 19 of 19)

- [Variational Inference: A Review for Statisticians](https://mlsanity.com/paper/1601.00670/) (2016)
- [Spatial Transformer Networks](https://mlsanity.com/paper/1506.02025/) (2015)
- [Harmonic Networks: Deep Translation and Rotation Equivariance](https://mlsanity.com/paper/1612.04642/) (2016)
- [Randomized Prior Functions for Deep Reinforcement Learning](https://mlsanity.com/paper/1806.03335/) (2018)
- [Bayesian Model-Agnostic Meta-Learning](https://mlsanity.com/paper/1806.03836/) (2018)
- [Adversarial Continual Learning](https://mlsanity.com/paper/2003.09553/) (2020)
- [Variational Bayesian Unlearning](https://mlsanity.com/paper/2010.12883/) (2020)
- [Plan Online, Learn Offline: Efficient Learning and Exploration via Model-Based Control](https://mlsanity.com/paper/1811.01848/) (2018)
- [Streaming Variational Bayes](https://mlsanity.com/paper/1307.6769/) (2013)
- [Deep Reinforcement Learning amidst Lifelong Non-Stationarity](https://mlsanity.com/paper/2006.10701/) (2020)
- [Variational Tempering](https://mlsanity.com/paper/1411.1810/) (2014)
- [Sandwiching the marginal likelihood using bidirectional Monte Carlo](https://mlsanity.com/paper/1511.02543/) (2015)
- [Detecting and Adapting to Irregular Distribution Shifts in Bayesian Online Learning](https://mlsanity.com/paper/2012.08101/) (2020)
- [The Kanerva Machine: A Generative Distributed Memory](https://mlsanity.com/paper/1804.01756/) (2018)
- [Penalising model component complexity: A principled, practical approach to constructing priors](https://mlsanity.com/paper/1403.4630/) (2014)
- [Generative Temporal Models with Memory](https://mlsanity.com/paper/1702.04649/) (2017)
- [Product Kanerva Machines: Factorized Bayesian Memory](https://mlsanity.com/paper/2002.02385/) (2020)
- [The Hierarchical Adaptive Forgetting Variational Filter](https://mlsanity.com/paper/1805.05703/) (2018)
- [Hidden Markov Neural Networks](https://mlsanity.com/paper/2004.06963/) (2020)

## Built on by (most cited first, 2 of 2)

- [A unifying framework for generalised Bayesian online learning in non-stationary environments](https://mlsanity.com/paper/2411.10153/) (2024)
- [Optimal Empirical Risk Minimization under Temporal Distribution Shifts](https://mlsanity.com/paper/2507.13287/) (2025)

## Abstract (arXiv)

Online learning via Bayes' theorem allows new data to be continuously integrated into an agent's current beliefs. However, a naive application of Bayesian methods in non stationary environments leads to slow adaptation and results in state estimates that may converge confidently to the wrong parameter value. A common solution when learning in changing environments is to discard/downweight past data; however, this simple mechanism of "forgetting" fails to account for the fact that many real-world environments involve revisiting similar states. We propose a new framework, Bayes with Adaptive Memory (BAM), that takes advantage of past experience by allowing the agent to choose which past observations to remember and which to forget. We demonstrate that BAM generalizes many popular Bayesian update rules for non-stationary environments. Through a variety of experiments, we demonstrate the ability of BAM to continuously adapt in an ever-changing world.
