{'fraction_non_alphanumeric': 0.030385838482279964, 'fraction_numerical': 0.015670531903316687, 'mean_word_length': 5.155403393867222, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Trading Speed and Accuracy by Coding Time: A Coupled-circuit Cortical Model

Our actions take place in space and time, but despite the role of time in decision theory and the growing acknowledgement that the encoding of time is crucial to behaviour, few studies have considered the interactions between neural codes for objects in space and for elapsed time during perceptual decisions. The speed-accuracy trade-off (SAT) provides a window into spatiotemporal interactions. Our hypothesis is that temporal coding determines the rate at which spatial evidence is integrated, controlling the SAT by gain modulation. Here, we propose that local cortical circuits are inherently suited to the relevant spatial and temporal coding. In simulations of an interval estimation task, we use a generic local-circuit model to encode time by ‘climbing’ activity, seen in cortex during tasks with a timing requirement. The model is a network of simulated pyramidal cells and inhibitory interneurons, connected by conductance synapses. A simple learning rule enables the network to quickly produce new interval estimates, which show signature characteristics of estimates by experimental subjects. Analysis of network dynamics formally characterizes this generic, local-circuit timing mechanism. In simulations of a perceptual decision task, we couple two such networks. Network function is determined only by spatial selectivity and NMDA receptor conductance strength; all other parameters are identical. To trade speed and accuracy, the timing network simply learns longer or shorter intervals, driving the rate of downstream decision processing by spatially non-selective input, an established form of gain modulation. Like the timing network's interval estimates, decision times show signature characteristics of those by experimental subjects. Overall, we propose, demonstrate and analyse a generic mechanism for timing, a generic mechanism for modulation of decision processing by temporal codes, and we make predictions for experimental verification.


Introduction
It is likely that the cerebral cortex evolved to provide a model of the world, serving decisions for action. Our actions take place in space and time and both of these dimensions are considered in the dominant hypothesis of decision making, where noisy spatial evidence is averaged over time (see [1][2][3]). The longer we spend averaging, the more accurate our decisions [4]. A trade-off between speed and accuracy is implicit in this framework and is a hallmark of decision tasks [5], but the mechanism by which we determine how long to spend averaging is an open question [6]. In recent years, there has been increasing acknowledgement that the encoding of time may be as crucial to behaviour as the encoding of space [7] and several studies have considered roles for temporal codes in decision making [8][9][10][11]. Under this approach, time is not a passive medium for spatial averaging, but is actively encoded during decisions, determining the rate at which they unfold. Accordingly, the speed-accuracy trade-off (SAT) can be controlled by the estimation of temporal intervals, determining how long spatial evidence is integrated [11].
Our ability to represent time covers at least twelve orders of magnitude, from the scale of microseconds to circadian rhythms, and different neural mechanisms are believed to support representations of vastly different temporal duration [12,13]. Here, we focus on the hundreds of milliseconds range, the relevant order for the most well studied perceptual decision tasks [1,3,14]. Two fundamental questions in the study of temporal processing are whether the representation of time is centralized or distributed [15,16], and whether the circuitry involved is specialized or generic [17,18]. In this paper, we propose that local-circuit cortical processing is inherently suited to the representation of space and time on this order, supporting a distributed, generic processing framework. To this end, we demonstrate that a generic biophysical model of a local cortical circuit can estimate time in the hundreds of milliseconds range, where 'climbing' activity resembles that seen in cortex during tasks with a timing requirement and estimates of temporal intervals show signature characteristics of temporal estimates by experimental subjects. The network estimates different intervals by the scaling of a single term controlling local-circuit dynamics by the strength of NMDA receptor (NMDAR) conductance. Analysis of network dynamics formally characterizes this timing mechanism and a simple learning rule is sufficient for the network to quickly learn the intervals.
In simulations of a decision task, we couple two such generic networks with identical parameters except for the NMDAR scale factor. One network encodes elapsed time relative to a learned interval. The other decides which of two stimuli has more evidence. As climbing activity evolves in the timing network, it governs the rate of downstream decision processing by gain modulation. To trade speed and accuracy, the timing network simply imposes different temporal constraints on the decision network. The model's activity and behaviour are consistent with a large body of electrophysiological and behavioural data from timing and decision tasks, as well as the hypothesis that cortical circuitry is canonical (see [19]). In our opinion, these results should be expected of a generally uniform structure that evolved to provide a model for action in a spatiotemporal world.

Methods
To address the hypotheses that generic local-circuit processing is sufficient to support timing in the hundreds of milliseconds range (see [17,18]) and that these temporal codes control the speed and accuracy of decisions [11], we simulated each of two local cortical circuits with a spiking-neuron implementation [20][21][22][23][24][25][26] of a model widely used in population and firing rate simulations of cortical circuits [27][28][29]. This class of model assumes a columnar structure, where a spatial continuum of bellshaped population codes (bumps) is supported by net excitation between adjacent columns and net inhibition between distal columns. To emphasize the robustness of the principles underlying our hypotheses, the only differences between the two networks were their stimulus-selectivity and the strength of NMDAR conductance. The scaling of NMDAR conductance is an established mechanism for controlling intrinsic dynamics in these and related models [21,26,30,31] and a potential biological correlate is provided in the Discussion, but our hypothesis does not require this specific mechanism, e.g. scaling the strength of feedback inhibition is another approach. As described below, the timing network had stronger NMDAR conductance, but only the decision network was selective for stimuli. These differences were sufficient to determine each network's function as a timer or decision maker.
In simulations of an interval estimation task, the timing network received noisy current injection, simulating synaptic bombardment from upstream cortical regions, but did not receive any spatiallyselective input. Strong NMDAR conductance at intrinsic synapses enabled a local sub-population of the network to undergo 'climbing' activity (activity buildup) and the time at which this activity reached a fixed threshold was the network's estimate of a given interval (see [32]). Only the timing network was used in this task.
In coupled-circuit simulations of a decision task, both networks received noisy current injection, but the decision network received two noisy, spatially-selective inputs and its task was to decide which was stronger. It also received spatially non-selective input from the timing network, i.e. every neuron in the timing network projected uniformly to every neuron in the decision network. Spatially non-selective input to recurrent networks is an established form of gain modulation [33], where the magnitude of a selective neural response is modulated by a second source of input (see [34,35] and Figure 1C). Temporal constraints encoded by climbing activity upstream thereby modulated the rate of downstream decision processing. Note that we use the terms climbing activity and ascending activity interchangeably, and we use the term ramping to refer to ascending or descending activity (see the Discussion).

The network model
The local circuit model is a fully recurrent network of leaky integrate-and-fire neurons [36], comprised of N p~1 000 simulated pyramidal neurons and N i~2 50 fast-spiking inhibitory interneurons. For pyramidal-to-pyramidal synapses, W is a Gaussian function of the distance between neurons arranged in a ring. The weight W i,j between any two pyramidal neurons i and j is therefore given by where d~min(Di{jDDx,2p{Di{jDDx) defines distance in the ring, Dx~2p=N p is a scale factor, and s~0:5, depicted on the right side of Figure 1A. The biological basis of W is the probability of lateral synaptic contact between pyramidal neurons, generally found to be monotonically decreasing over a distance of *0:5mm in layers 2/3 and 5 [37,38]. Width parameter s~0:5 therefore corresponds to approximately 0:25mm axially in cortical tissue, consistent with cortical tuning curves [39,40]. Like earlier authors (e.g. [21,24]), we do not attribute biological significance to the spatial periodicity of the network; rather, this arrangement allows the implementation of W with all-to-all connectivity without biases due to asymmetric lateral interactions between pyramidal neurons. Synaptic connectivity from pyramidal neurons to interneurons, from interneurons to pyramidal neurons, and from interneurons to interneurons is unstructured in the network, so for each of these cases, W i,j~1 for all i and j. Each model neuron is described by where C m is the membrane capacitance of the neuron, g L is the leakage conductance, V is the membrane potential, E L is the

Author Summary
Studies in neuroscience have characterized how the brain represents objects in space and how these objects are selected for detailed perceptual processing. The selection process entails a decision about which object is favoured by the available evidence over time. This period of time is typically in the range of hundreds of milliseconds and is widely believed to be crucial for decisions, allowing neurons to filter noise in the evidence. Despite the widespread belief that time plays this role in decisions and the growing recognition that the brain estimates elapsed time during perceptual tasks, few studies have considered how the encoding of time effects decision making. We propose that neurons encode time in this range by the same general mechanisms used to select objects for detailed processing, and that these temporal representations determine how long evidence is filtered.
To this end, we simulate a perceptual decision by coupling two instances of a neural network widely used to simulate localized regions of the cerebral cortex. One network encodes the passage of time and the other makes decisions based on noisy evidence. The former influences the performance of the latter, reproducing signature characteristics of temporal estimates and perceptual decisions.
equilibrium potential, and I is the total input current. When V reaches a threshold q v , it is reset to V res , after which it is unresponsive to its input for an absolute refractory period of t ref .
Excitatory currents from pyramidal neurons were mediated by AMPA receptor (AMPAR) and NMDAR conductances, and inhibitory currents from interneurons were mediated by GABA receptor (GABAR) conductances ( Figure 1B). The total input current to each neuron i is given by  where I rec AMPA,i , I rec NMDA,i and I rec GABA,i are the summed AMPAR, NMDAR and GABAR currents from intrinsic (recurrent) synapses, and I bg,i is background noise, described below. These intrinsic currents are defined by where G AMPA , G NMDA and G GABA are the respective strengths of AMPAR, NMDAR and GABAR conductance, V E~0 mV is the reversal potential for AMPARs and NMDARs and V I~{ 70mV is the reversal potential for GABARs [21]. AMPAR and GABAR activation (proportion of open channels) are described by where d is the Dirac delta function and t f is the time of firing of a pre-synaptic neuron. For NMDAR activation, g NMDA has a slower rise and decay and is described by where a NMDA~0 :5kHz controls the saturation of NMDAR channels at high pre-synaptic spike frequencies [21]. The slower opening of NMDAR channels is captured by where t v was set to 2ms [21]. The voltage-dependence of NMDARs is captured by g~1=½1zMg : exp({0:062 : V )= 3:57, where Mg~1mM describes the extracellular Magnesium concentration and V is measured in millivolts [41]. The scale factor c NMDA is described below. The time constants and conductance strengths of AMPAR, NMDAR and GABAR synapses onto cortical pyramidal neurons and inhibitory interneurons vary according to tissue preparation, recording method, species, cortical layer, and to some degree, cortical area within a species or layer. En masse, electrophysiological data provide reasonable guidelines for these parameters, but we emphasize that nothing in the model is fine tuned and our results hold for a broad range of parameters. For AMPAR-mediated currents, G AMPA~0 :125nS and t AMPA~4 ms at synapses onto pyramidal neurons, and G AMPA~0 :25nS and t AMPA~2 ms at synapses onto interneurons, producing fast-decaying monosynaptic AMPAR currents on the order of 10pA [42,43] that are stronger and faster onto inhibitory interneurons than pyramidal neurons [44][45][46]. For NMDAR-mediated currents, G NMDA~2 :5nS and t NMDA~5 0ms at synapses onto pyramidal neurons, and G NMDA~1 :25nS and t NMDA~2 5ms at synapses onto interneurons, producing slow-decaying monosynaptic NMDAR currents on the order of 10pA [42,47] that are stronger and slower at synapses onto pyramidal neurons than interneurons [46]. Our excitatory synaptic parameters thus emphasize fast inhibitory recruitment in response to slower excitation (see [48] for discussion). For GABARmediated currents, G GABA~2 :5nS and t GABA~1 0ms at synapses onto pyramidal neurons and G GABA~1 :25nS and t GABA~1 0ms at synapses onto interneurons [49,50], producing monosynaptic GABAR currents several times stronger than the above excitatory currents, where stronger conductance onto pyramidal cells was meant to reflect the greater prevalence of GABAR synapses onto pyramidal cells than interneurons [51]. See Figure 1B for exemplary synaptic currents in the model.
Background activity. For each neuron, current I bg simulates in vivo cortical background activity by the point-conductance model of [52]: where reversal potentials V e syn~0 mV and V i syn~{ 70mV are given the same values as those for excitatory and inhibitory synapses in Equation 4. The time-dependent excitatory and inhibitory conductances g e (t) and g i (t) are updated at each timestep Dt according to and where g 0 e and g 0 i are average conductances, t e and t i are time constants, U is normally distributed random noise with 0 mean and unit standard deviation. Amplitude coefficients A e and A i are defined by where D e~2 s 2 e =t e and D i~2 s 2 i =t i are noise 'diffusion' coefficients. See [52] for the derivation of these equations. We followed Table 1 of [52] for parameter values t e~5 ms, t i~7 :5ms, s e~5 nS and s i~7 :5nS for pyramidal neurons and interneurons and g 0 e~1 0 mS for pyramidal neurons. We gave nominal values to g 0 e for interneurons and to g 0 i for pyramidal neurons and interneurons, setting these conductances to 2:5 mS, i.e. the network's intrinsic connectivity was sufficient to mediate realistic levels of inhibitory background activity onto pyramidal neurons and excitatory and inhibitory background activity onto interneurons.

Population activity
In both simulated tasks, performance was determined by the mean activity of localized populations of neurons. Spike density functions (SDF, rounded to the nearest millisecond) were therefore built for these neurons by convolving their spike trains with a riseand-decay function where t is the time following stimulus onset and t r~1 ms and t d~2 0ms are the time constants of rise and decay respectively [53]. In the interval estimation task, it was necessary to first identify the relevant population (the bump population) before averaging its activity. To this end, we built SDFs for all pyramidal neurons in the network and the neuron with the highest mean SDF over the full trial was considered the centre of the bump. We included 80&s=Dx neurons on either side of this centre in the bump population. In the decision task, the centres of the response fields for the competing stimuli were pre-determined, so SDFs were constructed for these neurons, as well as the 80 neurons on either side. All simulations were run with timestep Dt~0:25ms and the standard implementation of Euler's forward method.
Reduction of the network to an integral and partial differential system To investigate the mechanism by which the timing network produced climbing activity, we simplified the network to an equivalent integral and partial differential system using a Wilson-Cowan type approach [27,54]. We then used methods for the study of non-linear dynamics and stochastic processes to analyse the reduced system.
Because pyramidal-to-pyramidal synaptic connectivity is structured and all synaptic connections with interneurons are unstructured, the firing rate of pyramidal neurons and interneurons can be modelled as where (as above) x denotes spatial location and W½I syn is the activation function with gain factor c p=i and noise factor g p=i . The synaptic current at pyramidal neurons at location x is I syn (x,t) and consists of AMPAR-, NMDAR-and GABAR-mediated synaptic currents and background current, i.e. I syn,p (x,t)~I rec AMPA (x,t)zI rec NMDA (x,t)zI rec GABA (x,t)z I bg (x,t). The first three of these currents can be approximated as where G r AMPA , G r NMDA and G r GABA describe the effective synaptic strength. Superscripts 'r' denote the correspondence of terms in the 'reduced' system with those in the timing network. The synaptic currents onto interneurons are similar. Synaptic activation is described by g r AMPA , g r NMDA and g r GABA , obeying the dynamics Because the NMDAR time constant is much longer than the respective time constants of AMPARs, GABARs and neuronal firing rates (Equations 13 and 14), these last three variables can be given their steady state values, while NMDAR activation dominates the dynamics of the system. Thus, the system can be described by By further linearizing the activation function of the interneurons r i (t)~W½I i (t)&aI i (t)zb, we obtain the integral and partial equation to approximate the timing network: The chosen parameters were s w~0 :5236 (30 0 ), C~1:282=1000, G z~1 :6, G {~0 :9, a~0:6, c p~3 20(VnC) {1 , I p~1 25Hz,  Parameter values for the probability density of first passage times, plotted in Figure 7. G r NMDA : NMDAR conductance strength; x 0 : initial state; x th : timing threshold in terms of NMDAR activation; l: largest positive eigenvalue. doi:10.1371/journal.pcbi.1003021.t001 g p~0 :16s, t NMDA~5 0ms, t AMPA~2 ms, G eie~6 :8, I back~0 :4. Scale factors a, G z and G { were used to tune the model to qualitatively reproduce the steady state firing rates in the timing network, while G eie abstracts over the unstructured interactions between pyramidal neurons and interneurons.

Results
We used the generic local-circuit model to simulate an interval estimation task, where intervals were estimated by the time that climbing activity crossed a fixed threshold. We coupled two instances of the local-circuit model to simulate a decision task, where the timing network governed the rate at which the decision network distinguished between two stimuli. As described above, the decision network was identical to the timing network, including all parameter values except for NMDAR conductance strength. Our results proceed as follows: (1) we show that climbing activity in the timing network is controlled by the strength of NMDAR conductance, encoding intervals by the time it takes to reach a fixed threshold. We explain the mechanism underlying this phenomenon by dynamic analysis of the reduced system. (2) We show that the interval estimates by the timing network conform to the scalar property of interval timing, a widely observed experimental phenomenon in which the standard deviation of interval estimates scales linearly with the mean [13,55]. We explain how the scalar property emerges from the timing network by deriving the probability density of first passage times of the timing threshold. (3) We show that a simple learning rule is sufficient for the timing network to learn to estimate different intervals in the hundreds of milliseconds range. (4) We demonstrate several biologically plausible mechanisms for starting and stopping interval estimates by the timing network, each of which qualitatively reproduces electrophysiological data from tasks with a timing requirement. (5) We demonstrate that the timing network controls the SAT in the downstream decision network, using a biologically plausible means of gain modulation. (6) We show that the resulting distribution of decision times reproduces signature characteristics of decision times by experimental subjects.

Interval estimates are controlled by NMDAR conductance strength in the timing network
We simulated an interval estimation task with the generic localcircuit model. Estimates of different intervals were produced by scaling the conductance strength of NMDARs by 0:675ƒc NMDA ƒ1:5, where different values of c NMDA supported different rates of buildup of activity by the bump population. On each trial, the time at which the mean SDF of the bump population reached a threshold of 20Hz was considered the interval estimate. Thus, like earlier authors (e.g. [56,57]), we assume that a behaviourally relevant ballistic process is initiated downstream when neural activity encoding the interval estimate reaches a certain firing rate. The task was simulated by running the network for 3:5s, sufficient time for a bump to develop for all of the above values of c NMDA on at least 95% of trials. This length of time may seem long for estimates in the hundreds of milliseconds range, but for longer interval estimates, it allowed for the growing variability of estimates with interval duration, commonly seen in interval estimates in experimental tasks (see Results section The scalar property of interval timing). For c NMDA v0:675, bumps did not consistently develop within the allotted time, and for those that did, spiking activity did not consistently reach 20Hz. For c NMDA ƒ0:6, background spiking was approximately 1Hz among pyramidal neurons and 4Hz among interneurons [58], but climbing activity was not supported by the network. An upper limit of c NMDA~1 :5 was used because it is consistent with the experimental enhancement of the NMDAR component of cortical excitatory post-synaptic currents by approximately 150% of baseline [59,60] and because interval estimates were increasingly indistinguishable above this value. 250 trials were run for each value of c NMDA .
Varying the scale factor c NMDA furnished a range of rates of buildup activity, where lower values of c NMDA lead to slower buildup and higher values lead to faster buildup. The lowest value of c NMDA that consistently supported buildup activity produced a mean interval estimate of 1:59s (c NMDA~0 :675). The highest value of c NMDA consistent with experimental enhancement of cortical EPSCs [59,60] produced a mean estimate of 209ms (c NMDA~1 :5). The timing network thus supported interval estimates from approximately 200ms to 1500ms, consistent with experimental evidence that temporal coding on this order is supported by a common mechanism [12,55]. Example trials for three values of c NMDA are shown in Figure 2. Note that the location of the bump differs on each trial, as there is no bias favouring a particular network location. We are unaware of any data to conclusively confirm or refute such trial-to-trial variability, but to produce climbing activity in the same sub-population from trial to trial, we simply need to strengthen excitatory synaptic conductances among a few localized neurons, e.g. by Hebbian long term potentiation among the neurons participating in the bump. In the coupled-circuit decision trials in Section Encoding time constraints for a decision, the location of climbing activity in the timing network does not matter because projections from the timing network to the decision network are spatially non-selective.
The mechanism underlying climbing activity in the timing network can be understood by non-linear analysis of the reduced integral and partial differential system. For a given value of the effective synaptic strength G r NMDA , corresponding to NMDAR conductance strength in the timing network, the steady states of the reduced system can be calculated by setting the right hand side of Equation 19 to zero and solving the resulting equations. Our analysis revealed three regimes of the reduced system. 1) Sufficiently small values of G r NMDA furnished a flat steady state which is stable and whose eigenvalues are negative. This regime corresponds to the common case in cortex, where background activity is stable and stimulus-selective activity decays to this background state after stimulus offset. This regime in the reduced system corresponds to approximately c NMDA v0:575 in the timing network. 2) With a moderate increase in G r NMDA , the system enters a bistable regime. The stable flat steady state is retained, but a small unstable bump steady state and a large stable bump steady state emerge. This bistable regime corresponds to the classic persistent storage regime in these networks (e.g. [21,26]), in which a stimulus can trigger a bump state, which persists after stimulus offset. This regime in the reduced system corresponds to approximately 0:575ƒc NMDA v0:65 in the timing network. 3) With a further increase in G r NMDA , the stable flat state and the unstable bump steady state coalesce into one unstable flat steady state whose largest eigenvalue is positive, while the stable bump state becomes higher. The magnitudes of the unstable flat steady state and the stable bump state increase with further increase to G r NMDA . This regime in the reduced system corresponds to approximately 0:65ƒc NMDA in the timing network. This third regime is shown in Figure 3, where panels A and B show NMDAR activation at the stable bump state and the unstable flat steady state respectively with increasing G r NMDA . Panels C and D show the corresponding firing rates r p . The instantaneous firing rates r p of the stable bump states in the reduced system were consistent with the steady state spike rates in the timing network, ranging from approximately 25Hz to 70Hz as G r NMDA was increased from 5:5 to 6:2, corresponding to an increase in c NMDA from 0:675 to 1:5 in the timing network ( Figure 3C). The evolution of the system away from the unstable flat steady state is dominated by the largest positive eigenvalue and a localized activity bump emerges due to the corresponding eigenvector ( Figure 4). On the other hand, the largest eigenvalue of the stable bump steady state is zero and the corresponding eigenvector explains the invariant location of the bump [61]. Climbing activity therefore occurs at arbitrary locations, as shown in Figure 2 above.

The scalar property of interval timing
Not only did the timing network produce interval estimates, but the estimates conformed to the scalar property of interval timing [62]. The scalar property is a strong form of Weber's law where the standard deviation of estimates is proportional to the mean ( Figure 5A). Weber's law is widely regarded as a signature characteristic of interval timing across a wide range of temporal orders [13,55], though see [63] and [64] for a systematic description of conformities and violations of the scalar property in humans and non-human animals respectively. The coefficient of variation (CV, the standard deviation divided by the mean) of the interval estimates produced by the timing network was approximately constant ( Figure 5B) and compared favourably to experimental measurements on this order [55,65]. The distribution of interval estimates for each value of c NMDA was roughly normal ( Figure 6A), another widely-reported characteristic of interval estimates across a range of temporal orders [13,55]. Gaussian fits to the estimates are shown in Figure 6B. For comparisons with experimental data in the hundreds of milliseconds range, see e.g. [66] and [67].
Climbing activity in the timing network can be understood as the evolution of the system from an initial state in the vicinity of the unstable flat steady state to the stable bump state. We linearized the system in the vicinity of the unstable flat steady state as dz dt~A zzsj, where z denotes g r NMDA for simplicity. To consider the effects of noise, the linear system can be expressed as a Langevin is a vector, and sj is white noise with standard deviation s. According to non-linear dynamics, the system expands along the manifold tangent to the eigenvector with positive eigenvalue. Thus, we focus on the largest positive eigenvalue, which dominates the expansion of the system [68], and further simplify the system as a 1dimensional Ornstein-Uhlenbeck (OU) process The parameter l of an OU process is typically negative, supporting a stable distribution. Here, l is positive because the flat steady state is unstable. Thus, positive l implies that the system departs from the flat state starting at initial state z 0 . The corresponding Fokker-Plank equation can be written as with initial state f (z,0; z 0 ,0)~d(z{z 0 ). The distribution of arrival times of z at the timing threshold can be calculated as which shows that the system grows along the curve z 0 e lt with standard deviation s Intervals are estimated when the system reaches the threshold z th , so the interval estimates are the first passage times of the OU process, the distribution of which can be calculated as with mean m pdf and variance s pdf given by and respectively. Of note, z 0 and z th are the initial value and threshold of NMDAR activation, (g r NMDA , Equation 19), not the firing rate. To calculate the distribution of first passage times numerically, we need to express the threshold in terms of g r NMDA . For each value of G r NMDA , we therefore calculated z th by scaling the interval estimation threshold in the timing network by the ratio of the maximum values of g r NMDA and r p , i.e. z th~g r NMDA =r p : 20Hz. This scaling preserves our use of a fixed firing rate threshold in the timing network. Values for z 0 , z th and the largest positive eigenvalue l are given in Table 1 for increasing G r NMDA . We used a constant level of background noise for all simulations (s~0:0018), consistent with our use of constant parameters with the background noise (point-conductance) model across the different values of c NMDA in the timing network.
The distribution of first passage times is shown in Figure 7. These curves are very similar to the distribution of interval estimates by the timing network (compare Figures 6B and 7A). Stronger (weaker) NMDAR conductance causes faster (slower) ramping and a narrower (wider) distribution, while the relationship between the mean and standard deviation is approximately linear (compare Figures 5A and 7B).

Learning interval estimates
The previous sections demonstrate that the timing network estimates intervals in the hundreds of milliseconds range as a function of the scale factor c NMDA and that these estimates share signature characteristics with those of experimental subjects in studies of interval timing. Next, we consider whether the network can learn a given interval in this range, using a simple learning rule [57]. We ran the interval estimation task (described above in Results section Interval estimates are controlled by NMDAR conductance strength in the timing network) for desired intervals D[f250,500,750,1000,1250gms. For each desired interval, the network began the block of trials in the baseline condition  (c NMDA~1 ) and c NMDA was adjusted after each trial n according to for where T(n) is the estimate of D on trial n and b~0:025 determines the rate of learning. As shown in Figure 8, the network learned each interval after a handful of trials [7,32].
Starting and stopping the estimate Estimates of elapsed time occur relative to a start time, so the network requires a start signal to begin each estimate. Such a signal should be able to reset the network to the background state, regardless of its current state. There are a number of plausible mechanisms that could play this role. We demonstrate two such mechanisms. One is a brief pulse of spatially non-selective excitation, generating blanket feedback inhibition and thus shutting the network down. This mechanism was demonstrated in an earlier study simulating persistent mnemonic activity in prefrontal cortex, using a local-circuit model similar to ours [21].  Figure 9A shows this mechanism in the timing network, where the average excitatory conductance of the point conductance model (g 0 e ) at pyramidal neurons was increased by a factor of 20 at all pyramidal neurons for 10ms to start the estimate, and again at time t~500ms to stop the estimate. In this case, the start signal potentially corresponds to broad excitation of the timing network by a cue stimulus, while the stop signal potentially corresponds to efference copy at the time of motor initiation [22]. As such, we do not expect these signals to be identical in duration or magnitude, but giving them the same parameters shows robustness of the mechanism (fine tuning of each signal was not necessary). Electrophysiological data showing a similar trajectory can be seen in e.g. [69], where these data were interpreted as encoding the anticipation of an upcoming stimulus.
Another plausible reset mechanism is long-range excitatory targeting of inhibitory interneurons, which in turn inhibit local pyramidal neurons [70]. Such disynaptic inhibition has been suggested to underlie the control of motor initiation in antisaccade [71] and countermanding tasks [72] and is simulated in the timing network in Figure 9B. In this simulation, the average excitatory conductance of the point conductance model (g 0 e ) at pyramidal neurons was increased by a factor of 5 for 10ms to start the estimate, and the average excitatory conductance at interneurons was increased by a factor of 5 for 150ms at t~500ms to stop the estimate. Similar electrophysiological data can be seen in e.g. [73], interpreted as encoding the anticipation of an upcoming stimulus in their study. There are, of course, other mechanisms that could start and stop estimates of elapsed time by climbing activity. Indeed, we do not expect cortical timing circuits to remain indefinitely in a regime with no stable background state. For example, at the onset of a cue stimulus, fast-acting neuromodulation could alter network dynamics in a manner similar to the scaling of c NMDA , or cortico-thalamo-cortical disinhibition could have a similar effect.

Encoding time constraints for a decision
To address the hypothesis that the encoding of elapsed time controls the speed and accuracy of decisions by gain modulation [11], we ran further simulations to determine if the timing network's temporal estimates could control the SAT in a downstream network during a decision task ( Figure 10). As indicated above, the two networks were identical except for the inputs they received and the scale factor c NMDA . To emphasize the role played by the timing network in these simulations, c NMDA was given a low value in the decision network (0:25, one quarter of the baseline NMDAR conductance in the timing network for synapses onto pyramidal neurons and interneurons) so its intrinsic processing was too weak to make decisions across all task difficulties without spatially non-selective input from the timing network. Note that this low value of c NMDA did not support climbing activity in the absence of selective input. Down-scaling NMDARs was thus a practical means of limiting the decision network's processing capability. Although we do not assign it a specific biological correlate, we note that the properties of NMDARs can show marked variation between cortical regions [74] and under receptor modulation within a single region [60,75].
We simulated a two-choice decision task by providing two noisy stimuli to the decision network for 2s. On each trial, the network's task was to distinguish the higher-rate input (the target) from the lower-rate input (the distractor). For each stimulus, independent, homogeneous Poisson spike trains were provided to all pyramidal neurons in the decision network, where spike rates were drawn from a normal distribution with mean m corresponding to the centre of a Gaussian response field defined by exp({d 2 =2s 2 ). Constants d and s are given above for the pyramidal interaction structure W (Methods section The network model). For the target stimulus, we simulated 100 upstream stimulus-selective neurons firing at 50Hz each by setting m~500Hz and setting extrinsic AMPAR and NMDAR conductance strength to 10 : G AMPA and 10 : G NMDA respectively, trading spatial summation for temporal summation [76]. The distractor stimulus was similarly defined, where task difficulty (target-distractor similarity) was determined by multiplying m~500 by 0:85ƒc ext ƒ1. On each trial, the decision was considered correct (incorrect) when the mean SDF of the target-selective (distractor-selective) population reached a threshold of 20Hz. As with the interval estimation task, the threshold assumes a downstream ballistic process is initiated when neural firing reaches a certain rate, an assumption supported by a large body of experimental and theoretical work from decision tasks (see [1,3,77,78]. The time of threshold-crossing was considered the decision time. Note that the precise value of the threshold was not crucial.
Gain modulation of the decision network by the timing network was implemented by spatially non-selective excitation [24,33], that is, each pyramidal neuron in the decision network received input from all pyramidal neurons in the timing network for the entirety of each trial. Only AMPAR conductances mediated these internetwork inputs, which were set to one fifth the strength of extrinsic AMPARs.
The total input current to each neuron i in the decision network was therefore where I sel AMPA,i and I sel NMDA,i mediate stimulus-selective inputs (set to 0 for interneurons), and I tim AMPA mediates spatially non-selective inputs from the timing network (set to 0 for interneurons). NMDAR and AMPAR activation at these synapses follows Equations 5 and 6 above.
A block of 6000 decision trials (1000 trials for 6 task difficulties) was run for values of c NMDA learned by the timing network for a short (250ms) and a long (1000ms) interval (Section Learning interval estimates above). The mean value of c NMDA over the last 100 trials was used in each case. Tight and loose temporal constraints were thus imposed on the decision task by running the timing network with c NMDA~1 :35 and c NMDA~0 :725 respectively on each block of trials, where activity in the timing network served as a spatially non-selective input to the downstream decision network. In both temporal conditions, the model was very accurate on the easiest task (85% mean target-distractor similarity) and performed at chance when the inputs were indistinguishable on average (100% mean target-distractor similarity). For task difficulties in between, decisions were more accurate with the longer temporal estimate. Decision times were shorter for all task difficulties with the shorter temporal estimate. The coupled-circuit decision model thus traded speed and accuracy as a function of a learned interval ( Figure 11).

Distributions of decision times under speed and accuracy
conditions. Just as the the timing network reproduced signature characteristics of interval estimates by experimental subjects, the coupled-circuit decision network reproduced signature characteristics of psychophysical data from decision tasks. As described in [77], these characteristics result from within-block and betweenblock experimental manipulations. Our within-block manipulation is task difficulty (mean target-distractor similarity) and our between-block manipulation is the imposition of speed and accuracy conditions by short (250ms) and long (1000ms) interval estimates respectively.  Three general within-block findings are identified in [2,77]: (1) accuracy decreases and reaction times (RT) increase on correct trials with increasing task difficulty; (2) the shapes of RT distributions are positively skewed, where on correct trials, the tail of the distribution grows at a greater rate than the leading edge with increasing task difficulty; and (3) mean RT differs on correct and error trials, depending on conditions. All three general findings are reproduced by the model (Figures 11 and 12), where we ignore the non-decision component of RT, known to have minimal effect on RT distributions [79]. As described above, increasing task difficulty resulted in a decrease in accuracy and an increase in mean decision time (DT) under both between-block conditions. Increasing mean target-distractor similarity from 85% to 97% resulted in a decrease in accuracy from 99:7% to 71:8% and an increase in mean DT from 242ms to 294ms under speed conditions; and resulted in a decrease in accuracy from 100% to 78:6% and an increase in mean DT from 371ms to 651ms under accuracy conditions ( Figure 11). Furthermore, under both between-block conditions, the shapes of DT distributions were positively skewed ( Figure 12A,B) for all task difficulties (not shown), the tail of the DT distribution for correct trials grew at a greater rate than the leading edge with increasing task difficulty ( Figure 12C, see caption), and error trials were systematically longer than correct trials ( Figure 12D).

Discussion
Over the past several decades, a wealth of data and theory have characterized the cortical mechanisms underlying decisions for action in the world, such as where in space to foveate or to reach (see [1,3]). In this characterization, time is a passive vehicle for the filtering of noisy spatial codes (see [4]). Recently, there has been increasingly broad recognition that the encoding of time is an essential determinant of behaviour [12,13,32,55,80,81]. It would, after all, be impossible to plan actions or anticipate upcoming events without a representation of time. Psychophysical studies have characterized temporal coding for decades [62,67,82,83] and a growing body of electrophysiological [73,[84][85][86][87][88][89], neuroimaging [90,91], and theoretical [56,57,[92][93][94][95][96] studies have begun to reveal the neural mechanisms underlying the representation of time. Despite these developments, very few studies have considered the interactions between spatial and temporal codes for perception, decision and action [8][9][10][11].
Using a generic, local-circuit cortical model, we have proposed a neural mechanism for the encoding of time in the hundreds of milliseconds range. Climbing activity in the model resembles neural activity in a number of cortical regions during experimental tasks with a timing requirement in this range [9,69,73,[84][85][86][87][88][89] and our analysis of network dynamics formally characterizes the underlying mechanism. Strong feedback excitation destabilizes the network's background state, repelling the network toward a stable attractor. Because the dynamics evolve more quickly with stronger feedback excitation, estimates are shorter with stronger intrinsic NMDAR conductance. The model's interval estimates conform to Weber's law, widely observed experimentally (Figures 6 and 5) and the CV of the these estimates is consistent with that of experimental subjects in timing tasks in the same range ( Figure 5). Our derivation of the probability density of interval estimates reveals Weber's law as a mathematical property of the proposed timing mechanism (Figure 7). A simple learning rule is sufficient for the network to learn new intervals within a handful of trials (Figure 8), as observed across experimental paradigms and species [7], and we have demonstrated plausible mechanisms for starting and stopping the estimates (Figure 9). Consistent with the hypothesis that generic properties of local cortical circuits support spatial and temporal processing [12], an identical downstream network makes decisions in simulations of a perceptual discrimination task, producing psychometric and chronometric curves consistent with experimental data (e.g. [9,97,98]) and demonstrating the SAT as a function of the learned temporal estimates upstream ( Figure 11).

The representation of time in the hundreds of milliseconds range
Different neural mechanisms are expected to code for widely varying temporal durations, ranging from microseconds to days [12,13]. While considerable overlap between mechanisms is expected at timescales in between, it has been proposed that a dedicated mechanism exists for the hundreds of milliseconds range (see [55,67]), the relevant order for the most well-studied perceptual decision tasks [1,3,14]. These proposals are based on the premise that a single mechanism encoding time for different tasks and modalities will show common variability in these different contexts. For example, [55] suggested a dedicated timing mechanism in this range based on pooled data from a variety of tasks and species showing a similar CV from approximately 200 to 1500 ms (much like Figure 5B). Along similar lines, [82] described a constant Weber fraction for 200 to 2000 ms. [83] used the slope analysis method to distinguish timing-based variability from nontiming sources of variability, such as variability due to perceptual and motor processing during timing tasks. Under this approach, the slope of the linear fit to the variance plotted over the square of interval durations reveals the time-dependent process, shown in their study to be similar for intervals from 325 to 550 ms in two timing tasks. [67] showed a common slope under this method for several auditory tasks requiring interval estimates from 350 ms to 1 s, though they also showed significantly different slopes for other auditory tasks, visual tasks, and between auditory and visual implementations of the same task. See their study for a more extensive description of the evidence for and against a common timer in this range.
In consideration of the above, it is important to distinguish between a common mechanism for timing and a common timer. A common timer refers to a 'central clock' processing time across a set of modalities and tasks. Inherent in this definition is a common mechanism, but a common mechanism does not necessarily imply a common timer. We propose that the capability to code time in the hundreds of milliseconds range is a generic property of local cortical circuits under conditions supporting strong attractor dynamics, but this capability does not imply that any single circuit should code time for all tasks and modalities, nor that all local cortical circuits should code time.
Our model fits a distributed processing framework, with local circuits coding time in various cortical regions across different tasks and modalities, supported by inherent properties of local-circuit cortical processing [95,99]. There is considerable debate about the strength of evidence supporting distributed vs. central timers for different temporal durations, modalities and tasks (see [15,17,90,100]), but the growing volume of neural data showing climbing activity in the hundreds of milliseconds range in different cortical regions during tasks with a timing requirement provides strong support for a distributed framework. For example, climbing activity in this range has been recorded in several regions of prefrontal cortex, including lateral [69,73], anterior cingulate [84,101] and premotor [85] regions in anticipation of upcoming events; as well as in parietal areas 7A [86] and LIP [9,87,102]. Similar activity has been recorded in anticipation of reward in primary visual cortex [88], in the timing of movements in the absence of environmental cues in LIP [89], and in the midbrain superior colliculus during predictable delays [103]. Furthermore, many of these data showed a phasic response at the start of the anticipatory periods, suggesting a reset mechanism (Figure 9) that would allow for the encoding of elapsed time relative to a start time (e.g. [69,73,88,89]). It is important to note, however, that in a hierarchical cortical framework, one or several local circuits could conceivably encode time at the top of the hierarchy for use in more peripheral processing, i.e. despite favouring a distributed framework, we acknowledge that our model could also support a centralized framework.

Prospective and retrospective coding
We have focused on the representation of time in the hundreds of milliseconds range by climbing activity, but climbing activity is not limited to the hundreds of milliseconds range, nor is climbing activity the only neural data indicative of temporal coding on this order. Such activity is generally regarded as 'prospective' coding [73,104], i.e. neural activity encoding elapsed time in anticipation of an upcoming stimulus or in the timing of an upcoming action.
In addition to the range of hundreds of milliseconds, such activity has been recorded in several cortical and subcortical regions in the range of a few seconds, including primary motor and premotor [105] and prefrontal [106,107] cortices, as well as the thalamus [104]. Some of these data follow a very similar trajectory to those in the hundreds of milliseconds range and a clear distinction between the neural mechanisms coding for similar ranges is not expected [12]. Under our parameters, mean estimates are limited to approximately 1:5s, but alternative parameters may furnish estimates of several seconds, potentially unifying some of these data in terms of their underlying mechanism.
Descending neural activity is arguably just as common as climbing activity and is generally regarded as 'retrospective' coding (see [7,73,108]), i.e. neural activity encoding the time since some previous occurrence. In the context of interval timing, the relevant interval can be estimated when the descending activity reaches baseline from an elevated firing rate, initiated by a stimulus (see [32,96]). Such activity has been recorded in many of the same cortical regions as climbing activity, often in the same experiments (e.g. [73,88,101,107]). Other neural data suggest alternative mechanisms for temporal coding in the hundreds of milliseconds range, for example, [109] recorded phasic neural activity in prefrontal cortex, where the firing rate correlated with the length of a preceding interval. In the range of a few seconds, [110] showed that interval recognition and production were predominantly mediated by different PFC neurons, where the latter showed an increase and subsequent decrease in firing rate before subjects indicated their temporal estimates.

Comparison with earlier neural models of interval timing
A number of neural models have offered mechanistic explanations for temporal coding in recent years. These models can be distinguished along several dimensions, including the temporal range for which they code, the neural and behavioural data for which they provide a mechanistic explanation, the characterization of their dynamics, and whether they function by intracellular or network mechanisms. Most models addressing temporal coding in the range of hundreds of milliseconds to a few seconds are grounded in ascending (climbing) or descending (decaying) neural activity. Several such models have encoded time by neural decay [92,96], i.e. if a stimulus elicits a neural response, then the time after stimulus offset is implicit in the level of activity remaining. Regenerative mechanisms such as recurrent synaptic processing yield network time constants much longer than the time constants of contributing biophysical processes, such as those of membranes and synapses [11,30,31], so these temporal codes are not limited to the tens of milliseconds range. Stronger (weaker) intrinsic synapses thus support longer (shorter) temporal estimates, which can be learned by synaptic plasticity [96].
With sufficiently strong recurrent processing, neural activity becomes stable after stimulus offset, i.e. attractor states are supported and timing by neural decay is no longer possible. Just outside the attractor regime, however, intervals can be estimated by the time of collapse of quasi-stable activity [93], including compliance with the scalar property [111]. Like our model, this approach makes use of quasi-bistable dynamics, where time is coded by the time of transition from one state to another. The obvious difference between these collapsing-activity models and our model is the direction of state change, but another important difference is the rate of state transitions by individual neurons, described below.
Neural models have simulated ascending activity by a variety of mechanisms, most of which involve attractor dynamics in one form or another. For example, attractor dynamics enable a stimulus-selective population to store the representation of a start cue after its offset, and several models have used such stable, persistent activity as a source of input for the production of climbing activity in a downstream excitatory population. Different models have demonstrated different mechanisms to produce the climbing activity, including slow integration by recurrent synaptic processing [112], short term facilitation at feedforward and recurrent synapes onto excitatory neurons [113], and short term depression at feedforward synapses onto inhibitory interneurons that project to the downstream excitatory population, providing gradual disinhibition [94]. The idea that time can be estimated by integrating regular neural activity has long been deployed in clockcounter models (a.k.a. pacemaker-accumulator models), including recent models proposing neural correlates for the required components: an oscillator to provide regular pulses, an integrator to count them, a store to hold a sample interval in memory for comparison with an evolving estimate, and a gate for starting and stopping the timing process (see [114] for extensive review). These models have commonly addressed intervals in the seconds to minutes range and we do not further discuss them here. Suffice to say, persistent mnemonic activity plays a comparable role to the oscillator in models that estimate intervals by the integration of this input to produce climbing activity. The level of background input has been used to similar effect, where stronger (weaker) input produces climbing activity with a steeper (shallower) slope, reaching the threshold sooner (later) and thus estimating shorter (longer) intervals [57,115]. This mechanism pre-supposes an additional upstream time-sensitive mechanism to govern the strength of input, but differential rates of persistent mnemonic activity in parametric working memory tasks [107] and taskdependent modulation of background cortical spike rates [116] suggest that such a mechanism is plausible. Alternatively, different rates of climbing activity can be produced with a constant mean input if the input variance is integrated [117] or by modulation of recurrent network dynamics, as is the case here.
Providing persistent inputs to integrators is not the only role played by attractor dynamics in models that estimate intervals by climbing to threshold. Indeed, the integrators often utilize attractor dynamics. These models can be differentiated by their number of stable or quasi-stable states and the transitions between them. In neural models incorporating cellular bistability, individual neurons switch rapidly from a down-state, characterized by low rate spiking activity or membrane potential, to an up-state (high rate or membrane potential) when triggered by sufficiently strong input current. Climbing activity occurs if the probability of switching increases with the number of up-state neurons [57], where excitatory recurrent processing creates an avalanche effect in network models [115]. As such, these models assume that climbing activity does not reflect a true gradient of spike rates, but rather, reflects the average of a population of binary neuronal states. This characterization of climbing activity is different from that of our model, where individual neurons in the bump population traverse a gradient of firing rates while climbing to threshold. We confirmed this gradient with the interspike interval (ISI) analysis in [103], where graded firing rates are revealed by a decreasing mean ISI over time and a positively-skewed, unimodal ISI distribution. For all values of the scale factor c NMDA , all of these conditions were satisfied in the model (not shown, unimodality determined by Hartigan's dip test). See [103] for details of the analysis. Our model thus makes the testable prediction that neurons undergoing climbing activity during tasks with a timing requirement will show gradual increases in their firing rates, rather than abrupt transitions. Like our model, the single-cell model by [56] codes time by climbing to threshold with a true gradient of firing rates. Unlike our model, Durstewitz's model estimates intervals from hundreds of milliseconds to tens of seconds, doing so by an intracellular positive feedback loop between firing rate, voltage-gated calcium influx, and calcium-dependent inward depolarizing current. As described above, fine tuning of this feedback permits firing rate stability along a continuum of rates. Climbing activity is produced when positive feedback provides slightly more current than is required for stability, continually tipping the balance toward higher rates. The amount by which feedback current exceeds the stabilizing current determines the slope of the climbing activity, learned by plasticity at recurrent synapses in the model.
The models by Buonomano and colleagues [95,99] are based on the premise that the encoding of time in the hundreds of milliseconds range is an inherent property of local cortical circuits, much like our model, but the mechanism by which they do so is very different. Their models do not produce ascending or descending activity, but rather, time is coded implicitly by network state. The long time constants of short term synaptic facilitation and depression in particular (up to *1s) allow the network to reflect its recent history by its current state, which can be readout downstream. This approach provides an elegant solution to the challenge of recognizing rapidly-changing temporal patterns, though it is not clear whether this mechanism could be used for production of temporal estimates. Conversely, our model readily estimates intervals, but is presumably ill-suited to rapid temporal pattern recognition, required, for example, for understanding speech and appreciating music. The synfire chain [118,119] models by [93,120] offer another generic-network approach, consistent with a distributed temporal coding framework. In these models, time is coded by the duration of activity propagating through the network, where output cells learn to fire at expected times by synaptic plasticity. Such a timing mechanism could conceivably recognize and produce interval estimates. The above neural models are considered along these and other dimensions in Table 2. See the table caption for further explanation. As a final point on generic circuitry, it seems reasonable to expect a generic mechanism to support multiple functions, such as our demonstration of timing and decision tasks, but we do not expect a single mechanism to execute all possible tasks. While our biophysical network model can be described as a basis function network [28], it is not a universal function approximator [121,122].
A number of earlier models have demonstrated the scalar property under different assumptions and mechanisms than our model. In the accumulator network by [123], noisy firing by linear spiking neurons is precisely balanced by random fan-out connectivity, where the scalar property emerges from the Gamma distribution of spiking activity. [124] investigated a multi-cascade structure with multiple memoryless states, i.e. a Markov Chain, proving that the system achieves optimal reliability if each state is sequentially and irreversibly activated and generates equal information. In the model by [125], population climbing activity was modelled by an opponent Poisson process, where the scalar property results from the inverse Gaussian distribution of first passage times. The scalar property was also derived in terms of the first passage problem by [111], where in a fully recurrent network of bistable units, the probability of transition from the 'on' state to the 'off' state increases until network activity collapses. In the models by [57], the scalar property results from the exponential distribution of the transition from the 'off' state to the 'on' state of bistable units, where the probability of transition is inversely proportional to the duration of the interval being estimated. An information-theoretic framework for classifying timing by a stochastic process is provided by [126], where timing mechanisms that are based on the mean, variance and correlation of the process predict different characteristics of timing errors. In our model, the interval estimation process is the evolution of network activity to the threshold from an initial state close to the unstable flat steady state. Stronger NMDAR conductance leads to a smaller difference between the initial state and the threshold (see Table 1) and to a larger positive eigenvalue of the unstable flat steady state, producing shorter interval estimates. During the evolution from the initial state to the threshold, noise causes the system to fluctuate around a mean trajectory, where higher levels of noise cause a greater deviation. If the level of noise is independent of the synaptic conductance strength, the deviation will be greater with longer evolution times, so longer estimates will be more variable. Our analysis in Section The scalar property of interval timing reveals Weber's law as a necessary property of any timing mechanism that can be expressed as a 1-dimensional OU process with positive drift coefficient (Equation 20), given three constraints: (1) the timing threshold is reduced with increasing feedback excitation, (2) feedback excitation is linear, and (3) the noise in the system is independent of feedback excitation. The first constraint follows from the dominance of NMDARs in localcircuit processing, ie. the state variable of the reduced system is NMDAR activation, which varies much less with increasing NMDAR conductance than the resulting firing rates. Therefore, with increasing conductance, reducing the timing threshold for NMDAR activation preserves the fixed firing threshold in the timing network. The second constraint is common to many analytic reductions of neural models (e.g. [127,128]). The third constraint can be justified by the long time constant of decay of NMDARs, which allows NMDAR activation to filter synaptic noise at intrinsic synapses, i.e. noisy synaptic release is overcome by residual activation.
Dopamine as a potential mechanism for scaling NMDARs in cortical timing circuitry The timing network estimates different intervals by the scaling of NMDAR conductance strength by c NMDA , controlling the network's dynamics. Because the strength of cortical NMDAR currents are modulated by dopamine (DA) [59], it is possible that c NMDA could be instantiated by DA. Further evidence in support of this possibility comes from studies of working memory and interval timing. Working memory, or the active retention of information for use in cognitive tasks, is correlated with persistent mnemonic activity in a number of cortical regions and experimental conditions ( [129,130]). It is widely believed that persistent mnemonic activity is supported by recurrent synaptic processing, where the long time constant of NMDARs is hypothesized to provide an excitatory plateau [131,132] and to limit network oscillations [133,134]. This hypothesis is supported by studies showing that NMDAR antagonists abolish cortical up-states in vitro and impair working memory performance [135]. DA antagonists also impair working memory performance and DA is elevated in PFC during working memory tasks [60,136]. This convergence of evidence has lead to the hypothesis that NMDAR modulation by DA is a crucial factor in controlling attractor dynamics in the service of working memory (see [135]). Our model makes use of the same computational principles, so the possible relationship between c NMDA and DA is a compelling one, further supported by the common occurrence of climbing activity during delay periods of working memory tasks (see Discussion section Prospective and retrospective coding).
DA is also extensively correlated with interval timing in the seconds to minutes range [13,137]. In this regard, DA agonists and antagonists are correlated with underestimates and overestimates of intervals respectively (see [114]). Similarly, high and low values of c NMDA produced short and long interval estimates respectively in our model. Our results therefore suggest that in cortical timing circuitry, DA may strengthen attractor dynamics sufficiently to destablize background states. If so, the slope of climbing activity could be modulated by tonic DA, possibly by the increasing occupancy of D1 receptors due to slow extrasynaptic uptake [138,139], consistent with enhancement of NMDAR currents via D1 activation [59]. Further work is required to address this possibility. For instance, in addition to modulating NMDAR currents, DA modulates cortical GABAR currents [60], so a more detailed model of DA modulation is required. Furthermore, in the majority of experiments revealing DA involvement in timing in the seconds to minutes range, the effect of DA has been via D2 receptors (see [13,114]), which act in a largely antagonistic way to D1 receptors [60].
Overall, it is unclear whether DA agonists (antagonists) should be expected to speed up (slow down) the representation of time in the hundreds of milliseconds range, but there are notable gaps in the literature that reveal important lines of enquiry. Firstly, the role of D1 and D2 receptors in timing in the seconds to minutes range appears to be task dependent, as a number of recent studies have shown evidence for D1 involvement in timing in this range, using tasks that were not used in earlier studies showing D2 involvement (e.g. [140][141][142][143]). Additionally, several studies showing D2 involvement in earlier tasks also showed D1 involvement (e.g. [144,145]). Secondly, despite the large body of work addressing D1 and D2 involvement in seconds-to-minutes timing in nonhuman animals, we are unaware of any such studies investigating the hundreds of milliseconds range (see [146]). Thirdly, despite a growing body of work addressing D2 involvement in timing in healthy humans (see below for studies with clinical populations), we are unaware of any studies to address D1 involvement.
Studies have also shown timing deficits in the seconds to minutes range among patients with Parkinson's Disease ( [13,100]), a pathology characterized by a deterioration of dopaminergic activity [147]. Fewer such studies have considered timing in the hundreds of milliseconds range and results have been mixed among those that have [148][149][150]. Finally, we note that studies addressing the role of DA in interval timing have focused on its effect in the striatum (see [100]). Suffice to say, in addition to their striatal projections, dopaminergic neurons in the basal ganglia project extensively and diffusely to cortex ( [151]), so these timing hypotheses are by no means incompatible with our model of localcircuit cortical timing.

The SAT and an active role for time in decision processing
There has long been an appreciation of the role of time in decision making, where it has been viewed as a medium for filtering noise (see [6] for a historical and mathematical treatment). In sequential sampling models, evidence for each option of a decision is integrated until the accumulated evidence for one of the options reaches a threshold level, at which time the decision is made in favour of that option (see [2]). Because the evidence may be ambiguous and neural processing is noisy, temporal integration provides an average of the evidence, so decisions are not made on the basis of momentary fluctuations. The more time spent integrating, the better the average and the greater the probability of an accurate decision (see [4]). Clearly, speed and accuracy impose conflicting demands within this framework, the reconciliation of which defines the SAT.
In two-choice decision tasks, integrating the difference between the evidence for each option (the decision variable) implements a class of algorithm known as the drift diffusion model (DDM), known to yield the fastest decisions for a given level of accuracy and the most accurate decisions for a given decision time [6]. The DDM thus optimizes speed and accuracy with respect to one another. This approach accounts for a huge volume of experimental data from decision making experiments (see [3]) and under reasonable biophysical constraints, is formally equivalent to models in which neural populations selective for each of two decision options compete via mutual inhibition [128]. Intrinsic synapses support temporal integration in these models [30,31,127].
The SAT can be be achieved within this framework by raising and lowering the decision threshold, an approach that readily accounts for behavioural data from decision making tasks (see [5,6]), but conflicts with neural data showing decision-correlated neural activity that is approximately constant at the time of a decision [9,97,152]. A similar mechanism that is potentially consistent with these data is the adjustment of the initial level of neural activity on which the decision variable builds, a possibility that is supported by recent functional magnetic resonance imaging (fMRI) studies [153,154]. Such a mechanism requires a means to control the baseline level of activation in decision circuitry, but this requirement could be satisfied by spatially non-selective input, potentially instantiated by the persistent encoding of task requirements in PFC (see [155]). Neural models have demonstrated the SAT under this approach [24,128]. Another potential means of trading speed and accuracy with a fixed neural threshold is the adjustment of the strength of synapses onto downstream neurons reading out or implementing the decision [156]. It is not clear, however, that the timescale of plasticity processes is consistent with the rapidity with which experimental subjects trade speed and accuracy from trial to trial [24].
An alternative, compatible mechanism is that decision-makers explicitly encode their temporal constraints, controlling the SAT downstream (Figures 10 and 11). Several recent studies have considered such an active role for the representation of time in decision making. For example, the DDM has been augmented with time-dependent mechanisms [8,10]. The fundamental difference between these and earlier diffusion models is that the representation of elapsed time has an increasing influence on decision processing as each trial progresses, sometimes referred to as an 'urgency' signal. In the time-variant DDM by [157], amplifying the input by a growing temporal signal was shown to earn more reward per unit time than the standard DDM. This approach is functionally equivalent to lowering the decision threshold over the course of each trial, where later evidence is more heavily weighted than earlier evidence at the expense of a decreasing signal-to-noise ratio [8]. Conversely, if the incoming evidence and the evolving decision variable are both amplified by the temporal signal, there is a transition from a heavier weighting of the former to the latter [11], similar to the transition from extrinsic to intrinsic processing hypothesized to underlie local-circuit cortical processing (see [29]). We hypothesize that climbing activity drives the rate of this transition in downstream decision circuitry, controlling the SAT. This hypothesis is consistent with neural data from experimental tasks with a timing requirement on the relevant order for perceptual decisions (see the previous section) and with neural and behavioural data revealing the SAT (see [5]). It is also consistent with neural data showing a fixed decision threshold [9,97,152]. Indeed, at least one experiment has reported climbing activity that was correlated with the time of decisions in a perceptual task, but not with the evidence [9]. Such activity effectively encodes elapsed time relative to an estimated interval [32], shown recently to earn more reward per unit time than a persistent, top-down signal in a more abstract network model than the one used here, where the temporal signal was a linear function of time [11].
A transition through dynamic regimes during decisions. We have previously described the dynamics of the decision network within this framework, where a linear ramping signal was shown to drive a transition from a leakage-dominated regime to an inhibition-dominated regime in a simplified version of the decision network used here [11]. In the leakage regime, the network quickly reaches a steady state where the decision variable leaks away at the same rate as it accumulates, whereas in the inhibition regime, the decision variable is amplified by strong recurrent dynamics, rapidly driving the network toward an attractor corresponding to the target or the distractor, i.e. activity in one population inhibits activity in the other. In either extreme case, the effective time constant of the network is short and therefore unsuitable for temporal integration. However, gain modulation by the evolving timing signal gradually stretches the time constant prior to the bifurcation between regimes, facilitating a progression through processing stages that correspond to noise filtering, integration of evidence, amplification of integrated evidence, and choice selection. Effectively, the network implements late amplification of a high quality decision variable, accrued by early conservatism. The rate at which the timing signal ramps up determines the rate of the progression. Since the network always goes through the same stages, decision-selective firing rates are fixed at decision time, consistent with neural data [9,97,152]. The SAT is thus achieved by estimating elapsed time relative to a deadline. Under accuracy (speed) conditions, the decision network spends more (less) time in regimes with a longer (shorter) time constant, integrating more (less) evidence at the expense of speed (accuracy). Here, the timing network provides the temporal signal by virtue of its unstable background state, implementing gain modulation by spatially non-selective, additive input [33] (Figure 1C). This time-dependent approach leads to more accurate decisions per unit time than the modulation of decision dynamics by a time-independent signal because at the time of the bifurcation, the state of the decision network is closer to the attractor corresponding to the target than to the attractor corresponding to the distractor. We confirmed this analysis for the present, biophysically motivated model by running decision trials without the timing network for a range of values of c NMDA in the decision network, where these values spanned slow and fast decision times. Without the timing network, the decision network systematically earned less reward than the coupled-circuit model, according to the reward rate definitions of [158] and [6] (not shown).
The weighting of evidence during decisions. The dynamics of the decision network under time-variant gain modulation lead to a testable prediction about the weighting of evidence at different times during decisions. This prediction differs from those of earlier time-invariant approaches to the SAT [5,24]. As described above (see The SAT and an active role for time in decision processing), neural models in which stimulus-selective populations compete via mutual inhibition can be approximated by the DDM [128]. These models (including ours) are based on the premise that intrinsic (recurrent) synapses underlie the buildup of evidence [30], so the decision variable accumulates not only by the sequential sampling of instantaneous evidence, but also by a factor of its present value at each instant in time. These models are thus equivalent to a 1dimensional OU diffusion process where x is the decision variable, A is the drift (here the mean difference between the target and distractor signals), sj is white noise with standard deviation s, and l scales the present value of the decision variable. The difference between our model and earlier neural models of the SAT can be described in terms of l. As described in [128], l equals 0 in the standard DDM, so Equation 28 reduces to a Wiener diffusion process. With negative l, the model is dominated by leakage and converges to a stable fix point with mean {A=l. With positive l, the fix point is unstable and x is repelled from it at a rate that depends on x (faster for larger DxD). The neural model in [24] trades speed and accuracy by the modulation of network dynamics by a constant, spatially nonselective signal during each trial, i.e. the signal 'locks in' the dynamics for a given trial, equivalent to adjusting l between trials in Equation 28. Under this approach, evidence is equally weighted over the full trial for l~0. Negative l produces a recency effect, where later evidence has greater weight than earlier evidence because the latter has more time to leak away. Positive l produces a primacy effect, where earlier evidence has more weight than later evidence because the former is amplified for longer. See [127] for further discussion of these principles. In a task in which the mean evidence changes systematically within each trial (e.g. [10,159]), time-invariant models can either predict a recency effect, a primacy effect, or uniform weighting of evidence. Expressing our model according to Equation 28 requires that l be time-dependent, so our model becomes x~(Azl(t)x)dtzsj, where l(t) increases monotonically from a negative value to a positive value as the temporal estimate evolves within each trial. Under this approach, evidence is most heavily weighted during the transition from negative to positive l, i.e. in the middle of the trial [11]. These different predictions could be tested by briefly changing the mean evidence favouring the target and distractor at different times during a decision trial.

Summary, conclusions and future work
Despite the longstanding attribution of a prominent role for time in perceptual decisions and the growing appreciation of the role of temporal codes in behaviour more generally, few studies have considered the interactions between spatial and temporal codes in decision making. The SAT provides a potential window into these interactions, but most theories of the SAT have ignored the encoding of time, with other factors limiting the amount of time spent integrating evidence (see [5]). We hypothesize a compatible mechanism: the SAT can be accomplished by estimating one's temporal constraints (Figures 10 and 11), where climbing activity encodes these estimates (Figures 2 and 6) and controls the SAT by gain modulation (Figures 10 and 11). This hypothesis is consistent with a growing body of neural data from tasks with a timing requirement (see above) and with the notion of urgency in decision tasks [9,10]. Our implementation of the same network for timing and decision making is consistent with the network's foundations as a generic, local-circuit cortical model [27][28][29] and with a framework of distributed, generic cortical timing circuitry [12]. In this regard, we have demonstrated a plausible framework for spatiotemporal integration in cortex: the modulation of spatially selective, temporally non-selective processing by temporally selective, spatially non-selective processing. While the present implementation of this framework is unidirectional, the mutual (bidirectional) influence of spatial and temporal codes is an interesting future direction.
The variability of decision times in perceptual tasks has been an important means of characterizing decision processing (see [2,77]). Our study suggests that the encoding of temporal constraints is an important source of this variability. Despite the large body of work characterizing the variability of temporal estimates on the relevant order and the broad range of variability across these different experimental paradigms (see [55]), we are unaware of any studies that have systematically controlled timing variability in a given task, except by varying the length of the intervals being estimated. Our study suggests that such an approach would not only help to characterize the mechanisms underlying temporal coding, but would further characterize decision making and its relationship with time. In recent years, there has been growing interest in the optimality of decisions in terms of reward-maximization [6,[156][157][158] and a compelling possibility is that decision makers maximize reward rate by estimating their deadlines [11]. It is conceivable that estimates of deadlines imposed by the environment will vary differently than self-imposed deadlines on the same temporal order, a possibility that could be addressed by controlling the time available to respond and the timing of reward in decision tasks. Future work should address this possibility.