ICML May 2026 Conference paper
Active Continual Learning with Metaplastic Binary Bayesian Neural Networks
K. Cottart, T. Ballet, D. Bonnet, D. Querlioz
Proceedings of Machine Learning Research 306
BiMU (Binary Metaplasticity from Uncertainty) is a Bayesian continual-learning rule for binary neural networks: each one-bit weight keeps a probability of being +1 or −1, and its own uncertainty sets how far it may move, so the network keeps learning on long non-stationary streams without replay or task boundaries, and uses the same uncertainty to decide which samples are worth labelling.
Why
Always-on edge systems run inference continuously on a tight energy budget, while the conditions around them keep drifting: new users, aging sensors, changing environments. They see each data point once, the rare events are the ones that matter, and they have to notice when their own predictions stop being reliable. So they must keep learning without forgetting, and they cannot afford to learn from everything. Binary neural networks suit the hardware, at one bit per weight. Standard training of them forgets, though, and Bayesian binary networks trained for long enough stop learning altogether, because their posterior saturates.
How it works
Each weight is a Bernoulli variable over ±1 with a single free parameter λ; its mean is tanh λ and its variance 1 − tanh² λ. BiMU updates λ with three terms, all derived from a bounded-memory variational objective:
- Plasticity: the gradient of the loss. This is the data term.
- Forgetting: a relaxation toward the prior, scaled by 1/N and gated by the weight’s own variance, so old evidence fades after a memory window of N updates.
- Stability: an uncertainty-dependent step size. A weight that has committed to a sign resists flipping unless the data keeps asking for it.
Because the posterior never saturates, its uncertainty stays informative, and BiMU uses it twice: to regulate how much each synapse learns, and to decide which inputs deserve a label and a backward pass.
Where the metaplasticity comes from
Each weight ω ∈ {−1, +1} follows a Bernoulli distribution, written in exponential-family form with a natural parameter λ:
\[q(\omega\mid\lambda)=\frac{\exp(\lambda\,\omega)}{2\cosh\lambda}.\]λ = 0 is a coin flip, and a large magnitude of λ means the weight has committed to a sign. The mean is tanh λ and the variance 1/cosh²λ.
When deriving Bayes’ rule for continual learning, the usual move is to take the posterior after the previous batch as the prior for the next one. Every batch then adds evidence and none is ever removed, so nothing prevents the runaway growth of λ: on a long stream, the probabilities go to 0 or 1 and the variance collapses. The Bayesian continual learning and forgetting framework (MESU) instead targets the posterior over a window of roughly the last N batches, adding the evidence of the current batch and removing that of the oldest one:
\[p(\boldsymbol\omega\mid\mathcal D_{t-N:t}) =\frac{p(\mathcal D_t\mid\boldsymbol\omega)\,p(\boldsymbol\omega\mid\mathcal D_{t-N-1:t-1})}{p(\mathcal D_t)} \times\frac{p(\mathcal D_{t-N-1})}{p(\mathcal D_{t-N-1}\mid\boldsymbol\omega)}.\]BiMU projects this posterior onto the mean-field Bernoulli family, meaning it looks for the λ whose distribution is closest to it in KL divergence. Assuming the past batches have equal marginal likelihood, the variational free energy of one synapse splits into three terms:
\[\mathcal F(\lambda,\mathcal D_t) =\Big(1-\tfrac1N\Big)\,\mathcal D_{KL}\big(q(\omega\mid\lambda)\,\Vert\,q(\omega\mid\lambda_{t-1})\big) +\tfrac1N\,\mathcal D_{KL}\big(q(\omega\mid\lambda)\,\Vert\,p(\omega)\big) +\mathcal L(\boldsymbol\lambda,\mathcal D_t),\]where 𝓛 is the negative log-likelihood of the current batch, averaged over the weights drawn from q. The KL to the previous posterior keeps λ close to where it was, which is stability. The data term pulls it toward whatever explains the current batch, which is plasticity. The KL to the prior, weighted by 1/N, takes back a small share of the accumulated evidence at every step, which is the forgetting.
Between two Bernoulli distributions in this form, the KL has a closed form, (θ − ξ) tanh θ − log(cosh θ / cosh ξ), so 𝓕 can be differentiated exactly. Setting the derivative to zero gives the condition the new λ must satisfy:
\[\lambda_t-\lambda_{t-1} =-\cosh^2(\lambda_t)\,\frac{\partial\mathcal L}{\partial\lambda} -\frac{\lambda_{t-1}-\lambda_{\mathrm{prior}}}{N}.\]Here, two things happen. The second part is the relaxation toward the prior; as N goes to infinity it disappears, and we are back to cumulative learning, with nothing to pull λ back. The first part is the data term, with cosh²λ as the learning rate in front of the gradient. Since cosh²λ is the inverse of the variance, the more certain a weight is, the larger the step this condition asks for. It basically prescribes infinite updates when λ gets high.
The condition is implicit, since λₜ appears on both sides. A second-order expansion around λₜ₋₁ turns it into an explicit update (the theorem in the paper’s appendix):
\[\lambda_t=\lambda_{t-1}-\eta\left[\frac{\partial\mathcal L}{\partial\lambda}+\frac{\lambda_{t-1}-\lambda_{\mathrm{prior}}}{N\cosh^2\lambda_{t-1}}\right], \qquad \frac1\eta=\frac1{\cosh^2\lambda_{t-1}}+2\tanh(\lambda_{t-1})\,\frac{\partial\mathcal L}{\partial\lambda}+\frac{\partial^2\mathcal L}{\partial\lambda^2},\]with every derivative evaluated at λₜ₋₁. The relaxation term is now divided by cosh²λ, meaning it is weighted by the variance. It regularizes the high-variance synapses and does very little to the ones that are already certain.
But that isn’t enough, because the certain synapses are the problem, and the forgetting term barely reaches them. What decides how they move is the step size η, and the exact one contains the Hessian of the data term, which is too expensive to compute in a large network. Unlike MESU’s Gaussian synapses, Bernoulli ones have no continuous dispersion parameter that would give a cheap diagonal-Hessian estimate. BiMU therefore replaces the Hessian with a bounded surrogate:
\[\frac1\eta=\frac1{\cosh^2\lambda_{t-1}}+2\tanh(\lambda_{t-1})\,\frac{\partial\mathcal L}{\partial\lambda}+\frac1{\alpha_{\max}}+2\left\lvert\frac{\partial\mathcal L}{\partial\lambda}\right\rvert.\]Since the magnitude of tanh λ is below 1, the last term always outweighs the second one, so η stays positive and never exceeds αmax. The gradient-dependent terms also make the step asymmetric, and the sign of λ times the gradient decides which way. When the gradient reinforces the current sign, the two terms nearly cancel for a committed weight, the variance term is close to zero, and η approaches αmax: consolidation is fast. When the gradient pushes against the current sign, the two terms add up, η shrinks, and the weight flips only if such gradients persist. Around λ = 0, the variance term is close to 1 and the updates stay conservatively bounded.
This consolidation/de-consolidation asymmetry is the metaplastic behaviour reported for binary networks by Synaptic Metaplasticity (Laborieux et al., 2021). Here it is not added by hand: it comes out of the variational objective and the bound on the learning rate.
Results
- 1000 tasks of Permuted MNIST, one sample at a time: 90.30% mean accuracy on the last five tasks, against 41.12% for BayesBiNN, 29.35% for the straight-through estimator and 10.27% for Synaptic Metaplasticity, with strong out-of-distribution detection throughout.
- OpenLORIS-Object, 12 tasks in one pass: 73.61% mean accuracy with features compressed to 1,024 dimensions (BayesBiNN 72.01%, STE 52.88%), up to 90.62% on the full features.
- Active continual learning on a long-tailed OpenLORIS-Object stream: 88.70% accuracy while labelling and updating on only 3.1% of the stream, a 32× reduction, against 87.76% when training on every sample.
- On an STM32 microcontroller: 12.4× less compute per data point (45.0 ms instead of 559.4 ms), at a cost of 1.7 points of accuracy.
Using it
BiMU is an Optax gradient transformation in the code repository:
import optax
from optimizers.bimu import bimu
optimizer = bimu(lr=1.0, lr_max=1.0, N=1000) # N: the memory window
opt_state = optimizer.init(params) # params: latent λ per binary weight
updates, opt_state = optimizer.update(grads, opt_state, params)
params = optax.apply_updates(params, updates)
The configurations in configurations/ reproduce each table and figure of the paper.
Abstract
Always-on edge systems must keep learning as conditions change under tight compute budgets and must detect unreliable predictions. Bayesian binary neural networks are attractive in this setting, but mean-field Bernoulli posteriors can saturate on long non-stationary streams, wiping out epistemic uncertainty and freezing plasticity. We propose BiMU, derived from a bounded-memory variational objective that balances stability, plasticity, and forgetting. BiMU combines a data term with controlled relaxation toward the prior and an uncertainty-dependent step size that prevents saturation and sustains informative uncertainty. This non-degenerate posterior enables fully online, buffer-free active querying via Monte Carlo disagreement, reducing label queries and backpropagation updates under imbalance. BiMU sustains learning and strong OOD detection on 1000-tasks Permuted-MNIST, and on OpenLORIS-Object achieves up to 32× label/update savings at matched accuracy under class imbalance and feature compression.
Related work
BiMU is the binary counterpart of MESU (Metaplasticity from Synaptic Uncertainty), derived for one-bit synapses rather than Gaussian ones. The same principle, that a synapse’s certainty decides how much it is allowed to change, is being pushed down into the material itself with magneto-ionic synapses.
Questions
What is BiMU?
BiMU (Binary Metaplasticity from Uncertainty) is a Bayesian continual-learning rule for binary neural networks, published at ICML 2026. Each one-bit weight keeps a probability of being +1 or −1, and its own uncertainty sets how far it may move. The network keeps learning on long non-stationary streams without replay or task boundaries, and uses the same uncertainty to decide which samples are worth labelling.
Why do binary Bayesian neural networks stop learning in continual learning?
Because of posterior saturation. With a mean-field Bernoulli posterior, every new batch of evidence pushes each weight's probability further toward 0 or 1. On a long non-stationary stream the weights end up certain, the epistemic uncertainty disappears, and the network freezes. BiMU prevents this in two ways. A bounded memory window N relaxes evidence older than the window back toward the prior, and a capped learning rate makes committed weights move less, so they drift toward saturation far more slowly.
How is BiMU different from BayesBiNN?
They approximate different posteriors. BayesBiNN (Meng et al., 2020) fits a mean-field Bernoulli posterior to all the data seen so far, p(ω | D1:t). Every batch adds evidence, so the posterior keeps sharpening. In a stationary world that is the right answer; on a drifting stream the weights saturate, and continual use needs task boundaries to reset the prior. BiMU targets the posterior over a sliding window of roughly the last N updates, p(ω | Dt−N:t). Its variational free energy weighs the previous posterior by (1 − 1/N) and the prior by 1/N, then adds the likelihood of the current batch. Old evidence is discounted geometrically and replaced by the prior, so certainty stays bounded without any task boundary. A second-order expansion of that objective gives BiMU's closed-form update, uncertainty-dependent step size included. After 1000 tasks of Permuted MNIST, BiMU reaches 90.30% mean accuracy on the last five tasks, against 41.12% for BayesBiNN.
How does active learning work with BiMU?
The network draws K samples of its binary weights and runs K cheap forward passes on each incoming input. If the samples disagree, the input is uncertain, and only then does the network ask for a label and pay for the backward update. Everything happens online, with no replay buffer. On a long-tailed OpenLORIS-Object stream, BiMU reaches 88.70% accuracy while labelling and updating on only 3.1% of the stream (32× fewer), against 87.76% when training on every sample.
Can BiMU run on a microcontroller?
Yes. The paper measures it on an STM32 NUCLEO-64 board at 216 MHz. Learning only when unsure brings the expected compute per data point down to 45.0 ms, against 559.4 ms when updating on every sample: 12.4× less, for 89.30% vs 90.98% accuracy. At inference, each weight is a single bit.
What does the memory window N do?
N sets how much evidence each synapse keeps, and therefore how many synapses stay uncertain enough to learn. Too small and the network forgets (27.09% mean accuracy over the last five of 1000 tasks at N = 100). Too large and it saturates (83.70% at N = 100,000). In between, it balances stability and plasticity (89.07% at N = 1,000).
Where is the code?
At github.com/kellian-cottart/active-continual-learning-bayesianbinn. BiMU is an Optax gradient transformation (optimizers/bimu.py, JAX and Equinox), with one script per table and figure of the paper.
BibTeX
@inproceedings{cottart2026active,
title = {Active Continual Learning with Metaplastic Binary
Bayesian Neural Networks},
author = {Cottart, Kellian and Ballet, Th\'eo and
Bonnet, Djohan and Querlioz, Damien},
booktitle = {Proceedings of the 43rd International Conference
on Machine Learning},
series = {PMLR},
volume = {306},
year = {2026},
eprint = {2605.30198},
archivePrefix = {arXiv}
}