format: text

text:
# Dynamical and Stationary Properties of On-line Learning from Finite Training Sets

## I Introduction

In recent years, there have been many attempts to analyse the dynamics of learning from examples in classification and regression Mace:Coolen . This refers to the dynamical process of minimizing the risk functions of the classifier or regressor, often via gradient descent, until a steady state is reached. Despite progress in understanding the steady-state behavior of learning processes Bishop , the dynamics of learning was much less understood. This is probably due to the high complexity in its analysis, since it typically involves the evolution of many microscopic parameters, each strongly interacting with others in a convolutional way. Yet, a number of important issues in improving the learning efficiency depend on a better understanding of its dynamics, including the speed of convergence, the early stopping point for optimal generalization, the shortening of the plateau regime, and the avoidance of getting trapped in local minima Saad ; Wong:Li:Tong ; EPL . Hence, it would be both useful and challenging to analyse the dynamics of learning.

On-line learning is a common mode of implementing learning, in which an independent example is presented at each learning step. Significant progress has been made in the case of on-line learning of infinite training sets biehl-schwarze ; Saad-Solla ; Saad . Since statistical correlations among the examples can be ignored, the dynamics can be described by instantaneous dynamical variables, leading to great advances in our understanding of on-line learning. However, in reality, the same restricted set of examples is recycled during the learning process. This introduces temporal correlations of the weights in the learning history, rendering the analysis at best an approximation to the reality.

There were some attempts to understand on-line learning with recycled examples. Early researchers used the approximate Fokker-Planck equation to describe the learning process Radons ; Hansen . The use of perturbative expansions of the master equation was shown to be insufficient for a precise calculation of global properties of on-line learning Heskes . The difference between batch learning and on-line learning was investigated to the first order of the learning rate Heskes-kappen . For general learning rates, the exact solution for Hebbian rule was derived in Ref. Rae:Sollich:Coolen . Exact solutions were found for linear networks, and the generalization ability of on-line learning was found to outperform batch learning if bias is present in the input Barber:Sollich . The dynamics of on-line learning in multilayer neural networks were analysed using the dynamical replica method and solutions were found in the limit of large sizes of training sets Coolen:Saad:Xiong .

A recent work based on the generating functional approach is a good step forward toward a general theory of describing the dynamical and stationary properties of on-line learning Heimel:Coolen . It illustrates the mean-field character of the dynamics in its description in terms of an effective single example. For random choices of the sequence of presented examples, the dynamics is characterized by the appearance of an example as a Poisson event in the learning sequence. Steady state properties were discussed by neglecting fluctuations in the learning forces (referred to as the mean-force approximation hereafter).

In this paper, we propose an analysis of on-line learning with recycled examples using the cavity method. The cavity method is a mean-field analysis first used in magnetic systems MPV . It enables us to understand the properties of a system by focusing on the response of the system to a single element added to it. It was later generalized to study learning in neural networks with the advantages of a clear physical picture and microscopic insights to both their equilibrium and dynamical properties Luo-wong ; EPL ; Wong:Li:Tong . The cavity method was subsequently applied to analyse the dynamics of batch learning, in which the entire set of examples is provided for each learning step Wong:Li:Tong , It provides dynamical equations and obtains important results on the overtraining, early stopping, noise effects and average learning strategy.

To adapt the cavity method from batch learning to on-line learning in this paper, there is a need to account for the following subtleties. (a) Averaging over the choice of sequencing the examples is now necessary. (b) The measurements of an example observed at an instant is now correlated with the instants when it was learned. This is due to the giant boost of that example at a learning step, which upsets the uniformity of the examples as in the case of batch learning.

The purposes of this paper are: (a) to perform an exact analysis of the learning dynamics as far as the formulation allows, so that minimal approximations are made, and deeper physical insights can be extracted; (b) to illustrate the analytical approach using the simple example of a linear learning rule, which can act as a benchmark for verifying the validity of the theory, and a theoretical framework for more complicated systems, such as nonlinear learning rules and multilayer networks; (c) to explore efficient Monte Carlo procedures implied by the distribution of example activations predicted by the theory, which can be applied to the more complicated cases; (d) to study the difference between on-line learning and batch learning for general learning conditions.

The paper is organized as follows. In Sec. II we describe the dynamics of on-line learning. In Sec. III we introduce the cavity method and derive the dynamical equations for the macroscopic measurements: (a) $`G(t,s)`$ and $`D(t,s)`$, the Green’s functions of weights and examples in response to stimuli; (b) $`R(t)`$, the correlation between the teacher and student weight vectors, and $`C(t,s)`$, the autocorrelation between student weight vectors at different times; (c) the fluctuation of the learning force $`F^2(t)`$. The Monte Carlo procedure to calculate the training error is also presented. In Sec. IV, we compare theoretical predictions with simulation results. The average learning strategy in the long time limit is proposed and compared with the performance of batch learning. In Sec. V, we summarize our work and propose some future directions. In Appendix, we describe the mathematical details of the procedure of sequence averaging.

## II Formulation

We consider a training set of $`p`$ examples generated by a teacher network with $`N`$ weights $`B_j`$, $`j=1,\mathrm{},N`$. For definiteness, we set $`|𝑩|=1`$. Each example $`\mu =1,\mathrm{},p`$ consists of an $`N`$-dimensional input vector $`𝝃^\mu `$, and a teacher generated output $`\stackrel{~}{y}_\mu `$. It is convenient to introduce the parameter $`\alpha p/N`$. The inputs $`\xi _j^\mu `$ are Gaussian variables with zero mean and unit variance. The outputs are

$$\stackrel{~}{y}_\mu =\{\begin{array}{cc}\mathrm{sgn}(y_\mu +\epsilon z_\mu )\hfill & \text{for classification}\hfill \\ y_\mu +\epsilon z_\mu \hfill & \text{for regression,}\hfill \end{array}$$

where $`y_\mu 𝑩𝝃^\mu `$ is the teacher activation, $`z_\mu `$ is a Gaussian variable with zero mean and unit variance, and $`\epsilon `$ is the noise amplitude.

The examples are learned by a student network with the same number of inputs and output. At each learning step, one example in the training set is randomly drawn. If the example drawn out at time $`t`$ is $`\sigma (t)`$, then the weights are modified according to

$`J_j(t+{\displaystyle \frac{1}{N}})`$ $`=`$ $`J_j(t)+{\displaystyle \frac{v}{N}}[F(x_{\sigma (t)}(t),\stackrel{~}{y}_{\sigma (t)})\xi _j^{\sigma (t)}\lambda J_j(t)]+{\displaystyle \frac{1}{N}}\eta _j(t),`$ (1)
where $`x_{\sigma (t)}(t)𝑱(t)𝝃^{\sigma (t)}`$ is the student activation. $`v`$ is the learning rate and $`\lambda `$ is the weight decay. The force $`F(x,\stackrel{~}{y})`$ describes the learning rule,

$$F(x,\stackrel{~}{y})=\{\begin{array}{cc}\stackrel{~}{y}\hfill & \text{for Hebbian rule}\hfill \\ \stackrel{~}{y}x\hfill & \text{for Adaline rule}\hfill \\ \stackrel{~}{y}(\kappa x\stackrel{~}{y})\mathrm{\Theta }(\kappa x\stackrel{~}{y})\hfill & \text{for Adatron rule},\hfill \end{array}$$
(2)
where $`\mathrm{\Theta }`$ is the step function and $`\kappa `$ is the stability. The last term in Eq. (1) is the dynamical noise term, often added to avoid the learning procedure being trapped in local minimum, with $`\eta _j(t)\eta _k(s)=2T\delta _{ts}/N`$ and $`T`$ is the dynamical noise level.

In the limit of vanishing learning rate $`v`$, the on-line dynamics described by Eq. (1) is equivalent to the batch learning formulation in Wong:Li:Tong  when the time scale, weight decay and the dynamical noise in the latter are multiplied by factors of $`\alpha /v`$, $`1/\alpha `$ and $`v^2/\alpha ^2`$ respectively. However, for finite learning rate $`v`$, the randomness of the learning sequence adds noise to the dynamics.

## III The Cavity Method

### III.1 The cavity activation and the Green’s functions

Consider a new example 0 that is not included in the original training set. We define its activation at time $`t`$ in the network trained without that example as its cavity activation $`h_0(t)`$, i. e., $`h_0(t)𝑱(t)𝝃^0`$. It is a random variable since the network has not learned the information of this new example. When the size of the network $`N`$ is very large, $`h_0(t)`$ is a Gaussian variable with mean $`R(t)y_0`$ and covariance $`C(t,s)R(t)R(s)`$, where $`R(t)𝑩𝑱(t)`$ is the student-teacher correlation at time $`t`$, and $`C(t,s)𝑱(t)𝑱(s)`$ is the student-student autocorrelation at times $`t`$ and $`s`$. Both $`R(t)`$ and $`C(t,s)`$ are self-averaging in the limit of large $`N`$.

Now we consider the evolution of another network $`J_j^0(t)`$ in which the example 0 is added to its training set. To ensure that the probability of occurrence of the new example 0 and the old ones remain identical, the new example sequence $`\sigma ^0(t)`$ is obtained from the original example sequence $`\sigma (t)`$ according to

$$\sigma ^0(t)=\{\begin{array}{cc}\sigma (t)\hfill & \text{probability}=1\frac{1}{1+p}\hfill \\ 0\hfill & \text{probability}=\frac{1}{p+1}.\hfill \end{array}$$
(3)
In the new example sequence $`\sigma ^0(t)`$, at each learning step, the weight is modified according to

$$J_j^0(t+\frac{1}{N})=J_j^0(t)+\frac{v}{N}[F(x_{\sigma ^0(t)}^0(t),\stackrel{~}{y}_{\sigma ^0(t)})\xi _j^{\sigma ^0(t)}\lambda J_j^0(t)]+\frac{1}{N}\eta _j(t),$$
(4)
where $`x_{\sigma ^0(t)}^0(t)𝑱^0(t)𝝃^{\sigma ^0(t)}`$. Compared the networks $`J_j^0(t)`$ and $`J_j(t)`$, we obtain from Eqs. (1) and (4),

$$\begin{array}{c}\hfill (\widehat{S}1+\frac{v\lambda }{N})(J_j^0(t)J_j(t))=\frac{v}{N}[F(x_{\sigma ^0(t)}^0(t),\stackrel{~}{y}_{\sigma ^0(t)}(t))\xi _j^{\sigma ^0(t)}F(x_{\sigma (t)}(t),\stackrel{~}{y}_{\sigma (t)}(t))\xi _j^{\sigma (t)}],\end{array}$$
(5)
where $`\widehat{S}`$ is the time shift operator. Let $`G^{(0)}(tt^{})`$ be the bare Green’s function

$$G^{(0)}(tt^{})=\mathrm{\Theta }(t^+t^{}\frac{1}{N})(1\frac{v\lambda }{N})^{N(tt^{}\frac{1}{N})}.$$
(6)
It satisfies

$$(\widehat{S}1+\frac{v\lambda }{N})G^{(0)}(tt^{})=\delta _{tt^{}}.$$
(7)
We assume that the adjustment from $`J_j(t)`$ to $`J_j^0(t)`$ is small so that linear response theory is applicable. Then on separating the contributions from the new example and the old ones, we have

$`J_j^0(t)J_j(t)`$ $`=`$ $`{\displaystyle \frac{v}{N}}{\displaystyle \underset{t^{}<t}{}}G^{(0)}(tt^{})\delta _{\sigma ^0(t^{})0}[F_0(t^{})\xi _j^0F_{\sigma (t^{})}(t^{})\xi _j^{\sigma (t^{})}]`$ (8)
$`+{\displaystyle \frac{v}{N}}{\displaystyle \underset{k,t^{}<t}{}}G^{(0)}(tt^{})\delta _{\sigma ^0(t^{})\sigma (t^{})}\xi _j^{\sigma (t^{})}F_{\sigma (t^{})}^{}(t^{})\xi _k^{\sigma (t^{})}[J_k^0(t^{})J_k(t^{})],`$
where $`F_{\sigma (t)}(t)`$ is the shorthand notation of the force acting on example $`\sigma (t)`$ at time $`t`$, and $`F^{}`$ represents the derivative of the force with respect to the activation $`x`$. We can now interpret this result from the viewpoint of the linear response theory. The first term on the right hand side describes the primary effects of adding example 0 to the training set and is the driving term for the difference between the two networks. This occurs at the discrete instants with $`\sigma ^0(t^{})=0`$ by adding the force due to example 0 and removing that due to the original example $`\sigma (t^{})`$. The second term describes the many-body reactions due to the change of the original examples caused by the added example, and is referred to as the Onsager reaction term. Describing the response to the driving term by the Green’s function, Eq. (8) reduces to

$$J_j^0(t)J_j(t)=\frac{v}{N}\underset{k,t^{}<t}{}G_{jk}(t,t^{})\delta _{\sigma ^0(t^{})0}[F_0(t^{})\xi _k^0F_{\sigma (t^{})}(t^{})\xi _k^{\sigma (t^{})}],$$
(9)
where $`G_{jk}(t,s)`$ is the time-dependent Green’s function with iterative expression

$$G_{jk}(t,s)=\delta _{jk}G^{(0)}(ts)+\frac{v}{N}\underset{t^{}<t}{}\underset{l}{}G^{(0)}(tt^{})\delta _{\sigma ^0(t^{})\sigma (t^{})}\xi _j^{\sigma (t^{})}F_{\sigma (t^{})}^{}(t^{})\xi _l^{\sigma (t^{})}G_{lk}(t^{},s).$$
(10)
The Green’s function $`G_{jk}(t,s)`$ is the response of the weight $`J_j`$ at time $`t`$ due to a unit stimulus added at time $`s`$ to the right hand side of Eq. (1) corresponding to weight $`J_k`$, in the limit of vanishing magnitude of the stimulus.

In the limit of large $`N`$, we can apply a diagrammatic analysis similar to the case of batch learning Wong:Li:Tong . In contrast with batch learning, we need to first average Eqs. (9) and (10) over the distribution of example sequence using Eq. (3). This can then be followed by the usual averaging over the distribution of background examples, as in the case of batch learning. The result is that we can neglect the effect of removing the background example represented by the second term in the square bracket of the right hand side of Eq. (9). $`G_{jk}(t,s)`$ is self-averaging and diagonal in larger $`N`$ limit, so that $`G_{jk}(t,s)=G(t,s)\delta _{jk}`$, where $`G(t,s)`$ satisfies the Dyson’s equations

$`G(t,s)`$ $`=`$ $`G^{(0)}(ts)+v{\displaystyle dt_1dt_2G^{(0)}(tt_1)D_{\sigma (t_2)}(t_1,t_2)F_{\sigma (t_2)}^{}(t_2)G(t_2,s)}`$ (11)
$`D_{\sigma (s)}(t,s)`$ $`=`$ $`\delta (ts)+{\displaystyle \frac{v}{\alpha }}{\displaystyle dt_1G(t,t_1)F_{\sigma (s)}^{}(t_1)D_{\sigma (s)}(t_1,s)},`$ (12)
where $`G^{(0)}(ts)\mathrm{\Theta }(ts)\mathrm{exp}[v\lambda (ts)]`$ is the bare Green’s function. $`D_{\sigma (s)}(t,s)`$ is the example Green’s Function, and $``$ represents average over distributions of both example sequences and examples.

We emphasize that the average $`D_{\sigma (t_2)}(t_1,t_2)F_{\sigma (t_2)}^{}(t_2)`$ is different from the average $`D_\mu (t_1,t_2)F_\mu ^{}(t_2)`$. The former specifies that the function $`F^{}(t_2)`$ and $`D(t_1,t_2)`$ are due to the example that was picked from the example sequence for learning at the particular instant $`t_2`$. During on-line learning, the activation of this example receives a giant boost at the learning instant, as mentioned later in the text discussion of Fig. 1. This makes its distribution different from that of a randomly drawn example $`\mu `$, whose previous learning instant remains unspecified. Hence, the former average will be referred to as an active average, in contrast to the latter, which is referred to as a passive average.

Nevertheless, in the case of linear rules used for illustration later in this paper, $`F^{}(t)`$ is a constant independent of $`t`$. Hence, the active average in Eq. (11) becomes identical to the passive average. Thus, the Dyson’s equations (11) and (12) becomes identical to those of batch learning Wong:Li:Tong , after rescaling the time and the weight decay.

In the case of Hebbian rule, $`F^{}(x)=0`$ and $`D_\mu (t,s)=\delta (ts)`$. The Green’s function becomes identical to the bare Green’s function.

In the case of the Adaline rule, $`F^{}(x)=1`$ and $`D_\mu (t,s)=D(t,s)`$ independent of example $`\mu `$. The weight Green’s function becomes invariant under translation of time, and can be written as

$$G(t,s)=G(ts,0)=\rho (x)e^{x(ts)}dx,$$
(13)
where $`\rho (x)`$ is the density of state

$$\rho (x)=(1\alpha )\mathrm{\Theta }(1\alpha )\delta (xv\lambda )+\frac{\sqrt{(x_{\mathrm{max}}x)(x_{\mathrm{min}}x)}}{2\pi \frac{v}{\alpha }(xv\lambda )},$$
(14)
with $`x_{\mathrm{max}}`$ and $`x_{\mathrm{min}}`$ are the edges of the spectrum given by $`x_{\mathrm{max}},x_{\mathrm{min}}=v\lambda +v(1\pm 1/\sqrt{\alpha })^2`$, respectively.

The number of times $`m`$ that the new example 0 appears in time $`t`$ follows a Poisson distribution with mean $`t/\alpha `$. If these appearances occur at times $`t_1,\mathrm{},t_m(t_m<\mathrm{}<t_1<t)`$, Eq. (9) reduces to

$$J_j^0(t)=J_j(t)+\frac{v}{N}\underset{r=1}{\overset{m}{}}G(t,t_r)F_0(t_r)\xi _j^0.$$
(15)
Multiplying both sides by $`\xi _j^0`$ and summing over $`j`$, one derives the relationship between the cavity activation and the generic activation of example 0,

$$x_0(t)=h_0(t)+v\underset{r=1}{\overset{m}{}}G(t,t_r)F_0(t_r).$$
(16)
This relation enables us to express the cavity activation $`h(t)`$ of any example as a function of its generic activation $`x(t_1),\mathrm{},x(t_m),x(t)`$ at the previous and current learning instants, and attributes physical meaning to the single effective example in Ref. Heimel:Coolen . Hereafter, we omit the subscript if no confusion occurs.

The simulation results in Fig. 1 verify the relationship between the cavity activation and the generic activation for a randomly selected example. Up to $`t=3`$, the example is drawn from the learning sequence $`\sigma (t)`$ 9 times, close to the Poisson average of $`t/\alpha =10`$. The solid line describes the evolution of $`x(t)`$, which exhibits giant boosts at the 9 learning instants indicated by the vertical dashed lines. The dotted line describes the evolution of the cavity activation $`h(t)`$, which is obtained in a second network which uses the same learning sequence $`\sigma (t)`$, except that learning is paused when the example is drawn. Since the example and this network are uncorrelated, $`h(t)`$ evolves as a random walker with appropriate means and covariances. The filled circles indicate the values of the cavity activations predicted by Eq. (16), using the Green’s functions measured by comparing learning with and without stimuli Wong:Li . They show remarkable agreement with the simulated $`h(t)`$.

To derive the distribution of generic activations, we first consider the distribution of cavity activations, which is given in the Gaussian form at $`m`$ learning steps and time $`t_0(=t)`$ by

$$P(h(t_0),\mathrm{},h(t_m)|y)=\frac{\mathrm{exp}\{\frac{1}{2}_{i,j=0}^m[h(t_i)R(t_i)y](CRR^T)_{ij}^1[h(t_j)R(t_j)y]\}}{\sqrt{(2\pi )^{m+1}det(CRR^T)}},$$
(17)
where $`CRR^T`$ is a square matrix with size $`m+1`$ and $`(CRR^T)_{ij}=C(t_i,t_j)R(t_i)R(t_j)`$. The corresponding distribution of generic activations can be written as

$$P(x(t_0),\mathrm{},x(t_m)|y,\stackrel{~}{y})=P(h(t_0),\mathrm{},h(t_m)|y)\left|\frac{(h(t_0),\mathrm{},h(t_m))}{(x(t_0),\mathrm{},x(t_m))}\right|,$$
(18)
where $`h(t_i)`$ is a function of $`x(t_i),\mathrm{},x(t_m)`$ defined by Eq. (16), and the dependence on $`\stackrel{~}{y}`$ may arise from the learning forces. Since $`h(t_i)/x(t_j)=0`$ for $`t_j>t_i`$, and $`h(t_i)/x(t_i)=1`$, the Jacobian reduces to 1. Therefore, the distribution of generic activations can be expressed as

$$P(x(t_0),\mathrm{},x(t_m)|y,\stackrel{~}{y})=\frac{\mathrm{exp}\{\frac{1}{2}_{i,j=0}^m[h(t_i)R(t_i)y](CRR^T)_{ij}^1[h(t_j)R(t_j)y]\}}{\sqrt{(2\pi )^{m+1}det(CRR^T)}}.$$
(19)
In general, $`h(t_i)`$ can be a nonlinear function of $`x(t_i),\mathrm{},x(t_m)`$. Hence, the generic activation distribution in Eq. (19) is no longer Gaussian, although the cavity activation distribution in Eq. (17) is. This characteristic of on-line learning is demonstrated in numerical simulation for Adatron rule in Ref. Coolen:Saad .

We now illustrate how the above result can be applied to specific cases. For Hebbian rule, Eq. (16) implies that $`h(t)`$ is not an explicit function of $`x(t_r)`$ at the previous learning instants $`t_r`$,

$$h(t)=x(t)\stackrel{~}{y}\underset{r=1}{\overset{m}{}}\mathrm{exp}[v\lambda (tt_r)].$$
(20)
This enables us to write down the instantaneous activation distribution, given the learning instants $`t_1,\mathrm{},t_m`$ of the example,

$$P(x,t_0|y,\stackrel{~}{y};t_1,\mathrm{},t_m)=\frac{\mathrm{exp}\{\frac{1}{2}(C(t,t)R^2(t))^1[x(t_j)\stackrel{~}{y}_{r=1}^me^{v\lambda (tt_r)}R(t)y]^2\}}{\sqrt{2\pi [C(t,t)R^2(t)]}}.$$
(21)
The distribution is then averaged over the time distribution and the Poisson distribution of learning instants

$$P(x,t|y,\stackrel{~}{y})=P(x,t|y,\stackrel{~}{y};t_1,\mathrm{},t_m)_\sigma .$$
(22)
The sequence average of an instantaneous quantity $`\psi `$ at time $`t`$ depending on the previous learning instants $`t_1,\mathrm{},t_m`$ is

$$\psi (t|t_1,\mathrm{},t_m)_\sigma =\underset{m=0}{\overset{\mathrm{}}{}}\frac{e^{\frac{t}{\alpha }}}{\alpha ^m}_0^tdt_1\mathrm{}_0^{t_{m1}}dt_m\psi (t|t_1,\mathrm{},t_m),$$
(23)
where the factor of $`m!`$ in the Poisson distribution is cancelled by the number of permutations in ordering $`t_1,\mathrm{},t_m`$. Using the Hubbard-Stratonovich identity, we can factorize the integrals over $`t_r(1rm)`$. We arrive at the result

$`P(x,t|y,\stackrel{~}{y})`$ $`=`$ $`{\displaystyle }{\displaystyle \frac{\mathrm{d}\widehat{x}}{2\pi }}\mathrm{exp}\{i\widehat{x}[xR(t)y]{\displaystyle \frac{1}{2}}[C(t,t)R^2(t)]\widehat{x}^2`$ (24)
$`+{\displaystyle \frac{1}{\alpha }}{\displaystyle _0^t}\mathrm{d}s[\mathrm{exp}(i\widehat{x}\stackrel{~}{y}e^{v\lambda (ts)})1]\},`$
which agrees with the rule-specific derivation in Ref. Rae:Sollich:Coolen .

For Adaline rule, substituting $`F(x,\stackrel{~}{y})=\stackrel{~}{y}x`$ into Eq. (16) yields a linear relation between the student activation and the cavity ones,

$$x(t_0)=\underset{r=0}{\overset{m}{}}(1+vG)_{0r}^1\left[h(t_r)+v\underset{s=r+1}{\overset{m}{}}G_{rs}\stackrel{~}{y}\right],$$
(25)
where $`G`$ is a square matrix with size $`m+1`$ and $`G_{rs}=G(t_rt_s,0)`$ for $`t_r>t_s`$ and $`G_{rs}=0`$ for $`t_rt_s`$. Inserting the mean and variance of the cavity activation, we see that $`x(t_0)`$ is a Gaussian variable with mean and variance

$`x(t_0)`$ $`=`$ $`{\displaystyle \underset{r=0}{\overset{m}{}}}(1+vG)_{0r}^1\left[R(t_r)y+v{\displaystyle \underset{s=r+1}{\overset{m}{}}}G_{rs}\stackrel{~}{y}\right]`$
$`\mathrm{\Delta }^2(t_0)`$ $`=`$ $`{\displaystyle \underset{r,s=0}{\overset{m}{}}}(1+vG)_{0r}^1(1+vG)_{0s}^1[C(t_r,t_s)R(t_r)R(t_s)].`$ (26)
To obtain the activation distribution in such an application as the average training error, we need to further average the Gaussian distribution in Eq. (III.1) over the learning sequences.

In general, for nonlinear learning rules, the linear inversion of Eq. (16) to obtain the student activation is not possible, and the activation distribution becomes non-Gaussian, even for a given sequence of learning instants. Nevertheless, a useful identity exists for the sequence average pertaining to an example, as derived in Appendix A,

$$x(t)_\sigma =h(t)+\frac{v}{\alpha }_0^t𝑑t^{}G(t,t^{})F(t^{})_\sigma .$$
(27)
This equation of the sequence-averaged activation is the same as that of the self-consistent equation of the activation in batch learning, after rescaling the time and weight decay Wong:Li:Tong .

### III.2 The student-teacher correlation

To analyse the student-teacher correlation, we multiply both sides of Eq. (1) by $`B_j`$ and sum over $`j`$, yielding in the limit of large $`N`$,

$$\left(\frac{d}{dt}+v\lambda \right)R(t)=vy_\mu F_\mu (t)_\sigma _\mu ,$$
(28)
where $`_\mu `$ represents averaging over the distribution of examples.

For Adaline rule, the solution of $`R(t)`$ in Eq. (28) involves $`x_\mu (t)_\sigma `$. By virtue of Eq. (27), and exploiting the example Green’s function in Eq. (12), we obtain

$$x_\mu (t)_\sigma =_0^tdt_1D(tt_1)\left[h_\mu (t_1)+\frac{v}{\alpha }_0^{t_1}dt_2G(t_1t_2)\stackrel{~}{y}_\mu \right].$$
(29)
Applying Laplace transform to Eq. (29) and then Eq. (28),

$`\stackrel{~}{x}_\mu (z)_\sigma `$ $`=`$ $`\stackrel{~}{D}(z)\left[\stackrel{~}{h}_\mu (z)+{\displaystyle \frac{v\stackrel{~}{y}_\mu }{\alpha z}}\stackrel{~}{G}(z)\right],`$
$`(z+v\lambda )\stackrel{~}{R}(z)`$ $`=`$ $`v\left\{{\displaystyle \frac{a}{z}}\stackrel{~}{D}(z)\left[\stackrel{~}{R}(z)+{\displaystyle \frac{va}{\alpha z}}\stackrel{~}{G}(z)\right]\right\},`$ (30)
where

$$ay_\mu \stackrel{~}{y}_\mu _\mu =\{\begin{array}{cc}\sqrt{\frac{2}{\pi (1+\epsilon ^2)}}\hfill & \text{for classification},\hfill \\ \sqrt{1+\epsilon ^2}\hfill & \text{for regression}.\hfill \end{array}$$

Here $`\stackrel{~}{G}(z)_0^{\mathrm{}}dte^{zt}G(t,0)`$ and $`\stackrel{~}{D}(z)_0^{\mathrm{}}dte^{zt}D(t,0)`$. Inverse Laplace transform yields

$$R(t)=adx\rho (x)(xv\lambda )\frac{1e^{xt}}{x},$$
(31)
which is the same as that in batch learning after rescaling.

### III.3 The student-student autocorrelation and the force fluctuation

To analyse the student-student autocorrelation, we multiply both sides of Eq. (1) by $`J_j(s)`$ and sum over $`j`$, thus obtaining in the limit of large $`N`$,

$$\left(\frac{d}{dt}+v\lambda \right)C(t,s)=vx_\mu (s)F_\mu (t)_\sigma |_{\sigma (t)=\mu }_\mu .$$
(32)
We remark that $`x_\mu (s)F_\mu (t)_\sigma |_{\sigma (t)=\mu }`$, is an active average, which is distinct from the passive average $`x_\mu (s)F_\mu (t)_\sigma `$, where the example learned at time $`t`$ is not necessarily $`\mu `$.

For Adaline learning rule, the average difference $`W_\mu (s,t)x_\mu (s)F_\mu (t)_\sigma |_{\sigma (t)=\mu }x_\mu (s)F_\mu (t)_\sigma `$ can be expressed in terms of Green’s functions and learning force,

$$W_\mu (s,t)=v_t^sdt^{}D(s,t^{})G(t^{},t)F_\mu ^2(t)_\sigma ,$$
(33)
as shown in Appendix B. A similar equation for the passive average is also derived therein,

$`x_\mu (s)F_\mu (t)_\sigma `$ $`=`$ $`{\displaystyle _0^s}dt_1D(s,t_1)\left[h_\mu (t_1)F_\mu (t)_\sigma +{\displaystyle \frac{v}{\alpha }}{\displaystyle _0^{t_1}}dt_2G(t_1,t_2)\stackrel{~}{y}_\mu F_\mu (t)_\sigma \right]`$
$`{\displaystyle \frac{v^2}{\alpha }}{\displaystyle _0^{\mathrm{min}(t,s)}}𝑑t_1{\displaystyle _{t_1}^s}dt_2{\displaystyle _{t_1}^t}dt_3D(s,t_2)G(t_2,t_1)D(t,t_3)G(t_3,t_1)F_\mu ^2(t_1)_\sigma .`$
Therefore, one can perform the Laplace transforms

$`\stackrel{~}{C}(w,z)`$ $``$ $`{\displaystyle _0^{\mathrm{}}}ds{\displaystyle _0^{\mathrm{}}}dte^{wszt}C(s,t).`$
$`\stackrel{~}{F}_\mu (w)\stackrel{~}{F}_\mu (z)_\sigma _\mu `$ $``$ $`{\displaystyle _0^{\mathrm{}}}ds{\displaystyle _0^{\mathrm{}}}dte^{wszt}F_\mu (s)F_\mu (t)_\sigma _\mu .`$
After substituting Eqs. (33) and (III.3) into Eq. (32), and performing elaborate algebra, one obtains an equation of the weight correlation

$`\stackrel{~}{C}(w,z)`$ $`=`$ $`\left[{\displaystyle \frac{v^2a^2[\stackrel{~}{D}(w)+\stackrel{~}{D}(z)1]}{wz}}+{\displaystyle \frac{v^2b}{\alpha zw}}+v^2\stackrel{~}{F}_\mu ^2(w+z)_\sigma _\mu +{\displaystyle \frac{2T}{(w+z)\stackrel{~}{D}(w)\stackrel{~}{D}(z)}}\right]`$ (35)
$`\times {\displaystyle \frac{\stackrel{~}{G}(z)\stackrel{~}{D}(z)\stackrel{~}{G}(w)\stackrel{~}{D}(w)}{wz}},`$
and an equation of the force autocorrelation

$`\stackrel{~}{F}_\mu (w)\stackrel{~}{F}_\mu (z)_\sigma _\mu `$ $`=`$ $`{\displaystyle \frac{\stackrel{~}{D}(w)\stackrel{~}{D}(z)}{wz}}{\displaystyle \frac{va^2}{wz}}\stackrel{~}{G}(w)\stackrel{~}{D}^2(w)\stackrel{~}{D}(z){\displaystyle \frac{va^2}{wz}}\stackrel{~}{G}(z)\stackrel{~}{D}(w)\stackrel{~}{D}^2(z)`$
$`+\stackrel{~}{D}(z)\stackrel{~}{D}(w)\stackrel{~}{C}(w,z)+{\displaystyle \frac{v^2}{\alpha }}\stackrel{~}{G}(w)\stackrel{~}{G}(z)\stackrel{~}{D}(w)\stackrel{~}{D}(z)\stackrel{~}{F}_\mu ^2(w+z)_\sigma _\mu .`$
Here

$$b\stackrel{~}{y}_\mu ^2_\mu =\{\begin{array}{cc}1\hfill & \text{for classification}\hfill \\ 1+\epsilon ^2\hfill & \text{for regression.}\hfill \end{array}$$

We note the presence of the force fluctuation term $`\stackrel{~}{F}^2(w+z)_\sigma _\mu `$ in Eqs. (35) and (III.3). This term is absent in the corresponding equations in the case of batch learning. This can be seen by observing the scalings $`z^1\stackrel{~}{G}(z)\stackrel{~}{F}_\mu ^2(w+z)_\sigma _\mu v^1`$ in Eqs. (35) and (III.3), so that the coupling of weight correlation $`\stackrel{~}{C}(w,z)`$ and force autocorrelation $`\stackrel{~}{F}_\mu (w)\stackrel{~}{F}_\mu (z)_\sigma _\mu `$ via the force fluctuation $`\stackrel{~}{F}_\mu ^2(w+z)_\sigma _\mu `$ will approach zero when $`v`$ is vanishingly small, which indicates that this temporal correlation is unique to on-line learning. In contrast to batch learning, the presence of the force fluctuation term increases the weight correlation via Eq. (35), which in term increases the force fluctuation itself via Eq. (III.3). As we shall see, this coupling leads to a collective relaxation mode.

Performing the inverse Laplace transform, one can obtain the autocorrelation

$`C(s,t)`$ $`=`$ $`{\displaystyle dx\rho (x)(xv\lambda )\left[\frac{bv}{\alpha }+a^2\left(xv\lambda \frac{v}{\alpha }\right)\right]\left(\frac{1e^{xs}}{x}\right)\left(\frac{1e^{xt}}{x}\right)}`$ (37)
$`+v{\displaystyle dx\rho (x)(xv\lambda )_0^{\mathrm{min}(t,s)}dt^{}e^{x(t+s2t^{})}F^2(t^{})}`$
$`+T{\displaystyle dx\rho (x)\frac{e^{x|ts|}e^{x(t+s)}}{x}},`$
where $`F^2(t)F_\mu ^2(t)_\sigma _\mu `$. In Eq. (37), the first and third terms are similar to those in the autocorrelation function in batch learning. The second term represents the contribution induced by the force fluctuations arising from on-line learning. It vanishes when $`v0`$. However, for finite learning rate $`v`$, one can see that this term plays a similar role as the dynamic noise. This can be seen by considering the asymptotic limit of the second term, where $`F^2(t^{})`$ approaches the steady-state value of $`F^2`$, yielding

$$\frac{v}{2}F^2dx\rho (x)(xv\lambda )\frac{e^{x|ts|}e^{x(t+s)}}{x}.$$
(38)
Comparing with the dynamical noise in the third term, we see that $`F^2`$ is a measure of an effective temperature, and the two noise contributions different slightly in their spectrum of relaxation rates. Therefore, in practice, force fluctuations can also assist the learning dynamics in avoiding being trapped in metastable states, playing the same role as dynamical noises to batch learning. Hereafter, we let $`T=0`$ in our final results.

To obtain the force autocorrelation $`F_\mu (s)F_\mu (t)_\sigma _\mu `$, we substitute Eq. (35) into Eq. (III.3) and perform the inverse Laplace transform, which yields,

$`F_\mu (t)F_\mu (s)_\sigma _\mu `$ $`=`$ $`b+{\displaystyle \frac{1}{v}}{\displaystyle }\mathrm{d}x\rho (x)[{\displaystyle \frac{bv}{\alpha }}+a^2(xv\lambda {\displaystyle \frac{v}{\alpha }})][(xv\lambda )^2\left({\displaystyle \frac{1e^{xt}}{x}}\right)`$ (39)
$`\left({\displaystyle \frac{1e^{xs}}{x}}\right)(xv\lambda )\left({\displaystyle \frac{1e^{xt}}{x}}\right)(xv\lambda )\left({\displaystyle \frac{1e^{xs}}{x}}\right)]`$
$`+{\displaystyle _0^{\mathrm{min}(t,s)}}dt^{}F^2(t^{}){\displaystyle dx\rho (x)(xv\lambda )^2e^{x(t+s2t^{})}}.`$
Equating $`t`$ and $`s`$, the force fluctuation is given by the inverse Laplace transform of

$$\stackrel{~}{F}_\mu ^2(z)_\sigma _\mu =\frac{\frac{b}{z}+\frac{1}{v}dx\rho (x)\frac{xv\lambda }{x^2}\left[\frac{bv}{\alpha }+a^2\left(xv\lambda \frac{v}{\alpha }\right)\right]\left[\frac{xv\lambda }{z+2x}+\frac{2v\lambda }{z+x}\frac{x+v\lambda }{z}\right]}{1dx\rho (x)\frac{(xv\lambda )^2}{z+2x}}.$$
(40)
The final expression consists of four contributions. First, the pole at $`z=0`$ gives the steady state value of

$$F^2=\frac{b\frac{1}{v}dx\rho (x)\left(1\frac{v^2\lambda ^2}{x^2}\right)\left[\frac{bv}{\alpha }+a^2\left(xv\lambda \frac{v}{\alpha }\right)\right]}{1dx\rho (x)\frac{(xv\lambda )^2}{2x}}.$$
(41)
The second and third contributions come form the relaxation spectrum of force fluctuations ranging through $`(x_{\mathrm{min}},x_{\mathrm{max}})`$ and $`(2x_{\mathrm{min}},2x_{\mathrm{max}})`$, respectively. The fourth contribution is described by the existence of a collective relaxation mode arising from the force-weight coupling, which is a novel phenomenon of on-line learning. Its relaxation rate $`\lambda _\sigma `$ is given by the pole

$$1dx\rho (x)\frac{(xv\lambda )^2}{2x\lambda _\sigma }=0.$$
(42)
This is called slow mode in Ref. Barber:Sollich . When $`\lambda _\sigma `$ approaches zero, the steady-state force fluctuation and student weight will diverge. The critical learning rate at which the weight diverges in given by

$$v_c=\frac{4}{2\lambda [1+\alpha +\alpha \lambda \sqrt{(1+\alpha +\alpha \lambda )^24\alpha }]},$$
(43)
which is also derived through the spectral analysis Barber:Sollich .

### III.4 The training and generalization errors

The performance of learning is measured by the training and generalization errors. Here we provide their expressions of noiseless example. Expression for other cases can be derived similarly. In classification, the generalization error is defined as the probability that a new example presented to the network is misclassified, $`E_g(t)=\mathrm{\Theta }[(𝑩𝝃)(𝑱(t)𝝃)]_𝝃`$. It is determined by the magnitude of the student vector $`C(t,t)`$ and its correlation with the teacher vector $`R(t)`$ Wong:Li:Tong , that is,

$$E_g(t)=\frac{1}{\pi }\mathrm{cos}^1\frac{R(t)}{\sqrt{C(t,t)}}.$$
(44)
Analytical expressions of $`R(t)`$ and $`C(t,t)`$ are derived in previous subsections for Adaline rule.

The training error is defined as the fraction of examples in the training set that are classified wrongly, i.e.

$`E_t(t)=`$ $`{\displaystyle dyd\stackrel{~}{y}P(y,\stackrel{~}{y})\underset{m=0}{\overset{\mathrm{}}{}}\frac{e^{\frac{t}{\alpha }}}{\alpha ^m}_0^tdt_1\mathrm{}_0^{t_m1}dt_mdx(t)}`$ (45)
$`P(x(t)|y,\stackrel{~}{y};t_1,\mathrm{},t_m)\mathrm{\Theta }[\stackrel{~}{y}x(t)].`$
This can be computed by a Monte Carlo sampling procedure, which has been shown to be free from finite size effects Eiss-opper . For general learning rules, we adopt the procedure with the following steps:

1) For a given training example, generate the teacher activation $`y`$ and $`\stackrel{~}{y}`$ according to $`P(y,\stackrel{~}{y})`$.

2) For time $`t_0(=t)`$, generate the number of times $`m`$ the example appears in a training sequence from time 0 to $`t_0`$ according to a Poisson distribution with mean $`t_0/\alpha `$.

3) Generate the instants $`t_1,\mathrm{},t_m`$ that the example appears in the training sequence according to a uniform distribution between 0 and $`t_0`$, with $`0<t_m<\mathrm{}<t_1<t_0`$.

4) Generate the cavity activations $`h(t_r)`$, $`r=0,\mathrm{},m`$ according to the Gaussian distribution with mean $`R(t_r)y`$ and covariance $`C(t_r,t_s)R(t_r)R(t_s)`$. This can be carried out by generating the independent Gaussian variables $`z_{ik}`$ $`(k=0,\mathrm{},m)`$ with mean 0 and variance 1, and transforming them to $`h(t_i)`$ via

$$h(t_i)=R(t)y+\underset{k=i}{\overset{m}{}}A_{ik}z_k,0im$$
(46)
and the matrix elements $`A_{ik}`$ are obtained from the recursion relations

$$A_{mm}=\sqrt{C(t_m,t_m)R^2(t_m)}$$
(47)
and for $`1j<im`$,

$`A_{mi,mj}`$ $`=`$ $`{\displaystyle \frac{C(t_{mi},t_{mj})R(t_{mi})R(t_{mj})_{k=1}^{j1}A_{mi,mk}A_{mj,mk}}{A_{mj,mj}}}`$
$`A_{mi,mi}`$ $`=`$ $`\left[C(t_{mi,mi})R^2(t_{mi}){\displaystyle \underset{k=1}{\overset{i1}{}}}A_{mi,mk}^2\right]^{\frac{1}{2}}.`$ (48)
5) Compute $`x(t_i)`$ according to Eq. (16). This enables us to collect samples for the distribution $`P(x(t_0)|y,\stackrel{~}{y})`$, and hence estimate the training error.

6) Steps 1) to 5) are repeated to yield sufficient amount of statistics.

For Adaline learning, step 5) of the Monte Carlo sampling procedure can be further simplified by exploiting the Gaussian nature of the generic activation distribution. Using Eq. (III.1) to find the mean $`x(t_0)`$ and variance $`\sigma ^2(t_0)`$, the contribution of a example to the training error is given by $`\mathrm{erfc}(x(t_0)\stackrel{~}{y}/\sqrt{2}\sigma (t_0))`$ .

The above procedure assumes that the Green’s function $`G(t,s)`$ and the correlations $`R(t)`$ and $`C(t,s)`$ are known a priori. For general learning rules, $`G(t,s)`$ can be obtained by solving the Dyson’s equations Eqs. (11) and (12). Since the equation involves an average over the distribution of learning sequence and examples, it can again be obtained by a Monte Carlo sampling procedure. Similarly, $`R(t)`$ and $`C(t,s)`$ can be obtained by solving Eqs. (28) and (32) by Monte Carlo sampling. These will be left for further studies. Here, for the exposition of the cavity method, we focus on Adaline learning, where these functions can be obtained analytically as described in the previous subsections.

For the purpose of consistency check, one can also obtain these functions directly from simulations and plug into the Monte Carlo sampling procedure to check whether the generated activation distribution agrees with simulations.

The proposed Monte Carlo procedure is similar to the effective single pattern process in Ref. Heimel:Coolen . The difference lies in the generation of the learning instants of an example according to the Poisson distribution. In Ref. Heimel:Coolen , an individual Poisson number with mean $`\mathrm{\Delta }/\alpha `$ is generated for every time increment $`\mathrm{\Delta }`$ in the learning history. Here, the sampling efficiency is improved by a single Poisson number $`m`$ with mean $`t_0/\alpha `$ and $`m`$ learning instants with uniform distributions. For general learning rules, even if the Green’s functions and correlation functions have to be generated from the Monte Carlo sampling procedure, it is possible to use similar efficient samplings. This will be left for further studies.

While the Monte Carlo sampling procedure is useful in studying the transient behavior of learning, it can also be used to extract the stationary properties. At a very large observation time $`t`$, we look back at the learning history of an example by the network. Reasonably, only those learning events occur recently have detectable contributions to the distribution of the student activation $`x(t)`$ in Eq. (III.1). Therefore, we can calculate this distribution to any desired precision by adding the earlier learning events one by one, until certain stopping criteria are satisfied. Since the time intervals between successive learning events obey an exponential distribution, we have

$$P(x|y,\stackrel{~}{y})=\underset{m\mathrm{}}{lim}\underset{t\mathrm{}}{lim}\underset{r=1}{\overset{m}{}}\left[_0^{\mathrm{}}\frac{\mathrm{d}s_r}{\alpha }e^{\frac{s_r}{\alpha }}\right]P(x,t|y,\stackrel{~}{y};ts_1,\mathrm{},t\underset{r=1}{\overset{m}{}}s_r).$$
(49)
For Adaline learning, the distribution $`P(x,t|y,\stackrel{~}{y};ts_1,\mathrm{},t_{r=1}^ms_r)`$ is replaced by a Gaussian distribution with mean and variance given in Eqs. (III.1). We find that the contribution of earlier events approaches zero very quickly as $`m`$ increases. Thus, we only need to invert small matrices in evaluating the training error at steady state.

## IV Results and discussions

Figure 2(a) shows the transient behavior of the three macroscopic parameters, student-teacher correlation, student autocorrelation and force fluctuation for typical learning parameters. The training error and generalization error are shown in Fig. 2(b). The theoretical predictions have an excellent agreement with simulations.

Figure 3 shows the generalization and training errors at the steady state. The theoretical predictions agree well with the simulation results. The learning dynamics diverges at the critical learning rate $`v_c`$. It is also observed that strong weight decays tend to restrain this divergence at large learning rate, pushing $`v_c`$ to higher values. On the other hand, strong weight decays increase the generalization error when $`v`$ is small.

In Fig. 3, we also present the results obtained by the mean-force approximation adopted in Ref. Heimel:Coolen . As we have shown above, in steady state, the sequence noise due to the random drawing of examples at each learning step is equivalent to the external dynamical noise in batching learning. Thus, the dynamical variables will fluctuate around their temporal average even without other external noises. As a result, the mean-force approximation is only valid when the learning rate and the sequence noise is small. As shown in Fig. 3, it has an increasing discrepancy with simulations when $`v`$ becomes large. The critical learning rate $`v_c=2(1+\lambda )`$ estimated by the mean-force approximation is larger than the simulation result. This discrepancy can be attributed to the omission of the force fluctuations therein.

An important question is whether on-line learning can perform as well as batch learning Amari ; Opper . We have proposed an averaged strategy in the context of batch learning, predicting that dynamical noise can be averaged over to yield performances approaching noiseless learning Wong:Li:Tong . Since sequence noise in on-line learning has similar effects as dynamical noise, we adopt the same strategy to improve performance of on-line learning.

In average learning, we first wait for the system to settle to the steady state, and then monitor the student weight vector for an extended period of time. We use the weight vector averaged over the monitoring period $`\tau `$, $`\overline{𝑱}=lim_{t+\mathrm{}}\frac{1}{\tau }_t^{t+\tau }𝑱(t^{})dt^{}`$, as the estimated student vector. The average weight amplitude is given by

$$\overline{C}(\tau )=\underset{t\mathrm{}}{lim}\frac{1}{\tau }_t^{t+\tau }dt^{}C(t,t+t^{}).$$
(50)
Using Eq. (37), we obtain

$`\overline{C}(\tau )`$ $`=`$ $`{\displaystyle dx\rho (x)\frac{xv\lambda }{x^2}\left[\frac{bv}{\alpha }+a^2\left(xv\lambda \frac{v}{\alpha }\right)\right]}`$ (51)
$`+{\displaystyle \frac{v}{2}}F^2{\displaystyle dx\rho (x)\left(\frac{xv\lambda }{x}\right)\left(\frac{e^{x\tau }1+x\tau }{x^2\tau ^2/2}\right)},`$
where $`F^2`$ is given by Eq. (41). We note that when $`\tau `$ becomes vary large, the contribution due to force fluctuations vanishes, making $`\overline{C}(\tau )`$ approaching the result for batch learning. Hence, the average learning strategy yields a generalization performance as good as that of the batch mode, independent of the learning rate, as long as it is below the critical value for divergent learning. Figure 4 shows that the generalization error of on-line learning is equal to that of the batch mode at $`v=0`$, and gradually grows larger when $`v`$ increases. When the monitoring time $`\tau `$ increases, there is an impressive reduction of the generalization error compared with its instantaneous values. The longer the monitoring time $`\tau `$, the smaller generalization error. In the limit of very long monitoring time, the generalization ability becomes equal to that of the batch mode for all values of $`v`$ below $`v_c`$, and jumps discontinuously to divergence at $`v_c`$.

## V Conclusion

We have analysed the dynamics of on-line learning with restricted sets of examples, which are randomly recycled. Using the cavity approach, we can derive equations for the macroscopic parameters describing the learning dynamics. They are solvable for linear rules such as the Adaline rule, yielding results which agree with simulations. We also show that the student in on-line mode can learn as well as that in batch mode, after it is averaged over a monitoring period at the steady state.

Our work represents a step forward from two recent treatments Barber:Sollich ; Heimel:Coolen . Compared with Barber:Sollich , we have found that a functional relationship exists between the generic and cavity activations, and made explicit the distribution of activations, which is a superposition of Gaussians for Adaline rule and each weighted by a Poisson distribution. As a result, our framework can be used to analyse the training error $`E_t`$. More importantly, it has the potential to be extended to analyse nonlinear and multilayer networks. Compared with Heimel:Coolen , we have based our analysis on a more physical picture. For example, we have made explicit the difference between the active and passive averages involving the activation of an example and its learning force at a previous instant. This enables us to analyse correctly the network behavior at large learning rates, where the mean-force approximation does not apply. The physical insights will be useful when analytical approximation schemes are devised for more complex networks.

We have achieved our objective of benchmarking the cavity approach using Adaline learning. The next step will be to extend the method to more complicated situations such as nonlinear and multilayer networks. We may devise efficient Monte Carlo sampling procedures to solve numerically the equations for the Green’s functions, the teacher-student correlations and the student autocorrelations, making use of the Poisson distribution of the learning events for a single example, the Gaussian distribution of the cavity activations, and their causal relations with the generic student activations.

The cavity analysis of linear networks is also the foundation of approximate descriptions of the stationary behavior of nonlinear and multilayer networks. One may describe the steady state by fluctuations about an averaged state. The fluctuations can be approximated by linear deviations which can be analysed by the cavity approach analogous to the Adaline benchmark. Present work in progress is moving along this direction.

Recently, various approximation schemes have been proposed in different learning regimes of complicated networks Coolen:Saad ; Barber:Sollich ; Amari , yielding results with varying degree of success. For example, the conditionally Gaussian approximation cannot capture the sharp peaks in the activation distribution developed at the late learning stage of nonlinear rules (e.g. Adatron learning). On the other hand, from the perspectives of the cavity method, the nonlinear mapping from the Gaussian cavity activations to the generic activations can lead to sharp peaks in a natural way EPL . It is hoped that the cavity framework can provide useful insights to improved approximations in the future.

###### Acknowledgements.

We thank Ton Coolen for meaningful communications. This work is supported by the Research Grant Council of Hong Kong (HKUST6157/99P and HKUST6153/01P).

## Appendix A Sequence average of the student activation

According to the Eq. (23) and Eq. (16), the sequence average of the student activation of an example is

$$x(t)_\sigma =h(t)+v\underset{m=1}{\overset{\mathrm{}}{}}\frac{e^{\frac{t}{\alpha }}}{\alpha ^m}_0^tdt_m\mathrm{}_0^{t_2}dt_1\underset{r=1}{\overset{m}{}}G(t,t_r)F(t_r).$$
(52)
Reordering the summations and the integrations before and after $`t_r`$,

$`x(t)_\sigma `$ $`=`$ $`h(t)`$
$`+v{\displaystyle \underset{m=1}{\overset{\mathrm{}}{}}}{\displaystyle \frac{e^{\frac{t}{\alpha }}}{\alpha ^m}}{\displaystyle \underset{r=1}{\overset{m}{}}}{\displaystyle _0^t}dt_r{\displaystyle _{t_r}^t}dt_{r1}\mathrm{}{\displaystyle _{t_2}^t}dt_1\left[{\displaystyle _0^{t_r}}dt_{r+1}\mathrm{}{\displaystyle _0^{t_{m1}}}dt_mG(t,t_r)F(t_r)\right],`$
where we have made implicit the dependence of $`F(t_r)`$ on the previous learning instants $`t_{r+1},\mathrm{},t_m`$. Since the integrand in the square bracket does not depend on the values of $`t_1,\mathrm{},t_{r1}`$, the integration over these variables then simply gives the factor of $`(tt_r)^{r1}/(r1)!`$. We further note that

$$\underset{m=1}{\overset{\mathrm{}}{}}\underset{r=1}{\overset{m}{}}\frac{e^{\frac{t}{\alpha }}}{\alpha ^m}\frac{1}{\alpha }\underset{mr=0}{\overset{\mathrm{}}{}}\frac{e^{\frac{t_r}{\alpha }}}{\alpha ^{mr}}\underset{r1=0}{\overset{\mathrm{}}{}}\frac{e^{\frac{tt_r}{\alpha }}}{\alpha ^{r1}},$$
(54)
and then derive

$$x(t)_\sigma =h(t)+\frac{v}{\alpha }_0^tdt_rG(t,t_r)\left[\underset{mr=0}{\overset{\mathrm{}}{}}\frac{e^{\frac{t_r}{\alpha }}}{\alpha ^{mr}}_0^{t_r}dt_{r+1}\mathrm{}_0^{t_{m1}}dt_mF(t_r)\right].$$
(55)
From Eq. (23), the summation in the square bracket is just the sequence average of the activation at time $`t_r`$, yielding Eq. (27).

## Appendix B sequence average of active and passive correlations

From Eqs. (16) and (23), the active sequence average at time $`s`$ of the activation of example $`\mu `$ that is learned at time $`t`$ is

$`x_\mu (s)_\sigma |_{\sigma (t)=\mu }=`$ $`h_\mu (s)+v{\displaystyle \underset{m=0}{\overset{\mathrm{}}{}}}{\displaystyle \frac{e^{\frac{t}{\alpha }}}{\alpha ^m}}{\displaystyle _0^t}dt_1\mathrm{}{\displaystyle _0^{t_{m1}}}dt_m{\displaystyle \underset{n=0}{\overset{\mathrm{}}{}}}{\displaystyle \frac{e^{\frac{st}{\alpha }}}{\alpha ^n}}{\displaystyle _t^s}dt_{m+1}\mathrm{}`$
$`{\displaystyle _t^{t_{m+n1}}}dt_{m+n}\left[{\displaystyle \underset{r=1}{\overset{m+n}{}}}G(s,t_r)F_\mu (t_r)+G(s,t)F_\mu (t)\right].`$
Using similar arguments as in Appendix A, the average for the Adaline rule can be written as a self-consistent equation for $`s>t`$,

$`x_\mu (s)_\sigma |_{\sigma (t)=\mu }`$ $`=`$ $`h_\mu (s)+{\displaystyle \frac{v}{\alpha }}{\displaystyle _0^t}dt^{}G(s,t^{})F_\mu (t^{})_\sigma +vG(s,t)F_\mu (t)_\sigma `$ (57)
$`+{\displaystyle \frac{v}{\alpha }}{\displaystyle _t^s}dt^{}G(s,t^{})[\stackrel{~}{y}_\mu x_\mu (t^{})_\sigma |_{\sigma (t)=\mu }].`$
Note that $`x_\mu (s)_\sigma |_{\sigma (t)=\mu }=x_\mu (s)_\sigma `$ when $`st`$. Subtracting Eq. (27) from the above equation, one can derive

$$x_\mu (s)_\sigma |_{\sigma (t)=\mu }x_\mu (t)_\sigma =vG(s,t)F_\mu (t)_\sigma \frac{v}{\alpha }_0^sdt^{}G(s,t^{})[x_\mu (t^{})_\sigma |_{\sigma (t^{})=\mu }x_\mu (t^{})_\sigma ].$$
(58)
If we multiply $`F_\mu (t)`$ to both sides of Eq. (16) at time $`s`$, and perform sequence averages analogous to Eqs. (LABEL:active\_x) and (57), we obtain equations for the active and passive averages of the activation-force correlation,

$`x_\mu (s)F_\mu (t)_\sigma |_{\sigma (t)=\mu }`$ $`=`$ $`h_\mu (s)F_\mu (t)_\sigma +{\displaystyle \frac{v}{\alpha }}{\displaystyle _0^t}dt^{}G(s,t^{})F_\mu (t^{})F_\mu (t)_\sigma |_{\sigma (t^{})=\mu }`$ (59)
$`+vG(s,t)F_\mu ^2(t)_\sigma +{\displaystyle \frac{v}{\alpha }}{\displaystyle _t^s}dt^{}G(s,t^{})F_\mu (t^{})F_\mu (t)_\sigma |_{\sigma (t)=\mu },`$
$`x_\mu (s)F_\mu (t)_\sigma `$ $`=`$ $`h_\mu (s)F_\mu (t)_\sigma +{\displaystyle \frac{v}{\alpha }}{\displaystyle _0^t}dt^{}G(s,t^{})F_\mu (t^{})F_\mu (t)_\sigma |_{\sigma (t^{})=\mu }`$ (60)
$`+{\displaystyle \frac{v}{\alpha }}{\displaystyle _t^s}dt^{}G(s,t^{})F_\mu (t^{})F_\mu (t)_\sigma .`$
Subtracting Eq. (59) with Eq. (60) leads to

$$W_\mu (s,t)=vG(s,t)F_\mu ^2(t)_\sigma \frac{v}{\alpha }_t^sdt^{}G(s,t^{})W_\mu (t^{},t).$$
(61)
Multiplying the example Green’s function $`D(r,s)`$ to both sides of Eq. (61), integrating over $`s`$, and applying Eq. (12), one obtains Eq. (33).

To obtain Eq. (III.3), one replaces $`F_\mu (t^{})F_\mu (t)_\sigma |_{\sigma (t^{})=\mu }`$ in the right hand side of Eq. (60) with $`F_\mu (t^{})F_\mu (t)_\sigma v_t^{}^tdt_1D(t,t_1)G(t_1,t^{})F_\mu ^2(t^{})_\sigma `$, and arrives at

$`x_\mu (s)F_\mu (t)_\sigma `$ $`=`$ $`h_\mu (s)F_\mu (t)_\sigma +{\displaystyle \frac{v}{\alpha }}{\displaystyle _0^s}dt^{}G(s,t^{})\stackrel{~}{y}_\mu F_\mu (t)_\sigma {\displaystyle \frac{v}{\alpha }}{\displaystyle _0^s}dt^{}G(s,t^{})x_\mu (t^{})F_\mu (t)_\sigma `$ (62)
$`{\displaystyle \frac{v^2}{\alpha }}{\displaystyle _0^t}dt_1{\displaystyle _{t_1}^t}dt_2G(s,t_1)D(t,t_2)G(t_2,t_1)F_\mu ^2(t_1)_\sigma .`$
Multiplying both sides with $`D_\mu (r,s)`$, integrating over $`s`$ and applying Eq. (12), one finally reaches Eq. (III.3).