The neural dynamics of sensory focus

Coordinated sensory and motor system activity leads to efficient localization behaviours; but what neural dynamics enable object tracking and what are the underlying coding principles? Here we show that optimized distance estimation from motion-sensitive neurons underlies object tracking performance in weakly electric fish. First, a relationship is presented for determining the distance that maximizes the Fisher information of a neuron's response to object motion. When applied to our data, the theory correctly predicts the distance chosen by an electric fish engaged in a tracking behaviour, which is associated with a bifurcation between tonic and burst modes of spiking. Although object distance, size and velocity alter the neural response, the location of the Fisher information maximum remains invariant, demonstrating that the circuitry must actively adapt to maintain ‘focus' during relative motion.

N = 31) and an additional 200 values (light grey) determined from 6 second clips of spontaneous spiking, randomly sampled from the population. b) Best fit exponential (baseline) or sum of exponentials (looming and receding) are shown for the population ISI histograms, where the bin size was chosen to minimize a cost function between the sample histogram and the unknown underlying probability density 1 . Note that here, and in Fig. 1a, the fit neglected the absence of ISIs smaller than the 3 ms refractory period. The discrete time-rescaling theorem was applied to test whether the underlying spiking could be described as a Poisson processclearly the null hypothesis is rejected (both visually and by the p-values associated with the 99% confidence level, two-way Kolmogorov-Smirnov test. In particular, receding data is included for comparison with the looming and baseline results shown here and in Fig. 1a. c) Our looming and receding  This is reflected in the shifted burst fraction measure to the (1.45, 1.65) cm interval (center) and the probability of a neuron in the population transitioning to the burst state as a function of object distance (right). Notice that this probability distribution is highly reminiscent of Fig. 4c (Fig. 3b), and to account for some discrepancy between the population subsets used for each stimulus condition, the mean was measured for the first third (2 cm) of the approach, where the stimulus is undetectable, and then adjusted to match the mean population BF for its specific time window, , determined from all 31 cells used in the study (Methods). Determining where the BF exceeds our threshold for these three different spatial intervals allowed us to compute their intersection and narrow down the predicted location of the F I maxima ( * x ) for each condition, for comparison with the theory. For the cases in which Eq. [2] was applied (1-4 cm/s looming and 2 cm/s receding), we found that the BF value lying just before the hard threshold of 0.3 contains the theoretically identified focal point consistently. The burst fraction intervals produced identical results for the 0.5 cm/s looming stimulus, which is in agreement with strong electromotor response behavior at slow speeds 8 . For the finer resolution (1 and 1.5 mm), the time windows grow shorter and underestimation appears to weaken the fidelity of our BF measure. In particular, the instances marked with a red star were omitted from the intersection operation as they generate the null set and stand at odds with the theory and behavior. Since 1 and 1.5 mm appear less reliable, we chose 2 mm as our distance interval for the BF analysis in Figs. 3 and 4 of the main text. In the case of the small sphere, both 1 and 1.5 mm predict that the sphere's focal point is actually a bit closer to the skin but still in the range [1.25, 1.35] cm (discrediting the 1 mm interval as per above), just like the v = 1 cm/s case. The results for the 1 and 1.5 mm interval may be due to chance, due to underestimation of the BF, to the potential understimulation due to more difficult RF alignment (see Methods), or to the limitations of using a hard threshold as opposed to more sophisticated synaptic decoding, hypothesized to occur in vivo. However, the result may also be meaningful since the d = 0.64 cm object is the absolute smallest size for which electromotor motion tracking was observedgymnotiform fish appear uninterested in or unable to continuously track smaller inanimate objects. Therefore, the small object's focal point may be beginning to shift, accompanied by the diminishing behavioral response. Whether a F I maximum is still important for even weaker stimuli is a question for future work.

Supplementary Note 1
ON/OFF cell spiking is memoryless during motion processing ON and OFF pyramidal cell spiking is highly irregular, which can be seen in the raster plots of Fig. 1a. Supplementary Fig. 1a shows a scatterplot of the coefficient of variation (CV) of each cell's ISIs as a function of their baseline firing rate. Note the mean of the population (0.95), with many cells having a CV near one. This suggests that the spiking of many ON and OFF cells might be reasonably described as a Poisson process (with dead time, that is, no spiking during the action potential refractory period < 3 ms). In the absence of a stimulus (or baseline conditions), histograms of inter-spike intervals (ISIs) recorded from the entire population However, the individual ON and OFF cells have a CV that ranges from as low as 0.5 to just over 1.5, indicating that spiking is non-Poisson for many ON and OFF pyramidal cells.
Pyramidal cell ISIs may actually arise from a Gamma process 2 (with a scale parameter k that varies from cell to cell); this would account for the observed range of CVs, given by where ISI  is the ISI sample mean. Despite this fact, the best fits of Gamma distributions were unsatisfying. Furthermore, at baseline, the average serial correlation function between successive ISIs shows a weak, yet significant negative correlations( Supplementary Fig. 1c), violating the renewal assumption that is implicit to both Poisson and Gamma processes. It thus appears that baseline pyramidal cell spiking in the ELL, as a whole, cannot be described by common parametric distributions. Therefore, we sought to use survival analysis 2 to develop a simple connection between our empirical firing rates and Fisher's information, as previously done for Poisson spiking neurons (Eq. [1]) 3 .
During stimulus presentation, population ISI distributions show compound exponential behavior ( Supplementary Fig. 1b). To demonstrate that individual pyramidal cell spiking is also non-Poisson during stimulation, we applied the discrete time-rescaling theorem 4 unit rate for each cell using the reciprocal of the average ISI obtained from entire baseline recordings (typically 1-2 minutes). The same procedure, outlined below, was applied for the baseline data, simulated Poisson data, and our looming/receding data. The resulting time series allowed us to explore the statistical characteristics of pyramidal cell spiking.

Procedure
The application of the continuous time rescaling theorem 5 has one major drawback for neural data: it relies on the assumption of truly instantaneous events. Since action potentials actually have a 1-2 ms time course, and since data collection/analysis discretizes time, false rejection of the null hypothesis ( 0 : H ON and OFF cell spiking is not significantly different than realizations of a Poisson point process) is inevitable. When applied to our data, we observed the exact same spurious rejection previously reported 4 (see Fig. 1  are now exponentially distributed and arise from a homogenous point process with unit rate. Next, we followed the exact steps outlined in section 2.2 of the original time-rescaling paper 5 . Briefly the rescaled ISIs (  Fig. 1b and Supplementary Fig. 1b) we performed a more stringent two-way KS test between our transformed ISIs and the uniform distribution (99% confidence, α = 0.01). As an illustration of the method and for the sake of comparison, simulated realizations from a Poisson process (three seconds, the same duration as our in vivo recordings for v = 2 cm/s) were included (Fig. 1b, Supplementary Fig. 1b): in this case, the null hypothesis that spiking was Poisson could not be rejected. This is an important demonstration, since we are analyzing spiking over small intervals of time (on the order of a few seconds) and thus need to ensure that rejection of the null hypothesis obtained for baseline, looming and receding is not related to an under-sampling of the spiking process (previous studies 4, 5 used very long recording samples).

ISI serial correlation and renewal spiking
The rescaled ISIs further permitted us to examine potential intrinsic temporal correlations To circumnavigate this experimental difficulty, we average the ISIs obtained in many repeated trials as a function of distance, which is the population averaged instantaneous firing rate. In neural spike train analysis, the hazard function for a neuron becomes its theoretical instantaneous firing rate for infinitesimally small intervals 6 . Note that over very small time windows ( t  ), the change in position of the stimulus is negligible, and the spiking statistics can be considered stationary with respect to stimulus-induced effects. In other words the timescales associated with spike generation far exceed those of our motion stimuli. This approximation of the hazard rate provides us with a simple and direct connection to our in vivo experiments.
After rate-rescaling the ISIs to remove the stimulus-induced correlations, ON and OFF cell spiking can be characterized as a renewal process, that is, the discharge probability depends only on the current stimulus value and the timing of the last spike ( 1 i t  ; Fig. 1c and Supplementary Fig. 1c)

Supplementary Note 3 A simple threshold for burst fraction demarcates the focal point
Bursts are often referred to as "informative" without precise meaning; here we explore their direct contribution to stimulus estimation. Both looming and receding motion are marked by prominent burst spiking, which is noted to occur in the near vicinity of our theoretically identified F I maximum (Fig. 1a). Thus, we sought to better pinpoint the onset of bursting relative to the focal point, and further test the idea that a downstream decoder could establish a focal point based on a simple bursting criteria.
According to previous work 8  value that was compatible with our theoretical predictions for 1-4 cm/s (shown in Supplementary   Fig. 2), described below.

Burst fraction
In order to determine when bursting became significantly activated, individual spike trains were separated into tonic (ISI > 10 ms) or burst (3 < ISI < 10 ms) spikes 9 . Burst fraction is computed as the number of burst spikes, divided by the total number of combined tonic and burst spikes. In previous work, BF was either determined in the absence of a stimulus or during presentation of stationary signals (e.g. sinusoidal EOD amplitude modulations), and thus the proportion of burst spikes was determined over the entire duration of a recording (on the order of seconds to minutes); for obvious reasons (see Fig. 3b) we refer to this as the asymptotic BF. The estimates of our population asymptotic BF were determined from entire baseline recordings for each cell ( T  = 60-120 s) and yielded a mean and standard deviation of 0.15 +/-0.11 for ON cells and 0.22 +/-0.12 for OFF cells, consistent with in vitro measurements for the centrolateral map of the ELL 10 and reflecting a good representative sample of ELL pyramidal cells.
For non-stationary ON/OFF cell responses to motion, we are dealing with a BF conditioned on a time-dependent stimulus; therefore we must count spikes within small intervals of distance ( x  ). For our different experimental conditions, this resulted in different time windows (each one calculated as where v is object velocity). Figure 3b shows that the estimated baseline BF changes as a function of the time window. Not surprisingly, as 0 T  the chance of observing a burst event (i.e. multiple spikes) becomes very unlikely and the BF rapidly becomes underestimated compared to the asymptotic estimates. Therefore, when choosing a spatial interval, there is a trade-off to consider. A small x  gives great spatial resolution but moves T  into a range that grossly underestimates the BF. The other extreme is a large T  , such that even for the 4 cm/s looming stimulus the estimated BF is somewhat near its asymptotic value (Fig. 3b). This results in poor spatial resolution and quickly begins to defeat the purpose of our analysisprecisely determining the location of an FI maxiumum. whereas shorter intervals of 1 and 1.5 mm were less reliable. However, when in agreement with the theory, these shorter spatial intervals were useful as they allowed us to compute the intersection of the different x  and obtain improved spatial resolution for the identification of the focal point.
Note that 2 x  mm is a reasonable spatial resolution given the standard deviation for the position of optimal behavioral performance (1.7 mm; Fig. 2b  The burst fraction plots for the different stimulus conditions are presented in Figs. 3c and 4b. Note that the 24 th BF interval spans from 1.25 to 1.45 cm along the distance axis. We found that the 24 th interval is consistently just shy of the threshold and that from the 25 th interval onward, there are substantial, speed-dependent increases in the BF. From the figures it is clear that bursting activity is increasing and is detectable in the 24 th interval, but clearly the majority of the population has not fully transitioned to the burst state (Fig. 4c). Based on our improved Fisher information criterion, this is where we find * x , indicating that optimal estimation is achieved if the animal can maintain a distance near the location of a bifurcation to bursting in the population, where approximately half the units have transitioned to bursting (Fig. 4c).
Our simple burst criterion is used as a means of assessing the relationship between bursting and optimal stimulus estimation, in addition to extending our analysis to stimulus conditions that cause significantly weaker firing rates (slower speeds or smaller spheres), where the theoretical analysis becomes less practical. This BF threshold of 0.3 was chosen based on our particular sample of the ON/OFF cell population under study and the choice of the burst fraction interval. In reality, we expect that downstream synapses in the midbrain are adapted to baseline burst statistics for a given decoding timescale ( t  ) and that, unlike the hard-threshold used in our analysis, a soft dynamic threshold is more likely utilized in freely swimming fish. In addition to BF, encoding BF slope is also likely important. Stimulus intensity could be encoded as relative changes in BF, where the tonic and burst spikes are extracted by facilitating and depressing synaptic dynamics 11,12 . However, these speculative ideas will require extensive further study and are beyond the scope of this paper.