The Chronotron: A Neuron That Learns to Fire Temporally Precise Spike Patterns

In many cases, neurons process information carried by the precise timings of spikes. Here we show how neurons can learn to generate specific temporally precise output spikes in response to input patterns of spikes having precise timings, thus processing and memorizing information that is entirely temporally coded, both as input and as output. We introduce two new supervised learning rules for spiking neurons with temporal coding of information (chronotrons), one that provides high memory capacity (E-learning), and one that has a higher biological plausibility (I-learning). With I-learning, the neuron learns to fire the target spike trains through synaptic changes that are proportional to the synaptic currents at the timings of real and target output spikes. We study these learning rules in computer simulations where we train integrate-and-fire neurons. Both learning rules allow neurons to fire at the desired timings, with sub-millisecond precision. We show how chronotrons can learn to classify their inputs, by firing identical, temporally precise spike trains for different inputs belonging to the same class. When the input is noisy, the classification also leads to noise reduction. We compute lower bounds for the memory capacity of chronotrons and explore the influence of various parameters on chronotrons' performance. The chronotrons can model neurons that encode information in the time of the first spike relative to the onset of salient stimuli or neurons in oscillatory networks that encode information in the phases of spikes relative to the background oscillation. Our results show that firing one spike per cycle optimizes memory capacity in neurons encoding information in the phase of firing relative to a background rhythm.


Introduction
There is increasing evidence that information is represented in the brain through the precise timing of spikes (temporally coded), not only through the neural firing rate [1][2][3]. For example, temporally structured multicell spiking patterns, organized into frames, were observed in hippocampus and cortex, and were associated to memory traces [4,5]. In the olfactory bulb, spike latencies represent sensory input strength and identity [6,7]. In the visual cortex, the relative spike timings of quasi-synchronized neurons, firing in sequences shorter than one cycle of beta/gamma oscillation, represent stimulus properties, and the information they carry grows with the oscillation strength [8]. The coding of information in the phases of spikes relative to a background oscillation has been observed in many brain regions, including the visual and prefrontal cortices and the hippocampus [9][10][11][12][13][14].
Learning in neural networks that represent information through a firing rate code has been thoroughly studied [15]; however, we have lacked efficient, theory-supported learning rules for spiking neurons with temporal coding of information. The tempotron, a model of a spiking neuron endowed with a specific learning rule, has shown how a neuron can give a binary response to information encoded in the precise timings of the afferent spikes [16][17][18]. But the tempotron's output represents information through the existence or the lack of an output spike during a predefined period. The timing of the tempotron's output spikes is arbitrary and does not carry information. Because of this change in the representation of information, a tempotron cannot be an information-carrying input for another tempotron. By contrast, the ReSuMe learning rule [19,20] allows supervised learning of spiking neural codes where the output is also temporally coded, but this rule, as we will show, has a much lower memory capacity than the E-learning rule introduced here.
Here we present two new supervised learning rules for spiking neurons, which allow such neurons to process information that is encoded, for both input and output, in the precise timings of spikes. We show how single neurons can perform classification of input spike patterns into multiple categories, using a temporal coding of information with sub-millisecond precision. The Elearning rule that we introduce here is analytically derived, with approximations, and has a high memory capacity. The I-learning rule is heuristic, but is more biologically plausible, because synaptic changes depend directly on the synaptic currents at the timings (actual and target) of the postsynaptic spikes.
We first describe our results, by illustrating the chronotron problem, introducing our new learning rules, and describing their performance and their memory capacity. We then compare our results with previous ones. After a discussion of our results, the methods used for analytical derivations and computer simulations are presented in detail at the end of the paper.

Understanding and illustrating the chronotron problem
We consider the problem of training a spiking neuron by changing its parameters, such that, for a given input, its output is as close as possible to some given target spike train (for how the target spike train may be provided in the brain, see the Discussion section). Multiple such input-output associations must be performed with a single set of neural parameters. Information is represented in both the input and the output through the precise timings of spikes. We call a neuron that solves this problem a chronotron.
In order to solve the chronotron problem, appropriate learning rules should be defined. Here we focus on learning rules that change the synaptic efficacies of the neuron, although other neural parameters can also be trained.
Our analysis uses the Spike Response Model (SRM) of spiking neurons, which reproduces with high accuracy the dynamics of the complex Hodgkin-Huxley neural model while being amenable to analytical treatment [21]. The integrate-and-fire neuron is a particular case of the SRM.
The considered neuron receives inputs through multiple synapses indexed by j, and the incoming spikes received through each of these synapses during the considered trial are indexed by f according to their temporal order. We consider that the arrival of the f -th presynaptic spike on the synapse j of a neuron at the moment t f j leads to a postsynaptic potential (PSP) whose value as a function of the time t is the product of synaptic efficacy w j and a normalized kernel E j (t,t f j ), i.e. w j E j (t,t f j ) (Methods). We consider here that synaptic changes are applied on a time scale that is much slower than the time scale of the variation of the PSPs and than the length of the considered trial, or that, in simulations, synaptic changes are applied at the end of one or more trials grouped in batches of information processing within which synaptic efficacies are held constant. Thus, the synaptic efficacies w j can be considered effectively constant during a trial, but can change across trials. We denote as l j the total normalized PSP resulting from the contribution of past presynaptic spikes coming through the synapse j, The membrane potential u of the neuron is determined by the integration of the PSPs generated by all presynaptic spikes, and also by a term g that models the refractoriness caused by the last spike fired by the studied neuron: When the membrane potential reaches the firing threshold h, a spike is fired and the membrane potential is reset to the reset potential u r . The chronotron problem can be illustrated graphically by considering a space having the same number of dimensions n as the number of afferent synapses of the neuron. In this space, the n synaptic efficacies w j define a vector w and the normalized PSPs l j define a vector l. The vector l(t) moves around this space, in time, according to the dynamics of the PSPs, while w changes on much larger timescales than l. The neuron fires when l(t) touches a hyperplane that is perpendicular on w and at a distance h{g(t) ð Þ =DwD of the origin (Methods). After firing, the PSPs are reset to 0 and thus the trajectories of l(t) always start from the origin. This is illustrated in Figs. 1 and 2 for a neuron with 2 synapses and in Fig. 3 for a neuron with 3 synapses. The chronotron problem can be understood as the problem of setting the spike-generating hyperplane, by changing w, such that it intersects the trajectory of l(t) at exactly those timings when we want spikes to be fired. This problem is very similar to the problem that needs to be solved in reservoir computing [22][23][24], where the state of a high-dimensional dynamical system, such as our vector l, is processed by a (usually) linear discriminator such that the switch between output states (the crossing of the hyperplane Spikes are generated when the trajectory reaches the spike-generating hyperplane, which is here a line. The chronotron problem is solved by adjusting the location of the spike-generating hyperplane, through changes in w, such that the timings of the fired spikes are the target ones. The numbered arrows indicate the generation of spikes at the times when the spike-generating line is reached. The neuron has g(t)~0. doi:10.1371/journal.pone.0040233.g001 The Chronotron PLOS ONE | www.plosone.org defined by the linear discriminator) happens at desired moments of time.
Similar optimization problems can usually be solved by defining an error function and then changing the parameters to be optimized, through methods like gradient descent, which minimize this error function. The differences between the actual spike train fired by the neuron for a particular input and, respectively, the target spike train can be measured using spike train metrics such as the Victor & Purpura (VP) distance [25]. The VP distance is defined as the minimum cost for transforming one spike train into the other by creating, removing or moving spikes [25]. However, one cannot derive an efficient learning rule using directly this distance, because the terms corresponding to spikes that should be created or removed are constant and do not reflect how creating or removing these spikes depends on the plastic parameters. In order to solve this issue, we used a new error function, which is a modification of the VP distance.

E-learning
The VP distance is the sum of the costs assigned to either insertion of spikes, removal of spikes or shifting the timing of spikes. The cost of adding or deleting a single spike is set to 1, while the cost of shifting a spike by an amount Dt is DDtD=t q , where t q is a positive time constant that is a parameter of the metric. Instead of constant cost terms for the independent spikes that have to be created or removed, our error function changes the VP distance by including terms that depend on the value of the membrane potential of the neuron at the timings of these spikes. This allows these terms to be differentiated piecewisely with respect to the plastic parameters (Methods).
For a given input, the trained neuron fires at the moments t f , where f represents the index of the spike in the spike train. The ordered set of the spikes in the spike train fired by the neuron is F~ft 1 ,t 2 , . . .g. The target spike train that the neuron should fire for that input isF F~ft t 1 ,t t 2 , . . .g. In a transformation of minimal cost, according to the VP metric, of the actual spike train F into the target oneF F , the operations involved are the following: removal of spikes (that are not previously moved); insertion of spikes (at their target timings, so that they are not moved after insertion); and shifting of spikes toward their target timings. We denote as F Ã the subset of F that represents the spikes that should be eliminated; and asF F Ã the subset ofF F that represents the timings of target spikes at which new spikes should be inserted into F . We call the spikes in F Ã andF F Ã independent. The spikes in the actual spike train that are not eliminated, F {F Ã , are in a one-toone correspondence with the spikes in the target spike train for which a correspondent is not inserted,F F {F F Ã , and they should be moved towards their targets. We say that the spikes in correspondent pairs from F {F Ã andF F {F F Ã are linked or paired to their correspondent (match). The existing algorithm that computes the VP distance between two given spike trains [25] can be extended in order to also compute the sets F Ã ,F F Ã and their complements (Methods). E-learning aims to minimize the following error function: where c d is a positive parameter. The first sum runs over the independent actual spikes, the second sum runs over the independent target spikes, and the last sum runs over all unique pairs of matching spikes. Because the creation and deletion of spikes and changes in their classification in either F Ã or F {F Ã lead to discontinuous changes of E (Fig. 4 B), gradient descent can only be ensured piecewisely. The synaptic changes that aim to minimize the error function through piecewise gradient descent are Dw j *{LE=Lw j . By performing the derivation and after some approximations (Methods), we get the E-learning rule: where c is the learning rate, a positive parameter, and c r another positive parameter. E-learning works by modifying each synaptic efficacy w j by terms that depend on the normalized PSP l j . For all target spikes that the neuron should fire, for which a spike should be created, each synaptic efficacy should be increased with a term proportional to l j at the moments of these target spikes. For all output spikes that should be eliminated, each synaptic efficacy needs to be decreased with a term proportional to the value of l j at the moments of these spikes. For all actual spikes that are close to their target positions and should be moved towards them, each synaptic efficacy needs to change with a term proportional to the value of l j at the moments of the actual spikes, multiplied by the temporal difference between actual and target spikes. Fig. 5 illustrates the learning rule.
The E-learning rule is appropriate for both excitatory and inhibitory synapses. If we consider that the excitatory synapses have a positive synaptic efficacy w j and the inhibitory synapses have a negative one, the learning rule in the form presented above can be applied to both cases. Without an extra bounding of the synaptic efficacies, E-learning will transform an excitatory synapse into an inhibitory one or viceversa, as needed for performing the task.
E-learning aims to minimize the error function by performing piecewise gradient descent. The inherent discontinuities introduced in the error function by creation or removal of spikes or by creation or breaking of matching pairs of actual and target spikes may possibly lead to both increases and decreases of the error function. However, the terms that reflect in the error function spikes that should be created or removed ensure that the membrane potential is increased or, respectively decreased at the corresponding timings, such that the number of spikes becomes the desired one and the actual spikes are close to the target ones. Because the learning rule uses approximations, it is possible that gradient descent is not ensured, not even piecewisely. Thus, the optimality of E-learning cannot be guaranteed analytically. However, as the simulations have shown, E-learning is more efficient for chronotron training than the other existing learning rules, having a much higher memory capacity.
It is possible to devise a continuous error function that is then properly derivable, yielding a proper gradient descent that can be guaranteed analytically. However, the continuous error function would be much more complex than the current one, yielding a complex learning rule. This would encumber an intuitive understanding of the learning rule, as it is possible with Elearning. A learning rule based on a continuous error function will be presented elsewhere.

I-learning
The second learning rule that we developed is heuristic and is inspired by both the E-learning rule and the existing ReSuMe learning rule [19,20] (Methods). The I-learning rule is defined by Spikes are generated when the trajectory reaches the spike-generating hyperplane, which is here the black plane. The numbered arrows indicate the generation of spikes at the timings when the spikegenerating hyperplane is reached. The neuron has g(t)~0. doi:10.1371/journal.pone.0040233.g003 Figure 4. The error landscape for a neuron with two synapses and the descent on this landscape during learning. The neuron receives several input spikes on each synapse, the same as in Figs. 1 and 2, and has to fire one spike at a predefined target timing, the same as in Fig. 2 Figure 5. A graphical illustration of the plastic changes implied by the learning rules. The graphs show the spike timings and, for one synapse, the dynamics of the synaptic current I, the normalized PSP l and the synaptic changes Dw implied by the two learning rules. It is considered that one input spike arrives at this synapse at t~0. The synaptic changes are shown to be localized temporally along the events that cause them; the actual application of the synaptic changes can be delayed with respect to these events. (A) One independent target spike and no actual spike. (B) A pair of matching target and actual spikes, the actual one following the target one. (C) One independent actual spike and no target spike. (D) A pair of matching target and actual spikes, the target one following the actual one. doi:10.1371/journal.pone.0040233.g005 Dw j~c sign(w j ) where c is the learning rate, a positive parameter, and I j is the synaptic current on the synapse j. In our simulations, synaptic currents were modeled as a difference between two exponentials (Methods). As in ReSuMe, actual and target output spikes lead to synaptic changes of equal amplitude but of opposite signs, such that when the actual spike train corresponds to the target one the terms cancel out and synapses become stable. In ReSuMe, synaptic changes depend exponentially on the relative timings of pairs of pre-and postsynaptic spikes, as in some models of spike-timingdependent plasticity. In contrast, here we consider that synaptic changes depend on the value of the synaptic current at the timings of spikes. This learning rule is thus biologically-plausible, since it depends on quantities that are locally available to the synapse. Target spikes determine synaptic potentiation, while actual spikes lead to synaptic depression. We call this synaptic currentdependent rule I-learning (Fig. 5).
Because I j is proportional to w j , synaptic changes under Ilearning converge to zero when w j approaches zero, for small c. Thus, the I-learning rule does not allow an excitatory synapse to become inhibitory or viceversa. This corresponds to how neurons in the brain release neurotransmitters that lead, for a particular presynaptic neuron, to either excitation or inhibition of postsynaptic neurons having potentials not far from the resting potentials (Dale's principle) [26].
In E-learning, synaptic changes caused by activity within a trial can be computed only at the end of the trial, because one needs the actual spikes fired during the entire trial under study in order to compute which spikes are independent and which are linked, although one can imagine approximate algorithms for matching the spike trains, which would also work online. In I-learning, synaptic changes can also be applied online, which is more biologically relevant.

Performance of the learning rules
We have studied these rules in computer simulations involving integrate-and-fire neurons. Both learning rules allow a neuron to perform temporally-accurate input-output mappings. Fig. 6 illustrates learning of a mapping between one input pattern (the spike trains coming through all input synapses) and one output spike train consisting of three spikes. The learning rules perform a descent in the landscape defined by the VP or E distance (Fig. 4).
We studied next setups where the chronotron had to memorize multiple input-output associations. Both the input and the output encoded information in the precise spike timings: both input and output spike trains consisted of one spike per trial and the timing of this spike represented the information (time-to-first-spike coding or latency coding). The length of spike patterns (and of one simulation trial) was 200 ms. The latency of a spike with respect to the beginning of a trial can correspond to the phase of a spike with respect to a background oscillation, modeling a phase-offiring encoding of information, and multiple trials can correspond to multiple periods of the oscillation. This could model experimentally-observed situations where phase locking of spikes relative to a theta rhythm is associated to encoding and memorizing of information [6,9,10,13,14]. Fig. 7 illustrates learning of a mapping between 10 different input patterns and one output spike train consisting of one spike at the middle of the trial interval. The neuron learns to perform this mapping, for all 10 input patterns, using the same set of synaptic efficacies. For example, for E-learning, in 99.9% of 10,000 realizations, the neuron was able to fire the correct number of Figure 6. Learning of a mapping between one input pattern and one output spike train. The trained neuron receives inputs from 500 neurons. The spike trains received from these neurons form the input pattern. Each input spike train consists of one spike within the 200 ms of a trial, generated at a random timing having an uniform distribution within the trial. The target output spike train consists of spikes at 50, 100 and 150 ms. (A) Part of the input pattern and the output spike train of the trained neuron, corresponding to this input, before learning. Only some of the 500 input spike trains are illustrated. (B) The synaptic efficacies change according to E-learning, such that the trained neuron's output reproduces the target spike train. Left: The output spike train during learning. Right: The VP distance between the actual and the target output spike train, during learning. The target output is reproduced after less than 15 epochs (presentations of the input pattern). (C) The VP distance between the actual and the target output spike train during learning, for E-learning and I-learning: averages and standard deviations over 10,000 realizations of the same experiment. Each realization uses different, random input spike trains and initial values of the synaptic efficacies. doi:10.1371/journal.pone.0040233.g006 spikes (one spike) and the spike had an average timing difference of less than 0.03 ms with respect to the timing of the target spike, after about 8 minutes of learning (simulated time; 241 learning epochs). In 95% of realizations, the average timing error was less than 1 ms after 1.6 minutes of learning (48 learning epochs). Learning worked even when the inputs were jittered, i.e. at each trial, input spikes were displaced around the reference timing according to a gaussian distribution. For example, in the same conditions as before but with an input jittered with a 5 ms amplitude, in more than 95% of the realizations, the neuron fired one spike with an average timing error of less than 2 ms, after about 8 minutes of learning (225 epochs). A 5 ms gaussian jitter amplitude corresponds to a 3.99 ms average timing displacement of the input spikes (Methods), so, in this case, the mapping also led to noise reduction, by doubling the precision of spike timing. Fig. 8 presents the distribution of the synaptic efficacies, before and after learning, for the experiments presented in Fig. 7. This distribution has been computed over the 10,000 realizations of the experiments. With I-learning, all synapses stay excitatory, like they were generated initially, although a significant fraction of them become close to zero, after learning. E-learning allows synapses to change sign. When the input is subject to jitter, the synaptic distributions after learning become broader than in the case of no jitter.

Memory capacity of the chronotron
The chronotron is able to perform generic classification tasks, where p input patterns must be classified into c categories through hetero-association. For all the different input patterns in one category, the chronotron must fire the same output spike train, using the same set of synaptic efficacies. In our simulations, equal number of patterns were randomly assigned to each category.
The ability of neurons to memorize mappings corresponding to classification tasks increases with the number of input synapses n. The ratio a~p=n (the number of input patterns memorized per input synapse) represents the load imposed by the task on the neuron. A characteristic of the neuron's ability to learn is the maximum load for which the mappings are performed correctly [16], which we call the capacity a m of the neuron. We considered that the chronotron had a correct output when target spikes were reproduced with a 1 ms precision, which corresponds to the lower end of the 0.15-5 ms range of the precision of spikes observed in several areas of the brain [27][28][29][30][31][32][33][34]. In our setup, in both input and target output spike trains there was one spike per trial and information was encoded in the spike latencies. Except where specified, the input spike trains consisted, for each of the n synapses, of one spike generated at a random timing, distributed uniformly, and the target spike train for each category k[f1, . . . ,cg consisted of one spike at k T=(cz1) (Methods). Fig. 9 illustrates the performance of the chronotron in simulations where inputs were classified into c~3 categories. For the particular studied setup, both I-learning and ReSuMe led to a capacity between 0.02 and 0.04, while E-learning led to a capacity up to a m &0:22 patterns per synapse.
The load and the capacity have been used to characterize neurons with binary outputs, which memorize one bit of information for every pattern. The chronotron can classify inputs in more than one category, and for c categories it memorizes i~log 2 (c) bits of information for every input pattern. Therefore, a better measure for the chronotron's learning ability is the information load i~a i and the corresponding information capacity i m , equal to the maximum information load. The number of categories into which a chronotron with latency coding of information classifies its inputs is limited only by the temporal precision of the output spike. For example, if this temporal precision is 1 ms, with the particular setup presented here, the chronotron can encode up to about c~80 categories (Methods). When information is encoded in the spike latencies, the simulations showed that the chronotron's capacity does not depend on the number of categories c (Fig. 10). The maximum information capacity of the chronotron, for E-learning and the particular setup that we used, can be then computed as i m &1:39 bits per synapse (Methods). Extrapolating, this means that a chronotron with about 10,000 input synapses would be able to fire a spike at the correct timing, with a 1 ms precision, among up to 80 possible ones, for about 2,200 different, random input patterns, and thus to memorize about 13.9 kilobits of information. The information capacity of the perceptron is 2 bits per synapse and the one of the tempotron is around 3 bits per synapse [16]. However, if more than two input categories have to be discriminated, the chronotron has the advantage of being able to carry computations that need multiple perceptrons or tempotrons to be performed, being thus more efficient. Unlike the tempotron, the chronotron uses the same coding of information for both inputs and outputs and is therefore able to interact with other chronotrons.
The capacities computed here for the chronotron are lower bounds, since it might be possible to develop learning rules which are more efficient than E-learning and to devise setups with more efficient encoding of information.

Dependence on the setup parameters
In our setups, information was represented in the precise timings of spikes relative to the beginning of trials of constant duration. If trials correspond to periods of a background oscillation, the timing of spikes corresponds to the phase relative to this oscillation. Simulations performed in this framework have shown that chronotrons have the best efficacy when both input and output spike trains consist of one spike per trial (period). Setups where inputs or outputs consisted of more than one spike, or where some of the inputs fired no spikes, had suboptimal performance in terms of learning speed and memory capacity (Figs. 11, 12, and 13). However, learning was still possible under all of these conditions, unless the input pattern included too few spikes (less than about 100, for our setup).
Chronotron's efficacy was not affected by the initial state of their membrane potential at the beginning of trials if target spike times were set at a delay relative to the beginning of the trial of more than about 4 times the time constant of the membrane potential's exponential decay (Fig. 14).
In our setup, the chronotron had an optimal memory capacity if the trial length (the oscillation period) was about 8-10 times larger than the membrane time constant (Fig. 15). Since typical neurons in the brain have membrane time constants between 8 and 100 ms [35][36][37][38][39][40], this would correspond to oscillation periods between 64 and 1000 ms (frequencies between 1 and about 16 Hz), an interval that covers the theta rhythm.
The chronotron's performance did not depend on the reset potential if it was lower than half of the firing threshold h and declined slowly for higher reset potentials, which are, however, artificially high (Fig. 16).
In Fig. 17, parameters were optimized to lead to the minimum average number of learning epochs needed for correct learning for a setup with a relatively low load, a~0:02. For the setup that was optimized and for the optimal parameters, ReSuMe had the fastest learning (16.75+7.43 epochs), followed by I-learning (23.39+6.87 epochs) and Elearning (36.48+7.61 epochs). However, the advantages of the first two learning rules over E-learning disappeared for setups with higher loads or higher number of input synapses than the optimized setup, when the other parameters were kept the same.
In our simulations, the synaptic changes defined by the learning rules were accumulated and were applied to the synapses at the end of each batch consisting of p trials (presentations of the p input patterns) [41,42]. Simulations of E-learning where synaptic changes were applied at the end of each trial required a slightly higher number of epochs for correct learning, but led to the same memory capacity (Fig. 18 A). Simulations of I-learning where synaptic changes were applied either at the end of each trial or online, triggered by postsynaptic spikes (as in Fig. 5) did not lead to results significantly different than simulations with batch updating of the synapses (Fig. 18 B). The maximum load for which correct learning can be achieved (the capacity a m ), as a function of n. E-learning has a much better performance than I-learning or ReSuMe. For E-learning, simulations for higher n were not performed because of the high computational cost, due to the high capacity resulted through this learning rule. Averages were computed over 500 realizations with different, random initial conditions. doi:10.1371/journal.pone.0040233.g009

Comparison to other results
The first supervised learning method for spiking neurons was SpikeProp [43,44], a method inspired by the backpropagation algorithm used for training classical neural networks. SpikeProp works by minimizing the difference between the timing of an output spike and the desired timing. The first versions of the learning method required a feedforward network and that each neuron in the network fires only once during a trial. Later versions [45][46][47][48][49][50][51] extended the method for including a momentum term; adapting the synaptic delays, time constants and neurons' thresholds during learning; for networks where the input (but not the output) neurons fire more than once per trial; for recurrent networks; and for improving learning speed under certain assumptions. However, the method is designed for adjusting just the timing of a single (first) spike per output neuron and assumes that the synapses are such that each output neuron fires at least one spike for the given inputs. The method is not suitable for adjusting the number of output spikes nor for training a neuron to fire given output spike patterns that extend beyond the first spike.
Carnell and Richardson [52] devised a method for modifying the synaptic weights such as the weighted sum of the presynaptic spike trains (in an algebraic representation) converge to a desired one. If the neuron model is such that the firing of the postsynaptic neuron is close to this weighted sum, then the method allows the supervised learning of a target output spike train. The method is quite original and general, but ignores the details of the dynamics of the postsynaptic potential and of the neuronal membrane.
Pfister et al. [53] have derived supervised learning rules for probabilistic neurons. The learning method is based on gradient ascent in the space of synaptic efficacies, which maximizes the likelihood of having a trained neuron firing at the desired moments. Because of the probabilistic framework, the learning rules do not involve the actual timing of the output spikes, but the probability of having a particular output spike train given a particular input spike train. Calculating such a probability while taking into account the reset of the membrane potential after the spikes of the output neuron is computationally challenging and not biologically plausible.
Legenstein and colleagues [54,55] have studied a supervised, biologically-inspired learning method for spiking neurons that works by clamping neurons to the desired output and applying spike timing-dependent plasticity (STDP) to the afferent synapses of the trained neurons. Under certain conditions, after learning, the neurons yield the desired output even after the teaching signal is removed. The effectiveness of this learning method has been proved analytically only for Poisson input spike trains, and there are worst case scenarios where the method fails, but simulations have shown that the method is effective in more general conditions. The method works only when synapses have hard bounds, by driving synaptic efficacies toward these bounds. Thus, the output patterns that this method can learn are restricted to those that can be generated by synapses that have either minimum (zero) or maximum efficacy. A similar rule can be used for supervised learning of patterns by networks [56], but not by single neurons.
The tempotron [16] implements supervised learning for a particular task where an output neuron either fires one spike or does not fire during a predetermined time interval, when presented with an input spike pattern that encodes information in the precise spike timings. The approach assumes that after the neuron emits a spike in response to a input pattern all other incoming spikes have no effect at all on the neuron (are shunted), which is artificial. The timing of the output spike cannot be controlled with this method, and thus the output of a tempotron cannot be used as an information-carrying input for another tempotron. The tempotron has a binary response and therefore its output cannot distinguish between more than two input categories. Although it is claimed that it is biologically plausible, the tempotron learning rule requires information that is nonlocal in time, needing to monitor the maximum of the output, and information that is not available to the neuron, such as the maximum of the membrane potential that would have been reached if the neuron would have not fired. We have shown that the tempotron is equivalent to a particularization of the ReSuMe learning rule [17]. A learning rule by Urbanczik and Senn [18] improves the original tempotron learning rule but is still focused on the artificial tempotron setup.
Barak and Tsodyks [57] have developed learning rules that increase the variance of the input current evoked by a set of learned patterns relative to that obtained from random background patterns. The trained neuron then has a larger firing rate when presented with one of the learned patterns, as compared to when presented with a typical background pattern. The learning rules are quite complex, with low biological plausibility. They allow a neuron to recognize input patterns of precisely timed spikes, but the timing of the output spikes is not controlled by these rules. The memory capacity computed for these learning rules, for just the recognition of patterns, is an order of magnitude smaller than the maximum memory capacity we obtained for mapping memorized patterns to specific outputs (Methods). Other complex setups for recognizing spike patterns were also developed [58][59][60][61].
A few other supervised learning methods for spiking neurons or neural networks also exist but work only for some specific cases, such as neurons receiving oscillatory inhibition [62], population-temporal coding [63], theta neurons [64,65], neurons with very large membrane decay time constants and constant interspike intervals for the inputs [66], networks with time to first spike coding for classification through plasticity of synaptic delays [67], neurons having two presynaptic and one postsynaptic spikes per learning cycle [68], specific configurations, composed of several modules, of the trained network [69].
ReSuMe [19,20,[70][71][72][73][74] is a general supervised learning method for spiking neurons that allows learning of arbitrary output spike trains. It is the only existing learning rule that is comparable to the ones introduced here. This learning rule has been conjectured by analogy to the Widrow-Hoff rule for analog neurons. Simulations have shown that not all the terms of the conjectured learning rule are needed for learning [74]. To date, it has been shown analytically that ReSuMe will converge to an optimal solution only for the case of one input spike and one target output spike [70]. We have shown here (Fig. 9) that E-learning leads to a much higher memory capacity than ReSuMe. The higher performance of E-learning can be attributed to the analytical derivation of the  E-learning rule, although the derivation included approximations that preclude analytical guarantees on the optimality of Elearning.
I-learning is quite similar to ReSuMe. As in ReSuMe, in Ilearning actual and target postsynaptic spikes lead to synaptic changes of opposite signs, such that when the actual spike train corresponds to the target one the terms cancel out and synapses become stable, and thus the basic mechanism is identical. In contrast to the typical form of ReSuMe, where synaptic changes depend exponentially on pairs of pre-and postsynaptic spikes, as in some models of spike-timing-dependent plasticity, in I-learning synaptic changes depend on the value of the synaptic current. In the case that synaptic currents are exponentials, I-learning would be identical to a form of ReSuMe where the non-Hebbian terms are set to zero. Variants of ReSuMe where the exponentials have been replaced by other types of functions, including differences between two exponentials (double-exponentials) like in our model of I-learning, have been previously studied [74] but these doubleexponentials have not been previously associated to the synaptic currents. ReSuMe is typically presented as using exponential functions and non-zero non-Hebbian terms [20]; the lack of these in I-learning makes it distinct from ReSuMe. Because the rising part of the double-exponentials is deleterious to learning [74] and because I-learning does not allow synapses to change sign, unlike ReSuMe, I-learning has, in most cases, a lower performance than ReSuMe (Figs. 9, 17). However, unlike in the experiment with double-exponentials in [74], where, additionally to the terms that we used in I-learning some anti-Hebbian terms have been used Figure 13. The dependence of chronotron performance on the probability P s that input synapses receive no spikes. At the beginning of the experiment, each input spike train was set up as either one spike generated at a random timing or, with a probability P s , of no spikes. Input patterns did not change during learning. (A) The maximum load (the capacity a m ) as a function of the no firing probability P s . (B) The number of learning epochs required for correct learning as a function of the no firing probability P s , for various loads a. (C) The number of learning epochs required for correct learning as a function of load a, for various values of the no firing probability P s . Best capacity was achieved for values of P s less or equal to 0.1, while fastest learning was achieved when there was no input with no spikes. For large P s there are not enough input spikes to drive the neuron and, as expected, performance drops. doi:10.1371/journal.pone.0040233.g013 and a lack of convergence has been observed, in our experiments I-learning converged well to the target output (Fig. 6, 7). Real synaptic currents do involve a non-zero rising time and thus using double-exponentials in modeling currents is biologically relevant.
For a review of supervised learning methods for spiking neural networks, see [75].

Discussion
We have shown that, through appropriate learning methods, spiking neurons are able to process and memorize information that is encoded in the precise timing of spikes. We presented two new spike-timing-based learning rules, E-learning and I-learning, which allow neurons to fire specific spike trains in response to specific input patterns of spike timings, by modifying accordingly their synaptic efficacies. E-learning leads to high memory capacity, while I-learning is more biologically plausible.
There obviously are input-output mappings that are mechanistically impossible to be performed by a spiking neuron. For example, when there is no input, the neuron obviously cannot fire. A sufficient number of input spikes that arrive uncorrelated on each of its synapses leads to a wide range of outputs that the neuron is able to map to these inputs, by adjusting the synaptic efficacies. But if the neuron has to perform several different inputoutput mappings with the same set of synaptic efficacies, the various mappings constrain each other through the synaptic efficacies. These constraints lead to the mechanistical impossibility that the neuron performs new input-output mappings beyond the current ones, and thus to a finite memory capacity of the neuron. We computed lower bounds of the memory capacity of a spiking neuron with temporal coding of information and studied how this depends on various parameters of the setup.
The chronotron can model situations where information is coded in the time of the first spike relative to the onset of salient stimuli [2], or situations where information is coded in the phase of spiking relative to a background oscillation. Some of the results presented here underline the role of oscillations for temporal information processing. First, oscillations segment time into frames (periods), offering a reference for temporal encoding of information in spike latencies (phases) [76]. Second, in the parts of the cycles where neurons are globally inhibited or global excitation is low, oscillations ensure that neurons are reset such that they are able to process independently the inputs corresponding to different frames (periods). If this reset is such that it allows the chronotron to  get into the resting state or another baseline state (the chronotron is inhibited or does not receive significant input for a duration of about 4-6 times the membrane time constant or more), then the absolute latencies, relative to the oscillation period, of the input spikes do not matter for the chronotron, but just the relative timings of spikes in the input pattern. The output spikes of the chronotron would then encode information in their relative timings with respect to the input spikes. The relevance of oscillations to temporal coding is consistent to the results of Havenith et al. [8] where the information carried by neurons in the visual cortex through their relative firing times was found to increase considerably with the oscillation strength. It has also been shown that the hippocampal theta rhythm is necessary for learning by rats of the Morris water maze [77] and that it enhances learning in eyeblink classical conditioning in rabbits [78,79]. Oscillations also enhance the temporal precision of action potentials [80]. Although the parameters of most of our simulations correspond to a theta rhythm, the simulations' results remain the same when all temporal parameters are rescaled, and thus the results are also relevant for neurons that are subject to a gamma rhythm or other oscillations.
In the brain, when the spike phase encodes information relative to a background oscillation, the neurons fire no more than one spike per cycle in some, but not all, experiments [4,6,8-10,14].
Our results showed that firing one spike per cycle is optimal for processing and memorization of phase-of-firing temporally encoded information by spiking neurons. In many cases, neurons in the brain skip oscillation cycles, which implies that the neurons that skip cycles do not participate in all input patterns received by postsynaptic neurons. This means that postsynaptic chronotrons will have an effective number of inputs lower than the real one, which would reduce the memory capacity as compared to the case when all input neurons fire one spike per cycle. However, this does not preclude the possibility that chronotrons process and memorize information in oscillatory networks where neurons skip cycles or where neurons fire more than one spike per cycle.
I-learning implies that synaptic changes are proportional to the corresponding synaptic currents, which are quantities that are locally available to the synapse. Postsynaptic spikes lead to synaptic depression similar to anti-Hebbian spike timing-dependent plasticity (STDP) [81][82][83][84][85][86][87][88][89], while the timings of target postsynaptic spikes trigger potentiation. The depression and potentiation should balance each other when actual spikes occur at the target timings. The target timings could be indicated by spikes coming from other, teacher neurons, through special teaching synapses [90]. The firing of these teacher neurons should lead to heterosynaptic associative changes [91][92][93] according to the I-learning rule and should not have a significant impact on the trained neuron's potential [90]. The potentiation generated through such a mechanism should be balanced by anti-Hebbian STDP when the trained neuron reproduces the firing of the teacher neuron. In Figure 17. The performance of learning rules when their parameters were optimized for fast learning for p~20, n~1,000 (a~0:02). (A) The number of learning epochs required for correct learning as a function of the load a, for n~1,000. Correct learning was not achieved for I-learning and ReSuMe for a larger than 0.03. (B) The number of learning epochs required for correct learning as a function of the number of input synapses n. Correct learning was not achieved for I-learning for n~500 nor n larger than 6,000. Averages and standard deviations over 500 realizations. The arrows indicate the conditions for which the parameters were optimized. doi:10.1371/journal.pone.0040233.g017 this case, the trained neuron's firing should then become increasingly correlated to the one of the teacher neuron, eventually mimicking its firing with a lag corresponding to the delay of the arrival of the teaching spikes. If the trained neuron learns from several teacher neurons, it should learn to fire when either one of the teacher neurons fires, acting thus as a kind of multiplexer. If the trained neuron does not need to reproduce the entire activity of teaching neurons, but just the one during salient events, teaching could be modulated by a neuromodulator. Neuromodulation of supervised learning could be similar to the control of induction of associative plasticity in Purkinje cells through targeted modulation of instructive climbing fiber synapses [94] or the neuromodulation of STDP [95][96][97][98][99][100][101][102]. Just as STDP [103][104][105] or its neuromodulation [106,107] were predicted theoretically in advance of experimental verification, future experiments may find plasticity mechanisms similar to I-learning in the brain. For example, such mechanisms might be responsible for neural synchronization that modulates neural interactions [108], such as the synchronization of thalamic neurons needed for driving the cortex through weak synapses [109]; for encoding of information through synchronization [110]; or for the fine temporal tuning of excitation relative to inhibition that contributes to stimulus selectivity in rat somatosensory cortex [111].
Besides the particular supervised learning rules introduced here, other learning mechanisms, such as reinforcement learning, or developmental mechanisms selected through evolution, could lead to a chronotron-like processing of temporally-coded information.
Many computational applications of the presented learning rules are possible. For example, the supervised learning rules presented here could be used to train readout neurons of liquid state machines, for which perceptrons or spiking neurons with rate coding of outputs were previously used [23]. Using spiking neurons with temporal coding as readouts for liquid state machines makes their information representation compatible to the one of spiking neurons in the liquid, thus allowing the outputs of the readouts to be fed back into the liquid. Such feedback significantly improves the computing power of liquid state machines [112], allowing the development of better models of information processing in the brain. Another possible application is the decoding of neural signals. Less efficient learning rules than the ones presented here have been already applied successfully, and with better results than alternative methods, to train simulated spiking neural networks to extract arm movement direction and hand orientation intent from the timing of spike trains recorded from monkeys [113]. These are just a few examples of the potential uses of the learning rules presented here. These rules open the way to a plethora of future experiments that will explore how information encoded in the precise timing of spikes can be processed and memorized. This should lead to a better understanding of the information-processing features of neurons in the brain.

The neural model
Our analysis uses the Spike Response Model (SRM) of spiking neurons, which reproduces with high accuracy the dynamics of the complex Hodgkin-Huxley neural model while being amenable to analytical treatment [21,114]. For this model, the dynamics of the membrane potential u of a neuron as a function of the time t is given by where g is a kernel that represents the refractoriness caused by the last spike of the neuron;t t is the last time the neuron fired before t; the first sum runs over all synapses j afferent to the considered neuron; w j is the synaptic efficacy of the synapse j; the second sum runs over the set of the timings when spikes coming through synapse j reach the postsynaptic neuron, t f j [F j ; E j is a normalized kernel that determines the postsynaptic potential (PSP) caused by a presynaptic spike. We consider here that synaptic changes are applied on a time scale that is much slower than the time scale of the variation of the PSPs and than the length of the considered trial, or that, in simulations, synaptic changes are accumulated and applied at the end of one or more trials grouped in batches of information processing within which synaptic efficacies are held constant. Thus, the synaptic efficacies w j can be considered effectively constant during a trial, but can change across trials. We have chosen the reference of the membrane potential such that the resting potential of the neuron is 0. The E kernel is causal, i.e. E j (t,t t,t f j )~0 for tvt f j , and also decays to 0 for t??. We denote as l j the total normalized PSP resulting from the contribution of past presynaptic spikes coming through the synapse j, and therefore When the membrane potential reaches the firing threshold h, the neuron fires a spike and the membrane potential is reset.

Graphical illustration of the chronotron problem
We consider the problem of training the plastic parameters of a spiking neuron, such that the spike train of the trained neuron is, for a given input, as close as possible to some given target spike train. Although we focus here on training the synaptic efficacies, the plastic parameters may also be the synaptic delays, the firing threshold, the membrane time constant, etc.
We consider the vector w having as components the synaptic efficacies w j and the vector l(t,t t,fF j g) having as components the normalized PSPs l j (t,t t,F j ). Each of these vectors has a dimension equal to the number of synapses, n. The equation that defines the dynamics of the Spike Response Model, Eq. 8, can be then rewritten in vectorial form as The dynamics of the normalized PSPs define a trajectory of l in the corresponding n-dimensional space. After each postsynaptic spike, the normalized PSPs are reset to 0 and thus this trajectory always starts from the origin of the space. The neuron fires a spike when u(t)~h, or w : l(t,t t,fF j g)~h{g(t,t t): The magnitude of the projection of the l vector on the w vector is (w : l)=DwD. Thus, the neuron fires a spike when the magnitude of the projection of l on w reaches h{g(t,t t) ð Þ =DwD, i.e. l reaches a spike-generating hyperplane which is perpendicular on the vector w and at a distance h{g(t,t t) ð Þ =DwD of the origin. This is illustrated in Figs. 1 and 2 for a neuron with 2 synapses and in Fig. 3 for a neuron with 3 synapses. These artificially low numbers of synapses were chosen because it is difficult to visualize spaces with dimensions higher than 3.
The chronotron problem can then be understood as setting the vector w such that the spike-generating hyperplane that it defines is such that l reaches it at the moments of the target spikes.

Analytical derivation of the E-learning rule
For a given input, the trained neuron fires at the moments t f , where f represents the index of the spike in the spike train. The ordered set of the spikes in the spike train fired by the neuron is F~ft 1 ,t 2 , . . .g. The target spike train that the neuron should fire for that input isF F~ft t 1 ,t t 2 , . . .g.
The key to solving the chronotron problem is finding appropriate error functions that can be afterwards minimized through methods like gradient descent in the space of the plastic parameters. In order to find such an error function, we start from the Victor & Purpura (VP) family of metrics based on spike times that defines distances between pairs of spike trains [25,115]. The distance between two spike trains is defined as the minimum cost required to transform one into the other. This is the sum of the costs assigned to either insertion of spikes, removal of spikes or shifting the timing of spikes. The cost of adding or deleting a single spike is set to 1, while the cost of shifting a spike by an amount Dt is s(DDtD=t q ), where s is a positive, increasing function with s(0)~0, and t q is a positive time constant that is a parameter of the metric. The commonly used form of this function is simply s(x)~x [25,115].
Because the transformation is of minimal cost, the operations that define it are severely constrained. The same spike cannot be both moved and deleted, nor inserted and moved, nor inserted and deleted. A spike can be moved in only one direction, and the trajectories of moved spikes should not intersect [25]. Thus, in a transformation of minimal cost of the actual spike train F into the target oneF F , the operations involved are the following: removal of spikes (that are not previously moved); insertion of spikes (at their target timings, so that they are not moved after insertion); and shifting of spikes toward their target timings. The order of these operations is irrelevant.
We denote as F Ã the subset of F that represents the spikes that should be eliminated; and asF F Ã the subset ofF F that represents the timings of target spikes at which new spikes should be inserted into F . The spikes in the actual spike train that are not eliminated, F {F Ã , are in a one-to-one correspondence with the spikes in the target spike train for which a correspondent is not inserted, F F {F F Ã , and they should be moved towards their targets. We say that the spikes in F Ã andF F Ã are independent, while the spikes in F {F Ã andF F {F F Ã are linked or paired to their correspondent (match). The VP distance is then where the first sum equals the number of elements in F Ã , the second sum equals the number of elements inF F Ã , and the last sum runs over all unique pairs of matching spikes. The existing algorithm that computes the VP distance between two given spike trains [25,115] can be extended in order to also compute the sets F Ã ,F F Ã and their complements. We present this extended algorithm in a separate section, below.
Thus, we can determine which of the actual spikes fired by the trained neuron should be removed, which target spikes do not have a correspondent and thus new spikes should be created to match them, and which spikes should be moved and toward which of the targets, in order to transform the actual spike train into the target one with a minimal cost. The plastic parameters should then change in order to perform this transformation.
For an existing spike at t f that should be moved towardst t g , the error that should be minimized is s(Dt f {t t g D=t q ). This can be differentiated piecewisely with respect to the plastic parameters, so that the changes of the parameters that lead to a decrease of the error can be computed. However, the spikes in F Ã andF F Ã that are independent contribute to the distance a constant term of 1 each, and this is not differentiable with respect to the plastic parameters. In order to be able to minimize the contribution of these terms to the distance between the spike trains, we must focus more closely on the mechanisms of spike creation and removal.
The neuron fires a spike when its membrane potential u reaches the firing threshold h; after a spike is emitted, the membrane potential is reset to u r . If a new spike should be created at a target timingt t f , this is because the membrane potential is not high enough at that moment. In order to minimize the spike train distance by creating a new spike, we should thus minimize the error h{u(t t f ). This reflects the amount with which the membrane potential should increase att t f in order to reach the threshold and let the neuron fire at the target timing. Analogously, if an actual spike at t f should be removed we should decrease the membrane potential at that timing and minimize u(t f ). Note that we minimize the membrane potential at the current moments of the spikes to be removed. The membrane potential at a generic moment of these spikes equals the firing threshold, thus being a constant that cannot be minimized. The effect of this minimization will be, in most cases, a change of the timing of these spikes, until their elimination.
These error terms that depend on the values of the membrane potential at the timings of the spikes are piecewisely differentiable with respect to the plastic parameters. We will replace, in the error function to be minimized by changes in the plastic parameters, the constant terms corresponding to independent actual and target spikes with these new error terms. Because the new error terms are not commensurable with the original spike train distance, we scale the original terms by a constant, positive parameter c d . The final error function that we seek to minimize is thus The first sum is over the independent actual spikes, the second sum is over the independent target spikes, and the last sum is over unique pairs of linked spikes, consisting of one target spike and one actual spike that should be moved towards the target one. We aim to minimize this error function by piecewise gradient descent in the space of the plastic parameters of the trained neuron. We will consider here training the efficacies w j of the synapses afferent to the neuron, where the index j indicates the synapse. The synaptic changes that aim to minimize the error function are thus We have where s'(x)~ds(x)=dx. Because of the presence of the absolute value function in the argument of s, the derivative presented in the equation above is discontinuous when the actual spike is at its target timing, t f {t t g ?0, unless we have s'(0)~0. We would like to fulfill this condition in order to avoid, during learning, oscillations of the emitted spikes around the target positions. The typically used linear function s(x)~x does not fulfill this condition. Because of this, here we will use Like for the commonly used form s(x)~x, for our choice of s the switch from considering two spikes (one from each of the two spike trains) as independent to considering them as linked is when the difference of their timings, in absolute value, is DDt switch D~2 t q . This is because a pair of independent spikes contributes to the distance with a term of 1 each, for a total of 2 (one actual spike should be removed and a matching spike for the target one should be created); and s(DDt switch D=t q )~s(2)~2.
We have s'(x)~x and The derivative of the firing time of the neuron with respect to a synaptic efficacy can be computed by taking into consideration that the firing time depends on the synaptic efficacies through its dependence on the dynamics of the membrane potential of the neuron. However, the membrane potential at a generic firing time is always constant, equal to the firing threshold, and thus we have [44,116]: du(t f )~0: ð18Þ By expanding the last equation, we get and, finally, By introducing Eqs. 12, 16, and 20 into Eq. 13, we get: Lu(t f ) Lw j : In order to be able to compute the derivatives of the membrane potential with respect to the synaptic efficacies, we have to choose a specific neural model. As discussed above, here we use the Spike Response Model, Eq. 8. We can then compute Lu(t) Lw j~l j (t,t t,F j )z In order to simplify the learning rule, its presentation and its computational implementation, we neglected the last term in the last equation and we used for the simulations the approximation The neglected term is not necessarily numerically negligible, but however the simulations have shown that the learning rule performs well under this approximation. Another approximation that we used was to replace the factor 1=½Lu(t f )=Lt in Eq. 21 with a constant. This is needed because this factor diverges numerically when a spike is fired while the membrane potential barely reaches the threshold and Lu(t f )=Lt is close to 0. This divergence reflects a discontinuity of the studied system [48]: in this situation, an infinitesimally small change of a synaptic efficacy can lead to a finite change of the error function, if this results in the removal of the considered spike. Our error function deals with spike creation or removal trough the two terms that ensure that the membrane potential is increased or, respectively, decreased at the desired timings, such that the number of spikes becomes the desired one and the actual spikes (21) are close to the target ones. It is thus safe to enforce a hard bound for the divergent factor or, as we did here, to replace it with a constant. This constant is positive, because a spike is generated only when the membrane potential increases. We fold this constant and c d into a new positive constant, c r .
The resulting learning rule, that we call E-learning, is thus where c is the learning rate, a positive parameter. The E-learning rule can be described more intuitively as follows. For each of the target spikes, if these target spikes are independent (do not have a corresponding actual spike close to them), each synapse j is potentiated proportionally to the normalized PSP l j at the moments of these target spikes. For each of the independent actual spikes (that do not have a corresponding target spike close to them), each synapse is decreased proportionally to the normalized PSP at the moments of these actual spikes. For each pair of matching spikes, each synapse changes proportionally to the difference between the timing of the actual spike and the timing of the target spike in the pair, and also proportionally to the normalized PSP at the moment of the actual spike. The first two terms of the learning rule will create or remove spikes in order to match them to the target ones. The last term of the learning rule will move the actual spikes that match the target ones toward their targets. When the timing of the spikes coincide to their targets, the changes of the synaptic efficacies suggested by the learning rule become zero and thus learning stops.
The E-learning rule can also be understood intuitively by considering snapshots of the trajectory of l(t) at the timings of target and actual spikes of the trained neuron. The equation defining the E-learning rule, Eq. 26, can be written in vectorial form as At the timingst t f of independent target spikes, the spike-generating hyperplane must be brought closer to the l(t t f ) vector and therefore the w : l(t t f ) product must be increased. This can be done best, for a given perturbation of w, by increasing just the component of w that is parallel to the l(t t f ), which would lead w to turn towards l(t t f ). This leads to setting Dw*l(t t f ), hence the first term of Eq. 27. At the timings t f of independent actual spikes, l(t f ) reaches the spike-generating hyperplane which must be then moved away from l(t f ) and thus it leads to Dw*{l(t f ), hence the second term of Eq. 27. When an actual spike at t f is followed closely by a matching target spike att t g , bringing the spike-generating hyperplane closer to l(t t g ) is deleterious since it does not take into account that l has just been reset to 0 because of the recent actual spike. In this case, what should be done is just delaying the actual spike. This could be done by moving the spike-generating hyperplane away from l(t f ), proportionally to t f {t t g . When a target spike att t g is followed closely by a matching actual spike at t f , bringing the spike-generating hyperplane closer to l(t t g ), in the same way as in the case of an independent target spike described above, would bring the timing of the actual spike closer to the target one, but in an imprecise fashion. We would like that the convergence of the actual spike towards the target one to be smooth. The third term of Eq. 27, Dw*(t f {t t g )l(t f ), takes care of the last two situations.

The I-learning rule
The form of the synaptic changes indicated by the previously described E-learning rule depends on whether spikes are independent or not, being different in the two cases. While, as the simulations have shown, this learning rule is very efficient, the biological plausibility of this switch of the form of the synaptic changes is debatable. For this reason, we sought a more biologically plausible supervised learning rule.
We consider the limit t q ?0, when all spikes are independent: F~F Ã andF F~F F Ã . In this case, the E-learning rule will keep just its first two terms, which depend on the normalized postsynaptic potentials. The switch of the form of the synaptic changes as a function of the pairing status of the spikes is then removed. However, due to the spike generation mechanism, the postsynaptic potentials suffer a discontinuity after each actual spike, being reset to zero. If there is no distinct treatment of pairs of close actual and target spikes, this leads to a discontinuity of the synaptic changes when an actual spike oscillates around a target one. Learning does not converge to a stable firing of the actual spikes at the target timings. Moreover, it is not clear whether the normalized postsynaptic potential (i.e., the postsynaptic potential with the synaptic efficacy factored out) is a quantity locally available to the synapse.
For these reasons, we heuristically defined a new learning rule. As before, we wanted the synaptic changes to depend on a quantity that reflects the contribution of each synapse to the membrane potential, a quantity that would be correlated to l j , which is used by the analytically-derived E-learning rule. As in Elearning with t q ?0, the synaptic changes for excitatory synapses should be determined by synaptic increases proportional to the value of the considered quantity at the timing of the target spikes and by synaptic decreases proportional to the value of that quantity at the timing of the actual spikes. In this case, when the actual spikes coincide with the target ones, the terms cancel out, resulting in the convergence of the learning rule. Another condition was that the sum of the terms corresponding to a pair of close actual and target spikes converges continuously to zero when the actual spikes moves towards the target one. We also wanted that the quantity used by the learning rule to be locally available to the synapse, thus ensuring its biological plausibility. We thus used the synaptic current, I j , as this quantity. The resulting learning rule, that we call I-learning, is thus: with c being the learning rate, a positive constant. Although we did not make it explicit in the notation, the synaptic currents I j on each synapse obviously depend on the parts of the presynaptic spike trains F j coming through that synapse previous to the moment at which I j is evaluated. The sign(w j ) in the learning rule (i.e., +1 as a function of whether the synapse is excitatory or inhibitory) reflects that the sign of the synaptic changes depends on the sign of the synaptic efficacy. For excitatory synapses, both w j and I j are positive, while for inhibitory synapses both are negative.
We define: The Chronotron We can then express the dynamics of the integrate-and-fire neuron in the form of the Spike Response Model, Eq. 6: After performing the integration in Eq. 39 by taking into account the form of the a kernel given by Eq. 30, we get: The form of E is illustrated in Fig. 19 B, C.

Computer simulations
The learning rules were tested and explored in computer simulations. We trained an integrate-and-fire neuron with doubleexponential synaptic currents, as previously described. The neuron had a membrane time constant t m~1 0 ms, a capacity C~2:5 nF, a firing threshold h~20 mV, and the resting potential was 0. Except in Fig. 16, the neuron had a reset potential equal to the resting potential, u r~0 . The time constants that define the dynamics of the synaptic currents were t s~5 ms and t r~1 :25 ms.
Since we were interested in the coding of information in the precise timing of the spikes, we used an event-driven simulation [117] where the timing of input spikes were represented with machine precision and the timing of the trained neuron's spikes were computed with a precision of 10 {5 ms.
The neuron was trained to learn p input patterns by firing a predetermined output spike train for each of the inputs. An input pattern consisted of the ensemble of the n input spike trains coming through the n synapses during the interval T. Except in Fig. 15, the length T of the input patterns was of 200 ms. During learning, the input patterns were presented sequentially, in batches consisting of the p patterns. Except in Fig. 18, the synaptic changes defined by the learning rules were accumulated and were applied to the synapses at the end of each batch. A presentation of one input pattern and the simulation of the output of the trained neuron corresponding to this input is called a trial. Each batch of presentations of the p patterns (trials) is called an epoch. Except in Fig. 14, at the beginning of each trial, the membrane potential of the neuron was reset to 0.8 of the value of the firing threshold h; this value was used in order to allow the neuron to fire even at moments close to the beginning of the trial.
The learning rates that we used were, for E-learning: c~1,250=(n p) pCnF in Fig. 6, c~2,500=(n p) pCnF in Fig. 7, and c~5,000=(n p) pCnF in Figs. 9, 10, 11, 14, 15, 16, and 18. We also used c r~1 5 ms. For I-learning, the learning rates were c~5=p ms in Figs. 6 and 7, and c~20=p ms in Figs. 9 and 18. These values were close to the optimal ones. The inverse proportionality to p reflects the accumulation of the synaptic changes during the presentation of the p patterns. The inverse proportionality with n for E-learning but not for I-learning reflects that the average value of the synaptic efficacies scales inversely proportional to the number of synapses, for about the same behavior of the neuron. In I-learning the changes of synaptic efficacies are proportional to the synaptic current, which is already scaled inversely proportional to the number of synapses as it is proportional to the synaptic efficacy, and thus no scaling with n is needed for the learning rate. We also used t q~1 0 ms.
The I-learning rule implies that changes of synaptic efficacies are proportional to the synaptic current and thus to the values of the synaptic efficacies. Thus, if the initial synaptic efficacies are all positive, they cannot become negative if the learning rates are sufficiently small. The application in batches of synaptic changes or rounding errors may, however, allow a sign change of the synaptic efficacies in a computer simulation. In our simulations with I-learning we enforced that synaptic efficacies stayed positive, by using a hard bound. For E-learning, we allowed the synapses to switch sign, according to the changes suggested by the learning rule.
In Fig. 7, we considered that the actual spike matched the target one if there was exactly one actual spike and its timing was within t q of the target timing. The probability P m that the fired spikes matched the target ones was the number of patterns within a trial for which the actual spikes matched the target one, divided by the total number of patterns, p~10.
In the experiments presented in Figs. 7,8,9,10,11,12,13,14,15,16,17, and 18, we trained the neuron to perform classifications by setting its target output to be the same for several different, randomly generated, inputs. The number c of the different outputs was the number of categories into which the neuron classified the p input patterns. We assigned equal number of patterns into each category, and therefore p was an integer multiple of c. We considered that an input-output association was learned correctly by the trained neuron if the number of the actual output spikes was the one in the target spike train and each of the output spikes was fired within less than 1 ms of the target timing. We considered that the chronotron was able to learn correctly a particular setup if all input-output mappings were learned correctly in no more than 10,000 epochs.
The output used a latency-coded representation of the information. Except in Figs. 11 and 14, the target spike train for each category k[f1, . . . ,cg consisted of one spike at k T=(cz1).
For each realization of the experiments, both the input patterns and the initial synaptic efficacies were generated randomly. In Figs. 9, 10 and 12, for various values of the number of inputs n we increased the load a~p=n until the chronotron was not able to learn correctly all the 500 random realizations of the setup. The capacity for a particular setup was the maximum load for which the chronotron was able to learn correctly that setup, lower than the first load for which the chronotron was not able to learn correctly the setup. In Figs. 11,13,14,15,16, and 18, the capacity was the maximum load for which chronotron was able to learn correctly a particular setup, lower than the first load for which the chronotron was not able to learn correctly more than 1% of the 500 random realizations of the setup. For each setup and load, we recorded the minimum number of epochs e after which the chronotron was able to learn correctly the setup.
For E-learning, simulations for n higher than 2,000 were not performed in Fig. 9 because of the high computational cost, due to the high capacity resulted through this learning rule. For example, the simulations required for obtaining the results presented for n~2,000 took about 13 days on a computer with 8 Xeon cores running in parallel at 2.33 GHz.
For the simulations using ReSuMe in Fig. 9, we used c~75,000=(n p) pC and t R~2 0 ms. These were optimal parameters, that led to the lowest occurrence of cases where correct learning was not achieved for p~21, n~500 (a~0:042), c~3, from a scan of the c, t R parameter space with a resolution of 2,500=(n p) pC and, respectively, 2 ms. We also used a R~0 . We verified that, for n~500, the capacity did not increase if we used nonzero a R , for various values spanning several orders of magnitude.
In Fig. 1, we used w~ (90,70) pC. In Fig. 2 Exploring the dependence on the setup parameters In Fig. 11, we explored the chronotron performance as a function of the number of output spikes per trial, for a setup where the chronotron had to fire the same output for all inputs. The setup was as in Fig. 9, with E-learning and n~500, except that c~1, and that the output consisted of o output spikes, placed at k T=(oz1), for k[f1, . . . ,og.
In Fig. 12, we explored the chronotron performance as a function of the firing rate of the inputs. Here, the input spike trains were generated using a Gamma process of order 3 and time constant t C , i.e. the interspike intervals were generated randomly with a probability distribution, for an interspike interval t, This leads to input spike trains having an average firing rate of 1=t C and an average interspike interval (period) t C . The learning rate was adapted to the input firing rate, c~5,000 (t C =T)=(n p) pCnF. Except the input and the learning rate, the setup was as in Fig. 9, with E-learning and n~500. We studied the performance as a function of the normalized average period w~t C =T. The probability distribution of the number of input spikes per trial, for several values of w, is illustrated in Fig. 20.
In Fig. 13, at the beginning of the experiment, each input spike train was set up as either one spike generated at a random timing, distributed uniformly between 0 and T, as before, or, with a probability P s , of no spikes. Input patterns did not change during learning. We explored the chronotron performance as a function of the no firing probability P s . The learning rate was adapted as c~5,000=(n p)=(1{P s ) pCnF. Except the input and the learning rate, the setup was as in Fig. 9, with E-learning and n~500.
In Fig. 14, we explored the chronotron performance as a function of the timing of the output spike and of the initial state of the membrane potential. The neuron had to learn to have the same output for all inputs. The output was one spike at a given timing y relative to the beginning of the trial. At the beginning of each trial, the membrane potential u was either set to 0:8 h, as in the other experiments (stable initial state), or was generated randomly, with a uniform distribution, between 0 and 0:8 h (random initial state). Except the target output and the initial state of the membrane potential, the setup was as in Fig. 9, with Elearning, n~500, and c~1.
In Fig. 15, we explored the chronotron performance as a function of the trial length T. Except the trial length, the setup was as in Fig. 9, with E-learning and n~500. Since the setup is invariant to a change of the time scale, the relevant parameters are the relative time scales T=t m , T=t s , T=t r , T=t q .
In Fig. 16, we explored the chronotron performance as a function of the reset potential u r . Except the reset potential, the setup was as in Fig. 9, with E-learning and n~500.
In Fig. 17, we used parameters optimized for fast learning for a setup with a relatively low load, p~20, n~1,000 (a~0:02), with c~5. Parameters were optimized to lead to the minimum average number of learning epochs needed for correct learning for this setup. Averages were computed over 500 realizations with random initial conditions and inputs. Inputs and outputs were latencycoded, as in Fig. 9. The parameters that resulted from the optimization were: for E-learning, c~11,800=(n p) pCnF, c r~8 7:5 ms, t q~2 3:5 ms; for I-learning, c~30:5=p ms; for ReSuMe, c~96,000=(n p) pC, t R~1 0 ms, a R~0 .
In Fig. 18, we explored the dependence of chronotron performance on when synapses are updated during the simulation. Synapses were updated by applying the synaptic changes defined by the learning rules and accumulated between the updates. Here we updated the synapses either at the end of each batch (epoch) consisting of presentations of the p input patterns (batch updating), as in the other experiments; at the end of each trial (presentation of one input pattern) (trial updating); or, for I-learning, immediately following each actual or target postsynaptic spikes, as in Fig. 5 (online updating). In trial updating, the order of the presentations of the input patterns was chosen randomly at the beginning of each batch. Except the method for updating synapses, the setup was as in Fig. 9, with E-learning and n~500.

The information capacity of the chronotron
The load a of a neuronal classifier is the number of patterns it memorizes per each input synapse of the neuron. If the neuron has n input synapses and it memorizes p patterns, the load is We define the information load i of a neuronal classifier as the quantity of information it can store for each of the input patterns for which it memorizes the correct output, per each input synapse of the neuron. We assume that the patterns are classified into c categories, and the same number of patterns is assigned to each category. The neuron stores then i~log 2 (c) bits of information for each pattern, and the information load is The information capacity i m of a neuronal classifier is the maximum information load it can carry. It depends on both the maximum load a m it can carry as well as on the maximum quantity of information it can store for each pattern, if they are independent.
For the perceptron and the tempotron, which can classify patterns in just c~2 categories, we have i~1 and thus the information load equals the (pattern) load and the information capacity equals the (pattern) capacity.
For chronotrons with latency coding of their outputs, firing one spike per trial, the information capacity depends on the temporal precision of the output spike and on the duration of the interval in which the output spike can be fired with no loss of capacity. We consider that T 0 is the time interval, at the beginning of each trial, where, if the target spike is located, learning capacity is reduced (see Fig. 14). A chronotron firing one output spike per trial, having a precision of the output spike of +dt, can encode, for a trial duration T, at most c m~( T{T 0 )=(2 dt) categories. The information capacity of the chronotron is then The maximum capacity obtained in our simulations for E-learning was a m &0:22, and simulations showed that this does not depend on the number of categories c (Fig. 10). For T~200 ms, dt~1 ms, T 0 &40 ms, we get the maximum number of categories c m &80, the corresponding information memorized per pattern i m~l og 2 (c m )&6:32 bits per pattern, and the information capacity i m &1:39 bits per input synapse. An even higher capacity can be obtained if we also consider output spike trains consisting of more than one spike per trial. Barak and Tsodyks [57] have developed a learning rule that allows an integrate-and-fire neuron with exponential currents to recognize input patterns from a given set, by increasing its firing rate for learned patterns in comparison to the one for background inputs. The maximum number of patterns that this rule can learn is p m~n t s' =T, where t s' is the decay time constant of the exponential neurons. Thus, the capacity of this rule is a m~pm =n~t s' =T. If we extrapolate this result to neurons with double-exponential currents by assuming that the same relationship applies if we consider the largest time constant of the doubleexponential current, t s in our case, instead of t s' , then the capacity of a neuron for recognizing patterns would be, for our setup, a m~ts =T~0:025. It can be seen then that the capacity that we obtained in simulations through E-learning, about 0.22, for having a particular, precisely-timed spike output pattern for each input, is about an order of magnitude larger than the capacity computed for just the recognition of patterns using a firing rate code.
The algorithm for computing the sets of spikes to be removed, inserted or moved Victor and Purpura [25,115] presented an algorithm for computing the distance between spike trains that they defined, but not one for indicating the pairs of matching spikes (consisting of one spike from each spike train) and the sets of independent spikes that the distance implies. This information represents the structure of the pair of spike trains, as defined by the metric. Here we extend the Victor & Purpura algorithm with the capacity of computing this structure.
When the two spike trains that are compared consist of one that is fixed (the target one) and one that is modifiable (the actual one), as in our supervised learning problem, the setF F Ã of independent spikes in the target spike train corresponds to timings when new spikes should be created in the actual spike train; the set F Ã of independent spikes in the actual spike train represents the spikes that have to be removed; and pairs of matching spikes define the set of actual spikes that have to move and their targets.
The original algorithm [25,115] computes the distance between spike trains inductively, as follows. Let D i, j be the distance between the spike trains composed of the first i spikes of F , F i~f t 1 ,t 2 , . . . t i g, and, respectively, the first j spikes ofF F , F F j~ft t 1 ,t t 2 , . . .t t j g. D i, j is computed as: The elements from which the induction starts are D i, 0~i and D 0, j~j , because it is considered that F 0~F F 0~1 (the distance between a train of i spikes and a train of no spikes is i because all spikes must be removed or correspondents for all must be inserted for a cost of 1 each). If there are n spikes in F andñ n spikes inF F , the algorithm needs to use a nz1 byñ nz1 matrix that stores the D i, j values for the various i and j. The actual distance between the full spike trains is D n,ñ n , the element at the bottom right of the matrix. Because the computation of each D i, j element requires all