Animals exhibit remarkable behavioral flexibility, robustly performing demanding tasks -such as searching for food or avoiding predators-in a variety of different contextual and environmental conditions. However, the demands that detecting and adjusting to changes in the environment place on a sensory system often differ from the demands associated with performing a specific behavioral task, even when both objectives rely on the same sensory modality. This necessitates neural encoding strategies that can dynamically balance these conflicting needs. Here, we develop a theoretical framework that explains how this balance can be achieved, and we use this framework to study tradeoffs in speed, performance, and information transmission that arise as a consequence of efficient coding in dynamic environments. This work generalizes current theories of efficient neural coding to dynamic environments, and thereby provides a unifying perspective on adaptive neural dynamics across different sensory systems, environments, and tasks. this framework to study tradeoffs in speed and performance across a range of different tasks and sensory environments. To our knowledge, this work is the first to provide a normative account of neural coding dynamics underlying adaptive phenomena in the brain.
RESULTSA theoretical framework for adaptation. Animals must remain flexible to changes in the environment in order to meet their behavioral demands. As a simple example, consider a system whose goal is to accurately detect the presence of a predator. Different environments might be occupied by different predators, which might in turn be signaled by different distributions of stimulus features ( Fig. 1A). A successful system should have a neural code that can discriminate stimuli within these different distributions. A simple neural code could be constructed by transforming incoming stimuli through a saturating nonlinearity in a manner that approximates the stochastic response function of a sensory neuron ( Fig. 1B). Intuitively, this neuron should use its limited dynamic range to discriminate those stimuli that are most likely to occur in its current environment; this can be achieved by aligning the steep part of its nonlinear response function with the bulk of the incoming stimulus distribution (Fig. 1B, left). This alignment guarantees that the neuron's limited coding capacity is efficiently allocated for the task of accurate stimulus reconstruction, provided that the incoming stimulus distribution does not change in time [26,28,29].In principle, if the environment were to change, the neuron should shift its response function to align with the new distribution in order to maintain accurate performance. In practice, however, the neuron might be insensitive to the stimuli that signal the change, and might then fail to adapt and consequently be unable to distinguish stimuli that signal a predator in the new environment (Fig. 1B, right). Whether and how the neuron adapts to this change, and the impact that this adaptation has on the speed and ...