Sketch of the model architecture and biological examples at different scales.

(a) A receptor R transitions between an active (A) and passive (P) state along two pathways, one used for sensing (red) and affected by the environment h, and the other (blue) modified by the energy of storage molecules, σs, tuned by inhibition strength κ and storage capacity NS. Here, β = BT)−1 encodes the inverse temperature. An active receptor increases the response of a readout population U (orange), which in turn stimulates the production of storage units S (green) that provide negative feedback to the receptor. (b) In the chemical network underlying chemotactic response, we can identify a similar architecture. The input ligand binds to membrane receptors, decreasing kinase activity and producing phosphate groups whose concentration regulates the receptor methylation level. (c) Similarly, in olfactory sensing, odorant binding induces the activation of adenylyl cyclase (AC). AC stimulates a calcium flux, eventually producing phosphorylase calmodulin kinase II (CAMKII) which phosphorylates and deactivates AC. (d) In neural response, multiple mechanisms take place at different scales. In zebrafish larvae, visual stimulation is projected along the visual stream from the retina to the cortex, a coarse-grained realization of the R-U dynamics. Neural habituation emerges upon repeated stimulation, as measured by calcium fluorescence signals (dF/F0) and by the corresponding 2-dimensional PCA of the activity profiles.

Hallmarks of habituation.

(a) An external signal switch between two values, 〈Hmin = 0.1 (background) and 〈Hmax = Href = 10 (stimulus). The inter-stimuli interval is ΔT = 100(a.u.) and the duration of each stimulus Ts = 100(a.u.). The average readout population (black) follows the stimulation, increasing when the stimulus is presented. The response decreases upon repeated stimulation, signaling the presence of habituation. Conversely, the average storage population (grey) increases over time. The black dashed line represents the time to habituate t(hab) (Eq. (6)). (b) If the stimulus is paused and presented again after a short time, the system habituates more rapidly, i.e., the number of stimulations to habituate t(hab) is reduced. (c) After waiting a sufficiently long time, the response can be fully recovered. (d) If the stimulation continues beyond habituation, the time to recover the response t(recovery) (Eq. (7)) increases by an amount δt (in red). (e) The relative decrement of the average readout with respect to the initial response, 〈U(in) , shows that habituation becomes less and less pronounced as we increase 〈Hmax. (f) As expected, the initial response increases with 〈Hmax. (g) The relative difference between 〈U⟩ (t(hab)) and 〈H(in), Δ〈U⟩, decreases with the stimulus strength. (h) By changing ΔT and keeping the stimulus duration Ts fixed, we observe that more pronounced and more rapid response decrements are associated with more frequent stimulation. Parameters are reported in the Methods, and these hallmarks are qualitatively independent of their specific choice.

Information and thermodynamics of the model during repeated external stimulation, as a function of the inverse temperature β and the energetic cost of storage σ.

(a-b) The mutual information between readout population and external signal at the first stimulus, , is typically lower than the one when the system has habituated, . (c) The change in the mutual information, ΔIU,H, displays a peak in a region of the (β, σ) space, where the system exhibits optimal information gain during habituation. (d) This region corresponds to intermediate habituation strength, as measured by Δ〈U⟩. (e) The corresponding increase in the feedback information ΔIf indicates that storage is fostering the gain in ΔIU, H. (f) Habituation promotes a decrease of the internal energy flux ΔJint, suggesting a synergistic energetic advantage of habituation. (g-h) From the dynamical point of view, in the region of maximal information gain (β = 3, σ = 0.6) the average number of readout units, 〈U⟩, decreases over time, while the average storage population, 〈S⟩, increases. (i-j) Similarly, both the information encoded on H by the readout, IU,H, and the feedback information, ΔIf, increase upon repeated stimulations. (k) The absolute value of the internal energy flux, |Jint|, decreases upon stimulations, while increasing for repeated pauses when the system moves downhill in energy. Model parameters are as specified in the Methods, 〈Hmin = 0.1, and 〈Hmax = Href = 10.

Optimality at the onset of habituation and dependence on the external signal strength.

(a-b) Contour plots in the (β, σ) plane of the stationary mutual information , and the total dissipation of the system per unit energy, , in the presence of a constant signal 〈H⟩ = Href = 10. For a given value of β, the system can optimize σ to the Pareto front (black line) to simultaneously minimize energy consumption and maximize information. Below the front, the system exploits the available energy suboptimally, while the region above the front is physically inaccessible. (b) In the presence of a dynamical input switching between 〈Hmin = 0.1 and 〈Hmax = Href, the parameters defining the optimal front capture the region of maximal information gain corresponding to the onset of habituation, where Δ〈U⟩ starts to be significantly smaller than zero. The gray area enclosed by the dashed vertical lines indicates the location of the Pareto front for values of β [3 – 3.5]. (c) The Pareto front depends on the strength of the external signal 〈Hmax. In particular, for 〈Hmax < Href, at fixed β a larger storage cost σ is needed. Conversely, for 〈Hmax > Href, an optimal system can harvest more information by producing more storage, thus exhibiting a smaller σ. (d) If we allow the system to adapt its inhibition strength κ to the stimulus (Eq. (15)), the Pareto fronts for different external signals collapse into a single optimal curve. Model parameters are specified in the Methods.

The role of memory in shaping habituation.

(a) The system response depends on the waiting time ΔT between two external signals. As ΔT increases, the storage decays, and thus memory is lost (green). Consequently, the habituation of the readout population decreases (yellow). (b) As a consequence, the information IU,H that the system has on the signal H when the new stimulus arrives decays as well. Model parameters for this figure are β = 2.5, σ = 0.5 in the unit measure of the energy, and as specified in the Methods.

Habituation in zebrafish larvae.

(a) Normalized neural activity profile in a zebrafish larva in response to the repeated presentation of visual (looming) stimulation, and comparison with the fraction of active neurons 〈Nact⟩ = Nact/N in our model with stochastic neural activation (see Methods). Stimuli are indicated with colored dots from blue to red as time increases. (b) PCA of experimental data reveals that habituation is captured mostly by the second principal component, while features of the evoked neural response are captured by the first one. Different colors indicate responses to different stimuli. (c) PCA of simulated neural activations. Although we cannot capture the dynamics of the evoked neural response with a switching input, the core features of habituation are correctly captured along the second principal component. Model parameters are β = 4.5, σ = 0.15 in energy units, and as in the Methods, so that the system is tuned to the onset of habituation.

Summary of the model parameters and the values used for numerical simulations, unless otherwise specified. The parameters ft and a qualitatively determine the behavior of the model and are varied throughout the main text.

Summary of the model parameters and the values used for numerical simulations, unless otherwise specified. The parameters β and σ qualitatively determine the behavior of the model and are varied.

Effects of the external signal strength and thermal noise level on sensing.

(a) At fixed σ = 0.1 and constant 〈H⟩, the system captures less information as 〈H⟩ decreases and it needs to operate at high β to sense the signal. In particular, as β increases, IU,H becomes larger. (b) In the dynamical case, outside the optimal curve (black dashed line), at high β and high σ, storage is not produced and no negative feedback is present. The system does not display habituation, and IU,H is smaller than on the optimal curve. (c) In the opposite regime, at low β and σ, the system is dominated by thermal noise. As a consequence, the average readout 〈U⟩ is high even when the external signal is not present (〈H⟩ = 〈Hmin = 0.1), and it captures only a small amount of information IU,H, which is masked by thermal activation. Simulation parameters are as in Table S2.

Behavior of the stationary average readout population 〈Ust, the average storage population 〈Sst, the mutual information between readout and the signal , and the total energy consumption , as a function of β and σ and in the presence of a static signal with average Hst. The value of κ is fixed by a reference signal as in Eq. (S28). The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Behavior of the stationary average readout population 〈Ust, the average storage population 〈Sst, the mutual information between readout and the signal , and the total energy consumption , as a function of β and σ and in the presence of a static signal with average Hst. The value of κ is tuned so that it follows the average value of the external signal, Eq. (S30). The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Dynamical optimality under a repeated external signal.

(a) Schematic definition of how we study the dynamical evolution of relevant observables, by comparing the maximal response to a first signal with the one to a signal after the system has habituated. (b) Behavior of the increase in readout information, ΔIU,H, in feedback information, ΔΔIf, in average readout population, Δ〈U⟩, and in the internal energy flux, ΔJint. The value of κ is fixed by a reference signal as in Eq. (S28). The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Behavior of the change in average readout population Δ〈U⟩, readout information gain ΔIU,H, change in internal energy flux ΔJint, feedback information gain, ΔΔIf, final readout information after habituation , as a function of σ and a and in the presence of a switching signal with average 〈Hmax. The value of κ is fixed by a reference signal as in Eq. (S28). The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Behavior of the change in average readout population Δ〈U⟩, readout information gain ΔJU,H, change in internal energy flux ΔJint, feedback information gain, ΔΔIf, final readout information after habituation , as a function of β and σ and in the presence of a switching signal with average 〈Hmax. The value of κ is tuned so that it follows the average value of the external signal as in Eq. (S30). The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Effect of the signal duration on habituation.

(a) If the system only receives the signal for a short time (Ton = 50Δt < ΔT = 200Δt) it does not have enough time to reach a high level of storage molecules. As a consequence, both ΔU and ΔIU,H are smaller, and thus habituation is less effective. (b) If the system receives long signals with brief pauses (Ton = 200Δt > ΔT = 50Δt), instead, the habituation mechanism promotes information storage and thus a reduction in the readout activity. The dashed black line indicates the corresponding Pareto front. Simulation parameters are as in Table S2.

Dynamics of a system where U evolves on the same timescale of H, and implements directly a negative feedback on the receptor. In this model, 〈U⟩ (in red) increases upon repeated stimulation rather than decreasing, responding to changes in 〈H⟩ (in gray) as the storage of the full model. On the other hand, the probability of the receptor being active, pR(r = 1) (black), shows signs of habituation.