  Living systems such as neuronal networks and animal groups process
information about their environment via the dynamics of interacting units.
These can transition between distinct macroscopic behaviors. Near such a
transition (or critical point) collective computation is generally thought to
be optimized, due to the associated maximal sensitivity to perturbations and
fast dissemination of information. For biological systems, however, optimality
depends on environmental context, making the flexible, context-dependent
adoption of different distances to a critical point potentially more beneficial
than its unique properties. Here, studying escape waves in schooling fish at
two levels of perceived environmental risk, we investigate a) if and how
distance to criticality is regulated in response to environmental changes and
b) how the individual level benefits derived from special properties of the
critical point compare to those achieved via regulation of the group's distance
to it. We find that the observed fish schools are subcritical (not maximally
responsive and sensitive to environmental cues), but decrease their distance to
criticality with increased perceived risk. Considering an individual's
hypothetical costs of two detection error types, we find that optimal distance
to criticality depends on the riskiness and noisiness of the environment, which
may explain the observed behavior. Our results highlight the benefit of
evaluating biological consequences of different distances to criticality for
individuals within animal collectives. This provides insights into the adaptive
function of a collective system and motivates future questions about the
evolutionary forces that brought the system to make this particular trade-off.
