Kernel Limit of Recurrent Neural Networks Trained on Ergodic Data
  Sequences
Mathematical methods are developed to characterize the asymptotics of
recurrent neural networks (RNN) as the number of hidden units, data samples in
the sequence, hidden state updates, and training steps simultaneously grow to
infinity. In the case of an RNN with a simplified weight matrix, we prove the
convergence of the RNN to the solution of an infinite-dimensional ODE coupled
with the fixed point of a random algebraic equation. The analysis requires
addressing several challenges which are unique to RNNs. In typical mean-field
applications (e.g., feedforward neural networks), discrete updates are of
magnitude $\mathcal{O}(\frac{1}{N})$ and the number of updates is
$\mathcal{O}(N)$. Therefore, the system can be represented as an Euler
approximation of an appropriate ODE/PDE, which it will converge to as $N
\rightarrow \infty$. However, the RNN hidden layer updates are
$\mathcal{O}(1)$. Therefore, RNNs cannot be represented as a discretization of
an ODE/PDE and standard mean-field techniques cannot be applied. Instead, we
develop a fixed point analysis for the evolution of the RNN memory states, with
convergence estimates in terms of the number of update steps and the number of
hidden units. The RNN hidden layer is studied as a function in a Sobolev space,
whose evolution is governed by the data sequence (a Markov chain), the
parameter updates, and its dependence on the RNN hidden layer at the previous
time step. Due to the strong correlation between updates, a Poisson equation
must be used to bound the fluctuations of the RNN around its limit equation.
These mathematical methods give rise to the neural tangent kernel (NTK) limits
for RNNs trained on data sequences as the number of data samples and size of
the neural network grow to infinity.
Samuel Chun-Hei Lam, Justin Sirignano, Konstantinos Spiliopoulos
# Kernel Limit of Recurrent Neural Networks Trained on Ergodic Data Sequences

###### Abstract

Mathematical methods are developed to characterize the asymptotics of recurrent neural networks (RNN) as the number of hidden units, data samples in the sequence, hidden state updates, and training steps simultaneously grow to infinity. In the case of an RNN with a simplified weight matrix, we prove the convergence of the RNN to the solution of an infinite-dimensional ODE coupled with the fixed point of a random algebraic equation. The analysis requires addressing several challenges which are unique to RNNs. In typical mean-field applications (e.g., feedforward neural networks), discrete updates are of magnitude \(\mathcal{O}(\frac{1}{N})\) and the number of updates is \(\mathcal{O}(N)\). Therefore, the system can be represented as an Euler approximation of an appropriate ODE/PDE, which it will converge to as \(N\to\infty\). However, the RNN hidden layer updates are \(\mathcal{O}(1)\). Therefore, RNNs cannot be represented as a discretization of an ODE/PDE and standard mean-field techniques cannot be applied. Instead, we develop a fixed point analysis for the evolution of the RNN memory states, with convergence estimates in terms of the number of update steps and the number of hidden units. The RNN hidden layer is studied as a function in a Sobolev space, whose evolution is governed by the data sequence (a Markov chain), the parameter updates, and its dependence on the RNN hidden layer at the previous time step. Due to the strong correlation between updates, a Poisson equation must be used to bound the fluctuations of the RNN around its limit equation. These mathematical methods give rise to the neural tangent kernel (NTK) limits for RNNs trained on data sequences as the number of data samples and size of the neural network grow to infinity.

## 1 Introduction

Recurrent neural networks (RNN) are widely used to model sequential data. Examples include natural language processing (NLP) and speech recognition [1, 2]. The key architectural feature of an RNN is a hidden layer which is updated at each time step of the sequence. This hidden layer - sometimes referred to as a "memory layer" - is a nonlinear representation of the history of the data sequence. Using its hidden layer, the RNN can - in principle - learn functions which map the path of a sequence (of arbitrary length) to fixed-dimensional vector predictions. The RNN's hidden layer therefore provides a parsimonious, nonlinear representation of the data in the sequence up until the current time. An RNN is trained by minimizing an appropriate loss function over a high-dimensional set of parameters using a gradient-descent-type algorithm.

The mathematical theory for RNNs is limited. In this article, we study the asymptotics of a single-layer RNN as the number of hidden units, training steps, and data samples in the sequence tend to infinity. In the case of an RNN with a simplified weight matrix, we prove the convergence of the RNN to the solution of an infinite-dimensional ODE coupled with the fixed point of a random algebraic equation.
For feedforward neural networks with i.i.d. data samples, limits have been proven as the number of hidden units, training steps, and data samples tend to infinity. The dynamics of the output of the trained network converges to either an ODE (the Neural Tangent Kernel NTK limit) [3] or a (random) PDE (the mean-field limit) [4, 5, 6, 7] depending upon the normalization used for the neural network output. For the NTK case, the equation for the limit neural network can be studied to prove global convergence of the neural network to the global minimizer of the objective function. Proving limit results for RNNs is substantially more challenging. The data sequence is not i.i.d., which complicates the analysis of the evolution of the trained neural network. Furthermore, the RNNs cannot be studied using standard mean-field or weak convergence analysis (e.g., as is true for feedforward neural networks). We explain in more detail below.

Consider a classic recurrent neural network (the standard Elman network [8]) with one hidden layer that takes in the input sequence \(X=(X_{k})_{k\geq 0}\) and outputs a prediction \((\hat{Y}_{k}^{N})_{k\geq 0}\) for the target data \((Y_{k}^{N})_{k\geq 0}\). The RNN predictions are given by the model outputs \(\hat{Y}_{k}^{N}=g_{k}^{N}(X;\theta)\). The RNN depends on the parameters \(\theta=(C,W,B)\), which must be trained on data. In particular, for all \(k\geq 0\), the RNN hidden layer \(S_{k}^{N}\) and predictions \(\hat{Y}_{k}^{N}\) are updated as:

\[S_{k+1}^{i,N}(X;\theta) :=\sigma\left((W^{i})^{\top}X_{k}+\frac{1}{N^{\beta_{1}}}\sum_{j= 1}^{N}B^{ij}S_{k}^{j,N}(X;\theta)\right),\quad S_{0}^{i,N}(X;\theta)=0 \tag{1.1}\] \[g_{k}^{N}(X;\theta) :=\frac{1}{N^{\beta_{2}}}\sum_{i=1}^{N}C^{i}S_{k+1}^{i,N}(X; \theta), \tag{1.2}\]

where

* \(N\) is the number of hidden units in the memory states \(S_{k}^{i,N}(X;\theta)\),
* \(\beta_{1}=1\) and \(\beta_{2}\) determine the scaling used to normalise the outputs of the network,
* \(C\in\mathbb{R}^{N}\), with \(C^{i}\) representing the \(i\)-th component of \(C\),
* \(W\in\mathbb{R}^{N\times d}\), with \(W^{i}\) representing the \(i\)-th column of \(W\) as a column vector, and
* \(B\in\mathbb{R}^{N\times N}\), with \(B^{ij}\) is the \((i,j)\)-entries of \(B\).

The data samples \(X_{k}\), which are elements of a data sequence, are _not_ i.i.d. (unlike for feedforward neural networks). In our mathematical analysis, we will make the simplifying assumption that all columns of \(B\) are equal, i.e. for all \(j\) we have \(B^{ij}=B^{j}\) for some \(B^{j}\). The memory states \(S_{k}^{N,i}(X;\theta)\) is a nonlinear representation of the history of the data sequence \((X_{j})_{j=0}^{k-1}\). Using this nonlinear representation - which is learned from the data by training the parameters \(\theta\) - the RNN generates a prediction \(\hat{Y}_{k}^{N}\) for the target data \(Y_{k}\). Notice that if we fix \(X_{k}=x\) and \(B^{ij}=0\), (1.2) becomes a standard feedforward network (i.e., the network does not dynamically evolve over time \(k\) and the network output is a static prediction). Limits for gradient-descent-trained feedforward networks as the number of hidden units \(N\to\infty\) can been established when \(\frac{1}{2}\leq\beta_{2}<1\) (the NTK limit [3]) or \(\beta_{2}=1\) (the mean-field limit [4, 5, 6, 7]).

A "typical" limit ODE from mean-field analysis will not occur in for the RNNs and standard mean-field techniques (see, for example, [9]) cannot be directly applied. As an illustrative example, standard mean-field techniques would be applicable to a neural network with the following updates:

\[S_{k+1}^{i,N}(X;\theta):=S_{k}^{i,N}(X;\theta)+\frac{1}{N}\sigma\left((W^{i}) ^{\top}X_{k}+\frac{1}{N^{\beta_{1}}}\sum_{j=1}^{N}B^{ij}S_{k}^{j,N}(X;\theta) \right),\quad S_{0}^{i,N}(X;\theta)=0. \tag{1.3}\]

(1.3) is an Euler approximation of an ODE with step size \(\mathcal{O}(1/N)\). (1.3) is a standard mean-field framework and it can clearly be proven as \(N\to\infty\) that (1.3) converges to an appropriate infinite-dimensional ODE. However, the \(S_{k}^{i,N}(X;\theta)\) and \(1/N\) do not appear in the RNN (1.2). This changes the analysis: the RNN hidden layer (1.2) is not an Euler approximation to an ODE.

Although (1.2) is not a standard mean-field equation, we can observe mean-field behaviour for the distribution of the hidden layer. This is illustrated by Figure 1 where, for varying \(N\), we simulated paths of the
hidden layer \(\left(S_{k}^{i,N}(X;\theta)\right)_{i=1}^{N}\), based upon a common \(\theta\) and independent paths of the input sequence \(X\). The empirical distributions of the hidden units in the memory layer at a large, fixed time step \(k\), is displayed as \(N\rightarrow+\infty\). The empirical distributions converge as \(N\rightarrow\infty\). Figure 1 suggests that a mean-field limit as \(N\rightarrow\infty\) does exist. Further details of the simulation are provided in subsection 3.3.

Furthermore, numerical simulations suggest that the hidden layer is ergodic as the time steps \(k\rightarrow\infty\). Figure 2 displays the time-averaged first and second moments of the hidden layer. The formal definition of the time averages is provided in subsection 3.3. Figures 1 and 2 together motivate an analysis of the RNN (1.2) as both \(k,N\rightarrow\infty\).

Our mean-field analysis studies an appropriate fixed point for the untrained hidden units in the memory states, and use it to study the evolution of the RNN. The case for a constant input sequence \(X_{k}=x\) (with a finite number of hidden units) has been study in [10, 11, 12] for developing a more efficient gradient-descent-type algorithm. However, the fixed point analysis is more complex when the input sequence \(X_{k}\) is non-constant and random. As a result, we would expect the RNN to have a _random_ fixed point and that the _distribution_ of the untrained hidden unit in the memory states should converge _weakly_. The random fixed point should also depend on the distribution of the data sequence \(X_{k}\).

We are able to prove such random fixed point exists if the data sequence \(X_{k}\) is ergodic. Section 3 shows that the ergodicity of \(X\) actually leads to the ergodicity of \(S_{k}^{i,N}(X;\theta)\).

The fixed point analysis is further complicated since the parameters \(\theta\) will be simultaneously trained using the truncated backpropagation through time (tBPTT) algorithm as the hidden layer is updated at each time \(k\); see Section 2. Both the hidden layers \(S_{k}^{N}(X;\theta_{k})\) and the parameters \(\theta_{k}\) (which govern the transition function for the hidden layer \(S_{k}^{N}\)) will jointly evolve in time. Therefore, the dynamics of the RNN

Figure 1: Each curve represents the _overall_ empirical distributions of the untrained hidden units in the memory states (the _hidden memory units_) from all simulation instances \(\ell=1,\ldots,100\) for \(N=10^{2},...10^{6}\) and time step \(k\approx 50000\).
will be changing over time. Fortunately, the changes due to the parameter updates will be of magnitude \(\mathcal{O}(1/N)\). Therefore, the evolution of the output layer of the network \((g_{k}^{N}(X;\theta)=\frac{1}{N^{\beta_{2}}}\sum_{i=1}^{N}C^{i}S_{k+1}^{i,N}(X; \theta))\) can be represented as an Euler approximation of an appropriate infinite-dimensional ODE whose dynamics are a function of the RNN hidden layer's random fixed point, which it will converge to as \(N\to\infty\). We emphasise that the evolution of the RNN hidden layer itself (i.e., \(S_{k+1}^{i,N}(X;\theta)\)) cannot be represented as a discretization of an ODE/PDE since the RNN hidden layer updates are \(\mathcal{O}(1)\).

The RNN hidden layer is studied as a function in a Sobolev space, whose evolution is governed by the data sequence \(X_{k}\), the parameter updates, and its dependence on the RNN hidden layer at the previous time step. Due to the correlation between updates (including both the hidden layer and data samples), a Poisson equation must be used to bound the fluctuations of the RNN around its limit equation.

The rest of the paper is organized as follows. In Section 2 we present the model that we study and our main assumptions. In Section 3 we characterise the dynamics of the RNN memory layer as a sequence of random functions of the parameters. We prove that the sequence of memory layers of the trained network is geometrically ergodic. In Section 4 we prove the convergence of the trained RNN. Our main result is presented in Theorem 4.2. Section 5 uses our limit result to prove a useful guarantee for the training of RNN models: the RNN training algorithm will asymptotically decrease the loss function (i.e., the RNN model will be updated in a descent direction). In Section 6 we present a number of technical lemmas and preliminary estimates that are used in the detailed proof of Theorem 4.2 which is presented in Section 7. In the Appendix A we present a recursive inequality that is used in various places throughout the paper as well as the construction of a clipping function.

## 2 Assumptions, Data, and Model Architecture

### Data generation

Our paper focus on the problem of recovering the map from an input data sequence to an output data sequence. We assume the input data sequence \(X=(X_{k})_{k\geq 0},X_{k}\in\mathbb{R}^{d}\) and output data sequence \(Y=(Y_{k})_{k\geq 0},Y_{k}\in\mathbb{R}\) are jointly governed by the following update equation

\[(X_{k+1},Z_{k+1}) =g(X_{k},Z_{k})+\epsilon_{k}, \tag{2.1}\] \[Y_{k} =f(X_{k},Z_{k})+\eta_{k}, \tag{2.2}\]

Figure 2: The plots of the time-averaged first and second moments of the hidden units for a sufficiently large \(N\) (chosen to be \(10^{6}\)) and \(p=1,2\). The \(x\)-axis represents the number of time steps. We summarise the minimum/maximum of the simulated first and second moments of the time-averages for independent input sequences \(X\) using a (seemingly invisible) grey band. The red line represents the mean of the time-averaged moments for all input sequences \(X\), thus providing a Monte-Carlo estimate for the moments of the _random_ fixed point. The fact that the realisations of the time averages all converge as \(k\to\infty\) illustrates the ergodicity of the sequence \(S_{k}^{i,N}(X;\theta)\).
where \((\epsilon_{k},\eta_{k})_{k\geq 0},\epsilon_{k}\in\mathbb{R}^{d+1},\eta_{k}\in \mathbb{R}\) are independent, identically distributed (iid) and mean-zero noises (but \(\epsilon_{k}\) doesn't need to be independent from \(\eta_{k}\)). The map \(g:\mathbb{R}^{d+1}\to\mathbb{R}^{d+1}\) drives the dynamics of the input sequence, and \(f:\mathbb{R}^{d+1}\to\mathbb{R}\) maps the input sequence to the output sequence. The variables \(Z_{k}\in\mathbb{R}\) are _hidden_, i.e. only the inputs \((X_{k})_{k\geq 0}\) and outputs \((Y_{k})_{k\geq 0}\) are observed, and it is not guaranteed whether the observation \((X_{k},Y_{k})_{k\geq 0}\) is actually a Markov process.

Let us make the following assumption on the functions \(f,g\), as well as the background noise of the dynamics. As we will see in the next section, these assumptions are essential in ensuring that the dynamics of the input chain is ergodic.

**Assumption 2.1** (On governing dynamics and background noises of the data sequences).:
1. We assume that the function \((f,g)\) is \(L\)-globally Lipschitz (with respect to the Euclidean norm) with \(L<1\). That is for any \((x,z),(x^{\prime},z^{\prime})\in\mathbb{R}^{d+1}\) we have \[\left|\begin{pmatrix}g(x,z)-g(x^{\prime},z^{\prime})\\ f(x,z)-f(x^{\prime},z^{\prime})\end{pmatrix}\right|\leq L\left|(x,z)-(x^{\prime },z^{\prime})\right|.\]
2. We assume that both \((\epsilon_{k})_{k\geq 0}\) and \((\eta_{k})_{k\geq 0}\) are _mean-zero_ iid random variables that are uniformly bounded by some constant \(C_{\epsilon}\).
3. We finally assume that the sequence \((X_{k},Z_{k})_{k\geq 0}\) is bounded with \(|(X_{k},Z_{k})|\leq 1\). This could be achieved by e.g. assuming \[\max\left(\sup_{x,z}|g(x,z)|,\sup_{k}|\epsilon_{k}|\right)\leq\frac{1}{2}.\] As a result, the output \((Y_{k})_{k\geq 0}\) is uniformly bounded by some constant \(C_{y}<+\infty\).

### Recurrent Neural Network

A recurrent neural network is used to approximate the function \(g\) as defined above. Specifically, we will study the standard recurrent network in equation (1.2) but with the following simplifying assumption for its weight matrix:

**Assumption 2.2** (Simplifying assumption of memory weights).: We assume all columns of \(B\) are equal, i.e. for all \(j\) we have \(B^{ij}=B^{j}\) for some \(B^{j}\).

**Assumption 2.3** (Regularity of activation function).: We assume that \(\sigma\in C_{b}^{2}(\mathbb{R})\) (being a twice-continuously differentiable), with output bounded by one and first and second derivatives both uniformly bounded by \(C_{\sigma}\) where \(C_{\sigma}^{2}<\min\{\frac{1}{2},\frac{1-I^{2}}{8}\}\).

Assumption 2.3 on \(C_{\sigma}\) is instrumental in our proof of ergodicity of the memory states. One of the crucial results is Lemma 3.2 and the related results on erogodicity are in Section 3.1.

_Example 2.4_.: An example of such activation function is the usual sigmoid function, defined as

\[z\in\mathbb{R}\mapsto\sigma(z)=\frac{1}{1+e^{-z}}\implies\quad\sup_{z\in \mathbb{R}}|\sigma(z)|\leq 1.\]

One could show (see e.g. [13]) that \(\sigma^{\prime}(z)\in[0,1/4]\) and \(|\sigma^{\prime\prime}(z)|\leq 1/4\) for any \(z\in\mathbb{R}\). As a result, the sigmoid function satisfies our assumption when \(L<1/2\).

We emphasise that the above assumptions are included for the simplicity of our proof, and we conjecture from our simulation that the RNN exhibits the desired mean-field behaviour under weaker assumptions.

**Assumption 2.5** (Initialisation of parameters).: We assume that the trained parameters \((C^{i},W^{i},B^{i})\) are initialised independently from the data sequence, so that the sequence \((C^{i}_{0},W^{i}_{0},B^{i}_{0})_{i=1}^{N}\) is composed of independent and identically distributed random vectors with a distribution \((C^{i}_{0},W^{i}_{0},B^{i}_{0})\sim\lambda_{0}:=\lambda(dc,dw,db)\), such that \(C^{i}_{0}\) and \(W^{i}_{0}\) are independent from each other with \(C^{i}_{0}\) having zero mean. We further assume that the measure \(\lambda(dc,dw,db)\) is absolutely continuous with respect to Lebesgue measure, i.e., it has a density. In addition, we assume that \(|C^{i}_{0}|\leq 1\), \(|B^{i}_{0}|\leq 1\) and \(\mathbb{E}\left\|W^{i}_{0}\right\|^{2}\leq 1\).
_Remark 2.6_.: For simplicity of notation, we define \(\lambda_{0}^{N}\) to be the empirical measure of the trained parameters at initialisation on the space \(\mathbb{R}^{1+d+1}\), i.e.

\[\lambda_{0}^{N}=\frac{1}{N}\sum_{i=1}^{N}\delta_{C_{0}^{i},W_{0}^{i},B_{0}^{i}}.\]

Finally, in our notation later in the paper, the dependence of the RNN hidden layer \(S_{k}^{i,N}(X;\theta)\) on \(X\) may be dropped in the later sections.

### Training the RNN parameters

The parameters \(\theta\) are in practice trained with an online SGD algorithm seeking to minimize the function

\[\mathcal{L}(\theta)=\frac{1}{T}\sum_{k=1}^{T}\mathcal{L}_{k}(\theta),\quad \text{where }\mathcal{L}_{k}(\theta)=\frac{1}{2}(g_{k}^{N}(X;\theta)-Y_{k})^{2}.\]

The computational cost of evaluating the RNN network up to step \(T\) and performing one full evaluation of gradient by back-propagation through time (BPTT) grows in \(\mathcal{O}(T)\), which become intractable if we want to perform gradient-based algorithms for large \(T\) for minimising the loss function. We instead update the parameters through the _online stochastic gradient descent with truncated back-propagation through time_ (online SGD with tBPTT) [14][15]. A detailed explanation is given in the next section, but the main idea is to truncate the computational graph up to \(\tau\) time steps for \(\tau\ll T\) when computing the outputs of the RNN and gradients with respect to the parameters. For simplicity and without loss of generality, we restrict our discussion to the case when \(\tau=1\).

Assume that the network (estimated) outputs at each step is \(\hat{Y}_{k}^{N}\), which are used as a comparison with the actual observations \(Y_{k}\) for the computation of loss function and the estimated gradient. As it turns out, it is challenging to prove the boundedness of \(\hat{Y}_{k}^{N}\). To resolve this issue, we will clip the gradients used in the parameter updates. Gradient clipping is a standard method in deep learning and training RNNs [13][16][17]. The gradient clipping will actually disappear in the final approximation argument as the number of hidden units \(\to\infty\). Once the gradients in the parameter updates are clipped, the output \(\hat{Y}_{k}^{N}\) can be proven to be bounded. We use the following clipping function:

**Definition 2.7** (Smooth clipping function [18]).: A family of functions \((\psi^{N})_{N\in\mathbb{N}},\ \psi^{N}\in C_{b}^{2}(\mathbb{R})\) is a family of _smooth clipping function_ with parameter \(\gamma\) if the following are satisfied:

1. \(\left|\psi^{N}(x)\right|\) is bounded by \(2N^{\gamma}\),
2. \(\psi^{N}(x)=x\) for \(x\in[-N^{\gamma},N^{\gamma}]\),
3. \(\left|\frac{d}{dx}\psi^{N}(x)\right|\leq 1\).

A construction of such clipping function is provided in appendix B following the arguments in [19]. By fundamental theorem of calculus we also know that \(|\psi^{N}(x)|\leq|x|\). The parameter \(\gamma\) is to be chosen in the next section, and it should be small to ensure that \(|\psi^{N}(\hat{Y}_{k}^{N})|\) does not blow up too quickly as \(N\to\infty\).

Assumptions for the wide-network limitIn our paper we set \(\beta_{1}=1\). Depending on the choice of \(\beta_{2}\), we will get different limits. Preliminary works for feedforward NN (including our prior work), [7, 20, 21, 22, 23] demonstrate that when \(N\to+\infty\), the evolution of the output of the feedforward NN converges to a limit equation:

1. for \(\beta_{2}=1\), the limit equation is expected to be a PDE,
2. for \(\beta_{2}=\beta\in(1/2,1)\), the limit equation is expected to be an infinite-dimensional ODE, and
3. for \(\beta_{2}=1/2\), the limit equation is expected to be a _random_ infinite-dimensional ODE.
Our paper will focus on the case when \(\beta_{2}=\beta\in(1/2,1)\). We are aware that some analyses have been done for the case when \(\beta_{2}=1\) in [24], with the RNN trained _offline_ by continuous gradient descent after observing a fixed number of steps of the sequence \((X_{k})_{k\geq 0}\). We emphasise that in the present work the RNN is trained _online_, so that we update the parameters every time we observe a new step of our sequences \((X_{k},Y_{k})\). We study the asymptotics of the training of RNN as the training time (and hence number of observations made for the input and output sequences) grow with the width of the hidden layer, i.e. \(N\rightarrow+\infty\).

In order to derive a well-defined typical behaviour of the neural network when training our RNN in the limit as \(N\rightarrow+\infty\), we choose the learning rate to be

\[\alpha^{N}:=\frac{\alpha}{N^{2-2\beta}}, \tag{2.3}\]

for some constant \(\alpha>0\). The learning rate is constant in time, and with this we may explicitly state the online SGD with tBPTT, see Algorithm 1.

```
1:procedureSGDtBPTT(\(N,\lambda,T\))\(\triangleright\) network size, initial parameters distribution, running time
2:Initialise: initial parameters \(\theta=(C_{0},W_{0},B_{0})\sim\lambda\), initial memories \(\forall i,\hat{S}_{0}^{i,N}=0\), step \(k=0\)
3:while\(k\leq NT\)do\(\triangleright\) Truncated forward propagation
4:for all\(i\in\{1,2,...,N\}\)do\(\triangleright\) Updating memory
5:\(\hat{S}_{k+1}^{i,N}\leftarrow\sigma\left((W_{k}^{i})^{\top}X_{k}+\frac{1}{N} \sum_{j=1}^{N}B_{k}^{j}\hat{S}_{k}^{j,N}\right)\)\(\triangleright\) Updating memory
6:endfor
7:\(\hat{Y}_{k}^{N}\leftarrow\frac{1}{N^{\beta}}\sum_{i=1}^{N}C_{k}^{i}\hat{S}_{k+1} ^{i,N}\)\(\triangleright\) Updating output
8:\(\hat{L}_{k}=\frac{1}{2}(\hat{Y}_{k}^{N}-Y_{k})^{2}\)\(\triangleright\) Computing loss
9:for all\(i\in\{1,2,...,N\}\)do\(\triangleright\) Truncated backward propagation on \(\hat{L}_{k}\)
10:\(\Delta\hat{S}_{k+1}^{i,N}\leftarrow\sigma^{\prime}\left((W_{k}^{i})^{\top}X_{ k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}\hat{S}_{k}^{i,N}\right)\)
11:\(C_{k+1}^{i}=C_{k}^{i}-\frac{\alpha}{N^{2-\beta}}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k })\hat{S}_{k+1}^{j,N}\)
12:\(W_{k+1}^{i}=W_{k}^{i}-\frac{\alpha C_{k}^{i}}{N^{2-\beta}}(\psi^{N}(\hat{Y}_{k}^ {N})-Y_{k})\Delta\hat{S}_{k+1}^{i,N}\)
13:\(B_{k+1}^{i}=B_{k}^{i}-\frac{\alpha}{N^{3-\beta}}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k })\sum_{\ell=1}^{N}C_{k}^{\ell}\Delta\hat{S}_{k+1}^{\ell,N}\)
14:endfor
15:endwhile
16:endprocedure
```

**Algorithm 1** Online SGD with tBPTT (\(\tau=1\))

Lemma 2.8 yields a bound (uniform in \(i\)) for how much the parameters move.

**Lemma 2.8**.: _Fix \(T>0\). If we choose \(\gamma>0\) such that \(\beta+2\gamma<1\), then for all \(k\) such that \(k/N\leq T\) we have the following sure bounds:_

\[|C_{k}^{i}-C_{0}^{i}|+\left\|W_{k}^{i}-W_{0}^{i}\right\|+|B_{k}^{i}-B_{0}^{i}| <\frac{C_{T}}{N^{1-\beta-\gamma}}, \tag{2.4}\]

_where \(C_{T}>0\) is a constant that depends on \(T\)._

Proof.: See Section 6.1.
_Remark 2.9_.: One can also show, with the absence of clipping function \(\psi^{N}\), that

\[|C^{i}_{k+1}-C^{i}_{k}|+\left\|W^{i}_{k+1}-W^{i}_{k}\right\|+|B^{i}_{k+1}-B^{i}_ {k}|\leq\frac{C_{T}}{N}, \tag{2.5}\]

and hence by a telescoping sum argument,

\[|C^{i}_{k}-C^{i}_{0}|+\left\|W^{i}_{k}-W^{i}_{0}\right\|+|B^{i}_{k}-B^{i}_{0}| \leq C_{T}.\]

The proof of this remark is also very similar - see section 6.1. However, this does not reflect our intuition that the trained parameters are closed to the initialisation. The clipping function here is crucial in justifying the linearisation of the sample outputs with respect to the parameters in our analysis.

Define the empirical measure of \((C^{i}_{k},W^{i}_{k},B^{i}_{k})\) as \(\lambda^{N}_{k}\), i.e.

\[\lambda^{N}_{k}=\frac{1}{N}\sum_{i=1}^{N}\delta_{C^{i}_{k},W^{i}_{k},B^{i}_{k }}.\]

Lemma 2.8 says that the parameters at step \(k\) should be close to the initial parameters on average, so \(\lambda^{N}_{k}\) should be well-approximated by \(\lambda^{N}\) in some sense. We therefore expect that for \(k\leq\left\lfloor TN\right\rfloor\), \(\lambda^{N}_{k}\) converges to \(\lambda\) (distribution of initialisation) in a sense to be specified. However, establishing such convergence using our traditional way of studying its limiting ODE (see e.g. [20]) is difficult. To that end, the evolution of

\[\left\langle f,\lambda^{N}_{k}\right\rangle=\int_{\mathbb{R}^{1+d+1}}f(c,w,b) \,\lambda^{N}_{k}(dc,dw,db)=\frac{1}{N}\sum_{i=1}^{N}f(C^{i}_{k},W^{i}_{k},B^ {i}_{k}),\]

i.e. the inner-product of the empirical distribution with a smooth test function \(f\in C^{\infty}(\mathbb{R}^{1+d+1})\) does not look like a discretization of a differential equation. A new mathematical approach is therefore required to analyze the infinite-width RNN.

Our result is divided into three parts: a result regarding the dynamics of sampled memories through the network, the limiting ODE of the process \(\hat{Y}^{N}_{k}\), and how one could gain insight on how the tBPTT decreases the loss function by studying the limiting ODE.

## 3 Dynamics of the memory units

We characterise the dynamics of the memories as a sequence of a random function with respect to the weights. Specifically, we have \(\hat{S}^{i,N}_{k+1}=v^{N}_{k+1}(W^{i}_{k})\), where \(v^{N}_{k+1}(w)\) satisfies the following recursion:

\[v^{N}_{k+1}(w)=\sigma\left(w^{\top}X_{k}+\frac{1}{N}\sum_{i=1}^{N}B^{i}_{k}v^{ N}_{k}(W^{i}_{k-1})\right),\quad v^{N}_{0}(w)=0. \tag{3.1}\]

We will show that the sequence of random functions \(\left\{v^{N}_{k}(\cdot)\right\}_{k\geq 0}\) converges in distribution to some stationary distribution over a specific function space, as a result of the ergodicity of the underlying input and output dynamics, and the parameters do not move too far from their initial position. Taking these observations into account, we study the joint process \(V^{N}_{k}=(X_{k},Z_{k},Y_{k},v^{N}_{k}(\cdot))\sim\nu^{N}_{k}\) as an element of the product space

\[\mathcal{X}=\overline{B_{1}(0)}\times[-C_{y},C_{y}]\times\overline{\mathcal{ H}},\]

where

\[\overline{B_{1}(0)}=\{(x,z)\,|\,|(x,z)|\leq 1\}, \tag{3.2}\]

\(\mathcal{H}\) is the set

\[\mathcal{H}=\left\{f(w)=\sigma(w^{\top}a+b)\,:\,a\in\mathbb{R}^{d},\,|a|\leq 1,\,b\in\mathbb{R}\right\},\]
and \(\overline{\mathcal{H}}\) is the closure of \(\mathcal{H}\) with the Sobolev norm (with respect to the distribution of initialisation of \(w\) (i.e. \(\lambda\))

\[\|h\|_{H^{1}(\lambda)}^{2}=\int_{\mathbb{R}^{d}}\left(|h(w)|^{2}+ \left|\nabla h(w)\right|^{2}\right)\,\lambda(dw). \tag{3.3}\]

We equip the space \(\mathcal{X}\) with the norm \(\left\|\cdot\right\|_{\mathcal{X}}\):

\[\left\|(x,z,y,h)\right\|_{\mathcal{X}}^{2}=\left|x\right|^{2}+ \left|z\right|^{2}+\left|y\right|^{2}+\left\|h\right\|_{H^{1}(\lambda)}^{2}, \tag{3.4}\]

and the usual Borel \(\sigma\)-algebra \(\mathcal{B}(\mathcal{X})\) that contains the open subsets of \(\mathcal{X}\) with respect to this norm.

**Lemma 3.1**.: _An element \(v\in\mathcal{H}\) satisfies_

\[\sup_{w}|v(w)|\leq 1,\quad\sup_{w}|\nabla v(w)|\leq C_{\sigma}<1,\quad \max_{i,j}\sup_{w}\left[|\partial_{ij}v(w)|\right]\leq C_{\sigma}<1.\]

_As a result, we know that \(v\in H^{1}(\mathbb{R}^{d};\lambda)=:H^{1}(\lambda)\), i.e. \(\mathcal{H}\) is a (proper) subspace of \(H^{1}(\lambda)\)._

Proof.: The first inequality is immediately true by Assumption 2.3. The second inequality is true as

\[\nabla v(w)=\sigma^{\prime}(w^{\top}a+b)a\implies|\nabla v(w)|\leq| \sigma^{\prime}(w^{\top}a+b)||a|\leq C_{\sigma}.\]

The second inequality can also be proven by noting that

\[\mathsf{Hess}\,v(w)=\sigma^{\prime\prime}(w^{\top}a+b)aa^{\top} \implies|\partial_{ij}v(w)|\leq|\sigma^{\prime\prime}(w^{\top}a+b)||a_{i}||a_ {j}|\leq C_{\sigma}.\]

Notice that this implies that \(v\in H^{1}(\lambda)\), as the \(\|v\|_{H^{1}(\lambda)}\) norm is well-defined and bounded by the following

\[\|v\|_{H^{1}(\lambda)}^{2}\leq\int_{\mathbb{R}^{d}}\left(|v(w)|^ {2}+|\nabla v(w)|^{2}\right)\,\lambda(dw) =\int_{\mathbb{R}^{d}}\left[\left|\sigma(w^{\top}a+b)\right|^{2} +\left|\sigma^{\prime}(w^{\top}a+b)\right|^{2}|a|^{2}\right]\,\lambda(dw)\] \[\leq\int_{\mathbb{R}^{d}}\left(1+C_{\sigma}^{2}\right)\lambda(dw )=1+C_{\sigma}^{2}<+\infty. \tag{3.5}\]

In fact this yields the control \(\|v\|_{H^{1}(\lambda)}\leq\sqrt{1+C_{\sigma}^{2}}\), so \(\mathcal{H}\) is bounded in \(H^{1}(\lambda)\)-norm. 

As a result, the closure \(\overline{\mathcal{H}}\) is a proper closed subspace of the Polish space \(\mathbb{R}^{d+1+1}\times H^{1}(\lambda)\) in the \(\mathcal{X}\)-norm, hence it is a complete normed space as well.

As the parameters do not move too much from their initial position, we would expect \(\lambda_{k}^{N}\) to be close to \(\lambda^{N}\) in some sense when \(k\leq\left\lfloor NT\right\rfloor\). We also expect \(\lambda^{N}\) to be close to \(\lambda\) when \(N\) gets large. This motivates us to consider the following auxiliary processes:

\[H_{k}=(X_{k},Z_{k},Y_{k},h_{k}(\cdot))\sim\mu_{k},\]

where \(h_{k}\) is governed by the following random iterations:

\[h_{k+1}(w)=\sigma(w^{\top}X_{k}+\langle b^{\prime}h_{k}(w^{ \prime}),\lambda\rangle)\in\mathcal{H},\quad h_{0}(w)=0. \tag{3.6}\]

We will quantify the distance between \(v_{k}^{N}(w)\) and \(h_{k}(w)\) in the later part of this section, but let us focus on this auxiliary process. The process is a Markov chain of the form \(H_{k+1}=F(H_{k},\epsilon_{k},\eta_{k})\), where

\[F:(x,z,y,h,\epsilon,\eta) \mapsto(g(x,z)+\epsilon,f(x,z)+\eta,\varsigma(x,z,y,h))\in \mathcal{X} \tag{3.7}\] \[\varsigma:(x,z,y,h) \mapsto\left[w\mapsto\sigma(w^{\top}x+\langle bh(w),\lambda \rangle)\right]\in\mathcal{H}\]

As a result, the Markov chain possesses the following transition kernel \(P:\mathcal{X}\times\mathcal{B}(\mathcal{X})\to\mathbb{R}_{\geq 0}\), where:

\[P(H,A)=\mathbb{E}_{\epsilon,\eta}(\mathbb{I}_{A}(F(H,\epsilon, \eta))).\]

We make note that
**Lemma 3.2**.: _For any fixed realisation of \((\epsilon,\eta)\), the function \(F\) is \(q_{0}\)-Lipschitz continuous with \(q_{0}\leq\sqrt{L^{2}+8C_{\sigma}^{2}}<1\). Due to Assumptions 2.1 and 2.3 on \(L\) and \(C_{\sigma}\) respectively, we have \(q_{0}<1\)._

Proof.: See section 6.2. 

This enables us to show that the Markov chain \((H_{k})_{k\geq 1}\) is ergodic, which is the objective of subsection 3.1.

### Geometric Ergodicity of the auxiliary process

Given a norm \(\left\|\cdot\right\|\) on a vector space \(\mathcal{X}\) such that \((\mathcal{X},\left\|\cdot\right\|)\) is Banach (i.e. complete) and separable, we can define the associated \(p\)-Wasserstein distance for \(p\geq 1\)[25]:

**Definition 3.3** (Wasserstein Metric).: Let \(\rho_{1},\rho_{2}\) are measures in the \(p\)-Wasserstein space of \((\mathcal{X},\left\|\cdot\right\|)\):

\[\rho_{1},\rho_{2}\in\mathcal{P}_{p}^{\left\|\cdot\right\|}(\mathcal{X})= \left\{\rho\,:\,\int_{\mathcal{X}}\left\|u\right\|_{\mathcal{X}}^{p}\,\rho( dx)<+\infty\right\}\]

A measure \(\rho\) on \(\mathcal{X}\times\mathcal{X}\) is a _coupling_ between \(\rho_{1}\) and \(\rho_{2}\) if

\[\rho_{1}(\cdot)=\rho(\cdot\times\mathcal{X})\quad\rho_{2}(\cdot)=\rho( \mathcal{X}\times\cdot).\]

The \(p\)-Wasserstein distance between \(\rho_{1}\) and \(\rho_{2}\) with respect to norm \(d\) is defined as \(\mathsf{Wass}_{p}^{\left\|\cdot\right\|}(\rho_{1},\rho_{2})\) that satisfies

\[\left[\mathsf{Wass}_{p}^{\left\|\cdot\right\|}(\rho_{1},\rho_{2})\right]^{p}= \inf_{\gamma\in\Gamma(\rho_{1},\rho_{2})}\int_{\mathcal{X}\times\mathcal{X}} \left\|u-v\right\|_{\mathcal{X}}^{p}\,\gamma(du\,dv), \tag{3.8}\]

where \(\Gamma(\rho_{1},\rho_{2})\) is the set of all couplings between \(\rho_{1}\) and \(\rho_{2}\).

The norm \(\left\|\cdot\right\|\) might be omitted in writing \(\mathsf{Wass}_{p}^{\left\|\cdot\right\|}(\rho_{1},\rho_{2})\) and \(\mathcal{P}_{p}^{\left\|\cdot\right\|}(\mathcal{X})\) if no confusion is created as a result.

_Remark 3.4_.: Note that the infimum in (3.8) is a minimum [25], i.e. there is an optimal coupling \(\gamma^{*}\in\Gamma(\rho_{1},\rho_{2})\) such that

\[\left[\mathsf{Wass}_{p}^{\left\|\cdot\right\|}(\rho_{1},\rho_{2})\right]^{p}= \int_{\mathcal{X}\times\mathcal{X}}\left\|u-v\right\|_{\mathcal{X}}^{p}\,\gamma ^{*}(du\,dv). \tag{3.9}\]

This fact will be used to prove bounds for the Wasserstein metric between successive terms of sequence of distribution \(\mu_{k}\).

Recall that the transition kernel \(P\) induces an operator on the space of all probability measure on \(\mathcal{X}\):

\[\mu\stackrel{{ P^{\vee}}}{{\mapsto}}[P^{\vee}(\mu)](\cdot)=\int_{ \mathcal{X}}P(\mathsf{H},\cdot)\,\mu(d\mathsf{H}).\]

In particular, the sequence of measures \((\mu_{k})_{k\geq 0}\) could now be written as \(\mu_{k}=(P^{\vee})^{k}\mu_{0}\). Thanks to the \(q_{0}\)-Lipschitzness of the function \(F\), we could show the following control:

**Lemma 3.5**.: \[\mathsf{Wass}_{2}(P(H,\cdot),P(H^{\prime},\cdot))\leq q_{0}\left\|H-H^{\prime }\right\|_{\mathcal{X}}.\]

Proof.: We consider the joint random variable \(\tilde{F}_{H,H^{\prime}}=(F(H,\epsilon,\eta),F(H^{\prime},\epsilon,\eta))\). We note that the first component has the same distribution as \(P(H,\cdot)\), and the second component has the same distribution as \(P(H^{\prime},\cdot)\). Therefore the distribution of \(\tilde{F}_{H,H^{\prime}}\), denoted as \(\bar{\gamma}_{H,H^{\prime}}\), is both a coupling between the measures \(P(H,\cdot)\) and \(P(H^{\prime},\cdot)\) and a valid \(((H,H^{\prime})\)-measurable) transition kernel. Therefore, by Lemma 3.2 we have

\[\mathsf{Wass}_{2}(P(H,\cdot),P(H^{\prime},\cdot))\leq\left[\mathbb{E}_{F_{H,H^{ \prime}}}|F(H,\epsilon,\eta)-F(H^{\prime},\epsilon,\eta)|^{2}\right]^{1/2} \leq q_{0}\|H-H^{\prime}\|_{\mathcal{X}}. \tag{3.10}\]
This leads to the following formal result on the convergence of \(\mu_{k}\).

**Theorem 3.6**.: _For all \(\mu,\nu\in\mathcal{P}_{2}(\mathcal{X})\),_

\[\mathsf{Wass}_{2}(P^{\vee}(\mu),P^{\vee}(\nu))\leq q_{0}\mathsf{Wass}_{2}(\mu, \nu),\]

_where \(q_{0}<1\), and the 2-Wasserstein distance is taken with respect to the metric induced by the \(\left\|\cdot\right\|_{\mathcal{X}}\) norm defined in (3.4). As a result the operator \(P^{\vee}\) has a unique contractive fixed point \(\mu\), which is the stationary measure of the Markov chain \((H_{k})_{k\geq 0}\)._

Proof.: Let \(\gamma^{*}\) be the optimal coupling between \(\mu\) and \(\nu\), such that

\[(\mathsf{Wass}_{2}(\mu,\nu))^{2}=\int_{\mathcal{X}}\left\|\mathsf{H}-\bar{ \mathsf{H}}\right\|_{\mathcal{X}}^{2}\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}}). \tag{3.11}\]

We look at the coupling

\[\gamma(\cdot)=\int_{\mathcal{X}\times\mathcal{X}}\tilde{\gamma}_{\mathsf{H}, \bar{\mathsf{H}}}(\cdot)\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}}).\]

The integral is well defined as \(\tilde{\gamma}_{\mathsf{H},\bar{\mathsf{H}}}(\cdot)(A)\) is a \((\mathsf{H},\bar{\mathsf{H}})\)-measurable function for any sets \(A\in\mathcal{B}(\mathcal{X}\times\mathcal{X})\). One can directly check that \(\gamma\) is a measure. In particular, \(\gamma\) is a coupling of \(P^{\vee}(\mu)\) and \(P^{\vee}(\nu)\), as for all \(A,B\in\mathcal{B}(\mathcal{X})\)

\[\gamma(A\times\mathcal{X}) =\int_{\mathcal{X}\times\mathcal{X}}\tilde{\gamma}_{\mathsf{H}, \bar{\mathsf{H}}}(A\times\mathcal{X})\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H} })=\int_{\mathcal{X}\times\mathcal{X}}P(\mathsf{H},A)\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}})=[P^{\vee}(\mu)](A), \tag{3.12}\] \[\gamma(\mathcal{X}\times B) =\int_{\mathcal{X}\times\mathcal{X}}\tilde{\gamma}_{\mathsf{H}, \bar{\mathsf{H}}}(\mathcal{X}\times B)\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H }})=\int_{\mathcal{X}\times\mathcal{X}}P(\bar{\mathsf{H}},B)\,\gamma^{*}(d \mathsf{H},d\bar{\mathsf{H}})=[P^{\vee}(\nu)](B).\]

We therefore have \(\gamma\in\Gamma(P^{\vee}(\mu),P^{\vee}(\nu))\). Finally, since

\[\gamma(A\times B)=\int_{\mathcal{X}\times\mathcal{X}}\tilde{\gamma}_{\mathsf{ H},\bar{\mathsf{H}}}(A\times B)\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}})= \int_{\mathcal{X}\times\mathcal{X}}\int_{\mathcal{X}\times\mathcal{X}}\mathbb{ I}_{A\times B}(H,\bar{H})\,\tilde{\gamma}_{\mathsf{H},\bar{\mathsf{H}}}(dH,d\bar{H})\, \gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}})\]

one could extend the above formula to define an integral of \((H,\bar{H})\)-measurable functions \(c(h,\bar{h})\) with respect to the coupling \(\gamma\):

\[\int_{\mathcal{X}\times\mathcal{X}}c(h,\bar{h})\,\gamma(dh,d\bar{h})=\int_{ \mathcal{X}\times\mathcal{X}}\int_{\mathcal{X}\times\mathcal{X}}c(H,\bar{H}) \,\tilde{\gamma}_{\mathsf{H},\bar{\mathsf{H}}}(dH,d\bar{H})\,\gamma^{*}(d \mathsf{H},d\bar{\mathsf{H}}),\]

so we could use this formula with \(c(h,\bar{h})=\|h-\bar{h}\|_{\mathcal{X}}^{2}\) to conclude that

\[[\mathsf{Wass}_{2}(P^{\vee}(\mu),P^{\vee}(\nu))]^{2} \leq\int_{\mathcal{X}\times\mathcal{X}}\int_{\mathcal{X}\times \mathcal{X}}\|H-\bar{H}\|_{\mathcal{X}}^{2}\,\tilde{\gamma}_{\mathsf{H},\bar{ \mathsf{H}}}(dH,d\bar{H})\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}}),\] \[\stackrel{{\eqref{eq:c_def_def}}}{{\leq}}\int_{ \mathcal{X}\times\mathcal{X}}q_{0}^{2}\|\mathsf{H}-\bar{\mathsf{H}}\|_{ \mathcal{X}}^{2}\,\gamma^{*}(d\mathsf{H},d\bar{\mathsf{H}})\] \[\stackrel{{\eqref{eq:c_def_def}}}{{=}}q_{0}^{2}[ \mathsf{Wass}_{2}(\mu,\nu)]^{2}, \tag{3.13}\]

Therefore \(P^{\vee}\) is indeed a contraction in the space \(\mathcal{P}_{2}(\mathcal{X})\). Since \(\mathcal{X}\) is a complete space with respect to the \(\|\cdot\|_{\mathcal{X}}\) norm, so is \(\mathcal{P}_{2}(\mathcal{X})\) with respect to the \(\mathsf{Wass}_{2}\) metric [25], so by Banach fixed point theorem \(P^{\vee}\) admits a unique fixed point \(\mu\), such that

\[P^{\vee}(\mu)=\mu.\]

By definition of \(P\), we see that \(\mu\) is the unique stationary measure of the Markov chain \((H_{k})_{k\geq 0}\), so that for any initial distribution \(\mu_{0}\) and induced sequence \((\mu_{k})_{k\geq 0}\) we have

\[\mathsf{Wass}_{2}(\mu_{k},\mu)=q_{0}^{k}\mathsf{Wass}_{2}(\mu_{0},\mu).\]

This completes the proof of Theorem 3.6.
### Bounds on auxiliary processes

We will introduce a further auxiliary sequence \(H_{k}^{N}=(X_{k},Z_{k},Y_{k},h_{k}^{N}(\cdot))\) for our proof, where the random sequence \(\left(h_{k}^{N}(\cdot)\right)_{k\geq 0}\) evolves according to the equation

\[h_{k+1}^{N}(w)=\sigma(w^{\top}X_{k}+\big{<}b^{\prime}h_{k}^{N}(w^{\prime}), \lambda^{N}\big{>}),\quad h_{0}^{N}(w)\equiv 0. \tag{3.14}\]

_Remark 3.7_.: We could now express the hidden memory units in terms of the auxiliary processes. In fact,

* The trained hidden memory units \(\hat{S}_{k}^{i,N}=v_{k}^{N}(W_{k-1}^{i})\) for \(k\geq 1\). The base case is justified as \(\hat{S}_{1}^{i,N}=v_{1}^{N}(W_{0}^{i})=\sigma((W_{0}^{i})^{\top}X_{1})\), and we could inductively prove that \[\hat{S}_{k+1}^{i,N}=v_{k+1}^{N}(W_{k}^{i})=\sigma\left((W_{k}^{i})^{\top}X_{k }+\frac{1}{N}\sum_{i=1}^{N}B_{k}^{i}\hat{S}_{k}^{i,N}\right)=\sigma\left((W_{k }^{i})^{\top}X_{k}+\frac{1}{N}\sum_{i=1}^{N}B_{k}^{i}v_{k}^{N}(W_{k-1}^{i}) \right),\]
* We also show that the untrained hidden memory units \(S_{k}^{i,N}(X;\theta_{0})=h_{k}^{N}(W^{i})\) for \(k\geq 1\) and \(\theta_{0}=(C^{i},W^{i},B^{i})\). This is shown by noting that for \(k=1\), we have \(S_{1}^{i,N}(X;\theta)=h_{1}^{N}(W^{i})=\sigma((W^{i})^{\top}X_{0})\), and inductively, \[S_{k+1}^{i,N}(X;\theta) =\sigma\left((W^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B^{j}S_ {k}^{j,N}(X;\theta)\right)\] \[=\sigma\left((W^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B^{j}h_ {k}^{N}(W^{j})\right)\] \[=\sigma\left((W^{i})^{\top}X_{k}+\big{<}b^{\prime}h_{k}^{N}(w^{ \prime}),\,\lambda^{N}\big{>}\right)=h_{k+1}^{N}(W^{i}).\]

Since we already know that the individual parameters \(C_{k}^{i},W_{k}^{i},B_{k}^{i}\) are close to their initial values \(C^{i},W^{i},B^{i}\) by Lemma 2.8, we should expect that the random functions \(v_{k}^{N}(\cdot)\) to get close to the functions \(h_{k}^{N}(\cdot)\) as \(N\to+\infty\). In addition, we should also expect that \(h_{k}^{N}(\cdot)\) to be close to the random functions \(h_{k}(\cdot)\) as \(N\to+\infty\) as well. This is useful in proving the weak convergence results in the next section.

Let us formalise the above heuristics by studying the difference

\[\Gamma_{k}^{N}(w)=v_{k}^{N}(w)-h_{k}(w)=\Gamma_{k}^{N,1}(w)+\Gamma_{k}^{N,2}(w),\]

where

\[\Gamma_{k}^{N,1}(w)=h_{k}^{N}(w)-h_{k}(w), \tag{3.15}\] \[\Gamma_{k}^{N,2}(w)=v_{k}^{N}(w)-h_{k}^{N}(w).\]

We will show the following

**Proposition 3.8**.: _If \(a\lor b=\max(a,b)\) and \(a\wedge b=\min(a,b)\), we have for \(k\leq\lfloor NT\rfloor\),_

\[\mathbb{E}\left\|\Gamma_{k}^{N,1}(w)\right\|_{H^{1}(\lambda)}^{2}\vee\max_{i }\mathbb{E}\left[\Gamma_{k}^{N,1}(W^{i})\right]^{2}\leq\frac{C}{N}, \tag{3.16}\]

_for some constant \(C>0\), and_

\[\mathbb{E}\left\|\Gamma_{k}^{N,2}(w)\right\|_{H^{1}(\lambda)}^{2}\vee\max_{i }\mathbb{E}\left[\Gamma_{k}^{N,2}(W^{i})\right]^{2}\leq\frac{C_{T}}{N^{2-2 \beta-2\gamma}}, \tag{3.17}\]

_where \(C_{T}>0\) is another constant depending on \(T\). Therefore for \(k\leq\lfloor NT\rfloor\),_

\[\mathbb{E}\left\|\Gamma_{k}^{N}(w)\right\|_{H^{1}(\lambda)}^{2}\vee\max_{i} \mathbb{E}\left[\Gamma_{k}^{N}(W^{i})\right]^{2}\leq 4C_{\sigma}^{2}\left(\frac{C}{N}+ \frac{C_{T}}{N^{2-2\beta-2\gamma}}\right)\leq\frac{C_{T}}{N^{2-2\beta-2\gamma}}. \tag{3.18}\]
Proof.: See section 6.3. 

As an immediate result of the above proposition, we see that the empirical distribution of the untrained memory units converges. This gives a formal statement of the mean-field behaviour of the distribution of the untrained memory units.

### Numerical simulations

To illustrate the above results, we simulated 100 paths of the untrained hidden memory units, denoted as \(h_{k}^{N,\mathsf{path}}(W^{i})=S_{k}^{i,N}(X^{\mathsf{path}};\theta)\), each based on the common parameters \(\theta=(C^{i},W^{i},B^{i})\) and an independent instance of the input sequence \(X^{\mathsf{path}}\) for \(\mathsf{path}=1,2,...,100\). The actual input sequence is simulated from the following 2D random dynamical systems:

\[\begin{bmatrix}X_{k+1}\\ Z_{k+1}\end{bmatrix}=\frac{1}{2}\tanh\left(P\begin{bmatrix}1&0\\ 0&1/2\end{bmatrix}P^{-1}\begin{bmatrix}X_{k}\\ Z_{k}\end{bmatrix}\right),\quad P=\begin{bmatrix}\sqrt{3}/2&1/2\\ -1/2&\sqrt{3}/2\end{bmatrix},\;X_{0},Z_{0}\stackrel{{\text{iid}}} {{\sim}}\mathsf{Uniform}[0,1]. \tag{3.19}\]

We choose the standard sigmoid function as our activation function, and \((B^{i},W^{i})\) are simulated so that \(B^{i}\stackrel{{\text{iid}}}{{\sim}}\mathsf{Uniform}[0,1]\) and \(W^{i}\stackrel{{\text{iid}}}{{\sim}}\mathsf{Normal}[0,1]\).1

Footnote 1: We use the notation \(\mathsf{Uniform}[0,1]\) to denote the number of nodes in the training set.

The mean-field behaviour could be studied by looking at the empirical distributions of the untrained hidden units for each set (represented by the grey lines in figure 3):

\[\nu_{k}^{N,\mathsf{path}}=\frac{1}{N}\sum_{i=1}^{N}\delta_{h_{k}^{N,\mathsf{ path}}(W^{i})},\]

as well as the overall distributions of the hidden units from all sets as a Monte-carlo estimate of the expectation of the distribution of \(h_{k}^{N}(W^{i})\) (represented by the red lines in figure 3):

\[\nu_{k}^{N,\mathsf{overall}}=\frac{1}{100}\sum_{\mathsf{path}=1}^{100}\delta_{h _{k}^{N,\mathsf{path}}(W^{i})}.\]

The convergence of distribution of \(h_{k}^{N}(W^{i})\) as \(N\to\infty\) is illustrated by noting that the above plots are similar to each other for large \(N\). Figure 1 in the introduction is plotted by stacking all overall empirical distributions \(\nu_{k}^{N,\mathsf{overall}}\) on the same plot for easier comparison.

The intermediate proposition provides a solid foundation for our numerical experiment. Showing the ergodicity of \(h_{k}^{N}(W^{i})=S^{i,N}(X;\theta)\) is easier than showing the ergodicity of the function \(h_{k}(\cdot)\) as the former does not involve the exact computation of \(\langle b^{\prime}h_{k}(w^{\prime}),\lambda\rangle\). The above proposition implies that for sufficiently large \(N\), the untrained memory units \(h_{k}^{N}(W^{i})=S^{i,N}(X;\theta)\) exhibit similar ergodic behaviour due to the ergodicity of \(h_{k}\). To illustrate this, we compute the time average of the empirical first and second moments of the sample hidden memory units \((S_{k}^{i,N}(X;\theta))_{k\geq 0}\) for each sets, defined as

\[\mathsf{timeAvg}_{T}^{N,p,\mathsf{path}}=\frac{1}{NT}\sum_{k=0}^{T}\sum_{i=1}^ {N}\left[h_{k}^{N,\mathsf{path}}(W^{i})\right]^{p},\quad p=1,2,\quad\mathsf{ path}=1,...,100,\]

as well as the overall time average of the empirical first and second moments:

\[\mathsf{timeAvg}_{T}^{N,p,\mathsf{overall}}=\frac{1}{100}\sum_{\mathsf{path}=1 }^{100}\mathsf{timeAvg}_{T}^{N,p,\mathsf{path}}.\]

They are both plotted in Figure 4, with the redline being \(\mathsf{timeAvg}_{T}^{N,p,\mathsf{overall}}\), and that all \(\mathsf{timeAvg}_{T}^{N,p,\mathsf{path}}\) lies within the greyband. The shrinking of the grayband towards the red line is another evidence of mean-field
behaviour, and the convergence of \(\mathsf{timeAvg}_{T}^{N,p,\mathsf{overall}}\) demonstrates the ergodicity of the untrained hidden memory units. Figure 2 in the introduction is the enlarged version of 4 for \(N=10^{6}\).

Please refer to [https://github.com/Samuel-CHLam/rnn_ergodicity](https://github.com/Samuel-CHLam/rnn_ergodicity) for the code of the simulation.

## 4 Dynamics of the RNN output

### Pre-limit evolution

To study the dynamics of the sequence \(\hat{Y}_{k}^{N}\), we first study the auxiliary sequence of functions

\[g_{k}^{N}:h\in\mathcal{H}\mapsto g^{N}(h;\theta_{k}):=\frac{1}{N^{\beta}}\sum_{ i=1}^{N}C_{k}^{i}h(W_{k}^{i})=N^{1-\beta}\left\langle h(w)c,\,\lambda_{k}^{N} \right\rangle,\]

Notice that \(g_{k}^{N}(\cdot)\) is a sequence of linear functionals on \(\mathcal{H}\) that evolves with the time step \(k\). We further note that \(\hat{S}_{k+1}^{i,N}=v_{k+1}^{N}(W_{k}^{i})\), so

\[\hat{Y}_{k}^{N}=g_{k}^{N}(v_{k+1}^{N}(w)).\]

Using Taylor expansion, we derive the following evolution equation for \(g_{k}^{N}(h)\) for a fixed test function \(h\):

Figure 3: Empirical distributions of the untrained hidden memory units \(h_{k}^{N}(W^{i})\) for varying \(N\) and large time step \(k\approx 50000\). The grey lines represents the empirical distribution for a _single_ set of the untrained hidden memory units \(\nu_{k}^{N,\mathsf{path}}\), and the red line represents the empirical distribution of all untrained hidden memory units from _all_ sets \(\nu_{k}^{N,\mathsf{overall}}\).
Figure 4: The plot of time averages for \(N=10^{k},k=2,3,4,5,6\) and \(p=1,2\). The actual realisations of \(\mathsf{timeAvg}_{T}^{N,p,\mathsf{path}}\) lie in the grey band, and the red line is the overall time average \(\mathsf{timeAvg}_{T}^{N,p,\mathsf{overall}}\) as the Monte-carlo estimate of \(\mathbb{E}[\mathsf{timeAvg}_{T}^{N,p}]\). The desired converging behaviour is only exhibited when \(N\) is sufficiently large.
**Lemma 4.1**.: _For all \(h\in\mathcal{H}\), let_

\[\triangle g_{k}^{N}(h) =g_{k+1}^{N}(h)-g_{k}^{N}(h),\] \[\delta^{(1)}g_{k}^{N}(h) =-\frac{\alpha}{N^{2}}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k})\sum_{i=1} ^{N}\left[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i})^{2}\Delta\hat{S}_{k+1}^{i }\nabla h(W_{k}^{i})^{\top}X_{k}\right],\] \[=-\frac{\alpha}{N}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k})\big{(}\, \big{\langle}v_{k+1}^{N}(w)h(w)+c^{2}\sigma^{\prime}\left(w\cdot X_{k}+\big{ \langle}bv_{k}^{N}(w),\,\lambda_{k}^{N}\big{\rangle}\right)\nabla h(w)^{\top}X _{k},\,\lambda_{k}^{N}\big{\rangle}\,\big{)}. \tag{4.1}\]

_Then for all \(k\leq\lfloor NT\rfloor\),_

\[\left|\triangle g_{k}^{N}(h)-\delta^{(1)}g_{k}^{N}(h)\right|\leq\frac{C_{T}}{ N^{3-\beta-2\gamma}}.\]

Proof.: See section 6.4. 

We will prove that the RNN converges to a continuous-time limit equation on \([0,T]\) as the number of hidden units \(N\to\infty\) and where the number of time steps is \(k=0,1,\ldots,\lfloor TN\rfloor\). The following time-rescaling is defined to embed (4.1) in continuous time: \(g_{t}^{N}(h)=g_{\lfloor Nt\rfloor}^{N}(h;\theta_{\lfloor Nt\rfloor})\). Using a telescoping series applied to (4.1) and re-writing in terms of the empirical measure \(\lambda_{k}^{N}\), one can conclude that

\[\left|g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{\lfloor Nt\rfloor-1} \delta^{(1)}g_{k}^{N}(h)\right| =\left|\sum_{k=0}^{\lfloor Nt\rfloor-1}(\triangle g_{k}^{N}(h)- \delta^{(1)}g_{k}^{N}(h))\right|\] \[\leq\sum_{k=0}^{\lfloor Nt\rfloor-1}\left|\triangle g_{k}^{N}(h) -\delta^{(1)}g_{k}^{N}(h)\right|\] \[\leq Nt\times\frac{C_{t}}{N^{3-\beta-2\gamma}}=\frac{C_{t}}{N^{2- \beta-2\gamma}}. \tag{4.2}\]

The sum in (4.2) is an approximation to a Riemann time integral with error \(\mathcal{O}(N^{-1})\), so one would expect that for \(t\in[0,T]\), the evolution of \(g_{t}^{N}(h)\) for fixed \(h\) would converge in distribution to a solution of the linear infinite-dimensional ODE equation. Formally, we have the following:

**Theorem 4.2**.: _Let \(T<\infty\) be given and \(t\leq T\). Define the infinite dimensional equation for \(g_{t}\in(H^{1}(\lambda))^{*}\), the dual space of \(H^{1}(\lambda)\), such that for the test function \(h\in H^{1}(\lambda)\):_

\[g_{t}(h) =-\alpha\int_{0}^{t}\left[\int_{\mathcal{X}}(g_{s}(\varsigma( \mathsf{H}))-\mathsf{y}))\mathcal{K}_{\kappa,\lambda}(h,\mathsf{h})\,\mu( \mathsf{H}\mathsf{H})\right]\,ds,\quad g_{0}(h)=0,\] \[\mathcal{K}_{\kappa,\lambda}(h,\mathsf{h}) =\left\langle\sigma(w^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{ h}(w^{\prime}),\lambda\rangle)h(w)+c^{2}\sigma^{\prime}(w^{\top}\mathsf{x}+ \langle b^{\prime}\mathsf{h}(w^{\prime}),\lambda\rangle)\nabla h(w)^{\top}x, \,\lambda\right\rangle,\] \[[\varsigma(\mathsf{H})](w) =\sigma(w^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{h}(w^{ \prime}),\,\lambda\rangle) \tag{4.3}\]

_where \(\mathsf{H}=(\mathsf{x},\mathsf{z},\mathsf{y},\mathsf{h})\), and \(\mu\) is the stationary distribution of Markov chain \((H_{k})_{k\geq 0}\) obtained in Theorem (3.6). Then, for \(\gamma>0\) sufficiently small, as \(N\to\infty\) and \(T<+\infty\), we have_

\[\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}\mathbb{E}\left[\big{|}g_{t}^{N}(h)-g_{t }(h)\big{|}\right]\leq\frac{C_{T}}{N^{\epsilon}},\]

_where \(\epsilon=(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)\wedge 1/2>0\)._

Proof.: The well-posedness of the ODE is discussed in section 6.5, and the actual proof of weak convergence is deferred to section 7.
## 5 Limit RNN minimises the average loss

Let us analyse the deterministic limiting ODE. Again we let \(\mathsf{H}=(\mathsf{x},\mathsf{z},\mathsf{y},\mathsf{h})\) and \(\tilde{\mathsf{H}}=(\tilde{\mathsf{x}},\tilde{\mathsf{z}},\tilde{\mathsf{y}}, \tilde{\mathsf{h}})\). If we integrate the limit equation (4.3) with respect to \(\mathcal{X}\) again with the limiting measure \(\mu\), we will obtain that

\[\int_{\mathcal{X}}g_{t}(\varsigma(\tilde{\mathsf{H}}))\,\mu(d \tilde{\mathsf{H}}) =\int_{\mathcal{X}}\,\left[-\alpha\int_{0}^{t}\int_{\mathcal{X}}(g _{s}(\varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{\mathsf{x},\lambda}( \varsigma(\tilde{\mathsf{H}}),\mathsf{h})\,\mu(d\mathsf{H})\,ds\right]\mu(d \tilde{\mathsf{H}})\] \[\overset{(\text{Fubini})}{=}-\alpha\int_{0}^{t}\int_{\mathcal{X}} \int_{\mathcal{X}}(g_{s}(\varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{ \mathsf{x},\lambda}(\varsigma(\tilde{\mathsf{H}}),\mathsf{h})\,\mu(d\mathsf{H })\,\mu(d\tilde{\mathsf{H}})\,ds, \tag{5.1}\]

which yields

\[\frac{d}{dt}\int_{\mathcal{X}}g_{t}(\varsigma(\tilde{\mathsf{H}}))\,\mu(d \tilde{\mathsf{H}})=-\alpha\int_{\mathcal{X}}\int_{\mathcal{X}}(g_{t}( \varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{\mathsf{x},\lambda}(\varsigma( \tilde{\mathsf{H}}),\mathsf{h})\,\mu(d\mathsf{H})\,\mu(d\tilde{\mathsf{H}}).\]

Notice that the integrand on the left hand side of (5) is \(g_{t}(\varsigma(\tilde{\mathsf{H}}))\) and not \(g_{t}(\varsigma(\mathsf{h}))\). This is because \(\varsigma(\tilde{\mathsf{H}})](w)=\sigma(w^{\top}\tilde{\mathsf{x}}+\left\langle b ^{\prime}\tilde{\mathsf{h}}(w^{\prime}),\,\lambda\right\rangle)\) mimics the limiting behavior of the pre-limit memory state (1.1).

Now, we can further compute that

\[\frac{d}{dt}\left[\frac{1}{2}\int_{\mathcal{X}}(g_{t}(\varsigma( \tilde{\mathsf{H}}))-\tilde{\mathsf{y}})^{2}\,\mu(d\tilde{\mathsf{H}})\right] =\int_{\mathcal{X}}\left[(g_{t}(\varsigma(\tilde{\mathsf{H}}))- \tilde{\mathsf{y}})\frac{dg_{t}(\varsigma(\tilde{\mathsf{H}}))}{dt}\right]\, \mu(d\tilde{\mathsf{H}})\] \[=-\alpha\int_{\mathcal{X}}\int_{\mathcal{X}}\mathcal{K}_{ \mathsf{x},\lambda}(\varsigma(\tilde{\mathsf{H}}),\mathsf{h})(g_{t}(\varsigma( \tilde{\mathsf{H}}))-\tilde{\mathsf{y}})(g_{t}(\varsigma(\mathsf{H}))-\mathsf{ y})\,\mu(d\mathsf{H})\,\mu(d\tilde{\mathsf{H}}) \tag{5.2}\]

For convenience we define the kernel on \(\mathcal{X}\):

\[\tilde{\mathcal{K}}(\tilde{\mathsf{H}},\mathsf{H}) =\mathcal{K}_{\mathsf{x},\lambda}(\varsigma(\tilde{\mathsf{H}}), \mathsf{h})\] \[=\left\langle\sigma(w^{\top}\mathsf{x}+\langle b^{\prime} \mathsf{h}(w^{\prime}),\,\lambda\rangle)[\varsigma(\tilde{\mathsf{H}})](w)+ c^{2}\sigma^{\prime}(w^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{h}(w^{ \prime}),\,\lambda\rangle)\nabla[\varsigma(\tilde{\mathsf{H}})](w),\,\lambda\right\rangle\] \[=\langle\sigma(w^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{h}(w^ {\prime}),\,\lambda\rangle)\sigma(w^{\top}\tilde{\mathsf{x}}+\langle b^{ \prime}\tilde{\mathsf{h}}(w^{\prime}),\,\lambda\rangle)\] \[\quad+c^{2}\sigma^{\prime}(w^{\top}\mathsf{x}+\langle b^{\prime} \mathsf{h}(w^{\prime}),\,\lambda\rangle)\sigma^{\prime}(w^{\top}\tilde{ \mathsf{x}}+\langle b^{\prime}\tilde{\mathsf{h}}(w^{\prime}),\,\lambda\rangle) \mathsf{x}^{\top}\tilde{\mathsf{x}},\,\lambda\rangle\]

We can now prove that the loss is monotonically decreasing during training.

**Proposition 5.1** (Minimisation of averaged square loss).: \[\frac{d}{dt}\left[\frac{1}{2}\int_{\mathcal{X}}(g_{t}(\varsigma(\tilde{\mathsf{ H}}))-\tilde{\mathsf{y}})^{2}\,\mu(d\tilde{\mathsf{H}})\right]\leq 0.\] (5.3)
Proof.: By straight forward computation, we have

\[\frac{d}{dt}\left[\frac{1}{2}\int_{\mathcal{X}}(g_{t}(\varsigma( \tilde{\mathsf{H}}))-\tilde{\mathsf{y}})^{2}\,\mu(d\tilde{\mathsf{H}})\right]\] \[=-\alpha\int_{\mathcal{X}}\int_{\mathcal{X}}\tilde{\mathcal{K}}( \tilde{\mathsf{H}},\mathsf{H})(g_{t}(\varsigma(\tilde{\mathsf{H}}))-\tilde{ \mathsf{y}})(g_{t}(\varsigma(\mathsf{H}))-\mathsf{y})\,\mu(d\mathsf{H})\,\mu(d \tilde{\mathsf{H}})\] \[=-\alpha\int_{\mathcal{X}}\int_{\mathcal{X}}\left[\langle\sigma(w ^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{h}(w^{\prime}),\,\lambda\rangle) \sigma(w^{\top}\tilde{\mathsf{x}}+\langle b^{\prime}\tilde{\mathsf{h}}(w^{ \prime}),\,\lambda\rangle),\,\lambda\rangle(g_{t}(\varsigma(\tilde{\mathsf{H }}))-\tilde{\mathsf{y}})(g_{t}(\varsigma(\mathsf{H}))-\mathsf{y})\right.\] \[\quad+\langle c^{2}\sigma^{\prime}(w^{\top}\mathsf{x}+\langle b^ {\prime}\mathsf{h}(w^{\prime}),\,\lambda\rangle)\sigma^{\prime}(w^{\top} \tilde{\mathsf{x}}+\langle b^{\prime}\tilde{\mathsf{h}}(w^{\prime}),\,\lambda \rangle)\mathsf{x}^{\top}\tilde{\mathsf{x}},\,\lambda\rangle(g_{t}(\varsigma (\tilde{\mathsf{H}}))-\tilde{\mathsf{y}})(g_{t}(\varsigma(\mathsf{H}))- \mathsf{y})\,\mu(d\mathsf{H})\,\mu(d\tilde{\mathsf{H}})\right]\] \[=-\alpha\Bigg{\langle}\left(\int_{\mathcal{X}}\sigma(w^{\top} \mathsf{x}+\langle b^{\prime}\mathsf{h}(w^{\prime}),\,\lambda\rangle)(g_{t}( \varsigma(\mathsf{H}))-\mathsf{y})\,\mu(d\mathsf{H})\right)^{2}+\] \[\qquad\qquad+c^{2}\left|\int_{\mathcal{X}}\sigma^{\prime}(w^{ \top}\mathsf{x}+\langle b^{\prime}\mathsf{h}(w^{\prime}),\,\lambda\rangle)(g_ {t}(\varsigma(\mathsf{H}))-\mathsf{y})\mathsf{x}\,\mu(d\mathsf{H})\right|^{2}, \,\lambda\Bigg{\rangle}\] \[\leq 0,\]

proving the claim. 

Therefore, the function \(t\mapsto\frac{1}{2}\int_{\mathcal{X}}(g_{t}(\varsigma(\tilde{\mathsf{H}}))- \tilde{\mathsf{y}})^{2}\,\mu(d\tilde{\mathsf{H}})\) is decreasing. This is a useful theoretical guarantee that emerges from the limit analysis. The pre-limit training algorithm (tBPPT) truncates the chain rule - see the algorithm (1) - and therefore it is not guaranteed that parameter updates are in a descent direction for the loss function. That is, in principle, the loss (for the long-run distribution of the data sequence) may actually increase when the parameters are updated. Proposition 5.1 proves that, as \(N,k\to\infty\), the RNN model will be updated in a descent direction for the loss function.

## 6 Technical Lemmas

The unimportant constants \(C,C_{T}>0\) may change from line to line, and we allow the constants \(C_{T}\) to depend on \(T\).

### A-priori control of the parameter increments

Proof of Lemma 2.8Assumption 2.3 on the activation functions \(\sigma\) implies for all \(k\in\mathbb{N}\)

\[\hat{S}^{i,N}_{k+1} =\sigma\left((W^{i}_{k})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B^{j }_{k}\hat{S}^{j,N}_{k}\right)\leq 1 \tag{6.1}\] \[\Delta\hat{S}^{i,N}_{k+1} =\sigma^{\prime}\left((W^{i}_{k})^{\top}X_{k}+\frac{1}{N}\sum_{j=1 }^{N}B^{j}_{k}\hat{S}^{i,N}_{k}\right)\leq C_{\sigma}, \tag{6.2}\]

where \((\hat{S}^{i,N}_{k})_{k\geq 0}\) and \((\Delta\hat{S}^{i,N}_{k})_{k\geq 1}\) are as specified in algorithm 1. Therefore, we have

\[\left|C^{i}_{k+1}-C^{i}_{k}\right|\leq\frac{\alpha}{N^{2-\beta}}\left|\hat{S}^ {i,N}_{k+1}\right|\left(|\psi^{N}(\hat{Y}^{N}_{k})|+|Y_{k}|\right)\leq\frac{ \alpha}{N^{2-\beta}}(2N^{\gamma}+C_{y})\leq\frac{C}{N^{2-\beta-\gamma}}, \tag{6.3}\]

so by a telescopic sum argument we have for all \(k\leq\lfloor NT\rfloor\)

\[\left|C^{i}_{k}-C^{i}_{0}\right|\leq\sum_{j=0}^{k-1}\left|C^{i}_{j+1}-C^{i}_{ j}\right|\leq\frac{CNT}{N^{2-\beta-\gamma}}=\frac{CT}{N^{1-\beta-\gamma}},\]
\[\left|C_{k}^{i}\right|\leq\left|C_{0}^{i}\right|+\left|C_{k}^{i}-C_{0}^{i} \right|\leq 1+\frac{CT}{N^{1-\beta-\gamma}}\leq C_{T}.\]

We may further conclude that

\[\left\|W_{k+1}^{i}-W_{k}^{i}\right\| \leq\frac{\alpha}{N^{2-\beta}}\left|C_{k}^{i}\right|\left[\left| \psi^{N}(\hat{Y}_{k}^{N})\right|+\left|Y_{k}\right|\right]\left|\Delta\hat{S}_ {k+1}^{i,N}\right|\leq\frac{\alpha C_{\sigma}C_{T}}{N^{2-\beta}}\left[2N^{ \gamma}+C_{y}\right]\leq\frac{C_{T}}{N^{2-\beta-\gamma}},\] \[\left|B_{k+1}^{i}-B_{k}^{i}\right| \leq\frac{\alpha}{N^{3-\beta}}\left(\left|\psi^{N}(\hat{Y}_{k}^{N })\right|+\left|Y_{k}\right|\right)\sum_{\ell=1}^{N}\left|C_{k}^{\ell}|| \Delta\hat{S}_{k+1}^{\ell,N}|\leq\frac{\alpha C_{\sigma}C_{T}}{N^{2-\beta}} \left[2N^{\gamma}+C_{y}\right]\leq\frac{C_{T}}{N^{2-\beta-\gamma}},\]

so by following the telescoping sum argument as above we conclude, as desired,

\[\left|C_{k}^{i}-C_{0}^{i}\right|+\left\|W_{k}^{i}-W_{0}^{i}\right\|+\left|B_{ k}^{i}-B_{0}^{i}\right|\leq\frac{C_{T}}{N^{1-\beta-\gamma}}.\]

Proof of Remark 2.9The proof of remark relies on the observation that

\[\left|C_{k+1}^{i}\right|-\left|C_{k}^{i}\right|\leq\left|C_{k+1}^{i}-C_{k}^{i }\right|\leq\frac{\alpha}{N^{2-\beta}}\left|S_{k+1}^{i}\right|\left(\left|\hat {Y}_{k}^{N}\right|+\left|Y_{k}\right|\right)\leq\frac{\alpha C_{\sigma}C_{y}}{ N^{2-\beta}}+\frac{\alpha C_{\sigma}^{2}}{N^{2}}\sum_{i=1}^{N}|C_{k}^{i}|, \tag{6.4}\]

so by letting \(\bar{C}_{k}:=\frac{\sum_{i=1}^{N}\left|C_{k}^{i}\right|}{N}\), one has

\[\bar{C}_{k+1}-\bar{C}_{k}\leq\frac{\alpha C_{\sigma}C_{y}}{N^{2-\beta}}+\frac {\alpha C_{\sigma}^{2}}{N}\bar{C}_{k}\implies\bar{C}_{k+1}\leq\left(1+\frac{ \alpha C_{\sigma}^{2}}{N}\right)\bar{C}_{k}+\frac{\alpha C_{\sigma}C_{y}}{N^{ 2-\beta}},\]

and by Lemma A.1, for all \(k\leq\left\lfloor NT\right\rfloor\), one has

\[\bar{C}_{k}\leq\left(1+\frac{\alpha C_{\sigma}^{2}}{N}\right)^{\left\lfloor TN \right\rfloor}\left(1+\frac{\alpha C_{\sigma}C_{y}/N^{2-\beta}}{\alpha C_{ \sigma}^{2}/N}\right)\leq C\exp(\alpha C_{\sigma}^{2}T)=:C_{T}.\]

One can that make use of equation (6.4) to conclude that

\[\left|C_{k+1}^{i}-C_{k}^{i}\right|\leq\frac{\alpha C_{\sigma}C_{y}}{N^{2- \beta}}+\frac{\alpha C_{\sigma}\bar{C}_{k}}{N}\leq\frac{C_{T}}{N},\]

and that \(\left|C_{k}^{i}\right|\leq NTC_{T}/N=C_{T}\) is bounded whenever \(k\leq\left\lfloor NT\right\rfloor\) by a telescoping sum arguments. This enables us to show further that

\[\left\|W_{k+1}^{i}-W_{k}^{i}\right\| \leq\frac{\alpha}{N^{2-\beta}}\left|C_{k}^{i}\right|\left[\left| \hat{Y}_{k}^{N}\right|+\left|Y_{k}\right|\right]\left|\Delta\hat{S}_{k+1}^{i,N}\right|\] \[\leq\frac{\alpha C_{\sigma}\left|C_{k}^{i}\right|}{N^{2-\beta}} \left[\left|Y_{k}\right|+\frac{1}{N^{\beta}}\sum_{\bullet=1}^{N}\left|C_{k}^{ \bullet}\right|\right]\] \[\leq\frac{C_{T}}{N^{2-\beta}}\left[\left|C_{y}\right|+C_{T}N^{1- \beta}\right]\leq\frac{C_{T}}{N},\] \[\left|B_{k+1}^{i}-B_{k}^{i}\right| \leq\frac{\alpha}{N^{3-\beta}}\left(\left|\hat{Y}_{k}^{N}\right| +\left|Y_{k}\right|\right)\sum_{\ell=1}^{N}\left|C_{k}^{\ell}||\Delta\hat{S}_{k+ 1}^{\ell,N}|\] \[\leq\frac{\alpha C_{\sigma}}{N^{3-\beta}}\left(C_{y}+\frac{1}{N^{ \beta}}\sum_{\bullet=1}^{N}\left|C_{k}^{\bullet}\right|\hat{S}_{k+1}^{\bullet,N }\right|\right)\left(\sum_{\ell=1}^{N}\left|C_{k}^{\ell}\right|\right)\] \[=\frac{\alpha C_{\sigma}}{N^{3-\beta}}\left(C_{y}+N^{1-\beta}C_{ \sigma}C_{T}\right)NC_{T}\leq\frac{C_{T}}{N}.\]
### Proof of Lemma 3.2

\[\left\|F(x,z,y,h,\epsilon,\eta)-F(\tilde{x},\tilde{z},\tilde{y}, \tilde{h},\epsilon,\eta)\right\|_{\mathcal{X}}^{2}\] \[=|g(x,z)-g(\tilde{x},\tilde{z})|^{2}+|f(x,z)-f(\tilde{x},\tilde{z} )|^{2}+\left\|[\varsigma(x,z,y,h)](w)-[\varsigma(\tilde{x},\tilde{z},\tilde{y},\tilde{h})](w)\right\|_{H^{1}(\lambda)}^{2}\] \[\leq L^{2}\left(|x-\tilde{x}|^{2}+|z-\tilde{z}|^{2}\right)+ \left\|[\varsigma(x,z,y,h)](w)-[\varsigma(\tilde{x},\tilde{z},\tilde{y}, \tilde{h})](w)\right\|_{H^{1}(\lambda)}^{2}\]

Note

\[\left|[\varsigma(x,z,y,h)](w)-[\varsigma(\tilde{x},\tilde{z}, \tilde{y},\tilde{h})](w)\right|\] \[=\left|\sigma(w^{\top}x+\langle b^{\prime}h(w^{\prime}),\lambda \rangle)-\sigma(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^{\prime}), \lambda\rangle)\right|\] \[\leq C_{\sigma}\left|w^{\top}(x-\tilde{x})+\langle b^{\prime}(h( w^{\prime})-\tilde{h}(w^{\prime}),\lambda\rangle\right|\] \[\leq C_{\sigma}\left(|w|\,|x-\tilde{x}|+\int_{\mathbb{R}^{d}} \left|h(w^{\prime})-\tilde{h}(w^{\prime})\right|\,\lambda(dw^{\prime})\right)\] \[\leq C_{\sigma}\left(|w|\,|x-\tilde{x}|+\|h-\tilde{h}\|_{H^{1}( \lambda)}\right).\] \[\implies\left|\sigma(w^{\top}x+\langle b^{\prime}h(w^{\prime}), \lambda\rangle)-\sigma(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^{ \prime}),\lambda\rangle)\right|^{2}\] \[\leq 2C_{\sigma}^{2}\left(|w|^{2}\,|x-\tilde{x}|^{2}+\|h-\tilde{h} \|_{H^{1}(\lambda)}^{2}\right).\]

Moreover,

\[\left|\nabla[\varsigma(x,z,y,h)](w)-[\nabla\varsigma(\tilde{x}, \tilde{z},\tilde{y},\tilde{h})](w)\right|\] \[=\left|\nabla\sigma(w^{\top}x+\langle b^{\prime}h(w^{\prime}), \lambda\rangle)-\nabla\sigma(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^ {\prime}),\lambda\rangle)\right|\] \[=\left|\sigma^{\prime}(w^{\top}x+\langle b^{\prime}h(w^{\prime}), \lambda\rangle)x-\sigma^{\prime}(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h }(w^{\prime}),\lambda\rangle)\tilde{x}\right|\] \[\leq\left|\sigma^{\prime}(w^{\top}x+\langle b^{\prime}h(w^{ \prime}),\lambda\rangle)-\sigma^{\prime}(w^{\top}\tilde{x}+\langle b^{\prime} \tilde{h}(w^{\prime}),\lambda\rangle)\right|\left|x\right|+\left|\sigma^{ \prime}(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^{\prime}),\lambda \rangle)\tilde{x}\right|\left|x-\tilde{x}\right|\] \[\leq C_{\sigma}\left|w^{\top}(x-\tilde{x})+\langle b^{\prime}(h( w^{\prime})-\tilde{h}(w^{\prime}),\lambda\rangle\right|+C_{\sigma}\left|x- \tilde{x}\right|\] \[\leq C_{\sigma}\left(|w|\,|x-\tilde{x}|+\|h-\tilde{h}\|_{H^{1}( \lambda)}\right)+C_{\sigma}\left|x-\tilde{x}\right|.\] \[\implies \left|\nabla\sigma(w^{\top}x+\langle b^{\prime}h(w^{\prime}), \lambda\rangle)-\nabla\sigma(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^ {\prime}),\lambda\rangle)\right|^{2}\] \[\leq 3C_{\sigma}^{2}\left((1+|w|^{2})|x-\tilde{x}|^{2}+\|h-\tilde{h} \|^{2}\right),\]

so, using Assumptions 2.1 and 2.5 we have the bound

\[\left\|[\varsigma(x,z,y,h)]-[\varsigma(\tilde{x},\tilde{z},\tilde{y },\tilde{h})]\right\|_{H^{1}(\lambda)}^{2} =\left\|\sigma(w^{\top}x+\langle b^{\prime}h(w^{\prime}),\lambda \rangle)-\sigma(w^{\top}\tilde{x}+\langle b^{\prime}\tilde{h}(w^{\prime}), \lambda\rangle)\right\|_{H^{1}(\lambda)}^{2}\] \[\leq C_{\sigma}^{2}|x-\tilde{x}|^{2}\int_{\mathbb{R}^{d}}(5|w|^{ 2}+3)\,\lambda(dw)+5C_{\sigma}^{2}\left\|h-\tilde{h}\right\|_{H^{1}(\lambda)}^ {2}\] \[\leq 8C_{\sigma}^{2}\left|x-\tilde{x}\right|^{2}+5C_{\sigma}^{2} \left\|h-\tilde{h}\right\|_{H^{1}(\lambda)}^{2}, \tag{6.5}\]
and

\[\left\|F(x,z,y,h,\epsilon,\eta)-F(\tilde{x},\tilde{z},\tilde{y},\tilde{h},\epsilon,\eta)\right\|_{\mathcal{X}}^{2}\leq(L^{2}+8C_{\sigma}^{2})\left(|x-\tilde{x}|^ {2}+|z-\tilde{z}|^{2}+|y-\tilde{y}|^{2}+\left\|h-\tilde{h}\right\|^{2}\right)\]

By Assumption 2.3 we have that the Lipschitz constant is bounded by

\[q_{0}^{2}:=L^{2}+8C_{\sigma}^{2}<1,\]

and that \(F(\cdot,\epsilon,\eta)\) is a continuous contraction for any realisations of \(\epsilon\) and \(\eta\).

### Analysis of the auxiliary processes (proof of proposition 3.8)

Preliminary bounds for the auxiliary processesLet us begin by establishing some preliminary bounds for \(h_{k}(w)\), \(h_{k}^{N}(w)\) and \(v_{k}^{N}(w)\).

**Lemma 6.1**.: _All of the \(h_{k}(w)\), \(h_{k}^{N}(w)\) and \(v_{k}^{N}(w)\) are elements in \(\mathcal{H}\). As a result, the following holds:_

\[\sup_{w}|h_{k}(w)|\vee\sup_{w}|h_{k}^{N}(w)|\vee\sup_{w}|v_{k}^{N }(w)| \leq 1, \tag{6.6}\] \[\sup_{w}|\nabla h(w)|\vee\sup_{w}|\nabla h_{k}^{N}(w)|\vee\sup_{ w}|\nabla v_{k}^{N}(w)| \leq C_{\sigma}<1,\] (6.7) \[\max_{i,j}\sup_{w}\left[|\partial_{ij}h_{k}(w)|\vee|\partial_{ij }h_{k}^{N}(w)|\vee|\partial_{ij}v_{k}^{N}(w)|\right] \leq C_{\sigma}<1.\]

Proof.: To see this, we record the following recursive formula for the gradients of the above random sequences of functions for our convenience:

\[\nabla v_{k+1}^{N}(w) =\sigma^{\prime}\left(w^{\top}X_{k}+\frac{1}{N}\sum_{i=1}^{N}B_{ k}^{i}v_{k}^{N}(W_{k-1}^{i})\right)X_{k},\quad\nabla v_{0}^{N}(w)\equiv 0,\] \[\nabla h_{k+1}^{N}(w) =\sigma^{\prime}(w^{\top}X_{k}+\langle b^{\prime}h_{k}^{N}(w^{ \prime}),\lambda^{N}\rangle)X_{k},\quad\nabla h_{0}^{N}(w)\equiv 0,\] \[\nabla h_{k+1}(w) =\sigma^{\prime}(w^{\top}X_{k}+\langle b^{\prime}h_{k}(w^{ \prime}),\lambda\rangle)X_{k},\quad\nabla h_{0}(w)\equiv 0.\]

We further note that

\[\left|\frac{1}{N}\sum_{i=1}^{N}B_{k}^{i}v_{k}^{N}(W_{k-1}^{i}) \right|\leq\frac{1}{N}\sum_{i=1}^{N}\left|B_{k}^{i}\right|\left|v_{k}^{N}(W_{ k}^{i})\right|\leq C_{T},\]

where \(C_{T}\) depends on the size of the increments as derived in Lemma 2.8. Similarly, we have

\[\left|\langle b^{\prime}h_{k}^{N}(w^{\prime}),\lambda^{N}\rangle \right| =\left|\frac{1}{N}\sum_{i=1}^{N}B^{i}h_{k}^{N}(W^{i})\right|\leq \frac{1}{N}\sum_{i=1}^{N}\left|B^{i}\right|\left|h_{k}^{N}(W^{i})\right|\leq 1, \tag{6.8}\] \[\left|\langle b^{\prime}h_{k}(w^{\prime}),\lambda\rangle\right| =\left|\int_{\mathbb{R}\times\mathbb{R}^{d}}b^{\prime}h_{k}(w^{ \prime})\,\lambda(db^{\prime},dw^{\prime})\right|\leq\int_{\mathbb{R}\times \mathbb{R}^{d}}\left|b^{\prime}\right|\left|h_{k}(w^{\prime})\right|\,\lambda (db^{\prime},dw^{\prime})\leq 1.\]

So we know that for finite \(k,N\), all of the \(h_{k}(w)\), \(h_{k}^{N}(w)\) and \(v_{k}^{N}(w)\) are elements of \(H^{1}(\lambda)\). 

Bounds for the differences between the auxiliary processesRecall that

\[\Gamma_{k}^{N}(w)=v_{k}^{N}(w)-h_{k}(w)=\Gamma_{k}^{N,1}(w)+\Gamma_{k}^{N,2}( w),\]

where

\[\Gamma_{k}^{N,1}(w)=h_{k}^{N}(w)-h_{k}(w), \tag{6.9}\] \[\Gamma_{k}^{N,2}(w)=v_{k}^{N}(w)-h_{k}^{N}(w).\]
Since the activation function is regular, we know that

\[\left|\Gamma_{k}^{N,1}(w)\right|^{2}+\left|\nabla\Gamma_{k}^{N,1}(w)\right|^{2} \leq\left|\sigma(w^{\top}X_{k}+\left\langle b^{\prime}h_{k}^{N}, \lambda^{N}\right\rangle)-\sigma(w^{\top}X_{k}+\left\langle b^{\prime}h_{k}, \lambda\right\rangle)\right|^{2}\] \[\quad+\left|\sigma^{\prime}(w^{\top}X_{k}+\left\langle b^{\prime }h_{k}^{N},\lambda^{N}\right\rangle)-\sigma^{\prime}(w^{\top}X_{k}+\left\langle b ^{\prime}h_{k},\lambda\right\rangle)\right|^{2}|X_{k}|^{2}\] \[\leq(1+|X_{k}|^{2})C_{\sigma}^{2}\left(\left\langle b^{\prime}h_ {k}^{N}(w^{\prime}),\lambda^{N}\right\rangle-\left\langle b^{\prime}h_{k}(w^{ \prime}),\lambda\right\rangle\right)^{2}\] \[\leq 2C_{\sigma}^{2}\left(E_{k}^{N,1}\right)^{2},\]

where

\[E_{k}^{N,1}:=\left\langle b^{\prime}h_{k}^{N}(w^{\prime}),\lambda^{N}\right\rangle -\left\langle b^{\prime}h_{k}(w^{\prime}),\lambda\right\rangle.\]

Similarly,

\[\left|\Gamma_{k}^{N,2}(w)\right|^{2}+\left|\nabla\Gamma_{k}^{N,2}(w)\right|^{ 2}\leq 2C_{\sigma}^{2}\left(E_{k}^{N,2}\right)^{2},\]

where for \(k\geq 1\) we define

\[E_{k}^{N,2}=\frac{1}{N}\sum_{i=1}^{N}B_{k}^{i}v_{k}^{N}(W_{k-1}^{i})-\left\langle b ^{\prime}h_{k}^{N}(w^{\prime}),\lambda^{N}\right\rangle,\]

and \(E_{0}^{N,2}=0\)2. Finally, we have that

Footnote 2: We note that when \(k=0\) then \(v_{k}^{N}(w)=h_{k}^{N}(w)\equiv 0\), so the value of \(E_{0}^{N,2}=0\) regardless of what value we set for \(W_{-1}^{i}\).

\[\left|\Gamma_{k}^{N}(w)\right|^{2}+\left|\nabla\Gamma_{k}^{N}(w)\right|^{2} \leq 2C_{\sigma}^{2}\left(E_{k}^{N,1}+E_{k}^{N,2}\right)^{2}\leq 4C_{ \sigma}^{2}\left(\left(E_{k}^{N,1}\right)^{2}+\left(E_{k}^{N,2}\right)^{2} \right).\]

This yields the following lemma

**Lemma 6.2**.: _For all \(k\geq 0\),_

\[\mathbb{E}\left\|\Gamma_{k}^{N,1}(w)\right\|_{H^{1}(\lambda)}^{2} \vee\max_{i}\mathbb{E}\left[\Gamma_{k}^{N,1}(W^{i})\right]^{2} \leq 2C_{\sigma}^{2}\mathbb{E}\left[E_{k}^{N,1}\right]^{2} \tag{6.10}\] \[\mathbb{E}\left\|\Gamma_{k}^{N,2}(w)\right\|_{H^{1}(\lambda)}^{2} \vee\max_{i}\mathbb{E}\left[\Gamma_{k}^{N,2}(W^{i})\right]^{2} \leq 2C_{\sigma}^{2}\mathbb{E}\left[E_{k}^{N,2}\right]^{2}\] (6.11) \[\mathbb{E}\left\|\Gamma_{k}^{N}(w)\right\|_{H^{1}(\lambda)}^{2} \vee\max_{i}\mathbb{E}\left[\Gamma_{k}^{N}(W^{i})\right]^{2} \leq 4C_{\sigma}^{2}\left(\mathbb{E}\left[E_{k}^{N,1}\right]^{2}+ \mathbb{E}\left[E_{k}^{N,2}\right]^{2}\right) \tag{6.12}\]

_where \(a\lor b=\max(a,b)\)._

Proof.: The proof for (6.10)-(6.12) are similar, so we will only prove (6.10) here. To that end, we note that the bound \(E_{k}^{N,1}\) is uniform in \(w\), so for all \(i\),

\[\mathbb{E}\left[\Gamma_{k}^{1,N}(W_{0}^{i})\right]^{2}\leq 2C_{\sigma}^{2} \mathbb{E}\left[E_{k}^{N,1}\right]^{2}.\]

Moreover,

\[\mathbb{E}\left\|\Gamma_{k}^{N,1}(w)\right\|_{H^{1}(\lambda)}^{2} =\mathbb{E}\left[\int_{\mathbb{R}^{d}}\left[\left(\Gamma_{k}^{N, 1}(w)\right)^{2}+\left(\nabla\Gamma_{k}^{N,1}(w)\right)^{2}\right]\,\lambda( dw)\right]\leq 2C_{\sigma}^{2}\mathbb{E}\left[\int_{\mathbb{R}^{d}}\left(E_{k} ^{N,1}\right)^{2}\,\lambda(dw)\right]\] \[=2C_{\sigma}^{2}\mathbb{E}\left[E_{k}^{N,1}\right]^{2}.\]

This completes the proof. 

It remains for us to control \(\mathbb{E}\left[E_{k}^{N,1}\right]^{2}\) and \(\mathbb{E}\left[E_{k}^{N,2}\right]^{2}\).
**Lemma 6.3**.: _For all \(k\geq 0\),_

\[\mathbb{E}\left[E_{k}^{N,1}\right]^{2}\leq\frac{C}{N},\]

_for an unimportant constant \(C<\infty\)._

Proof.: This is trivial for \(k=0\) since \(h_{0}^{N}(w)=h_{0}(w)\equiv 0\), so \(E_{0}^{N,1}=0\). For general \(k\), we note by Young's inequality that

\[\left(E_{k}^{N,1}\right)^{2} =\left(\langle b^{\prime}(h_{k}^{N}(w^{\prime})-h_{k}(w^{\prime}) ),\lambda\rangle+\langle b^{\prime}h_{k}^{N}(w^{\prime}),\lambda^{N}-\lambda \rangle\right)^{2}\] \[\leq 2\left(\langle b^{\prime}(h_{k}^{N}(w^{\prime})-h_{k}(w^{ \prime})),\lambda\rangle\right)^{2}+2\left(\langle b^{\prime}h_{k}^{N}(w^{ \prime}),\lambda^{N}-\lambda\rangle\right)^{2}.\]

Now note that

\[\mathbb{E}\left(\langle b^{\prime}h_{k}^{N}(w^{\prime}),\lambda^ {N}-\lambda\rangle^{2}\right) =\mathbb{E}\left[\mathbb{E}\left[\langle b^{\prime}h_{k}^{N}(w^{ \prime}),\lambda^{N}-\lambda\rangle^{2}\,\mid\,h_{k}^{N}\right]\right]\] \[=\mathbb{E}\left[\mathbb{E}\left[\left(\frac{1}{N}\sum_{i=1}^{N} \left(B^{i}h_{k}^{N}(W^{i})-\int_{\mathbb{R}^{1+d}}b^{\prime}h_{k}^{N}(w^{ \prime})\,\lambda(db^{\prime}\,dw^{\prime})\right)\right)^{2}\,\mid\,h_{k}^{N }\right]\right].\]

Since \(B^{i}h_{k}^{N}(W^{i})\,\mid\,h_{k}^{N}\) is conditionally mutually iid for \(i=1,\cdots,N\),

\[\mathbb{E}\left(\langle b^{\prime}h_{k}^{N}(w^{\prime}),\lambda^ {N}-\lambda\rangle\right)^{2} =\frac{1}{N}\mathbb{E}\left[\mathbb{E}\left[\left(B^{1}h_{k}^{N} (W^{1})-\int_{\mathbb{R}^{1+d}}b^{\prime}h_{k}^{N}(w^{\prime})\,\lambda(db^{ \prime}\,dw^{\prime})\right)^{2}\,\mid\,h_{k}^{N}\right]\right]\] \[=\frac{1}{N}\mathbb{E}\left[\mathbb{E}\left[\left(B^{1}h_{k}^{N} (W^{1})\right)^{2}\,\mid\,h_{k}^{N}\right]-\left(\int_{\mathbb{R}^{1+d}}b^{ \prime}h_{k}^{N}(w^{\prime})\,\lambda(db^{\prime}\,dw^{\prime})\right)^{2}\right]\] \[\leq\frac{1}{N}\mathbb{E}\left[\mathbb{E}\left[\left(B^{1}h_{k}^{ N}(W^{1})\right)^{2}\,\mid\,h_{k}^{N}\right]\right]+\frac{1}{N}\mathbb{E}\left(\int_{ \mathbb{R}^{1+d}}b^{\prime}h_{k}^{N}(w^{\prime})\,\lambda(db^{\prime}\,dw^{ \prime})\right)^{2}\] \[\leq\frac{1}{N}\mathbb{E}\left[\left(B^{1}h_{k}^{N}(W^{1})\right) ^{2}\right]+\frac{1}{N}\mathbb{E}\left(\int_{\mathbb{R}^{1+d}}b^{\prime}h_{k} ^{N}(w^{\prime})\,\lambda(db^{\prime}\,dw^{\prime})\right)^{2}\] \[\leq\frac{C}{N},\]

for an unimportant constant \(C<\infty\). In addition, we have

\[\mathbb{E}\left(\langle b^{\prime}(h_{k}^{N}(w^{\prime})-h_{k}(w ^{\prime})),\lambda\rangle\right)^{2} \leq\int_{\mathbb{R}^{1+d}}(b^{\prime})^{2}\,\lambda(db^{\prime} \,dw^{\prime})\mathbb{E}\int_{\mathbb{R}^{1+d}}|h_{k}^{N}(w^{\prime})-h_{k}(w ^{\prime})|^{2}\,\lambda(db^{\prime}\,dw^{\prime})\] \[\leq\mathbb{E}\int_{\mathbb{R}^{1+d}}\left(\sigma(w^{\top}X_{k-1} +\langle b^{\prime\prime}h_{k-1}(w^{\prime\prime}),\lambda\rangle)\right)^{2} \lambda(db^{\prime}\,dw^{\prime})\] \[\leq\mathbb{E}\int_{\mathbb{R}^{1+d}}C_{\sigma}^{2}\left(E_{k-1} ^{N,1}\right)^{2}\,\lambda(db^{\prime}\,dw^{\prime})=C_{\sigma}^{2}\mathbb{E} \left(E_{k-1}^{N,1}\right)^{2}.\]

Therefore, we have

\[\mathbb{E}\left(E_{k}^{N,1}\right)^{2}\leq\frac{2C}{N}+2C_{\sigma}^{2}\mathbb{E }\left(E_{k-1}^{N,1}\right)^{2}. \tag{6.13}\]

By lemma A.1, for all \(k\geq 0\) we have

\[\mathbb{E}\left(E_{k}^{N,1}\right)^{2}\leq\frac{2C}{N(1-2C_{\sigma}^{2})}= \frac{C}{N},\]

noting that \(2C_{\sigma}^{2}<1\). The unimportant constant \(C\) changes from line to line. This completes the proof.
Similarly,

**Lemma 6.4**.: _For all \(k\leq\lfloor NT\rfloor\),_

\[\mathbb{E}\left(E_{k}^{N,2}\right)^{2}\leq\frac{C_{T}}{N^{2-2\beta-2\gamma}}.\]

Proof.: Again, we have \(v_{0}^{N}(w)=h_{k}^{N}(w)\equiv 0\) so \(E_{0}^{N,2}=0\). For general \(k\), we conclude by Young's inequality:

\[\left(E_{k}^{N,2}\right)^{2} =\left(\left\langle b^{\prime}(v_{k}^{N}(w^{\prime})-h_{k}^{N}(w^ {\prime})),\lambda^{N}\right\rangle+\frac{1}{N}\sum_{i=1}^{N}\left(B_{k}^{i}v_ {k}^{N}(W_{k-1}^{i})-B_{0}^{i}v_{k}^{N}(W_{0}^{i})\right)\right)^{2}\] \[\leq 2\left(\left\langle b^{\prime}(v_{k}^{N}(w^{\prime})-h_{k}^{ N}(w^{\prime})),\lambda^{N}\right\rangle\right)^{2}+2\left(\frac{1}{N}\sum_{i=1}^{N} \left(B_{k}^{i}v_{k}^{N}(W_{k-1}^{i})-B_{0}^{i}v_{k}^{N}(W_{0}^{i})\right) \right)^{2}\] \[\leq 2\left(\left\langle b^{\prime}(v_{k}^{N}(w^{\prime})-h_{k}^{ N}(w^{\prime})),\lambda^{N}\right\rangle\right)^{2}+\frac{2}{N}\sum_{i=1}^{N} \left(B_{k}^{i}v_{k}^{N}(W_{k-1}^{i})-B_{0}^{i}v_{k}^{N}(W_{0}^{i})\right)^{2}\]

We first analyse the second term, and we emphasise that this term vanishes at \(k=0\) as \(v_{0}^{N}\) is defined to be zero. For \(k\geq 1\), we have

\[\left|B_{0}^{i}v_{k}^{N}(W_{0}^{i})-B_{k}^{i}v_{k}^{N}(W_{k-1}^{i })\right| =\left|B_{0}^{i}(v_{k}^{N}(W_{0}^{i})-v_{k}^{N}(W_{k-1}^{i}))-v_{k }^{N}(W_{k-1}^{i})(B_{0}^{i}-B_{k}^{i})\right|\] \[\leq\left(\left|B_{0}^{i}\right|\left|v_{k}^{N}(W_{0}^{i})-v_{k}^ {N}(W_{k-1}^{i})\right|+\left|v_{k}^{N}(W_{k-1}^{i})\right|\left|(B_{0}^{i}-B_ {k}^{i})\right|\right)\] \[\leq\left(C_{\sigma}\left|B_{0}^{i}\right|\left|X_{k-1}^{\top}(W_ {0}^{i}-W_{k-1}^{i})\right|+\left|(B_{0}^{i}-B_{k}^{i})\right|\right)\] \[\leq\left(C_{\sigma}\left|W_{0}^{i}-W_{k-1}^{i}\right|+\left|B_{0 }^{i}-B_{k}^{i}\right|\right),\] \[\implies\mathbb{E}\left|B_{0}^{i}v_{k}^{N}(W^{i})-B_{k}^{i}v_{k}^ {N}(W_{k-1}^{i})\right|^{2} \leq 2\mathbb{E}\left(C_{\sigma}^{2}\left|W_{0}^{i}-W_{k-1}^{i} \right|^{2}+\left|B_{0}^{i}-B_{k}^{i}\right|^{2}\right)\] \[\leq\frac{C_{T}}{N^{2-2\beta-2\gamma}},\]

where in the last inequality, we used Lemma 2.8. In addition, for \(k\geq 1\) we have

\[\left\langle b^{\prime}(v_{k}^{N}(w^{\prime})-h_{k}^{N}(w^{\prime })),\lambda^{N}\right\rangle \leq\frac{1}{N}\sum_{i=1}^{N}\left|B^{i}\right|\left|v_{k}^{N}(W^ {i})-h_{k}^{N}(W^{i})\right|\] \[\leq\frac{C_{\sigma}}{N}\sum_{i=1}^{N}\left|\frac{1}{N}\sum_{j=1 }^{N}B_{k-1}^{j}v_{k-1}^{N}(W_{k-2}^{j})-\left\langle b^{\prime}h_{k-1}^{N}(w ^{\prime}),\lambda^{N}\right\rangle\right|\] \[=C_{\sigma}\left|E_{k-1}^{N,2}\right|\]

Therefore, we have

\[\mathbb{E}\left(E_{k}^{N,2}\right)^{2}\leq\frac{2C_{T}}{N^{2-2\beta-2\gamma}}+ 2C_{\sigma}^{2}\mathbb{E}\left(E_{k-1}^{N,2}\right)^{2}. \tag{6.14}\]

By Lemma A.1, for all \(k\geq 0\) we have

\[\mathbb{E}\left(E_{k}^{N,2}\right)^{2}\leq\frac{2C_{T}}{N^{2-2\beta-2\gamma}( 1-2C_{\sigma}^{2})}=\frac{C_{T}}{N^{2-2\beta-2\gamma}},\]

noting that \(2C_{\sigma}^{2}<1\). 

Proof.: (Proof of proposition 3.8) Lemma 6.2 and 6.3 imply that for any \(k\geq 0\), there is a constant \(C>0\) such that

\[\mathbb{E}\left\|\Gamma_{k}^{N,1}(w)\right\|_{H^{1}(\lambda)}^{2}\vee\max_{i} \mathbb{E}\left[\Gamma_{k}^{N,1}(W^{i})\right]^{2}\leq\frac{C}{N},\]
Similarly, lemma 6.2 and 6.4 imply that for all \(k\leq\lfloor NT\rfloor\), there is another constant \(C_{T}>0\), depending on \(T\), such that

\[\mathbb{E}\left\|\Gamma_{k}^{N,2}(w)\right\|_{H^{1}(\lambda)}^{2}\vee\max_{i} \mathbb{E}\left[\Gamma_{k}^{N,2}(W^{i})\right]^{2}\leq\frac{C_{T}}{N^{2-2\beta -2\gamma}}.\]

This completes the proof. 

### Proof of Pre-Limit Evolution (Lemma 4.1)

We expand \(h(W_{k+1}^{i})-h(W_{k}^{i})\) using Taylor series as followed:

\[h(W_{k+1}^{i})-h(W_{k}^{i}) =\nabla h(W_{k}^{i,*})^{\top}(W_{k+1}^{i}-W_{k}^{i})\] \[=\nabla h(W_{k}^{i})^{\top}(W_{k+1}^{i}-W_{k}^{i})+(W_{k+1}^{i}-W _{k}^{i})^{\top}\mathsf{Hess}\,h(W_{k}^{i,**})(W_{k+1}^{i}-W_{k}^{i}),\]

where \(W_{k}^{i,*},W_{k}^{i,**}\) are points in the line segment connecting the points \(W_{k}^{i}\) and \(W_{k+1}^{i}\). The following remainder terms in the Taylor's expansion is small by Lemma 2.8 (specifically by (6.3)):

\[\left|(C_{k+1}^{i}-C_{k}^{i})\nabla h(W_{k}^{i,*})^{\top}(W_{k+1}^ {i}-W_{k}^{i})\right| \leq\frac{C_{T}}{N^{4-2\beta-2\gamma}} \tag{6.15}\] \[\left|C_{k}^{i}(W_{k+1}^{i}-W_{k}^{i})\mathsf{Hess}\,h(W_{k}^{i,* })(W_{k+1}^{i}-W_{k}^{i})\right| \leq C_{T}(Cd^{2})\left|W_{k+1}^{i}-W_{k}^{i}\right|^{2}\leq \frac{C_{T}}{N^{4-2\beta-2\gamma}},\]

noting that the derivatives of \(h\) are bounded. From this, we obtain the following evolution equation

\[\triangle g_{k}^{N}(h) =g_{k+1}^{N}(h)-g_{k}^{N}(h)\] \[=\frac{1}{N^{\beta}}\sum_{i=1}^{N}(C_{k+1}^{i}h(W_{k+1}^{i})-C_{k }^{i}h(W_{k}^{i}))\] \[=\frac{1}{N^{\beta}}\sum_{i=1}^{N}[(C_{k+1}^{i}-C_{k}^{i})h(W_{k} ^{i})+C_{k}^{i}(h(W_{k+1}^{i})-h(W_{k}^{i}))+(C_{k+1}^{i}-C_{k}^{i})(h(W_{k+1} ^{i})-h(W_{k}^{i}))]\] \[=\frac{1}{N^{\beta}}\sum_{i=1}^{N}[(C_{k+1}^{i}-C_{k}^{i})h(W_{k} ^{i})+C_{k}^{i}\nabla h(W_{k}^{i})(W_{k+1}^{i}-W_{k}^{i})+C_{k}^{i}(W_{k+1}^{i }-W_{k}^{i})\mathsf{Hess}\,h(W_{k}^{i,**})(W_{k+1}^{i}-W_{k}^{i})\] \[\quad+(C_{k+1}^{i}-C_{k}^{i})\nabla h(W_{k}^{i,*})^{\top}(W_{k+1 }^{i}-W_{k}^{i})].\]

Notice that with the specific choice of the learning rate \(\alpha^{N}=\frac{\alpha}{N^{2-2\beta}}\) by (2.3) we get after training is taken into account

\[\frac{1}{N^{\beta}}\sum_{i=1}^{N}[(C_{k+1}^{i}-C_{k}^{i})h(W_{k} ^{i})+C_{k}^{i}\nabla h(W_{k}^{i})^{\top}(W_{k+1}^{i}-W_{k}^{i})]\] \[=-\frac{\alpha}{N^{2}}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k})\sum_{i=1} ^{N}\left[\hat{S}_{k+1}^{i}h(W_{k}^{i})+C_{k}^{i}\Delta\hat{S}_{k+1}^{i,N} \nabla h(W_{k}^{i})^{\top}X_{k}\right]=\delta^{(1)}g_{k}^{N}(h).\]

Therefore, for all \(k\leq\lfloor NT\rfloor\),

\[\left|\triangle g_{k}^{N}(h)-\delta^{(1)}g_{k}^{N}(h)\right|\] \[=\left|\frac{1}{N^{\beta}}\sum_{i=1}^{N}\left[C_{k}^{i}(W_{k+1}^ {i}-W_{k}^{i})\mathsf{Hess}\,h(W_{k}^{i,**})(W_{k+1}^{i}-W_{k}^{i})+(C_{k+1}^{i }-C_{k}^{i})\nabla h(W_{k}^{i,*})^{\top}(W_{k+1}^{i}-W_{k}^{i})\right]\right|\] \[\leq\frac{1}{N^{\beta}}\sum_{i=1}^{N}\left[\left|C_{k}^{i}(W_{k+1 }^{i}-W_{k}^{i})\mathsf{Hess}\,h(W_{k}^{i,**})(W_{k+1}^{i}-W_{k}^{i})\right|+ \left|(C_{k+1}^{i}-C_{k}^{i})\nabla h(W_{k}^{i,*})^{\top}(W_{k+1}^{i}-W_{k}^{i })\right|\right]\] \[\leq\frac{N}{N^{\beta}}\times\frac{C_{T}}{N^{4-2\beta-2\gamma} }=\frac{C_{T}}{N^{3-\beta-2\gamma}}.\]
It is important to note that \(3-\beta-2\gamma>2+1-\beta-2\gamma>2\), so \(\left|\triangle g_{k}^{N}(h)-\delta^{(1)}g_{k}^{N}(h)\right|=o(N^{-2})\) uniformly for \(k\leq\left\lfloor NT\right\rfloor\) and \(h\in\mathcal{H}\).

### Well-posedness of the limit ODE

The affine ODE on the dual space \((H^{1}(\lambda))^{*}\) (which is a Banach space) could be written as

\[\frac{d}{dt}g_{t}=\mathcal{A}(g_{t})+b,\quad g_{0}=0,\]

where \(\mathcal{A}\) is a linear operator from \((H^{1}(\lambda))^{*}\) to \((H^{1}(\lambda))^{*}\) as defined below,

\[\mathcal{A}:g\in(H^{1}(\lambda))^{*}\mapsto\left[\mathcal{A}(g):h\mapsto-\int_ {\mathcal{X}}g(\varsigma(\mathsf{H}))\mathcal{K}_{\varsigma,\lambda}(h, \mathsf{h})\,\mu(d\mathsf{H})\right];\]

and \(b\) is the following linear functional:

\[b:h\mapsto\int\mathsf{y}\mathcal{K}_{\varsigma,\lambda}(h,\mathsf{h})\,\mu(d \mathsf{H})\]

Therefore the ODE admits a unique solution if \(\mathcal{A}\) is bounded. In fact, for \(\mathsf{H}\in\mathcal{X}\), we have

\[\left|\mathcal{K}_{\varsigma,\lambda}(h,\mathsf{h})\right|\leq\int_{\mathbb{ R}^{d}}\left[\left|h(w)\right|+\left|\nabla h(w)\right|\right]\,\lambda(dw)\leq \left\|h\right\|_{H^{1}(\lambda)},\]

so

\[\left|[\mathcal{A}(g)](h)\right| \leq\int_{\mathcal{X}}\left|g(\mathsf{h})\right|\left|\mathcal{K }_{\varsigma,\lambda}(h,\mathsf{h})\right|\mu(d\mathsf{H})\] \[\leq\int_{\mathcal{X}}\left\|g\right\|_{(H^{1}(\lambda))^{*}} \left\|\varsigma(\mathsf{H})\right\|_{H^{1}(\lambda)}\left\|h\right\|_{H^{1}( \lambda)}\,\mu(d\mathsf{H})\] \[\leq\sqrt{1+C_{\sigma}^{2}}\left\|g\right\|_{(H^{1}(\lambda))^{*} }\left\|h\right\|_{H^{1}(\lambda)}, \tag{6.16}\]

thanks to the fact that any elements of \(\varsigma(\mathsf{H})\) is in \(\mathcal{H}\) so the control (3.5) holds. Therefore, we have

\[\left\|\mathcal{A}(g)\right\|_{(H^{1}(\lambda))^{*}}\leq\sqrt{1+C_{\sigma}^{2 }}\left\|g\right\|_{(H^{1}(\lambda))^{*}}\implies\left\|\mathcal{A}\right\| \leq\sqrt{1+C_{\sigma}^{2}}.\]

Moreover, \(b\) is bounded the following sense:

\[\left|b(h)\right|\leq\int\left|\mathsf{y}\right|\left|\mathcal{K}_{\varsigma, \lambda}(h,\mathsf{h})\right|\mu(d\varsigma,d\mathsf{z},d\mathsf{y},d \mathsf{h})\leq C_{y}\left\|h\right\|_{H^{1}(\lambda)}\implies\left\|b \right\|_{(H^{1}(\lambda))^{*}}\leq C_{y}.\]

Therefore, the following exponential operator is well defined for any \(T>0\):

\[\exp(t\mathcal{A})=\sum_{i=0}^{\infty}\frac{t^{i}\mathcal{A}^{\circ i}}{i!}, \quad\mathcal{A}^{\circ i}=\underbrace{\mathcal{A}\circ...\circ\mathcal{A}}_{i \text{ times}},\]

and therefore

**Proposition 6.5**.: _The ODE (4.3) admits the following classical solution:_

\[g_{t}=\int_{0}^{t}\exp((t-s)\mathcal{A})b\,ds, \tag{6.17}\]

_and when acting on \(h\in H^{1}(\lambda)\) we have_

\[g_{t}(h)=\int_{0}^{t}\exp((t-s)\mathcal{A})b(h)\,ds.\]
In particular, we have the following control over the operator norm

\[\|g_{t}\|_{(H^{1}(\lambda))^{*}}\leq T\exp(T\|\mathcal{A}\|)\|b\|_{(H^{1}(\lambda) )^{*}}\leq C_{y}Te^{\sqrt{1+C_{x}^{2}}T}:=C_{T} \tag{6.18}\]

where \(\|\mathcal{A}\|\) is the operator norm of the operator \(\mathcal{A}\), which is proven to be bounded by (6.16). So for all \(h\) we have \(|g_{t}(h)|\leq C_{T}\left\|h\right\|_{H^{1}(\lambda)}\) for any finite \(T>0\).

Proof.: We follow [26] for our discussion. Firstly, Theorem 1.2-3 of [26] states that \(\mathcal{A}\) induces a unique uniformly continuous semigroup \(\exp(t\mathcal{A})\). Indeed, consider the sequence of operators from \((H^{1}(\lambda))^{*}\) to \((H^{1}(\lambda))^{*}\):

\[S^{N}(t;\mathcal{A})=\sum_{i=0}^{N}\frac{t^{i}\mathcal{A}^{\circ i}}{i!}\]

By triangle inequality we have the operator norm control \(\|S^{N}(t;\mathcal{A})\|\leq\exp(t\|\mathcal{A}\|)<+\infty\), uniform in \(N\). Therefore the partial sums \((S^{N}(t,\mathcal{A}))_{N\geq 0}\) must converge absolutely. Since the space of operators from \((H^{1}(\lambda))^{*}\) to \((H^{1}(\lambda))^{*}\) is Banach, the partial sum \((S^{N}(t,\mathcal{A}))_{N\geq 0}\) must also converge to an operator in operator norm, for which we define it to be \(\exp(t\mathcal{A})\).

Since \(b\in(H^{1}(\lambda))^{*}\) is constant in \(t\), then by Corollary 2.5 of [26] the ODE 4.3 admits a classical solution, given by the formula (6.17) according to Corollary 2.2 of [26]. 

## 7 Proof of weak convergence

The actual convergence of the ODE is broken mainly into three steps. Firstly, we show in subsection 7.1 that one could modify the increments \(\delta^{(1)}g_{k}^{N}(h)\) by replacing the current parameters \((C_{k}^{i},W_{k}^{i},B_{k}^{i})\) to the initial parameters \((C^{i},W^{i},B^{i})\) without introducing too much error, thanks to the heuristic provided in Lemma 2.8 and Proposition 3.8. Then we remove the clipping in the evolution in subsection 7.2 by noticing the initial value \(g_{0}^{N}(h)\) is \(L^{2}\) integrable for all \(h\in\mathcal{H}\). Finally, we establish in subsection 7.3 the weak convergence by using analysing the corresponding Poisson equation [27] of the Markov chain \((H_{k})_{k\geq 0}\). The proof of the main result of this paper, Theorem 4.2, then follows in subsection 7.4.

### Replacing the trained memory units

Recall that \(g_{t}^{N}(h)=g_{\lfloor Nt\rfloor}^{N}(h;\theta_{\lfloor Nt\rfloor})\), and that we have now established

\[\left|g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{\lfloor Nt\rfloor-1}\delta^{(1)} g_{k}^{N}(h)\right|\leq\frac{C_{t}}{N^{2-\beta-2\gamma}},\]

where

\[\delta^{(1)}g_{k}^{N}(h)=-\frac{\alpha}{N^{2}}(\psi^{N}(\hat{Y}_{k}^{N})-Y_{k} )\sum_{i=1}^{N}\left[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i})^{2}\Delta \hat{S}_{k+1}^{i}\nabla h(W_{k}^{i})^{\top}X_{k}\right]. \tag{7.1}\]

In this section, we would like to show that one could study a simpler increment for the evolution of \(g_{t}^{N}(h)\), in light of the a-priori bounds for the increments of parameters (Lemma 2.8) and our current analysis of the trained hidden memory units in appendix 3. We begin by showing that \(\Psi^{N}(Y_{k})\) could be replaced by \(\Psi^{N}(g_{k}^{N}(h_{k}))\). This relies on the following lemma:

**Lemma 7.1**.: _If \(u,v\in\mathcal{H}\), then for all \(k\leq\lfloor TN\rfloor\), there are constants \(C_{T}\) depending on \(T\) such that_

\[\mathbb{E}|g_{k}^{N}(u)-g_{k}^{N}(v)|^{2}\leq C_{T}N^{2\gamma}\left\|u-v\right\| _{H^{1}(\lambda)}^{2}+\frac{C_{T}}{N^{2-2\beta-4\gamma}}.\]
Proof.: We start with

\[\left|(g_{k+1}^{N}(u)-g_{k+1}^{N}(v))-(g_{k}^{N}(u)-g_{k}^{N}(v))\right|\] \[=\left|(g_{k+1}^{N}(u)-g_{k}^{N}(u))-(g_{k+1}^{N}(v)-g_{k}^{N}(v))\right|\] \[=\left|\triangle g_{k}^{N}(u)-\triangle g_{k}^{N}(v)\right|\] \[\leq\left|\delta^{(1)}g_{k}^{N}(u)-\delta^{(1)}g_{k}^{N}(v) \right|+\left|\triangle g_{k}^{N}(u)-\delta^{(1)}g_{k}^{N}(u)\right|+\left| \delta^{(1)}g_{k}^{N}(v)-\triangle g_{k}^{N}(v)\right|,\]

so by Young's inequality,

\[\mathbb{E}\left|(g_{k+1}^{N}(u)-g_{k+1}^{N}(v))-(g_{k}^{N}(u)-g_{ k}^{N}(v))\right|^{2}\] \[\leq 3\left[\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(u)-\delta^{(1) }g_{k}^{N}(v)\right|^{2}+\mathbb{E}\left|\triangle g_{k}^{N}(u)-\delta^{(1)}g _{k}^{N}(u)\right|^{2}+\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(v)-\triangle g_ {k}^{N}(v)\right|^{2}\right],\] \[\leq 3\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(u)-\delta^{(1)}g_{k} ^{N}(v)\right|^{2}+\frac{C_{T}}{N^{6-2\beta-4\gamma}}, \tag{7.2}\]

with the constant \(C_{T}\) depends on the constant in the pre-limit equation in Lemma 4.1. We further note from the definition of \(\delta^{(1)}g_{k}^{N}(\cdot)\) in equation (7.1) that

\[\left|\delta^{(1)}g_{k}^{N}(u)-\delta^{(1)}g_{k}^{N}(v)\right|\] \[\leq\frac{\alpha}{N^{2}}\left|\psi^{N}(\hat{Y}_{k}^{N})-Y_{k} \right|\left|\sum_{i=1}^{N}\left[\hat{S}_{k+1}^{i,N}(u(W_{k}^{i})-v(W_{k}^{i}) )+C_{k}^{i}\Delta\hat{S}_{k+1}^{i,N}(\nabla u(W_{k}^{i})-\nabla v(W_{k}^{i}))^ {\top}X_{k}\right]\right|,\]

so

\[\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(u)-\delta^{(1)}g_{k}^{N}(v )\right|^{2}\] \[\leq\frac{\alpha^{2}}{N^{4}}\mathbb{E}\left[\left|\psi^{N}(\hat {Y}_{k}^{N})-Y_{k}\right|\left|\sum_{i=1}^{N}\left[\hat{S}_{k+1}^{i,N}(u(W_{k} ^{i})-v(W_{k}^{i}))+C_{k}^{i}\Delta\hat{S}_{k+1}^{i,N}(\nabla u(W_{k}^{i})- \nabla v(W_{k}^{i}))^{\top}X_{k}\right]\right|\right]^{2}\] \[\leq\frac{C}{N^{4-2\gamma}}\mathbb{E}\left[\sum_{i=1}^{N}\left[ \hat{S}_{k+1}^{i,N}(u(W_{k}^{i})-v(W_{k}^{i}))+C_{k}^{i}\Delta\hat{S}_{k+1}^{i,N}(\nabla u(W_{k}^{i})-\nabla v(W_{k}^{i}))^{\top}X_{k}\right]\right]^{2}\] \[\leq\frac{C_{T}}{N^{3-2\gamma}}\mathbb{E}\left[\sum_{i=1}^{N} \left[\left(u(W_{k}^{i})-v(W_{k}^{i})\right)^{2}+\left|\nabla u(W_{k}^{i})- \nabla v(W_{k}^{i})\right|^{2}\right]\right]\] \[\leq\frac{C_{T}}{N^{3-2\gamma}}\mathbb{E}\bigg{[}\sum_{i=1}^{N} \left[\left.\left(u(W_{k}^{i})-u(W_{0}^{i})\right)^{2}+\left(v(W_{k}^{i})-v(W_ {0}^{i})\right)^{2}+\left(u(W_{0}^{i})-v(W_{0}^{i})\right)^{2}\right.\right.\] \[\left.\left.+\left|\nabla u(W_{k}^{i})-\nabla u(W_{0}^{i})\right|^ {2}+\left|\nabla v(W_{k}^{i})-\nabla v(W_{0}^{i})\right|^{2}+\left|\nabla u(W_ {0}^{i})-\nabla v(W_{0}^{i})\right|^{2}\right.\right]\right]\] \[\leq\frac{C_{T}}{N^{3-2\gamma}}\mathbb{E}\bigg{[}\sum_{i=1}^{N} \left[\left.\left|W_{k}^{i}-W_{0}^{i}\right|^{2}+\left(u(W_{0}^{i})-v(W_{0}^{i}) \right)^{2}+\left|\nabla u(W_{0}^{i})-\nabla v(W_{0}^{i})\right|^{2}\right. \right]\right]\] \[\leq\frac{C_{T}}{N^{2-2\gamma}}\left[\frac{C_{T}}{N^{2-2\beta-2 \gamma}}+\left\|u-v\right\|_{H^{1}(\lambda)}^{2}\right]=\frac{C_{T}}{N^{2-2 \gamma}}\left\|u-v\right\|_{H^{1}(\lambda)}^{2}+\frac{C_{T}}{N^{4-2\beta-4 \gamma}}\]

Combining the above with equation (7.2) yields

\[\mathbb{E}\left|(g_{k+1}^{N}(u)-g_{k}^{N}(u))-(g_{k+1}^{N}(v)-g_{k}^{N}(v)) \right|\leq\frac{C_{T}}{N^{2-2\gamma}}\left\|u-v\right\|_{H^{1}(\lambda)}^{2}+ \frac{C_{T}}{N^{4-2\beta-4\gamma}},\]
so by summing the telescoping sums:

\[\mathbb{E}\left|g_{k}^{N}(u)-g_{k}^{N}(v)\right|^{2} =\mathbb{E}\left|\sum_{j=0}^{k-1}\left(\triangle g_{j}^{N}(u)- \triangle g_{j}^{N}(v)\right)\right|^{2}\leq N\mathbb{E}\left[\sum_{j=0}^{k-1} \left(\triangle g_{j}^{N}(u)-\triangle g_{j}^{N}(v)\right)^{2}\right]\] \[\leq C_{T}N^{2\gamma}\left\|u-v\right\|_{H^{1}(\lambda)}^{2}+ \frac{C_{T}}{N^{2-2\beta-4\gamma}}.\]

This leads us to the following lemma.

**Lemma 7.2**.: _Define_

\[\delta^{(2)}g_{k}^{N}(h) =-\frac{\alpha}{N^{2}}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\sum_{i =1}^{N}\left[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i})^{2}\Delta\hat{S}_{k+1} ^{i}\nabla h(W_{k}^{i})^{\top}X_{k}\right]\] \[=-\frac{\alpha}{N^{2}}(\psi^{N}(g_{k}^{N}(\varsigma(X_{k},Z_{k}, Y_{k},h_{k}))-Y_{k})\sum_{i=1}^{N}\left[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i })^{2}\Delta\hat{S}_{k+1}^{i}\nabla h(W_{k}^{i})^{\top}X_{k}\right],\]

_then for all \(h\in\mathcal{H}\), the following holds for all \(k\leq\left\lfloor NT\right\rfloor-1\)_

\[\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(h)-\delta^{(2)}g_{k}^{N}(h)\right|^{2} \leq\frac{C_{T}}{N^{4-2\beta-4\gamma}}.\]

Proof.: We first note the uniform bound in \(i\) for \(k\leq\left\lfloor NT\right\rfloor\): thanks to the boundedness of the test function \(h\), boundedness of activation function (see Assumption 2.3 and equations (6.1)-(6.2)) and the boundedness of \(C_{k}^{i}\) (see Assumption 2.5 and Lemma 2.8), one has

\[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i})^{2}\Delta\hat{S}_{k+1}^{i,N}\nabla h (W_{k}^{i})^{\top}X_{k}\leq C+C_{T}C_{\sigma}C=:C_{T},\]

where the constant \(C_{T}\) may change from line to line. By the boundedness of derivative of \(\psi^{N}\),

\[\left|\delta^{(1)}g_{k}^{N}(h)-\delta^{(2)}g_{k}^{N}(h)\right| \leq\frac{C_{T}}{N}\left|\psi^{N}(\hat{Y}_{k}^{N})-\psi^{N}(g_{k}^{N}(h_{k+1} ))\right|\leq\frac{C_{T}}{N}\left|\hat{Y}_{k}^{N}-g_{k}^{N}(h_{k+1})\right|. \tag{7.3}\]

Observing that \(\hat{Y}_{k}^{N}=g_{k}^{N}(v_{k+1}^{N})\), and that we know a-priori that the \(h_{k}\) and \(v_{k}^{N}\) has output bounded by \(1\) and partial derivatives bounded by \(C_{\sigma}\), we may invoke Lemma 7.1 with our a-priori bound 7.3 and Proposition 3.8 (see also equation (3.18)) to bound our required expectation:

\[\mathbb{E}\left|\delta^{(1)}g_{k}^{N}(h)-\delta^{(2)}g_{k}^{N}(h )\right|^{2} \stackrel{{\eqref{eq:C_T}}}{{\leq}}\frac{C_{T}}{N^{2}} \mathbb{E}\left[g_{k}^{N}(v_{k+1}^{N})-g_{k}^{N}(h_{k+1})\right]^{2}\] \[=\frac{C_{T}}{N^{2}}\mathbb{E}\left[\left[\left(g_{k}^{N}(v_{k+1} ^{N})-g_{k}^{N}(h_{k+1})\right)^{2}\,\left|\,v_{k+1}^{N},h_{k+1}\right|\right]\right]\] \[\stackrel{{\eqref{eq:C_T}}}{{\leq}}\frac{C_{T}}{N^{2 }}\mathbb{E}\left[C_{T}N^{2\gamma}\left\|v_{k+1}^{N}-h_{k+1}\right\|_{H^{1}( \lambda)}^{2}+\frac{C_{T}}{N^{2-2\beta-4\gamma}}\right]\] \[\stackrel{{\eqref{eq:C_T}}}{{\leq}}\frac{C_{T}}{N^{4 -2\beta-4\gamma}} \tag{7.4}\]

The result holds by recalling that \(h_{k+1}=\varsigma(X_{k},Z_{k},Y_{k},h_{k})\).
We could then sum up all the differences between the increments to conclude that

\[\mathbb{E}\left|g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{\lfloor Nt \rfloor-1}\delta^{(2)}g_{k}^{N}(h)\right|^{2}\] \[\leq 2\mathbb{E}\left[\left(g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{ \lfloor Nt\rfloor-1}\delta^{(1)}g_{k}^{N}(h)\right)^{2}+\left(\sum_{k=0}^{ \lfloor Nt\rfloor-1}\left(\delta^{(1)}g_{k}^{N}(h)-\delta^{(2)}g_{k}^{N}(h) \right)\right)^{2}\right]\] \[\leq\frac{C_{T}}{N^{4-2\beta-4\gamma}}+2N\sum_{k=0}^{\lfloor Nt \rfloor-1}\mathbb{E}\left[\delta^{(1)}g_{k}^{N}(h)-\delta^{(2)}g_{k}^{N}(h) \right]^{2}\leq\frac{C_{T}}{N^{2-2\beta-4\gamma}}.\]

To understand the next step, we revisit the formula for \(\delta^{(2)}g_{k}^{N}(h)\):

\[\delta^{(2)}g_{k}^{N}(h) =-\frac{\alpha}{N^{2}}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\sum_{i =1}^{N}\left[\hat{S}_{k+1}^{i,N}h(W_{k}^{i})+(C_{k}^{i})^{2}\Delta\hat{S}_{k+1 }^{i}\nabla h(W_{k}^{i})^{\top}X_{k}\right]\] \[=-\frac{\alpha}{N^{2}}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\sum_{i =1}^{N}\left[v_{k+1}^{N}(W_{k}^{i})h(W_{k}^{i})+(C_{k}^{i})^{2}\sigma^{\prime} \left((W_{k}^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k -1}^{i})\right)\nabla h(W_{k}^{i})^{\top}X_{k}\right]\] \[=-\frac{\alpha}{N}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\left\langle v _{k+1}^{N}(w)h(w)+c^{2}\sigma^{\prime}\left(w^{\top}X_{k}+\frac{1}{N}\sum_{j=1 }^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\right)\nabla h(w)^{\top}X_{k},\,\lambda_{ k}^{N}\right\rangle\]

In light of the results proven regarding the increments of parameters (Lemma 2.8) and the trained memory units (Section 3), we would expect that one could study the new increments with the average of empirical distribution of updated parameters \(\lambda_{k}^{N}\) replaced by an average with respect to the initial parameter distribution \(\lambda\). This is formalised by the following technical lemma:

**Lemma 7.3**.: _Define_

\[\delta^{(3)}g_{k}^{N}(h) =-\frac{\alpha}{N}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\left\langle h _{k+1}(w)h(w)+c^{2}\sigma^{\prime}\left(w^{\top}X_{k}+\left\langle b^{\prime} h_{k}(w^{\prime}),\lambda\right\rangle\right)\nabla h(w)^{\top}X_{k},\,\lambda\right\rangle,\] \[=-\frac{\alpha}{N}(\psi^{N}(g_{k}^{N}(\varsigma(X_{k},Z_{k},Y_{k},h_{k})))-Y_{k})\left\langle h_{k+1}(w)h(w)+c^{2}\sigma^{\prime}\left(w^{\top} X_{k}+\left\langle b^{\prime}h_{k}(w^{\prime}),\lambda\right\rangle\right)\nabla h(w)^{ \top}X_{k},\,\lambda\right\rangle\]

_then for all \(h\in\mathcal{H}\), the following holds for all \(k\leq\lfloor NT\rfloor-1\)_

\[\mathbb{E}\left|\delta^{(2)}g_{k}^{N}(h)-\delta^{(3)}g_{k}^{N}(h)\right|^{2} \leq\frac{C_{T}}{N^{4-2\beta-4\gamma}}.\]

Proof.: We break down the fluctuation term into different components

\[\delta^{(2)}g_{k}^{N}(h)-\delta^{(3)}g_{k}^{N}(h)=-\frac{\alpha}{N}(\psi^{N}(g_ {k}^{N}(h_{k+1}))-Y_{k})\sum_{\bullet=1}^{6}M_{k}^{\bullet,N},\]
where

\[M_{k}^{1,N} =\left\langle v_{k+1}^{N}(w)h(w),\,\lambda_{k}^{N}-\lambda^{N}\right\rangle\] \[M_{k}^{2,N} =\left\langle c^{2}\sigma^{\prime}\left(w^{\top}X_{k}+\frac{1}{N} \sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\right)\nabla h(w)^{\top}X_{k},\, \lambda_{k}^{N}-\lambda^{N}\right\rangle\] \[M_{k}^{3,N} =\left\langle(v_{k+1}^{N}(w)-h_{k+1}(w))h(w),\,\lambda^{N}\right\rangle\] \[M_{k}^{4,N} =\left\langle c^{2}\left(\sigma^{\prime}\left(w^{\top}X_{k}+\frac {1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\right)-\sigma^{\prime} \left(w^{\top}X_{k}+\langle b^{\prime}h_{k}(w^{\prime}),\,\lambda\rangle \right)\right)\nabla h(w)^{\top}X_{k},\,\lambda^{N}\right\rangle\] \[M_{k}^{5,N} =\left\langle h_{k+1}(w)h(w),\lambda^{N}-\lambda\right\rangle\] \[M_{k}^{6,N} =\left\langle c^{2}\sigma^{\prime}\left(w^{\top}X_{k}+\langle b^ {\prime}h_{k}(w^{\prime}),\,\lambda\rangle\right)\nabla h(w)^{\top}X_{k}, \lambda^{N}-\lambda\right\rangle\]

This implies

\[\mathbb{E}\left|\delta^{(2)}g_{k}^{N}(h)-\delta^{(3)}g_{k}^{N}(h)\right|^{2} \leq\frac{\alpha^{2}}{N^{2}}\mathbb{E}\left[\left|\psi^{N}(g_{k}^{N}(h_{k+1})) -Y_{k}\right|^{2}\left(\sum_{\bullet=1}^{6}M_{k}^{\bullet,N}\right)^{2}\right] \leq\frac{6C}{N^{2-2\gamma}}\left(\sum_{\bullet=1}^{6}\mathbb{E}\left[M_{k}^{ \bullet,N}\right]^{2}\right)\]

Now note that:

\[\left|M_{k}^{1,N}\right| =\left|\frac{1}{N}\sum_{i=1}^{N}\left(v_{k+1}^{N}(W_{k}^{i})h(W_{ k}^{i})-v_{k+1}^{N}(W_{0}^{i})h(W_{0}^{i})\right)\right|\] \[\leq\frac{1}{N}\sum_{i=1}^{N}\left|v_{k+1}^{N}(W_{k}^{i})h(W_{k}^ {i})-v_{k+1}^{N}(W_{0}^{i})h(W_{0}^{i})\right|\] \[\leq\frac{1}{N}\sum_{i=1}^{N}\left[\left|v_{k+1}^{N}(W_{k}^{i})(h (W_{k}^{i})-h(W_{0}^{i}))\right|+\left|(v_{k+1}^{N}(W_{k}^{i})-v_{k+1}^{N}(W_{ 0}^{i}))h(W_{0}^{i})\right|\right]\] \[\leq\frac{C}{N}\sum_{i=1}^{N}\left|W_{k}^{i}-W_{0}^{i}\right| \stackrel{{(2,4)}}{{\leq}}\frac{C_{T}}{N^{1-\beta-\gamma}} \tag{7.5}\]
\[\Big{|}M_{k}^{2,N}\Big{|} =\left|\frac{1}{N}\sum_{i=1}^{N}\left((C_{k}^{i})^{2}\sigma^{\prime} \left((W_{k}^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1 }^{i})\right)\nabla h(W_{k}^{i})^{\top}X_{k}\right.\] \[\quad-(C_{0}^{i})^{2}\sigma^{\prime}\left((W_{0}^{i})^{\top}X_{k} +\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\right)\nabla h(W_{0} ^{i})^{\top}X_{k}\right)\Biggr{|}\] \[\leq\frac{1}{N}\sum_{i=1}^{N}\Bigg{[}\left|(C_{k}^{i})^{2}-(C_{0} ^{i})^{2}\right|\underbrace{\left|\sigma^{\prime}((W_{k}^{i})^{\top}X_{k}+ \frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\nabla h(W_{k}^{i})^{ \top}X_{k})\right|}_{\leq C}\] \[\quad+\underbrace{(C_{0}^{i})^{2}}_{\leq 1}\bigg{|}\sigma^{ \prime}\Big{(}(W_{k}^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^ {N}(W_{k-1}^{i})\Big{)}\nabla h(W_{k}^{i})^{\top}X_{k}\] \[\quad-\sigma^{\prime}\Big{(}(W_{0}^{i})^{\top}X_{k}+\frac{1}{N} \sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\Big{)}\nabla h(W_{0}^{i})^{\top} X_{k}\bigg{|}\Bigg{]}\] \[\leq\frac{1}{N}\sum_{i=1}^{N}\Bigg{[}\left|C_{k}^{i}-C_{0}^{i} \right|\underbrace{\left|C_{k}^{i}+C_{0}^{i}\right|}_{\leq C_{T}}\] \[\quad+\underbrace{\left|\sigma^{\prime}\Big{(}(W_{k}^{i})^{\top}X_ {k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\Big{)}-\sigma^{ \prime}\Big{(}(W_{0}^{i})^{\top}X_{k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^ {N}(W_{k-1}^{i})\Big{)}\right|}_{\leq C_{s}|W_{k}^{i}-W_{0}^{i}|}\frac{\left| \nabla h(W_{k}^{i})^{\top}X_{k}\right|}{\leq C}\] \[\quad+\underbrace{\left|\sigma^{\prime}\Big{(}(W_{0}^{i})^{\top} X_{k}+\frac{1}{N}\sum_{j=1}^{N}B_{k}^{j}v_{k}^{N}(W_{k-1}^{i})\Big{)}\right| \left|X_{k}\right|}_{\leq C_{a}|W_{k}^{i}-W_{0}^{i}|}\frac{\left|\nabla h(W_{k} ^{i})-\nabla h(W_{0}^{i})\right|}{\leq Cd^{2}|W_{k}^{i}-W_{0}^{i}|}\Bigg{]}\] \[\leq\frac{C_{T}}{N}\sum_{i=1}^{N}\left[|C_{k}^{i}-C_{0}^{i}|+|W_ {k}^{i}-W_{0}^{i}|\right]\stackrel{{\eqref{eq:C_T}}}{{\leq}} \frac{C_{T}}{N^{1-\beta-\gamma}}. \tag{7.6}\]

Furthermore,

\[\Big{|}M_{k}^{3,N}\Big{|}\leq\frac{1}{N}\sum_{i=1}^{N}\left|v_{k+1}^{N}(W_{0} ^{i})-h_{k+1}(W_{0}^{i})\right|\left|h(W_{0}^{i})\right|\leq\frac{C}{N}\sum_{i =1}^{N}\left|\Gamma_{k+1}^{N}(W_{0}^{i})\right|,\]

where \(\Gamma_{k}^{N}(w)=v_{k}^{N}(w)-h_{k}(w)\). By Proposition 3.8, and recalling the definitions of \(E^{N,1},E^{N,2}\), we have

\[\mathbb{E}\left|M_{k}^{3,N}\right|^{2} \leq\frac{C}{N}\sum_{i=1}^{N}\mathbb{E}\left|\Gamma_{k+1}^{N}(W_{0 }^{i})\right|^{2}\] \[\stackrel{{\eqref{eq:C_T}}}{{\leq}}C\left[\mathbb{E }\left[E_{k+1}^{N,1}\right]^{2}+\mathbb{E}\left[E_{k+1}^{N,2}\right]^{2}\right]\] \[\stackrel{{\eqref{eq:C_T}}}{{\leq}}C\left[\frac{2}{N }+2C_{a}^{2}\mathbb{E}\left(E_{k-1}^{N,1}\right)^{2}+\frac{2C_{T}}{N^{2-2\beta- 2\gamma}}+2C_{a}^{2}\mathbb{E}\left(E_{k-1}^{N,2}\right)^{2}\right]\] \[\stackrel{{\eqref{eq:C_T}}}{{\leq}}\frac{C_{T}}{N^{2-2 \beta-2\gamma}}.\]

Next, we have

\[\Big{|}M_{k}^{4,N}\Big{|}\leq C\left[\left|E_{k}^{N,1}\right|+\left|E_{k}^{N,2} \right|\right]\implies\mathbb{E}\left[M_{k}^{4,N}\right]^{2}\stackrel{{ \eqref{eq:C_T}}}{{\leq}}\frac{C_{T}}{N^{2-2\beta-2\gamma}}. \tag{7.7}\]
The remaining two terms could be easily bounded using similar arguments in establishing equation (6.13). Formally, we note that \(h_{k+1}(W_{0}^{i})h(W_{0}^{i})\,\mid\,h_{k+1}\) is conditionally mutually iid for \(i=1,\cdots,N\), so

\[\mathbb{E}\left|M_{k}^{5,N}\right|^{2} =\mathbb{E}\left(\left\langle h_{k+1}(w)h(w),\lambda^{N}-\lambda \right\rangle^{2}\right)\] \[=\mathbb{E}\left[\mathbb{E}\left[\left\langle h_{k+1}(w)h(w), \lambda^{N}-\lambda\right\rangle^{2}\,\left|\,h_{k+1}\right]\right]\] \[=\mathbb{E}\left[\mathbb{E}\left[\left(\frac{1}{N}\sum_{i=1}^{N} \left(h_{k+1}(W_{0}^{i})h(W_{0}^{i})-\int h_{k+1}(w^{\prime})h(w^{\prime})\, \lambda(db^{\prime}\,dw^{\prime})\right)\right)^{2}\,\left|\,h_{k+1}\right]\right]\] \[=\frac{1}{N}\mathbb{E}\left[\mathbb{E}\left[\left(h_{k+1}(W^{1}) h(W^{1})\right)^{2}\,\left|\,\,\,h_{k+1}\right]-\left(\int h_{k+1}(w^{\prime})h(w^{ \prime})\,\lambda(db^{\prime}\,dw^{\prime})\right)^{2}\right]\] \[\leq\frac{C}{N}.\]

Noting also that \((C_{0}^{i})^{2}\sigma^{\prime}\left((W_{0}^{i})^{\top}X_{k}+\langle b^{\prime }h_{k}(w^{\prime}),\,\lambda\rangle\right)\nabla h(W_{0}^{i})^{\top}X_{k}\,|\, h_{k},X_{k}\) is conditionally mutually iid, we can apply the exact same argument to show that

\[\mathbb{E}\left|M_{k}^{6,N}\right|^{2}=\frac{\mathbb{E}\left[\left((C_{0}^{1}) ^{2}\sigma^{\prime}\left((W_{0}^{1})^{\top}X_{k}+\langle b^{\prime}h_{k}(w^{ \prime}),\,\lambda\rangle\right)\nabla h(W_{0}^{1})^{\top}X_{k}\right)\right]^ {2}}{N}\leq\frac{C}{N}.\]

Finally, since \(\beta>1/2\) and \(\gamma>0\), we have \(2-2\beta-2\gamma<1-2\gamma<1\), so \(C_{T}N^{-1}=o(N^{-(2-2\beta-2\gamma)})\). Therefore, one could sum up all fluctuation term to have

\[\mathbb{E}\left|\delta^{(2)}g_{k}^{N}(h)-\delta^{(3)}g_{k}^{N}(h)\right|^{2} \leq\frac{C}{N^{2-2\gamma}}\frac{C_{T}}{N^{2-2\beta-2\gamma}}=\frac{C_{T}}{N^ {4-2\beta-4\gamma}}.\]

Arguing as before, one could now conclude that

\[\mathbb{E}\left|g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{\lfloor Nt\rfloor-1} \delta^{(3)}g_{k}^{N}(h)\right|^{2}\leq\frac{C_{T}}{N^{2-2\beta-4\gamma}}. \tag{7.8}\]

### Removal of the clipping function

So far, we have shown that one could study the process \(g_{m}^{N}(h)\) by looking at the increment \(\delta^{(3)}g_{k}^{N}\). To simplify our computation, let us recall the fact that

\[h_{k+1}(w)=[\varsigma(X_{k},Z_{k},Y_{k},h_{k})](w)=\sigma(w^{\top}X_{k}+ \langle b^{\prime}h_{k}(w^{\prime}),\,\lambda\rangle),\]

and define the kernel \(\mathcal{K}_{x,\lambda}(\cdot,\cdot):\mathcal{H}\times\mathcal{H}\to\mathbb{R}\) for all \(x\):

\[\mathcal{K}_{x,\lambda}(h,\mathsf{h})=\left\langle\sigma(w^{\top}x+\langle b^ {\prime}\mathsf{h}(w^{\prime})\rangle)h(w)+c^{2}\sigma^{\prime}(w^{\top}x+ \langle b^{\prime}\mathsf{h}(w^{\prime}),\lambda\rangle)\nabla h(w)^{\top}x,\, \lambda\right\rangle,\]

then

\[\delta^{(3)}g_{k}^{N}(h) =-\frac{\alpha}{N}(\psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\left\langle h _{k+1}(w)h(w)+c^{2}\sigma^{\prime}\left(w^{\top}X_{k}+\langle b^{\prime}h_{k}(w ^{\prime}),\lambda\rangle\right)\nabla h(w)^{\top}X_{k},\,\lambda\right\rangle,\] \[\stackrel{{(\ref{eq:kernel})}}{{=}}-\frac{\alpha}{N}( \psi^{N}(g_{k}^{N}(h_{k+1}))-Y_{k})\left\langle\sigma(w^{\top}X_{k}+\langle b ^{\prime}h_{k}(w^{\prime}),\,\lambda\rangle)h(w)+c^{2}\sigma^{\prime}\left(w^{ \top}X_{k}+\langle b^{\prime}h_{k}(w^{\prime}),\lambda\rangle\right)\nabla h (w)^{\top}X_{k},\,\lambda\right\rangle\] \[=-\frac{\alpha}{N}(\psi^{N}(g_{k}^{N}(\varsigma(X_{k},Z_{k},Y_{k}, h_{k})))-Y_{k})\,\mathcal{K}_{X_{k},\lambda}(h,h_{k}). \tag{7.9}\]

We have assumed that \(|(X_{k},Z_{k})|\leq 1\) in Assumption 2.1, which implies \(|X_{k}|\leq 1\), so we could limit our discussion of the kernel \(\mathcal{K}_{x,\lambda}\) for \(|x|\leq 1\). By Assumption 2.3 on activation function \(\sigma(\cdot)\) and the space \(\mathcal{H}\), we have

\[|\mathcal{K}_{x,\lambda}(h,\mathsf{h})|\leq C.\]
The main objective of this section is to remove the clipping function in \(\delta^{(3)}g_{k}^{N}(h)\), and set the initial value of the output evolution to zero, without introducing too much error.

**Lemma 7.4** (Uniform integrability of \(g_{m}^{N}(h_{m+1})\)).: _For \(m\leq\lfloor NT\rfloor-1\), we have \(\mathbb{E}\left[g_{m}^{N}(h_{m+1})\right]^{2}\leq C_{T}\)._

Proof.: Using the independence and identical distribution of \((C_{0}^{i},W_{0}^{i})\), for \(i=1,\cdots,N\) and the fact that \(C_{0}^{i}\) and \(W_{0}^{i}\) are independent from each other with \(C_{0}^{i}\) having zero mean, we have

\[\mathbb{E}|g_{0}^{N}(h_{1})|^{2} =\mathbb{E}\left[\mathbb{E}\left[\left(\frac{1}{N^{\beta}}\sum_{i =1}^{N}C_{0}^{i}\sigma((W_{0}^{i})^{\top}X_{0})\right)^{2}\,\bigg{|}\,X_{0} \right]\right]\] \[=\mathbb{E}\left[\frac{1}{N^{2\beta}}\sum_{i=1}^{N}\mathbb{E} \left[\left(C_{0}^{i}\sigma((W_{0}^{i})^{\top}X_{0})\right)^{2}\,\bigg{|}\,X _{0}\right]\right]\] \[\leq\mathbb{E}\left[\frac{1}{N^{2\beta}}\sum_{i=1}^{N}1\right]= \frac{1}{N^{2\beta-1}}\]

Therefore by (7.8) we have

\[\mathbb{E}|g_{m}^{N}(h_{m+1})|^{2} \leq 2\mathbb{E}\left|\sum_{k=0}^{m-1}\delta^{(3)}g_{k}^{N}(h_{m+ 1})\right|^{2}+\frac{C_{T}}{N^{2-2\beta-4\gamma}}\] \[\leq 2m\sum_{k=0}^{m-1}\mathbb{E}\left[\delta^{(3)}g_{k}^{N}(h_{m+ 1})\right]^{2}+\frac{C_{T}}{N^{2-2\beta-4\gamma}}\] \[\leq\frac{2CT}{N}\sum_{k=0}^{m-1}2\left[\mathbb{E}\left|\psi^{N} (g_{k}^{N}(h_{k+1}))\right|^{2}+\mathbb{E}\left|Y_{k}\right|^{2}\right]+\frac{ C_{T}}{N^{2-2\beta-4\gamma}}\] \[\leq\frac{4CT}{N}\sum_{k=0}^{m-1}\left[\mathbb{E}\left|g_{k}^{N} (h_{k+1})\right|^{2}+C_{y}^{2}\right]+\frac{C_{T}}{N^{2-2\beta-4\gamma}}\] \[\leq\frac{4CT}{N}\sum_{k=0}^{m-1}\left[\mathbb{E}\left|g_{k}^{N} (h_{k+1})\right|^{2}\right]+4CC_{y}^{2}T+\frac{C_{T}}{N^{2-2\beta-4\gamma}}\] \[\leq\frac{4CT}{N}\sum_{k=0}^{m-1}\mathbb{E}\left|g_{k}^{N}(h_{k+1 })\right|^{2}+C_{T}\]

We may then use discrete Gronwall's inequality to conclude that

\[\mathbb{E}|g_{m}^{N}(h_{m+1})|^{2}\leq C_{T}\exp\left(\frac{4CmT}{N}\right) \leq C_{T}.\]

Because the expectation \(\mathbb{E}|g_{m}^{N}(h_{m+1})|^{2}\) is uniformly bounded for \(m\leq\lfloor NT\rfloor\), we may invoke Markov's inequality to prove the following:

**Lemma 7.5** (Removal of clipping function in \(\delta^{(3)}\)).: _Define_

\[\delta^{(4)}g_{k}^{N}(h)=\frac{\alpha}{N}(g_{k}^{N}(h_{k+1})-Y_{k})\mathcal{K }_{X_{k},\lambda}(h,\mathrm{h}),\]

_then for all \(h\in\mathcal{H}\), the following holds for all \(k\leq\lfloor NT\rfloor\)_

\[\mathbb{E}\left|\delta^{(3)}g_{k}^{N}(h)-\delta^{(4)}g_{k}^{N}(h)\right|\leq \frac{C_{T}}{N^{1+\gamma}}.\]
Proof.: Note that

\[\left|\delta^{(3)}g_{k}^{N}(h)-\delta^{(4)}g_{k}^{N}(h)\right|=\frac{\alpha}{N} \left|\psi^{N}(g_{k}^{N}(h_{k+1}))-g_{k}^{N}(h_{k+1})\right|\left|\mathcal{K}_{X _{k},\lambda}(h,h_{k})\right|\leq\frac{C}{N}\left|\psi^{N}(g_{k}^{N}(h_{k+1}))- g_{k}^{N}(h_{k+1})\right|\]

Recall that when \(|g_{k}^{N}(h_{k+1})|\leq N^{\gamma}\) then \(\psi^{N}(g_{k}^{N}(h_{k+1}))=g_{k}^{N}(h_{k+1})\), so

\[\psi^{N}(g_{k}^{N}(h_{k+1}))-g_{k}^{N}(h_{k+1}) =(\psi^{N}(g_{k}^{N}(h_{k+1}))-g_{k}^{N}(h_{k+1}))\left(\mathbf{1} _{\{|g_{k}^{N}(h_{k+1})|>N^{\gamma}\}}+\mathbf{1}_{\{|g_{k}^{N}(h_{k+1})|\leq N ^{\gamma}\}}\right)\] \[=(\psi^{N}(g_{k}^{N}(h_{k+1}))-g_{k}^{N}(h_{k+1}))\mathbf{1}_{\{| g_{k}^{N}(h_{k+1})|>N^{\gamma}\}}.\]

Combining with \(|\psi^{N}(x)|\leq|x|\), we have

\[\mathbb{E}\left|\delta^{(3)}g_{k}^{N}(h)-\delta^{(4)}g_{k}^{N}(h)\right| \leq\frac{C}{N}\mathbb{E}\left|\psi^{N}(g_{k}^{N}(h_{k+1}))-g_{k} ^{N}(h_{k+1})\right|\mathbf{1}_{\{|g_{k}^{N}(h_{k+1})|>N^{\gamma}\}}\] \[\leq\frac{C}{N}\mathbb{E}\left[\left|\psi^{N}(g_{k}^{N}(h_{k+1}) )\right|+\left|g_{k}^{N}(h_{k+1})\right|\right]\mathbf{1}_{\{|g_{k}^{N}(h_{k+1 })|>N^{\gamma}\}}\] \[\leq\frac{2C}{N}\mathbb{E}\left|g_{k}^{N}(h_{k+1})\right|\mathbf{ 1}_{\{|g_{k}^{N}(h_{k+1})|>N^{\gamma}\}}\] \[\leq\frac{2C}{N}\sqrt{\mathbb{E}\left|g_{k}^{N}(h_{k+1})\right|^ {2}}\sqrt{\mathbb{E}\left[\mathbf{1}_{\{|g_{k}^{N}(h_{k+1})|>N^{\gamma}\}} \right]}\] \[\leq\frac{C_{T}}{N}\sqrt{\frac{\mathbb{E}\left|g_{k}^{N}(h_{k+1}) \right|^{2}}{N^{2\gamma}}}=\frac{C_{T}}{N^{1+\gamma}}.\]

Arguing as before, we have

\[\mathbb{E}\left|g_{t}^{N}(h)-g_{0}^{N}(h)-\sum_{k=0}^{\lfloor Nt\rfloor-1} \delta^{(4)}g_{k}^{N}(h)\right|\leq\frac{C_{T}}{N^{(1-\beta-2\gamma)\wedge \gamma}}, \tag{7.10}\]

We now record a simple observation regarding the boundeness of the second moment of \(g_{0}^{N}(h)\).

**Lemma 7.6**.: _For all \(h\in\mathcal{H}\),_

\[\mathbb{E}\left[g_{0}^{N}(h)\right]^{2}\leq\frac{1}{N^{2\beta-1}}\]

Proof.: Using the independence and identical distribution of \((C_{0}^{i},W_{0}^{i})\), for \(i=1,\cdots,N\) and the fact that \(C_{0}^{i}\) and \(W_{0}^{i}\) are independent from each other with \(C_{0}^{i}\) having zero mean, we have

\[\mathbb{E}\left[g_{0}^{N}(h)\right]^{2}=\frac{1}{N^{2\beta}}\mathbb{E}\left[ \sum_{i=1}^{N}C_{0}^{i}h(W_{0}^{i})\right]^{2}=\frac{\mathbb{E}\left[C_{0}^{1} h(W_{0}^{1})\right]^{2}}{N^{2\beta-1}}\leq\frac{1}{N^{2\beta-1}}\]

_Remark 7.7_.: The above is also true if we replace the fixed \(h\) with the elements in random sequence \((h_{k})_{k\geq 0}\), as the sequence \(h_{k}\) is independent of the initialisation \((C_{0}^{i},W_{0}^{i})_{i=1}^{N}\).

This allows us to consider the new evolution that \(\varphi_{k}^{N}(h)\) that satisfies the evolution equation

\[\varphi_{m}^{N}(h) =\sum_{k=0}^{m-1}\triangle\varphi_{k}^{N}(h),\quad\varphi_{0}^{N} (h)=0 \tag{7.11}\] \[\triangle\varphi_{k}^{N}(h) =-\frac{\alpha}{N}(\varphi_{k}^{N}(h_{k+1})-Y_{k})\mathcal{K}_{X _{k},\lambda}(h,h_{k}).\] \[=-\frac{\alpha}{N}(\varphi_{k}^{N}(\varsigma(X_{k},Z_{k},Y_{k},h _{k}))-Y_{k})\mathcal{K}_{X_{k},\lambda}(h,h_{k}).\]
**Lemma 7.8** (\(\varphi_{m}^{N}(h)\) approximates \(g_{m}^{N}(h)\)).: _For all \(m\leq\lfloor NT\rfloor\) and \(h\in\mathcal{H}\),_

\[\sup_{h\in\mathcal{H}}\mathbb{E}\left|g_{m}^{N}(h)-\varphi_{m}^{N}(h)\right| \leq\frac{C_{T}}{N^{(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)}}. \tag{7.12}\]

Proof.: In light of Lemma 7.6, we know that

\[\mathbb{E}\left|g_{m}^{N}(h)-\varphi_{m}^{N}(h)\right| \leq\mathbb{E}\left[g_{m}^{N}(h)-g_{0}^{N}(h)-\varphi_{m}^{N}(h) \right]+\mathbb{E}\left|g_{0}^{N}(h)\right|\] \[\leq\mathbb{E}\left|\sum_{k=0}^{m-1}(\delta^{(4)}g_{k}^{N}(h)- \triangle\varphi_{k}^{N}(h))\right|+\frac{1}{N^{\beta-1/2}}+\frac{C_{T}}{N^{ 1-\beta-2\gamma}}\] \[\leq\frac{C}{N}\sum_{k=0}^{m-1}\mathbb{E}\left|g_{k}^{N}(h_{k+1} )-\varphi_{k}^{N}(h_{k+1})\right|+\frac{1}{N^{\beta-1/2}}+\frac{C_{T}}{N^{(1- \beta-2\gamma)\wedge\gamma}}. \tag{7.13}\]

The above inequality is also true when replacing \(h=h_{m+1}\), in particular

\[\mathbb{E}\left|g_{m}^{N}(h_{m+1})-\varphi_{m}^{N}(h_{m+1})\right| \leq\frac{C}{N}\sum_{k=0}^{m-1}\mathbb{E}\left|g_{k}^{N}(h_{k+1})- \varphi_{k}^{N}(h_{k+1})\right|+\frac{1}{N^{\beta-1/2}}+\frac{C_{T}}{N^{(1- \beta-2\gamma)\wedge\gamma}}; \tag{7.14}\]

so by discrete Gronwall's inequality,

\[\mathbb{E}\left|g_{m}^{N}(h_{m+1})-\varphi_{m}^{N}(h_{m+1})\right| \leq\frac{C_{T}\exp(Cm/N)}{N^{(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)} }\leq\frac{C_{T}}{N^{(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)}}. \tag{7.15}\]

We can then plug in (7.15) into (7.13) to obtain our desired result. 

With the absence of initialisation in the sequence \(\varphi_{m}^{N}(h)\), one can prove that \(\varphi_{m}^{N}(h)\) is surely bounded for any \(h\in\mathcal{H}\).

**Lemma 7.9**.: _For \(m\leq\lfloor NT\rfloor\) and \(h\in\mathcal{H}\), \(|\varphi_{m}^{N}(h)|\leq C_{T}\) surely. Moreover, \(\varphi_{m}^{N}(h)\) is \(C_{T}\) globally Lipschitz with respect to the \(H^{1}(\lambda)\) norm whenever \(m\leq\lfloor NT\rfloor\). Finally, consider the map for \(\mathsf{H}=(\mathsf{x},\mathsf{z},\mathsf{y},\mathsf{h})\)_

\[G^{m,h}:\mathsf{H}\in\mathcal{X}\mapsto-\alpha(\varphi_{m}^{N}(\varsigma( \mathsf{H}))-\mathsf{y})\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h}),\]

_so that_

\[N\times\triangle\varphi_{m}^{N}(h)=G^{m,h}(X_{m},Z_{m},Y_{m},h_{m}). \tag{7.16}\]

_Then for fixed \(h\in\mathcal{H}\) and \(m\leq\lfloor NT\rfloor\),_

* \(\int|G^{m,h}|\,d\mu<+\infty\)_, where_ \(\mu\) _is the invariant measure of chain_ \((H_{k})\) _as induced in Theorem_ 3.6_, and_
* \(G^{m,h}\) _is_ \(C_{T}\)_-Lipschitz in_ \(\mathcal{X}\)_._

Proof.: From the evolution equation, one sees that

\[\left|\varphi_{m}^{N}(h)\right|\leq\frac{C}{N}\sum_{k=0}^{m-1}(\left|\varphi_ {k}^{N}(h_{k+1})\right|+C), \tag{7.17}\]

The above equation is true for \(h=h_{k+1}\), so by discrete Gronwall's inequality one has

\[\left|\varphi_{m}^{N}(h_{m+1})\right|\leq C\exp(Cm/N)\leq Ce^{CT}=:C_{T}.\]

Substituting this into (7.17) yields our estimate \(|\varphi_{m}^{N}(h)|\leq C\). To show the global Lipschitzness of \(\varphi_{m}^{N}(\cdot)\), we note that for any \(h,\tilde{h}\in H^{1}(\lambda)\)

\[|\varphi_{m}^{N}(h)-\varphi_{m}^{N}(\tilde{h})| \leq\sum_{k=0}^{m}\frac{\alpha}{N}|\varphi_{k}^{N}(h_{k+1})-Y_{k} |\int\left[|h(w)-\tilde{h}(w)|+|\nabla h(w)-\nabla\tilde{h}(w)|\right]\, \lambda(dw)\] \[\leq C_{T}\left\|h-\tilde{h}\right\|_{H^{1}(\lambda)}. \tag{7.18}\]
It is then immediately true that \(\int|G^{m,h}(\mathsf{x},\mathsf{z},\mathsf{y},\mathsf{h})|\,\mu(d\mathsf{x},d \mathsf{z},d\mathsf{y},d\mathsf{h})<+\infty\). Finally we recall that if \((x,z,y,h)\in\mathcal{X}\) then \(|x|\leq 1\) and \(|y|\leq C_{y}\), and that \(|\mathcal{K}_{x,\lambda}(h,\mathsf{h})|\leq C\). Therefore, for any \(\mathsf{H}=(\mathsf{x},\mathsf{z},\mathsf{y},\mathsf{h}),\tilde{\mathsf{H}}=( \tilde{\mathsf{x}},\tilde{\mathsf{z}},\tilde{\mathsf{y}},\tilde{\mathsf{h}})\) with \(|\mathsf{x}|\vee|\tilde{\mathsf{x}}|\leq 1\) and \(|\mathsf{y}|\vee|\tilde{\mathsf{y}}|\leq C_{y}\),

\[|\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h})-\mathcal{K}_{ \mathsf{x},\lambda}(h,\tilde{\mathsf{h}})| \leq\alpha\Big{[}\left<\left|h(w)\right|\sigma(w^{\top}\mathsf{x }+\langle b^{\prime}\mathsf{h}(w^{\prime}),\lambda\rangle)-\sigma(w^{\top} \tilde{\mathsf{x}}+\langle b^{\prime}\tilde{\mathsf{h}}(w^{\prime}),\,\lambda \rangle)|,\,\lambda\right>\] \[\quad+\left<c^{2}|\nabla h(w)||\sigma^{\prime}(w^{\top}\mathsf{x }+\langle b^{\prime}\mathsf{h}(w^{\prime}),\lambda\rangle)-\sigma^{\prime}(w^ {\top}\tilde{\mathsf{x}}+\langle b^{\prime}\tilde{\mathsf{h}}(w^{\prime}),\, \lambda\rangle)|,\,\lambda\right>\Big{]}\] \[\leq 4\alpha C_{\sigma}\left[\int w^{\top}(\mathsf{x}-\tilde{ \mathsf{x}})\,\lambda(dw)+\int|\mathsf{h}(w^{\prime})-\tilde{\mathsf{h}}(w^{ \prime})|\,\lambda(dw^{\prime})\right]\] \[\leq 4\alpha C_{\sigma}\left[|\mathsf{x}-\tilde{\mathsf{x}}|+\| \mathsf{h}-\tilde{\mathsf{h}}\|_{H^{1}(\lambda)}\right].\]

We also recall the controls from inequality (6.5)

\[\|[\varsigma(\mathsf{H})](w)-\varsigma(\tilde{\mathsf{H}})](w)\| ^{2}_{H^{1}(\lambda)} =\left\|\sigma(w^{\top}\mathsf{x}+\langle b^{\prime}\mathsf{h}( w^{\prime}),\lambda\rangle)-\sigma(w^{\top}\tilde{\mathsf{x}}+\langle b^{ \prime}\tilde{\mathsf{h}}(w^{\prime}),\lambda\rangle)\right\|^{2}_{H^{1}( \lambda)}\] \[\leq 8C_{\sigma}^{2}\left[|\mathsf{x}-\tilde{\mathsf{x}}|^{2}+\| \mathsf{h}-\tilde{\mathsf{h}}\|^{2}_{H^{1}(\lambda)}\right],\] \[\leq 8C_{\sigma}^{2}\|\mathsf{H}-\tilde{\mathsf{H}}\|^{2} \tag{7.19}\]

so by (7.18) we have

\[\left|\varphi_{m}^{N}(\varsigma(\mathsf{H}))-\varphi_{m}^{N}(\varsigma(\tilde{ \mathsf{H}}))\right|^{2}\leq C_{T}\|\mathsf{H}-\tilde{\mathsf{H}}\|^{2}_{ \mathcal{X}},\]

This yields the following control

\[\implies\,|G^{m,h}(\mathsf{H})-G^{m,h}(\tilde{\mathsf{H}})| \leq\alpha|\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h})|\left[ \left|\varphi_{m}^{N}(\varsigma(\mathsf{H}))-\varphi_{m}^{N}(\varsigma(\tilde {\mathsf{H}}))\right|+|\mathsf{y}-\tilde{\mathsf{y}}|\right]\] \[\leq C_{T}\|\mathsf{H}-\tilde{\mathsf{H}}\|_{\mathcal{X}},\]

which completes our proof. In particular, the Lipschitz constant for \(G^{0,h}\) is independent from \(T\) as \(\varphi_{0}^{N}(\cdot)\) is set to zero. 

### Weak convergence analysis

We study the difference between the random evolution

\[\varphi_{m}^{N}(h)=\sum_{k=0}^{m-1}\triangle\varphi_{k}^{N}(h)\]

and the evolution

\[\tilde{\varphi}_{m}^{N}(h)=\sum_{k=0}^{m-1}\delta\varphi_{k}^{N}(h),\]

where

\[\delta\varphi_{k}^{N}(h)=-\frac{\alpha}{N}\int_{\mathcal{X}}(\varphi_{k}^{N}( \varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{ h})\,\mu(d\mathsf{H}).\]

We study this difference by first constructing the associated Poisson equation of the chain of memories [27]. We write the transition kernel of the Markov chain \((H_{k})_{k\geq 1}\) as \(P\), and recall that the Markov chain admits a limiting invariant measure \(\mu\).
**Definition 7.10**.: Given \(G:\mathcal{X}\to\mathbb{R}\) a measurable function with \(\int|G|d\mu<+\infty\), the Poisson equation is a functional equation on \(\hat{G}\)

\[\hat{G}(H)-\int_{\mathcal{X}}\hat{G}(\bar{H})\,P(H,d\bar{H})=G(H)-\int_{ \mathcal{X}}G(\bar{H})\,\mu(d\bar{H}), \tag{7.20}\]

where \(H=(x,z,y,h)\), \(\bar{H}=(\bar{x},\bar{z},\bar{y},\bar{h})\), and \(P\) is the transitional kernel of the Markov Chain \((H_{k})\).

In our case, the Poisson equation is used to replace the integral with respect to the invariant measure \(\mu\) with an integral with respect to the transition kernel \(P\). We note that the following expansion converges for any \(H=(x,z,y,h)\in\mathcal{X}\) if \(G\) is globally \(C\)-Lipschitz:

\[\hat{G}(H)=\sum_{k=0}^{\infty}\left(\int_{\mathcal{X}}G(\bar{H})\,P^{k}(H,d \bar{H})-\int_{\mathcal{X}}G(\bar{H})\,\mu(d\bar{H})\right), \tag{7.21}\]

where \(P^{k}=\underbrace{P\circ...\circ P}_{k\text{ times}}\). This is because

\[\left|\int_{\mathcal{X}}G(\bar{H})P^{k}(H,d\bar{H})-\int_{\mathcal{X}}G(\bar {H})\mu(d\bar{H})\right|\leq C\mathsf{Wass}_{2}(P^{k}(H,\cdot),\mu)\leq Cq_{0} ^{k}. \tag{7.22}\]

As a result, for all \(H\)

\[|\hat{G}(H)|=\left|\sum_{k=0}^{\infty}\left(\int_{\mathcal{X}}G(\bar{H})\,P^{ k}(H,d\bar{H})-\int_{\mathcal{X}}G(\bar{H})\,\mu(d\bar{H})\right)\right| \leq\sum_{k=0}^{\infty}Cq_{0}^{k}=\frac{C}{1-q_{0}}<+\infty. \tag{7.23}\]

**Lemma 7.11**.: _Let \(G\) be a globally \(C\)-Lipschitz function on \(\mathcal{X}\), and define \(\hat{G}\) as in (7.21). Then \(\hat{G}\) is the solution to the Poisson equation (7.20). Moreover \(\hat{G}\) is \(C/(1-q_{0})\)-Lipschitz, where \(q_{0}\) is as defined in Theorem 3.6_

Proof.: We observe that

\[\int_{\mathcal{X}}\hat{G}(\bar{H})\,P(H,d\bar{H})=\int_{\mathcal{X}}\left[\sum _{k=0}^{\infty}\left(\int_{\mathcal{X}}G(\mathsf{H})\,P^{k}(\bar{H},d\mathsf{ H})-\int_{\mathcal{X}}G(\mathsf{H})\,\mu(d\mathsf{H})\right)\right]\,P(H,d \bar{H}).\]

We can exchange the sum and the integral as the integrand is summable (hence integrable). Noting that \(\mu\) is invariant, we have

\[\int_{\mathcal{X}}\hat{G}(\bar{H})\,P(H,d\bar{H})=\sum_{k=0}^{\infty}\left( \int_{\mathcal{X}}G(\bar{H})P^{k+1}(H,d\bar{H})-\int_{\mathcal{X}}G(\bar{H}) \mu(d\bar{H})\right).\]

Subtracting this from \(\hat{G}(H)\) yields

\[\hat{G}(H)-\int_{\mathcal{X}}\hat{G}(\bar{H})\,P(H,d\bar{H})=\int_{\mathcal{X} }\hat{G}(\bar{H})\,P^{0}(H,d\bar{H})-\int_{\mathcal{X}}G(\bar{H})\,\mu(d\bar{ H})=G(H)-\int_{\mathcal{X}}G(\bar{H})\,\mu(d\bar{H})\]

as desired. We further note that if \(H^{\prime}=(x^{\prime},z^{\prime},y^{\prime},h^{\prime})\), then

\[|\hat{G}(H)-\hat{G}(H^{\prime})| \leq\sum_{k=0}^{\infty}\left|\int_{\mathcal{X}}G(\bar{H})\,P^{k} (H,d\bar{H})-\int_{\mathcal{X}}G(\bar{H})\,P^{k}(H^{\prime},d\bar{H})\right|\] \[\leq C\sum_{k=0}^{\infty}\mathsf{Wass}_{2}(P^{k}(H,\cdot),P^{k}(H ^{\prime},\cdot))\] \[\leq C\|H-H^{\prime}\|_{\mathcal{X}}\sum_{k=0}^{\infty}q_{0}^{k} \leq\frac{C}{1-q_{0}}\|H-H^{\prime}\|_{\mathcal{X}},\]

completing the proof.
We now consider the Poisson equations with \(G(\mathsf{H})=G^{m,h}(\mathsf{H})\) as defined in lemma 7.9. These Poisson equations admit a solution for each \(m\leq\lfloor NT\rfloor\) using the expansion in (7.21), for which we will call them \(\hat{G}^{m,h}(\mathsf{H})\). In summary we have

\[\hat{G}^{m,h}(\mathsf{H})-\int_{\mathcal{X}}\hat{G}^{m,h}(\bar{\mathsf{H}})\,P( \mathsf{H},d\bar{\mathsf{H}})=G^{m,h}(\mathsf{H})-\int_{\mathcal{X}}G^{m,h}( \bar{\mathsf{H}})\,\mu(d\bar{\mathsf{H}}). \tag{7.24}\]

It is important to note from the above analysis that, since there is a constant \(C_{T}>0\) such that \(G^{m,h}(\mathsf{H})\) is \(C_{T}\)-Lipschitz (Lemma 7.9) for \(m\leq\lfloor NT\rfloor\) and \(h\in\mathcal{H}\), the above analysis shows that Corollary 7.12 below holds.

**Corollary 7.12**.: \[\sup_{h,\mathsf{H}}|\hat{G}^{m,h}(\mathsf{H})|\leq C_{T},\]

_and that \(\hat{G}^{m,h}(\cdot)\) is \(C_{T}/(1-q_{0})\) Lipschitz._

With this, we could study the difference between \(\varphi_{m}^{N}(h)\) and \(\tilde{\varphi}_{m}^{N}(h)\) for any \(h\in\mathcal{H}\) and \(m\leq\lfloor NT\rfloor\). Recalling that \(H_{k}=(X_{k},Z_{k},Y_{k},h_{k})\) and letting \(\bar{\mathsf{H}}=(\bar{\mathsf{x}},\bar{\mathsf{z}},\bar{\mathsf{y}},\bar{ \mathsf{h}})\), we have

\[\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N}(h)=\sum_{k=0}^{m-1}( \triangle\varphi_{k}^{N}(h)-\delta\varphi_{k}^{N}(h))\] \[=\frac{1}{N}\sum_{k=0}^{m-1}\left(G^{k,h}(H_{k})-\int_{\mathcal{X }}G^{k,h}(\bar{\mathsf{H}})\,\mu(d\bar{\mathsf{H}})\right)\] \[=\frac{1}{N}\sum_{k=0}^{m-1}\left(\hat{G}^{k,h}(H_{k})-\int_{ \mathcal{X}}\hat{G}^{k,h}(\bar{\mathsf{H}})\,P(H_{k},d\bar{\mathsf{H}})\right)\] \[=Q^{N,1}(h)+Q^{N,2}(h)+R^{N,1}(h), \tag{7.25}\]

where

\[Q_{m}^{N,1}(h) =\frac{1}{N}\sum_{k=1}^{m-1}\left(\hat{G}^{k,h}(H_{k})-\int_{ \mathcal{X}}\hat{G}^{k,h}(\bar{\mathsf{H}})\,P(H_{k-1},d\bar{\mathsf{H}})\right)\] \[Q_{m}^{N,2}(h) =\frac{1}{N}\sum_{k=1}^{m-1}\left(\int_{\mathcal{X}}\hat{G}^{k,h }(\bar{\mathsf{H}})\,P(H_{k-1},d\bar{\mathsf{H}})-\int_{\mathcal{X}}\hat{G}^{ k,h}(\bar{\mathsf{H}})\,P(H_{k},d\bar{\mathsf{H}})\right)\] \[R^{N,1}(h) =\frac{1}{N}\left(\hat{G}^{0,h}(H_{0})-\int_{\mathcal{X}}\hat{G }^{0,h}(\bar{\mathsf{H}})\,P(H_{0},d\bar{\mathsf{H}})\right)\]

Corollary 7.12 immediately leads to

\[\sup_{h\in\mathcal{H}}|R^{N,1}(h)|\leq\frac{C_{T}}{N}\overset{N\to\infty}{ \rightarrow}0.\]

The second term on the RHS of (7.2), i.e. \(Q_{m}^{N,2}\), could be analysed by observing that

\[Q_{m}^{N,2}(h) =\frac{\alpha}{N}\sum_{k=1}^{m-1}\left(\int_{\mathcal{X}}\hat{G} ^{k,h}(\bar{H})\,P(H_{k-1},d\bar{H})-\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{H}) \,P(H_{k},d\bar{H})\right)\] \[=\frac{\alpha}{N}\left(\int_{\mathcal{X}}\hat{G}^{1,h}(\bar{H})P( H_{0},d\bar{H})+\sum_{k=2}^{m-1}\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{H})\,P(H_{k-1},d \bar{H})-\sum_{k=1}^{m-1}\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{H})\,P(H_{k},d \bar{H}))\right)\] \[=\frac{\alpha}{N}\left(\int_{\mathcal{X}}\hat{G}^{1,h}(\bar{H})P( H_{0},d\bar{H})+\sum_{k=1}^{m-2}\int_{\mathcal{X}}\hat{G}^{k+1,h}(\bar{H})\,P(H_{k},d \bar{H})-\sum_{k=1}^{m-1}\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{H})\,P(H_{k},d \bar{H}))\right)\] \[=\frac{\alpha}{N}\sum_{k=1}^{m-2}\int_{\mathcal{X}}(\hat{G}^{k+1,h }(\bar{H})-\hat{G}^{k,h}(\bar{H}))\,P(H_{k},d\bar{H})+R_{m}^{N,2}(h),\]
where

\[R_{m}^{N,2}(h)=\frac{\alpha}{N}\bigg{(}\int_{\mathcal{X}}\hat{G}^{1,h}(\bar{H})P(H _{0},d\bar{H})-\int_{\mathcal{X}}\hat{G}^{m-1,h}(\bar{H})\,P(H_{m-1},d\bar{H})) \bigg{)}\]

We therefore naturally break our analysis of \(Q_{m}^{N,2}\) into two parts:

**Lemma 7.13**.: _If \(m\leq\lfloor NT\rfloor\), then \(\sup_{h\in\mathcal{H}}|R_{m}^{N,2}(h)|\leq C_{T}/N\)._

Proof.: We note that \(\hat{G}^{1,h}\) is \(C\)-Lipschitz by Lemma 7.11. Moreover, since \(G^{m,h}\) is \(C_{T}\)-Lipschitz whenever \(m\leq\lfloor NT\rfloor\), we know from Corollary 7.12 that \(\hat{G}^{m,h}(\cdot)\) is bounded by some constant \(C_{T}>0\) as well.

\[|R_{m}^{N,2}(h)| \leq\frac{\alpha}{N}\bigg{[}\bigg{|}\int_{\mathcal{X}}\hat{G}^{1, h}(\bar{H})\,P(H_{0},d\bar{H})-\int_{\mathcal{X}}\hat{G}^{1,h}(\bar{H})\,P(H_{m- 1},d\bar{H})\bigg{|}\] \[\quad+\bigg{|}\int_{\mathcal{X}}\hat{G}^{1,h}(\bar{H})\,P(H_{m- 1},d\bar{H})-\int_{\mathcal{X}}\hat{G}^{m-1,h}(\bar{H})\,P(H_{m-1},d\bar{H}) \bigg{|}\,\bigg{]}\] \[\leq\frac{\alpha}{N}\left(\mathcal{CWass}_{2}(P(H_{0},\cdot),P(H_ {m-1},\cdot))+C_{T}+C_{T}\right)\leq\frac{C_{T}}{N},\]

for a constant \(C_{T}\) that depends on \(T\) but changes from line to line. 

**Lemma 7.14**.: _For \(t\leq T\), there are \(C_{T}>0\) such that for all \(m\leq\lfloor NT\rfloor\),_

\[\sup_{\mathsf{H}\in\mathcal{X}}|\Delta\hat{G}^{m,h}(\mathsf{H})|\leq\frac{C_{ T}}{N},\]

_where \(\Delta\hat{G}^{m,h}(\mathsf{H})=\hat{G}^{m+1,h}(\mathsf{H})-\hat{G}^{m,h}( \mathsf{H})\)._

Proof.: Define \(\Delta G^{m,h}(\mathsf{H})=G^{m+1,h}(\mathsf{H})-G^{m,h}(\mathsf{H})\), then we see that \(\Delta\hat{G}^{m,h}(\mathsf{H})\) is a solution to the Poisson equation for \(\Delta G^{m,h}(\mathsf{H})\), i.e.

\[\Delta\hat{G}^{m,h}(\mathsf{H})-\int_{\mathcal{X}}\Delta\hat{G}^{m,h}(\bar{H} )\,P(\mathsf{H},d\bar{H})=G^{m,h}(\mathsf{H})-\int_{\mathcal{X}}\Delta G^{m,h }(\bar{\mathsf{H}})\,\mu(d\bar{\mathsf{H}}),\]

As seen in (7.22)-(7.23), the boundedness of \(\Delta\hat{G}^{m,h}(\mathsf{H})\) depends on the Lipschitz constants of \(\Delta G^{m,h}(\mathsf{H})\). The proof is completed if we prove that \(\Delta G^{m,h}(\mathsf{H})\) is \(C_{T}/N\)-Lipschitz. To begin, we note that

\[\Delta G^{m,h}(\mathsf{H}) =G^{m+1,h}(\mathsf{H})-G^{m,h}(\mathsf{H})\] \[=\alpha(\varphi_{m+1}^{N}(\varsigma(\mathsf{H}))-\varphi_{m}^{N}( \varsigma(\mathsf{H})))\mathcal{K}_{\kappa,\lambda}(h,\mathsf{h})\] \[\stackrel{{\eqref{eq:C_T}}}{{=}}\frac{\alpha}{N}G^{m, \varsigma(\mathsf{H})}(H_{m})\mathcal{K}_{\kappa,\lambda}(h,\mathsf{h}),\]

where \(H_{m}=(X_{m},Z_{m},Y_{m},h_{m})\). Since we know a-priori that \(|(X_{m},Z_{m})|\leq 1,|Y_{m}|\leq C_{y}\) and \(\|h_{m}\|_{C_{b}^{2}}\leq C\)
we have the following control

\[|\mathcal{K}_{X_{m},\lambda}(\varsigma(\mathsf{H}),h_{m})-\mathcal{K }_{X_{m},\lambda}(\varsigma(\tilde{\mathsf{H}}),h_{m})|\] \[\leq\langle|\sigma(w^{\top}X_{m}+\langle b^{\prime}h_{m}(w^{ \prime}),\lambda)\rangle([\varsigma(\mathsf{H})](w)-[\varsigma(\tilde{ \mathsf{H}})](w))|\] \[\quad+c^{2}|\sigma^{\prime}(w^{\top}X_{m}+\langle b^{\prime}h_{m }(w^{\prime}),\lambda))(\nabla[\varsigma(\mathsf{H})](w)-\nabla[\varsigma( \tilde{\mathsf{H}})](w))^{\top}X_{m}|,\lambda\rangle\] \[\leq\int_{\mathbb{R}^{d}}|\varsigma(\tilde{\mathsf{H}})(w)- \varsigma(\tilde{\mathsf{H}})(w)|\,\lambda(dw)+C_{\sigma}\int_{\mathbb{R}^{d}} |\nabla\varsigma(\tilde{\mathsf{H}})(w)-\nabla\varsigma(\tilde{\mathsf{H}})( w)||X_{m}|\,\lambda(dw)\] \[\leq(1+C_{\sigma})\|\varsigma(\mathsf{H})-\varsigma(\tilde{ \mathsf{H}})\|_{H^{1}(\lambda)}\stackrel{{\eqref{eq:C_T}}}{{ \leq}}CC_{\sigma}(1+C_{\sigma})\|\mathsf{H}-\tilde{\mathsf{H}}\|_{\mathcal{X}}\] \[\implies |G^{m,\varsigma(\mathsf{H})}(H_{m})-G^{m,\varsigma(\tilde{ \mathsf{H}})}(H_{m})|\] \[\leq\alpha|\varphi_{m}^{N}(\sigma(w^{\top}X_{m}+\langle b^{\prime }h_{m}(w^{\prime}),\,\lambda)))-Y_{m}||\mathcal{K}_{X_{m},\lambda}(\varsigma( \mathsf{H}),h_{m})-\mathcal{K}_{X_{m},\lambda}(\varsigma(\tilde{\mathsf{H}}),h_{m})|\] \[\leq C_{T}\|\mathsf{H}-\tilde{\mathsf{H}}\|_{\mathcal{X}}.\] \[\implies |\Delta G^{m,h}(\mathsf{H})-\Delta G^{m,h}(\tilde{\mathsf{H}})|\] \[=\frac{\alpha}{N}|K_{\varsigma,\lambda}(h,\tilde{\mathsf{h}})(G^{ m,\varsigma(\mathsf{H})}(H_{m})-G^{m,\varsigma(\tilde{\mathsf{H}})}(H_{m}))+G^{m, \varsigma(\tilde{\mathsf{H}})}(H_{m})(\mathcal{K}_{\varsigma,\lambda}(h, \mathsf{h})-\mathcal{K}_{\tilde{\varsigma},\lambda}(h,\tilde{\mathsf{h}}))|\] \[\leq\frac{C_{T}}{N}\|\mathsf{H}-\tilde{\mathsf{H}}\|_{\mathcal{X}}.\]

So indeed \(\Delta G^{m,h}(\mathsf{H})\) is \(C_{T}/N\)-Lipschitz whenever \(m\leq\lfloor NT\rfloor\), and therefore there is another \(C_{T}>0\) such that \(\sup_{\mathsf{H}\in\mathcal{X}}|\Delta\hat{G}^{m,h}|\leq C_{T}\). 

The above lemmas lead to the control

\[\sup_{h\in\mathcal{H}}|Q_{m}^{N,2}(h)|\leq\frac{\alpha}{N}\sum_{k=1}^{m-2} \frac{C_{T}}{N}+\sup_{h\in\mathcal{H}}|R_{m}^{N,2}(h)|\leq\frac{C_{T}}{N}.\]

Finally, let's analyze the term \(Q_{m}^{N,1}(h)\). Define the term

\[\tilde{g}_{k}^{N}(h)=\hat{G}^{k,h}(H_{k})-\int_{\mathcal{X}}\hat{G}^{k,h}( \bar{\mathsf{H}})\,P(H_{k-1},d\bar{\mathsf{H}}),\quad k\geq 1,\]

so that \(Q_{m}^{N,1}(h)=(\alpha\sum_{k=1}^{m-1}\tilde{g}_{k}^{N}(h))/N\). We define the increasing filtration \(\{\mathcal{F}_{m}\}\), with \(\mathcal{F}_{m}\) the smallest \(\sigma\)-algebra induced by the random variables \((H_{k})_{k\leq m}\). Then \(\{\varphi_{k}^{N}(h)\}_{k\leq m}\) are \(\mathcal{F}_{m-1}\) measurable for any \(h\in\mathcal{H}\), as they are continuous functions in terms of \((H_{k})_{k\leq m-1}\). Therefore, we have

\[\mathbb{E}[\tilde{g}_{k}^{N}(h)\,|\,\mathcal{F}_{k-1}]=\mathbb{E}[\mathbb{E}[ \tilde{g}_{k}^{N}(h)\,|\,\varphi_{k}^{N}]\,|\,\mathcal{F}_{k-1}]=\mathbb{E}[ \hat{G}^{k,h}(H_{k})\,|\,H_{k-1}]-\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{\mathsf{ H}})\,P(H_{k-1},d\bar{\mathsf{H}})=0.\]

If we define \(H_{k:m}\) being the sequence \((H_{k},...,H_{m})\), and \(\sigma(\varphi_{k:m}^{N}(h))\) being the smallest \(\sigma\)-algebra so that each of the random variables \(\varphi_{k:m}^{N}(h)\) is measurable, then for \(m>k\) we can prove recursively

\[\mathbb{E}[\tilde{g}_{k}^{N}(h)\tilde{g}_{m}^{N}(h)\,|\,\mathcal{F }_{k-1}] =\mathbb{E}[\mathbb{E}[g_{k}^{N}(h)g_{m}^{N}(h)\,|\,H_{m-1},\sigma( \varphi_{m-1}^{N}(h))]\,|\,\mathcal{F}_{k-1}]\] \[=\mathbb{E}[\mathbb{E}[g_{k}^{N}(h)g_{m}^{N}(h)\,|\,H_{k-1:m-1}, \sigma(\varphi_{k-1:m-1}^{N}(h))]\,|\,\mathcal{F}_{k-1}]\] \[=\mathbb{E}[g_{k}^{N}(h)\mathbb{E}[g_{m}^{N}(h)\,|\,H_{k-1:m-1}, \sigma(\varphi_{k-1:m-1}^{N}(h))]\,|\,\mathcal{F}_{k-1}]=0.\]

Finally, notice that \(\hat{G}^{k,h}(\cdot)\) is uniformly bounded (see Corollary 7.12), we have

\[\mathbb{E}\left[(\tilde{g}_{k}^{N}(h))^{2}\right] \leq\mathbb{E}\left[\hat{G}^{k,h}(H_{k})-\int_{\mathcal{X}}\hat{G}^ {k,h}(\bar{\mathsf{H}})\,P(H_{k-1},d\bar{\mathsf{H}})\right]^{2}\] \[\leq 2\mathbb{E}\left[\hat{G}^{k,h}(H_{k})\right]^{2}+2\mathbb{E} \left[\int_{\mathcal{X}}\hat{G}^{k,h}(\bar{\mathsf{H}})\,P(H_{k-1},d\bar{ \mathsf{H}})\right]^{2}\leq C_{T}.\]
Therefore

\[\mathbb{E}[Q^{N,1}(h)]^{2}=\frac{\alpha^{2}}{N^{2}}\sum_{j,k=1}^{\lfloor Nt\rfloor-1 }\mathbb{E}[\tilde{g}_{j}^{N}(h)\tilde{g}_{k}^{N}(h)]=\frac{\alpha^{2}}{N^{2}} \sum_{k=1}^{\lfloor Nt\rfloor-1}\mathbb{E}[(\tilde{g}_{k}^{N}(h))^{2}]\leq\frac {C_{T}}{N}.\]

The above estimates are uniform for all \(h\in\mathcal{H}\), so by combining all of them we have

**Lemma 7.15**.: _For all \(m\leq\lfloor NT\rfloor\),_

\[\sup_{h}\mathbb{E}\left[\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N}(h)\right] ^{2}\leq\frac{C_{T}}{N}.\]

Proof.: We collect the above estimates to show that

\[\sup_{h}\mathbb{E}\left[\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N }(h)\right]^{2} \leq\sup_{h}\mathbb{E}\left[Q^{N,1}(h)\right]^{2}+\sup_{h}\mathbb{ E}\left[Q^{N,2}(h)\right]^{2}+\sup_{h}\mathbb{E}\left[R^{N,1}(h)\right]^{2}\] \[\leq\frac{C_{T}}{N}+\frac{C_{T}}{N^{2}}+\frac{C_{T}}{N^{2}}\leq \frac{C_{T}}{N}.\]

Let us then define a new process \(\phi_{t}^{N}(h)\) that satisfies the recursion

\[\phi_{m}^{N}(h) =\sum_{k=0}^{m-1}\delta\phi_{m}^{N}(h),\quad\phi_{0}^{N}(h)=0,\] \[\delta\phi_{k}^{N}(h) =-\frac{\alpha}{N}\int_{\mathcal{X}}(\phi_{k}^{N}(\varsigma( \mathsf{H}))-\mathsf{y})\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h})\,\mu(d \mathsf{H}),\]

and study the difference \(\Gamma_{m}^{N}(h)=\varphi_{m}^{N}(h)-\phi_{m}^{N}(h)\). Then we have

\[\Gamma_{m}^{N}(h) =\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N}(h)+\tilde{\varphi}_{ m}^{N}(h)-\phi_{m}^{N}(h)\] \[=\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N}(h)-\frac{\alpha}{N} \sum_{k=0}^{m-1}\int_{\mathcal{X}}\Gamma_{k}^{N}(\varsigma(\mathsf{H}))\, \mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h})\,\mu(d\mathsf{H}).\]

So

\[\mathbb{E}\left[\Gamma_{m}^{N}(h)\right]^{2} \leq 2\mathbb{E}[\varphi_{m}^{N}(h)-\tilde{\varphi}_{m}^{N}(h)]^{ 2}+\frac{2\alpha}{N^{2}}\mathbb{E}\left[\sum_{k=0}^{m-1}\int_{\mathcal{X}} \Gamma_{k}^{N}(\varsigma(\mathsf{H}))\,\mathcal{K}_{\mathsf{x},\lambda}(h, \mathsf{h})\,\mu(d\mathsf{H})\right]^{2}\] \[\leq\frac{C_{T}}{N}+\frac{2\alpha}{N}\sum_{k=0}^{m-1}\mathbb{E} \left[\int_{\mathcal{X}}\left(\Gamma_{k}^{N}(\varsigma(\mathsf{H}))\mathcal{K }_{\mathsf{x},\lambda}(h,\mathsf{h})\right)^{2}\,\mu(d\mathsf{H})\right]\] \[\stackrel{{\text{(Tonelli)}}}{{=}}\frac{C_{T}}{N}+ \frac{2\alpha}{N}\sum_{k=0}^{m-1}\int_{\mathcal{X}}\mathbb{E}\left[\Gamma_{k} ^{N}(\varsigma(\mathsf{H}))\mathcal{K}_{\mathsf{x},\lambda}(h,\mathsf{h}) \right]^{2}\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h})\] \[\leq\frac{C_{T}}{N}+\frac{C}{N}\sum_{k=0}^{m-1}\int_{\mathcal{X} }\sup_{\mathsf{h}\in\mathcal{H}}\mathbb{E}\left[\Gamma_{k}^{N}(\mathsf{h}) \right]^{2}\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h}).\]

Defining further \(\tilde{\Gamma}_{m}^{N}=\sup_{\mathsf{h}\in\mathcal{H}}\mathbb{E}[\Gamma_{m}^{N} (\mathsf{h})]^{2}\), we have

\[\tilde{\Gamma}_{m}^{N}\leq\frac{C_{T}}{N}+\frac{C_{T}}{N}\sum_{k=0}^{m-1} \tilde{\Gamma}_{k}^{N}.\]

So by discrete Gronwall inequality we have
**Lemma 7.16**.: _For all \(m\leq\lfloor TN\rfloor\) we have_

\[\tilde{\Gamma}_{m}^{N}=\sup_{\mathfrak{h}\in\mathcal{H}}\mathbb{E}[\Gamma_{m}^{N} (\mathfrak{h})]^{2}=\sup_{\mathfrak{h}\in\mathcal{H}}\mathbb{E}[\varphi_{m}^{N} (\mathfrak{h})-\phi_{m}^{N}(\mathfrak{h})]^{2}\leq\frac{C_{T}}{N}\exp\left( \frac{mC_{T}}{N}\right)\leq\frac{C_{T}\exp(TC_{T})}{N}=\frac{C_{T}}{N}.\]

Finally, define \(\tilde{\phi}_{t}^{N}(h)=\phi_{\lfloor Nt\rfloor}^{N}(h)\) be a time-rescaled evolution of \(\phi_{m}^{N}(h)\), and recall our desired limiting equation is

\[g_{t}(h)=-\alpha\int_{0}^{t}\left[\int_{\mathcal{X}}(g_{s}(\varsigma( \mathsf{H}))-\mathsf{y}))\mathcal{K}_{\varsigma,\lambda}(h,\mathfrak{h})\, \mu(d\mathsf{h})\right]\,ds,\quad g_{0}(h)=0.\]

**Lemma 7.17**.: _As \(N\to+\infty\), we have_

\[\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}|\tilde{\phi}_{t}^{N}(h)-g_{t}(h)|\leq \frac{C_{T}}{N}.\]

Proof.: Let

\[\Upsilon_{t}^{N}(h)=\phi_{t}^{N}(h)-g_{t}(h),\quad\tilde{\Upsilon}_{t}^{N}= \sup_{h}|\Upsilon_{t}^{N}(h)|,\]

then for \(m\leq\lfloor NT\rfloor\),

\[\left|\Upsilon_{(m+1)/N}^{N}(h)\right| =|\tilde{\phi}_{(m+1)/N}^{N}(h)-\tilde{\phi}_{m/N}^{N}(h)-g_{(m+1 )/N}(h)+g_{m/N}(h)+\Upsilon_{m/N}^{N}(h)|\] \[\leq|\phi_{m+1}^{N}(h)-\phi_{m}^{N}(h)+g_{(m+1)/N}(h)-g_{m/N}(h)| +|\Upsilon_{m/N}^{N}(h)|\] \[\leq\left|-\frac{\alpha}{N}\int_{\mathcal{X}}(\phi_{m}^{N}( \varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{\varsigma,\lambda}(h,\mathfrak{ h})\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h})\right.\] \[\quad-\alpha\int_{m/N}^{(m+1)/N}\int_{\mathcal{X}}(g_{s}( \varsigma(\mathsf{H}))-\mathsf{y})\mathcal{K}_{\varsigma,\lambda}(h,\mathfrak{ h})\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h})\,dt\right|+|\Upsilon_{m/N}^{N} (h)|\] \[\leq\alpha\bigg{|}\int_{m/N}^{(m+1)/N}\int_{\mathcal{X}}(\phi_{m}^ {N}(\varsigma(\mathsf{H})-g_{m/N}(\varsigma(\mathsf{H})+g_{m/N}(\varsigma( \mathsf{H})-g_{s}(\varsigma(\mathsf{H}))\mathcal{K}_{\varsigma,\lambda}(h, \mathfrak{h})\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h})\,dt\bigg{|}\] \[\quad+|\Upsilon_{m/N}^{N}(h)|\] \[\leq\alpha\int_{m/N}^{(m+1)/N}\int_{\mathcal{X}}\left[\left| \Upsilon_{m/N}^{N}(\mathfrak{h})\right|+\left|g_{m/N}(\mathfrak{h})-g_{s}( \mathfrak{h})\right|\left|\mathcal{K}_{\varsigma,\lambda}(h,\mathfrak{h}) \right|\right]\,\mu(d\mathsf{x},d\mathsf{z},d\mathsf{y},d\mathsf{h})\,dt+| \Upsilon_{m/N}^{N}(h)|,\]

The control of the operator norm of \(g_{t}\) by (6.18) suggests that for all \(h\in\mathcal{H}\), \(g_{t}(h)\leq C_{T}\|h\|_{H^{1}(\lambda)}\leq C_{T}\). As a result, for all \(s\in[m/N,(m+1)/N)\) and \(\mathfrak{h}\in\mathcal{H}\),

\[\left|g_{s}(\varsigma(\mathsf{H}))-g_{m/N}(\varsigma(\mathsf{H}))\right|\leq \int_{m/N}^{s}\left|[\mathcal{A}(g_{\tau})](\varsigma(\mathsf{H}))+b(\varsigma (\mathsf{H}))\right|d\tau\leq C_{T}(s-m/N)\leq\frac{C_{T}}{N}.\]

Therefore,

\[\left|\Upsilon_{(m+1)/N}^{N}(h)\right|\leq\frac{\alpha}{N}\left[\tilde{\Upsilon }_{m/N}^{N}+\frac{C_{T}}{N}\right]\,+|\Upsilon_{m/N}^{N}(h)|,\]

and that

\[\tilde{\Upsilon}_{(m+1)/N}^{N}(h)\leq\left(1+\frac{C_{T}}{N}\right)\tilde{ \Upsilon}_{m/N}^{N}+\frac{C_{T}}{N^{2}}.\]

By Lemma (A.1), for all \(m\leq\lfloor TN\rfloor\) we have

\[\sup_{h\in\mathcal{H}}|\tilde{\phi}_{m/N}^{N}(h)-g_{m/N}(h)|=:\tilde{\Upsilon }_{m/N}^{N}(h)\leq\left(1+\frac{C_{T}}{N}\right)^{m}\frac{C_{T}}{N}\leq\frac{C_ {T}\exp(TC_{T})}{N}=\frac{C_{T}}{N}.\]
Finally, for all \(t\leq NT\), define \(m=\lfloor t/N\rfloor\), then

\[\sup_{h\in\mathcal{H}}|\tilde{\phi}_{s}^{N}(h)-g_{s}(h)| \leq\sup_{h\in\mathcal{H}}\underbrace{|\tilde{\phi}_{s}^{N}(h)- \tilde{\phi}_{m/N}^{N}(h)|}_{=0}+\sup_{h\in\mathcal{H}}|\tilde{\Upsilon}_{m/N}^ {N}(h)|+\sup_{h\in\mathcal{H}}|g_{m/N}(h)-g_{s}(h)|\] \[\leq\frac{C_{T}}{N}+\frac{C_{T}}{N}=\frac{C_{T}}{N}.\]

This completes the proof as the above bound is uniform in \(h\in\mathcal{H}\). 

### The final steps

Now, we are in position to prove the main convergence result of this paper.

Proof.: (Proof of Theorem 4.2) As a summary, we collect

* Lemma 7.8: \[\sup_{m\leq NT}\sup_{h\in\mathcal{H}}\mathbb{E}\left|g_{m}^{N}(h)-\varphi_{m}^{ N}(h)\right|\leq\frac{C_{T}}{N^{(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)}}.\]
* Lemma 7.16: \[\sup_{m\leq NT}\sup_{h\in\mathcal{H}}\mathbb{E}[\varphi_{m}^{N}(h)-\phi_{m}^{ N}(h)]^{2}\leq\frac{C_{T}}{N}\implies\sup_{h\in\mathcal{H}}\mathbb{E}|\varphi_{m}^ {N}(h)-\phi_{m}^{N}(h)|\leq\frac{C_{T}}{N^{1/2}}.\]
* Lemma 7.17: \[\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}|\phi_{t}^{N}(h)-g_{t}(h)|\leq\frac{C_{T }}{N}.\]

Adding all of the error terms yields:

\[\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}\mathbb{E}|g_{t}^{N}(h)-g_{ t}(h)| \leq\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}\left[\mathbb{E}|g_{t}^ {N}(h)-\varphi_{t}^{N}(h)|+\mathbb{E}|\varphi_{t}^{N}(h)-\phi_{t}^{N}(h)| \right]+\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}\left[\mathbb{E}|\phi_{t}^{N}(h) -g_{t}(h)|\right]\] \[\leq\sup_{m\leq NT}\sup_{h\in\mathcal{H}}\left[\mathbb{E}|g_{m}^ {N}(h)-\varphi_{m}^{N}(h)|+\mathbb{E}|\varphi_{m}^{N}(h)-\phi_{m}^{N}(h)| \right]+\sup_{t\in[0,T]}\sup_{h\in\mathcal{H}}\left[\mathbb{E}|\phi_{t}^{N}(h) -g_{t}(h)|\right]\] \[\leq\frac{C_{T}}{N^{(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/ 2)}}+\frac{C_{T}}{N^{1/2}}+\frac{C_{T}}{N}\] \[\leq\frac{C_{T}}{N^{\epsilon}}\]

where \(\epsilon=(1-\beta-2\gamma)\wedge\gamma\wedge(\beta-1/2)\wedge 1/2>0\).
Recursive Inequality

Many proofs of the technical lemmas involves the study of a sequence \((a_{k})_{k\geq 0}\) that satisfies the following recursive inequality:

\[a_{k}\leq M_{1}a_{k-1}+M_{2},\]

where \(M_{1},M_{2}\geq 0\). By recursion, we can prove that

**Lemma A.1**.: _For \(M_{1}<1\), we have_

\[a_{k}\leq M_{1}^{k}a_{0}+\frac{1-M_{1}^{k}}{1-M_{1}}M_{2}\leq M_{1}^{k}a_{0}+ \frac{1}{1-M_{1}}M_{2},\]

_and for \(M_{1}>1\), we have_

\[a_{k}\leq M_{1}^{k}a_{0}+\frac{M_{1}^{k}-1}{M_{1}-1}M_{2}\leq M_{1}^{k}\left(a _{0}+\frac{M_{2}}{M_{1}-1}\right).\]

## Appendix B Construction of a clipping function

We consider the function

\[f(x)=\begin{cases}\exp(-1/x)&x>0\\ 0&x\leq 0,\end{cases}\]

which is known to be infinitely smooth (i.e. in \(C^{\infty}(\mathbb{R})\)). Therefore, the function

\[g(x)=\frac{f(x)}{f(x)+f(1-x)}\]

is also infinitely smooth. In particular we have

\[g(x)=\begin{cases}=0&x<0\\ \in[0,1]&x\in[0,1]\\ =1&x>1\end{cases}.\]

Therefore for any \(a<b\), the infinitely smooth function

\[g_{a,b}(x)=g\left(\frac{x-a}{b-a}\right)=\begin{cases}=0&x<a\\ \in[0,1]&x\in[a,b]\\ =1&x>b\end{cases},\]

and that the infinitely smooth function

\[\rho_{N}(x)=g_{-2N^{\gamma},-N^{\gamma}}(-x)g_{-2N^{\gamma},-N^{\gamma}}(x)= \begin{cases}=1&|x|\leq N^{\gamma}\\ \in[0,1]&N^{\gamma}<|x|\leq 2N^{\gamma}\\ =0&|x|>2N^{\gamma}\end{cases}.\]

Finally, the function

\[\psi_{N}(x)=\int_{0}^{x}\rho_{N}(y)\,dy\]

satisfies all the requirement for being a smooth clipping function in definition 2.7: (2) follows by direct computation, and (3) is true by definition (that \(\frac{d}{dx}\psi_{N}(x)=\rho_{N}(x)\)). Finally, (1) follows by Fundamental theorem of calculus. By symmetry we could prove only for the case when \(x>0\), for which

\[|\psi_{N}(x)|\leq\int_{0}^{2N^{\gamma}}|\rho_{N}(y)|\,dy\leq 2N^{\gamma}.\]
## Acknowledgement

The authors would like to acknowledge the use of the University of Oxford Advanced Research Computing (ARC) facility for completing the numerical simulations. Samuel Lam's fellowship is supported by the EPSRC Centre for Doctoral Training in Mathematics of Random Systems: Analysis, Modelling and Simulation (EP/S023925/1).
