  Biological and living systems process information across spatiotemporal
scales, exhibiting the hallmark ability to constantly modulate their behavior
to ever-changing and complex environments. In the presence of repeated stimuli,
a distinctive response is the progressive reduction of the activity at both
sensory and molecular levels, known as habituation. Here, we solve a minimal
microscopic model devoid of biological details to show that habituation is
driven by negative feedback provided by a slow storage mechanism. Crucially, an
intermediate level of habituation is associated with a steep increase in the
information that the system collects on the external input over time. We find
that the region characterized both by maximal information gain and by the onset
of habituation can be retrieved if the system tunes its parameters to minimize
dissipation and maximize information at the same time. We test our dynamical
predictions against experimentally recorded neural responses in a zebrafish
larva subjected to repeated looming stimulation. Our work makes a fundamental
step towards uncovering the core mechanisms that shape habituation in
biological systems, elucidating its information-theoretic and functional role.
