Vision Transformers provably learn spatial structure

Samy Jelassi, Michael E. Sander, Yuanzhi Li

Introduction

The empirical observation of 1(a) sets a central question: from a theoretical perspective, how do ViTs manage to learn these local connectivity patterns by simply minimizing their training loss using gradient descent from random initialization? While it is known that attention can express local operations as convolution (Cordonnier et al., 2019), it remains unclear how ViTs learn it. In this paper, we present a simple spatially-structured classification dataset for which it is sufficient (but not necessary) to learn the structure in order to generalize. We also present a simplified ViT model which we prove implicitly learns sparse spatial connectivity patterns when it minimizes its training loss via gradient descent (GD). We name this implicit bias patch association (defined in Definition 2.2). We prove that our ViT model leverages this bias to generalize. More precisely, we make the following contributions:

In Section 2, we formally define the concept of performing patch association, which refer to the ability of learning spatial connectivity patterns on a dataset.

In Section 3, we introduce a structured classification dataset and a simplified ViT model. This model is simplified in the sense that its attention matrix only depends on the positional encodings. We then present the learning problems we are interested in: empirical risk (realistic setting) and population risk (idealized setting) minimization for binary classification.

In Section 4, we prove that a one-layer single-head ViT model trained with gradient descent on our synthetic dataset performs patch association and generalizes, in the idealized (Theorem 4.1) and realistic (Theorem 4.2) settings. We present a detailed proof, based on invariance and symmetries of coefficients in the attention matrix throughout the learning process.

In Section 5, we show (Theorem 5.1) that after pre-training in our synthetic dataset, our model can be sample-efficiently fine-tuned to transfer to a downstream dataset that shares the same structure as the source dataset (and may have different features).

On the experimental side, we validate in Section 6 that ViTs learn spatial structure in images from the CIFAR-100 dataset, even when the pixels of the images are permuted. This result validates that, in contrast to CNNs, ViTs learn a more general form of spatial structure that is not limited to local patterns (Figure 3). We finally show that our ViT model –where the attention matrix only depends on the positional encodings– is competitive with the vanilla ViT on the ImageNet, CIFAR-10/100 and SVHNs datasets (Section 6 and Section 6).

Related work

Many computer vision architectures can be considered as a form of hybridization between Transformers and CNNs. For example, DeTR (Carion et al., 2020) use a CNN to generate features that are fed to a Transformer. (d’Ascoli et al., 2021) show that self-attention can be initialized or regularized to behave like a convolution and (Dai et al., 2021; Guo et al., 2021) add convolution operations to Transformers. Conversely, (Bello et al., 2019; Ramachandran et al., 2019; Bello, 2021) introduce self-attention or attention-like operations to supplement or replace convolution in ResNet-like models. In contrast, our paper does not consider any form of hybridization with CNN, but rather a simplification of the original ViT to explain how ViTs learn spatially structured patterns using GD.

A long line of work consists in analyzing the properties of ViTs, such as robustness (Bhojanapalli et al., 2021; Paul and Chen, 2021; Naseer et al., 2021) or the effect of self-supervision (Caron et al., 2021; Chen et al., 2021b). Closer to our work, some papers investigate why ViTs perform so well. Raghu et al. (2021) compare the representations of ViTs and CNNs and Melas-Kyriazi (2021); Trockman and Kolter (2022) argue that the patch embeddings could explain the performance of ViTs. We empirically show in Section 6 that applying the attention matrices to the positional encodings – which contains the structure of the dataset – approximately recovers the baselines. Hence, our work rather suggests that the structural learning performed by the attention matrices may explain the success of ViTs.

Early theoretical works have focused on the expressivity of attention. (Vuckovic et al., 2020; Edelman et al., 2021) addressed this question in the context of self-attention blocks and (Dehghani et al., 2018; Wei et al., 2021; Hron et al., 2020) for Transformers. On the optimization side, (Zhang et al., 2020) investigate the role of adaptive methods in attention models and (Snell et al., 2021) analyze the dynamics of a single-head attention head to approximate the learning of a Seq2Seq architecture. In our work, we also consider a single-head ViT trained with gradient descent and exhibit a setting where it provably learns convolution-like patterns and generalizes.

The question we address concerns algorithmic regularization which characterizes the generalization of an optimization algorithm when multiple global solutions exist in over-parametrized models. This regularization arises in deep learning mainly due to the non-convexity of the objective function. Indeed, this latter potentially creates multiple global minima scattered in the space that vastly differ in terms of generalization. Algorithmic regularization appears in binary classification (Soudry et al., 2018; Lyu and Li, 2019; Chizat and Bach, 2020), matrix factorization (Gunasekar et al., 2018; Arora et al., 2019), convolutional neural networks (Gunasekar et al., 2018; Jagadeesan et al., 2022), generative adversarial networks (Allen-Zhu and Li, 2021), contrastive learning (Wen and Li, 2021) and mixture of experts (Chen et al., 2022). Algorithmic regularization is induced by and depends on many factors such as learning rate and batch size (Goyal et al., 2017; Hoffer et al., 2017; Keskar et al., 2016; Smith et al., 2018; Li et al., 2019), initialization Allen-Zhu and Li (2020), momentum (Jelassi and Li, 2022), adaptive step-size (Kingma and Ba, 2014; Neyshabur et al., 2015; Daniely, 2017; Wilson et al., 2017; Zou et al., 2021; Jelassi et al., 2022), batch normalization (Arora et al., 2018; Hoffer et al., 2019; Ioffe and Szegedy, 2015) and dropout (Srivastava et al., 2014; Wei et al., 2020). However, all these works consider the case of feed-forward neural networks which does not apply to ViTs.

Defining patch association

The goal of this section is to formalize the way ViTs learn sparse spatial connectivity patterns. We thus introduce the concept of performing patch association for a spatially structured dataset.

Setting to learn patch association

In this section, we introduce our theoretical setting to analyze how ViTs learn patch association. We first define our binary classification dataset and finally present the ViT model we use to classify it.

We sketch a data-point of D\mathcal{D} in Section 3. Our dataset can be viewed as an extreme simplification of real-world image datasets where there is a set of adjacent patches that contain a useful feature (e.g. the nose of a dog) and many patches that have uninformative or spurious features e.g. the background of the image. We make the following assumption on the parameters of the data distribution.

Assumption 2 may be justified by considering a "ViT-base-patch16-224" model Dosovitskiy et al. (2020) on ImageNet. In this case, d=384d=384, D=196D=196. σ\sigma is set to have ∥ξj∥2≈∥w∗∥2\|\bm{\xi}_{j}\|_{2}\approx\|\bm{w}^{*}\|_{2}. qq is chosen so that there are more spurious features than informative ones (low signal-to-noise regime) which makes the data non-linearly separable. Our dataset is non-trivial to learn since generalized linear networks fail to generalize, as shown in the next theorem (see Appendix J for a proof).

We now define our simplified ViT model for which we show in Section 4 that it implicitly learns patch association via minimizing its training objective. We first remind the self-attention mechanism that is ubiquitously used in transformers.

the sum of patches and positional encodings i.e. \mathpzcX=X+P.{\large\boldsymbol{\mathpzc{X}}}=\bm{X}+\bm{P}.

In this paper, our ViT model relies on a different attention mechanism –the "positional attention"– that we define as follows.

Positional attention isolates positional encoding P\bm{P} from data X\bm{X}: A\bm{A} encodes the dynamics of P\bm{P} and tracks whether patch association is learned. V\bm{V} encodes the data-dependent part and monitors whether the feature is learned. Indeed, given its highly non-linear nature with respect to the input, directly analyzing self-attention is difficult. Yet, positional attention is similar to self-attention. As this latter, positional attention is also permutation-invariant and processes all tokens simultaneously. Besides, positional attention also computes a score matrix between the different tokens. This similarity matrix is also normalized in a sparse manner with the Softmax operator. The only aspect that positional attention misses from self-attention is the fact that S\bm{S} does not depend on the input. Nevertheless, we empirically show that our positional attention model competes with self-attention in Section 6. Lastly, we make the following simplification in the parameters to ease our analysis.

In Simplification 3.1, we set WK\bm{W}_{\bm{K}} and WQ\bm{W}_{\bm{Q}} to the identity so that A=P⊤P.\bm{A}=\bm{P}^{\top}\bm{P}. This Gram matrix encodes the spatial patterns learned by the ViT as shown in 1(a). Besides, since fitting the labeling function requires to learn one feature w∗\bm{w}^{*}, it is sufficient to parameterize WV\bm{W}_{\bm{V}} with a vector v\bm{v}. Also, although A=P⊤P\bm{A}=\bm{P}^{\top}\bm{P} and P\bm{P} is trainable, we choose for simplicity to only optimize over A.\bm{A}. Besides, we leave the Ai,iA_{i,i}’s fixed because Softmax is invariant under the uniform shift of the input. Under Simplification 3.1, our simplified ViT model is then a two attention layer with a single head:

Given a dataset Z={(X[i],y[i])}i=1N\mathcal{Z}=\{(\bm{X}[i],y[i])\}_{i=1}^{N} sampled from D\mathcal{D}, we solve the empirical risk minimization problem for the logistic loss defined by:

Instead of directly analyzing (E), we introduce a proxy where we minimize the population risk

We refer to (E) as the realistic problem while (P) as the idealized problem.

We solve (P) and (E) using gradient descent (GD) for TT iterations. The update rule in the case of (P) for t∈[T]t\in[T] and i,j∈[D]i,j\in[D] is

where η>0\eta>0 is the learning rate. A similar update may be written for (E). We now detail how to set the parameters in (GD).

Idealized case: v(0)=α(0)w∗\bm{v}^{(0)}=\alpha^{(0)}\bm{w}^{*} where α(0)=ν1/(p−1)\alpha^{(0)}=\nu^{1/(p-1)} and Ai,j(0)=0A_{i,j}^{(0)}=0 for i≠j.i\neq j.

Learning spatial structure via matching the labeling function

As announced above, we show that our ViT (T) implicitly learns patch association and fits the labeling function by minimizing the training objective. We first study the dynamics in (P). Using the analysis in the idealized case, we then characterize the solution found in the realistic problem (E).

In this section, we analyze the dynamics of (P). Our main result is that after minimizing (P), our model (T) performs patch association while generalizing.

Assume that we run GD on (P) for TT iterations with parameters set as in Parametrization 3.1. With high probability, the ViT model (T)

We now sketch the main ideas to prove the theorem for which one can refer to Appendix D for a complete proof.

In (P), we take the expectation over D\mathcal{D}. Since (T) is permutation-invariant and the data distribution is symmetric, we can thus dramatically simplify the variables in (P). An illustration of this is the next lemma that shows that A\bm{A} can be reduced to three variables in (P).

for all i∈[D]i\in[D], Ai,i(t)=β.A_{i,i}^{(t)}=\beta.

In summary, Lemma 4.1 and Lemma 4.2 imply that instead of optimizing over A\bm{A} and v\bm{v} in (P), we can instead consider the scalar variables α(t)\alpha^{(t)}, γ(t)\gamma^{(t)} and ρ(t)\rho^{(t)}. The remaining of this section consists in analyzing the dynamics of these three quantities.

We first analyze the dynamics of γ(t)\gamma^{(t)} and ρ(t)\rho^{(t)}. To this end, we introduce the following terms:

Let t≤Tt\leq T. The attention weights γ(t)\gamma^{(t)} and ρ(t)\rho^{(t)} satisfy:

Lemma 4.3 shows that the increment of γ(t)\gamma^{(t)} is larger than the one of ρ(t)\rho^{(t)}. Since γ(0)=ρ(0)=0\gamma^{(0)}=\rho^{(0)}=0, this implies that γ(t)≥ρ(t)\gamma^{(t)}\geq\rho^{(t)} for all t≥0.t\geq 0. This observation proves the first item of Theorem 4.1. We now explain how learning patch association leads to v\bm{v} highly correlated with w∗.\bm{w}^{*}.

Event I: At the beginning of the process, the update of v(t)\bm{v}^{(t)} is larger than the one of Ai,j(t)A_{i,j}^{(t)} which implies that only v(t)\bm{v}^{(t)} updates during this first phase. We show that α(t)=⟨v(t),w∗⟩\alpha^{(t)}=\langle\bm{v}^{(t)},\bm{w}^{*}\rangle increases until a time T0>0\mathcal{T}_{0}>0 where it reaches some threshold (Lemma D.2). At this point, the model is nothing else than a generalized linear model that would not generalize because there are much more noisy tokens than signal ones (see Theorem 3.1).

Event II: During this phase, the attention weights must update. Indeed, assume by contradiction that the Ai,j(t)A_{i,j}^{(t)} stay around initialization and that v(t)\bm{v}^{(t)} is optimal i.e. v(t)=a(t)w∗\bm{v}^{(t)}=a^{(t)}\bm{w}^{*} where a(t)≫1.a^{(t)}\gg 1. Then, the predictor gg we would have is

Event III: Because we have γ(T1)>max⁡t∈[T]∣ρ(t)∣\gamma^{(\mathcal{T}_{1})}>\max_{t\in[T]}|\rho^{(t)}|, we again have α(t+1)>α(t)\alpha^{(t+1)}>\alpha^{(t)} as in Phase I (Lemma D.11). Thus, α(t)\alpha^{(t)} increases again until the population risk becomes a o(1)o(1).

Our mechanism highlights two important aspects that are proper to attention models:

because of the initialization and the data structure, we have patch association for any time tt (Lemma 4.3).

our ViT model uses patch association to minimize the population loss (Event III). Without patch association, the model would only be a generalized linear model that does not minimize the loss.

2 From the idealized to the realistic learning process

The real learning process differs from the idealized one in that we have a finite number of samples and we initialize both A^\widehat{\bm{A}} and v^\widehat{\bm{v}} as Gaussian random variables. Using a polynomial number of samples, we show that (T) still learns patch association and generalizes.

Similarly to Li et al. (2020), the proof introduces a "semi-realistic" learning process that is a mid-point between the idealized and realistic processes. We show that A^(T)\widehat{\bm{A}}^{(T)} and v^(T)\widehat{\bm{v}}^{(T)} are close to their semi-realistic counterparts – see Appendix E for a complete proof. Figure 2 numerically illustrates Theorem 4.2.

Patch association yields sample-efficient fine-tuning with ViTs

A fundamental byproduct of our theory is that after pre-training on a dataset sampled from D\mathcal{D}, our model (T) sample-efficiently transfers to datasets that are structured as D\mathcal{D} but differ in their features.

Let D~\widetilde{\mathcal{D}} a downstream data distribution defined as in Assumption 1 such that its underlying feature is w~∗\widetilde{\bm{w}}^{*} with ∥w~∗∥2=1\|\widetilde{\bm{w}}^{*}\|_{2}=1 and w~∗\widetilde{\bm{w}}^{*} potentially different from w∗\bm{w}^{*}. In other words, the downstream D~\widetilde{\mathcal{D}} and source D\mathcal{D} distributions share the same structure but not necessarily the same feature. We sample a downstream dataset Z~={(X~[i],y~[i])}i=1N~\widetilde{\mathcal{Z}}=\{(\widetilde{\bm{X}}[i],\widetilde{y}[i])\}_{i=1}^{\widetilde{N}} from D~\widetilde{\mathcal{D}}.

We consider the model (T) pre-trained as in subsection 4.2. We assume that A^\widehat{\bm{A}} is kept fixed from the pre-trained model and we only optimize the value vector v~\widetilde{\bm{v}} to solve:

The proofs of Theorem 5.1 and Theorem 5.2 are in Appendix F. These theorems hightlight that learning patch association is required for efficient transfer. We believe that they offer a new perspective on explaining why ViTs are widely used in transferring to downstream tasks. While it is possible that ViTs learn shared (with the downstream dataset) features during pretraining, our theory hints that learning the inductive bias of the labeling function is also central for transfer.

Numerical experiments

In this section, we first empirically verify that ViTs learn patch association while miniziming their training loss. We then numerically show that the positional attention mechanism competes with the vanilla one on small-scale datasets such as CIFAR-10/100 (Krizhevsky et al., 2009), SVHN (Netzer et al., 2011) and large-scale ones such as ILSVRC-2012 ImageNet (Deng et al., 2009). For the small datasets, we use a ViT with 7 layers, 12 heads and hidden/MLP dimension 384. For ImageNet, we train a "ViT-tiny-patch16-224" Dosovitskiy et al. (2020). Both models are trained with standard augmentations techniques (Cubuk et al., 2018) and using AdamW with a cosine learning rate scheduler. We run all the experiments for 300 epochs, with batch size 1024 for Imagenet and 128 otherwise and average our results over 5 seeds. We refer to Appendix A for the training details.

Test accuracy obtained with a ViT using vanilla attention (ViT) and positional attention (Ours) on CIFAR-10 (1), CIFAR-100 (2) and SVHN (3). Our model competes with the vanilla ViT. Patch size 4 and average over 10 seeds for this experiment. We numerically verify that ViTs using positional attention compete with those with vanilla attention. In Section 3, we introduced positional attention to define our theoretical learner model. Section 6 and Section 6 show that ViTs using positional attention compete with vanilla ViTs on a range of datasets. These experiments strengthen our intuition that for images, having an attention matrix that only depends on the positional encodings is sufficient to have a good test accuracy.

Conclusion, limitations and future works

Our work is a first step towards understanding how Transformers learn tailored inductive biases when trained with gradient descent. Our analysis heavily relies on the positional attention mechanism that disentangles patches and positional encodings. In practice, self-attention mixes these two quantities. An interesting direction is to understand the impact of patch embeddings on the inductive bias learned by ViTs. Moreover, our experiment on the Gaussian data shows that ViTs do not always learn the correct inductive bias under Definition 2.1: characterizing the distributions under which ViTs recover the structure of the function is an important question. Lastly, this work also paves the way to many extensions beyond convolution. For example, can ViTs learn other inductive biases? What are the inductive biases learnt by Transformers in NLP? Answering those questions is central to better understand the underlying mechanism of attention.

Acknowledgments and Disclosure of Funding

The authors would like to thank Boris Hanin for helpful discussions and feedback on this work.

References

Checklist

Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] See Section 4 and Section 5.

Did you describe the limitations of your work? [Yes] See Conclusion, limitations and future works.

Did you discuss any potential negative societal impacts of your work? [N/A] This is a theory paper.

Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]

If you are including theoretical results…

Did you state the full set of assumptions of all theoretical results? [Yes] See Section 3.

Did you include complete proofs of all theoretical results? [Yes] See Appendix.

Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See supplementary material.

Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix.

Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Section 6

Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix.

If you are using existing assets (e.g., code, data, models) or curating/releasing new assets…

If your work uses existing assets, did you cite the creators? [Yes]

Did you mention the license of the assets? [N/A]

Did you include any new assets either in the supplemental material or as a URL? [N/A]

Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]

Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]

If you used crowdsourcing or conducted research with human subjects…

Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]

Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]

Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]

Appendix A Additional experimental details

In this section, we provide additional details on our experiments and additional plots.

We used Pytorch and Nvidia Tesla V100 GPUs. We conduct experiments on small-scale (CIFAR-10/100 and SVHN) and large-scale datasets (ImageNet). The choice of architecture and training parameters depend on the size of the dataset as we detail below.

We use the code available at https://github.com/omihub777/ViT-CIFAR. The model is made of 7 layers, 12 heads, hidden and MLP dimension 384, dropout 0. We use "mean-pooling" and not the CLS pooling. We set the patch size to 2 in the experiment Figure 3 and to 4 in the experiment Section 6. Indeed, we empirically found that setting patch size 4 was the optimal choice. We apply label smoothing [Szegedy et al., 2016] with coefficient 0.1 and do not apply any cutmix [Zhang et al., 2017] nor mixup [Yun et al., 2019]. We use Adam [Kingma and Ba, 2014] as optimizer and set the learning rate to 10−310^{-3}, minimum learning rate to 10−510^{-5}, β1\beta_{1} to 0.90.9, β2\beta_{2} to 0.9990.999, batch size to 128128, weight decay to 5⋅10−55\cdot 10^{-5}, number of warmup epochs to 5 and number of total epochs to 200. The scheduler is a cosine learning rate. We used the AutoAugment procedure [Cubuk et al., 2018] as in the repository to generate data augmentations. The model has been trained over a single GPU.

Regarding the convolutional models in the experiment Figure 3, we trained a ResNet-18 and a VGG-19 with batch normalization. We trained the two architectures using the same training procedure and hyperparameters as for the ViT.

A.2 Additional plots

In Figure 3, we plot the positional encoding similarities for a few patches. Figure 4 provides these plots for all the patches. One should think of Figure 3 as a Figure displaying just two of the arrays present in Figure 4. We consistently verify that the ViT is always able to recover the convolution-like patterns which shows that it is able to learn the right patch association.

Appendix B Induction hypothesis

In this section, we present the induction hypothesis that we use in the analysis of the idealized case. This hypothesis is ultimately proved in subsection D.7.

During the idealized learning process, the following holds for t≤Tt\leq T.

the sofmax denominator is large i.e. Λ(t)+(C−1)Γ(t)+(D−C)Ξ(t)=Θ(D).\Lambda^{(t)}+(C-1)\Gamma^{(t)}+(D-C)\Xi^{(t)}=\Theta(D).

Ξ(t)\Xi^{(t)} is not too small i.e. Ξ(t)=Θ(1/D).\Xi^{(t)}=\Theta(1/D).

Γ(t)\Gamma^{(t)} and Λ(t)\Lambda^{(t)} are in a good range i.e.

Appendix C Notations

In this section, we introduce the different notations used in the proofs.

We first define notations that are used everywhere in the appendix.

Loss for a data-point (X,y)(\bm{X},y): L(X)=log⁡(1+e−yF(X)).L(\bm{X})=\log(1+e^{-yF(\bm{X})}).

We now provide notations used in the analysis of the idealized case.

for i∈[D]i\in[D], Oi(t)=∑j=1DSi,j(t)Xj.\bm{O}_{i}^{(t)}=\sum_{j=1}^{D}S_{i,j}^{(t)}\bm{X}_{j}.

We now provide notations used in the analysis of the realistic case.

Given a data-point (X[i],y[i])(\bm{X}[i],y[i]) and j∈[D]j\in[D], Oj(t)[i]=∑k=1DSj,k(t)Xk[i]\bm{O}_{j}^{(t)}[i]=\sum_{k=1}^{D}S_{j,k}^{(t)}\bm{X}_{k}[i]

Appendix D Learning process in the idealized setting

We divide the idealized learning process as follows.

Event I (t∈[0,T0]t\in[0,\mathcal{T}_{0}], subsection D.2): at initialization, α(0)\alpha^{(0)} is small. Therefore, the sigmoid S(−yF(X))\mathfrak{S}(-yF(\bm{X})) is large. Besides, around α(0)\alpha^{(0)}, it stays constant i.e. S(−yFA(t),v(t)(X))≈S(−yFA(0),v(0)(X))\mathfrak{S}(-yF_{\bm{A}^{(t)},\bm{v}^{(t)}}(\bm{X}))\approx\mathfrak{S}(-yF_{\bm{A}^{(0)},\bm{v}^{(0)}}(\bm{X})) in (GD-α\alpha). This implies that \mathpzcN(t)=0{\large\boldsymbol{\mathpzc{N}}}^{(t)}=0 which yields α(t)\alpha^{(t)} to increase until reaching a specific value where the sigmoid is not constant anymore.

Event II (t∈[T0,T1]t\in[\mathcal{T}_{0},\mathcal{T}_{1}], subsection D.3): at time T0\mathcal{T}_{0}, α(t)\alpha^{(t)} is large. This fact along with Lemma 4.3 imply that γ(t)\gamma^{(t)} increases. Eventually, Γ(T1)\Gamma^{(\mathcal{T}_{1})} becomes large enough so that \mathpzcS(t)≥max⁡τ≤T∣\mathpzcN(τ)∣{\large\boldsymbol{\mathpzc{S}}}^{(t)}\geq\max_{\tau\leq T}{\large|\boldsymbol{\mathpzc{N}}}^{(\tau)}|.

Event III (t∈[T1,T]t\in[\mathcal{T}_{1},T], subsection D.4): Since \mathpzcS(t)≥max⁡τ≤T∣\mathpzcN(τ)∣{\large\boldsymbol{\mathpzc{S}}}^{(t)}\geq\max_{\tau\leq T}{\large|\boldsymbol{\mathpzc{N}}}^{(\tau)}|, α(t)\alpha^{(t)} increases again. It increases until the population risk is at most o(1).o(1).

After TT iterations, α(t)\alpha^{(t)} is large and the population risk thus converges (subsection D.5). Since the logistic loss is a surrogate for the 0-1 loss, we prove that the learner model fits the labeling function (subsection D.6) which implies the first statement of Theorem 4.1.

Remark : Since we initialize α(0)≥ν1/(p−1)\alpha^{(0)}\geq\nu^{1/(p-1)}, Lemma D.7 implies that we can overlook the linear part of the activation in this section. Therefore, we only consider σ(x)=xp\sigma(x)=x^{p} in the idealized process.

A first question that arises is: starting from α(0)\alpha^{(0)}, what is the value of α(t)\alpha^{(t)} that makes the sigmoid non-constant? The following lemma addresses this question.

The value α(t)\alpha^{(t)} at which the sigmoid S(−yF(X))\mathfrak{S}(-yF(\bm{X})) becomes non-constant is:

where G(t):=∑j=1D⟨Oj(t),w∗⟩p.\mathscr{G}^{(t)}:=\sum_{j=1}^{D}\langle\bm{O}_{j}^{(t)},\bm{w}^{*}\rangle^{p}. Since x↦S(−x)x\mapsto\mathfrak{S}(-x) is 1/41/4-Lipschitz, we rewrite (3) as:

Let T0=Θ(1ηC(α(0))p−1)\mathcal{T}_{0}=\Theta\left(\frac{1}{\eta C(\alpha^{(0)})^{p-1}}\right). For all t∈[0,T0]t\in[0,\mathcal{T}_{0}], we have \mathpzcN(t)=0.{\large\boldsymbol{\mathpzc{N}}^{(t)}}=0. Therefore, α(t)\alpha^{(t)} is updated as

Consequently, α(t)\alpha^{(t)} is non-decreasing and after T0\mathcal{T}_{0} iterations, we have α(t)≥Ω(1)C2λ0\alpha^{(t)}\geq\frac{\Omega(1)}{C^{2}\lambda_{0}} for t≥T0.t\geq\mathcal{T}_{0}.

For t∈[0,T0]t\in[0,\mathcal{T}_{0}], we know that the sigmoid S(−yF(X))\mathfrak{S}(-yF(\bm{X})) is constant. We apply Lemma D.4 and Lemma D.6 to respectively bound \mathpzcS(t){\large\boldsymbol{\mathpzc{S}}}^{(t)} and \mathpzcN(t){\large\boldsymbol{\mathpzc{N}}}^{(t)} in the update of α(t)\alpha^{(t)}.

(8) indicates that α(t)\alpha^{(t)} is a non-decreasing sequence. Therefore, there exists a time T0\mathcal{T}_{0} such that α(T0)=Θ(1)C2λ0\alpha^{(\mathcal{T}_{0})}=\frac{\Theta(1)}{C^{2}\lambda_{0}}. Using Lemma K.1, the time T0\mathcal{T}_{0} is equal to:

In this section, we present the auxiliary lemmas needed to prove the main results of subsection D.2. We first present a lemma that bounds the learner model.

Let t∈[0,T]t\in[0,T]. The learner model FF is bounded for all (X,y)∼D(\bm{X},y)\sim\mathcal{D} as:

We successively apply Lemma D.4, Induction Hypothesis B.1 and Lemma D.5 to bound (10).

Finally, we apply Induction Hypothesis B.1 in (11) to obtain the desired result. ∎

We now present lemmas that bound \mathpzcS(t){\large\boldsymbol{\mathpzc{S}}}^{(t)} and \mathpzcN(t){\large\boldsymbol{\mathpzc{N}}}^{(t)}.

We now sum (LABEL:eq:jcneiencae) and apply Lemma K.3 to obtain:

We finally apply Induction Hypothesis B.1 to have Γ(t)≤λ0/C\Gamma^{(t)}\leq\lambda_{0}/C in (15) and get

We finally plug (13) and (16) in (LABEL:eq:jwfejfw) and obtain:

Let t∈[0,T0].t\in[0,\mathcal{T}_{0}]. We have \mathpzcN(t)=0.{\large\boldsymbol{\mathpzc{N}}}^{(t)}=0.

By definition of \mathpzcN(t){\large\boldsymbol{\mathpzc{N}}}^{(t)}, we have:

Let (X,⋅)∼D(\bm{X},\cdot)\sim\mathcal{D} and j∈[D]j\in[D]. Assume that α(t)≥ν1/(p−1)\alpha^{(t)}\geq\nu^{1/(p-1)}. Then, we have:

We remind that the derivative of the activation function σ′(x)=pxp−1+ν\sigma^{\prime}(x)=px^{p-1}+\nu. We first remark that for all x,x, σ′(x)≥pxp−1\sigma^{\prime}(x)\geq px^{p-1}. Besides, we have:

In this section, we show the increase of α(t)\alpha^{(t)} for t∈[0,T0]t\in[0,\mathcal{T}_{0}] leads to the increase of Γ(t)\Gamma^{(t)}. At time T1>T0,\mathcal{T}_{1}>\mathcal{T}_{0}, Γ(t)\Gamma^{(t)} is significantly large.

Let t∈[T0,T]t\in[\mathcal{T}_{0},T] and τ∈[T0,t].\tau\in[\mathcal{T}_{0},t]. Using Corollary G.1 and Induction Hypothesis B.1, γ(τ)\gamma^{(\tau)} satisfies:

Summing (22) for τ=T0,…,t−1\tau=\mathcal{T}_{0},\dots,t-1 yields

We successively apply Lemma D.9 and (a−b)p≥ap−pb(a-b)^{p}\geq a^{p}-pb for a≪ba\ll b to lower bound (23) to obtain:

We apply Induction Hypothesis B.1 in (24) to obtain a bound on Γ(t)\Gamma^{(t)}.

(25) shows that Γ(t)\Gamma^{(t)} is an non-decreasing sequence. We thus deduce the time T1\mathcal{T}_{1} such that CΓ(t)≥Ω(λ0)/D.C\Gamma^{(t)}\geq\Omega(\lambda_{0})/D.

We now prove the second part of the lemma. We respectively apply Lemma D.4 and Lemma D.5 to bound \mathpzcS(t){\large\boldsymbol{\mathpzc{S}}}^{(t)} and max⁡τ≤T∣\mathpzcN(τ)∣\max_{\tau\leq T}|{\large\boldsymbol{\mathpzc{N}}}^{(\tau)}|.

(27) implies for all t∈[T1,T]t\in[\mathcal{T}_{1},T], \mathpzcS(t)≥max⁡τ≤[T]∣\mathpzcN(τ)∣.{\large\boldsymbol{\mathpzc{S}}}^{(t)}\geq\max_{\tau\leq[T]}|{\large\boldsymbol{\mathpzc{N}}}^{(\tau)}|.

In this section, we present the auxiliary lemmas needed to prove the main results in subsection D.3.

Let t≥T0.t\geq\mathcal{T}_{0}. Then, we always have α(t)≥Ω(1)C2λ0−o(η).\alpha^{(t)}\geq\frac{\Omega(1)}{C^{2}\lambda_{0}}-o(\eta).

For t∈[0,T0]t\in[0,\mathcal{T}_{0}], α(t)\alpha^{(t)} increases and eventually satisfies α(t)≥Ω(1)C2λ0\alpha^{(t)}\geq\frac{\Omega(1)}{C^{2}\lambda_{0}} (Lemma D.2). However, for t≥T0t\geq\mathcal{T}_{0}, α(t)\alpha^{(t)} may be non-increasing. Here, we want to quantify the maximum amount of decrease for t>T0t>\mathcal{T}_{0}. The worst-case scenario is when α(t)=Ω(1)C2λ0\alpha^{(t)}=\frac{\Omega(1)}{C^{2}\lambda_{0}}. We bound α(t+1)\alpha^{(t+1)} by using Lemma D.4, Lemma D.10 and Lemma D.5.

We now apply Induction Hypothesis B.1 in (28) and get:

At time t+1,t+1, we potentially have α(t+1)<Ω(1)C2λ0\alpha^{(t+1)}<\frac{\Omega(1)}{C^{2}\lambda_{0}}. In this case, α(t+1)\alpha^{(t+1)} starts to increase again because it is in the range of α\alpha’s that satisfies Event I (and therefore the update rule in Lemma D.2 holds). Thus, for all t≥T0,t\geq\mathcal{T}_{0}, we have α(t)≥Ω(1)C2λ0−o(η).\alpha^{(t)}\geq\frac{\Omega(1)}{C^{2}\lambda_{0}}-o(\eta). ∎

Let (X,y)(\bm{X},y) be a data-point. We distinguish two cases:

yF(X)>0yF(\bm{X})>0: we apply Lemma K.6 which implies S(−yF(X)≥log⁡(1+eyF(X)).\mathfrak{S}(-yF(\bm{X})\geq\log(1+e^{yF(\bm{X})}). Since the population loss is Ω(1)\Omega(1), this implies the aimed result.

yF(X)≤0yF(\bm{X})\leq 0: we have necessarily S(−yF(X))≥Ω(1)\mathfrak{S}(-yF(\bm{X}))\geq\Omega(1) since the sigmoid function is large for non-positive values.

For t∈[T0,T1]t\in[\mathcal{T}_{0},\mathcal{T}_{1}], Γ(t)\Gamma^{(t)} increases until reaching CΓ(t)≥Ω(λ0)/D.C\Gamma^{(t)}\geq\Omega(\lambda_{0})/D. In this section, we show that this implies that α(t)\alpha^{(t)} increases again.

Since \mathpzcS(t)≥max⁡τ≤T∣\mathpzcN(τ)∣{\large\boldsymbol{\mathpzc{S}}}^{(t)}\geq\max_{\tau\leq T}{\large|\boldsymbol{\mathpzc{N}}}^{(\tau)}| (Lemma D.8), the update of α(t)\alpha^{(t)} is:

We say that the sigmoid term is small for a constant κ\kappa that satisfies

Intuitively, (32) means that the sum of the sigmoid terms for all time steps is bounded (up to a logarithmic dependence). In our case, by using (32) and Lemma D.3, the sigmoid S(−yF(X))\mathfrak{S}(-yF(\bm{X})) is small when

D.5 Convergence rate of the population loss

Let t∈[T1,T]t\in[\mathcal{T}_{1},T]. Then, the population loss linearly converges to zero i.e.

Let’s now assume by contradiction that for t∈[T1,T]t\in[\mathcal{T}_{1},T], we have:

For t∈[T1,T]t\in[\mathcal{T}_{1},T], we know that α(t)G(t)\alpha^{(t)}G^{(t)} is non-decreasing which implies that (α(t)G(t))p(\alpha^{(t)}G^{(t)})^{p} is also non-decreasing. Since x↦log⁡(1+exp⁡(−x))x\mapsto\log(1+\exp(-x)) is non-increasing, this implies for s≤ts\leq t that

Plugging (40) in the update (36) yields for s∈[T1,t]s\in[\mathcal{T}_{1},t]:

Let t∈[T1,T]t\in[\mathcal{T}_{1},T]. We now sum (41) for s=T1,…,ts=\mathcal{T}_{1},\dots,t and obtain:

where we used G(t)≥Ω(λ0)G^{(t)}\geq\Omega(\lambda_{0}) (Lemma D.8) and (42) in the last inequality. We now apply Lemma K.6 and obtain:

Given the values of T,η,λ0T,\eta,\lambda_{0}, we finally have:

which contradicts (39). Therefore, we obtain the convergence rate:

We apply Lemma D.14 to bound the left-hand side of (46) and get the aimed result. ∎

The proof is similar to the one of Lemma D.3. We apply Lemma D.4, Lemma D.8 and Lemma D.5 and get:

where we applied Lemma K.7 in the last inequality. ∎

D.6 Fitting the labeling function

We now show that the learner model fits the labeling function.

Since the logistic loss is a surrogate for the 0-1 loss, we have:

We now apply Lemma D.13 to bound the right-hand side of (49). Given the value of TT, we have:

D.7 Proof of the induction hypothesis

In this section, we prove Induction Hypothesis B.1.

We start by proving that ∣ρ(t)∣=Θ(1)|\rho^{(t)}|=\Theta(1) for all t∈[T].t\in[T]. Let t∈[T1,T]t\in[\mathcal{T}_{1},T] and τ∈[t].\tau\in[t]. Using Corollary G.2 and Induction Hypothesis B.1, we upper bound ∣ρ(τ)∣|\rho^{(\tau)}| as:

Summing (52) for τ=0,…,t−1\tau=0,\dots,t-1 and using ρ(0)=0\rho^{(0)}=0 lead to

We now apply Lemma D.16 to bound the sum of α(t)\alpha^{(t)}’s in (53).

Given the values of the different parameters, (54) implies that ∣ρ(t)∣≤Θ(1).|\rho^{(t)}|\leq\Theta(1).

We now prove eγ(t)∈[Ω(1),λ0].e^{\gamma^{(t)}}\in[\Omega(1),\lambda_{0}]. Since eγ(t)e^{\gamma^{(t)}} is non-decreasing (Corollary G.1), we have eγ(t)≥eγ(0)≥Ω(1)e^{\gamma^{(t)}}\geq e^{\gamma^{(0)}}\geq\Omega(1) for all t≥0.t\geq 0. We now prove the upper bound on eγ(t)e^{\gamma^{(t)}}. We assume that for all τ≤t\tau\leq t, eγ(τ)≤λ0.e^{\gamma^{(\tau)}}\leq\lambda_{0}. Let’s show this inequality for t+1t+1. Using Corollary G.1, we have:

We now apply the induction hypothesis in (55) and get:

where we used the inequality ex≤1+x+x2e^{x}\leq 1+x+x^{2} for x≤1x\leq 1 in (57). Given the values of the different parameters, we deduce that eγ(t+1)≤λ0.e^{\gamma^{(t+1)}}\leq\lambda_{0}.

Lastly, we prove that eβ(t)+(C−1)eγ(t)+(D−C)eρ(t)=Θ(D)e^{\beta^{(t)}}+(C-1)e^{\gamma^{(t)}}+(D-C)e^{\rho^{(t)}}=\Theta(D) for t∈[T].t\in[T]. Since eγ(t)≥Θ(1)e^{\gamma^{(t)}}\geq\Theta(1), eρ(t)=Θ(1)e^{\rho^{(t)}}=\Theta(1) and eβ(t)≥Θ(1)e^{\beta^{(t)}}\geq\Theta(1), we have:

The sum of the α(t)\alpha^{(t)}’s is bounded as:

We first decompose the sum of α(t)\alpha^{(t)}’s.

We apply Lemma D.2 and Lemma D.8 to rewrite (60).

Now, we aim to obtain the value of the last summand in (61). Using Corollary G.1, we have

We finally apply Lemma D.8 and Induction Hypothesis B.1 in (62) to get:

Appendix E From idealized to real learning process

Since we randomly initialize v^(0)\widehat{\bm{v}}^{(0)} with tiny variance, we need to take into account the linear part of the activation function. Lemma E.8 shows that we can overlook the power part of the activation and consider σ(x)=νx\sigma(x)=\nu x as long as α^(t)≥ν1/(p−1)\widehat{\alpha}^{(t)}\geq\nu^{1/(p-1)}.

Consequently, α^(t)\widehat{\alpha}^{(t)} is non-decreasing and after T\mathscr{T} iterations, we have α^(t)≥ν1/(p−1)\widehat{\alpha}^{(t)}\geq\nu^{1/(p-1)} for t≥T.t\geq\mathscr{T}.

Let t≥0t\geq 0. We apply Lemma E.5 and Lemma E.6 to respectively bound \mathpzcS^(t){\large\widehat{\boldsymbol{\mathpzc{S}}}}^{(t)} and \mathpzcN^(t)\widehat{\large\boldsymbol{\mathpzc{N}}}^{(t)} in the update of α^(t)\widehat{\alpha}^{(t)}.

(64) indicates that α^(t)\widehat{\alpha}^{(t)} is a non-decreasing sequence. Therefore, there exists a time T\mathscr{T} such that α^(T)=ν1/(p−1)\widehat{\alpha}^{(\mathscr{T})}=\nu^{1/(p-1)}. Summing (64) for t=0,…,T−1t=0,\dots,\mathscr{T}-1 yields \mathscr{T}=\Theta\Big{(}\frac{1}{\eta\nu^{(p-2)/(p-1)}e^{\beta}}\Big{)}. ∎

We now show that for t∈[0,T]t\in[0,\mathscr{T}], the orthogonal component εv(t)\varepsilon_{\bm{v}}^{(t)} stays small.

Assume that we run GD on the empirical risk (E) for TT iterations with parameters set as in Parametrization 3.1. For t∈[0,T]t\in[0,\mathscr{T}], the orthogonal component εv\varepsilon_{\bm{v}} satisfies

Let P=(I−w∗w∗⊤)\mathbf{P}=(\mathbf{I}-\bm{w}^{*}\bm{w}^{*\top}) and \accentset∘v(t)=α^(t)w∗\accentset{\circ}{\bm{v}}^{(t)}=\widehat{\alpha}^{(t)}\bm{w}^{*}. The projected update of v^\widehat{\bm{v}} satisfies:

We use the 1-Lipschitzness of the sigmoid function and get:

where we applied Induction Hypothesis B.1 in (69). Since with high probability, ∥ξb∥2≤σdlog⁡(d)\|\bm{\xi}_{b}\|_{2}\leq\sigma\sqrt{d\log(d)}, \big{|}\langle\bm{u}^{(t)},\sum_{r=1}^{D}\bm{\xi}_{r}\rangle\big{|}\leq\sqrt{D\log(d)}\sigma, we finally have:

Combining the bounds on Summands 1 and 2 yields the aimed result. ∎

We now use Lemma E.2 to show that εv\varepsilon_{\bm{v}} stays small.

Unraveling Lemma E.2 for t=0,…,Tt=0,\dots,\mathscr{T} and using εv(0)≤ωdlog⁡(d)\varepsilon_{\bm{v}}^{(0)}\leq\omega\sqrt{d\log(d)} (with high probability) leads to:

where we used (1+x)y≤1+2yx(1+x)^{y}\leq 1+2yx for x≪1x\ll 1 and y≥0.y\geq 0. Plugging the value of T\mathscr{T} in (70) yields the aimed result. ∎

We finally show that A^a,b(t)\widehat{A}_{a,b}^{(t)} remains tiny for t∈[0,T].t\in[0,\mathscr{T}].

Let a,b∈[D]a,b\in[D]. We have ∣A^a,b(t)∣≤ωdlog⁡(d)+Θ(ν2/(p−1))Deβ.|\widehat{A}_{a,b}^{(t)}|\leq\omega\sqrt{d\log(d)}+\frac{\Theta(\nu^{2/(p-1)})}{De^{\beta}}.

We remind that the GD update of A^a,b(t)\widehat{A}_{a,b}^{(t)} is

The proof is by induction. We assume that A^a,b(t)≤ωdlog⁡(d)+Θ(ν2/(p−1))Deβ.\widehat{A}_{a,b}^{(t)}\leq\omega\sqrt{d\log(d)}+\frac{\Theta(\nu^{2/(p-1)})}{De^{\beta}}. We first apply Cauchy-Schwarz on (71) and get:

Using the induction hypothesis, we have S^a,b(t)≤Θ(1)/D.\widehat{S}_{a,b}^{(t)}\leq\Theta(1)/D. Thus, we have

We now use Lemma E.1 and Lemma E.3 in (74) and get:

E.1.4 Auxiliary lemmas

This implies \mathpzcS^(t)=Ceβ\widehat{{\large\boldsymbol{\mathpzc{S}}}}^{(t)}=Ce^{\beta} for all t∈[0,T].t\in[0,\mathscr{T}].

We successively apply Lemma E.4 and Lemma K.3 to get:

Let t≤Tt\leq\mathscr{T}. The sum of α^(t)\widehat{\alpha}^{(t)}’s is bounded as:

Let τ∈[0,T].\tau\in[0,\mathscr{T}]. We sum the update rule of α^(t)\widehat{\alpha}^{(t)} (Lemma E.1) and obtain: α^(τ)=α^(0)+Θ(Cην)eβτ.\widehat{\alpha}^{(\tau)}=\widehat{\alpha}^{(0)}+\Theta(C\eta\nu)e^{\beta}\tau. Summing again this update yields the aimed result.

Let (X,⋅)∼D(\bm{X},\cdot)\sim\mathcal{D} and j∈[D]j\in[D]. Assume that α^(t)≤ν1/(p−1)\widehat{\alpha}^{(t)}\leq\nu^{1/(p-1)}. Then, we have:

We remind that the derivative of the activation function σ′(x)=pxp−1+ν\sigma^{\prime}(x)=px^{p-1}+\nu. We first remark that for all x,x, σ′(x)≥ν\sigma^{\prime}(x)\geq\nu. Besides, we have since p−1p-1 is even,

E.2 Coupling between the semi-idealized and realistic processes (t∈[𝒯,T]𝑡𝒯𝑇t\in[\mathscr{T},T])

In this section, we aim to bound the realistic iterates A^i,j(t)\widehat{A}_{i,j}^{(t)} and v^(t)\widehat{\bm{v}}^{(t)} for t∈[T,T].t\in[\mathscr{T},T]. For this reason, we introduce a "semi-idealized" learning process (subsubsection E.2.1) which may be viewed as a mid-point between the idealized and realistic process. We first bound the iterates in this process. Then, using this process, we show that εv(t)\varepsilon_{\bm{v}}^{(t)} (subsubsection E.2.2) and ΔA(t):=max⁡i≠j∣A^i,j(t)−Aˇi,j(t)∣\Delta_{\bm{A}}^{(t)}:=\max_{i\neq j}|\widehat{A}_{i,j}^{(t)}-\widecheck{A}_{i,j}^{(t)}| (subsubsection E.2.4) stay small. Here, Aˇi,j(t)\widecheck{A}_{i,j}^{(t)} is the semi-idealized attention matrix coefficient. Finally, since εv(T)\varepsilon_{\bm{v}}^{(T)} and ΔA(T)\Delta_{\bm{A}}^{(T)} are small, the final iterates α^(T)\widehat{\alpha}^{(T)} and α(T)\alpha^{(T)} are equal (subsubsection E.2.6) and thus, the model fits the labeling function (subsubsection E.2.7).

We define an intermediate learning process that we refer to as the "semi-idealized" process. This process starts at time t=Tt=\mathscr{T} involves two parameters: the semi-idealized value vector vˇ\widecheck{\bm{v}} and semi-idealized attention matrix Aˇ\widecheck{\bm{A}} defined as

the value vector vˇ\widecheck{\bm{v}} is fixed and satisfies vˇ(t−T)=α^(t)w∗\widecheck{\bm{v}}^{(t-\mathscr{T})}=\widehat{\alpha}^{(t)}\bm{w}^{*} for t∈[T,T].t\in[\mathscr{T},T].

Aˇi,j(t−T)\widecheck{A}_{i,j}^{(t-\mathscr{T})} is a trainable parameter and is initialized as Aˇi,j(0)=0\widecheck{A}_{i,j}^{(0)}=0 for i≠ji\neq j.

Therefore, the only trainable parameter in this process is Aˇ\widecheck{\bm{A}}. In the semi-idealized process, we minimize the population risk

We remark that such process present similarities to the idealized case. In particular, it satisfies all the invariance and symmetry properties from Lemma 4.1. We thus define

Therefore, γˇ(t)\widecheck{\gamma}^{(t)} and ρˇ(t)\widecheck{\rho}^{(t)} are respectively updated as in Lemma G.1 and Lemma G.2. We define also the softmax terms

We finally assume Induction Hypothesis B.1 for this process. This latter can be proved using the same arguments as in subsection D.7.

We previously showed in Lemma E.3 that εv(t)\varepsilon_{\bm{v}}^{(t)} is small in the initial steps. We now show that it stays small during the whole process.

We now proceed to the proof of Lemma E.9. We first characterize the recursion satisfied by εv(t).\varepsilon_{\bm{v}}^{(t)}.

Assume that we run GD on the empirical risk (E) for TT iterations with parameters set as in Parametrization 3.1. Then, εv(t)\varepsilon_{\bm{v}}^{(t)} satisfies for t∈[T,T]t\in[\mathscr{T},T]

Let P:=(I−w∗w∗⊤)\mathbf{P}:=(\mathbf{I}-\bm{w}^{*}\bm{w}^{*\top}), \accentset∘v(t):=α^(t)w∗\accentset{\circ}{\bm{v}}^{(t)}:=\widehat{\alpha}^{(t)}\bm{w}^{*} and t∈[T,T].t\in[\mathscr{T},T]. The projected update of v^\widehat{\bm{v}} satisfies:

With high probability, ∥ξb∥2≤σlog⁡(d)≤log⁡(d)/d\|\bm{\xi}_{b}\|_{2}\leq\sigma\sqrt{\log(d)}\leq\sqrt{\log(d)/d}, ∣⟨u(t),ξr⟩∣≤log⁡(d)σ|\langle\bm{u}^{(t)},\bm{\xi}_{r}\rangle|\leq\sqrt{\log(d)}\sigma. We thus get:

We apply Lemma E.12 to bound the local change of the sigmoid in (89) which yields:

We apply Induction Hypothesis B.1 to bound the softmax terms in (90). Besides, with high probability, we have ∥ξb∥2≤σdlog⁡(d)\|\bm{\xi}_{b}\|_{2}\leq\sigma\sqrt{d\log(d)}, ∣⟨u(t),ξa′⟩∣≤log⁡(d)σ|\langle\bm{u}^{(t)},\bm{\xi}_{a^{\prime}}\rangle|\leq\sqrt{\log(d)}\sigma. Thus, we have:

We combine the bounds on the three summands to obtain the recursion of εv(t)\varepsilon_{\bm{v}}^{(t)}. ∎

We now prove Lemma E.11 that gives the final bound on εv(t)\varepsilon_{\bm{v}}^{(t)} for t≤T.t\leq T.

We bound εv(t)\varepsilon_{\bm{v}}^{(t)} in the following two regimes: t∈[T,T+Tˇ0]t\in[\mathscr{T},\mathscr{T}+\widecheck{\mathcal{T}}_{0}] and t∈[T+Tˇ0,T].t\in[\mathscr{T}+\widecheck{\mathcal{T}}_{0},T].

Lemma E.20 provides the update of α^(t)\widehat{\alpha}^{(t)} during this time phase. We thus apply Lemma K.2 to bound the product term in (92).

Plugging (93) in (92) yields a bound on εv(T+Tˇ0).\varepsilon_{\bm{v}}^{(\mathscr{T}+\widecheck{\mathcal{T}}_{0})}.

E.2.3 Auxiliary lemmas

In this section, we prove the Lipschitzness of the function appearing in the proof of Lemma E.10.

Let l∈[D].l\in[D]. The derivative of ψ\psi with respect to a variable xlx_{l} is:

(97) implies a bound on ∥∇ψ(x)∥1\|\nabla\psi(\bm{x})\|_{1}. Indeed, since ∑m=1Dxmp≥−1\sum_{m=1}^{D}x_{m}^{p}\geq-1, we have:

(98) shows that ψ\psi is pp-Lipschitz. ∎

Here, we bound the gap in attention coefficients between the realistic and semi-idealized cases.

We now detail the steps to prove Lemma E.13. We first provide the recursion that ΔA(t)\Delta_{\bm{A}}^{(t)} satisfies.

Assume that we run GD on the empirical risk (E) for TT iterations with parameters set as in Parametrization 3.1. Then, the discrepancy ΔA\Delta_{\bm{A}} satisfies for t∈(T,T]t\in(\mathscr{T},T],

In this proof, we maintain the hypothesis that ΔA(t)\Delta_{\bm{A}}^{(t)} is small. We will eventually prove this statement in Lemma E.15. Let a,b∈[D]a,b\in[D] such that a≠ba\neq b. Using GD, A^a,b(t+1)−Aˇa,b(t+1−T)\widehat{A}_{a,b}^{(t+1)}-\widecheck{A}_{a,b}^{(t+1-\mathscr{T})} satisfies:

Since εv(t)\varepsilon_{\bm{v}}^{(t)} is small (Lemma E.11), we can show that:

where we used eΔA(t)−1≤2ΔA(t)e^{\Delta_{\bm{A}}^{(t)}}-1\leq 2\Delta_{\bm{A}}^{(t)} in (115) and Induction Hypothesis B.1 in (116). Using Lipschitz inequalities, we can further expand (116) as a function of the coefficients from Sˇ(t)\widecheck{S}^{(t)} and ΔA(t)\Delta_{\bm{A}}^{(t)}. However, ΔA(t)\Delta_{\bm{A}}^{(t)} is small and we only want terms of order 1 in ΔA(t)\Delta_{\bm{A}}^{(t)} in (116). Therefore, the only term of order 1 that remains is:

Bounding the expectation in (LABEL:eq:wefcerffer) as in the proof of Lemma G.1 yields ∣\eqrefeq:efrpefr−\eqrefeq:jwejwfej∣≤ηR(t)ΔA(t)|\eqref{eq:efrpefr}-\eqref{eq:jwejwfej}|\leq\eta R^{(t)}\Delta_{\bm{A}}^{(t)}. We now bound ∣\eqrefeq:ojdeojedoj−\eqrefeq:weejiwjwei∣|\eqref{eq:ojdeojedoj}-\eqref{eq:weejiwjwei}|. We therefore apply (Lemma E.16) and get:

where we used e2(p−1)ΔA(t)−1≤4(p−1)ΔA(t)e^{2(p-1)\Delta_{\bm{A}}^{(t)}}-1\leq 4(p-1)\Delta_{\bm{A}}^{(t)} in (120). We can further expand (120), keep the terms of first order in ΔA\Delta_{\bm{A}} and get ∣\eqrefeq:kmnkknk−\eqrefeq:evfejr∣≤ηR(t)ΔA(t).|\eqref{eq:kmnkknk}-\eqref{eq:evfejr}|\leq\eta R^{(t)}\Delta_{\bm{A}}^{(t)}.

We now bound ∣\eqrefeq:kmnkknk−\eqrefeq:evfejr∣|\eqref{eq:kmnkknk}-\eqref{eq:evfejr}|. Using the Lipschitz property of the softmax (Lemma E.17), we have:

where we used ∣e2ΔA(t)−1∣≤4ΔA(t)|e^{2\Delta_{\bm{A}}^{(t)}}-1|\leq 4\Delta_{\bm{A}}^{(t)} in (121). Using the same arguments as above, we obtain ∣\eqrefeq:kmnkknk−\eqrefeq:evfejr∣≤ηR(t)ΔA(t).|\eqref{eq:kmnkknk}-\eqref{eq:evfejr}|\leq\eta R^{(t)}\Delta_{\bm{A}}^{(t)}.

The bound on ∣\eqrefeq:rfjrf−\eqrefeq:ofeojeo∣|\eqref{eq:rfjrf}-\eqref{eq:ofeojeo}| can be derived as above. We again use the Lipschitz property of softmax (Lemma E.17) which leads to

Plugging the bounds on Summands 1, 2 and 3 in the original decomposition of \big{|}\widehat{A}_{a,b}^{(t+1)}-\widecheck{A}_{a,b}^{(t+1-\mathscr{T})}\big{|} yields the bound on ΔA(t)\Delta_{\bm{A}}^{(t)}. The second part of the lemma is obtained using Lemma E.15.

Let Ev>0\mathcal{E}_{\bm{v}}>0 such that εv(t)≤Ev\varepsilon_{\bm{v}}^{(t)}\leq\mathcal{E}_{\bm{v}} for t∈[T]t\in[T] – we proved the existence of Ev\mathcal{E}_{\bm{v}} in Lemma E.11. We bound ΔA(t)\Delta_{\bm{A}}^{(t)} when t∈[T,T+Tˇ0]t\in[\mathscr{T},\mathscr{T}+\widecheck{\mathcal{T}}_{0}] and t∈[T+Tˇ0,T].t\in[\mathscr{T}+\widecheck{\mathcal{T}}_{0},T].

We now apply Induction Hypothesis B.1 to simplify (LABEL:eq:jfejfe) and get:

We then apply Lemma K.2 to bound the product term in (125). We obtain:

E.2.5 Auxiliary lemmas

We finally apply the generalized mediant inequality in (130) and get:

Let i∈[D]i\in[D]. The difference of softmax is bounded as:

where we used the mediant inequality in the last inequality of (131). Since the exponential function is non-decreasing, we deduce:

Analog of Event I (Lemma D.2): α^(t+1)=α^(t)+Θ(η)(G^(t))p(α^(t))p−1\widehat{\alpha}^{(t+1)}=\widehat{\alpha}^{(t)}+\Theta(\eta)(\widehat{G}^{(t)})^{p}(\widehat{\alpha}^{(t)})^{p-1} for t∈[T,T+T^0]t\in[\mathscr{T},\mathscr{T}+\widehat{\mathcal{T}}_{0}].

Analog of Event III (Lemma D.11): α^(t+1)=α^(t)+Θ(η)(G^(t))p(α^(t))p−1\widehat{\alpha}^{(t+1)}=\widehat{\alpha}^{(t)}+\Theta(\eta)(\widehat{G}^{(t)})^{p}(\widehat{\alpha}^{(t)})^{p-1} for t∈[T+T^1,T]t\in[\mathscr{T}+\widehat{\mathcal{T}}_{1},T].

These three lemmas imply that at time TT, the realistic iterates are very close to the ideal ones. Therefore, they incur nearby test loss and thus the realistic model generalizes. We now proceed to the proof of

In order to analyze the dynamics of v^(t)\widehat{\bm{v}}^{(t)}, we first show that the gradient (with respect to v^\widehat{\bm{v}}) in the realistic learning process is very close to the one in the semi-idealized one.

Let t∈[T,T]t\in[\mathscr{T},T]. With high probability, we have

Lemma E.19 shows that we can use the gradient from the semi-idealized process to analyze the dynamics of α^(t)\widehat{\alpha}^{(t)} in the real process. Therefore, we can derive similar updates for α^(t)\widehat{\alpha}^{(t)} as in Lemma D.2, Lemma D.8 and Lemma D.11.

Let Tˇ0=Θ(1ηC(α^(T))p−1)\widecheck{\mathcal{T}}_{0}=\Theta\left(\frac{1}{\eta C(\widehat{\alpha}^{(\mathscr{T})})^{p-1}}\right). Therefore, α^(t)\widehat{\alpha}^{(t)} is updated as

Consequently, α^(t)\widehat{\alpha}^{(t)} is non-decreasing and after Tˇ0\widecheck{\mathcal{T}}_{0} iterations, we have α^(t)≥Ω(1)C2λ0\widehat{\alpha}^{(t)}\geq\frac{\Omega(1)}{C^{2}\lambda_{0}} for t≥Tˇ0.t\geq\widecheck{\mathcal{T}}_{0}.

The following lemma is useful to prove Lemma E.10 and Lemma E.14.

The result is obtained by applying Lemma K.1 to (142). We have:

E.2.7 The realistic model fits the labeling function

In the realistic case, the model fits the labeling function i.e.

We bound the population risk L(A^(T),v^(T))\mathcal{L}(\widehat{\bm{A}}^{(T)},\widehat{\bm{v}}^{(T)}). We have:

We can further expand (146) as in the proof of Lemma D.15 and deduce the aimed result. ∎

To prove Lemma E.24, we use the following auxiliary lemma.

After TT iterations, the population risk in the semi-idealized case converges i.e. Lˇ(Aˇ(T),vˇ(T))≤o(1).\widecheck{\mathcal{L}}(\widecheck{\bm{A}}^{(T)},\widecheck{\bm{v}}^{(T)})\leq o(1).

The proof is similar to the one of Lemma D.15. ∎

For all X\bm{X} sampled from D\mathcal{D}, we have

Since x↦xp+νxx\mapsto x^{p}+\nu x is Lipschitz on a bounded domain, we have:

since ⟨v^(T),w∗⟩=⟨vˇ(T),w∗⟩\langle\widehat{\bm{v}}^{(T)},\bm{w}^{*}\rangle=\langle\widecheck{\bm{v}}^{(T)},\bm{w}^{*}\rangle. Using Cauchy-Schwarz inequality, (149) simplifies as:

We again use the Lipschitzness of the power function and get:

Appendix F Transfer Learning

In this section, we show that a transformer that has been pre-trained on a structured dataset require a few samples to generalize in a new dataset sharing the same structure.

Actually, even one step of the update using normalized gradient descent on v\bm{v} can already achieve test accuracy ≥1−o(1).\geq 1-o(1). We know that for a datum (X,y)(\bm{X},y), the gradient of L(X)L(\bm{X}) with respect to v\bm{v} is

Since v~(0)=0,\widetilde{\bm{v}}^{(0)}=\bm{0}, we have Fv~(0)(X)=0F_{\widetilde{\bm{v}}^{(0)}}(\bm{X})=0 and σ′(⟨Om(0),v~(0)⟩)=ν.\sigma^{\prime}(\langle\bm{O}_{m}^{(0)},\widetilde{\bm{v}}^{(0)}\rangle)=\nu. Thus, the gradient (153) simplifies to

By symmetry of the S^j,m(t)\widehat{S}_{j,m}^{(t)} , we know that

Now, by standard concentration inequality, we know that for NN i.i.d. samples X[i],y[i]\bm{X}[i],y[i], with high probability

where ε0\varepsilon_{0} comes from the feature noise

and χ0\bm{\chi}_{0} comes from the noise:

Therefore, if we update using normalized GD:

We can prove the test accuracy is small using the same proof as in Lemma D.15, where we show that:

D1\mathcal{D}_{1}: Sample z∈{0,1}mz\in\{0,1\}^{m} where each ziz_{i} i.i.d. 11 w.p. q/2q/2, −1-1 w.p. q/2q/2 and otherwise.

D2\mathcal{D}_{2}: Sample a set S\mathcal{S} uniformly at random from [m][m] of size CC, set all zi=1z_{i}=1 for i∈Si\in\mathcal{S}, and sample other zjz_{j} i.i.d. 11 w.p. q/2q/2, −1-1 w.p. q/2q/2 and otherwise.

We can easily see that as long as qm=poly(C)qm=\text{poly}(C), then

Appendix G Gradient descent updates in the idealized process

In this section, we derive the gradient descent updates of Ai,jA_{i,j} in the idealized learning process.

Let T>0T>0 be the time where the population loss is at most o(1)o(1) and t∈[0,T].t\in[0,T]. Then, γ(t)\gamma^{(t)} satisfies the update

Since (D−C)/2−qDlog⁡(d)≥0(D-C)/2-qD\log(d)\geq 0, we rewrite (164) as:

Regarding the sum inside σ′\sigma^{\prime}, we use Lemma G.3 which shows:

By using (165) and (166), we finally obtain:

We now bound the sum inside σ′\sigma^{\prime}. This sum is actually equal to the outside sum and we can therefore use the bound (168). Therefore, the overall gradient is bounded as:

We lastly apply Induction Hypothesis B.1 to show that (170) is less or equal to Θ(α(t)).\Theta(\alpha^{(t)}). We now bound the sum inside σ′\sigma^{\prime}.

We now bound the sum inside σ′\sigma^{\prime}.

We lastly apply Lemma G.3 to show that (LABEL:eq:jewnwcdw) is bounded by Θ(α(t))(Λ(t)+(C−1)Γ(t)).\Theta(\alpha^{(t)})(\Lambda^{(t)}+(C-1)\Gamma^{(t)}). Therefore, the overall gradient is bounded as

We now bound the derivative of the population loss. Using Tower property and Lemma I.1, we have:

Therefore, the derivative of the loss in X\bm{X} is:

Let T>0T>0 be the time where the population loss is o(1)o(1) and t≤T.t\leq T. Let G(t):=D(Λ(t)+(C−1)Γ(t))G^{(t)}:=D(\Lambda^{(t)}+(C-1)\Gamma^{(t)}). The update of γ(t)\gamma^{(t)} satisfies:

Lemma G.1 provides the update rule of γ(t)\gamma^{(t)}.

Let T>0T>0 be the time where the population loss is at most o(1)o(1) and t∈[0,T].t\in[0,T]. Then, ρ(t)\rho^{(t)} satisfies the update

We now bound the sum inside σ′\sigma^{\prime}. This sum is actually equal to the outside sum and we can therefore use the bound (179). Therefore, the overall gradient is bounded as:

We now bound the sum inside σ′\sigma^{\prime}. We successively apply Lemma K.3, triangle inequality and Lemma G.3 to obtain:

Thus, we use (181) and (182) to obtain a bound on the derivative.

We now bound the sum inside σ′\sigma^{\prime}.

Using (184) and (185), we obtain a bound on the derivative.

We now bound the sum inside σ′\sigma^{\prime}. We apply Lemma G.3 to obtain:

We combine (187) and (LABEL:eq:fjqjeq) and obtain:

We now bound the sum inside σ′\sigma^{\prime}. This sum is actually equal to the outside sum outside and we can therefore use the bound (LABEL:eq:frekfwew). Thus, the derivative is bounded as:

We now bound the sum inside the power term. This sum is actually equal to the sum outside the power term and we can therefore use the bound (LABEL:eq:redeww). Thus, the derivative is bounded as:

We now bound the sum inside σ′\sigma^{\prime}.

Using (LABEL:eq:jfnrorjw3) and (195), the bound on the derivative is:

We now bound the sum inside the power term. We apply Lemma G.3 and get:

We plug (LABEL:eq:fjeiwbf) and (198) to obtain the derivative.

We now bound the derivative of the population loss. Using Tower property and and Lemma I.1, we have:

Since events a and e are the ones with highest probabilities, the derivative of the loss is bounded by the expectations conditioned on these events. We have:

We now apply Induction Hypothesis B.1 and Lemma K.3 and finally obtain:

Let T>0T>0 be the time where the population loss is o(1)o(1) and t≤T.t\leq T. The update of ρ(t)\rho^{(t)} satisfies:

Lastly, we apply Induction Hypothesis B.1 to replace Ξ(t)\Xi^{(t)} by its value in (203) and thus obtain the aimed result. ∎

G.3 Auxiliary lemmas

Let t>0.t>0. In the idealized learning process, with high probability, we have:

We first bound the sum with factor Ξ(t)\Xi^{(t)}. Using Induction Hypothesis B.1 and Lemma K.3, we have:

We now bound Λ(t)+(C−1)Γ(t)\Lambda^{(t)}+(C-1)\Gamma^{(t)}. Using Induction Hypothesis B.1, we have:

Let t>0t>0. In the idealized learning process, we have with high probability:

We successively apply Lemma K.3 and Induction Hypothesis B.1 to get the desired bound. Indeed, we have:

Appendix H Gradients

In this section, we present the gradients of the loss L\mathcal{L} with respect to v\bm{v} and Ai,j\bm{A}_{i,j}.

Let (X,y)(\bm{X},y) be a data-point. Then, the gradient of L(X)L(\bm{X}) with respect to v\bm{v} is:

Let (X,y)(\bm{X},y) be a data-point and i,j∈[D]i,j\in[D]. The derivative of L(X)L(\bm{X}) with respect to Ai,jA_{i,j} is:

Appendix I Invariance of the problem

Using Induction Hypothesis B.1, we simplify (LABEL:eq:fewjoejdwe) as

Therefore, (LABEL:eq:fe) implies that Ai,j(t+1)=Ak,n(t+1)A_{i,j}^{(t+1)}=A_{k,n}^{(t+1)} thus proving the induction hypothesis.

I.2 Invariance by permutation

Let π1 ⁣:[L]→[L]\pi_{1}\colon[L]\rightarrow[L] and π2 ⁣:[C]→[C]\pi_{2}\colon[C]\rightarrow[C] be two permutations and π=(π1,π2)\pi=(\pi_{1},\pi_{2}). Let (X,⋅)∼D(\bm{X},\cdot)\sim\mathcal{D}. Then, we have:

permutation-invariant distribution: X\bm{X} has the same distribution as π(X).\pi(\bm{X}).

permutation-invariant model: F(X)=F(π(X)).F(\bm{X})=F(\pi(\bm{X})).

Let X\bm{X} be a data-point. Using Lemma 4.1, we rewrite F(X)F(\bm{X}) as

Appendix J Justification of our data distribution

In this section, we justify why the distribution D\mathcal{D} (Assumption 1) is relevant. We first show that linear classifiers poorly generalize (subsection J.1). We then show that there exists classifiers that generalize without learning patch association (subsection J.2).

For every data point X\bm{X}, consider Δ(X):=∑j∈[D]δj\Delta(\bm{X}):=\sum_{j\in[D]}\delta_{j}, it is very easy to see that for every integer pp, as long as Pr⁡[Δ=p]=Ω(1/polylog(d))\Pr[\Delta=p]=\Omega(1/\text{polylog}(d)), we have that:

Consider two independently sampled data points, X,X′\bm{X},\bm{X}^{\prime} with label 1,−11,-1 respectively, consider the event when Δ(X)=p−2C,Δ(X′)=p\Delta(\bm{X})=p-2C,\Delta(\bm{X}^{\prime})=p and all the noises ξi,ξi′\xi_{i},\xi_{i}^{\prime} of X,X′\bm{X},\bm{X}^{\prime} satisfies ξi=ξi′\xi_{i}=\xi_{i}^{\prime}, then we know that

By Eq (214) we also know that the density of X\bm{X} and X′\bm{X}^{\prime} under the data-generation distribution satisfies

J.2 Classifiers fitting the labelling function without patch association

Appendix K Technical lemmas

In this section, we present the technical lemmas used in the paper.

Let {z(t)}t≥0\{z^{(t)}\}_{t\geq 0} be a positive sequence defined by the following recursions

where z(0)>0z^{(0)}>0 is the initialization, k>1k>1 is an integer and m,M>0m,M>0. Let υ>0\upsilon>0 such that z(0)≤υ.z^{(0)}\leq\upsilon. Then, the time T\mathcal{T} such that z(t)≥υz^{(t)}\geq\upsilon for all t≥Tt\geq\mathcal{T} is:

We use the fact that z(s)≥z(0)z^{(s)}\geq z^{(0)} in (223) and obtain:

Now, we want to bound z(T1)−z(0)z^{(T_{1})}-z^{(0)}. Using again the recursion and z(T1−1)≤2z(0)z^{(T_{1}-1)}\leq 2z^{(0)}, we have:

Combining (224) and (225), we get a bound on T1.T_{1}.

Now, let’s find a bound for TnT_{n}. Starting from the recursion and using the fact that z(s)≥2n−1z(0)z^{(s)}\geq 2^{n-1}z^{(0)} for s≥Tn−1s\geq T_{n-1} we have:

On the other hand, by using z(Tn−1)≤2nz(0)z^{(T_{n}-1)}\leq 2^{n}z^{(0)} we upper bound z(Tn)z^{(T_{n})} as follows.

Besides, we know that z(Tn−1)≥2n−1z(0)z^{(T_{n-1})}\geq 2^{n-1}z^{(0)}. Therefore, we upper bound z(Tn)−z(Tn−1)z^{(T_{n})}-z^{(T_{n-1})} as

We now sum (230) for n=2,…,nn=2,\dots,n, use (226) and obtain:

Lastly, we know that nn satisfies 2nz(0)≥υ2^{n}z^{(0)}\geq\upsilon which implies n=⌈log⁡(υ/z0)log⁡(2)⌉n=\left\lceil\frac{\log(\upsilon/z_{0})}{\log(2)}\right\rceil in (231). ∎

Let {z(t)}t≥0\{z^{(t)}\}_{t\geq 0} be a positive sequence defined by the following recursions

where z(0)>0z^{(0)}>0, k>1k>1 is an integer and m,M>0m,M>0. Let υ>0\upsilon>0 such that z(0)≤υz^{(0)}\leq\upsilon and T\mathcal{T} be the time such that z(t)≥υz^{(t)}\geq\upsilon for all t≥Tt\geq\mathcal{T}. Assume that Aυ2m≪1\frac{A\upsilon^{2}}{m}\ll 1. Then, we have for κ∈{1,2}\kappa\in\{1,2\}:

Since z(t)z^{(t)} is a non-decreasing sequence, (232) satisfies:

We now sum (233) for t=Tn−1,…,Tnt=T_{n-1},\dots,T_{n} and get:

Since A(z(t))κm≤A(2nz(0))κm≤Aυκm≪1\frac{A(z^{(t)})^{\kappa}}{m}\leq\frac{A(2^{n}z^{(0)})^{\kappa}}{m}\leq\frac{A\upsilon^{\kappa}}{m}\ll 1, we have \big{(}1+m(z^{(t)})^{k-1}\big{)}^{\frac{A(z^{(t)})^{\kappa}}{m}}\geq 1+A(z^{(t)})^{k-1+\kappa}. We thus lower bound (234) as:

On the other hand, by using z(Tn−1)≤2nz(0)z^{(T_{n}-1)}\leq 2^{n}z^{(0)} and z(Tn)≤2n+1z(0)z^{(T_{n})}\leq 2^{n+1}z^{(0)}, we have the following upper bound.

Since z(Tn−1)≥2n−1z(0)z^{(T_{n-1})}\geq 2^{n-1}z^{(0)}, (236) is finally bounded as:

We combine (235) and (LABEL:eq:ewjeof) to obtain:

We replace 2nz(0)2^{n}z^{(0)} by υ\upsilon and nn by log⁡(υ/z(0))\log(\upsilon/z^{(0)}) in (239) to get the aimed result. ∎

K.2 Probabilistic lemmas

K.3 Logarithmic inequalities

We upper bound (242) by applying a≥C−a\geq C_{-}:

We obtain the final bound by applying Lemma K.6 to (243).

We lower bound (242) by using a≤C+a\leq C_{+}:

We obtain the final bound by applying Lemma K.6 to (244). ∎

Let x,y>0.x,y>0. Assume that y≤x.y\leq x. Then, we have: