Getting used to things, learning more about them

9 minute read

This post is about the paper Optimal information gain at the onset of habituation to repeated stimuli, published in eLife in 2025.

In the last few posts, we have always been following a system from the outside, watching how it responds to an environment that is changing around it. With our two dust particles, our two friends, our cortical neurons, we were trying to figure out what one part of the system knew about the other, and the environment was the thing that made it hard by giving rise to shared information that was not actually about the other part of the system. This was the story of disentangling and interference, a story about two parts of a system, that kept me busy for a good part of my PhD. But then, we realized we could do something more: we could flip it around.

Take a single system, and let the environment be the thing it actually cares about: a signal it needs to detect. And ask a question so ordinary that it barely sounds like physics: what should it do when the same signal arrives over, and over, and over again? It turns out that you already know the answer, because you have done it several times today. A repeated hum in the background, the feeling of your clothes brushing against your skin, the smell of a familiar place are all things that we notice at first, and then they fade. We get used to them, and we do it in a very particular way: we respond less and less to the same signal, until it becomes just another part of the background. We habituate. Biologists have been studying habituation for a long time, and it is a phenomenon that is as universal as it is ordinary: you do it, a zebrafish does it, neural circuits do it, and so do single cells and molecules. It is a behavior that has been conserved across the tree of life. So we started to wonder: can we understand its ubiquity in terms of information acquired about the signal?

Getting used to things

One fundamental feature of habituation is that it does not last forever. Rather, if the repeated stimulation disappears for long enough, the response comes back on its own. Think about it: switch the hum in the background off for some time, and you will notice when it comes back up. Or leave home for a couple of weeks, and its smell will be there to greet you at the door. Whatever turned the response down and let you habituate can also turn it back up. Thus, it is not just a sensor wearing out, but rather a mechanism that is actively filtering out things and suppressing the response.

As is often the case, we started with the most innocent and yet the hardest question of it all: why? If suppressing responses to repeated stimulation is so ubiquitous, what is it for? If you think about it, getting used to a stimulus means responding less to it, and if the response is how the system “sees” the signal, responding less sounds like a bad deal. Yet nearly every living system, at every scale, has converged on this exact behavior. Sometimes, that is a hint that it is not there by chance, but rather because it is useful.

A sensor, a response, and a slow memory

You may guess what comes next. In order to tackle this question, we built a model that stripped the problem down to its bare essentials, keeping as little biology as we could get away with, without changing the problem itself. The idea was, as usual, to try to isolate the essential ingredients of habituation. After many days spent at the blackboard — I was visiting the Max Planck Institute for the Physics of Complex Systems in Dresden at the time — we came up with a model that has three pieces: a sensor that detects the signal, a response that follows the sensor, and an internal quantity that may act as a memory in the right conditions.

The response is what we actually observe, and it is the activity that fades. Imagine your reaction to the background hum, the smell of a new place, the sight of something new. And here is one of the crucial ingredients: sensing a signal does not come for free. Whether it is neural activity propagating in your brain, a receptor binding to a molecule, or a mechanical transduction of a signal, activating the sensor costs energy. So what the memory does in our model is that, in the right regime, it makes it progressively harder to activate the sensor as it accumulates.

If the last posts have taught us anything about systems with complex interactions, it is that timescales decide everything. Before, it was the speed of the environment that decided whether information adds up or cancels. Here, the fast–slow split has moved inside the system. In fact, we focused on cases in which the response is fast and the memory is slow, and that slowness is the entire point. Why? Think of this: the first time the stimulus arrives, the memory is empty and the response is at its highest. But each repetition leaves a little more memory behind, the sensor gets slowly but steadily damped, and the responses shrink. From this feedback loop across timescales, habituation emerges. And the habituation we observe in the model has all the right properties: for instance, if we leave the system alone for a while, the memory slowly drains away and the response eventually returns. This spontaneous recovery is among the “hallmarks” of habituation, and our model with the right timescales and parameters reproduces all of them.

Where does the information go?

At this point, the first thing we wanted to know was this: if the response is the system’s only window onto the world, one could expect that less response implies less information about the world. But when we used information theory to compute it — the same mutual information as in the previous posts, this time between the signal and the response — we found out that it goes the other way. As the system habituates, our model predicts that the information it carries about the signal grows, at least as long as it doesn’t overdo it.

Qualitative illustration: under repeated stimuli the response shrinks while a slow memory builds up, and the information the system has about the signal rises

How can that be? Part of the answer is in the response itself. The full-blown initial response to a signal that the system has never seen is a blunt one, shouting the same thing regardless of the fine details of the input. On the other hand, the quieter response of a habituated system turns out to be sharper, better at telling different signals apart. The rest of the answer is in the memory. All this time, while damping the sensor, it has also been keeping a record of the signal’s history, so part of what the system knows no longer lives in the response at all: it sits in the memory, which works as a reservoir of information. Think of our friend from the previous posts, hearing the same headline every single morning. The first day, a strong reaction. By the tenth, barely a shrug. Yet, they know far more about the story than they did on day one.

Why it’s useful. Responding every time is expensive: every response costs energy, whether because molecules need to be produced or neural activity needs to be sustained. A system that always reacts at full strength to a signal it has already seen a hundred times is paying a price and yet not learning anything new. As it turned out, our model suggests that habituation emerges as the better strategy precisely because it cuts down this cost. We exploited a technique known as Pareto optimization, asking which parameters of our model strike the best possible balance between the information they capture and the energy they burn. The answer landed exactly in the region of moderate habituation, between a system that turns the response down too far and stops hearing the signal altogether, and one that forgets to habituate entirely. The largest information gain sits at the onset of habituation, when the response drops just enough for the memory to do its job.

We then checked the idea against a real brain. Our collaborators recorded thousands of neurons from the brain of a larval zebrafish while it watched the same looming stimulus, a dark shape expanding as if approaching, repeated every couple of minutes. Stimulus after stimulus, the neural response fades, and its core features are the ones the model predicts. Of course, a model this minimal cannot capture every detail of what all those neurons are doing (it would be suspicious if it did). What it offers instead is a candidate explanation for why they do it.

One last thing worth noticing before we move on. The ingredient doing all the work here is a slow variable quietly keeping score underneath a fast one, turning a mere sensor into something that learns. This fast–slow structure is not special to habituation, and next time we will meet it again, finally aiming for a fully fledged general theory of timescales and information.

Some technical details

The model consists of four coupled stochastic variables with a strict hierarchy of timescales: a readout population \(U\) (the response, the fastest variable, timescale \(\tau_U\)), a two-state receptor \(r \in \{0,1\}\) (the sensor, \(\tau_R\)), a storage population \(S\) (the memory, \(\tau_S\)), and the external signal \(H\), with \(\tau_U \ll \tau_R \ll \tau_S \approx \tau_H\). The joint probability evolves under the master equation

\[\partial_t P = \left[ \frac{\hat{W}_U(r)}{\tau_U} + \frac{\hat{W}_R(s,h)}{\tau_R} + \frac{\hat{W}_S(u)}{\tau_S} + \frac{\hat{W}_H}{\tau_H} \right] P,\]

where each operator describes the transitions of one variable, conditioned on the others. The structure of the rates is where the mechanism lives, and it forms a single closed loop. The signal activates the receptor, with an Arrhenius-like rate \(\propto e^{\beta(h - \Delta E)}\) against an energetic barrier \(\Delta E\); an active receptor enhances the production of readout molecules, which follow a birth–death process; the readout drives the production of storage molecules, each costing an energy \(\sigma\); and, closing the negative feedback, storage suppresses the receptor, with a deactivation rate growing as \(e^{\beta \kappa \sigma s / N_S}\). A repeated stimulus is modeled as a signal drawn from an exponential distribution whose mean \(\langle H \rangle(t)\) switches periodically between a low and a high value. Because the storage is slow, it integrates the activity over many stimulations, and this one loop is enough to reproduce the classical hallmarks of habituation catalogued by Thompson and Spencer in the 1960s: the progressive response decrement, spontaneous recovery after a long pause, potentiation of habituation, subliminal accumulation, and the sensitivity of the decrement to stimulus intensity and frequency.

The information carried by the response about the signal is the mutual information

\[I_{U,H}(t) = H[p_U](t) - \int dh \, p_H(h,t) \, H[p_{U \vert H}](t),\]

with \(H[\cdot]\) the Shannon entropy — the same quantity as in the previous posts, now between the readout and the signal rather than between two particles. The central result concerns the information gain \(\Delta I_{U,H} = I^{(\text{hab})}_{U,H} - I^{(\text{in})}_{U,H}\), the difference between the habituated and the initial state under repeated stimulation. In the plane of the two key parameters — the inverse temperature \(\beta\) and the storage cost \(\sigma\) — this gain displays a peak at an intermediate habituation strength \(\Delta \langle U \rangle\): both the non-habituating regime and the strongly habituating one are suboptimal. The storage acts as an information reservoir in a precise sense: the feedback information \(\Delta I_f = I_{(U,S),H} - I_{U,H}\) is positive and its gain peaks in the same region, meaning that part of the signal knowledge is held jointly by the response and the memory rather than by the response alone.

The thermodynamic side comes from the fact that the loop is genuinely out of equilibrium. The receptor is driven through two competing pathways (signal activation and feedback suppression), dissipating heat, and every storage molecule costs \(\sigma\) to produce; together these define a total energetic cost \(E_{\text{tot}}\). Maximizing the linear combination \(\mathcal{L} = \gamma I_{U,H} - (1-\gamma) E_{\text{tot}}\) over the model parameters, for all trade-off weights \(\gamma \in [0,1]\), traces out a Pareto front of strategies that are optimal compromises between information and dissipation — and this front corresponds to the region of maximal information gain. In this model, habituation is what optimizing the information–energy trade-off looks like.

Finally, the comparison with data. Whole-brain calcium imaging of a larval zebrafish (on the order of \(5 \times 10^4\) neurons) under looming stimuli repeated every \(150\) s shows fading responses in the stimulus-correlated population, concentrated in the optic tectum. A principal component analysis of this population separates a first component tracking the evoked response from a second one tracking the slow habituation dynamics, and the model captures the core features of the observed habituation — the progressive decrement and its partial recovery between stimuli — though not the detailed shape of each evoked transient, which is beyond the reach of a minimal switching input.


eLife 13:RP99767 (2025) · arXiv preprint