recordings of spatio - temporal activity are ubiquitous in many scientific disciplines . among the most prominent examples are large - scale electrophysiological measurements of neuronal firing patterns in experimental neuroscience @xcite and sensor data acquisition in seismology @xcite , oceanography @xcite , meteorology @xcite , or climatology @xcite .
other examples include interaction protocols in social communication @xcite or monitoring single - node dynamics in network science @xcite .    in all of these fields recordings
often exhibit well - defined patterns of spatio - temporal propagation where some prominent feature first appears at a specific location and then spreads to other areas until potentially becoming a global event .
such characteristic propagation patterns occur in phenomena such as avalanches @xcite , tsunamis @xcite , chemical waves and diffusion processes @xcite , and epileptic seizures @xcite .
further examples are the epidemic transmission of diseases @xcite , and , more recently , the spreading of memes on social networks @xcite or in science @xcite .    in many cases
spatio - temporal recordings can be represented as a two - dimensional plot where for each recording site the occurrence of certain discrete events ( often obtained from threshold crossings in continuous data ) are indicated by time markers . in neuroscience
such a plot is known as a raster plot . a sequence of stereotypical neuronal action potentials ( _ spikes _
, @xcite , @xcite ) is a _ spike train _ and a set of spike trains exhibiting perfectly consistent repetitions of the same global propagation pattern is called a _ synfire pattern_. in this paper we adapt this terminology and use all of these expressions not only in the context of neuronal spikes but also for any other kind of discrete events .
however , note that our use of the term ` synfire pattern ' differs slightly from the literature ( see e.g. @xcite , @xcite ) . here
we define a synfire pattern as a sequence of global events in which all neurons fire in consistent order and the interval between successive events is at least twice as large as the propagation time within an event .
an example of a rasterplot with spike trains forming a perfect synfire pattern is shown in fig .
[ fig : spike_order_motivation_fig1]a
.    for any spike train set exhibiting propagation patterns the questions arises naturally whether these patterns show any consistency , i.e. , to what extent do the spike trains resemble a synfire pattern , are there spike trains that consistently lead global events and are there other spike trains that invariably follow these leaders ?
such questions about leader - follower dynamics have been specifically investigated not only in neuroscience @xcite , but also in fields as wide - ranging as , e.g. , climatology @xcite , social communication @xcite , and human - robot interaction @xcite .
motivation for spike - order and spike train order .
a. perfect synfire pattern .
b. unsorted set of spike trains . c. the same spike trains as in b but now sorted from leader to follower.,width=321 ]    in this study
we introduce a framework consisting of two directional measures ( _ spike - order _ and _ spike train order _ ) that allows to define a value termed _ synfire indicator _ which quantifies the consistency of the leader - follower relationships .
this synfire indicator attains its maximal value of @xmath0 for a perfect synfire pattern in which all neurons fire repeatedly in a consistent order from leader to follower ( fig .
[ fig : spike_order_motivation_fig1]a ) .
the same framework also allows to sort multiple spike trains from leader to follower , as illustrated in figs .
[ fig : spike_order_motivation_fig1]b and [ fig : spike_order_motivation_fig1]c .
this is meant purely in the sense of temporal sequence . whereas fig .
[ fig : spike_order_motivation_fig1]b shows an artificially created but rather realistic spike train set , in fig .
[ fig : spike_order_motivation_fig1]c the same spike trains have been sorted to become as close as possible to a synfire pattern .
now the spike trains that tend to fire first are on top whereas spike trains with predominantly trailing spikes are at the bottom .
we demonstrate the new approach using artificially generated datasets before we apply it to analyze the consistency of propagation patterns in two real datasets from very different fields of research , neuroscience and climatology .
the neurophysiological dataset consists of neuronal activity recorded from mice brain slices .
these recordings typically exhibit a sequence of global events termed giant depolarized potentials ( gdps ) and one of the main questions we investigate is whether it is possible to identify neurons that consistently lead these events ( potential hub neurons , see @xcite , @xcite ) .
the climate dataset uses optimum interpolated sea surface temperature ( oisst ) data provided by the national oceanic and atmospheric administration ( noaa ) to follow the el nio phenomenon in the central pacific region ( @xcite , @xcite ) over the range of @xmath1 years , from 1982 to 2016 .
we employ a threshold criterion to track the el nio events and then quantify the consistency of the longitudinal movement of the propagation front .
the remainder of the article is organized as follows : in the methods ( section [ s : measures ] ) we first describe the coincidence detection ( section [ ss : coincidence - detection ] ) and the symmetric measure spike - synchronization ( section [ ss : spike - synchronization ] ) .
subsequently , we introduce the new directionality approach consisting of the two measures spike - order and spike train order ( section [ ss : spike - order ] ) as well as the synfire indicator ( section [ ss : synfire - indicator ] ) before we discuss the use of spike - order surrogates to evaluate the statistical significance of the results in section [ ss : statistical - significance ] .
the results section [ s : results ] consists of three subsections detailing applications of the new approach to artificially generated datasets ( section [ ss : results - sim ] ) , neurophysiological data ( section [ ss : results - neuro ] ) and climate data from the el nio phenomenon ( section [ ss : results - climate ] ) .
conclusions are drawn in section [ s : discussion ] .
finally , both real datasets are described in the appendix , the electrophysiological recordings in appendix [ app - s : hm - data ] , and the el nio dataset ) in appendix [ app - s : elnino - data ] .
analyzing leader - follower relationships in a spike train set requires a criterion that determines which spikes should be compared against each other .
what is needed is a match maker , a method which pairs spikes in such a way that each spike is matched with at most one spike in each of the other spike trains .
this match maker already exists .
it is the adaptive coincidence detection first used as the fundamental ingredient for the bivariate measure _ event synchronization _
( @xcite , @xcite , @xcite , @xcite ) .
event synchronization itself is symmetric and quantifies the overall level of synchrony from the number of quasi - simultaneous appearances of spikes .
it was proposed along with an asymmetric measure termed _ delay asymmetry _ which evaluates the temporal order among matching spikes in the two spike trains .
however , unfortunately both event synchronization and delay asymmetry are defined for the bivariate case of two spike trains only , rely on sampled time profiles , and have a very non - intuitive normalization . for the symmetric variant we have already addressed these issues by proposing _
spike - synchronization _
@xcite , a renormalized multivariate extension of event synchronization .
the two new measures spike - order and spike train order proposed here improve and extend the asymmetric measure delay asymmetry in the same way .
in particular , instead of just quantifying bivariate directionality they open up a completely new application , since they allow us to sort the spike trains according to the typical relative order of their spikes and to quantify the consistency of this order using the synfire indicator .    all four approaches ( bivariate / multivariate , symmetric / asymmetric ) are time - resolved as well as parameter- and scale - free .
their calculation consists of two steps , adaptive coincidence detection followed by a combination of normalization and windowing .
the first step , adaptive coincidence detection , is the same for all of these measures .
most coincidence detectors rely on a coincidence window of fixed size @xmath2 @xcite . however , since in many cases it is very difficult to judge whether two spikes are coincident or not without taking the local context into account ( see fig .
[ fig : spike_order_coincidence - detection_comb]a for an example ) , @xcite proposed a more flexible coincidence detection .
this coincidence detection is scale- and thus parameter - free since the minimum time lag @xmath3 at which two spikes @xmath4 and @xmath5 of spike trains @xmath6 and @xmath7 are no longer considered to be synchronous is adapted to the local firing rates according to @xmath8    for some applications it might be appropriate to additionally introduce a maximum coincidence window @xmath9 as a parameter .
this way additional knowledge about the data ( such as typical propagation speed ) can be taken into account in order to guarantee that two coincident spikes are really part of the same propagation front .
such a maximum coincidence window will be used in the application to the el nio climate data in section [ ss : results - climate ] .      in normalization and windowing spike - synchronization @xcite
has evolved so substantially from event synchronization that here we refrain from going into any detail on the original measure , but rather just mention the main improvements . for a thorough introduction to event synchronization
please refer to the original paper @xcite , a more detailed comparison of the two measures can be found in @xcite .
the main difference is that spike - synchronization @xcite results in a discrete , not a continuous , spike - timing based profile .
the coincidence criterion is quantified by means of a coincidence indicator @xmath10 ( and analogously for @xmath11 ) which assigns to each spike either a one or a zero depending on whether this spike is part of a coincidence or not . note that here , unlike for event synchronization , the minimum function and the @xmath12 guarantee that a spike can at most be coincident with one spike ( the nearest one ) in the other spike train . in case
a spike is right in the middle between two spikes from the other spike train there is no ambiguity since this spike is not coincident with either one of them .
( a ) this example demonstrates the usefulness of an adaptive coincidence detection . depending on context the same two spikes ( left )
can appear as coincident ( right , top ) or as non - coincident ( right , bottom ) .
( b ) illustration of the adaptive coincidence detection . for clarity spikes and their coincidence windows are shown alternatively in bright and dark color .
the first step assigns to each spike @xmath4 of the first spike train a potential coincidence window which does not overlap with any other coincidence window : @xmath13 .
thus any spike from the second spike train can at most be coincident with one spike from the first spike train .
small vertical lines mark the times right in the middle between two spikes , and a line is dashed when it does not mark the edge of a coincidence window .
( c ) in the same way a coincidence window @xmath14 is defined for spike @xmath5 from the second spike train . for two spikes to be coincident they both have to lie in each other s coincidence window which means that their absolute time difference has to be smaller than @xmath15 ( which is equivalent to the shorter definition found in eq .
[ eq : coincidence - maxdist ] ) .
for the two spikes @xmath4 and @xmath5 on the left side this is the case , whereas the spikes on the right side are not coincident.,width=321 ]    this unambiguity , illustrated in fig .
[ fig : spike_order_coincidence - detection_comb]b , is the essential property which allows the adaptive coincidence detection to act as a match - maker for the subsequent application of spike - synchronization .
[ fig : spike_order_coincidence - detection_comb]c shows examples , one with two coincident and one with two non - coincident spikes .     spike - synchronization .
note that the profile @xmath16 is defined only at the times of the spikes but a better visualization is achieved by connecting the individual dots . by construction
the pooled spike train of these examples is identical consisting of @xmath17 evenly spaced bursts .
the only difference is the distribution of the spikes among the individual spike trains which varies from maximum to minimum via intermediate synchrony .
spike - synchronization correctly indicates these changes .
( a ) maximum reliability results in the value one over the whole time interval .
each spike train contains one spike per firing event .
( b ) synfire pattern of bursts resulting in minimum reliability corresponding to the value zero for the whole time interval .
( c ) a random distribution of spikes among spike trains yields intermediate values.,width=321 ]    a multivariate version of spike - synchronization can be defined by generalizing the bivariate coincidence detection of eq .
[ eq : bi12-spike - synchronization ] to all pairs of spike trains @xmath18 with @xmath19 and @xmath20 denoting the number of spike trains : @xmath21 here @xmath22 is defined equivalent to eq .
[ eq : coincidence - maxdist ] .
subsequently , for each spike of every spike train a normalized coincidence counter @xmath23 is obtained by averaging over all @xmath24 bivariate coincidence indicators involving the spike train @xmath25 .    in order to obtain a single multivariate similarity profile we pool the spikes of all the spike trains as well as their coincidence counters by introducing one overall spike index @xmath26 : @xmath27
note that in case there exist perfectly coincident spikes , @xmath26 counts over all of these spikes . from this discrete set of coincidence
counters @xmath28 the spike - synchronization profile @xmath29 is obtained via @xmath30 .
finally , spike - synchronization is defined as the average value of this profile @xmath31 with @xmath32 denoting the total number of spikes in the pooled spike train .
this way we have used the same consistent framework for both the bivariate and the multivariate case .
the former is just a special case of the latter .
the interpretation is very intuitive : spike - synchronization quantifies the overall fraction of coincidences .
it reaches one if and only if each spike in every spike train has one matching spike in all the other spike trains ( or if there are no spikes at all ) , and it attains the value zero if and only if the spike trains do not contain any coincidences .
examples for both of these extreme cases can be found in fig .
[ fig : spike_order_spike_sync_3]a and [ fig : spike_order_spike_sync_3]b and one intermediate example ( random distribution of spikes among spike trains ) is shown in fig . [ fig : spike_order_spike_sync_3]c . for a derivation of the expectation value for poisson spike trains
please refer to @xcite .    in the multivariate analysis proposed in this paper , spike - synchronization can be used to filter the input to the algorithm . in order to focus on propagation patterns within truly global events
it is possible to set a threshold value @xmath33 for the spike - synchronization profile @xmath29 .
this way only spikes with a coincidence value higher than this parameter @xmath33 are taken into account , all the other noisy background spikes are simply ignored .
this kind of filter will be used in the analysis of the neurophysiological datasets in section [ ss : results - neuro ] .
spike - synchronization assigns to each spike of a given spike train pair a bivariate coincidence indicator .
these coincidence indicators @xmath34 , which are either @xmath35 or @xmath0 , are then averaged over spike train pairs and converted into one overall profile @xmath29 normalized between @xmath35 and @xmath0 . in exactly the same manner spike - order and spike train order assign bivariate order indicators to spikes .
also these two order indicators , the asymmetric @xmath36 and the symmetric @xmath37 , which both can take the values @xmath38 , @xmath35 , or @xmath39 , are averaged over spike train pairs and converted into two overall profiles @xmath40 and @xmath41 which are normalized between @xmath38 and @xmath0 .
the spike - order profile @xmath40 distinguishes leading and following spikes , whereas the spike train order profile @xmath41 provides information about the order of spike trains , i.e. it allows to sort spike trains from leaders to followers .     spike - order profile @xmath40 and spike train order profile @xmath41 for an artificially created example dataset .
( a ) the rasterplot shows @xmath42 spike trains which emit spikes in nine reliable events .
for the first two events spikes fire in order , for the next three events the order is random whereas for the last four events the order is inverted . in the last event
there is one spike missing .
spike thickness decodes the spike - synchronization value @xmath29 ( here almost constant ) , spike color the spike - order value @xmath40 .
( b , c ) the spike - synchronization profile @xmath29 and its mirror profile ( dashed black lines ) act as envelope for both the spike - order profile @xmath40 ( b , red ) and the spike train order profile @xmath41 ( c , black ) .
( b ) the spike - order profile can not distinguish events with different firing order and by construction the average value is always @xmath43 .
( c ) on the other hand , in the spike train order profile events with different firing order can clearly be distinguished .
for the first two correctly ordered events the value @xmath0 is obtained .
the next three events exhibit random order and correspondingly the profile fluctuates rather wildly . finally , the last four inversely ordered yield the value @xmath38 except for the last event for which the absolute minimum value can not be obtained since one spike is missing . the average value , the synfire indicator @xmath44 , is not @xmath35 but negative which reflects the dominance of the inversely ordered events .
, width=321 ]    first of all , similar to the transition from the symmetric event synchronization to delay asymmetry , the symmetric coincidence indicator @xmath45 of spike - synchronization ( eq . [ eq : bi - spike - synchronization ] ) is replaced by the asymmetric spike - order indicator @xmath46 where the index @xmath47 is defined from the minimum in  .
the corresponding value @xmath48 is obtained in an asymmetric manner as @xmath49    therefore , this indicator assigns to each spike either a @xmath0 or a @xmath38 depending on whether the respective spike is leading or following a coincident spike from the other spike train .
the value @xmath35 is obtained for cases in which there is no coincident spike in the other spike train ( @xmath50 ) , but also in cases in which the times of the two coincident spikes are absolutely identical ( @xmath51 ) .
the multivariate profile @xmath40 obtained analogously to eq .
[ eq : multi - profile ] is normalized between @xmath0 and @xmath38 and the extreme values are obtained if a spike is either leading ( @xmath39 ) or following ( @xmath38 ) coincident spikes in all other spike trains .
it can be @xmath35 either if a spike is not part of any coincidences or if it leads exactly as many spikes from other spike trains in coincidences as it follows . from the definition in eqs .
[ eq : bi - spike - order-1 ] and [ eq : bi - spike - order-2 ] it follows immediately that @xmath28 is an upper bound for the absolute value @xmath52 .    while the spike - order profile can be very useful for color - coding and visualizing local spike leaders and followers ( fig .
[ fig : spike_order_80_standard_example_1_profiles]a ) , it is not useful as an overall indicator of spike train order ( fig .
[ fig : spike_order_80_standard_example_1_profiles]b ) .
the profile is invariant under exchange of spike trains , i.e. it looks the same for all events no matter what the order of the firing is ( in our example only the last event looks slightly different since one spike is missing ) .
moreover , summing over all profile values , which is equivalent to summing over all coincidences , necessarily leads to an average value of @xmath35 , since for every leading spike ( @xmath39 ) there has to be a following spike ( @xmath38 ) .    so in order to quantify any kind of leader - follower information between spike trains we need a second kind of order indicator .
the spike train order indicator is similar to the spike - order indicator defined in eqs .
[ eq : bi - spike - order-1 ] and [ eq : bi - spike - order-2 ] but with two important differences .
both spikes are assigned the same value and this value now depends on the order of the spike trains : @xmath53 and @xmath54    this symmetric indicator assigns to both spikes a @xmath39 in case the two spikes are in the correct order , i.e. the spike from the spike train with the lower spike train index is leading the coincidence , and a @xmath38 in the opposite case .
once more the value @xmath35 is obtained when there is no coincident spike in the other spike train or when the two coincident spikes are absolutely identical .
the multivariate profile @xmath41 , again obtained similarly to eq .
[ eq : multi - profile ] , is also normalized between @xmath0 and @xmath38 and the extreme values are obtained for a coincident event covering all spike trains with all spikes emitted in the order from first ( last ) to last ( first ) spike train , respectively ( see the first two and the last four events in fig . [
fig : spike_order_80_standard_example_1_profiles ] ) .
it can be @xmath35 either if a spike is not a part of any coincidences or if the order is such that correctly and incorrectly ordered spike train pairs cancel each other .
again , @xmath28 is an upper bound for the absolute value of @xmath55 .
in contrast to the spike - order profile @xmath56 , for the spike train order profile @xmath55 it does make sense to define an average value , which we term the synfire indicator : @xmath57    the interpretation is very intuitive .
the synfire indicator @xmath44 quantifies to what degree the spike trains in their current order resemble a perfect synfire pattern .
it is normalized between @xmath0 and @xmath38 and attains the value @xmath0 ( @xmath38 ) if the spike trains in their current order form a perfect ( inverse ) synfire pattern , meaning that all spikes are coincident with spikes in all other spike trains and that the order from leading ( following ) to following ( leading ) spike train remains consistent for all of these events .
it is @xmath35 either if the spike trains do not contain any coincidences at all or if among all spike trains there is a complete symmetry between leading and following spikes .
the spike train order profile @xmath41 for our example is shown in fig .
[ fig : spike_order_80_standard_example_1_profiles]c . in this case
the order of spikes within an event clearly matters .
the synfire indicator @xmath44 is slightly negative indicating that the current order of the spike trains is actually closer to an inverse synfire pattern .
pairwise cumulative spike - order matrix @xmath58 before ( left ) and after ( right ) sorting for the example dataset from fig .
[ fig : spike_order_80_standard_example_1_profiles ] .
the upper triangular matrix @xmath59 , marked in black , is used to calculate the synfire indicator @xmath44 , for both the unsorted spike trains ( @xmath60 , left ) and the sorted spike trains ( @xmath61 , right ) . the thick black arrow in between the two matrices indicates the sorting process .
, width=321 ]    given a set of spike trains we now would like to sort the spike trains from leader to follower such that the set comes as close as possible to a synfire pattern . to do
so we have to maximize the overall number of correctly ordered coincidences and this is equivalent to maximizing the synfire indicator @xmath44 .
however , it would be very difficult to achieve this maximization by means of the multivariate profile @xmath41 . clearly , it is more efficient to sort the spike trains based on a pairwise analysis of the spike trains .
the most intuitive way is to use the anti - symmetric cumulative spike - order matrix @xmath62 which sums up orders of coincidences from the respective pair of spike trains only and quantifies how much spike train @xmath25 is leading spike train @xmath63 ( fig .
[ fig : spike_order_80_standard_example_2_matrices ] ) .    hence if @xmath64 spike train @xmath25 is leading @xmath63 , while @xmath65 means @xmath63 is leading @xmath25 .
if the current spike train order is consistent with the synfire property , we thus expect that @xmath66 for @xmath67 and @xmath68 for @xmath69 .
therefore , we construct the overall spike - order as @xmath70 i.e.  the sum over the upper right tridiagonal part of the matrix @xmath71 .
after normalizing by the overall number of possible coincidences , we arrive at a second more practical definition of the synfire indicator : @xmath72 the value is identical to the one of eq .
[ eq : synfire indicator - e ] , only the temporal and the spatial summation of coincidences ( i.e. , over the profile and over spike train pairs ) are performed in the opposite order .
having such a quantification depending on the order of spike trains , we can introduce a new ordering in terms of the spike train index permutation @xmath73 . the overall synfire indicator for this permutation
is then denoted as @xmath74 . accordingly , for the initial ( * * u**nsorted ) order of spike trains @xmath75 the synfire indicator is denoted as @xmath76 .
the aim of the analysis is now to find the optimal ( * * s**orted ) order @xmath77 as the one resulting in the maximal overall synfire indicator @xmath78 : @xmath79 this synfire indicator for the sorted spike trains quantifies how close spike trains can be sorted to resemble a synfire pattern , i.e. , to what extent coinciding spike pairs with correct order prevail over coinciding spike pairs with incorrect order .
unlike the synfire indicator for the unsorted spike trains @xmath60 , the optimized synfire indicator @xmath61 can only attain values between @xmath35 and @xmath0 ( any order that yields a negative result could simply be reversed in order to obtain the same positive value ) . for a perfect synfire pattern we obtain @xmath80 , while sufficiently long poisson spike trains without any synfire structure yield @xmath81 .
the complexity of the problem to find the optimal spike train order is similar to the well - known travelling salesman problem @xcite .
for @xmath20 spike trains there are @xmath82 permutations  @xmath83 so for large numbers of spike trains finding the optimal spike train order @xmath77 is a non - trivial problem and brute - force methods such as calculating the @xmath74-value for all possible permutations are not feasible . instead , one has to make use of methods such as parallel tempering @xcite or simulated annealing @xcite to search for the optimal order .
here we choose simulated annealing , a probabilistic technique which approximates the global optimum of a given function in a large search space . in our case
this function is the synfire indicator @xmath74 ( which we would like to maximize ) and the search space is the permutation space of all spike trains .
we start with the @xmath60-value from the unsorted permutation and then visit nearby permutations using the fundamental move of exchanging two neighboring spike trains within the current permutation . all moves with positive @xmath84
are accepted while the likelihood of accepting moves with negative @xmath84 is decreased along the way according to a standard slow cooling scheme .
the procedure is repeated iteratively until the order of the spike trains no longer changes or until a predefined end temperature is reached .    in fig .
[ fig : spike_order_80_standard_example-3 ] we show the complete spike - order analysis including the results for the sorted spike trains .
the sorting of the spike trains maximizes the synfire indicator as reflected by both the normalized sum of the upper right half of the pairwise cumulative spike - order matrix ( eq.[eq : synfire indicator - d ] , fig .
[ fig : spike_order_80_standard_example-3]c ) and the average value of the spike train order profile @xmath85 ( eq.[eq : synfire indicator - e ] , fig .
[ fig : spike_order_80_standard_example-3]d ) . finally , the sorted spike trains in fig . [
fig : spike_order_80_standard_example-3]e are now ordered such that the first spike trains have predominantly high values ( red ) and the last spike trains predominantly low values ( blue ) of @xmath86 .
complete illustration of spike - order using our example dataset from fig .
[ fig : spike_order_80_standard_example_1_profiles ] . ( a )
unsorted spike trains with the spikes color - coded according to the value of the spike - order @xmath40 .
( b ) spike train order profile @xmath41 .
the synfire indicator @xmath60 for the unsorted spike trains is slightly negative .
( c ) pairwise spike - order matrix @xmath58 before and after sorting .
the optimal order maximizes the upper triangular matrix .
( d ) spike train order profile @xmath41 and its average values , the synfire indicator @xmath61 for the sorted spike trains .
( e ) sorted spike trains.,width=321 ]    the complete analysis returns results consisting of several levels of information .
time - resolved ( local ) information is represented in the spike - coloring and in the profiles @xmath58 and @xmath87 .
the pairwise information in the spike - order matrix reflects the leader - follower relationship between two spike trains at a time .
the synfire indicator @xmath44 characterizes the closeness of the dataset as a whole to a synfire pattern , both for the unsorted ( @xmath60 ) and for the sorted ( @xmath61 ) spike trains .
finally , the sorted order of the spike trains is a very important result in itself since it identifies the leading and the following spike trains .      as a last step in the analysis
we evaluate the statistical significance of the optimized synfire indicator @xmath61 using a set of carefully constructed spike train surrogates . the idea behind the surrogate test
is to evaluate the likelihood that the consistent spike - order pattern yielding a certain synfire indicator could have been obtained by chance .
to this aim , for each surrogate we maintain the coincidence structure of the spike trains by keeping the spike - synchronization values of each individual spike constant but randomly swap the spike order in a sufficient number of coincidences .
we set the number of swaps equal to the number of coincident spikes in the dataset since this way all possible spike order patterns can be reached . only for the first surrogate we swap twice as many coincidences in order to account for transients . after each swap we take extra care that all other spike orders that are affected by the swap are updated as well . for example , if a swap changes the order between the first and the third spike in an ordered sequence of three spikes , we also swap both the order between the first and the second and the order between the second and the third spike .
statistical significance : surrogate analysis for the example dataset from fig .
[ fig : spike_order_80_standard_example_1_profiles ] . ( a ) spike order patterns for original ( black ) and one randomized surrogate ( red ) . for clarity
only the first four events are shown .
for the first two events the synfire - order of the original is destroyed in the surrogates whereas for the next two events both sequences are equally unordered .
( b ) histogram for @xmath88 surrogates .
thick lines denote mean and standard deviation .
since the value for the original dataset ( black ) is not maximum , the optimally sorted spike trains do not exhibit a statistically significant synfire pattern .
, width=321 ]    note that when creating surrogates we change the order of spikes but we do not swap actual spikes between different spike trains ( see fig . [ fig : spike_order_surro_80_standard_example_4_surro - histo]a , note that the x - axis is labeled time index , not time ) .
spike trains with shuffled spikes would have different interspike intervals and this would alter the results of the coincidence criterion of eq .
[ eq : coincidence - maxdist ] .
we would obtain different values of spike train order just because of different spike - synchronization values and this would make the desired evaluation of pure spike order effects difficult .
however , for every surrogate that we create it is possible to reconstruct actual spike trains with exactly that spike - order patterns .    for each spike
train surrogate we repeat exactly the same optimization procedure in the spike train permutation space that is done for the original dataset .
the original synfire indicator is deemed significant if it is higher than the synfire indicator obtained for all of the surrogate datasets ( this case will be marked by two asterisks ) .
here we use @xmath89 surrogates for a significance level of @xmath90 . as a second indicator we state the z - score , e.g. , the deviation of the original value @xmath91 from the mean @xmath92 of the surrogates in units of their standard deviation @xmath93 : @xmath94    results of the significance analysis for our standard example are shown in the histogram in fig . [ fig : spike_order_surro_80_standard_example_4_surro - histo]b . in this case
the absolute value of the z - score is smaller than one and the p - value is larger than @xmath95 and the result is thus judged as statistically non - significant .    in case the initial sorting of the spike trains
is used to test a specific hypothesis there also exists a straightforward procedure to test the statistical significance of the synfire indicator @xmath60 for the unsorted spike trains . in this case
no optimization of the synfire indicator is required , rather the synfire indicator @xmath60 for the initial sorting is compared against synfire indicators obtained for random permutations of the spike trains .
this kind of significance test will be used in section [ ss : results - neuro ] .
in the following we apply our new algorithm to artificially generated datasets ( section [ ss : results - sim ] ) , neurophysiological data ( section [ ss : results - neuro ] ) and , finally , climate data from the el nio phenomenon ( section [ ss : results - climate ] ) . for the figures we use the same full layout introduced in fig .
[ fig : spike_order_80_standard_example-3 ] to which we add the significance analysis of fig .
[ fig : spike_order_surro_80_standard_example_4_surro - histo]b .       spike- and spike train order analysis for a perfect inverse synfire pattern .
the plot follows the layout of fig .
[ fig : spike_order_80_standard_example-3 ] with the histogram of the surrogate test ( see fig . [
fig : spike_order_surro_80_standard_example_4_surro - histo]b ) for statistical significance added as subplot f. for the unsorted spike trains a minimal synfire indicator of @xmath96 is obtained , while sorting results in the maximum value of @xmath80 . according to the surrogate test the statistical significance of the result is very high.,width=321 ]    we start with examples covering the two extreme cases of a perfect synfire pattern and a completely random spike train set .
first , in fig . [ fig : spike_order_surro_2_synfire_inv ]
we apply the algorithm to a perfect inverse synfire pattern for which the spike trains are initially sorted from follower to leader .
therefore , the synfire indicator of the unsorted spike trains yields its minimum value of @xmath97 .
sorting just reverses the order of the spike trains and in consequence the maximum value of @xmath98 is obtained .
any shuffling of spike orders necessarily destroys the synfire pattern and thus leads to much lower values of the synfire indicator .
accordingly , the surrogate test ( fig .
[ fig : spike_order_surro_2_synfire_inv]f ) shows that the statistical significance of the original synfire indicator is very high .
spike- and spike train order analysis for @xmath99 poisson spike trains . since the number of spike trains is too large to label the spike trains in the top and in the bottom subplot with numbers we use color coding at the left side to label them . both before and after sorting
the synfire indicator is very close to zero .
the surrogate analysis reveals the result to be non - significant.,width=321 ]    the other extreme case is poisson spike trains ( fig .
[ fig : spike_order_surro_51_poisson ] ) for which the arrival times of spikes are completely random and without any preferred order . for this realization the synfire indicator @xmath60 for the unsorted spike trains happens to be slightly negative indicating that the spike trains are closer to an inverse synfire pattern than to a synfire pattern .
the absolute value @xmath61 after sorting is higher .
the fact that both of these values are non - zero is due to the finite size effect caused by the limited number of spikes . for more and more spike trains and/or spikes the expectation value even for the sorted case would converge towards zero .
as expected , the surrogate test shows that the order for the original spike trains is not statistically distinct from the order of the surrogate spike trains ( there is no preferred order that can be destroyed by the shuffling ) and , accordingly , the value of the original synfire indicator is revealed to be clearly non - significant .
spike- and spike train order analysis for poisson spike train interspersed with a perfect inverse synfire pattern .
the order contained within the synfire pattern spike train is distinct enough to make the synfire indicator for the sorted spike trains statistically significant.,width=321 ]    the third example in fig .
[ fig : spike_order_surro_57_mix_poisson_sf ] shows a mixture of these two extremes , poisson spike train interspersed with spike trains forming a perfect inverse synfire pattern .
sorting the spike trains restores the correct order of the synfire pattern spike trains within the poisson spike train .
the synfire indicator for the sorted spike trains @xmath61 for this mixed example is actually very close to the value obtained for the poisson spike trains in fig .
[ fig : spike_order_surro_51_poisson ] , but this time the surrogate test reveals the value to be highly significant .
together these two examples illustrate nicely that the synfire indicator and the surrogate analysis provide complementary information . in the mixture example of fig . [
fig : spike_order_surro_57_mix_poisson_sf ] there are many more random poisson spikes than ordered synfire pattern spikes . together
they appear to be as ordered as the shorter but purely random poisson spike trains in fig .
[ fig : spike_order_surro_51_poisson ] .
the synfire indicator is strongly influenced by the statistics of the dataset and thus is in itself not sufficient to reliably compare two datasets with widely different number of spike trains and spikes .
the surrogate analysis , on the other hand , can be used to compare datasets of different size since by preserving the spike numbers in the surrogates it explicitly takes the statistics of each dataset into account .      in order to apply the spike train order algorithm to real neurophysiological data , we analyzed data recorded via fast multicellular calcium imaging in acute ca3 hippocampal brain slices from juvenile mice ( for a detailed description of the experimental methods see appendix [ app - s : hm - data ] ) . in the juvenile hippocampus , the ca3 region is the origin of a stereotypical network phenomenon of wavelike propagating activity termed giant depolarizing potentials ( gdp , @xcite , @xcite ) . in previous studies ,
gdps have been used to investigate the topology of networks and the role of hub cells @xcite as well as to reveal the deterministic and stochastic processes underlying spontaneous , synchronous network bursts @xcite . due to the distinct architecture and the repetitive nature of the gdps this experimental setup offers a very suitable test case for our synfire pattern analysis .
spike - order for real data recorded in an acute hippocampal slice from a juvenile mouse .
( a ) initially the spike trains are sorted according to their firing rate starting with the most sparse spike trains .
( f ) after sorting , note the fairly consistent transition from spike trains with predominantly leading spikes ( red ) in the gdps to spike trains with predominantly following spikes ( blue ) .
, width=321 ]    the first dataset analyzed in fig .
[ fig : spike_order_surro_109_hm_5_1_sn ] includes @xmath100 gdps over a bit more than @xmath42 minutes .
almost all gdps involve the whole network .
here as for all other neurophysiological datasets analyzed initially the spike trains are sorted according to their firing rate such that the sparsely spiking neurons are on top and the most active neurons at the bottom ( fig .
[ fig : spike_order_surro_109_hm_5_1_sn]a ) .
this specific sorting allows us to test the hypothesis that the neurons which fire almost exclusively within the gdps and are very sparse on background activity might have a stronger role in initiating gdps and tend to lead , whereas the more regularly spiking neurons might tend to follow .
if this would be the case one would expect a very high value for the initial synfire indicator @xmath60 .
however , according to fig .
[ fig : spike_order_surro_109_hm_5_1_sn]b the actual value is very close to zero and actually slightly negative .
a statistical significance test using random permutations of spike trains ( see section [ ss : statistical - significance ] ) indeed proves the synfire indicator of the unsorted spike trains @xmath60 to be non - significant ( result not shown ) .
a further indicator for this is the fact that the order of the sorted spike trains is very different from the initial order , as can be seen by comparing the color bars on the left of fig .
[ fig : spike_order_surro_109_hm_5_1_sn]a and fig .
[ fig : spike_order_surro_109_hm_5_1_sn]e . the color - coding of the gdps exhibits typically a slightly noisy transition from leader ( red ) to follower ( blue ) .
the synfire indicator for the sorted spike trains @xmath61 is also much higher ( fig .
[ fig : spike_order_surro_109_hm_5_1_sn]d ) . finally , the surrogate analysis ( fig .
[ fig : spike_order_surro_109_hm_5_1_sn]f ) shows this result to be highly significant .     spike - order for the real data already analyzed in fig .
[ fig : spike_order_surro_109_hm_5_1_sn ] but this time the analysis of spike - order was restricted to spikes with a spike - synchronization value of at least @xmath101 .
this simple thresholding allows focusing the analysis on the reliable events and disregards all spiking between the events .
this results in an increase of the overall value of spike - order from @xmath102 to @xmath103 . , width=321 ]    however , the spiking in fig . [
fig : spike_order_surro_109_hm_5_1_sn ] consists not only of the gdps .
most neurons exhibit at least to some extent spontaneous background activity , the ones at the top of the initial sorting less than the ones at the bottom .
the spikes in this background activity are typically coincident with only few other spikes and do not take part in any propagation patterns ( note their green color which indicates spike - order values close to zero ) .
so in the context of our synfire pattern analysis this is just noise that leads to a decrease of the synfire indicator .
there is a straightforward way to disregard these background spikes by setting a threshold value @xmath33 for the spike - synchronization profile @xmath29 . only spikes with a coincidence value higher than @xmath33 are taken into account , all other spikes are simply ignored .
the result of this background correction can be seen in fig .
[ fig : spike_order_surro_159_hm_5_1_sn ] for the same dataset already used in fig .
[ fig : spike_order_surro_109_hm_5_1_sn ] . focusing the analysis on the reliable gdps leads to an increase of the synfire indicator from @xmath102 to @xmath103 .
projection of the optimized spike train order on the 2d - plot of the hippocampal slice .
the regions of interest ( rois ) which denote filled and identified cells in the ca3 region are color - coded from leader ( index @xmath0 , red ) to follower ( index @xmath104 , blue ) using the optimized spike train order of fig .
[ fig : spike_order_surro_159_hm_5_1_sn ] .
the very first leader ( lower right ) and the very last follower ( upper left ) are marked by filled contours .
, width=321 ]    as already mentioned before , one of the main results of our analysis is the sorted order of the spike trains itself . for these neurophysiological data it allows to identify the leading and the following neurons in the network and to project this information back on the recording setup
this is shown in fig .
[ fig:2d - plot - colorcoding-159 ] where we have color - coded the optimized spike train order obtained in fig .
[ fig : spike_order_surro_159_hm_5_1_sn ] within a 2d - plot of the neurons recorded from the hippocampal slice . for this example
there appears to be a clear overall propagation from right to left but there is also a considerable degree of noisiness which might be due to a non - trivial connectivity within the network .
spike - order for a second dataset for which again the analysis of spike - order was restricted to spikes with a spike - synchronization value of at least @xmath101 . in this case
the focus on the gdps let the synfire indicator increase from @xmath105 ( result not shown ) to @xmath106 .
in addition , here we also calculated one average spike train order value per gdp ( green points ) which illustrates once more the time - resolved nature of the method .
, width=321 ]    in fig .
[ fig : spike_order_surro_175_hm_23_1_sn_div ] we apply the spike - order analysis to a second dataset recorded from a different slice , again focusing on the order within the global events only . here
we also added one new feature , the mean value of the spike train order @xmath41 for each global event ( we use the maxima and minima of the spike order profile @xmath40 to delineate the gdps ) .
this again emphasizes the time - resolved nature of the spike order and the spike train order indicators .
overall , we have analyzed neurophysiological datasets from four hippocampal slices exhibiting an average of @xmath107 gdps .
we obtained an average value for spike - synchronization of @xmath108 before focusing on the gdps ( as in fig .
[ fig : spike_order_surro_109_hm_5_1_sn ] ) and @xmath109 after ( as in fig . [
fig : spike_order_surro_159_hm_5_1_sn ] ) . with or without this focus
the synfire indicator for the initial spike train sorting @xmath60 was very close to zero and in all cases proved to be non - significant when tested against synfire indicators obtained for random permutations of the spike train order .
since the initial sorting was based on overall firing rate of the neurons , this signifies that the hypothesis that the low - firing neurons which are basically only active during the gdps might have a stronger role in initiating gdps can be rejected .
for the sorted spike trains the synfire indicator @xmath61 was @xmath110 for all spikes and @xmath111 for the spikes within the gdps only . suppressing the effect of the noisy background spikes in the analysis thus leads to an average increase of the synfire indicator by about @xmath112 . finally , according to the surrogate analysis described in section [ ss : statistical - significance ] the synfire indicator for the sorted spike trains @xmath61 yielded a statistically significant result for all datasets analyzed .
so overall we can conclude that these gdps recorded in brain slices from juvenile mice are distinguished by a very high consistency of their spatio - temporal propagation patterns .
although being developed mainly for neuroscientific data ( spike train recordings ) , the spike train order approach presented in this paper can be applied in many other contexts as well .
one particular field where event - based analysis is employed very frequently is climate science , see e.g.  @xcite .    in the following
we will use the new spike train order method to analyze the sea surface temperature ( sst ) in the central and eastern tropical pacific ocean to identify the propagation patterns connected with the warm phase of the el nio   southern oscillation ( enso ) .
predicting the occurrence and strength of el nios is very important due to the vast ecological and economical effects  @xcite and therefore this phenomenon has been studied extensively in terms of both intensity ( e.g. @xcite , @xcite ; @xcite , @xcite ) and frequency ( e.g. @xcite , @xcite ; @xcite , @xcite ) .
however , here we will not discuss el nio  prediction , but focus on the longitudinal propagation pattern of the el nio  events within the pacific ocean  @xcite .
the region used here to analyze the sst is depicted in fig .
[ fig : el_nino_region ] ( dashed line ) , and an examplary smoothed time profile for the center of the analyzed region ( @xmath113 ) is shown in fig .  [
fig : time_series ] .
further details on the region , the dataset and data preprocessing ( smoothing ) is outlined in appendix  [ app - s : elnino - data ] .    ) on november  11 , 2015.,scaledwidth=49.0% ]     before ( red ) and after ( black ) gaussian smoothing .
the horizontal dashed line corresponds to a temperature threshold of @xmath114 used for event detection and the vertical lines are the resulting events identified from upward threshold crossings of the smoothed time series.,scaledwidth=49.0% ]    starting from the smoothed sst profiles , we performed an event detection by identifying the onset of the sst anomaly connected with an el nio  in terms of an _
upward crossing _ of the smoothed time series with a temperature anomaly threshold @xmath115 .
as we are interested in the initial propagation front for each el nio  event , we additionally introduce an artificial _ refractory period _ of 11 months , which means threshold crossings occurring within 11 months after previous event are disregarded .
[ fig : time_series ] depicts this procedure for a threshold value @xmath114 leading to the identification of three events in this example ( vertical lines in fig .
[ fig : time_series ] ) . from this
, we finally arrive at @xmath116 discrete event series corresponding to the onsets of el nio  sst anomaly elevations at the different longitudinal locations along the dashed line in fig .
[ fig : el_nino_region ] .
the resulting spike trains are depicted in fig .
[ fig : spike_order_analysis ] on the left for four different threshold values @xmath117 ( step size of @xmath118 ) .
the first thing to note is that this event detection procedure is able to correctly identify the el nio  occurrences as seen from the horizontal event structure in accordance with the el nio  years ( labeled on the @xmath91-axis in the raster plots a - d ) as well as the consistently high spike - synchronization values @xmath119 for all threshold values . with increasing temperature threshold , however ,
only the three strongest el nio  events are being captured ( 1983 , 1998 and 2016 , bold labels in fig .
[ fig : spike_order_analysis ] ) as seen from fig .
[ fig : spike_order_analysis]c and fig .
[ fig : spike_order_analysis]d .    ,
@xmath120 ) smoothed in time using a gaussian kernel with width of @xmath121 .
events are defined as initial threshold crossings of the smoothed temperature time series ( see text ) . from top to bottom four different threshold values have been used : @xmath117 .
the left graphs ( a - d ) show the event raster plots with with spike - order value in color coding using an east - to - west ordering .
the years shown on the @xmath91-axis ( representing january 1st of the indicated year ) denote the moderate and strong ( bold face ) el nio  events . on the right ( e - h ) , the optimal leader - follower order compared to an initial east - to - west sorting
is shown ( circles : spike trains with at least 2 spikes , triangles : spike trains with less than two spikes ) . additionally , the spike - synchronization @xmath119 as well as the synfire indicator for the original ( east - to - west ) @xmath122 , and the optimal sorting @xmath123 are reported .
, title="fig:",scaledwidth=40.0% ] + , @xmath120 ) smoothed in time using a gaussian kernel with width of @xmath121 .
events are defined as initial threshold crossings of the smoothed temperature time series ( see text ) . from top to bottom four different threshold values have been used : @xmath117 .
the left graphs ( a - d ) show the event raster plots with with spike - order value in color coding using an east - to - west ordering .
the years shown on the @xmath91-axis ( representing january 1st of the indicated year ) denote the moderate and strong ( bold face ) el nio  events . on the right ( e - h ) , the optimal leader - follower order compared to an initial east - to - west sorting
is shown ( circles : spike trains with at least 2 spikes , triangles : spike trains with less than two spikes ) . additionally , the spike - synchronization @xmath119 as well as the synfire indicator for the original ( east - to - west ) @xmath122 , and the optimal sorting @xmath123 are reported .
, title="fig:",scaledwidth=40.0% ] + , @xmath120 ) smoothed in time using a gaussian kernel with width of @xmath121 .
events are defined as initial threshold crossings of the smoothed temperature time series ( see text ) . from top to bottom four different threshold values have been used : @xmath117 .
the left graphs ( a - d ) show the event raster plots with with spike - order value in color coding using an east - to - west ordering .
the years shown on the @xmath91-axis ( representing january 1st of the indicated year ) denote the moderate and strong ( bold face ) el nio  events . on the right ( e - h ) , the optimal leader - follower order compared to an initial east - to - west sorting is shown ( circles : spike trains with at least 2 spikes , triangles : spike trains with less than two spikes ) . additionally , the spike - synchronization @xmath119 as well as the synfire indicator for the original ( east - to - west ) @xmath122 , and the optimal sorting @xmath123 are reported .
, title="fig:",scaledwidth=40.0% ] + , @xmath120 ) smoothed in time using a gaussian kernel with width of @xmath121 .
events are defined as initial threshold crossings of the smoothed temperature time series ( see text ) . from top to bottom four different threshold values have been used : @xmath117 .
the left graphs ( a - d ) show the event raster plots with with spike - order value in color coding using an east - to - west ordering .
the years shown on the @xmath91-axis ( representing january 1st of the indicated year ) denote the moderate and strong ( bold face ) el nio  events . on the right ( e - h ) , the optimal leader - follower order compared to an initial east - to - west sorting
is shown ( circles : spike trains with at least 2 spikes , triangles : spike trains with less than two spikes ) . additionally , the spike - synchronization @xmath119 as well as the synfire indicator for the original ( east - to - west ) @xmath122 , and the optimal sorting @xmath123 are reported .
, title="fig:",scaledwidth=40.0% ]    to quantify the consistency of the propagation patterns , we perform a spike train order analysis on these event sequences .
the results are also presented in fig .
[ fig : spike_order_analysis ] . as a central observation
, we found that for the three strong el nio  events ( 1983 , 1998 , 2016 ) , there is a clear consistent propagation of the sst anomaly elevation at the equator from east to west as confirmed by a synfire indicator of @xmath124 for the east - to - west sorting ( @xmath114 , fig .
[ fig : spike_order_analysis]c ) .
furthermore , optimizing the synfire indicator by changing the sorting only leads to minor improvements ( @xmath125 ) and the resulting optimal order is very close to the original east - to - west sorting indicated in fig .
[ fig : spike_order_analysis]g .
finally , this observation is also confirmed by the spike - order based color coding in the raster plots ( c ) of the spike trains . for each of the three major el nio  events ( 1983 , 1998 , 2016 ) we see a clear tendency of leader ( red ) to follower ( blue ) going from east ( top ) to west ( bottom ) for all three threshold values .
further increase of the threshold temperature ( fig .
[ fig : spike_order_analysis]d and h ) leads to essentially the same observation , but parts of the longitudinal propagation might be missed as the sst anomaly maxima stay below threshold .
moderate el nio  events ( 1992 , 2003 , 2010 ) , on the other hand , seem to propagate in eastwards direction , as seen by opposite directed coloring for those years in fig .
[ fig : spike_order_analysis]b ( @xmath126 ) .
consequently , the synfire indicator for the east - to - west sorting is very low , @xmath127 , as some of the propagation events are moving in the opposite direction which reduces the synfire indicator .
therefore , it is also not possible to find a correct ordering , as indicated by a rather low optimized synfire indicator of @xmath128 in this case .
this is even more pronounced for the smallest threshold temperature @xmath129 , shown in fig .
[ fig : spike_order_analysis]b . there , essentially all moderate el nios are captured and most of those exhibit an eastwards propagation , opposed to the strong el nios that propagate westwards .
therefore , the initial synfire indicator for the east - to - west sorting is negative , @xmath130 and the optimal sorting shows the sign of a west - to - east propagation ( fig .  [ fig : spike_order_analysis]e ) with @xmath131 .    to better understand the dependency of the spike train order analysis on the temperature threshold , we computed the synfire indicator for the initial east - to - west ordering as well as the value for optimal ordering @xmath123 for varying thresholds @xmath132 ( fig .
[ fig : spike_order_threshold ] ) . additionally , fig .
[ fig : spike_order_threshold ] also shows the spike - synchronization values for these parameters .
one first observes that the spike - synchronization remains rather constant over the whole range of threshold values , indicating a consistently good identification of the el nio  events .
the synfire indicator for the original east - to - west sorting @xmath122 on the other hand shows a clear increase saturating in a plateau for a threshold value of around @xmath114 , where it is then also very close to the optimal value @xmath123 .
this is easily understood by the fact that at temperature thresholds above @xmath133 , only the three strong el nios are captured that show a consistent westwards propagation , while for values below also weaker el nios that exhibit eastward propagation enter the analysis .     and synfire indicator for the original sorting ( east - to - west ) @xmath122 and the optimal sorting @xmath123 in dependence of the temperature threshold @xmath115.,scaledwidth=42.0% ]    in summary
, we showed that the newly proposed spike train order method is also readily applicable to climate data and is able to identify propagation patterns in recurring events such as the el nio .
our results indicate that close to the equator , strong el nio  events exhibit a clear westward propagation of an sst front , while for moderate el nios we found indications for an eastward front propagation .
interestingly , previous results based on zonal current velocity within the el nio  3.4 region found eastward propagation for the extreme el nio  events in 1983 and 1998  @xcite , while here we found west - ward propagation ( fig .
[ fig : spike_order_analysis ] ) .
this discrepancy is most likely due to the different regions ( el nio  3.4 vs equatorial strip ) and methodology ( average warming / cooling rates vs front propagation ) .
over the last years a wide variety of measures to quantify the synchrony between spike trains have been introduced .
three recent proposals , _ isi - distance _
@xcite , _ spike - distance _
@xcite , and _ spike - synchronization _
@xcite , share the desirable property of being time - resolved and parameter - free ( time - scale independent ) . however ,
their bivariate versions are symmetric and in consequence their multivariate versions are invariant to changes in the order of spike trains .
none of these measures is designed to provide information about the directionality of the propagation patterns .    in the present study
we address this issue .
first we use an adaptive coincidence detection as match maker in order to identify pairs of coincident spikes .
then we define two measures , the asymmetric _ spike - order _ @xmath58 and the symmetric _ spike train order _ @xmath87 , from which we can derive the _ synfire indicator _
@xmath44 that quantifies the consistency of spatio - temporal propagation patterns and whose maximization allows to sort multiple spike trains from leader to follower .
this is meant purely in the sense of temporal sequence of the spikes .
the question asked is : which are the spike trains that tend to fire first , and which are the ones that tend to fire last ?
we use simulated annealing to search among all permutations of spike trains for the sorting that resembles as closely as possible a synfire pattern , a perfectly consistent repetition of the same global propagation pattern . in a final step
we evaluate the statistical significance of the optimized permutation using a set of carefully constructed spike train surrogates .
we first illustrate the merits of our new approach using artificially generated datasets and then apply it to real datasets from two very different fields of research , neuroscience and climatology . in the neurophysiological dataset we analyze giant depolarized potentials ( gdps ) recorded from mice brain slices in order to search for potential hub neurons @xcite , whereas in the climate application we quantify the consistency of the longitudinal movement of the propagation front of el nio events @xcite .
the new algorithm is conceptually simple , of low computational cost and comes with an intuitive and straightforward visualization .
it vastly improves on all the bivariate functionalities of previous directional measures such as delay asymmetry ( no need for sampled profiles , more intuitive normalization etc . ) and could thus also be used in the context of the pairwise matrices , both normalized or cumulative , used in complex network theory @xcite . however , one of the main advantages of the new algorithm is its multivariate nature which opens up completely new kinds of application such as spike train sorting .
another advantage of the method is the high flexibility in the definition of events .
for example , when looking at the synchronization of neuronal bursts instead of individual spikes one can define the events as the onset , the center or the offset of the activity ( e.g. , the first , the middle or the last spike of each burst ) . in cases in which a burst of spikes is considered to be equivalent to a single spike one could introduce some kind of meta - events and then look at coincidences between these meta - events .
the application of our measures is also not restricted to truly discrete data .
continuously sampled data can be reduced to a spike train where the only information maintained is the timing of the individual events .
often these event times are obtained in a manner similar to how the neuronal spike times are extracted from recordings of neuronal membrane potentials ( usually done via some kind of thresholding ) .
examples of sampled data to which measures of spike train synchrony have been applied include eeg data @xcite and , outside of neuroscience , stock market velocity @xcite - and rainfall events @xcite .
the universality of the phenomenon , repetitive propagation patterns , makes our new algorithm applicable in a wide array of fields such as medical sciences , seismology , oceanography , meteorology or climatology .
the algorithm is particularly suited for data that resemble a synfire pattern of sequences of global events for which , according to the coincidence detection criterion ( eq . [ eq : coincidence - maxdist ] ) , the interval between successive events is at least twice as large as the propagation time within an event .
propagation patterns with such characteristics can be found in many different areas .
for example , the duration of an epileptic seizure is typically much shorter than the interval between two successive seizures .
also the time it takes a storm front to cross a specific region is typically much smaller than the time to the next storm .
many other repetitive propagation phenomena exhibit similar ratios of characteristic time scales .    in order to understand the scope of our proposed algorithm
it is important to understand what it is not designed to achieve .
first , the method deals purely with relative order , it does not consider the length of absolute delays .
many other methods have been designed to characterize the detailed spatio - temporal structure in large neuronal networks @xcite or to detect hierarchically structured spike - train communities @xcite .
the method is also not designed to detect neuronal synfire chains ( in the strict sense of the word ) in massively parallel data .
for this task other statistical methods involving some form of pattern detection have been developed @xcite .
another caveat concerns causality .
while a significant value of the synfire indicator @xmath61 in our algorithm clearly shows the presence of a preferred temporal order of some signals with respect to others , it does not necessarily prove a driver - responder relationship .
there are other methods that have been developed for this kind of system dynamics analysis ( e.g. , @xcite , @xcite ) .
but even for such methods causality is always a strong claim .
in fact , the two signals might be driven by a common hidden source and a consistent leader ( follower ) could just indicate a drive with a smaller ( larger ) delay .
similarly , internal delay loops in one of the two systems can also fool the interpretation .
there are a number of possible directions for future research , both from a methods and from a data point of view . regarding the algorithm , for the coincidence detection it would be straightforward to limit the range of allowed time lags by incorporating information about the expected speed of propagation @xcite .
one could introduce a minimum time lag in order to ensure causality and/or limit the maximally allowed time lag in order to focus on meaningful propagation of activity . in principle
the range of allowed time lags could even be selected individually for each pair of spike trains depending on the known properties of the connectivity between the respective two neurons .
importantly , even with such type of time lag restrictions in place , it has still to be guaranteed that each spike can be part of at most one coincidence .    a follow - up task for our neurophysiological data would be to investigate to what extent the neurons that are identified as leading by our analysis are identical to the so - called hub neurons @xcite , i.e. neurons with a much higher than average degree of connectivity within the network . regarding the el nio  analysis , the difference in propagation directions observed for the strong and weak el nio  events remains an open question .
furthermore , expanding the analysis to wider regions , i.e.@xmath134 and verifying the consistency of the observed propagation patterns is an interesting topic for future research . finally , the relation to results based on average warming / cooling rates  @xcite requires further investigations
.    the algorithm will be readily applicable for everyone since , together with the existing symmetric measures isi - distance , spike - distance , and spike - synchronization , spike - order is implemented in in three publicly available software packages , the matlab - based graphical user interface spiky   @xcite , cspike   ( matlab command line with mex - files ) , and the python library pyspike   @xcite .
[ s : appendix ]
the neurophysiological data analyzed in section [ ss : results - neuro ] were recorded in acute hippocampal slices from juvenile mice by the group of heinz beck at the department of epileptology , university of bonn , germany .
these recordings were performed prior to and independently from the design of this study .
transversal acute brain slices ( @xmath135 thick ) were prepared from @xmath136 to @xmath17-day - old ( p5-p10 ) c57bl/6 mice ( charles river , n = @xmath88 slices ) .
slice preparation , calcium imaging and data analysis were performed as previously described in @xcite , @xcite . for am - loading of brain slices with ogb1-am
we used a protocol modified from @xcite , @xcite .
multicellular calcium imaging was done using a homemade single planar illumination microscope ( spim ) modified from @xcite , @xcite .
movies were recorded at a frame rate of @xmath137 hz over a minimal length of @xmath136 min up to @xmath138 min to record a sufficient amount of spontaneous activity .
time points of cell activity from the imaging data were defined as the onsets of ca@xmath139 events in fluorescence traces of all individual cells using the maximum of the second derivative of each event @xcite .    in order to test the spike train order algorithm ,
datasets were chosen that exhibited at least three global gdps during the recording ( @xmath140 ) .
for one dataset the surrogate analysis described in section [ ss : statistical - significance ] proved to be unfeasible due to its excessive density of spontaneous activity .
therefore this dataset was discarded from further analysis , so the final number of datasets analyzed was @xmath141 .
the data analyzed in section [ ss : results - climate ] describe one of the most well - known global climate effects , the so called el nio , the warm phase of the el nio  southern oscillation ( enso ) .
it is usually characterized by an increased sea surface temperature ( sst ) in the central and eastern tropical pacific ocean typically during the months september
february  @xcite .
according to the u.s .
national oceanic and atmospheric administration ( noaa ) , an el nio  event is identified by an increased three - month moving average sst by @xmath142 over at least six months .
el nios can last from nine months up to two years and typically occur in irregular intervals of two to seven years .
the analysis presented in section [ ss : results - climate ] uses the optimum interpolated sea surface temperature ( oisst ) data provided by noaa .
these data result from a high - resolution blended analysis ( spatial resolution of @xmath143 ) of daily sst and ice constructed by combining observations from different platforms ( satellites , ships , buoys ) on a regular global grid with a time range from 1981 to 2016  @xcite .
the daily sst data is centralized by the long - term daily mean resulting in daily sst anomaly data ( deviations from long - term mean ) that form the basis of this analysis .
the area used to define el nio  events , the el nio  3.4 region , stretches from @xmath134 in latitude and @xmath144 in longitude , as shown in fig .  [
fig : el_nino_region ] .
however , for the latitudinal direction we here focused only on a small central strip around the equator , i.e.  from @xmath145 over a longitudinal stretch consistent with the el nio  region , i.e.  from @xmath146 ( dashed line in fig .
[ fig : el_nino_region ] ) .
note , that this focus on the small region around the equator is the main difference to most previous works that studied the propagation of sst anomalies averaged over a much larger latitudinal extent , e.g.  @xmath134 in @xcite . in latitudinal direction
, we average over the whole strip ( four grid points ) , while in longitudinal direction an averaging over two grid points is performed resulting in @xmath147 of spatial resolution and a total of @xmath116 time series of daily sst anomalies .
we disregard short - term fluctuation by applying a gaussian smoothing with width @xmath148 . in fig .
[ fig : time_series ] we show the time series resulting from this procedure exemplarily for the center of the observed region , @xmath113 .    for the sea surface temperature data we use a threshold criterion to identify the moving high temperature fronts of the el nio events .
the threshold determines the signal - to - noise ratio of the data : for small values even weaker events have an effect on the result , whereas for higher values the analysis is focused on the strongest el nio events only .
due to the variability of the propagation patterns it might happen that in successive years the threshold is surpassed in different regions .
however , since the aim of the analysis is to look at the propagation of individual ( seasonal ) fronts we suppress coincidences between threshold crossings from different years .
we still use the adaptive coincidence detection from eq .
[ eq : coincidence - maxdist ] but define a maximum coincidence window @xmath9 which in this case is set to @xmath149 months .
we are indebted to heinz beck from the department of epileptology , university of bonn , germany , for providing the neurophysiological data .
we thank markus abel , roman bauer , heinz beck , nebojsa bozanic , christoph gebhardt , marcus kaiser , stefano luccioli , florian mormann , giorgia paratore , and alessandro torcini for useful discussions .
finally , we are grateful to irene malvestio and bernd mulansky for carefully reading the manuscript .
tk thanks marcus kaiser and his group for hosting him at the university of newcastle , uk .
we acknowledge funding support from the european commission through the marie curie initial training network ` neural engineering transformative technologies ( nett ) ' , project 289146 ( tk and mm ) , and through the european joint doctorate ` complex oscillatory systems : modeling and analysis ( cosmos ) ' , project 642563 ( tk and es ) .
tk also acknowledges the italian ministry of foreign affairs regarding the activity of the joint italian - israeli laboratory on neuroscience .
boccaletti , s. , bianconi , g. , criado , r. , del genio , c. i. , gmez - gardees , j. , romance , m. , sendia - nadal , i. , wang , z. , zanin , m. , 2014 .
the structure and dynamics of multilayer networks .
physics reports 544 ( 1 ) , 1 - 122 .
boers , n. , bookhagen , b. , barbosa , h. , marwan , n. , kurths , j. , marengo , j. , 2014 .
prediction of extreme floods in the eastern central andes based on a complex networks approach .
nature communications 5 , 5199 .
bonifazi , p. , goldin , m. , picardo , m. a. , jorquera , i. , cattani , a. , bianconi , g. , represa , a. , ben - ari , y. , cossart , r. , 2009 .
gabaergic hub neurons orchestrate synchrony in developing hippocampal networks .
science 326 , 1419 .
hedrich , u. b. , liautard , c. , kirschenbaum , d. , pofahl , m. , lavigne , j. , liu , y. , theiss , s. , slotta , j. , escayg , a. , dihn , m. , et al . , 2014 .
impaired action potential initiation in gabaergic interneurons causes hyperexcitable networks in an epileptic mouse model carrying a human nav1 . 1 mutation .
j neurosci 34 ( 45 ) , 14874 .
heidemann , j. , stojanovic , m. , zorzi , m. , 2012 .
underwater sensor networks : applications , advances and challenges .
philosophical transactions of the royal society of london a : mathematical , physical and engineering sciences 370 ( 1958 ) , 158 - 175 .
lacroix , p. , grasso , j .-
roulle , j. , giraud , g. , goetz , d. , morin , s. , helmstetter , a. , 2012 .
monitoring of snow avalanches using a seismic array : location , speed estimation , and relationships to meteorological variables .
j geophys research : earth surface 117 ( f1 ) .
lazer , d. , pentland , a. s. , adamic , l. , aral , s. , barabasi , a. l. , brewer , d. , christakis , n. , contractor , n. , fowler , j. , gutmann , m. , et al . , 2009 .
life in the network : the coming age of computational social science .
science ( new york , ny ) 323 ( 5915 ) , 721 .
menne , m. j. , durre , i. , vose , r. s. , gleason , b. e. , houston , t. g. , 2012 .
an overview of the global historical climatology network - daily database .
j atmospheric and oceanic technology 29 ( 7 ) , 897 - 910 .
mulansky , m. , bozanic , n. , sburlea , a. , kreuz , t. , 2015 . a guide to time - resolved and parameter - free measures of spike train synchrony .
event - based control , communication , and signal processing ( ebccsp ) international conference on , 1 - 8 .
rahbar , f. , anzalone , s. , varni , g. , zibetti , e. , ivaldi , s. , chetouani , m. , 2015 .
predicting extraversion from nonverbal features during a face - to - face human - robot interaction
. international conference on social robotics , 10 .
rasmusson , e. m. , carpenter , t. h. , 1982 .
variations in tropical sea surface temperature and surface wind  fields associated with the southern oscillation / el nio .
monthly weather rev 110 ( 5 ) , 354 - 384 .
santoso , a. , mcgregor , s. , jin , f .- f .
, cai , w. , england , m. h. , an , s .-
i . , mcphaden , m. j. , guilyardi , e. , 2013 .
late - twentieth - century emergence of the el nio propagation asymmetry and future projections .
nature 504 ( 7478 ) , 126 - 130 .
takano , h. , mccartney , m. , ortinski , p. i. , yue , c. , putt , m. e. , coulter , d. a. , 2012 .
deterministic and stochastic neuronal contributions to distinct synchronous ca3 network bursts .
j neurosci 32 ( 14 ) , 4743 - 4754 .
wei , x. , valler , n. c. , prakash , b. a. , neamtiu , i. , faloutsos , m. , faloutsos , c. , 2013 .
competing memes propagation on networks : a network science perspective . selected areas in communications , ieee journal on 31 ( 6 ) , 1049 - 1060 .