A Readout Mechanism for Latency Codes

Response latency has been suggested as a possible source of information in the central nervous system when fast decisions are required. The accuracy of latency codes was studied in the past using a simplified readout algorithm termed the temporal-winner-take-all (tWTA). The tWTA is a competitive readout algorithm in which populations of neurons with a similar decision preference compete, and the algorithm selects according to the preference of the population that reaches the decision threshold first. It has been shown that this algorithm can account for accurate decisions among a small number of alternatives during short biologically relevant time periods. However, one of the major points of criticism of latency codes has been that it is unclear how can such a readout be implemented by the central nervous system. Here we show that the solution to this long standing puzzle may be rather simple. We suggest a mechanism that is based on reciprocal inhibition architecture, similar to that of the conventional winner-take-all, and show that under a wide range of parameters this mechanism is sufficient to implement the tWTA algorithm. This is done by first analyzing a rate toy model, and demonstrating its ability to discriminate short latency differences between its inputs. We then study the sensitivity of this mechanism to fine-tuning of its initial conditions, and show that it is robust to wide range of noise levels in the initial conditions. These results are then generalized to a Hodgkin-Huxley type of neuron model, using numerical simulations. Latency codes have been criticized for requiring a reliable stimulus-onset detection mechanism as a reference for measuring latency. Here we show that this frequent assumption does not hold, and that, an additional onset estimator is not needed to trigger this simple tWTA mechanism.

The accuracy of latency codes has been investigated using the framework of a simple latency based competitive readout, the "temporal-winner-take-all" (tWTA), in a modeling study (Shamir, 2009) and more recently in the auditory (Zohar et al., 2011) and the visual systems (Shriki et al., 2012). The tWTA estimates the stimulus on the basis of the preferred stimulus of the neuron (or population) that fired first (or reached a certain decision threshold). The utility of the tWTA is that it is sufficiently simple and well-defined to enable analytical investigation of readout speed and accuracy. It was shown that the tWTA can account for fast and accurate discrimination between a small number of alternatives. However, it remains unclear how the central nervous system implements such a readout, if at all. This raises crucial questions as to the utility of latency coding in the brain.
The conventional rate winner-take-all (WTA) readout that estimates the stimulus based on the preferred stimulus of the neuron that fired the most spikes (rather than the first as in tWTA) has been widely used and studied in neuroscience (Fukai and Tanaka, 1997;White et al., 1998;Jin and Seung, 2002;Laing and Chow, 2002). There is a general consensus that the computation of the WTA decision is based on reciprocal inhibition between groups of neurons with similar preferences.
Here we show that the basic WTA architecture is also sensitive to the temporal order of its inputs such that it is able to implement the tWTA readout. This paper is organized as follows. First we define the basic reciprocal inhibition architecture of the tWTA mechanism and analyze the system using the framework of a rate toy model to facilitate the analytical investigation. Then, we study the generalization of our analysis to a model of spiking neurons in a numerical study of conductance-based neurons. Finally, we discuss the issue of estimating the stimulus onset time and the implications of the findings.

Spiking Neurons Model
In the numerical simulations of spiking neurons we used the following conductance-based model with typical parameters taken from Shriki et al. (2003) and Shamir et al. (2009).
where I leak i , I net i , I ext i , I active i denote the leak, reciprocal inhibition, upstream input and active currents, respectively, and C = 1 µF/cm 2 is the membrane capacitance. The currents obey The parameters E L , E s , E Na , E K denote the reversal potentials of the ionic currents in m V and are −65, −80, 55, −80 , respectively. Conductance is given in units of ms/cm 2 , and g L , g Na , g K , g A are 0.05, 100, 40, 20 , respectively. The value of g S is discussed below. The variables s ij , m, h, n, a, b obey the following dynamics; Time constants are measured in ms, and τ b , τ D , τ R are 20, 10, 0.5 , respectively, and τ is the input current to neuron i in population x ∈ {1, 2} from the upstream population, where is the Heaviside step function, T is an absolute delay in the response and τ x is stimulus selective delay (see A with τ i = 0 at the preferred stimulus, and τ i = τ ). The input current contained two sources of noise. One was a random jitter in the input latency to each neuron, denoted by δ x,i , that were taken to be i.i.d. Gaussian random variables with zero mean and standard deviation , δ x,i ∼ N(0, 2 ). The second source was an additive Gaussian white noise term, ξ x,i (t), that was drawn i.i.d with ξ (t) ∼ N(0, 2 ). In the numerical simulations we took r = 5 mA/cm 2 , and the white noise, ξ x,i (t), was binned at 1 ms time intervals with = 5 mA/cm 2 .

RESULTS
We first studied the tWTA readout mechanism using the framework two-alternative forced choice discrimination in a rate model. The readout mechanism receives two inputs, I 1 and I 2 . These inputs represent the activities of two upstream populations of neurons responding to an external stimulus, each of which is characterized by its own preferred stimulus. For example, I 1 can be thought of as the response of a population of inferior colliculus auditory neurons with a preferred sound source azimuth to the right of the animal, whereas I 2 is the response to the left. The response latency of the two inputs is assumed to be tuned to the external stimulus. The task of the readout mechanism is to infer the stimulus based on the inputs it receives. For purposes of studying the ability of the readout to select according to the latency of its inputs, we further assume that both inputs have the same strength; however, the input corresponding to the "correct choice" responds faster in some sense. Specifically, we modeled the inputs as a step function, I i (t) = (t − T − τ i ), where is the Heaviside step function, T is an absolute delay in the response and τ i is the stimulus selective delay (latency tuning: τ i = 0 at the preferred stimulus, and τ i = τ > 0 otherwise); Figure 1A.
Our tWTA mechanism is based on reciprocal inhibition between the two populations, Figure 1B. Denoting by r i the mean firing rate of neurons in the ith population (i = 1, 2), the neuronal dynamics in our model obeẏ (1) where J is the strength of the reciprocal inhibition, and g(x) is typically modeled by a sigmoidal function. Here, for simplicity of the analysis, we used a threshold-linear function, g(x) = x for x > 0 and g(x) = 0 otherwise.We now consider the dynamics in the case where the stimulus is the preferred stimulus of population 1, During the stimulus selective response period of the upstream input, T < t < T + τ , the single fixed point shifts to a state in which population 1 outrivals population 2 (in the case of input in the preferred stimulus of population 1, as in the example in Figure 1). (C) After the stimulus selective response, T + τ < t, both inputs to the competing populations are the same. The system has two stable fixed points corresponding to the states in which one population outrivals the other and fully suppresses it. The identity line (solid black) is the borderline between the basins of attraction of the two fixed points. The pink lines show the borderlines between the regions of the phase plane in which the initial conditions will result in a correct decision (below the line) and an incorrect decision (above) for different values of τ = 0.2, 0.4, 0.6, and 0.8; that is, the initial conditions that lead to r 2 (T + τ ) = r 1 (T + τ ).
consequently population 1 receives the "faster" input. During the absolute delay period (i.e., from stimulus onset at time t = 0 to time T, see Figure 1A) the downstream populations have yet to respond to the stimulus, I 1 = I 2 = 0. In this case, the system is governed by a single stable fixed point at the origin, r 1 = r 2 = 0, to which the system converges exponentially; Figure 2A. For the duration of the stimulus selective response, t ∈ [T, T + τ ] the single fixed point changes to (1, 0) in which population 1 "outrivals" population 2, in this case; Figure 2B. This fixed point will serve as an attractor and the system will be drawn toward it. At longer times, t > (T + τ ), both populations receive the same level of input from the upstream population. If the reciprocal inhibition is weak, J < 1, no population can outrival the other and the system will converge to a symmetric fixed point in which r 1 = r 2 . On the other hand, for sufficiently strong inhibition, J > 1, the system has two stable fixed points in which one FIGURE 3 | The probability of correct discrimination is shown as a function of the stimulus selective delay, τ , for different initial conditions of noise levels, σ (different colors). The solid lines depict the analytical approximation of Equation (3). The squares show the numerical estimation obtained by averaging the results of the simulation decision over 10 4 repetitions. The inset shows the "signal", τ , required to obtain a specific level of performance, P C , as a function of noise level, σ . Here we used J = 1.1.
population outrivals the other, Figure 2C. Due to symmetry, the basin of attraction of the two fixed points is separated by the identity line, r 1 = r 2 .
In the absence of noise, the initial conditions are expected to be at the origin. Consequently, any amount of stimulus selective delay, τ > 0, will tip the system into the correct basin of attraction. Thus, this trivial architecture produces infinite sensitivity to response latency, in the sense that it achieves correct discrimination for every positive τ .
This hypersensitivity results from bi-stable dynamics where the initial conditions are exactly on the borderline between the basins of attraction of both fixed points. However, neural activity is inherently stochastic and it is unreasonable to assume the WTA type competition will start from such fine-tuned initial conditions. To study the robustness of this readout mechanism we added noise to the initial conditions and investigated the dependence of the tWTA accuracy on the noise level. Thus, instead of starting the WTA competition exactly at the origin, r 1 = r 2 = 0, we now assume that prior to the stimulus selective response period the activity of both populations fluctuates such that the WTA dynamics starts from a "cloud" of distribution close to the origin. Specifically, for the sake of analytical simplicity, we assume the initial conditions r 1 (T) and r 2 (T) to be independent and identically distributed exponential random variables with a standard deviation σ, at the onset of the tWTA competition at the beginning of the stimulus selective response, time t = T. Assuming further that the noise level is small relative to1/J, one obtains that for t + T ∈ [T, T + τ ] where we have assumed without loss of generality that stimulus 1 was presented first. During the stimulus selective response the dynamics attracts the system toward the "correct" fixed point, "outrival 1" in this case. An incorrect decision will occurs when the system is at the basin of attraction of "outrival 2" at the end of the stimulus selective period, namely r 2 (T+τ ) > r 1 (T+τ ), which is translated to r 2 (T) > ar 1 (T) + b, where a = 1/(1 + Jτ ), and b = (e τ −1)/(1+Jτ ); see pink lines in Figure 2C. Averaging over the distribution of the initial conditions yields the probability of a correct discrimination, Pc, in this approximation Figure 3 shows the probability of correct discrimination as a function of τ for different noise levels in the initial conditions, σ, in different colors. The solid lines show the analytical approximation of Equation (3), and the squares depict the numerical estimation of P C . Note that according to Equations (1) and (2), τ is measured in units of the neuronal rate dynamics, which are typically in the range of about 10 ms. In the absence of noise (blue line), the readout mechanism discriminates correctly, P C = 1, for any positive τ . As the noise level increases, the probability of a correct discrimination deteriorates for any given τ , and higher values of τ are required to obtain the same level of accuracy. Thus, the neural noise sets the scale of the sensitivity that this readout mechanism can achieve. In other words, for larger noise levels the signal, τ , has to be scaled up to achieve the same level of performance; Figure 3 inset. Note that the accuracy of the tWTA readout has already been addressed in the past, (Shamir, 2009;Zohar et al., 2011;Shriki et al., 2012).
Here we focus on the dynamical system that can implement this computation. However, the parameter σ does not reflect noise in the input that limits the information in it, but rather an inherent variability of the readout mechanism itself that limits its sensitivity. Rate models describe neural activity by a continuous parameter, and as a result can react immediately to changes in their input. Real spiking neurons have an inherent delay before emitting a spike, and even then their response is sparse in time. This makes it crucial to test the generalization of our results beyond the threshold-linear rate model to a model of spiking neurons. For this purpose, we simulated a tWTA readout mechanism based on competition by reciprocal inhibition between two populations of N Hodgkin-Huxley neurons. This was facilitated by the mapping between rate and conductancebased models (Shriki et al., 2003). The dynamic equation for the membrane potential of neuron i in population a ∈ {1, 2} is as follows where g L and E L are the leak conductance and reversal potential, C is the membrane capacitance, and I active a,i is the voltage dependent current I active a,i = I Na + I K + I A . The term I net a,i denotes the reciprocal inhibition from the competing population. Unless otherwise stated, the parameters of the model follow (Shriki et al., 2003); see Methods. The term I ext a,i denotes the input to cell i in population a ∈ {1, 2} from the input layer that is latencytuned to the stimulus. In our simulations, I ext a,i is the input current from the upstream population to neuron i in population a, and is modeled by I ext a,i (t) = r t − [T + τ a + δ a,i ] + ξ a,i (t), where r is the strength of the response of the upstream population to the stimulus, ξ a,i (t) is a stimulus-independent white noise of the upstream population, T and τ a are the absolute and stimulus selective delays, respectively, and δ a,i represents the trial-to-trial variability in the delay of the input to the neuron. We modeled δ a,i by i.i.d. Gaussian random variables with zero mean and a standard deviation . The term I net denotes currents resulting from the lateral connection. Specifically, in this case I net is the reciprocal inhibition, and its strength is governed by the synaptic strength g s (see Methods for more details).
As we are interested in a WTA-type competitive readout mechanism, the reciprocal inhibition must be sufficiently strong to enable a bi-stable regime in which one population can outrival the other and fully suppress its activity. For this reason, we need to set the total maximum conductance of population internetwork (inhibitory) connection to a level that causes the network to be in a winner-take-all state (just over 0.7 µF/cm 2 ). Figure 4 shows the result of a competition between the two populations of the readout mechanism during a single trial with: T = 20 ms, τ 1 = 0 ms, τ 2 = 1 ms (T + τ shown by the dashed lines), and = 5 ms. The blue plus signs ("+") denote the specific onset time of the input to each cell within this trial, T + τ a + δ a,i . The neurons in each group are arranged in the Figure according the latency of their input (early to late from bottom to top). Note that the mean latency difference between the inputs to the two populations was τ ≡ τ 2 − τ 1 = 1 ms, whereas within each group input latency varied with a much greater standard deviation of 5 ms. Given the considerable variability in the input times to single cells, some neurons in population 2 fired up to three spikes in response to the stimulus. Nevertheless, within several tens of milliseconds the reciprocal inhibition dynamics converged to a state in which population 1 fired with a high rate and the activity of population 2 was fully suppressed (Figure 4). Thus, even though in their steady state both populations received the same input level, this relatively small mean latency difference was sufficient to enable the reciprocal inhibition mechanism to "choose" the correct group in this specific example. The population firing rate for population 1 (green) and population 2 (blue). The rate was estimated by the total spike count in a sliding window of a 10 ms time bin. Horizontal black line shows the decision threshold of 3.5 spikes/ms used to generate C. (C) The decision of the tWTA network. In the simulations we used τ = 0 ms for the preferred stimulus, τ = 5 ms to the un-preferred, and g L = 1.1 mS/cm 2 .
To evaluate the extent to which the result in Figure 4 is typical, we estimated numerically the probability of correct discrimination. To do so, we first needed to define an objective criterion for a "correct" response by the system. In our simulations we chose the winner in the WTA competition to be the population that fired more spikes during the time interval of 50 ms ≤ t ≤ 100 ms. Other choices yielded qualitatively similar results. Figure 5A shows the probability of the Hodgkin-Huxley type model to discriminate correctly between the two alternatives as function of the mean input latency difference between the two populations, τ ≡ τ 2 − τ 1 , for different levels of within-group onset variation (shown by the different colors). The solid lines are the analytical approximation of Equation (3) with J = 2 and fitted values of σ (note that time in Equation (3) is measured in units of τ m = g L /C). As can be seen from the figure, even small mean latency differences of less than τ ≈ 1 ms can be detected with a high reliability by this simple mechanism. Note, that it is expected that in the limit of large input population sizes the results of the rate model will hold, and in particular Equation (3). FIGURE 7 | The tWTA onset detection accuracy. The stimulus detection ROC is presented, depicting hit probability (correct detection) as function of false alarm. Here, onset detection corresponds to a "detection" of a stimulus during the absolute delay period, 0 < t < T. Consequently, false alarm may scale with the absolute delay period, T. Moreover, a false alarm may be flagged in the absence of stimuli due to spontaneous firing of the neurons. Thus, a more relevant characterization of false alarm for stimulus onset detection task would be the false alarm rate during spontaneous activity. The inset shows average decision time and STD for different criterions (dots and bars, respectively) and the probability of having at least one false alarm during 1 s of spontaneous activity as a function of the detection threshold (asterisk). The parameters used for the simulation are the same as the parameters in Figure 6. Figure 5B shows the probability of the spiking neurons model to discriminate correctly between the two alternatives as function of the mean input latency difference, τ ≡ τ 2 − τ 1 , for different sizes of input populations (shown by different colors). As can be seen from the figure, even though discrimination accuracy deteriorates with the decrease in population size, this simple readout mechanism is still able to extract information from the neuronal response latencies. Furthermore, fitting the analytical approximation of Equation (3) (solid lines), we find that the parameter that reflects the noise in the input population in the rate model, σ, decays to zero as one over the square root of the input population size, Figure 5C. Hence, one may attribute the deterioration in discrimination accuracy to a decrease in signal-to-noise ratio in the responses of the input populations for smaller population sizes.

DISCUSSION
Previous studies of the WTA algorithm have focused on the conventional rate-WTA decision mechanism. However, a number of studies reported that the WTA is also sensitive to the temporal structure of its inputs (Coultrip et al., 1992;Lee et al., 1999;Jin and Seung, 2002;Sheliga et al., 2006;Standage et al., 2005;Kurt et al., 2008). Here we focused on the ability of a dynamical system to implement a specific latency-based decision FIGURE 8 | Typical example of tWTA competition between two populations of 50 neurons during a single trial in which a series of five alternating stimuli were presented every 60 ms. Thus, for the first presentation T = 20 ms, for the second T = 80 ms, and so on. Each stimulus lasted T = 50 ms. During the odd presentations (first, third, fifth…) population 1 received the faster input whereas in the even presentations population 2. (A) Population raster plot. Each row shows the spike times of a single neuron (black dots). Bottom half shows neurons from population 1, and upper half population 2. The open circles depict the specific input latency times for each neuron (T + τ a + δ a,i ) in different colors for the different presentations. The thick horizontal lines show the mean times in which each population received input; i.e., from time T + τ a to time T + T + τ a . (B) The population firing rate for population 1 (green) and population 2 (blue). The rate was estimated by the total spike count in a sliding window of a 10 ms time bin. Horizontal black line shows the decision threshold of 3.5 spikes/ms used to generate C. (C) The decision of the tWTA network. In this simulations we used τ = 0 ms for the preferred stimulus, τ = 5 ms to the non-preferred stimulus, and g L = 1.1 mS/cm 2 . mechanism; namely, the tWTA readout. We found that the simple reciprocal inhibition architecture of the WTA mechanism is sufficient to implement the tWTA. To implement the tWTA we assumed that the system was in the "strong inhibition" regime (J > 1), such that it was bi-stable when the inputs to the two competing population were similar. This condition was needed, as we assumed that the input strength to both populations was similar and that response latency alone depended on the stimulus. However, in many cases neurons tend to respond with a higher firing rate to the same stimuli to which they respond with a shorter latency (Zohar et al., 2011;Shriki et al., 2012). In these cases the assumption of "strong inhibition" can be relaxed.
The robustness of the reciprocal inhibition mechanism for latency coding was tested against noise in the initial conditions. Additional parameters that govern the tWTA dynamics may also vary. In particular, we assumed that the reciprocal inhibition between the two populations is identical. This assumption contributed to the symmetry that is underlying the infinite sensitivity of the tWTA mechanism in the absence of noise. How will asymmetry in the reciprocal inhibition affect the tWTA? Assume, for example that the effective inhibition from population 2 to 1, J 1←2 , is stronger than from population 1 to 2, J 2←1 . We find that as long the system is in the strong inhibition regime, i.e., J 2←1 , J 1←2 > 1, then for sufficiently large τ the system will converge to the correct fixed point (in the absence of noise). However, for any positive difference, (J 2←1 − J 1←2 ) > 0, there exists a critical value τ c , such that for any τ < τ c (here positive τ denotes input to population 1 preceding input to population 2) population 2 will win the tWTA competition. The critical value τ c decays to zero as the system approaches symmetry, (J 2←1 − J 1←2 ) → 0. Consequently, an additional "learning mechanism" that can fine-tune the reciprocal inhibition is required if high sensitivity for very short latencies is necessary. Note that the parameter J reflects the effective inhibition strength that is a product of the strength of a single synapse by the number of synapses.
It has been argued that latency code readouts require an additional stimulus onset detector which serves as a reference from which latency can be measured. A number of studies have reported that onset can be detected by pooling information from neurons that show poor latency tuning (Zohar et al., 2011;Brasselet et al., 2012;Shriki et al., 2012). Here we suggest that such an additional mechanism is not essential. Figure 6A shows the spiking response of the tWTA network to a series of stimuli. In the first, third and fifth presentations the mean latency of the inputs to population 1 was shorter, whereas in the second and fourth presentations population 2 received the fastest input (on average). By examining the population firing rate in Figure 6B, stimulus1, stimulus 2, and no stimulus can easily be discriminated, by adding a decision threshold (black horizontal line in Figure 6B). Setting a reasonable value for the decision threshold results in correct detection and discrimination for all 5 presentations without the use of an additional neural population or detectors; Figure 6C. Figure 7 quantifies the tradeoff between generating false alarms at a high rate by setting the decision threshold too low, and failing to detect the stimulus by setting the threshold too high. The considerable difference between the spontaneous firing rate and the firing rate in response to the stimulus allows for a high detection probability and a negligible false alarm rate, as shown by the sharp ROC curve. However, decision threshold also affects the speed of the response and the probability of false alarm during spontaneous activity; Figure 7 inset.
The tWTA mechanism does not operate like a working memory but rather more like a sensory system. Thus, in the example in Figure 6 the neural activity decays to a spontaneous firing rate after each stimulus offset. However, this decay is not instantaneous. Therefore, if the inter-stimulus-interval is very brief, the tWTA decision may be affected by its past. This scenario is illustrated in Figure 8, in which due to the short inter-stimulus-interval the tWTA decision is dictated by the preceding decision rather than by the stimulus itself. This is a hallmark of tWTA competition which may serve as an empirical prediction both on the psychophysical as well as the neural level. In this respect the well-studied psycho-acoustical phenomenon termed the precedence effect (Litovsky et al., 1999) may have some bearing. In the precedence effect, when estimating sound source location, the perception of the delayed stimulus is suppressed. This is believed to assist in overcoming the corrupting effects of echoes in the computation of the sound source location.
Conventional rate-WTA mechanisms have been suggested to play an important role in various computations in the brain and in numerous systems (Lee et al., 1999;Standage et al., 2005;Sheliga et al., 2006Sheliga et al., , 2007Kurt et al., 2008). Their implementation only requires a very rudimentary reciprocal inhibition design. Nevertheless, even this simple architecture yields a mechanism that is intrinsically sensitive to the response latency of its inputs. Consequently, by construction, almost every conventional WTA mechanism is highly sensitive to latency cues as well. This highlights the possible role of latency as a source of information in the central nervous system.

AUTHOR CONTRIBUTIONS
OZ, MS: Methodological, analysis, and interpretation of results.

FUNDING
This work was supported in part by Israel Science Foundation ISF grants No 722/10 and 300/16, and by the Helmsley Charitable Trust through the Agricultural, Biological and Cognitive Robotics Initiative of Ben-Gurion University of the Negev.