STDP allows close-to-optimal spatiotemporal spike pattern
detection by single coincidence detector neurons
Timothée Masquelier∗
CERCO UMR5549 CNRS - Université Toulouse 3, France
Spike-timing-dependent plasticity (STDP), leaky
integrate-and-fire neuron, coincidence detection,
multi-neuron spike sequence, spatiotemporal spike
pattern, unsupervised learning

arXiv:1610.07355v2 [] 9 Jan 2017

Abstract
By recording multiple cells simultaneously, electrophysiologists have found evidence for repeating spatiotemporal spike patterns. In sensory systems in particular, repeating a sensory sequence typically elicits a reproducible
spike pattern, which carries information about the sensory sequence. How this information is extracted by
downstream neurons is unclear. In this theoretical paper, we investigate to what extent a single cell could detect a given spike pattern and what the optimal parameters to do so are, in particular the membrane time constant τ . Using a leaky integrate-and-fire (LIF) neuron
with instantaneous synapses and homogeneous Poisson
input, we were able to compute this optimum analytically. Our results indicate that a relatively small τ (at
most a few tens of ms) is usually optimal, even when the
pattern is much longer. This is somewhat counter intuitive as the resulting detector ignores most of the pattern, due to its fast memory decay. Next, we wondered
if spike-timing-dependent plasticity (STDP) could enable
a neuron to reach the theoretical optimum. We simulated a LIF neuron equipped with additive spike-timingdependent potentiation and homeostatic rate-based depression, and repeatedly exposed it to a given input spike
pattern. As in previous studies, the LIF progressively
became selective to the repeating pattern with no supervision, even when the pattern was embedded in Poisson
activity. Here we show that, using certain STDP parameters, the resulting pattern detector can be optimal. Taken
together, these results may explain how humans can learn
repeating visual or auditory sequences. Long sequences
could be recognized thanks to coincidence detectors working at a much shorter timescale. This is consistent with
the fact that recognition is still possible if a sound sequence is compressed, played backward, or scrambled using 10ms bins. Coincidence detection is a simple yet powerful mechanism, which could be the main function of
neurons in the brain.

1

Electrophysiologists report the existence of repeating spike sequence involving multiple cells, also called
“spatiotemporal spike patterns”, with precision in
the millisecond range, both in vitro and in vivo, lasting from a few tens of ms to several seconds [Tiesinga
et al., 2008]. In sensory systems, different stimuli
evoke different spike patterns (also called “packets”)
[Luczak et al., 2015]. In other words, the spike patterns contain information about the stimulus. How
this information is extracted by downstream neurons
is unclear. Can it be done by neurons only one
synapse away from the recorded neurons? Or are
multiple integration steps needed? Can it be done by
simple coincidence detector neurons, or should other
temporal features, such as spike ranks, be taken into
account? Here we wondered how far we can go with
the simplest scenario: the readout is done by simple coincidence detector neurons only one synapse
away from the neurons involved in the repeating pattern. We demonstrate that this approach can lead
to very robust pattern detectors, provided that the
membrane time constants are relatively short, possibly much shorter than the pattern duration.
In addition, it is known that mere repeated exposure to meaningless sensory sequences facilitates
their recognition afterwards, in the visual [Gold et al.,
2014] and auditory modalities [Agus et al., 2010, Andrillon et al., 2015, Viswanathan et al., 2016], even
when the subjects were unaware of these repetitions.
Thus, an unsupervised learning mechanism must be
at work. It could be the so called spike-timingdependent plasticity (STDP). Indeed, some theoreti-

Keywords:
∗ e-mail:

Introduction

timothee.masquelier@cnrs.fr

1

2 Formal description of the problem

2

cal studies by us and others have shown that neurons the potential with Poisson input (noise period), and
equipped with STDP can become selective to arbi- σnoise its standard deviation (see Figure 1).
trary repeating spike patterns, even without supervision [Gilson et al., 2011, Humble et al., 2012, Hunzinger et al., 2012, Kasabov et al., 2013, Klampfl and
Pattern
Maass, 2013, Krunglevicius, 2015, Masquelier et al.,
2008, 2009, Nessler et al., 2013, Sun et al., 2016, Yger
et al., 2015]. Using numerical simulations, we show
here that the resulting detectors can be close to the
theoretical optimum.

2

Formal description of the problem

We assess the problem of detecting a spatiotemporal
t
spike pattern with a single LIF neuron. Intuitively,
one should connect the LIF to the neurons that are
particularly active during the pattern, or during a
subsection of it. That way, the LIF will tend to be
more activated by the pattern than by some other input. More formally, we note L the pattern duration,
N the number of neurons it involves. We call Strategy #n the strategy which consists in connecting the
LIF to the M neurons that emit at least n spike(s)
during a certain time window ∆t ≤ L of the pattern.
Strategy #1 is illustrated on Figure 1.
We hypothesize that all afferent neurons fire according to an homogeneous Poisson process with rate
f , both inside and outside the pattern. That is the
pattern corresponds to one realization of the Poisson Fig. 1: Detecting a spike pattern with a LIF neuprocess, which can be repeated (this is sometimes reron. (Top) Raster plot of N = 104 neuferred to a “frozen noise”). To model jitter, at each
rons firing according to an homogeneous Poisrepetition a random time lag is added to each spike,
son process. A pattern of duration L can be
drawn from a uniform distribution over [−T, T ] (a
repeated (frozen noise). Here we illustrated
normal distribution is more often used, but it would
Strategy #1, which consists in connecting the
not allow analytical treatment, see next section).
LIF to all neurons that fire at least once durWe also assume that synapses are instantaneous
ing a certain time window of the pattern, with
(i.e. excitatory postsynaptic currents are made of
duration ∆t ≤ L. These neurons emit red
Diracs), which facilitates the analytic calculations.
spikes. Of course they also fire outside of the
For now we ignore the LIF threshold, and we want
∆t window. (Bottom) Typically the LIF’s
to optimize its signal-to-noise ratio (SNR), defined
potential will be particularly high when inas:
tegrating the spikes of the ∆t window, much
Vmax − V noise
higher than with random Poisson inputs, and
,
(1)
SN R =
σnoise
we want to optimize this difference, or more
precisely the signal-to-noise ratio (SNR, see
where Vmax is the maximal potential reached during
text).
the pattern presentation, V noise is the mean value for

3 A theoretical optimum

3

3

A theoretical optimum

3.1

LIF with instantaneous synapses and unitary synaptic weights obeys the following differential equation:

Deriving the SNR analytically

We now want to calculate the SNR analytically. In
this section, we assume unitary synaptic weights.
Since the LIF has instantaneous synapses, and the
X
dV
input spikes are generated with a Poisson
process, we
= −V + τ
δ(t − ti ),
(4)
τ
p
dt
have V noise = τ f M and σnoise = τ f M/2, where τ
i
is the membrane’s time constant [Burkitt, 2006].
The number of selected afferents M depends on
the strategy n. The probability that an afferent fires
k times in the ∆t window is given by the Poisson
k −λ
e
, with where ti are the presynaptic spike times. We first
probability mass function: P(k spikes) = λ k!
λ = f ∆t. The probability that an afferent fires at make the approximation of continuity, and replace
n−1
P λk
the sum of Diracs by an equivalent firing rate R(t):
least n times is thus 1 − e−λ
k! , and finally, on
k=0

average:

M = N 1 − e−λ

n−1
X
k=0

k



λ 
.
k!

(2)

We now need to estimate Vmax . Intuitively, during the ∆t window, the effective input spike rate,
which we call r, is typically higher than f M , because
we deliberately chose the most active afferents. For
example, using Strategy #1 with ∆t = 10 ms ensures that this rate is at least 100Hz per afferent,
even if f is only a few Hz. More formally, Strategy #n discards the afferents that emit fewer than
n spikes. This means on average the number of disn−1
n−1
P kλk
P λk
−λ
carded spikes is N e−λ
k! = N e
(k−1)! =
k=0

Ne

−λ

λ

n−1
P
k=1

λk−1
(k−1)!

= Ne


−λ

λ

k=1

n−2
P

λk
k! .

τ

dV
= −V + τ R(t).
dt

(5)

R(t) should be computed on a time bin which is much
smaller than τ , but yet contains many spikes, to avoid
discretization effects. In other words, this approximation of continuity is only valid for a large number of
spikes in the integration window, that is if rτ >> 1,
which for Strategy #1 leads to N f τ >> 1.
Note that R(t) = f M during the noise period, and
R(t) = r during the ∆t window (in the absence of
jitter).

Thus on average:

At this point it is convenient to introduce the ren−2
X λk
noise
−λ
duced variable v(t) = VV (t)−V
, which obeys the
∞

r = N/∆t λ − e λ
−V noise
k!
following differential equation:
k=0


(3)
n−2
X λk
.
= N f 1 − e−λ
k!
k=0

k=0

∞

We note V = τ r the mean potential of the steady
regime that would be reached if ∆t was infinite. We
now want to compute the transient response. The

τ

dv
= −v + i(t),
dt

(6)

3 A theoretical optimum

4

Now that i(t) is known, one can compute v(t) by integrating Equation 6.
The response of the LIF to an arbitrary current
i(t) is [Tuckwell, 1988]:
v(t) = v0 e

−t/τ

Z
+ 1/τ

t

e−(t−s)/τ i(s) ds.

(7)

0

∆t

With i = at + b, and given that a primitive of tet is
tet − et , the integral can be computed exactly:
v(t) = a + b(t − τ ) + (v0 − a + bτ )e−t/τ .

h=1

h=∆ t / 2T

T

t1

t2

t3

t1

t2

t3

(8)

Note that another jitter distribution than uniform
(e.g. normal), would not lead to a piece-wise linear
function for i(t), and thus would typically not permit
exact integration like here.
h

i
Fig. 2: Jittering the spike pattern. (Top) Raster plots
v
for the M selected afferents. x-axis is time,
and y-axis is spike number (arbitrary, so we
order them in increasing added jitter, which is
a random variable uniformly distributed over
v
max
[−T, T ]). Dashed (resp. solid) lines correv2
sponds to the boundaries of the raster plot
before (resp. after) adding jitter. The left
(resp. right) panel illustrates the ∆t > 2T
case (resp. ∆t < 2T ) (Bottom) We plotv1
ted the corresponding spike time histograms,
or, equivalently, doing the approximation of
continuity, i(t). One can easily compute
0
t1
t1 +t 2 t1 +t 2 +t max
t1 +t 2 +t 3
0
t1 = t3 = min(∆t, 2T ), t2 = |∆t − 2T |, and
h = min(1, ∆t/2T ). One can check that the
trapezoidal area is ∆t whatever T (jittering Fig. 3: i(t) is piece-wise linear. v(t), which lowpass filters i(t), can be computed exactly on
does not add nor remove spikes).
each piece. One can thus compute successively v1 = v(t1 ), v2 = v(t1 + t2 ), v(t) for
M
where i(t) = R(t)−f
is the dimensionless input curr−f M
t1 + t2 < t < t1 + t2 + t3 and its maximum
rent, such as i = 0 during the noise period (when the
vmax , reached for t = t1 + t2 + tmax .
input spike rate is f M ), and i = 1 when the input
spike rate is r).
As illustrated on Figure 3, one can use Equation 8
Without jitter, i(t) would be a simple step func- to compute successively v = v(t ), v = v(t + t ):
1
1
2
1
2
tion, equals to 1 during the ∆t window, and 0 elsewhere. Adding jitter, however, turns i(t) into a trapet1 + τ (e−t1 /τ − 1)
,
(9)
v1 =
zoidal function, which can be calculated (see Fig. 2).
2T

3 A theoretical optimum

5

Simulations
Theory

80

v2 = h + (v1 − h)e

−t2 /τ

.

(10)
70

One can now compute v(t) for t1 + t2 < t < t1 +
t2 + t3 :


t−τ
τ
v(t + t1 + t2 ) = h −
+ v2 − h −
e−t/τ ,
2T
2T
(11)
and differentiate it:


dv(t + t1 + t2 )
1
1
v2 − h −t/τ
=−
+
−
e
.
dt
2T
2T
τ
(12)
This derivative is 0, indicating that v is maximal, for


h − v2
tmax = t1 + t2 + τ log 1 + 2T
.
(13)
τ
One can check that vmax = h − tmax
2T which means
that the maximum is on the trapezoid edge, which is
logical: before the crossing i > v, so v increases; after
the crossing i < v, so v decreases. Plugging the tmax
value into Equation 11, and expliciting all variables,
we have:


∆t
vmax = min 1,
2T


τ
−
log 1 − e− max(∆t,2T )/τ + e−|∆t−2T |/τ .
2T
(14)
One can check that if T << τ and T << ∆t, then
vmax ∼ 1 − e−∆t/τ , which is the classical response of
a LIF to a step current.
From the definition of v: Vmax − V noise =
vmax (V ∞ − V noise ). We now have everything we need
to compute the signal to noise ratio:
V ∞ − V noise
σnoise
v
n−1 u
2τ N f
u
−λ λ
= vmax e
.
u
n−1
P λk
(n − 1)! t
−λ
1−e
k!

SN R = vmax

60

SNR

50

40

30

20

10

0

1

2

Strategy

Fig. 4: Numerical validation of the theoretical SNR
values, for strategies 1 and 2. Error bars show
±1 s.d.

and integrated Equation 4 using the forward Euler
method with a 0.1ms time bin. We generated 100
random Poisson patterns of duration L = 20ms, involving N = 104 neurons with rate f = 5Hz. We
chose ∆t = L = 20ms, i.e. the LIF was connected to
all the afferents that emitted at least n spikes during
the whole pattern, n being the strategy number. In
order to estimate Vmax , each pattern was presented
1000 times, every 400ms. Between pattern presentations, the afferents fired according to a Poisson process, still with rate f = 5Hz, which allowed to estimate V noise and σnoise . We could thus compute the
SNR from Equation ?? (and its standard deviation
across the 100 patterns), which, as can be seen on
(15) Figure 4, matches very well the theoretical values,
for strategies 1 and 2.

k=0

3.3
3.2

Numerical validation

Optimizing the SNR

We now want to optimize the SNR given by EquaWe verified the exact Equation 15 through numer- tion 15. We consider that f and T are external
ical simulations. We used a clock-based approach, variables, and that we have the freedom to choose

3 A theoretical optimum

A
100

6

B

Strategy

τ
5

1s

100

4

100ms

3

f (Hz)

10

f (Hz)

10

1

10ms

1
2

0.1
0.0001 0.001

0.01

0.1

100

0.1
0.0001 0.001

1

T (s)

C

1ms

1.3

0.1

100

SNR
80

1.25

10

1.1

f (Hz)

f (Hz)
1

70

10

1.2
1.15

60
50

1

40

1.05

0.1
0.0001 0.001

0.01

0.1

1

T (s)

0.1ms

T (s)

D

∆t/τ

0.01

0.1
0.0001 0.001

30

0.01

0.1

T (s)

Fig. 5: Optimal parameters, as a function of f and T . (A) Optimal strategy. For clarity we only computed
strategies 1..5, but it is clear that higher numbers would be optimal for large f and T . (B) Optimal
τ (note the logarithmic colormap). (C) Optimal ∆t, divided by τ . (D) Resulting SNR.
the strategy number n, τ and ∆t. We also add the
constraint τ f M ≥ 10, so that the approximation of
continuity is reasonable, even in the noise periods.
We assume that L is sufficiently large so that an upper bound for ∆t is not needed. We used the Matlab R2015b Optimization Toolbox (MathWorks Inc.,
Natick, MA, USA) to compute the optimum numerically.
Figure 5 illustrates the results. One can make the
following observations:
• Strategy #1 is usually the best for f and T in
the biological ranges (see below), while higher
numbers are optimal for very large f and T (see
panel A). This means that emitting a single spike
is already a significant event, that should not be
ignored. We will come back to this point in the
discussion.

• Unsurprisingly, optimal τ and ∆t typically have
the same order of magnitude (∆t being slightly
larger, see panel C). Unless T is high (>10ms),
or f is low (<1Hz), then these timescales should
be relatively small (at most a few tens of ms).
This means that even a long pattern (hundreds
of ms or above) is optimally detected by a coincidence detector working at a shorter timescale.
This could explain the apparent paradox between typical ecological stimulus durations (hundreds of ms or above) and the neuronal integration timescales (at most a few tens of ms).
• The constraint τ f M ≥ 10 imposes larger τ when
both f and T are small (panel B, lower left). In
the other cases, it is naturally satisfied.
• Unsurprisingly, the optimal SNR decreases with
T . What is more surprising, is that it also de-

4 Simulations show that STDP can be close-to-optimal

creases with f . In other words, sparse activity
is preferable. We will come back to this point in
the discussion.

7

4
4.1

What is the biological range for f and T ? It is
worth mentioning that f is probably largely overestimated in the electrophysiological literature, because the technique totally ignores the cells that do
not fire. Furthermore, experimentalists tend to select the most responsive cells, and search for stimuli
that elicit strong responses. Mean firing rates, averaged across time and cells, could be smaller than 1
Hz [Shoham et al., 2006].
T corresponds to the spike time precision. Millisecond precision in cortex has been reported [Havenith
et al., 2011, Kayser et al., 2010, Panzeri and Diamond, 2010]. We are aware that other studies found
poorer precision, but this could be due to uncontrolled variable or the use of inappropriate reference
times [Masquelier, 2013].
We now focus, as an example, on the point on the
middle of the T × f plane, whose parameters are
gathered in Table 1. The resulting SNR is very high
(about 80). In other words, it is possible to choose
a threshold for the LIF which will be reached when
the pattern is presented, but hardly ever in the noise
periods.
In the next section, we investigated, through numerical simulations, if STDP can find this optimum.
More specifically, since STDP does not adjust τ , we
set it to the optimal value in Table 1 and investigated
whether STDP could lead to the optimal n and ∆t.

Simulations show that STDP can be
close-to-optimal
Set-up

The set up we used was similar to the one of our previous studies [Gilson et al., 2011, Masquelier et al.,
2008]. We simulated a LIF neuron connected to all of
the N = 104 afferents with plastic synaptic weights
wi ∈ [0, 1], obeying the following differential equation:
τ

X
dV
wi (tij )δ(t − tij ),
= −V + τ
dt
i,j

(16)

Initial synaptic weights were all equal. Then these
synaptic weights evolved in [0, 1] with additive, all-toall spike STDP like in Song et al. [2000]. Yet we only
modeled the Long Term Potentiation part of STDP,
ignoring its Long Term Depression (LTD) term. Here
LTD was modeled by a simple homeostatic term
wout < 0, which is added to each synaptic weight
at each postsynaptic spike [Kempter et al., 1999].
Note that using a spike-timing-dependent LTD, could
also lead to the detection of a repeating pattern, as
demonstrated in our earlier studies [Masquelier et al.,
2008, 2009], but less robustly, because it is more difficult to depress the synapses corresponding to afferents that do not spike in the repeating pattern.
As in Song et al. [2000], at each synapse i, we introduce the trace of presynaptic spikes Aipre , which
obeys the following differential equation:
τpre

dAipre
= −Aipre .
dt

(17)

Furthermore:
Tab. 1: Numerical parameters. First two lines correspond to external parameters, the rest of
• At each presynaptic spike: Aipre → Aipre + δApre .
them are parameters to optimize.
• At each postsynaptic spike: wi → wi + Aipre +
Parameter Value
wout for i = 1..N , then the weights are clipped
T
3.2ms
in [0,1].
f
3.2Hz
Optimal τ
18ms
We used δApre = 0.01 and τpre = 20ms, while wout
Optimal ∆t 23ms
and the LIF threshold θ were systematically varied
Optimal n
1
(see below). The refractory period was ignored for
simplicity.

4 Simulations show that STDP can be close-to-optimal

We used a clock-based approach, and integrated
Equations 16 and 17 using the forward Euler method
with a 0.1ms time bin. The Matlab code for these
simulations will be made available in ModelDB [Hines
et al., 2004] once this paper is accepted in a peerreviewed journal.
We now describe the way the input spikes were
generated. Between pattern presentations, the input
spikes were generated randomly with a homogeneous
Poisson process with rate f (see Table 1). The spike
pattern with duration L = 100ms was generated only
once using the same Poisson process (frozen noise).
The pattern presentations occurred every 400ms (in
previous studies, we demonstrated that irregular intervals did not matter [Gilson et al., 2011, Masquelier et al., 2008], so here regular intervals were used
for simplicity). At each pattern presentation, all the
spike times were shifted independently by some random jitters uniformly distributed over [−T, T ] (see
Table 1).

4.2

Results: two optimal modes

The theory developed in the previous sections ignored
the LIF threshold (a difference of unconstrained potential was maximized). But in the simulations, one
needs a threshold to have postsynaptic spikes, necessary for STDP. Since we did not know which threshold values θ could lead to the optimal ∆t, we performed an exhaustive search over threshold values,
using a geometric progression with a 1.1 ratio. Note
that (from Equation 16) the threshold θ can be interpreted as the number of synchronous presynaptic
spikes needed to reach the threshold from the resting
potential if these spikes arrive through maximally reinforced synapses (w = 1).
We also used a geometric progression with a 1.1
ratio to search for wout . This parameter tunes the
strength of the LTD relative to the LTP, and thus influences the number of reinforced synapses after convergence. For each θ × wout point, 100 simulations
were performed with different random patterns, and
computed the proportion p of “optimal” ones (see
below for the definition).
The initial weights were computed such as V noise =
θ + 2σnoise (leading to an initial firing rate of about

8

20Hz, see Fig. 6 top). After 500 pattern presentations, the synaptic weights converged by saturation.
That is synapses were either completely depressed
(w = 0), or maximally reinforced (w = 1), as usual
with additive STDP [Gütig et al., 2003, Song et al.,
2000, van Rossum et al., 2000]. A simulation was
considered optimal if the reinforced synapses did correspond to a set of afferents which fired at least once
(Strategy #1) in a subsection of the pattern, whose
duration had to match the optimal ∆t window of the
pattern given in Table 1 (with a 10% margin). In
practice this subsection typically corresponded to the
beginning of the pattern, because STDP tracks back
through the pattern [Gilson et al., 2011, Masquelier
et al., 2008], but this is irrelevant here.
We found two optimal modes (see Fig. 6). The
first one, with a high threshold (θ = 370) and strong
LTD (wout = −3.5 10−3 ) led to 1 postsynaptic spike
at each pattern presentation (as in our previous studies [Gilson et al., 2011, Masquelier et al., 2008, 2009]).
For this mode, p = 51%. The second mode, with a
lower threshold (θ = 250) and weaker LTD (wout =
−1.6 10−3 ) led to 2 postsynaptic spikes at each pattern presentation, and p = 87% (the lower threshold
increases the probability of false alarms during the
noise period, but this problem could be solved by requiring two consecutive spikes for pattern detection).
Figure 6 illustrates an optimal simulation for both
modes. We conclude that for most patterns, STDP
can turn the LIF neuron into an optimal, or close-tooptimal pattern detector.
Detection is optimal only after convergence (i.e.
weight binarization), which takes time (about 500
pattern presentations). This is because the learning
rate we used is weak (δApre = 0.01, in other words,
the maximal weight increase caused by one pair of
pre- and post-synaptic spike is only 1% of the maximal weight), as in other theoretical studies and in accordance with experimental measurements [Masquelier et al., 2008, 2009, Song et al., 2000, Yger et al.,
2015]. By using a higher rate, it is possible to converge faster, at the expense of the robustness. For
example with δApre = 0.02, convergence occurs in
∼ 250 pattern presentations, but p decreases to 44%
and 80% for modes #1 and #2 respectively. In any
case, it is worth mentioning that (suboptimal) selec-

5 Discussion

tivity emerges way before convergence (e.g. around
t ∼ 5s, or ∼ 12 pattern presentations in Figure 6).
Critically, for successful learning the pattern presentation rate must be high in the early phase of
learning, before selectivity emerges. For example presenting the pattern every 800ms instead of 400ms
leads to p = 33% and 43% for modes #1 and #2
respectively. Once selectivity has emerged, this rate
has much less impact, since the neuron tends to fire
(and thus changes its weights) only at pattern presentations, whatever the intervals between them.

5

Discussion

One of the main result of this study is that even a long
pattern (hundreds of ms or above) is optimally detected by a coincidence detector working at a shorter
timescale (tens of ms), and which thus ignores most
of the pattern. One could have thought that using
τ ∼ L, to integrate all the spikes from the pattern
would be the best strategy. Instead, it is more optimal to use a subpattern as the signature for the whole
pattern (see Fig. 5).
We also demonstrated that STDP can find the optimal signature in an unsupervised manner, by mere
pattern repetitions. Note that the problem that
STDP solves here is similar to the one addressed
by the Tempotron [Gütig and Sompolinsky, 2006],
which finds the best spike coincidence to separate two
(classes of) patterns, by emitting or not a postsynaptic spike. Recently, the framework has been extended
to fire more than one spike per pattern [Gütig, 2016],
like here (e.g. Neuron #2 in Fig. 6). Yet these mechanisms require supervision.
In this work we only considered single cell readout.
But of course in the brain, it is likely that a population of cells is involved, and these cells could learn different subpatterns (lateral inhibition could encourage
them to do so [Masquelier et al., 2009]). If each cell
is selective to a subpart of the repeating pattern, how
can one make a full pattern detector? One solution is
to use one downstream neuron with appropriate delay
lines [Carr and Konishi, 1988]. Specifically, the conduction delays should compensate for the differences
of latencies, so that the downstream neuron receives

9

the input spikes simultaneously if and only if the subpatterns are presented in the correct order. Another
solution would be to convert the spatiotemporal firing pattern into a spatial one, using neuronal chains
with delays as suggested by Tank and Hopfield [Tank
and Hopfield, 1987]. Such a spatial pattern – a set of
simultaneously active neurons – can then be learned
by one downstream neuron equipped with STDP, and
fully connected to the neuronal chains, as demonstrated in Larson et al. [2010].
It is also conceivable that the whole pattern is detected based on the mere number of subpattern detectors’ spikes, ignoring their times. Two studies in the
human auditory system are consistent with this idea:
after learning meaningless white noise sounds, recognition is still possible if the sounds are compressed
or played backward [Agus et al., 2010], or chopped
into 10ms bins that are then played in random order [Viswanathan et al., 2016].
Our theoretical study suggests that synchrony is
an important part of the neural code [Stanley et al.,
2012], that it is computationally efficient [Brette,
2012, Gütig and Sompolinsky, 2006], and that coincidence detection is the main function of neurons [Abeles, 1982, König et al., 1996]. In line with
this proposal, neurons in vivo appear to be mainly
fluctuation-driven, not mean-driven [Brette, 2012,
2015]. It remains unclear if other spike time aspects
such as ranks [Thorpe and Gautrais, 1998] also matter.
Our results show that, somewhat surprisingly,
lower firing rates lead to better signal-to-ratio. This
could explain why average firing rates are so low in
brain, possibly smaller than 1 Hz [Shoham et al.,
2006]. It seems like neurons only fire when they need
to signal an important event, and that every spike
matters [Wolfe et al., 2010].

Acknowledgments
This research received funding from the European
Research Council under the European Unions 7th
Framework Program (FP/2007-2013) / ERC Grant
Agreement n.323711 (M4 project). We thank Saeed
Reza Kheradpisheh and Matthieu Gilson for the

5 Discussion

many insightful discussion we had about this work.

References
Abeles, M. (1982). Role of the cortical neuron: integrator or
coincidence detector? Isr J Med Sci., 18(1):83–92.
Agus, T. R., Thorpe, S. J., and Pressnitzer, D. (2010). Rapid
formation of robust auditory memories: insights from noise.
Neuron, 66(4):610–618.
Andrillon, T., Kouider, S., Agus, T., and Pressnitzer, D.
(2015). Perceptual learning of acoustic noise generates
memory-evoked potentials. Current Biology, 25(21):2823–
2829.

10

Hines, M. L., Morse, T., Migliore, M., Carnevale, N. T., and
Shepherd, G. M. (2004). ModelDB: A Database to Support Computational Neuroscience. Journal of computational neuroscience, 17(1):7–11.
Humble, J., Denham, S., and Wennekers, T. (2012). Spatiotemporal pattern recognizers using spiking neurons and
spike-timing-dependent plasticity. Frontiers in computational neuroscience, 6(October):84.
Hunzinger, J. F., Chan, V. H., and Froemke, R. C.
(2012). Learning complex temporal patterns with resourcedependent spike timing-dependent plasticity. Journal of
Neurophysiology, 108(2):551–566.

Brette, R. (2012). Computing with neural synchrony. PLoS
computational biology, 8(6):e1002561.

Kasabov, N., Dhoble, K., Nuntalid, N., and Indiveri, G. (2013).
Dynamic evolving spiking neural networks for on-line spatioand spectro-temporal pattern recognition. Neural networks
: the official journal of the International Neural Network
Society, 41(1995):188–201.

Brette, R. (2015). Philosophy of the Spike: Rate-Based vs.
Spike-Based Theories of the Brain. Frontiers in Systems
Neuroscience, 9(November):1–14.

Kayser, C., Logothetis, N. K., and Panzeri, S. (2010). Millisecond encoding precision of auditory cortex neurons. Proc
Natl Acad Sci U S A, 107(39):16976–16981.

Burkitt, A. N. (2006). A review of the integrate-and-fire neuron
model: I. Homogeneous synaptic input. Biological Cybernetics, 95(1):1–19.

Kempter, R., Gerstner, W., and van Hemmen, J. L. (1999).
Hebbian learning and spiking neurons.
Phys Rev E,
59(4):4498–4514.

Carr, C. E. and Konishi, M. (1988). Axonal delay lines for
time measurement in the owl’s brainstem. Proc Natl Acad
Sci U S A, 85(21):8311–8315.

Klampfl, S. and Maass, W. (2013). Emergence of Dynamic
Memory Traces in Cortical Microcircuit Models through
STDP. Journal of Neuroscience, 33(28):11515–11529.

Gilson, M., Masquelier, T., and Hugues, E. (2011). STDP
allows fast rate-modulated coding with Poisson-like spike
trains. PLoS computational biology, 7(10):e1002231.
Gold, J. M., Aizenman, A., Bond, S. M., and Sekuler, R.
(2014). Memory and incidental learning for visual frozen
noise sequences. Vision research, 99:19–36.
Gütig, R. (2016). Spiking neurons can discover predictive
features by aggregate-label learning. Science (New York,
N.Y.), 351(6277):aab4113.
Gütig, R., Aharonov, R., Rotter, S., and Sompolinsky, H.
(2003). Learning input correlations through nonlinear
temporally asymmetric Hebbian plasticity. J Neurosci,
23(9):3697–3714.
Gütig, R. and Sompolinsky, H. (2006). The tempotron: a neuron that learns spike timing-based decisions. Nat Neurosci,
9(3):420–428.
Havenith, M. N., Yu, S., Biederlack, J., Chen, N.-H., Singer,
W., and Nikolic, D. (2011). Synchrony makes neurons fire in
sequence, and stimulus properties determine who is ahead.
J Neurosci, 31(23):8570–8584.

König, P., Engel, A. K., and Singer, W. (1996). Integrator
or coincidence detector? The role of the cortical neuron
revisited. Trends Neurosci, 19(4):130–7.
Krunglevicius, D. (2015).
Competitive STDP Learning
of Overlapping Spatial Patterns. Neural Computation,
27(8):1673–1685.
Larson, E., Perrone, B. P., Sen, K., and Billimoria, C. P.
(2010). A robust and biologically plausible spike pattern
recognition network. J Neurosci, 30(46):15566–15572.
Luczak, A., McNaughton, B. L., and Harris, K. D. (2015).
Packet-based communication in the cortex. Nature Reviews
Neuroscience, 16(12):745–755.
Masquelier, T. (2013). Neural variability, or lack thereof. Frontiers in Computational Neuroscience, 7:1–7.
Masquelier, T., Guyonneau, R., and Thorpe, S. J. (2008).
Spike timing dependent plasticity finds the start of repeating patterns in continuous spike trains. PLoS ONE,
3(1):e1377.
Masquelier, T., Guyonneau, R., and Thorpe, S. J. (2009).
Competitive STDP-Based Spike Pattern Learning. Neural
Comput, 21(5):1259–1276.

5 Discussion

Nessler, B., Pfeiffer, M., Buesing, L., and Maass, W. (2013).
Bayesian Computation Emerges in Generic Cortical Microcircuits through Spike-Timing-Dependent Plasticity. PLoS
Computational Biology, 9(4):e1003037.
Panzeri, S. and Diamond, M. E. (2010). Information carried
by population spike times in the whisker sensory cortex can
be decoded without knowledge of stimulus time. Frontiers
in Synaptic Neuroscience, 2(17):1–14.
Shoham, S., O’Connor, D. H., and Segev, R. (2006). How silent
is the brain: is there a ”dark matter” problem in neuroscience? Journal of comparative physiology. A, Neuroethology, sensory, neural, and behavioral physiology, 192(8):777–
84.
Song, S., Miller, K. D., and Abbott, L. F. (2000). Competitive
hebbian learning through spike-timing-dependent synaptic
plasticity. Nat Neurosci, 3(9):919–926.
Stanley, G. B., Jin, J., Wang, Y., Desbordes, G., Wang, Q.,
Black, M. J., and Alonso, J.-M. (2012). Visual orientation
and directional selectivity through thalamic synchrony. The
Journal of neuroscience : the official journal of the Society
for Neuroscience, 32(26):9073–88.
Sun, H., Sourina, O., and Huang, G.-B. (2016). Learning
Polychronous Neuronal Groups Using Joint Weight-Delay
Spike-Timing-Dependent Plasticity. Neural Computation,
28(10):2181–2212.
Tank, D. W. and Hopfield, J. J. (1987). Neural computation
by concentrating information in time. Proc Natl Acad Sci
U S A, 84(7):1896–1900.
Thorpe, S. J. and Gautrais, J. (1998). Rank Order Coding. In
Bower, J. M., editor, Computational Neuroscience : Trends
in Research, pages 113–118. New York: Plenum Press.
Tiesinga, P., Fellous, J.-M., and Sejnowski, T. J. (2008). Regulation of spike timing in visual cortical circuits. Nat Rev
Neurosci, 9(2):97–107.
Tuckwell, H. C. (1988). Introduction to theoretical neurobiology - volume 1.
van Rossum, M. C., Bi, G. Q., and Turrigiano, G. G. (2000).
Stable Hebbian learning from spike timing-dependent plasticity. J Neurosci, 20(23):8812–8821.
Viswanathan, J., Rémy, F., Bacon-Macé, N., and Thorpe, S.
(2016). Long term memory for noise: evidence of robust
encoding of very short temporal acoustic patterns. Frontiers
in Neuroscience, 10:490.
Wolfe, J., Houweling, A. R., and Brecht, M. (2010). Sparse and
powerful cortical spikes. Curr Opin Neurobiol, 20(3):306–
312.
Yger, P., Stimberg, M., and Brette, R. (2015). Fast Learning
with Weak Synaptic Plasticity. Journal of Neuroscience,
35(39):13351–13362.

11

5 Discussion

12

Initial state:

During learning:

1

1.4

0

t (s)

1

8

After convergence:

201.4

t (s)

Neuron 1

1

Weight hist.

10 4

0

0

0.1

0

0.5

1

10

Neuron 2

4

10

Weight hist.

4

Afferent

4

1

0.5

t (s)

Afferent

Potential
0
200

1

0.1

t (s)
10

0

Afferent
0

t (s)
400

0

0.1

Neuron 2

10 4

Afferent
2

0

t (s)

Neuron 1

10 4

Potential
0

1

0.1

t (s)

400

Weight hist.

10 4

Afferent

Potential
0

Neuron 2

10 4

Afferent

Neuron 1
Neuron 2

0

Neuron 1

10 4

400

0

0.1

t (s)

1

0

0.1

0

0

0.5

1

t (s)

Fig. 6: Unsupervised STDP-based pattern learning. Neuron #1 and #2 illustrate modes #1 and #2 respectively. (Top) Initial state. On the left, we plotted the potential of each neuron as a function of
time. Cyan rectangles indicate pattern presentations. Next, we represented the weights corresponding to the rightmost time point in two different ways. First, we plotted the spike pattern, coloring
the spikes as a function of the corresponding synaptic weight for each neuron: blue for low weight,
purple for intermediate weight, and red for high weight. Initial weights were uniform (we used 0.68
for Neuron #1 and 0.47 for Neuron #2, in order to have V noise = θ + 2σnoise ). We also plotted the
weight histogram for each neuron. (Middle) During learning. Selectivity emerges at t ∼ 5s, after ∼
12 pattern presentations. Yet the weights still have intermediate values, leading to suboptimal SNR.
(Bottom) After convergence. For both neurons, STDP has concentrated the weights on the afferents
which fire at least once in a ∼ 23 ms long window, located at the beginning of the pattern. This
results in 1 and 2 postsynaptic spikes for Neuron #1 and #2 respectively each time the pattern is
presented. Elsewhere both V noise and σnoise are law, resulting in optimal SNR.

