Multiscale analysis of slow-fast neuronal learning models with noise

This paper deals with the application of temporal averaging methods to recurrent networks of noisy neurons undergoing a slow and unsupervised modification of their connectivity matrix called learning. Three time-scales arise for these models: (i) the fast neuronal dynamics, (ii) the intermediate external input to the system, and (iii) the slow learning mechanisms. Based on this time-scale separation, we apply an extension of the mathematical theory of stochastic averaging with periodic forcing in order to derive a reduced deterministic model for the connectivity dynamics. We focus on a class of models where the activity is linear to understand the specificity of several learning rules (Hebbian, trace or anti-symmetric learning). In a weakly connected regime, we study the equilibrium connectivity which gathers the entire ‘knowledge’ of the network about the inputs. We develop an asymptotic method to approximate this equilibrium. We show that the symmetric part of the connectivity post-learning encodes the correlation structure of the inputs, whereas the anti-symmetric part corresponds to the cross correlation between the inputs and their time derivative. Moreover, the time-scales ratio appears as an important parameter revealing temporal correlations.


Introduction
Complex systems are made of a large number of interacting elements leading to nontrivial behaviors. They arise in various areas of research such as biology, social sciences, physics or communication networks. In particular in neuroscience, the nervous system is composed of billions of interconnected neurons interacting with their environment. Two specific features of this class of complex systems are that (i) external inputs and (ii) internal sources of random fluctuations influence their dynamics. Their theoretical understanding is a great challenge and involves high-dimensional non-linear mathematical models integrating non-autonomous and stochastic perturbations.
Modeling these systems gives rise to many different scales both in space and in time. In particular, learning processes in the brain involve three time-scales: from neuronal activity (fast), external stimulation (intermediate) to synaptic plasticity (slow). Here, fast time-scale corresponds to a few milliseconds and slow time-scale to minutes/hour, and intermediate time-scale generally ranges between fast and slow scales, although some stimuli may be faster than neuronal activity time-scale (e.g., submilliseconds auditory signals [1]). The separation of these time-scales is an important and useful property in their study. Indeed, multiscale methods appear particularly relevant to handle and simplify such complex systems.
First, stochastic averaging principle [2,3] is a powerful tool to analyze the impact of noise on slow-fast dynamical systems. This method relies on approximating the fast dynamics by its quasi-stationary measure and averaging the slow evolution with respect to this measure. In the asymptotic regime of perfect time-scale separation, this leads to a slow reduced system whose analysis enables a better understanding of the original stochastic model.
Second, periodic averaging theory [4], which has been originally developed for celestial mechanics, is particularly relevant to study the effect of fast deterministic and periodic perturbations (external input) on dynamical systems. This method also leads to a reduced model where the external perturbation is time-averaged.
It seems appropriate to gather these two methods to address our case of a noisy and input-driven slow-fast dynamical system. This combined approach provides a novel way to understand the interactions between the three time-scales relevant in our models. More precisely, we will consider the following class of multiscale stochastic differential equations (SDEs), with 1 , 2 > 0 two small parameters dv = 1 1 [F (v , w , u( t 2 ))] dt + 1 resents the value of the external input at time t. Random perturbations are included in the form of a diffusion term, and (B(t)) is a standard Brownian motion. We are interested in the double limit 1 → 0 and 2 → 0 to describe the evolution of the slow variable w in the asymptotic regime where both the variable v and the external input are much faster than w. This asymptotic regime corresponds to the study of a neuronal network in which both the external input u and the neuronal activity v operate on a faster time-scale than the slow plasticity-driven evolution of synaptic weights W. To account for the possible difference of time-scales between v and the input, we introduce the time-scale ratio μ = 1 / 2 ∈ [0, ∞]. In the interesting case where μ ∈ (0, ∞), one needs to understand the long-time behavior of the rescaled periodically forced SDE for any w 0 fixed Recently, in an important contribution [5], a precise understanding of the long-time behavior of such processes has been obtained using methods from partial differential equations. In particular, conditions ensuring the existence of a periodic family of probability measures to which the law of v converges as time grows have been identified, together with a sharp estimation of the speed of mixing. These results are at the heart of the extension of the classical stochastic averaging principle [2] to the case of periodically forced slow-fast SDEs [6]. As a result, we obtain a reduced equation describing the slow evolution of variable w in the form of an ordinary differential equation, whereḠ is constructed as an average of G with respect to a specific probability measure, as explained in Section 2. This paper first introduces the appropriate mathematical framework and then focuses on applying these multiscale methods to learning neural networks.
The individual elements of these networks are neurons or populations of neurons. A common assumption at the basis of mathematical neuroscience [7] is to model their behavior by a stochastic differential equation which is made of four different contributions: (i) an intrinsic dynamics term, (ii) a communication term, (iii) a term for the external input, and (iv) a stochastic term for the intrinsic variability. Assuming that their activity is represented by the fast variable v ∈ R n , the first equation of system (1) is a generic representation of a neural network (function F corresponds to the first three terms contributing to the dynamics). In the literature, the level of nonlinearity of the function F ranges from a linear (or almost-linear) system to spiking neuron dynamics [8], yet the structure of the system is universal.
These neurons are interconnected through a connectivity matrix which represents the strength of the synapses connecting the real neurons together. The slow modification of the connectivity between the neurons is commonly thought to be the essence of learning. Unsupervised learning rules update the connectivity exclusively based on the value of the activity variable. Therefore, this mechanism is represented by the slow equation above, where w ∈ R n×n is the connectivity matrix and G is the learning rule. Probably the most famous of these rules is the Hebbian learning rule introduced in [9]. It says that if both neurons A and B are active at the same time, then the synapses from A to B and B to A should be strengthened proportionally to the product of the activity of A and B. There are many different variations of this correlation-based principle which can be found in [10,11]. Another recent, unsupervised, biologically motivated learning rule is the spike-timing-dependent plasticity (STDP) reviewed in [12]. It is similar to Hebbian learning except that it focuses on causation instead of correlation and that it occurs on a faster time-scale. Both of these types of rule correspond to G being quadratic in v.
Previous literature about dynamic learning networks is thick, yet we take a significantly different approach to understand the problem. An historical focus was the understanding of feedforward deterministic networks [13][14][15]. Another approach consisted in precomputing the connectivity of a recurrent network according to the principles underlying the Hebbian rule [16]. Actually, most of current research in the field is focused on STDP and is based on the precise times of the spikes, making them explicit in computations [17][18][19][20]. Our approach is different from the others regarding at least one of the following points: (i) we consider recurrent networks, (ii) we study the evolution of the coupled system activity/connectivity, and (iii) we consider bounded dynamical systems for the activity without asking them to be spiking. Besides, our approach is a rigorous mathematical analysis in a field where most results rely heavily on heuristic arguments and numerical simulations. To our knowledge, this is the first time such models expressed in a slow-fast SDE formalism are analyzed using temporal averaging principles.
The purpose of this application is to understand what the network learns from the exposition to time-dependent inputs. In other words, we are interested in the evolution of the connectivity variable, which evolves on a slow time-scale, under the influence of the external input and some noise added on the fast variable. More precisely, we intend to explicitly compute the equilibrium connectivities of such systems. This final matrix corresponds to the knowledge the network has extracted from the inputs. Although the derivation of the results is mathematically tough for untrained readers, we have tried to extract widely understandable conclusions from our mathematical results and we believe this paper brings novel elements to the debate about the role and mechanisms of learning in large scale networks.
Although the averaging method is a generic principle, we have made significant assumptions to keep the analysis of the averaged system mathematically tractable. In particular, we will assume that the activity evolves according to a linear stochastic differential equation. This is not very realistic when modeling individual neurons, but it seems more reasonable to model populations of neurons; see Chapter 11 of [7].
The paper is organized as follows. Section 2 is devoted to introducing the temporal averaging theory. Theorem 2.2 is the main result of this section. It provides the technical tool to tackle learning neural networks. Section 3 corresponds to application of the mathematical tools developed in the previous section onto the models of learning neural networks. A generic model is described and three different particular models of increasing complexity are analyzed. First, Hebbian learning, then trace-learning, and finally STDP learning are analyzed for linear activities. Finally, Section 4 is a discussion of the consequences of the previous results from the viewpoint of their biological interpretation.

Averaging principles: theory
In this section, we present multiscale theoretical results concerning stochastic averaging of periodically forced SDEs (Section 2.3). These results combine ideas from singular perturbations, classical periodic averaging and stochastic averaging principles. Therefore, we recall briefly, in Sections 2.1 and 2.2, several basic features of these principles, providing several examples that are closely related to the application developed in Section 3.

Periodic averaging principle
We present here an example of a slow-fast ordinary differential equation perturbed by a fast external periodic input. We have chosen this example since it readily illustrates many ideas that will be developed in the following sections. In particular, this example shows how the ratio between the time-scale separation of the system and the time-scale of the input appears as a new crucial parameter.
Example 2.1 Consider the following linear time-inhomogeneous dynamical system with 1 , 2 > 0 two parameters: This system is particularly handy since one can solve analytically the first ordinary differential equation, that is, where we have introduced the time-scales ratio μ := 1 2 .
In this system, one can distinguish various asymptotic regimes when 1 and 2 are small according to the asymptotic value of μ: • Regime 1: Slow input μ = 0: First, if 1 → 0 and 2 is fixed, then v(t) is close to sin( t 2 ), and from geometric singular perturbation theory [21,22] and when 1 → 0, one does not recover the same asymptotic behavior as in Regime 1. • Regime 3: Time-scales matching 0 < μ < ∞: Now consider the intermediate case where 1 is asymptotically proportional to 2 . In this case, v can be approximated on the fast time-scale t/ 1 by the periodic solutionv μ (t) = 1 1+μ 2 (sin(μt) − μ cos(μt)) of dv dt = −v + sin(μt). As a consequence, w will be close to the solution of , Thus, we have seen in this example that 1. the two limits 1 → 0 and 2 → 0 do not commute, 2. the ratio μ between the internal time-scale separation 1 and the input time-scale 2 is a key parameter in the study of slow-fast systems subject to a time-dependent perturbation.

Stochastic averaging principle
Time-scales separation is a key property to investigate the dynamical behavior of non-linear multiscale systems, with techniques ranging from averaging principles to geometric singular perturbation theory. This property appears to be also crucial to understanding the impact of noise. Instead of carrying a small noise analysis, a multiscale approach based on the stochastic averaging principle [2] can be a powerful tool to unravel subtle interplays between noise properties and non-linearities. More precisely, consider a system of SDEs in R p+q : with initial conditions v (0) = v 0 , w (0) = w 0 , and where w ∈ R q is called the slow variable, v ∈ R p is the fast variable, with F , G, smooth functions ensuring the existence and uniqueness for the solution (v , w ), and B(t) a p-dimensional standard Brownian motion, defined on a filtered probability space ( , F , P). Timescale separation in encoded in the small parameter , which denotes in this section a single positive real number. In order to approximate the behavior of (v , w ) for small , the idea is to average out the equation for the slow variable with respect to the stationary distribution of the fast one. More precisely, one first assumes that for each w ∈ R q fixed, the frozen fast SDE, admits a unique invariant measure, denoted ρ w (dv). Then, one defines the averaged drift vector fieldḠḠ and w the solution of dw dt =Ḡ(w) with the initial condition w(0) = y 0 . Under some dissipativity assumptions, the stochastic averaging principle [2] states: As a consequence, analyzing the behavior of the deterministic solution w can help to understand useful features of the stochastic process (v , w ). Example 2.2 In this example we consider a similar system as in Example 2.1, but with a noise term instead of the periodic perturbation. Namely, we consider (v , w ) the solution of the system of SDEs, with > 0 a small parameter and σ > 0 a positive constant. From Theorem 2.1, the stochastic slow variable w can be approximated in the sense of (3) by the deterministic solution w of where ρ(dv) is the stationary measure of the linear diffusion process, that is, Consequently, w can be approximated in the limit → 0 by the solution of Applying (3) leads to the following result: for any T > 0 and δ > 0, Interestingly, the asymptotic behavior of w for small is characterized by a deterministic trajectory that depends on the strength σ of the noise applied to the system. Thus, the stochastic averaging principle appears particularly interesting when unraveling the impact of noise strength on slow-fast systems.
Many other results have been developed since, extending the set-up to the case where the slow variable has a diffusion component or to infinite-dimensional settings for instance, and also refining the convergence study, providing homogenization results concerning the limit of −1/2 (w − w) or establishing large deviation principles (see [23] for a recent monograph). However, fewer results are available in the case of non-homogeneous SDEs, that is, when the system is perturbed by an external timedependent signal. This setting is of particular interest in the framework of stochastic learning models, and we present the main relevant mathematical results in the following section.

Double averaging principle
Combining ideas of periodic and stochastic averaging introduced previously, we present here theoretical results concerning multiscale SDEs driven by an external time-periodic input. Consider (v , w ) the solution of with t → F (v, w, t) ∈ R p a τ -periodic function and = ( 1 , 2 ) ∈ R 2 + . Parameter 1 represents the internal time-scale separation and 2 the input time-scale. We consider the case where both 1 and 2 are small, that is, a strong time-scale separation between the fast variable v ∈ R p and the slow one w ∈ R q , and a fast periodic modulation of the fast drift F (v, w, ·).
The following assumption is made to ensure existence and uniqueness of a strong solution to system (4). In the following, z 1 , z 2 will denote the usual scalar product for vectors. Assumption 2.1 Existence and uniqueness of a strong solution (i) The functions F , G, and are locally Lipschitz continuous in the space variable z. More precisely, for any R > 0, there exists a constant α R such that for any z, z ∈ R p+q with z ≤ R and z ≤ R.
(ii) There exists a constant R > 0 such that To control the asymptotic behavior of the fast variable, one further assumes the following.
(ii) There exists r 0 < 0 such that for all t ≥ 0 and for all z, x ∈ R p+q , According to the value of μ ∈ {0, R * + , ∞}, the stochastic averaging principle is based on a description of the asymptotic behavior of various rescaled fast frozen processes. More precisely, under Assumptions 2.1 and 2.2, one can deduce that: • For any fixed w 0 ∈ R q and t 0 > 0 fixed, the law of the rescaled time-homogeneous frozen process, converges exponentially fast to a unique invariant probability measure denoted by ρ w 0 ,t 0 (dv).
• For any fixed w 0 ∈ R q , there exists a τ μ -periodic evolution system of measures ν w 0 μ (t, dv), different from ρ w 0 ,t (dv) above, such that the law of the rescaled timeinhomogeneous frozen process, converges exponentially fast towards ν w 0 μ (t, ·), uniformly with respect to w 0 (cf. the Appendix Theorem A.1).
• For any fixed w 0 ∈ R q , the law of the rescaled time-homogeneous frozen process, converges exponentially fast towards a unique invariant probability measure denoted byρ w 0 (dv).
According to the value of μ, we introduce a vector fieldḠ μ which will play a role similar toḠ introduced in equation (2).

Definition 2.2
We defineḠ μ : R q → R q as follows. In the time-scale matching case, that is, when 0 < μ < ∞, then Notation We may denote the periodic system of measures ν w μ (t, dv) associated with (6) by ν w μ [F, ](t, dv) to emphasize its relationship with F and . Accordingly, we may denoteḠ μ (w) byḠ [F, ] μ (w).
We are now able to present our main mathematical result. Extending Theorem 2.1, the following theorem describes the asymptotic behavior of the slow variable w when → 0 with 1 / 2 → μ. We refer to [6] for more details about the full mathematical proof of this result.
then the following convergence result holds, for all T > 0 and δ > 0: However, the study of the sequential limits 1 → 0 followed by 2 → 0 or 2 → 0 followed by 1 → 0 can be deduced from an appropriate combination of classical periodic and stochastic averaging theorems: • Slow input: If one considers the case where the limit 1 → 0 is taken first, so that from Theorem 2.1 with fast variable v and slow variables w and t (with the trivial equationṫ = 1), w is close in probability on finite time-intervals to the solution of the following inhomogeneous ordinary differential equation: Then taking the limit 2 → 0, one can apply the deterministic averaging principle to the fast periodic vector fieldG(w, t/ 2 ), so thatw converges when 2 → 0 to the solution of • Fast input: If the limit 2 → 0 is taken first, one first has to perform a classical averaging of the periodic drift F (v, w, t/ 2 ) leading to the homogeneous system of SDEs (4), but withF (v, w) instead of F (v, w, t/ 2 ). Then, an application of Theorem 2.1 on this system gives an averaged vector field 2. To study the extremal cases μ = 0 and μ = ∞ in full generality, one would need to consider all the possible relationships between 1 and 2 , not only the linear one as in the present article, but also of the type 1 = α 2 for example. In this case, we believe that the regime α < 1 converges to the same limit as taking the limit 2 first and the regime α > 1 corresponds to taking the limit 1 first. The intermediate regime α = 1 seems to be the only one for which the limit cannot be obtained by combining classical averaging principles. Therefore, the present article is focused on this case, in which the averaged system depends explicitly on the scaling parameter μ. Moreover, in terms of applications, this parameter can have a relatively easy interpretation in terms of the ratio of time-scales between intrinsic neuronal activity and typical stimulus time-scales in a given situation. Although the zeroth order limit (i.e., the averaged system) seems to depend only on the position of α with respect to 1, it seems reasonable to expect that the fluctuations around the limit would depend on the precise value of α. This is a difficult question which may deserve further analysis.
The case 0 < μ < ∞ is already very rich in the sense that it combines simultaneously both the periodic and stochastic averaging principles in a new way that cannot be recovered by sequential applications of those principles. A particular role is played by the frozen periodically-forced SDE (6). The equivalent of the quasi-stationary measure ρ w of Theorem 2.1 is given by the asymptotically periodic behavior of equation (6), represented by the periodic family of measures ν w μ (t, dv).
3. By a rescaling of the frozen process (6), one deduces the following scaling relationships: Therefore, if one knows, in the case μ = 1, the averaged vector field associated with the fast process generated by a drift F and a diffusion coefficient σ , denoted G 1 [F, ], it is possible to deduceḠ μ in the general case μ ∈ (0, ∞) with a change F → μF and → √ μ . 4. It seems reasonable to expect that the above result is still valid when considering ergodic, but not necessarily periodic, time dependency of the function F (v, w, ·).
In equation (7), instead of integrating ν w μ (t, dv) over one period, one should integrate it with respect to an ergodic stationary measure. However, this extension requires non-trivial technical improvements of [5] which are beyond the scope of this paper.

Case of a fast linear SDE with periodic input
We present here an elementary case where one can compute explicitly the quasistationary time-periodic family of measures ν w μ (t, x), when the equation for the fast variable is linear. Namely, we consider v ∈ R p the solution of with initial condition v(0) = v 0 ∈ R p , and where A ∈ R p×p is a matrix whose eigenvalues have positive real parts and u(·) is a τ -periodic function.
We are interested in the large time behavior of the law of v(t), which is a timeinhomogeneous Ornstein-Uhlenbeck process. From [5] we know that its law converges to a τ -periodic family of probability measures ν(t, dv). Due to the linearity in the previous equation, ν(t, dv) is Gaussian with a time-dependent mean and a constant covariance matrix and Q is the unique solution of the Lyapunov equation Indeed, if one denotes c(t) = v(t) −v(t), then c(t) is a solution of the classical homogeneous Ornstein-Uhlenbeck equation whose stationary distribution is known to be a centered Gaussian measure with the covariance matrix Q solution of (9); see Chapter 3.2 of [24]. Notice that if A is selfadjoint with respect to ( · ) −1 (i.e., A · ( · ) = ( · ) · A ), then the solution , which will be used in Appendix B.2. Hence, in the linear case, the averaged vector field of equation (7) becomes where N x,Q is the probability density function of the Gaussian law with mean x ∈ R q and covariance Q ∈ R p×p . Therefore, due to the linearity of the fast SDE, the periodic system of measure ν is just a constant Gaussian distribution shifted by a periodic function of time v(t).
In case G is quadratic in v, this remark implies that one can perform independently the integral over time and over R p in formula (10) (noting that the crossed term has a zero average). In this case, contributions from the periodic input and from noise appear in the averaged vector field in an additive way.

Example 2.3
In this last example, we consider a combination between Example 2.1 and Example 2.2, namely we consider the following system of periodically forced SDEs: As in Example 2.1 and as shown above, the behavior of this system when both 1 and 2 are small depends on the parameter μ defined in (5). More precisely, we have the following three regimes: • Regime 2: fast input:Ḡ • Regime 3: time-scale matching:

Truncation and asymptotic well-posedness
In some cases, Assumptions 2.1-2.2 may not be satisfied on the entire phase space R p × R q , but only on a subset. Such situations will appear in Section 3 when considering learning models. We introduce here a more refined set of assumptions ensuring that Theorem 2.2 still applies. Let us start with an example, namely the following bi-dimensional system with white noise input: For the fast drift −(l − w)v to be non-explosive, it is necessary to have w < l − α with α > 0 for all time. The concern about this system comes from the fact that the slow variable w may reach l due to the fluctuations captured in the term v 2 , for instance, if κ is not large enough. Such a system may have exponentially growing trajectories. However, we claim that for small enough , w will remain close to its averaged limit w for a very long time, and if this limit remains below l − α, then w can be considered as well-posed in the asymptotic limit → 0. To make this argument more rigorous, we suggest the following definition. We give in the following proposition sufficient conditions for system (4) to be asymptotically well posed in probability and to satisfy conclusions of Theorem 2.2.
Let us introduce the following set of additional assumptions.

Assumption 2.3 Moment conditions:
(i) There exists p > 2 such that (ii) For any T > 0 and any bounded subset K of R q , Remark 2.2 This last set of assumptions will be satisfied in all the applications of Section 3 since we consider linear models with additive noise for the equation of v, implying this variable to be Gaussian and the function G only involves quadratic moments of v; therefore, the moment conditions (i) and (ii) will be satisfied without any difficulty. Moreover, if one considers non-linear models for the variable v, then the Gaussian property may be lost; however, adding sigmoidal non-linearity has, in general, the effect of bounding the dynamics, thus making these moment assumptions reasonable to check in most models of interest.
Then for any initial condition w 0 ∈ E, system (4) is asymptotically well posed in probability and w satisfies the conclusion of Theorem 2.2.
Proof See Appendix A.2.
Here, we show that it applies to system (11). First, with E α = {w ∈ R, w < l − α}, for some α ∈ ]0, l[, it is possible to show that Assumptions 2.1-2.2 are satisfied on R p × E α . Then, as a special case of (10), we obtain the following averaged system: It remains to check that the solution of this system satisfies that is, the subset E α is invariant under the flow ofḠ. This property is satisfied as soon as Indeed, one can show thatḠ(w) = 0 admits two solutions iff η < 1,

Averaging learning neural networks
In this section, we apply the temporal averaging methods derived in Section 2 on models of unsupervised learning neural networks. First, we design a generic learning model and show that one can define formally an averaged system with equation (7). However, going beyond the mere definition of the averaged system seems very difficult and we only manage to get explicit results for simple systems where the fast activity dynamics is linear. In the three last subsections, we push the analysis for three examples of increasing complexity. In the following, we always consider that the initial connectivity is 0. This is an arbitrary choice but without consequences, because we focus on the regime where there is a single globally stable equilibrium point (see Section 3.2.3).

A generic learning neural network
We now introduce a large class of stochastic neuronal networks with learning models. They are defined as coupled systems describing the simultaneous evolution of the activity of n ∈ N neurons and the connectivity between them. We define v ∈ R n , the activity field of the network, and W ∈ R n×n , the connectivity matrix.
Each neuron variable v i is assumed to follow the SDE where the function f i characterizes the intrinsic non-linear dynamical behavior of neuron i and u i is the input received by neuron i. The stochastic term · dB i (t) is added to account for internal sources of noise. In terms of notations, (B(t)) t≥0 is a standard n-dimensional Brownian motion, is an n × n matrix, possibly function of v or other variables, and · dB i (t) denotes the ith component of the vector · dB(t).
The input u i to neuron i has mainly two components: the external input u ext i and the input coming from other neurons in the network u syn i . The latter is a priori a complex combination of post-synaptic potentials coming from many other neurons. The coefficient W ij of the connectivity matrix accounts for the strength of a synapse j → i. Note that neurons can be connected to themselves, i.e., W ii is not necessarily null. Thus, we can write where S : R → R and H is a function taking the history of v i and v j and returning a real for each time t (to take convolutions into account). In practical cases, they are often taken to be sigmoidal functions. We abusively redefine S and H as vector valued operators corresponding to the element-wise application of their real counterparts. We also define the function F : Together with a slow generic learning rule, this leads to defining a stochastic learning model as the following system of SDEs.
Before applying the general theory of Section 2, let us make several comments about this generic model of neural network with learning. This model is a nonautonomous, stochastic, non-linear slow-fast system.
In order to apply Theorem 2.2, one needs Assumptions 2.1, 2.2, and 2.3 to be satisfied, restricting the space of possible functions S, H, F, , and G. In particular, Assumption 2.2(ii) seems rather restrictive since it excludes systems with multiple equilibria and suggests that the general theory is more suited to deal with rate-based networks. However, one should keep in mind that these assumptions are only sufficient, and that the double averaging principle may work as well in systems which do not satisfy readily those assumptions.
As we will show in Section 3.3, a particular form of history-dependence can be taken into account, to a certain extent. Indeed, for instance, if the function F is actually a functional of the past trajectory of variable v which can be expressed as the solution of an additional SDE, then it may be possible to include a certain form of history-dependence. However, purely time-delayed systems do not enter the scope of this theory, although it might be possible to derive an analogous averaging method in this framework.
The noise term can be purely additive or set by a particular function (v, W) as long as it satisfies Assumption 2.2(i), meaning that it must be uniformly nondegenerate.
In the following subsection, we apply the averaging theory to various combinations of neuronal network models, embodied by choices of functions S, H, F, , and various learning rules, embodied by a choice of the function G. We will also analyze the obtained averaged system, describing the slow dynamics of the connectivity matrix in the limit of perfect time-scale separation and, in particular, study the convergence of this averaged system to an equilibrium point.

Symmetric Hebbian learning
One of the simplest, yet non-trivial, stochastic learning models is obtained when considering • A linear model for neuronal activity, namely f i (v i ) = −lv i with l a positive constant. • A linear model for the synaptic transmission, namely Actually, it corresponds to the tensor product: This model can be written as follows: where neurons are assumed to have the same decay constant: L = lI d ; u is a periodic continuous input (it replaces u ext in the previous section); σ, 1 , 2 , κ ∈ R + with 1 , 2 1 and B(t) is n-dimensional Brownian noise.
The first question that arises is about the well-posedness of the system: What is the definition interval of the solutions of system (12)? Do they explode in finite time? At first sight, it seems there may be a runaway of the solution if the largest real part among the eigenvalues of W grows bigger than l. In fact, it turns out this scenario can be avoided if the following assumption linking the parameters of the system is satisfied.
It corresponds to making sure the external (i.e., u m ) or internal (i.e., σ ) excitations are not too large compared to the decay mechanism (represented by κ and l). Note that if p ∈ ]0, 1[, u m and d are fixed, it is sufficient to increase κ or l for this assumption to be satisfied.
Under this assumption, the space is invariant by the flow of the averaged systemḠ, where W ≥ 0 means W is semidefinite positive and W < pL means pL − W is definite positive. Therefore, the averaged system is defined and bounded on R + . The slow/fast system being asymptotically close to the averaged system, it is therefore asymptotically well-defined in probability. This is summarized in the following theorem.  (12) is asymptotically well posed in probability and the connectivity matrix W , the solution of system (12), converges to W in the sense that for all δ, T > 0, In the following, we focus on the averaged system described by (13). Its right-hand side is made of three terms: a linear and homogeneous decay, a correlation term, and a noise term. The last two terms are made explicit in the following.

Noise term
As seen in Section 2, in the linear case, the noise term Q is the unique solution of the Lyapunov equation (9) with A = W − L and = σ I d. Because the noise is spatially uncorrelated and identical for each neuron and also because the connectivity is symmetric, observe that Q = σ 2 2 (L − W) −1 is the unique solution of the system. In more complicated cases, the computation of this term appears to be much more difficult as we will see in Section 3.4.

Correlation term
This term corresponds to the auto-correlation of neuronal activity. It is only implicitly defined; thus, this section is devoted to finding an explicit form depending only on the parameters l, μ, τ , the connectivity W, and the inputs u. Actually, one can perform an expansion of this term with respect to a small parameter corresponding to a weakly connected expansion. Most terms vanish if the connectivity W is small compared to the strength of the intrinsic decaying dynamics of neurons l.
The auto-correlation term of a τ μ -periodic function can be rewritten as With this notation, it is simple to think of v as a 'semi-continuous matrix' of R n×[0, τ μ [ . Hence, the operator '·' can be though of as a matrix multiplication. Similarly, the transpose operator turns a matrixv It is common knowledge, see [17] for instance, that this term gathers information about the correlation of the inputs. Indeed, if we assume that the input is sufficiently slow, thenv has enough time to converge to u(t) for all t ∈ [0, +∞[. Therefore, in the first orderv(t) (W − L) −1 · u(t). This leads tov ·v (W − L) −1 · u · u · (W − L) −1 . In the weakly connected regime, one can assume that W − L −L leading tō v ·v 1 l 2 u · u which is the auto-correlation of the inputs. Actually, without the assumption of a slow input, lagged correlations of the input appear in the averaged system. Before giving the expression of these temporal correlations, we need to introduce some notations. First, define the convolution filter where H is the Heaviside function. This family of functions is displayed for different values of l μ in Figure 4(a). Note that g l/μ → δ 0 when l μ → +∞, where δ 0 is the Dirac distribution centered at the origin. In this asymptotic regime, the convolution filter and its iterates g l/μ * · · · * g l/μ are equal to the identity. We also define the filtered correlation of the inputs C k,p ∈ R n×n by l/μ = g l/μ * · · · * g l/μ is the kth convolution of g l/μ with itself and u m = sup t∈R + u(t) 2 . This is the correlation matrix of the inputs filtered by two different Fig. 1 This shows the (k, q)-temporal profiles with l μ = 1, i.e., the functions g (k+1) 1 * g 1 (q+1) for q = 0 and k ranging from 0 to 6. For k = q = 0, the temporal profile is even and this also occurs to be true for any k = q. When k > q, the function reaches its maximum for strictly positive values that grow with the difference k − q. Besides, the temporal profiles are flattened when k + q increases.
functions. It is easy to show that this is similar to computing the cross-correlation of the inputs with the inputs filtered by another function, which motivates the definition of the (k, p)-temporal profile g l/μ (−t). This notation is deliberately similar to that of the transpose operator we use in the proofs. These functions are shown in Figure 1. We have not found a way to make them explicit; therefore, the following remarks are simply based on numerical illustrations. When k = q, the temporal profiles are centered. The larger the difference k − q, the larger the center of the bell. The larger the sum k + q, the larger the standard deviation. This motivates the idea that C k,p can be thought of as the k − q lagged correlation of the inputs. One can also say that C 10,10 is more blurred than C 0,0 in the sense that the inputs are temporally integrated over a 'wider' window in the first case.
Observe that g Thanks to Young's inequality for convolutions, which says that u * g l/μ 1 , it can be proved that C k,q 2 ≤ 1. We intend to express the correlation term as an infinite converging sum involving these filtered correlations. In this perspective, we use a result we have proved in [25] to write the solution of a general class of non-autonomous linear systems (e.g., dv dt = (W − L) ·v + u(t)) as an infinite sum, in the case μ = 1.

Lemma 3.2 Ifv is the solution, with zero as initial condition, of dv dt = (W − L) ·v + u(t) it can be written by the sum below which converges if W is in
This is a decomposition of the solution of a linear differential system on the basis of operators where the spatial and temporal parts are decoupled. This important step in a detailed study of the averaged equation cannot be achieved easily in models with non-linear activity. Everything is now set up to introduce the explicit expansion of the correlation we are using in what follows. Indeed, we use the previous result to rewrite the correlation term as follows.

Property 3.3 The correlation term can be written
This infinite sum of convolved filters is reminiscent of a property of Hawkes processes that have a linear input-output gain [26].
The speed of inputs characterized by μ only appears in the temporal profiles g (k) l/μ * g l/μ (q) . In particular, if the inputs are much slower than neuronal activity time-scale, i.e., μ = 0, then g +∞ = δ 0 and u * g +∞ = u. Therefore, C k,q = C 0,0 and the sums in the formula of Property 3.3 are separable, leading tov ·v = (L − W) −1 · u · u · (L − W ) −1 , which corresponds to the heuristic result previously explained. Therefore, the averaged equation can be explicitly rewritten In Figure 2, we illustrate this result by comparing, for different = 1 = 2 (i.e., we choose μ = 1 in this example), the stochastic system and its averaged version. The above decomposition has been used as the basis for numerical computation of trajectories of the averaged system.

Global stability of the equilibrium point
Now that we have found an explicit formulation for the averaged system, it is natural to study its dynamics. Actually, we prove in the following that if the connectivity W Fig. 2 The first two figures, (a) and (b), represent the evolution of the connectivity for original stochastic system (12), superimposed with averaged system (13), for two different values of : respectively = 0.01 and = 0.001, where we have chosen = 1 = 2 . Each color corresponds to the weight of an edge in a network made of n = 3 neurons. As expected, it seems that the smaller , the better the approximation. This can be seen in the picture (c) where we have plotted the precision on the y-axis and on the x-axis. The parameters used here are l = 12, μ = 1, κ = 100, σ = 0.05. The inputs have a random (but frozen) spatial structure and evolve according to a sinusoidal function.
is kept smaller than l 3 , i.e., Assumption 3.1 is verified with p ≤ 1 3 , then the dynamics is trivial: the system converges to a single equilibrium point. Indeed, under the previous assumption, the system can be writtenḠ(W) = −κW + F (W), where F is a contraction operator on E 1 3 . Therefore, one can prove the uniqueness of the fixed point with the Banach fixed point argument and exhibit an energy function for the system. The fact that the equilibrium point is unique means that the 'knowledge' of the network about its environment (corresponding by hypothesis to the connectivity) eventually is unique. For a given input and any initial condition, the network can only converge to the same 'knowledge' or 'understanding' of this input.

Explicit expansion of the equilibrium point
When the network is weakly connected, the high-order terms in expansion (15) may be neglected. In this section, we follow this idea and find an explicit expansion for the equilibrium connectivity where the strength of the connectivity is the small parameter enabling the expansion. The weaker the connectivity, the more terms can be neglected in the expansion.
In fact, it is not natural to speak about a weakly connected learning network since the connectivity is a variable. However, we are able to identify a weak connectivity index which controls the strength of the connectivity. We say the connectivity is weak when it is negligible compared to the intrinsic leak term, i.e., |W | l is small. We show in the Appendix that this weak connectivity index depends only on the parameters of the network and can be writtenp In the asymptotic regimep → 0, we have W pl = O(1). This index is the 'small' parameter needed to perform the expansion. We also define λ = σ 2 l 2u 2 m , which has information about the wayp is converging to zero. In fact, it is the ratio of the two terms ofp.
With these, we can prove that the equilibrium connectivity W * has the following asymptotic expansion inp.
Proof See Theorem B.5 in Appendix B.2.
At the first order, the final connectivity is C 0,0 , the filtered correlation of the inputs convolved with a bell-shaped centered temporal profile. In the case of Figure 3, this is quite a good approximation of the final connectivity.
Not only the spatial correlation is encoded in the weights, but there is also some information about the temporal correlation, i.e., two successive but orthogonal events occurring in the inputs will be wired in the connectivity although they do not appear in the spatial correlations; see Figure 3 for an example.

Trace learning: band-pass filter effect
In this section, we study an improvement of the learning model by adding a certain form of history dependence in the system and explain the way it changes the results of the previous section. Given that Theorem 2.2 only applies to an instantaneous process, we will only be able to treat the history-dependent systems which can be reformulated as instantaneous processes. Actually, this class of systems contains models which are biologically more relevant than the previous model and which will exhibit interesting additional functional behaviors. In particular, this covers the following features: • Trace learning.
It is likely that a biological learning rule will integrate the activity over a short time. As Földiàk suggested in [27], it makes sense to consider the learning equation as being where * is the convolution and g 1 : t ∈ R → β 1 e −β 1 t H (t). Rolls and Deco numerically show [15] that the temporal convolution, leading to a spatio-temporal learning, makes it possible to perform invariant object recognition. Besides, trace learning appears to be the symmetric part of the biological STDP rule that we detail in Section 3.4. • Damped oscillatory neurons.
Many neurons have an oscillatory behavior. Although we cannot take this into account in a linear model, we can model a neuron by a damped oscillator, which also introduces a new important time-scale in the system. Adding adaptation to neuronal dynamics is an elementary way to implement this idea. This corresponds to modeling a single neuron without inputs by the equivalent formulations where g 2 (t) = β 2 e −β 2 t H (t).
• Dynamic synapses. The electro-chemical process of synaptic communication is very complicated and non-linear. Yet, one of the features of synaptic communication we can take into account in a linear model is the shape of the post-synaptic potentials. In this section, we consider that each synapse is a linear filter whose finite impulse response (i.e., the post-synaptic potential) has the shape g 3 (t) = β 3 e −β 3 t H (t). This is a common assumption which, for instance, is at the basis of traditional rate based models; see Chapter 11 of [7].
For mathematical tractability, we assume in the following that β = β 1 = β 2 = β 3 ∈ R + such that g β = g 1 = g 2 = g 3 , i.e., the time-scales of the neurons, those of the synapses and those of the learning windows are the same. Actually, there is a large variety of temporal scales of neurons, synapses, and learning windows, which makes this assumption not absurd. Besides, in many brain areas, examples of these time constants are in the same range ( 10 ms). Yet, investigating the impact of breaking this assumption would be necessary to model better biological networks. This leads to the following system: where the notations are the same as in Section 3.2. The behavior of a single neuron will be oscillatory damped if = 1 − 4 l β is a pure imaginary number, i.e., 4l > β. This is the regime on which we focus. Actually, the Hebbian linear case of Section 3.2 corresponds to β = +∞ in this delayed system.
To comply with the hypotheses of Theorem 2.2 (i.e., no dependence of the history of the process), we can add a variable z to the system which takes care of integrating the variable v over an exponential window. It leads to the equivalent system (in the limit This trick makes it possible to deal with some history-based processes where the dependence on the past is exponential. It turns out most of the results of Section 3.2 remain true for system (16) as detailed in the following. The existence of the solution on R + is proved in Theorem B.6. The computations show that in the averaged system, the noise term remains identical, whereas the correlation term is to be replaced by μ τ (v * g β ) · (v * g β ) . Besides, Lemma 3.2 can be extended to our delayed system by changing only the temporal filters; see Lemma B.7. Together with Lemma C.3, this proves the result of Theorem B.8. where Observe that applying Young's inequality to convolutions leads to C k,q where J n (z) is the Bessel function of the first kind. The value of the L1 norm of v is computed in Appendix C.3. It leads to v 1 = coth( π 2 ) if is a pure imaginary number and v 1 = 1 else. Therefore, the averaged system can be rewritten As before, the existence and uniqueness of a globally attractive equilibrium point is guaranteed if Assumption 3.1 is verified for p ≤ ; see Theorem B.9.
Besides, the weakly connected expansion of the equilibrium point we did in Section 3.2.4 can be derived in this case (see Theorem B.10). At the first order, this leads to the equilibrium connectivity The second order is given in Theorem B.10. The main difference with the Hebbian linear case is the shape of the temporal filters. Actually, the temporal filters have an oscillatory damped behavior if is purely imaginary. These two cases are compared in Figure 4. These oscillatory damped filters have the effect of amplifying a particular frequency of the input signal. As shown in Figure 5, if is a pure imaginary number, then D 0,0 is the cross-correlation of the band-pass filtered inputs with themselves. Fig. 5 This is the spectral profile | v * v |(ξ ) for β = 1 and l ∈ ]0, 2], where v * v denotes the Fourier transform of v * v . When 4l < β, the filter reaches its maximum for the null frequency, but if l increases beyond β 4 , the filter becomes a band-pass filter with long tails in 1 ξ 2 . This band-pass filter effect can also be observed in the higher-order terms of the weakly connected expansion. This suggests that the biophysical oscillatory behavior of neurons and synapses leads to selecting the corresponding frequency of the inputs and performing the same computation as for the Hebbian linear case of the previous section: computing the correlation of the (filtered) inputs.

Asymmetric 'STDP' learning with correlated noise
Here, we extend the results to temporally asymmetric learning rules and spatially correlated noise. We consider a learning rule that is similar to the spike-timing-dependent plasticity (STDP) which is closer to biological experiments than the previous Hebbian rules. It has been observed that the strength of the connection between two neurons depends mainly on the difference between the time of the spikes emitted by each neuron as shown in Figure 6; see [12].
Assuming that the decay time of the positive and negative parts of Figure 6 are equal, we approximate this function by t → a + g γ (−t) − a − g γ (t), where g γ (t) = γ e −γ t H (t). Actually, this corresponds toẆ ij = −κW ij + a + v i (v j * g γ ) − a − (v i * g γ )v j . If the neuron has a spiking behavior, then the term a + v i (t)(v j * g γ )(t) is significant when the post-synaptic neuron i is spiking at time t, and then it counts the number of previous spikes from the pre-synaptic neuron j that might have caused the post-synaptic spike. This calculus is weighted by an exponentially decaying function. This accounts for the left part of Figure 6. The last term −a − (v i * g γ )v j takes the opposite perspective. It is significant when the pre-synaptic neuron j is spiking and counts the number of previous spikes from the post-synaptic neuron i that are not likely to have been caused by the pre-synaptic neuron. The computation is also weighted by the mirrored function of an exponentially decaying function. This accounts for the right part of Figure 6. This leads to the coupled system where the non-linear intrinsic dynamics of the neurons is represented by f . Indeed, is negligible when the neuron is quiet and maximal at the top of the spikes emitted by neuron i. Therefore, it records the value of the pre-synaptic membrane potential weighted by the function g γ when the post-synaptic neuron spikes. This accounts for the positive part of Figure 6. Similarly, the negative part corresponds to −a − (v * g γ ) ⊗ v . Actually, this formulation is valid for any non-linear activity with correlated noise. However, studying the role of STDP in spiking networks is beyond the scope of this paper since we are only able to have explicit results for models with linear activity. Therefore, we will assume that the activity is linear while keeping the learning rule as it was derived in the spiking case, i.e., we assume f (v) = −lv = −L · v in the system above.
We also use the trick of adding additional variables to get rid of the historydependency. This reads In this framework, the method exposed in Section 3.2 holds with small changes. First, the well-posedness assumption becomes Assumption 3.2 There exists p ∈ ]0, 1[ such that where s 2 is the maximal eigenvalue of · .
Under this assumption, the system is asymptotically well posed in probability (Theorem B.11). And we show the averaged system is where we have used Theorem B.12 to expand the correlation term. The noise term Q is equal to Q 11 · (L + γ − W ) −1 , where Q 11 is the unique solution of the Lyapunov equation (W − L) · Q 11 + Q 11 · (W − L) + · = 0. Lemma D.1 gives a solution for this equation which leads to Q = γ +∞ k=0 W k · · · (2L − W ) −(k+1) · (L + γ − W ) −1 . In equation (18), the correlation matrices D k,q are given by According to Theorem B.13, the system is also globally asymptotically convergent to a single equilibrium, which we study in the following.
We perform a weakly connected expansion of the equilibrium connectivity of system (18). As shown in Theorem B.14, the first order of the expansion is According to Lemma C.1, the symmetric part is very similar to the trace learning case in Section 3.3. Applying Lemma C.2 leads to S = (a + − a − )(u * g l/μ * g γ ) · (u * g l/μ * g γ ) , Therefore, the STDP learning rule simply adds an antisymmetric part to the final connectivity keeping the symmetric part as the Hebbian case. Besides, the antisymmetric part corresponds to computing the cross-correlation of the inputs with its derivative. For high-order terms, this remains true although the temporal profiles are different from the first order. These results are in line with previous works underlying the similarity between STDP learning and differential Hebbian learning, where G(v) ∼v ⊗ v; see [29]. Figure 7 shows an example of purely antisymmetric STDP learning, i.e., a + = a − . The final connectivity matrix is therefore antisymmetric as shown in Figure 7(b) and the noise has no impact on learning. It shows the network finally approximates the connectivity given in (19).

Discussion
We have applied temporal averaging methods on slow/fast systems modeling the learning mechanisms occurring in linear stochastic neural networks. When we make The colors correspond to those of (b). The connectivity of system (17) corresponds to the plain thin oscillatory curves. The connectivity of the averaged system (18) (with k, q < 4) corresponds to the plain thick lines. Note that each curve corresponds to the superposition of three connections which remain equal through learning. The dashed curves correspond to the antisymmetric part in (19). The parameters chosen for this simulation were l = 10, κ = 100, γ = 3, a + = a − = 1, τ = 3, σ = 0.001, μ = 1, = 0.001. The system was simulated on the fast time-scale during T = 10,000 time steps of size dt = 0.01. sure the connectivity remains small, the dynamics of the averaged system appears to be simple: the connectivity always converges to a unique equilibrium point. Then, we performed a weakly connected expansion of this final connectivity whose terms are combinations of the noise covariance and the lagged correlations of the inputs: the first-order term is simply the sum of the noise covariance and the correlation of the inputs.
• As opposed to the former input/ouput vision of the neurons, we have considered the membrane potential v to be the solution of a dynamical system. The consequence of this modeling choice is that not only the spatial correlations, but also the temporal correlations are learned. Due to the fact we take the transients into account, the activity never converges but it lives between the representation of the inputs. Therefore, it links concepts together.
The parameter μ is the ratio of the time-scales between the inputs and the activity variable. If μ = 0, the inputs are infinitely slow and the activity variable has enough time to converge towards its equilibrium point. When μ grows, the dynamics becomes more and more transient, it has no time to converge. Therefore, if the inputs are extremely slow, the network only learns the spatial correlation of the inputs. If the inputs are fast, it also learns the temporal correlations. This is illustrated in Figure 3.
This suggests that learning associations between concepts, for instance, learning words in two different languages, may be optimized by presenting two words to be associated circularly with a certain frequency. Indeed, increasing the frequency (with a fixed duration of exposition to each word) amounts to increasing μ. Therefore, the network learns better the temporal correlations of the inputs and thus strengthens the link between these two concepts.
• According to the model of resonator neuron [30], Section 3.3 suggests that neurons and synapses with a preferred frequency of oscillation will preferably extract the correlation of the inputs filtered by a band pass filter centered on the intrinsic frequency of the neurons. Actually, it has been observed that the auditory cortex is tonotopically organized, i.e., the neurons are arranged by frequency [31]. It is traditionally thought that this is achieved thanks to a particular connectivity between the neurons. We exhibit here another mechanism to select this frequency which is solely based on the parameters of the neurons: a network with a lot of different neurons whose intrinsic frequencies are uniformly spread is likely to perform a Fourier-like operation: decomposing the signal by frequency.
In particular, this emphasizes the fact that the network does not treat space and time similarly. Roughly speaking, associating several pictures and associating several sounds are therefore two different tasks which involve different mechanisms.
• In this paper, the original hierarchy of the network has been neglected: the network is made of neurons which receive external inputs. A natural way to include a hierarchical structure (with layers for instance), without changing the setup of the paper, is therefore to remove the external input to some neurons. However, according to Theorem 3.5 (and its extensions Theorems B.10 and B.14), one can see that these neurons will be disconnected from the others at the first order (if the noise is spatially uncorrelated). Linear activities imply that the high level neurons disconnect from others, which is a problem. In fact, one can observe that the second-order term in Theorem 3.5 is not null if the noise matrix is not diagonal. In fact, this is the noise between neurons which will recruit the high level neurons to build connections from and to them. It is likely that a significant part of noise in the brain is locally induced, e.g., local perturbations due to blood vessels or local chemical signals. In a way, the neurons close to each other share their noise and it seems reasonable to choose the matrix so that it reflects the biological proximity between neurons. In fact, specifies the original structure of the network and makes it possible for close-by neurons to recruit each other.
Another idea to address hierarchy in networks would be to replace the synaptic decay term −κW by another homeostatic term [32] which would enforce the emergence of a strong hierarchical structure.
• It is also interesting to observe that most of the noise contribution to the equilibrium connectivity for STDP learning (see Theorem B.14) vanishes if the learning is purely skew-symmetric, i.e., a + = a − . In fact, it is only the symmetric part of learning, i.e., the Hebbian mechanism, that writes the noise in the connectivity. • We have shown that there is a natural analogous STDP learning for spiking neurons in our case of linear neurons. This asymmetric rule converges to a final connectivity which can be decomposed into symmetric and skew-symmetric parts. The first one is similar to the symmetric Hebbian learning case, emphasizing that the STDP is nothing more than an asymmetric Hebbian-like learning rule. The skew-symmetric part of the final connectivity is the cross-correlation between the inputs and their derivatives. This has an interesting signification when looking at the spontaneous activity of the network post-learning. In fact, if we assume that the inputs are generated by an autonomous system du dt = ζ(u), then according to the bottom equation in formula (19), the spontaneous activity is governed by In a way, the noise terms generate random patterns which tend to be forgotten by the network due to the leak term −lv. The only drift is due to ζ(u) · u · v E v,u (ζ (u)) which is the expectation of the vector field defining the dynamics of inputs with a measure being the scalar product between the activity variable and the inputs. In other words, if the activity is close to the inputs at a given time t * ∈ R + , i.e., v, u(t * ) is large, then the activity will evolve in the same direction as what this input would have done. The network has modeled the temporal structure of the inputs. The spontaneous activity predicts and replays the inputs the network has learned.
There are still numerous challenges to carry on in this direction. First, it seems natural to look for an application of these mathematical methods to more realistic models. The two main limitations of the class of models we study in Section 3 are (i) the activity variable is governed by a linear equation and (ii) all the neurons are assumed to be identical. The mathematical analysis in this paper was made possible by the assumption that the neural network has a linear dynamics, which does not reflect the intrinsic non-linear behavior of the neurons. However, the cornerstone of the application of temporal averaging methods to a learning neural network, namely Property 3.3, is similar to the behavior of Poisson processes [26] which has useful applications for learning neural networks [19,20]. This suggests that the dynamics studied in this paper might be quite similar to some non-linear network models. Studying more rigorously the extension of the present theory to non-linear and heterogeneous models is the next step toward a better modeling of biologically plausible neural networks.
Second, we have shown that the equilibrium connectivity was made of a symmetric and antisymmetric term. In terms of statistical analysis of data sets, the symmetric part corresponds to classical correlation matrices. However, the antisymmetric part suggests a way to improve the purely correlation-based approach used in many statistical analyses (e.g., PCA) toward a causality-oriented framework which might be better suited to deal with dynamical data.

A.1 Long-time behavior of inhomogeneous Markov processes
In order to construct the averaged vector fieldḠ μ (w) in the time-scale matching case (0 < μ < ∞), one needs to understand properly the long-time behavior of the rescaled inhomogeneous frozen process Under regularity and dissipativity conditions, [5] proves the following general result about the asymptotic behavior of the solution of where t → b(x, t) and t → σ (x, t) are τ -periodic. The first point of the following theorem gives the definition of evolution systems of measures, which generalizes the notion of invariant measures in the case of inhomogeneous Markov processes. The exponential estimate of 2. in the following theorem is a key point to prove the averaging principle of Theorem 2.2. such that for all functions φ continuous and bounded, Such a family is called evolution systems of measures.

2.
Furthermore, under stronger dissipativity condition, the convergence of the law of X to μ is exponentially fast. More precisely, for any r ∈ (1, +∞), there exist M > 0 and ω < 0 such that for all φ in the space of p-integrable functions with respect to μ(t, ·), L r (R p , μ(t, ·)),  (7).
Then for any initial condition w 0 ∈ E, system (4) is asymptotically well posed in probability and w satisfies the conclusion of Theorem 2.2.
Proof The idea of the proof is to truncate the original system, replacing G by a smooth truncation which coincides with G on E and which is close to 0 outside E. More precisely, for β > 0, we introduce ψ β : R q → R q a regular function (locally Lipschitz) such that ψ β (w) = 0 if w / ∈ E or w ∈ ∂E and lim β→0 ψ β (w) = 1 if w ∈ E − ∂E . We defineG Then, we introduce (ṽ ,β ,w ,β ) the solution of the auxiliary system with the same initial condition as (v , w ). Let T , δ, η > 0 be three positive reals. Let us introduce a few more notations. We will need to consider a subset of E defined by We also introduce the following stopping times: Finally, we define T := min(T , τ ,τ ) and T β := min(T , τ β ,τ β ).
Let us remark at this point that in order to prove that P[τ ≥ T ] → 1 (which is our aim), it is sufficient to work on the bounded stopping time min(T , τ ), since P[τ ≥ T ] = P[min(T , τ ) ≥ T ]. In other words, the realizations of w which stay longer than T inside E are not problematic. Therefore, we introduceτ := min(T , τ ).
Our first claim is that on finite time intervals [0, T ],w ,β is a good approximation of w inside E as long as one chooses β sufficiently small. To prove our claim, we proceed in two steps, first working inside E β and then in E − E β : 1. For any β > 0, one controls the difference between w andw ,β on E β since one controls the difference between the drifts. By an application of Lemma A.3 below (we need here the moment Assumption 2.3(i)), there exists a constant C (which may depend on T , β, . . .) such that We conclude by an application of the Markov inequality, implying 2. One needs now to control the situation outside E β , that is, on E − E β . The idea is that while one does not control the difference between G andG β anymore, one can still choose β sufficiently small such that E β becomes arbitrary close to E, hence implying thatτ and T β are arbitrary close with high probability, namely With θ = (δη) 2 and λ = δη, one obtains that for sufficiently small β, Let us denote S := sup T β ≤t≤τ w t −w where we have used the Cauchy-Schwarz inequality and the moment Assumption 2.3(ii) (yielding the constant K G ) in the second line. So, we deduce by the Markov inequality that sup T β ≤t≤τ w t −w ,β t is arbitrary small in probability.
From the combination of 1. and 2., we deduce that one can choose β small enough such that P sup 0≤t≤T ∧τ We can now proceed to the application of Theorem 2.2 to the truncated system. As (ṽ ,β 0 ,w ,β 0 ) remains in R p × E, one can extend smoothly F and outside E so that (F, ) satisfies Assumptions 2.1-2.2. Therefore, one can apply Theorem 2.2 to the auxiliary system: for all δ, T > 0, where w is defined by (8). As a consequence, there exists 0 such that for all with < 0 , P sup We know by assumption 2. of the statement of Property 2.3, for all t ≥ 0, w t ∈ E, so we conclude the proof by observing that for all T > 0, lim →0 P[τ ≥ T ] = 1.
In the following lemma, we show that the solutions of two SDEs, whose drifts are close on a subset of the state space, remain close on a finite time interval. The difficulty here lies in the fact that we deal with only locally Lipschitz coefficients. Lemma A.3 Suppose x and y are solutions, with identical initial conditions in H ⊂ R n , of the following stochastic differential equations in R n : Let T > 0 be a fixed time. We define We make the following assumptions: 1. Approximation assumption: 2. Local Lipschitz assumption: for all a, b ∈ R n with max( a , b ) ≤ R, there exists a constant C R such that 3. Boundedness assumption: there exists p > 2 and A > 0 such that and if x ≤ R, then there exists K R such that a(x) ≤ K R .
Under the above assumptions, there exists a constant C (depending on the quantities defined above, but not on ξ ) such that Proof Although the Lipschitz constant is not bounded on H, we can use the boundedness assumption to show that the probability of reaching a level R before time T will be very small for large R, and then use the classical strategy inside { x t ≤ R} where everything works as if the coefficients were globally Lipschitz. A similar strategy is used in [33] to prove a strong convergence theorem for the Euler scheme without the global Lipschitz assumption. We adapt here the ideas of their proof to our setting. Therefore, we introduce the following stopping times: We also denote e(t) := x t − y t . Splitting the following expectation according to the value of ρ, and applying the Young inequality, ab ≤ d r a r + 1 qd q/r b q for r −1 + q −1 = 1 and any a, b, d > 0, we obtain, for any d > 0, Then we use the boundedness assumption and the Markov inequality to deduce that x min(r,ρ) − y min(r,ρ) 2 ds + 2T 2 K 2 R ξ 2 .
We then apply the Gronwall lemma Finally, we choose d small enough such that and R large enough such that Appendix B: Proofs of Section 3

B.1 Notations and definitions
Throughout the paper, lower-case normal letters are constants, lower-case bold letters are vectors or vector-valued functions, and upper-case bold letters are matrices.
• v ∈ C 1 (R + , R n ) is the field of membrane potential in the network.
• u ∈ C 1 (R + , R n ) is the field of inputs to the network. We write • v ⊗ u ∈ C 1 (R + , R n×n ) is the tensor product between u and v, which simply means {u ⊗ v} ij (t) = u i (t)v j (t). • W ∈ C 1 (R + , R n×n ) is the connectivity of the network. Throughout the paper, we assume W(0) = 0. • x, y is the scalar product between two vectors x, y ∈ R n .
• u(t) p for p = 1, 2 is the L p norm of u(t) ∈ R n , i.e., u(t) p = ( n i=1 |u i (t)| p ) 1 p . And similarly for the connectivity matrices of R n×n with a double sum.
• J is the transpose of the matrix J ∈ R n×n . • x · y ∈ R n×n is the cross-correlation matrix of two compactly supported and differentiable functions from R to R n , i.e., • H is the Heaviside function, i.e., • The real functions are integrable on R.

B.1.1 Notations for the Appendix
The computations involve a lot of convolutions and, for readability of the Appendix, we introduce some new notations. Indeed, we rewrite the time-convolution between u and g, an integrable function on R, This suggests one should think of v as a semi-continuous matrix of R n×R and of G γ as a continuous matrix of R R×R , such that u it = u i (t) and G st = g(t − s). Indeed, in this framework the convolution with g is nothing but the continuous matrix multiplication between v and a continuous Toeplitz matrix generated row by row by g. Hence, the operator '·' can be though of as a matrix multiplication. Therefore, it is natural to define (u * g) = (u · G) = G · u , where G ∈ R R×R is the transpose of G, i.e., the continuous Toeplitz matrix generated row by row by g(−·) : t → g(−t) and u ∈ R R×n . Thus, for g and h, two integrable functions on R, we can rewrite where G and H are their associated continuous matrices. More generally, the bold curved letters G, V, W represent these continuous Toeplitz matrices which are well defined through their action as convolution operators with g, v, and w. The previous formulation naturally expresses the symmetry of relation (14).

B.2 Hebbian learning with linear activity
In this part, we consider system (12).

B.2.1 Application of temporal averaging theory
Theorem B.1 If Assumption 3.1 is verified for p ∈ ]0, 1[, then system (12) is asymptotically well posed in probability and the connectivity matrix W , the solution of system (12), converges to W, in the sense that for all δ, T > 0, Proof We are going to apply Property 2.3. For p ∈ ]0, 1[, consider the space First, since L − W is strictly positive for W in E p , Assumptions 2.1-2.2 are satisfied on R n × E p . Then, we only need to compute the averaged vector fieldḠ and show that E p is invariant under the flow ofḠ.
1. Computation of the averaged vector fieldḠ: The fast variable is linear, the averaged vector field is given by (10). This reads where N v,Q is the probability density function of the Gaussian law with mean v and covariance Q. And Q is the unique solution of (9), with = σ I d. This leads to Q = σ 2 2 (L − W) −1 . Therefore, The integral term in the equation above is the correlation matrix of the τ μ -periodic functionv. To rewrite this term, we definev ∈ R n×[0, τ μ [ such thatv(i, t) =v(t) i .v can be seen as a matrix gathering the history ofv, i.e., each column ofv corresponds to the vectorv(t) for a given t ∈ [0, τ μ [. It turns out τ μ 0v (t) ⊗v(t) dt =v ·v . Therefore,Ḡ According to the results in Section 2, the solutions of a differential system with such a right-hand side are close to that of the initial system (12). Hence, we focus exclusively on it and try to unveil the properties of its solutions which will be retrospectively extended to those of the initial system (12). 2. Invariance of E p under the flow of (13): Here we assume that W(0) ∈ E p and we want to prove that the trajectory of W is in E p , too.
(a) Symmetry: It is clear that each term inḠ is symmetric. Their sum is therefore symmetric and so is W(t).
The correlation termv ·v is a Gramian matrix and is therefore positive. Because L − W is assumed to be positive, therefore, its inverse is also positive. Therefore, if e i is an eigenvector of W ≥ 0 associated with a null eigenvalue, then e i ·Ḡ(W) · e i ≥ 0. Thus, the trajectories of (13) remain positive. (c) Inequality |W | < lp: The argument here is that of the inward pointing subspace. We intend to find a condition under which the flowḠ is pointing inward the space {W : |W | < lp}. Roughly speaking, this will be done by defining a real valued function g strictly negative on the subspace and positive outside and then showing that its gradient (or differential) on the border goes in the opposite direction of the flow, i.e., d W g(Ḡ(W)) < 0 for W ∈ g −1 (0).
For all x ∈ C n such that x = 1, define a family of positive numbers (α x ) whose supremum is written α * and a family of functions (g x ) such that Observe that the differential of g x at W applied to J is dg x • Upper bound of A: Applying Cauchy-Schwarz leads to • Upper bound of B: Observe that for J a positive definite matrix whose eigenvalues are the λ i , then the spectrum of

Using the previous observation and Cauchy-Schwarz leads to
Therefore, for α * < l Now write α * = pl with p ∈ ]0, 1[. Equation (31) becomes When there exists p such that P (p) < 0 (which corresponds to Assumption 3.1), then their exists a ball of radius pl on which the dynamics is pointing inward. It means any matrix W whose maximal eigenvalue is α * = pl will see this eigenvalue (and those which are sufficiently close to it, i.e., for which α * − α x > 0 is sufficiently small) decreasing along the trajectories of the system. Therefore, the space E p is invariant by the flow of the system iff Assumption 3.1 is satisfied. The trajectories of system (13) with the initial condition in E p are defined on R + and remain bounded. Indeed, if W(0) ∈ E p , the connectivity will stay in E p , in particular 0 < L − W ≤ L along the trajectories, more precisely L − W is a strictly positive constant since p ∈ ]0, 1[. Becausev is also bounded by u m l (1−p) ,v ·v + σ 2 2 (L − W) −1 is bounded. The right-hand side of system (13) is the sum a bounded term and a linear term multiplied by a negative constant; therefore, the system remains bounded and it cannot explode in finite time: it is defined on R + .

B.2.2 An expansion for the correlation term
We first state a useful lemma.

Lemma B.2 Ifv is the solution, with zero as initial condition, of dv dt = (W − L) ·v + u(t), it can be written by the sum below which converges if W is in
Proof It can be proven as a trivial rewriting of the variation of parameters formula for linear systems. A more general approach, which extends to delayed systems, was developed by Galtier and Touboul [25]; see the first example for the proof of this lemma. This is useful to find the next result.

Property B.3 The correlation term can be written
Proof We can use Lemma 3.2 with μ = 1 and compute the cross productv ·v . Therefore, consider u(μ·) : t → u(μt) instead of u. A change of variable shows that (u(μ·) * g l ( · μ ))(μt). Therefore, First, we compute the differential of F and show it is a bounded operator. Second, we show it implies the existence and uniqueness of an equilibrium point under some condition. Then, we find an energy for the system which says the fixed point is a global attractor. Finally, we show the stability condition is the same as Assumption 3.1 for p ≤ 1 3 . 1. We compute the differential of each term in F : • Formally write the second termv ·v (W) = +∞ k,q=0 W k l k · C k,q · W q l q . To find its differential, computev ·v (W + J) −v ·v (W) and keep the terms at the first order in J. Before computing the whole sum, observe that This leads to • Write Q : W → (L − W) −1 . We can write (L − W) · Q(W) = I d and use the chain rule to compute the differential of Q at W, which gives −J · Q(W) + (L − W) · dQ W (J) = 0. Therefore, The differential of F at W is the sum of these two terms. 2. We want to compute the norm of dF W (J) 2 for J 2 = 1. First, observe that for three square matrices A, B, and C, for e i the vectors of the canonical basis of R n . This leads to A · B · C 2 ≤ B 2 |A | |C |. Therefore, because |A | ≤ A 2 , Therefore, This inequality is true for all J with J 2 = 1; therefore, it is also true for the operator norm Therefore, F is a k-Lipschitz operator where k = then 1 κ F is a contraction map from E p to itself. Therefore, the Banach fixed point theorem says that there is a unique fixed point which we write W * . 4. We now show that, under assumption (32), W → W − W * 2 2 is an energy function for the system dW dt = −W + 1 κ F (W) (which is a rescaled version of system (15)).
Indeed, compute the derivative of this energy along the trajectories of the system The energy is lower-bounded, takes its minimum for W = W * and the decreases along the trajectories of the system. Therefore, W * is globally asymptotically stable if assumption (32) is verified. 5. Observe that if Assumption 3.1 is verified for p ≤ 1 3 , then 1 1−p < 2 1−p ≤ 1 p . Therefore, Assumption 3.1 implies that (32) is also true. This concludes the proof.
Proof Define p * the smallest value in ]0, 1[ such that Assumption 3.1 is valid. This implies The weak connectivity indexp controls the ratio of the connection over the strength of intrinsic dynamics. Indeed, these two variables are of the same order because We want to approximate the equilibrium W * , i.e., the solution ofḠ(W * ) = 0, in the regimep 1. Define = W pl such that | | = O(1). We abusively writē G( ) =Ḡ(pl ) such that Now, we write a candidate (m) = m a=0p a a , then we chose the terms a = O(1) so that the first mth orders inḠ( (m) ) vanish. This implies that Ḡ ( * ) − G( (m) ) = O(p m+1 ), where * = W * pl . Then, we use the fact that the minimal absolute value of the eigenvalues ofḠ is larger than κ − ( i.e., (m) = * + O(p m+1 ). Thus, we need to find the a such that the first mth orders inḠ( (m) ) vanish. Therefore, we need to expand all the terms inḠ( ). The first term is obvious. In the following, we write the second term F ( ) associated to the correlations and look for an explicit expression of the F a such that F ( ) = +∞ a=0p a F a . Second, we write the third term Q( ) associated to the noise and look for an explicit expression of the Q a such that Q( ) = +∞ a=0p a Q a .
This equation is scary but it reduces to simple expressions for small a ∈ N.
where V is the convolution operator generated by v(t) = l μ (e − β 2μ (1− )t − e − β 2μ (1+ )t )H (t) (see Appendix C for details). Observe that applying Young's inequality for convolutions leads to C k,q 2 ≤ 1. Therefore, we can rewrite Theorem 3.3 into Theorem B.8 Proof Similar to that of Theorem 3.3.

Theorem B.9 If Assumption 3.1 is verified for
, there is a unique equilibrium point which is globally, asymptotically stable.
Proof Similar to the proof of Theorem B.4.
With the same definitions forp = Proof Define = W pl so that So, the expansion will be in orders ofp v 1 with v 1 ≥ 1. 0 ·C 2,0 +C 0,2 · 2 0 + 0 ·C 1,1 · 0 + 1 ·C 1,0 +C 0,1 · 1 Actually, it is possible to compute recursively the nth terms, although their complexity explodes. Therefore, it is easy to compute a = F a + Q a for a ∈ N. By definition W =pl =pl(F + Q), which leads to the result.

B.4 STDP learning with linear neurons and correlated noise
Consider the following n-dimensional stochastic differential system: where u is a continuous input in R n , l, 1 , 2 , κ ∈ R + , a + , a − ∈ R, ∈ R n×n and B(t) is n-dimensional Brownian noise, and for all γ > 0, g γ : t → γ e −γ t H (t) where H is the Heaviside function. Recall the well-posedness Assumption 3.2 wherev(t) is the τ μ -periodic attractor of dv dt = (W − L) ·v + u(μt), where W ∈ R n×n is supposed to be fixed. And Q 12 is described below.
• Proving Q 22 ≥ 0: Q 22 is the covariance matrix of the random value z, therefore, it is positivesemi-definite.

Inequality |W | < lp:
For all x ∈ C n such that x = 1, define a family of positive numbers (α x ) whose supremum is written α * and a family of functions (g x ) such that Because g is linear, dg x W (J) = x, J · x . For W ∈ g x−1 (0), i.e., x, W · x = α x , compute • Upper bound of A: Cauchy-Schwarz leads to |A| ≤ |a + | v · G γ ·v · x + |a − | v · G γ ·v · x .
As before, we can use Young's inequality for convolutions to find an upper bound of A which reads A ≤ τ u 2 m (|a + | + |a − |) (l − α * ) 2 .
The rest of the proof is identical to the Hebbian case. Assumption 3.1 is changed to Assumption 3.2 for E p to be invariant by the flowḠ.
Define D k,q = 1 u 2 m τ (|a + | + |a − |) such that D k,q 2 ≤ 1. In this framework, one can prove Theorem B. 12 The correlation term can be written Proof Similar to that of Theorem 3.3.