Introduction
Transformers ([57 ] ) are the backbone of the modern generative artificial intelligence (GenAI) revolution and the architecture behind large language models like ChatGPT ([1 ] ). They also play a burgeoning role in scientific discovery through the development of scientific foundation models ([6 , 33 , 34 , 53 , 54 , 64 ] ). While the scale and applications of GenAI continue to grow, our theoretical understanding of these models is far less mature. This paper falls within a recent research area which studies transformers from a mathematical perspective, with the hope of eventually narrowing the gap between theory and practice. By developing a rigorous mathematical theory of GenAI architectures, one hopes to reveal the structure behind both their successes and failures. One can also leverage these theoretical insights to design more reliable and robust algorithms for GenAI and machine learning more generally.
The analysis in this paper is based on the mean-field or measure-theoretic perspective on encoder-only transformers ([13 , 23 , 28 , 48 , 49 , 60 ] ): the output of a transformer is a function of the empirical probability distribution of its input tokens. There are several motivations for studying transformers from this perspective. First, by lifting the analysis of transformers from a discrete to a continuum setting, we unlock powerful and well-developed mathematical tools for understanding the behavior of transformers and machine learning on spaces of probability measures more broadly. Second, high-dimensional data often admit natural interpretations as collections of probability measures. Measure-valued data arises, for instance, in physical sciences, where swarms of particles interact according to a time-varying probability distribution, or in neural surrogates for probabilistic models, where the goal is to train a network that directly maps problem conditions (e.g., prior distributions and observations) to solutions. Last, AI methods for such problems have achieved substantial empirical success, but lack the theoretical grounding necessary to engender reliability and trust.
While recent work in this area studies transformers as in-context or contextual mappings ([23 ] })—i.e., vector-to-vector mappings which depend on a probability measure or context —our work focuses on the measure-to-measure operators defined by transformers ([22 , 25 , 29 , 40 ] (Vandergraft et al. 2026)), which we refer to as mean-field transformer operator ators. The goal of this paper is to answer fundamental questions about the mathematical properties of these operators, particularly for input probability measures which have unbounded support. Prior theoretical results focused primarily on bounded data ([14 , 61 ] ), for which the answers to these questions differ substantially. To this end, sub-Gaussian distributions are useful for modeling distributions of tokens which occasionally take very large values, but otherwise remain bounded. Additionally, many probability distributions arising naturally in machine learning and scientific computing, such as posterior distributions for Bayesian inverse problems with Gaussian priors ([52 ] ) and data distributions along the forward/backward processes of a score-based generative model ([51 ] ), often exhibit fast tail decay, but necessarily have unbounded support. At the same time, when working with distributions of unbounded support, some assumption of tail decay is necessary to ensure that the softmax operation is well-defined. Our work finds that sub-Gaussianity is a sufficient tail condition for the stability of mean-field transformer operators, while being broad enough not to preclude the examples of interest mentioned.
Main Contributions
Our main contributions are stated as follows.
(C1) Well-definedness. We show that if μ \mu μ is sub-Gaussian and T T T is an arbitrarily deep mean-field transformer, then T ( μ , ⋅ ) # μ T(\mu,\cdot)_{\#}\mu T ( μ , ⋅ ) # μ remains sub-Gaussian, ensuring that the softmax normalizing constant remains finite across layers. This result thus identifies sub-Gaussianity as a sufficient condition for the image of measures with unbounded support under mean-field transformers to be well-defined; see § 3.1 for precise results.
(C2) Regularity. We show that the mapping μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto T(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ is Hölder continuous on appropriate subsets of sub-Gaussian measures with respect to the 1-Wasserstein metric; see § 3.2 for precise results.
(C3) Sample complexity. We estimate the expected distance between a sub-Gaussian measure μ \mu μ and its empirical counterpart μ N \mu_N μ N under a mean-field transformer in the 1-Wasserstein distance. Our estimate is of the form
E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] = O ~ ( N − γ / d ) . \mathbb{E}\left[W_1\left(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N\right)\right]=\widetilde{O}\left(N^{-\gamma/d}\right). E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] = O ( N − γ / d ) .
where γ \gamma γ is the Hölder exponent of the mapping μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto T(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ ; see § 3.3 for precise results. As an auxiliary result which is possibly of independent interest, we prove concentration inequalities for the sub-Gaussian parameters of μ N \mu_N μ N (Proposition B.7 ).
(C4) Cross-attention. We also study mean-field transformers with the cross-attention mechanism, which leads to a mapping of the form ( μ , η ) ↦ T ( μ , ⋅ ) # η (\mu,\eta)\mapsto T(\mu,\cdot)_{\#}\eta ( μ , η ) ↦ T ( μ , ⋅ ) # η . We show that mean-field cross-attention is jointly Hölder continuous, and that the different variables exhibit different regularity. We also prove a sample complexity result for this mapping under the assumption that μ \mu μ is compactly supported and η \eta η is sub-Gaussian; see § 3.4 for precise results.
(C5) Measure-to-measure approximation. By pairing our sample complexity estimates with recent approximation-theoretic results ([25 ] ), we prove that mean-field transformer operators universally approximate continuous measure-to-measure operators on certain W 1 W_1 W 1 -compact subsets of P ( R d ) \mathcal{P}(\mathbb{R}^d) P ( R d ) , even when the transformer only has access to samples from the input measure. § 3.5 has the precise results.
Our work thus provides initial understanding of the behavior of measure-to-measure transformers on unbounded data. The results in this paper may be of use in other applications, such as to study the generalization properties of transformer-based machine learning models on the space of probability measures.
Related Work
The mean-field perspective on transformers has received significant recent research attention.
Mean-field dynamics of transformers. The works of Geshkovski et al. [27 , 28 , 29 ] pioneered the interpretation of infinitely-deep transformers as interacting particle systems, where residual connections are viewed as steps of an Euler method. To better understand these dynamics as the number of tokens increases, several works have studied the corresponding mean-field dynamics of transformers (Rigolet (2026)). Recent works in mean-field dynamics of transformers study the emergence of clusters ([10 , 16 , 38 ] (Li et al. 2026)), softmax temperature scaling ([9 , 17 ] ), multi-scale analysis ([11 ] ), generalizations to multi-head attention ([47 ] ), and the effects of non-compactly supported initial data ([13 ] ), among other topics.
Regularity of transformers. Several works have established the Lipschitz regularity of mean-field self-attention ([14 , 39 Vuckovic] et al., 2021); these results show that (dot product) attention is not Lipschitz unless measures are restricted to have common compact support, or the negative squared distance is used in the place of the dot product to compute attention scores. The work of Mroueh [44 ] studies the Lipschitz regularity of in-context learning in the mean-field setting, with transformers as a representative example. For different perspectives on the regularity of attention, see work of Sander et al. [49 ] , which connects attention with Sinkhorn normalization to heat diffusion, Kan et al. [36 ] , which interprets regularized transformers as solutions to optimal control problems, and Kan et al. [37 ] , which studies the Lipschitz stability of transformers induced by layer normalization. Closely related to our work is that of Hargenrader et al. [32 ] , who study the integrability of post-norm transformers (beyond softmax attention) when applied to heavy-tailed input measures; in particular, such measures have unbounded support.
Sample complexity of transformers. Bohbot et al. [7 ] ; Boursier and Boyer [8 ] ; Chen et al. [15 ] study the sample complexity of mean-field transformers. Their contributions share a similar flavor with our results in § 3.3 : in particular, Bohbot et al. [7 ] ; Boursier and Boyer [8 ] prove concentration inequalities for attention with sub-Gaussian inputs. The main difference is that their results study the sample complexity of the in-context map associated with transformers, i.e., the mapping x ↦ T ( μ , x ) x \mapsto\mathrm{T}(\mu,x) x ↦ T ( μ , x ) , whereas our results are concerned with the sample complexity of the measure-to-measure operators μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto\mathrm{T}(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ defined by transformers T \mathrm{T} T . Thus, the results of Bohbot et al. [7 ] ; Boursier and Boyer [8 ] ; Chen et al. [15 ] are not directly comparable with our results.
Learning on spaces of probability measures. Mean-field transformers fall within the wider area of machine learning on spaces of probability measures (León and Niles-Weed, 2026; Panaretos and Zemel, 2020; Yao et al., 2026; Zaheer et al., 2017). Applications include regression on point cloud data [12 , 56 ] , training distribution design [31 ] , amortized solvers for mean-field games and optimal transport [19 , 35 ] , amortized conditioning and generative modeling [21 , 26 , 30 , 55 , 63 ] , and inverse problems [45 ] such as non-Gaussian Bayesian data assimilation [2 , 4 , 5 , 62 ] .
Notation
For a natural number N ∈ N N \in\mathbb{N} N ∈ N , we denote by [ N ] : = { 1 , … , N } [N] := \{1,\ldots,N\} [ N ] := { 1 , … , N } . For a vector x ∈ R d x \in\mathbb{R}^{d} x ∈ R d , the number ∥ x ∥ \lVert x\rVert ∥ x ∥ denotes the Euclidean norm; for a matrix A ∈ R d × k A \in\mathbb{R}^{d \times k} A ∈ R d × k , the number ∥ A ∥ \lVert A\rVert ∥ A ∥ denotes the operator norm of A A A with respect to the Euclidean norms on R d \mathbb{R}^{d} R d and R k \mathbb{R}^{k} R k . For R > 0 R > 0 R > 0 , we let B R ( R d ) : = { x ∈ R d : ∥ x ∥ ≤ R } B_R(\mathbb{R}^{d}) := \{x \in\mathbb{R}^{d} : \lVert x\rVert\le R\} B R ( R d ) := { x ∈ R d : ∥ x ∥ ≤ R } denote the closed ball of radius R R R in R d \mathbb{R}^{d} R d ; when the dimension d d d is clear from context, we simply write B R ( R d ) = B R B_R(\mathbb{R}^{d}) = B_R B R ( R d ) = B R . We define log + ( R ) : = max ( 0 , log ( R ) ) \log_{+}(R) := \max(0,\log(R)) log + ( R ) := max ( 0 , log ( R )) , where log \log log is the natural logarithm. Given a real-valued function f f f , we denote by Lip ( f ) \operatorname{Lip}(f) Lip ( f ) the (minimal) Lipschitz constant of f f f , with the convention that Lip ( f ) = ∞ \operatorname{Lip}(f) = \infty Lip ( f ) = ∞ if f f f is not Lipschitz continuous. Given a metric space X \mathcal{X} X , let P ( X ) \mathcal{P}(\mathcal{X}) P ( X ) be the set of Borel probability measures on X \mathcal{X} X . Given μ \mu μ and ν \nu ν in P ( X ) \mathcal{P}(\mathcal{X}) P ( X ) with finite first moment, we denote their 1 1 1 -Wasserstein distance W 1 ( μ , ν ) W_1(\mu,\nu) W 1 ( μ , ν ) by
W 1 ( μ , ν ) : = inf { ∫ X × X ∥ x − y ∥ γ ( d x , d y ) : γ ∈ Π ( μ , ν ) } = sup { ∫ X f d μ − ∫ X f d ν : Lip ( f ) ≤ 1 } . \begin{aligned}
W_1(\mu,\nu) &:= \inf\left\{\int_{\mathcal{X}\times\mathcal{X}} \lVert x-y\rVert\,\gamma(dx,dy): \gamma\in\Pi(\mu,\nu)\right\}\\
&= \sup\left\{\int_{\mathcal{X}} f\,d\mu-\int_{\mathcal{X}} f\,d\nu: \operatorname{Lip}(f) \le1\right\}.
\end{aligned} W 1 ( μ , ν ) := inf { ∫ X × X ∥ x − y ∥ γ ( d x , d y ) : γ ∈ Π ( μ , ν ) } = sup { ∫ X f d μ − ∫ X f d ν : Lip ( f ) ≤ 1 } .
where Π ( μ , ν ) \Pi(\mu,\nu) Π ( μ , ν ) denotes the set of couplings of μ \mu μ and ν \nu ν . Given μ ∈ P ( X ) \mu\in\mathcal{P}(\mathcal{X}) μ ∈ P ( X ) on a set X \mathcal{X} X and a function T \mathrm{T} T on X \mathcal{X} X , we denote by T # μ \mathrm{T}_{\#}\mu T # μ the pushforward measure. Given a measurable space X \mathcal{X} X and a measurable subset A ⊂ X A \subset\mathcal{X} A ⊂ X , we denote by 1 A : X → { 0 , 1 } \mathbf{1}_{A}:\mathcal{X}\to\{0,1\} 1 A : X → { 0 , 1 } the indicator function of A A A . Given positive functions f f f and g g g , we use the notation f ( x ) = O ( g ( x ) ) f(x)=O(g(x)) f ( x ) = O ( g ( x )) or f ( x ) ≲ g ( x ) f(x)\lesssim g(x) f ( x ) ≲ g ( x ) if there exists a positive constant C C C such that f ( x ) ≤ C g ( x ) f(x)\le Cg(x) f ( x ) ≤ C g ( x ) for all x x x in a set of interest that should be clear from the context. We also write f ( x ) = Ω ( g ( x ) ) f(x)=\Omega(g(x)) f ( x ) = Ω ( g ( x )) if g ( x ) = O ( f ( x ) ) g(x)=O(f(x)) g ( x ) = O ( f ( x )) . We often use C C C to denote a positive constant whose value changes from line to line.
Background
This section provides the mathematical and probabilistic preliminaries on measure-theoretic transformers.
Mean-Field Transformers
We begin with a review of the traditional self-attention mechanism. Let X = ( x 1 , … , x N ) ⊂ R d X=(x_1,\ldots,x_N)\subset\mathbb{R}^{d} X = ( x 1 , … , x N ) ⊂ R d denote an input sequence. A single-head self-attention module takes X X X as an input and returns an output sequence Att θ ( X ) ∈ R k \operatorname{Att}_{\theta}(X)\in\mathbb{R}^{k} Att θ ( X ) ∈ R k defined by
Att θ ( X ) i = ∑ j = 1 N exp ( ⟨ x i , A x j ⟩ ) V x j ∑ k = 1 N exp ( ⟨ x i , A x k ⟩ ) for i ∈ [ N ] . \operatorname{Att}_{\theta}(X)_i=\frac{\sum_{j=1}^{N}\exp(\langle x_i,Ax_j\rangle)Vx_j}{\sum_{k=1}^{N}\exp(\langle x_i,Ax_k\rangle)}
\qquad\text{for }i\in[N]. Att θ ( X ) i = ∑ k = 1 N exp (⟨ x i , A x k ⟩) ∑ j = 1 N exp (⟨ x i , A x j ⟩) V x j for i ∈ [ N ] .
Here, V ∈ R k × d V\in\mathbb{R}^{k\times d} V ∈ R k × d and A ∈ R d × d A\in\mathbb{R}^{d\times d} A ∈ R d × d denote the learnable parameters, and θ = ( A , V ) \theta=(A,V) θ = ( A , V ) . In short, an attention head updates each input by computing a weighted average of { V x 1 , … , V x N } \{Vx_1,\ldots,Vx_N\} { V x 1 , … , V x N } , where the weights are determined by the attention scores { exp ( ⟨ x i , A x j ⟩ ) } ( i , j ) ∈ [ N ] 2 \{\exp(\langle x_i,Ax_j\rangle)\}_{(i,j)\in[N]^2} { exp (⟨ x i , A x j ⟩) } ( i , j ) ∈ [ N ] 2 . defining the in-context map
Att θ ( X , x ) = ∑ j = 1 N exp ( ⟨ x , A x j ⟩ ) V x j ∑ k = 1 N exp ( ⟨ x , A x k ⟩ ) (1) \operatorname{Att}_{\theta}(X,x)=\frac{\sum_{j=1}^{N}\exp(\langle x,A x_j\rangle)Vx_j}{\sum_{k=1}^{N}\exp(\langle x,A x_k\rangle)} \tag*{(1)} Att θ ( X , x ) = ∑ k = 1 N exp (⟨ x , A x k ⟩) ∑ j = 1 N exp (⟨ x , A x j ⟩) V x j (1)
associated with the attention layer, we can write the i i i -th token of the output sequence as Att θ ( X ) i = Att θ ( X , x i ) \operatorname{Att}_{\theta}(X)_i=\operatorname{Att}_{\theta}(X,x_i) Att θ ( X ) i = Att θ ( X , x i ) . The function in (1) is called an in-context map because it depends on the input sequence (or context) as well as x x x . Notice that the in-context map depends on the sequence X X X only through the empirical measure μ N = 1 N ∑ i = 1 N δ x i \mu_N=\frac{1}{N}\sum_{i=1}^{N}\delta_{x_i} μ N = N 1 ∑ i = 1 N δ x i . This motivates us to define a mean-field self-attention head as a mapping Att θ : K × R d → R k \operatorname{Att}_{\theta}:K\times\mathbb{R}^{d}\to\mathbb{R}^{k} Att θ : K × R d → R k with K ⊂ P ( R d ) K\subset\mathcal{P}(\mathbb{R}^{d}) K ⊂ P ( R d ) given by
Att θ ( μ , x ) = ∫ exp ( ⟨ x , A y ⟩ ) V y μ ( d y ) ∫ exp ( ⟨ x , A z ⟩ ) μ ( d z ) . (2) \operatorname{Att}_{\theta}(\mu,x)=\frac{\int\exp(\langle x,Ay\rangle)V y\mu(\mathrm{d}y)}{\int\exp(\langle x,Az\rangle)\mu(\mathrm{d}z)}. \tag*{(2)} Att θ ( μ , x ) = ∫ exp (⟨ x , A z ⟩) μ ( d z ) ∫ exp (⟨ x , A y ⟩) V y μ ( d y ) . (2)
This formulation is valid for all probability measures for which the above integrals converge and recovers the traditional attention mechanism when μ \mu μ is an empirical measure. Hereafter, for K ⊂ P ( R d ) K\subset\mathcal{P}(\mathbb{R}^{d}) K ⊂ P ( R d ) , we refer to any mapping K × R d → R k K\times\mathbb{R}^{d}\to\mathbb{R}^{k} K × R d → R k as an in-context map. A multi-head mean-field self-attention layer is an in-context map Γ θ : K × R d → R d \Gamma_{\theta}:K\times\mathbb{R}^{d}\to\mathbb{R}^{d} Γ θ : K × R d → R d of the form
Γ θ ( μ , x ) = x + ∑ h = 1 H W h Att θ h ( μ , x ) , (3) \Gamma_{\theta}(\mu,x)=x+\sum_{h=1}^{H}W_h\operatorname{Att}_{\theta_h}(\mu,x), \tag*{(3)} Γ θ ( μ , x ) = x + h = 1 ∑ H W h Att θ h ( μ , x ) , (3)
where W 1 , … , W H ∈ R d × k W_1,\ldots,W_H\in\mathbb{R}^{d\times k} W 1 , … , W H ∈ R d × k , each Att θ h \operatorname{Att}_{\theta_h} Att θ h is given by (2) , and the learnable parameters are θ = { ( θ h , W h ) } h = 1 H \theta=\{(\theta_h,W_h)\}_{h=1}^{H} θ = {( θ h , W h ) } h = 1 H . Equation (3) is a direct generalization of the standard multi-head self-attention module for sequences to the measure-theoretic setting. Throughout the rest of this work, θ \theta θ will be fixed or clear from context; we may simply abbreviate Att θ \operatorname{Att}_{\theta} Att θ to Att \operatorname{Att} Att and Γ θ \Gamma_{\theta} Γ θ to Γ \Gamma Γ .
Given two in-context mappings G 1 : K 1 × R d 1 → R d 2 G_1:K_1\times\mathbb{R}^{d_1}\to\mathbb{R}^{d_2} G 1 : K 1 × R d 1 → R d 2 and G 2 : K 2 × R d 2 → R d 3 G_2:K_2\times\mathbb{R}^{d_2}\to\mathbb{R}^{d_3} G 2 : K 2 × R d 2 → R d 3 with K 1 ⊂ P ( R d 1 ) K_1\subset\mathcal{P}(\mathbb{R}^{d_1}) K 1 ⊂ P ( R d 1 ) such that G 1 ( μ , ⋅ ) # μ ∈ K 2 G_1(\mu,\cdot)_{\#}\mu\in K_2 G 1 ( μ , ⋅ ) # μ ∈ K 2 for all μ ∈ K 1 \mu\in K_1 μ ∈ K 1 , there is a natural operation to produce a third in-context mapping ( G 2 ⋄ G 1 ) : K 1 × R d 1 → R d 3 (G_2\diamond G_1):K_1\times\mathbb{R}^{d_1}\to\mathbb{R}^{d_3} ( G 2 ⋄ G 1 ) : K 1 × R d 1 → R d 3 defined by
( G 2 ⋄ G 1 ) ( μ , x ) = G 2 ( G 1 ( μ , ⋅ ) # μ , G 1 ( μ , x ) ) . (G_2\diamond G_1)(\mu,x)=G_2\left(G_1(\mu,\cdot)_{\#}\mu,G_1(\mu,x)\right). ( G 2 ⋄ G 1 ) ( μ , x ) = G 2 ( G 1 ( μ , ⋅ ) # μ , G 1 ( μ , x ) ) .
The operation ‘⋄ \diamond ⋄ ’ is associative. Thus, it allows us to define compositions of in-context maps. A mean-field transformer is an in-context mapping defined by composing multi-head self-attention layers and feedforward layers. Recall that a (shallow) feedforward neural network is a function ϕ : R d → R k \phi:\mathbb{R}^{d}\to\mathbb{R}^{k} ϕ : R d → R k of the form
ϕ ( x ) = W 2 ReLU ( W 1 x ) , (4) \phi(x)=W_2\operatorname{ReLU}(W_1x), \tag*{(4)} ϕ ( x ) = W 2 ReLU ( W 1 x ) , (4)
where W 1 ∈ R m × d W_1\in\mathbb{R}^{m\times d} W 1 ∈ R m × d , W 2 ∈ R k × m W_2\in\mathbb{R}^{k\times m} W 2 ∈ R k × m , and the activation function ReLU : R → [ 0 , ∞ ) \operatorname{ReLU}:\mathbb{R}\to[0,\infty) ReLU : R → [ 0 , ∞ ) defined by ReLU ( x ) = max ( 0 , x ) \operatorname{ReLU}(x)=\max(0,x) ReLU ( x ) = max ( 0 , x ) is applied component-wise to the vector W 1 x W_1x W 1 x .
A mean-field transformer is then defined as an in-context mapping of the form
T = ( ϕ L ⋄ Γ θ L ⋄ ⋯ ⋄ ϕ 1 ⋄ Γ θ 1 ) for L ∈ N , (5) T=(\phi_L\diamond\Gamma_{\theta_L}\diamond\cdots\diamond\phi_1\diamond\Gamma_{\theta_1})\quad\text{for }L\in\mathbb{N}, \tag*{(5)} T = ( ϕ L ⋄ Γ θ L ⋄ ⋯ ⋄ ϕ 1 ⋄ Γ θ 1 ) for L ∈ N , (5)
where each Γ θ i \Gamma_{\theta_i} Γ θ i has the form (3) and each ϕ i \phi_i ϕ i is a ReLU network of the form (4) , which we identify with the (constant in μ \mu μ ) in-context map ( μ , x ) ↦ ϕ i ( x ) (\mu,x)\mapsto\phi_i(x) ( μ , x ) ↦ ϕ i ( x ) . Hereafter, we use ‘T T T ’ to denote a general mean-field transformer of the form (5) , whereas ‘Γ \Gamma Γ ’ refers to a single multi-head self-attention layer. Furuya et al. [23 ] proves that the set of mean-field transformers is dense in the set of continuous in-context mappings from P ( Ω ) × Ω \mathcal{P}(\Omega)\times\Omega P ( Ω ) × Ω to R k \mathbb{R}^{k} R k , where Ω ⊂ R d \Omega\subset\mathbb{R}^{d} Ω ⊂ R d is compact.
Remark 2.1. In (5) , we could also allow the ReLU networks ϕ 1 , … , ϕ L \phi_1,\ldots,\phi_L ϕ 1 , … , ϕ L to be arbitrarily deep. However, since multi-head attention layers can represent the identity map, there is no generality lost in restricting ϕ 1 , … , ϕ L \phi_1,\ldots,\phi_L ϕ 1 , … , ϕ L to be shallow.
Remark 2.2. Our sub-Gaussian analysis omits normalization layers (Ba et al., 2016). The main obstruction presented by layer norm (LN) is that it breaks the continuity of transformers. Developing analogs of our results which are compatible with LN is an interesting problem for future work. Nonetheless, although pre-LN transformers only operate on compactly supported measures [37 ] , our work is relevant for understanding post-LN transformers that do accommodate unbounded support in the initial input layer (Harangrader et al., 2026). While often harder to train, post-LN models can exhibit improved performance in some settings [43 ] .
A mean-field transformer T : K × R d → R k T:K\times\mathbb{R}^{d}\to\mathbb{R}^{k} T : K × R d → R k naturally defines an operator from K K K to P ( R k ) \mathcal{P}(\mathbb{R}^{k}) P ( R k ) by
μ ↦ T ( μ , ⋅ ) # μ . \mu\mapsto T(\mu,\cdot)_{\#}\mu. μ ↦ T ( μ , ⋅ ) # μ .
We refer to this operator as a mean-field transformer operator . Notice that if T 1 T_1 T 1 and T 2 T_2 T 2 are mean-field transformers (or more general in-context mappings) for which ( T 2 ⋄ T 1 ) (T_2\diamond T_1) ( T 2 ⋄ T 1 ) is well-defined, then
( T 2 ⋄ T 1 ) ( μ , ⋅ ) # μ = T 2 ( T 1 ( μ , ⋅ ) # μ , ⋅ ) # ( T 1 ( μ , ⋅ ) # μ ) . (T_2\diamond T_1)(\mu,\cdot)_{\#}\mu=T_2(T_1(\mu,\cdot)_{\#}\mu,\cdot)_{\#}(T_1(\mu,\cdot)_{\#}\mu). ( T 2 ⋄ T 1 ) ( μ , ⋅ ) # μ = T 2 ( T 1 ( μ , ⋅ ) # μ , ⋅ ) # ( T 1 ( μ , ⋅ ) # μ ) .
In other words, given two mean-field transformers, the in-context composition rule corresponds to the standard composition rule for their corresponding measure-to-measure operators.
Sub-Gaussian Probability Distributions
Sub-Gaussian probability distributions are central objects in high-dimensional probability and machine learning which generalize the tail decay properties of the Gaussian distribution. Given α ≥ 1 \alpha\geq1 α ≥ 1 and β > 0 \beta>0 β > 0 , we define the class of ( α , β ) (\alpha,\beta) ( α , β ) -sub-Gaussian measures on R d \mathbb{R}^d R d , denoted by S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) , to consist of all measures μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^d) μ ∈ P ( R d ) with square-exponential tail decay:
sup R > 0 μ ( { x ∈ R d : ∥ x ∥ > R } ) e R 2 / β 2 ≤ α . \sup_{R>0}\mu\left(\{x\in\mathbb{R}^d:\|x\|>R\}\right)e^{R^2/\beta^2}\leq\alpha. R > 0 sup μ ( { x ∈ R d : ∥ x ∥ > R } ) e R 2 / β 2 ≤ α .
The sets { S G α , β ( R d ) } α ≥ 1 , β > 0 \{\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)\}_{\alpha\geq1,\beta>0} { SG α , β ( R d ) } α ≥ 1 , β > 0 are monotonic, i.e., if α 1 ≤ α 2 \alpha_1\leq\alpha_2 α 1 ≤ α 2 and β 1 ≤ β 2 \beta_1\leq\beta_2 β 1 ≤ β 2 , then S G α 1 , β 1 ( R d ) ⊆ S G α 2 , β 2 ( R d ) \mathrm{SG}_{\alpha_1,\beta_1}(\mathbb{R}^d)\subseteq\mathrm{SG}_{\alpha_2,\beta_2}(\mathbb{R}^d) SG α 1 , β 1 ( R d ) ⊆ SG α 2 , β 2 ( R d ) . We then define
S G ( R d ) : = ⋃ α ≥ 1 , β > 0 S G α , β ( R d ) . \mathrm{SG}(\mathbb{R}^d):=\bigcup_{\alpha\geq1,\beta>0}\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d). SG ( R d ) := α ≥ 1 , β > 0 ⋃ SG α , β ( R d ) .
This definition coincides with the classical definition of sub-Gaussianity, i.e., μ ∈ S G ( R d ) \mu\in\mathrm{SG}(\mathbb{R}^d) μ ∈ SG ( R d ) if and only if X ∼ μ X\sim\mu X ∼ μ has finite sub-Gaussian norm [58 Chapter 2] . If μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , then we refer to α \alpha α and β \beta β as the sub-Gaussian parameters of μ \mu μ .
Main Results
This section develops contributions (C1)–(C5).
Remark 3.1. In this paper, most of our upper bounds on the W 1 W_1 W 1 metric are based on coupling arguments. Thus, we expect that our results also hold for W p W_p W p with p > 1 p>1 p > 1 , up to constant factors which depend on p p p . We leave this extension to future work.
Transformers Preserve Sub-Gaussianity
As alluded to previously, defining mean-field transformers on probability measures with unbounded support requires care. Indeed, if Att θ \operatorname{Att}_\theta Att θ is a self-attention layer with parameters A A A and V V V , then Att θ ( μ , x ) \operatorname{Att}_\theta(\mu,x) Att θ ( μ , x ) is well-defined if and only if the integrals
∫ e ⟨ x , A y ⟩ V y μ ( d y ) and ∫ e ⟨ x , A y ⟩ μ ( d y ) \int e^{\langle x,Ay\rangle}Vy\,\mu(dy)
\qquad\text{and}\qquad
\int e^{\langle x,Ay\rangle}\,\mu(dy) ∫ e ⟨ x , A y ⟩ V y μ ( d y ) and ∫ e ⟨ x , A y ⟩ μ ( d y )
converge. If these integrals converge for every x ∈ R d x\in\mathbb{R}^d x ∈ R d , then μ \mu μ necessarily has sub-exponential tails. The matter is further complicated by considering compositions of attention layers. Indeed, it could be the case that μ \mu μ is sufficiently light-tailed to make Att θ ( μ , ⋅ ) \operatorname{Att}_\theta(\mu,\cdot) Att θ ( μ , ⋅ ) well-defined, but Att θ ( μ , ⋅ ) # μ \operatorname{Att}_\theta(\mu,\cdot)_\#\mu Att θ ( μ , ⋅ ) # μ is heavy-tailed. To circumvent these concerns, we would like to identify a set K ⊂ P ( R d ) K\subset\mathcal{P}(\mathbb{R}^d) K ⊂ P ( R d ) on which transformers are well-defined and stable, in the sense that Ψ ( K ) ⊂ K \Psi(K)\subset K Ψ ( K ) ⊂ K for any mean-field transformer operator Ψ \Psi Ψ . Below, we establish S G ( R d ) \mathrm{SG}(\mathbb{R}^d) SG ( R d ) as having this desired property. The key insight is that if μ ∈ S G ( R d ) \mu\in\mathrm{SG}(\mathbb{R}^d) μ ∈ SG ( R d ) , then Att θ ( μ , ⋅ ) \operatorname{Att}_\theta(\mu,\cdot) Att θ ( μ , ⋅ ) grows at most linearly.
Proposition 3.2. Fix α ≥ 1 \alpha\geq1 α ≥ 1 and β > 0 \beta>0 β > 0 . Let Γ \Gamma Γ be a mean-field self-attention operator given by
Γ ( μ , x ) = x + ∑ h = 1 H W h ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) ∫ e ⟨ x , A h y ⟩ μ ( d y ) . (6) \Gamma(\mu,x)=x+\sum_{h=1}^{H}W_h\frac{\int e^{\langle x,A_hy\rangle}V_hy\,\mu(dy)}{\int e^{\langle x,A_hy\rangle}\,\mu(dy)}. \tag*{(6)} Γ ( μ , x ) = x + h = 1 ∑ H W h ∫ e ⟨ x , A h y ⟩ μ ( d y ) ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) . (6) Then there exist constants K 1 , K 2 > 0 K_1,K_2>0 K 1 , K 2 > 0 , depending only on α \alpha α , β \beta β , H H H , and the attention weights, such that
sup μ ∈ S G α , β ( R d ) ∥ Γ ( μ , x ) ∥ ≤ K 1 + K 2 ∥ x ∥ for all x ∈ R d . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\|\Gamma(\mu,x)\|\leq K_1+K_2\|x\|\quad\text{for all }x\in\mathbb{R}^d. μ ∈ SG α , β ( R d ) sup ∥Γ ( μ , x ) ∥ ≤ K 1 + K 2 ∥ x ∥ for all x ∈ R d .
Castin et al. [13 ] established that when μ \mu μ is a Gaussian measure, the mapping x ↦ Att θ ( μ , x ) x\mapsto\operatorname{Att}_\theta(\mu,x) x ↦ Att θ ( μ , x ) is linear. As a consequence, μ ↦ Att θ ( μ , ⋅ ) # μ \mu\mapsto\operatorname{Att}_\theta(\mu,\cdot)_\#\mu μ ↦ Att θ ( μ , ⋅ ) # μ sends Gaussian measures to Gaussian measures. In contrast, our result asserts that when μ \mu μ is sub-Gaussian , the self-attention map Att θ ( μ , ⋅ ) \operatorname{Att}_\theta(\mu,\cdot) Att θ ( μ , ⋅ ) grows affine-linearly ; thus, its pushforward preserves sub-Gaussianity.
A consequence of Proposition 3.2 is that mean-field transformers map S G ( R d ) \mathrm{SG}(\mathbb{R}^d) SG ( R d ) to S G ( R k ) \mathrm{SG}(\mathbb{R}^k) SG ( R k ) .
Theorem 3.3. Let T \mathrm{T} T be a mean-field transformer. Then T ( μ , ⋅ ) # μ ∈ S G ( R k ) \mathrm{T}(\mu,\cdot)_\#\mu\in\mathrm{SG}(\mathbb{R}^k) T ( μ , ⋅ ) # μ ∈ SG ( R k ) for every μ ∈ S G ( R d ) \mu\in\mathrm{SG}(\mathbb{R}^d) μ ∈ SG ( R d ) .
Proof. Let μ ∈ S G ( R d ) \mu\in\mathrm{SG}(\mathbb{R}^d) μ ∈ SG ( R d ) . By Proposition 3.2 and the fact that ReLU feedforward networks are Lipschitz continuous, there exist constants K 1 , K 2 > 0 K_1,K_2>0 K 1 , K 2 > 0 (depending on the parameters of T \mathrm{T} T and the sub-Gaussian parameters of μ \mu μ ) such that ∥ T ( μ , x ) ∥ ≤ K 1 + K 2 ∥ x ∥ \|\mathrm{T}(\mu,x)\|\leq K_1+K_2\|x\| ∥ T ( μ , x ) ∥ ≤ K 1 + K 2 ∥ x ∥ for all x ∈ R d x\in\mathbb{R}^d x ∈ R d . The conclusion follows by Lemma B.2. □ \square □
Theorem 3.3 identifies sub-Gaussianity as a natural tail assumption for mean-field transformers. Importantly, it applies not only to individual attention layers, but also to arbitrarily deep transformers.
Hölder Regularity of Transformers on Sub-Gaussian Domains
Understanding the regularity of neural architectures is important, for instance, to ensure their robustness under corruptions of the data, to characterize the functions which they can efficiently approximate, and to prove generalization bounds. In this subsection, we study the regularity of measure-to-measure operators of the form μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto\mathrm{T}(\mu,\cdot)_\#\mu μ ↦ T ( μ , ⋅ ) # μ , where T \mathrm{T} T is a mean-field transformer. With the results of the previous subsection in mind, we restrict the domain of these operators to be S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) for a fixed (but arbitrary) pair ( α , β ) ∈ [ 1 , ∞ ) × ( 0 , ∞ ) (\alpha,\beta)\in[1,\infty)\times(0,\infty) ( α , β ) ∈ [ 1 , ∞ ) × ( 0 , ∞ ) . Previous works have studied the regularity of such mappings on the domain P ( B R ) \mathcal{P}(B_R) P ( B R ) , where it was shown that mean-field self-attention operators are Lipschitz continuous [14 ] . In particular, these results established lower bounds on the Lipschitz constant of a mean-field self-attention map Att θ \operatorname{Att}_\theta Att θ of the form
Lip P ( B R ) ( Att θ ) = Ω ( e Ω ( R 2 ) ) . \operatorname{Lip}_{\mathcal{P}(B_R)}(\operatorname{Att}_\theta)=\Omega\left(e^{\Omega(R^2)}\right). Lip P ( B R ) ( Att θ ) = Ω ( e Ω ( R 2 ) ) .
These lower bounds suggest that mean-field transformer operators might not be Lipschitz continuous on S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) , since S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) contains measures with unbounded support. Instead, we prove that mean-field transformer operators are Hölder continuous on S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) . We first state a result for a multi-head self-attention layer, where we have a precise (but possibly sub-optimal) estimate of the Hölder exponent.
Theorem 3.4. Let Γ : S G α , β ( R d ) × R d → R d \Gamma: SG_{\alpha,\beta}(\mathbb{R}^d) \times\mathbb{R}^d \to\mathbb{R}^d Γ : S G α , β ( R d ) × R d → R d be a mean-field self-attention operator as in (3.1). Define c A : = max h ∈ [ H ] ∥ A h ∥ c_A := \max_{h\in[H]}\lVert A_h\rVert c A := max h ∈ [ H ] ∥ A h ∥ , c V : = max h ∈ [ H ] ∥ V h ∥ c_V := \max_{h\in[H]}\lVert V_h\rVert c V := max h ∈ [ H ] ∥ V h ∥ , and c W : = max h ∈ [ H ] ∥ W h ∥ c_W := \max_{h\in[H]}\lVert W_h\rVert c W := max h ∈ [ H ] ∥ W h ∥ . Further, define
k 1 : = 5 c A , k 2 : = min ( 1 β , 1 2 ( β 3 α 2 c A 2 + 1 ) ) , k_1 := 5c_A,\quad k_2 := \min\left(\frac{1}{\beta},\frac{1}{2(\beta^3\alpha^2c_A^2+1)}\right), k 1 := 5 c A , k 2 := min ( β 1 , 2 ( β 3 α 2 c A 2 + 1 ) 1 ) , γ : = k 2 k 1 + k 2 . \gamma:= \frac{k_2}{k_1+k_2}. γ := k 1 + k 2 k 2 . Then there exists a constant C C C , depending on α \alpha α , β \beta β , H H H , c A c_A c A , c V c_V c V , and c W c_W c W , such that, for all ϵ > 0 \epsilon>0 ϵ > 0 ,
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C log + ( ϵ − 1 ) ϵ γ W_1\left(\Gamma(\mu,\cdot)\#\mu,\Gamma(\mu_0,\cdot)\#\mu_0\right)\leq C\log_+(\epsilon^{-1})\epsilon^\gamma W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C log + ( ϵ − 1 ) ϵ γ holds for all μ \mu μ and μ 0 \mu_0 μ 0 in S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) with W 1 ( μ , μ 0 ) ≤ ϵ W_1(\mu,\mu_0)\leq\epsilon W 1 ( μ , μ 0 ) ≤ ϵ . In particular, by enlarging the constant and decreasing the Hölder exponent too, it follows that there exists C ( α , β , H , c A , c V ) > 0 C(\alpha,\beta,H,c_A,c_V)>0 C ( α , β , H , c A , c V ) > 0 and γ ′ ∈ ( 0 , γ ) \gamma'\in(0,\gamma) γ ′ ∈ ( 0 , γ ) such that
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C W 1 ( μ , μ 0 ) γ ′ W_1\left(\Gamma(\mu,\cdot)\#\mu,\Gamma(\mu_0,\cdot)\#\mu_0\right)\leq C W_1(\mu,\mu_0)^{\gamma'} W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C W 1 ( μ , μ 0 ) γ ′ for all μ ∈ S G α , β ( R d ) \mu\in SG_{\alpha,\beta}(\mathbb{R}^d) μ ∈ S G α , β ( R d ) and all μ 0 ∈ S G α , β ( R d ) \mu_0\in SG_{\alpha,\beta}(\mathbb{R}^d) μ 0 ∈ S G α , β ( R d ) .
Theorem 3.4 is proven by truncating the supports of μ \mu μ and μ 0 \mu_0 μ 0 , controlling the W 1 W_1 W 1 error between truncated versions of μ \mu μ and μ 0 \mu_0 μ 0 , and trading off the truncation error with the Lipschitz constant. The details can be found in Appendix A.2. The dependence of the Hölder exponent on ∥ A ∥ \lVert A\rVert ∥ A ∥ is unavoidable from our proof strategy because the Lipschitz constant of μ ↦ Γ ( μ , ⋅ ) # μ \mu\mapsto\Gamma(\mu,\cdot)\#\mu μ ↦ Γ ( μ , ⋅ ) # μ on P ( B R ) \mathcal{P}(B_R) P ( B R ) is Ω ( e Ω ( c A R ) ) \Omega(e^{\Omega(c_A R)}) Ω ( e Ω ( c A R ) ) , while for μ ∈ S G α , β ( R d ) \mu\in SG_{\alpha,\beta}(\mathbb{R}^d) μ ∈ S G α , β ( R d ) , the Wasserstein distance between μ \mu μ and its truncation to P ( B R ) \mathcal{P}(B_R) P ( B R ) is O ( e − R 2 / β ) O(e^{-R^2/\beta}) O ( e − R 2 / β ) . However, we do not attempt to optimize the exponent γ \gamma γ in our proof. The final estimate crudely removes the log factor by enlarging the Hölder constant and reducing the Hölder exponent, thus establishing a bona fide Hölder continuity estimate of the mean-field multi-head self-attention layer.
We extend the Hölder regularity to general mean-field transformers, though the generality of the statement requires sacrificing control on the Hölder exponent.
Theorem 3.5. Fix d ∈ N d\in\mathbb{N} d ∈ N with d ≥ 3 d\geq3 d ≥ 3 . Let T : S G α , β ( R d ) × R d → R d T: SG_{\alpha,\beta}(\mathbb{R}^d)\times\mathbb{R}^d\to\mathbb{R}^d T : S G α , β ( R d ) × R d → R d be a mean-field transformer. Then there exist constants C > 0 C>0 C > 0 and γ ∈ ( 0 , 1 ) \gamma\in(0,1) γ ∈ ( 0 , 1 ) (depending on T T T , α \alpha α , and β \beta β ) such that
W 1 ( T ( μ , ⋅ ) # μ , T ( μ 0 , ⋅ ) # μ 0 ) ≤ C ϵ γ W_1\left(T(\mu,\cdot)\#\mu,T(\mu_0,\cdot)\#\mu_0\right)\leq C\epsilon^\gamma W 1 ( T ( μ , ⋅ ) # μ , T ( μ 0 , ⋅ ) # μ 0 ) ≤ C ϵ γ holds for all μ \mu μ and μ 0 \mu_0 μ 0 in S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) with W 1 ( μ , μ 0 ) ≤ ϵ W_1(\mu,\mu_0)\leq\epsilon W 1 ( μ , μ 0 ) ≤ ϵ .
The proof can be found in Appendix A.2. Theorem 3.5 complements the results of Section 3.1 by characterizing the smoothness of mean-field transformers on sub-Gaussian data. A natural application of these regularity results is to generalization error estimates for learning—e.g., via empirical risk minimization—on the space of probability measures with mean-field transformers. We leave this direction to future work.
Remark 3.6. The assumption that d ≥ 3 d\geq3 d ≥ 3 in Theorem 3.7 is only made to simplify the presentation and avoid a more complex case-based result. In more detail, the proof of Theorem 3.7 uses a Wasserstein law of large numbers of the form W 1 ( μ , μ N ) ≲ N − 1 / d W_1(\mu,\mu_N)\lesssim N^{-1/d} W 1 ( μ , μ N ) ≲ N − 1/ d , for which the cases d = 1 d=1 d = 1 and d = 2 d=2 d = 2 are exceptional. Our bound directly generalizes to these cases, but we choose to present the result in its simplest form.
Sample Complexity of Transformers
While the mean-field framework is a convenient setting to mathematically study transformers, probability measures must be quantized in practice. A natural means of quantization is independent and identically distributed (iid) sampling. As an application of our regularity results, we estimate the sample complexity of mean-field transformer operators in the iid setting. Given μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^d) μ ∈ P ( R d ) , we use μ N \mu_N μ N to denote the (random) empirical measure associated with μ \mu μ . That is, if x n ∼ μ x_n\sim\mu x n ∼ μ for n ∈ [ N ] n\in[N] n ∈ [ N ] are iid, then μ N = 1 N ∑ n = 1 N δ x n \mu_N=\frac{1}{N}\sum_{n=1}^N\delta_{x_n} μ N = N 1 ∑ n = 1 N δ x n .
Theorem 3.7. Fix d ∈ N d\in\mathbb{N} d ∈ N with d ≥ 3 d\geq3 d ≥ 3 , α ≥ 1 \alpha\geq1 α ≥ 1 , and β > 0 \beta>0 β > 0 . Let T T T be a mean-field transformer. Let γ ∈ ( 0 , 1 ) \gamma\in(0,1) γ ∈ ( 0 , 1 ) be a Hölder exponent of T T T on S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) . Then there exist constants C > 0 C>0 C > 0 and C ′ > 1 C'>1 C ′ > 1 , depending on T T T , α \alpha α , β \beta β , γ \gamma γ , and d d d , such that
sup μ ∈ S G α , β ( R d ) E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C log ( N ) γ / 2 ( 1 + log ( 1 + N 1 / d ) ) γ / 2 N − γ / d \sup_{\mu\in SG_{\alpha,\beta}(\mathbb{R}^d)}\mathbb{E}W_1\left(T(\mu,\cdot)\#\mu,T(\mu_N,\cdot)\#\mu_N\right)
\leq C\log(N)^{\gamma/2}\left(1+\log\left(1+N^{1/d}\right)\right)^{\gamma/2}N^{-\gamma/d} μ ∈ S G α , β ( R d ) sup E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C log ( N ) γ /2 ( 1 + log ( 1 + N 1/ d ) ) γ /2 N − γ / d for all N ≥ C ′ N\geq C' N ≥ C ′ .
Theorem 3.7 does not follow simply by applying the Hölder regularity of T T T . The issue is that the empirical measure μ N \mu_N μ N may not belong to S G α , β ( R d ) SG_{\alpha,\beta}(\mathbb{R}^d) S G α , β ( R d ) . To deal with this, we first prove that when N N N is sufficiently large, there exist constants α ~ ≥ 1 \widetilde{\alpha}\geq1 α ≥ 1 and β ~ > 0 \widetilde{\beta}>0 β > 0 , which depend on α \alpha α and β \beta β but are independent of N N N , such that μ N ∈ S G α ~ , β ~ ( R d ) \mu_N\in SG_{\widetilde{\alpha},\widetilde{\beta}}(\mathbb{R}^d) μ N ∈ S G α , β ( R d ) with high probability; see Proposition B.7 for a precise statement. We denote the event on which this inclusion holds by A N \mathcal{A}_N A N . On A N \mathcal{A}_N A N , we use the Hölder regularity of T T T and a uniform Wasserstein law of large numbers to control the averaged difference between T ( μ , ⋅ ) # μ T(\mu,\cdot)\#\mu T ( μ , ⋅ ) # μ and T ( μ N , ⋅ ) # μ N T(\mu_N,\cdot)\#\mu_N T ( μ N , ⋅ ) # μ N . We conclude by proving that the residual error term incurred by the tail probability of the bad set A N c \mathcal{A}_N^c A N c is of higher order. The details can be found in Appendix A.2.
To complement Theorem 3.7 , we provide an analogous result under the assumption that μ \mu μ has compact support. This assumption leads to an improved convergence rate with respect to the sample size N N N and highlights a difference between the behavior of transformers on bounded and unbounded data. Although the next result is likely not novel, we were unable to locate a precise reference for it. Thus, we decided to present it in case it is of use in other contexts.
Proposition 3.8. Fix d ∈ N d \in\mathbb{N} d ∈ N with d ≥ 3 d \ge3 d ≥ 3 . Let R > 0 R > 0 R > 0 and N ∈ N N \in\mathbb{N} N ∈ N , and let T : P ( R d ) × R d → R k \mathrm{T}: \mathcal{P}(\mathbb{R}^{d}) \times\mathbb{R}^{d} \to\mathbb{R}^{k} T : P ( R d ) × R d → R k be a mean-field transformer. Then there is a constant C > 0 C > 0 C > 0 , depending on d d d , R R R , and T \mathrm{T} T , such that
sup μ ∈ P ( B R ( R d ) ) E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . \sup_{\mu\in\mathcal{P}(B_R(\mathbb{R}^{d}))} \mathbb{E} W_1\left(\mathrm{T}(\mu,\cdot)_{\#}\mu,\mathrm{T}(\mu_N,\cdot)_{\#}\mu_N\right)
\le C\left(1+\sqrt{\log\left(1+N^{1/d}\right)}\right)N^{-1/d}. μ ∈ P ( B R ( R d )) sup E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d .
The proof of Proposition 3.8 , which is presented in Appendix § 7 .§ 3 , is substantially simpler than the proof of Theorem 3.7 for two reasons: first, the mapping μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto\mathrm{T}(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ is globally Lipschitz on P ( B R ) \mathcal{P}(B_R) P ( B R ) , and second, the empirical measure μ N \mu_N μ N belongs to P ( B R ) \mathcal{P}(B_R) P ( B R ) almost surely.
Transformers With Mean-Field Cross-Attention
Given two input sequences X = ( x 1 , … , x N ) ⊂ R d X=(x_1,\ldots,x_N)\subset\mathbb{R}^{d} X = ( x 1 , … , x N ) ⊂ R d and Z = ( z 1 , … , z M ) ⊂ R d ′ Z=(z_1,\ldots,z_M)\subset\mathbb{R}^{d'} Z = ( z 1 , … , z M ) ⊂ R d ′ , a (single-head) cross-attention layer maps X X X and Z Z Z to a third sequence Y = ( y 1 , … , y M ) ⊂ R d ′ Y=(y_1,\ldots,y_M)\subset\mathbb{R}^{d'} Y = ( y 1 , … , y M ) ⊂ R d ′ , where
y i = z i + ∑ n = 1 N e ⟨ z i , A x n ⟩ V x n ∑ j = 1 N e ⟨ z i , A x j ⟩ y_i=z_i+\frac{\sum_{n=1}^{N}e^{\langle z_i,Ax_n\rangle}Vx_n}{\sum_{j=1}^{N}e^{\langle z_i,Ax_j\rangle}} y i = z i + ∑ j = 1 N e ⟨ z i , A x j ⟩ ∑ n = 1 N e ⟨ z i , A x n ⟩ V x n
for i ∈ [ M ] i\in[M] i ∈ [ M ] and V V V and A A A belong to R d ′ × d \mathbb{R}^{d'\times d} R d ′ × d . Taking the limit as the number of tokens N N N and M M M tend to infinity, we consider a mean-field analog of transformers with the cross-attention architecture by considering operators
( μ , η ) ↦ Γ ( μ , ⋅ ) # η , (\mu,\eta)\mapsto\Gamma(\mu,\cdot)_{\#}\eta, ( μ , η ) ↦ Γ ( μ , ⋅ ) # η ,
where Γ \Gamma Γ is the in-context mapping associated with a mean-field attention layer of the form (3) . To complement the results of the previous subsections, we derive regularity and sample complexity estimates for mean-field transformers with cross-attention. We begin by establishing a joint Hölder continuity bound when the mapping above is defined by a multi-head self-attention layer.
Theorem 3.9. Let Γ : S G α , β ( R d ) × R d ′ → R d ′ \Gamma:\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d})\times\mathbb{R}^{d'}\to\mathbb{R}^{d'} Γ : SG α , β ( R d ) × R d ′ → R d ′ be a mean-field attention operator given by
Γ ( μ , x ) : = x + ∑ h = 1 H W h ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) ∫ e ⟨ x , A h z ⟩ μ ( d z ) . (7) \Gamma(\mu,x):=x+\sum_{h=1}^{H}W_h\frac{\int e^{\langle x,A_hy\rangle}V_hy\,\mu(\mathrm{d}y)}{\int e^{\langle x,A_hz\rangle}\,\mu(\mathrm{d}z)}. \tag*{(7)} Γ ( μ , x ) := x + h = 1 ∑ H W h ∫ e ⟨ x , A h z ⟩ μ ( d z ) ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) . (7) Let c A c_A c A , c V c_V c V , and c W c_W c W be as in Theorem 3.4 . Define
k 1 : = 1 2 β ( β 3 α 2 c A 2 + 1 ) , k 2 : = 2 2 c A 2 β 3 α 2 c A 2 + 1 , k_1:=\frac{1}{2\beta(\beta^3\alpha^2c_A^2+1)},\qquad k_2:=2\sqrt{\frac{2c_A^2}{\beta^3\alpha^2c_A^2+1}}, k 1 := 2 β ( β 3 α 2 c A 2 + 1 ) 1 , k 2 := 2 β 3 α 2 c A 2 + 1 2 c A 2 , γ : = k 2 k 1 + k 2 . \gamma:=\frac{k_2}{k_1+k_2}. γ := k 1 + k 2 k 2 . Then there exists a constant C = C ( α , β , H , c A , c V ) > 0 C=C(\alpha,\beta,H,c_A,c_V)>0 C = C ( α , β , H , c A , c V ) > 0 such that for all μ \mu μ and μ 0 \mu_0 μ 0 in S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d}) SG α , β ( R d ) and all η \eta η and η 0 \eta_0 η 0 in S G α , β ( R d ′ ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'}) SG α , β ( R d ′ ) , it holds that
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C ( 1 ∨ log + ( W 1 ( μ , μ 0 ) − 1 ) 3 2 ) W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) . W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0\right)
\le C\left(1\vee\log_+\left(W_1(\mu,\mu_0)^{-1}\right)^{\frac{3}{2}}\right)W_1(\mu,\mu_0)^\gamma+W_1(\eta,\eta_0). W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C ( 1 ∨ log + ( W 1 ( μ , μ 0 ) − 1 ) 2 3 ) W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) .
Theorem 3.9 establishes joint Hölder regularity of the mean-field cross-attention mapping, up to logarithmic factors. Note that the estimate is not symmetric in μ \mu μ and η \eta η because the mapping ( μ , η ) ↦ Γ ( μ , ⋅ ) # η (\mu,\eta)\mapsto\Gamma(\mu,\cdot)_{\#}\eta ( μ , η ) ↦ Γ ( μ , ⋅ ) # η is not symmetric. Rather, the estimate shows that the measure-to-measure operator associated with cross-attention is smoother as a function of η \eta η than as a function of μ \mu μ ; in particular, cross-attention is nearly Lipschitz continuous with respect to the second argument, up to a logarithmic factor. This asymmetry is due to the difference in scale between the local Lipschitz constant of the mapping ( μ , x ) ↦ Γ ( μ , x ) (\mu,x)\mapsto\Gamma(\mu,x) ( μ , x ) ↦ Γ ( μ , x ) with respect to each variable. Theorem 3.9 can also be generalized to repeated compositions of cross- and self-attention layers and feedforward neural networks, but the propagation of log factors across layers is more complicated than for mean-field transformers with self-attention. Moreover, this deep setting is also more challenging because the implied deep transformer in-context map can depend on both μ \mu μ and η \eta η , instead of just μ \mu μ . For these reasons, we choose not to generalize Theorem 3.9 beyond a single attention layer.
Paralleling Theorem 3.7 , we also establish a sample complexity bound for transformers with cross-attention. To simplify the presentation, we again restrict to a single attention layer, but the result can straightforwardly be generalized to deep transformers at the expense of a looser scaling law. In the result below, we consider two assumptions on the pair of measures ( μ , η ) (\mu,\eta) ( μ , η ) : when μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) and η ∈ S G α , β ( R d ) \eta\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d}) η ∈ SG α , β ( R d ) for some R > 0 R>0 R > 0 , α ≥ 1 \alpha\ge1 α ≥ 1 , and β > 0 \beta>0 β > 0 , we obtain nonparametric sample complexity rates analogous to those in Theorem 3.7 ; on the other hand, when both μ \mu μ and η \eta η belong to P ( B R ) \mathcal{P}(B_R) P ( B R ) , we find that the sample complexity with respect to μ \mu μ achieves a dimension-free rate of N − 1 / 2 N^{-1/2} N − 1/2 , up to log factors. We leave extending the cross-attention sample complexity bounds in the case where both μ \mu μ and η \eta η have unbounded support to future work.
Theorem 3.10. Fix d ∈ N d\in\mathbb{N} d ∈ N with d ≥ 3 d\ge3 d ≥ 3 . Fix α ≥ 1 \alpha\ge1 α ≥ 1 , β > 0 \beta>0 β > 0 , and R > 0 R>0 R > 0 . Let Γ : P ( R d ) × R d ′ → R d ′ \Gamma:\mathcal{P}(\mathbb{R}^{d})\times\mathbb{R}^{d'}\to\mathbb{R}^{d'} Γ : P ( R d ) × R d ′ → R d ′ be a
mean-field multi-head attention layer as in (3.2). Let c A c_A c A , c V c_V c V , and c W c_W c W be as defined in Theorem 3.4. Then there exist constants C 1 > 0 C_1 > 0 C 1 > 0 , C 2 > 0 C_2 > 0 C 2 > 0 , and C 3 ≥ 1 C_3 \ge1 C 3 ≥ 1 , which depend on d d d , d ′ d' d ′ , α \alpha α , β \beta β , R R R , H H H , c A c_A c A , and c V c_V c V , such that for all M ∈ N M \in\mathbb{N} M ∈ N and all N ≥ C 3 N \ge C_3 N ≥ C 3 , it holds that
sup μ ∈ P ( B R ) η ∈ S G α , β ( R d ′ ) E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ C 1 ( polylog ( N ) N − 1 d ( 4 c A β + 1 ) + polylog ( M ) M − 1 / d ) . \sup_{\substack{\mu\in\mathcal{P}(B_R)\\ \eta\in\mathop{\mathrm{SG}}\nolimits_{\alpha,\beta}(\mathbb{R}^{d'})}} \mathbb{E} W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_N,\cdot)_{\#}\eta_M\right)
\le C_1\left(\operatorname{polylog}(N)N^{-\frac{1}{d(4c_A\beta+1)}}+\operatorname{polylog}(M)M^{-1/d}\right). μ ∈ P ( B R ) η ∈ SG α , β ( R d ′ ) sup E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ C 1 ( polylog ( N ) N − d ( 4 c A β + 1 ) 1 + polylog ( M ) M − 1/ d ) .
and
sup μ ∈ P ( B R ) η ∈ P ( B R ) E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ C 2 ( N − 1 / 2 + ( 1 + log ( 1 + M 1 / d ) ) M − 1 / d ) . \sup_{\substack{\mu\in\mathcal{P}(B_R)\\ \eta\in\mathcal{P}(B_R)}} \mathbb{E} W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_N,\cdot)_{\#}\eta_M\right)
\le C_2\left(N^{-1/2}+\left(1+\sqrt{\log(1+M^{1/d})}\right)M^{-1/d}\right). μ ∈ P ( B R ) η ∈ P ( B R ) sup E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ C 2 ( N − 1/2 + ( 1 + log ( 1 + M 1/ d ) ) M − 1/ d ) .
As is the case in Theorem 3.9, Theorem 3.10 suggests that the sample complexity of cross-attention differs with respect to each variable. These scaling laws may provide practical suggestions for how long the relative contexts of each component should be. This is particularly relevant for generative modeling settings, where η \eta η may denote a reference measure from which new samples can be readily generated.
Consequences for Measure-to-Measure Approximation With Transformers
We conclude the section with an application of our results to the approximation of measure-to-measure operators by transformers. Recently, Furuya et al. [25 ] established sufficient conditions on a W p W_p W p -compact subset K ⊂ P ( R d ) K \subset\mathcal{P}(\mathbb{R}^d) K ⊂ P ( R d ) under which the pushforward operators induced by transformers can approximate continuous measure-to-measure operators to arbitrary accuracy, uniformly over K K K . However, this result does not have immediate consequences for transformers evaluated at empirical measures because the hypotheses of the result prohibit K K K from containing atomic measures. Below, we state a generalization of the result to transformers evaluated at empirical measures, where the sampling error is instead controlled using Theorem 3.7.
Theorem 3.11. Fix α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta> 0 β > 0 . Let P 1 ( R d ) \mathcal{P}_1(\mathbb{R}^d) P 1 ( R d ) denote the subset of probability measures in P ( R d ) \mathcal{P}(\mathbb{R}^d) P ( R d ) with finite first moment. Let K ⊂ S G α , β ( R d ) K \subset\mathop{\mathrm{SG}}\nolimits_{\alpha,\beta}(\mathbb{R}^d) K ⊂ SG α , β ( R d ) , and suppose there exists a non-atomic measure τ ∈ P ( R d ) \tau\in\mathcal{P}(\mathbb{R}^d) τ ∈ P ( R d ) such that μ \mu μ is absolutely continuous with respect to τ \tau τ for every μ ∈ K \mu\in K μ ∈ K . Let F : ( K , W 1 ) → ( P 1 ( R d ) , W 1 ) F:(K,W_1)\to(\mathcal{P}_1(\mathbb{R}^d),W_1) F : ( K , W 1 ) → ( P 1 ( R d ) , W 1 ) be continuous. Then for any ϵ > 0 \epsilon> 0 ϵ > 0 , there exists a transformer T ϵ T_\epsilon T ϵ of the form (2.5) and constants C ϵ > 0 C_\epsilon> 0 C ϵ > 0 and γ ϵ ∈ ( 0 , 1 ) \gamma_\epsilon\in(0,1) γ ϵ ∈ ( 0 , 1 ) (depending on d d d , α \alpha α , β \beta β , and T ϵ T_\epsilon T ϵ ) such that
sup μ ∈ K E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ ) ) < ϵ 2 + C ϵ log ( N ) γ ϵ / 2 ( 1 + log ( 1 + N 1 / d ) ) γ ϵ / 2 N − γ ϵ / d \sup_{\mu\in K}\mathbb{E}W_1\left(T_\epsilon(\mu_N,\cdot)_{\#}\mu_N,F(\mu)\right)
<\frac{\epsilon}{2}+C_\epsilon\log(N)^{\gamma_\epsilon/2}\left(1+\log(1+N^{1/d})\right)^{\gamma_\epsilon/2}N^{-\gamma_\epsilon/d} μ ∈ K sup E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ ) ) < 2 ϵ + C ϵ log ( N ) γ ϵ /2 ( 1 + log ( 1 + N 1/ d ) ) γ ϵ /2 N − γ ϵ / d for N N N large enough. In particular, for each ϵ > 0 \epsilon> 0 ϵ > 0 , there exists N ϵ ∈ N N_\epsilon\in\mathbb{N} N ϵ ∈ N (depending on d d d , α \alpha α , β \beta β , and ϵ \epsilon ϵ ) such that
sup μ ∈ K E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ ) ) < ϵ \sup_{\mu\in K}\mathbb{E}W_1\left(T_\epsilon(\mu_N,\cdot)_{\#}\mu_N,F(\mu)\right)<\epsilon μ ∈ K sup E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ ) ) < ϵ for all N ≥ N ϵ N \ge N_\epsilon N ≥ N ϵ .
Theorem 3.11 states that mean-field transformer operators are universal approximators for continuous measure-to-measure operators, even when the input measure is only accessible by samples, provided that the number of samples is sufficiently large and the compact set K K K upon which the uniform approximation occurs is uniformly subgaussian and absolutely continuous with respect to a common non-atomic reference. Moreover, for a fixed approximating transformer T ϵ T_\epsilon T ϵ , the sampling error converges to zero at a polynomial rate, up to log factors. The assumption that K K K comprises measures which are dominated by a common non-atomic reference measure ensures that continuous operators on K K K can be universally approximated by pushforwards, even when μ ↦ F ( μ ) \mu\mapsto F(\mu) μ ↦ F ( μ ) does not have an exact pushforward representation; see Assumption 3.1 in the work of Furuya et al. [25 ] for a more general sufficient condition. Indeed, without any atomless assumptions on the measures belonging to K K K , it is easy to construct examples of continuous operators on K K K which cannot be approximated by pushforwards.
Conclusion
This work establishes mathematical properties of the measure-to-measure operators defined by transformers. The main contributions are a stability result stating that transformers map sub-Gaussian measures to sub-Gaussian measures, a Hölder continuity bound in the 1-Wasserstein distance, and an estimate on the error propagation between a true probability measure and its empirical counterpart along a transformer. Analogs of these results are provided for transformers which use the cross-attention mechanism. The results herein motivate several directions for future work. First, our sample complexity results suffer from a curse of dimensionality which is intrinsic to high-dimensional nonparametric statistical problems; it is unclear whether the parametric complexity of transformers can be leveraged to improve these rates, or whether faster rates occur for probability measures with low-dimensional structure. Second, motivated by language models, we would like to prove analogs of our sample complexity results for empirical measures of non-iid data, e.g., for tokens generated autoregressively. Last, our results on regularity and sample complexity motivate the development of a generalization error analysis of transformers for supervised learning problems on spaces of probability measures. We leave these questions to future work.
AI Use Statement
In this work, we used generative AI tools for formulating mathematical claims and providing critical ingredients to prove mathematical claims. We did not use generative AI tools for generating synthetic data sets, developing theoretical models or conceptual frameworks, assisting in the writing of proofs, proposing or refining hypotheses, designing or providing feedback on research methodology or experiments, implementing methods, assisting with translation, cleaning and reformatting datasets, supporting qualitative and thematic data analysis, or interpreting results. We have reviewed all AI-assisted work. In more detail, the proof ingredients for Proposition 3.2 and Lemma A.1 came about between the authors and ChatGPT 5.6. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
Acknowledgments
The research of N.H.N. is supported by a Klarman Fellowship through Cornell University’s College of Arts & Sciences and by startup funds at The University of Texas at Austin. T.F. acknowledges funding from JSPS KAKENHI (grants JP24K16949 and 25H01453), JST CREST (JPMJCR24Q5), and JST ASPIRE (JP-MJAP2329).
CHECKLIST
For all models and algorithms presented, check if you include:
(a) A clear description of the mathematical setting, assumptions, algorithm, and/or model. Yes.
(b) An analysis of the properties and complexity (time, space, sample size) of any algorithm. Not Applicable
(c) (Optional) Anonymized source code, with specification of all dependencies, including external libraries. Not Applicable
For any theoretical claim, check if you include:
(a) Statements of the full set of assumptions of all theoretical results. Yes
(b) Complete proofs of all theoretical results. Yes
(c) Clear explanations of any assumptions. Yes
For all figures and tables that present empirical results, check if you include:
(a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL). Not Applicable
(b) All the training details (e.g., data splits, hyperparameters, how they were chosen). Not Applicable
(c) A clear definition of the specific measure or statistics and error bars (e.g., with respect to the random seed after running experiments multiple times). Not Applicable
(d) A description of the computing infrastructure used. (e.g., type of GPUs, internal cluster, or cloud provider). Not Applicable
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets, check if you include:
(a) Citations of the creator If your work uses existing assets. Not Applicable
(b) The license information of the assets, if applicable. Not Applicable
(c) New assets either in the supplemental material or as a URL, if applicable. Not Applicable
(d) Information about consent from data providers/curators. Not Applicable
(e) Discussion of sensible content if applicable, e.g., personally identifiable information or offensive content. Not Applicable
If you used crowdsourcing or conducted research with human subjects, check if you include:
(a) The full text of instructions given to participants and screenshots. Not Applicable
(b) Descriptions of potential participant risks, with links to Institutional Review Board (IRB) approvals if applicable. Not Applicable
(c) The estimated hourly wage paid to participants and the total amount spent on participant compensation. Not Applicable
Proofs
This appendix collects the proofs of results presented in the main text.
Proofs for Section 3.1: Transformers Preserve Sub-Gaussianity
Before proving Proposition 3.2, we need to prove a technical lemma on the growth of gradients of convex functions.
Lemma A.1. Let f : R d → R f:\mathbb{R}^{d}\to\mathbb{R} f : R d → R be a differentiable convex function such that there exist constants A , B > 0 A,B>0 A , B > 0 for which ∣ f ( x ) ∣ ≤ A + B ∥ x ∥ 2 |f(x)|\le A+B\lVert x\rVert^{2} ∣ f ( x ) ∣ ≤ A + B ∥ x ∥ 2 for all ∥ x ∥ ≥ 1 \lVert x\rVert\ge1 ∥ x ∥ ≥ 1 . Then
∥ ∇ f ( x ) ∥ ≤ ( 2 A + B ) + 5 B ∥ x ∥ \lVert\nabla f(x)\rVert\le(2A+B)+5B\lVert x\rVert ∥ ∇ f ( x )∥ ≤ ( 2 A + B ) + 5 B ∥ x ∥ for all $\lVert x\rVert>1.
Proof. Fix x x x with ∥ x ∥ > 1 \lVert x\rVert>1 ∥ x ∥ > 1 . Let h > 0 h>0 h > 0 be a positive number to be chosen precisely later, and let u ∈ R d u\in\mathbb{R}^{d} u ∈ R d be an arbitrary unit vector. We apply the first order condition for convex functions to obtain
f ( x + h u ) ≥ f ( x ) + h ∇ f ( x ) ⋅ u , f(x+hu)\ge f(x)+h\nabla f(x)\cdot u, f ( x + h u ) ≥ f ( x ) + h ∇ f ( x ) ⋅ u ,
or equivalently,
∇ f ( x ) ⋅ u ≤ f ( x + h u ) − f ( x ) h . \nabla f(x)\cdot u\le\frac{f(x+hu)-f(x)}{h}. ∇ f ( x ) ⋅ u ≤ h f ( x + h u ) − f ( x ) .
If ∥ x + h u ∥ > 1 \lVert x+hu\rVert>1 ∥ x + h u ∥ > 1 , then it holds that
f ( x + h u ) − f ( x ) h ≤ 2 A + B ( ∥ x + h u ∥ 2 + ∥ x ∥ 2 ) h = 2 A + 2 B ∥ x ∥ 2 h + 2 B x ⋅ u + B h ≤ 2 A + 2 B ∥ x ∥ 2 h + 2 B ∥ x ∥ + B h . \begin{aligned}
\frac{f(x+hu)-f(x)}{h}
&\le\frac{2A+B\left(\lVert x+hu\rVert^{2}+\lVert x\rVert^{2}\right)}{h}\\
&=\frac{2A+2B\lVert x\rVert^{2}}{h}+2Bx\cdot u+Bh\\
&\le\frac{2A+2B\lVert x\rVert^{2}}{h}+2B\lVert x\rVert+Bh.
\end{aligned} h f ( x + h u ) − f ( x ) ≤ h 2 A + B ( ∥ x + h u ∥ 2 + ∥ x ∥ 2 ) = h 2 A + 2 B ∥ x ∥ 2 + 2 B x ⋅ u + B h ≤ h 2 A + 2 B ∥ x ∥ 2 + 2 B ∥ x ∥ + B h .
If ∥ x + h u ∥ < 1 \lVert x+hu\rVert<1 ∥ x + h u ∥ < 1 , we can write x + h u = λ z 1 + ( 1 − λ ) z 2 x+hu=\lambda z_{1}+(1-\lambda)z_{2} x + h u = λ z 1 + ( 1 − λ ) z 2 for some λ ∈ ( 0 , 1 ) \lambda\in(0,1) λ ∈ ( 0 , 1 ) and z 1 , z 2 ∈ S d − 1 z_{1},z_{2}\in\mathbb{S}^{d-1} z 1 , z 2 ∈ S d − 1 . Convexity of f f f implies that
∣ f ( x + h u ) ∣ ≤ max ( f ( z 1 ) , f ( z 2 ) ) ≤ A + B , |f(x+hu)|\le\max(f(z_{1}),f(z_{2}))\le A+B, ∣ f ( x + h u ) ∣ ≤ max ( f ( z 1 ) , f ( z 2 )) ≤ A + B ,
which further implies that
f ( x + h u ) − f ( x ) h ≤ ( 2 A + B ) + B ∥ x ∥ 2 h ≤ ( 2 A + B ) + 2 B ∥ x ∥ 2 h + 2 B ∥ x ∥ + B h . \begin{aligned}
\frac{f(x+hu)-f(x)}{h}
&\le\frac{(2A+B)+B\lVert x\rVert^{2}}{h}\\
&\le\frac{(2A+B)+2B\lVert x\rVert^{2}}{h}+2B\lVert x\rVert+Bh.
\end{aligned} h f ( x + h u ) − f ( x ) ≤ h ( 2 A + B ) + B ∥ x ∥ 2 ≤ h ( 2 A + B ) + 2 B ∥ x ∥ 2 + 2 B ∥ x ∥ + B h .
Therefore,
f ( x + h u ) − f ( x ) h ≤ ( 2 A + B ) + 2 B ∥ x ∥ 2 h + 2 B ∥ x ∥ + B h (8) \frac{f(x+hu)-f(x)}{h}\le\frac{(2A+B)+2B\lVert x\rVert^{2}}{h}+2B\lVert x\rVert+Bh \tag*{(8)} h f ( x + h u ) − f ( x ) ≤ h ( 2 A + B ) + 2 B ∥ x ∥ 2 + 2 B ∥ x ∥ + B h (8)
for all ∥ x ∥ > 1 \lVert x\rVert> 1 ∥ x ∥ > 1 , h > 0 h > 0 h > 0 , and u ∈ S d − 1 u \in\mathbb{S}^{d-1} u ∈ S d − 1 . Choosing h = ∥ x ∥ h = \lVert x\rVert h = ∥ x ∥ , and using the fact that ∥ x ∥ > 1 \lVert x\rVert> 1 ∥ x ∥ > 1 , we have that
∇ f ( x ) ⋅ u ≤ ( 2 A + B ) + 5 B ∥ x ∥ . \nabla f(x) \cdot u \le(2A+B)+5B\lVert x\rVert. ∇ f ( x ) ⋅ u ≤ ( 2 A + B ) + 5 B ∥ x ∥ .
Next, we apply the first-order bound to f ( x − h u ) f(x-hu) f ( x − h u ) :
f ( x − h u ) ≥ f ( x ) − h ∇ f ( x ) ⋅ u , f(x-hu) \ge f(x)-h\nabla f(x)\cdot u, f ( x − h u ) ≥ f ( x ) − h ∇ f ( x ) ⋅ u ,
which implies
− ∇ f ( x ) ⋅ u ≤ f ( x − h u ) − f ( x ) h . -\nabla f(x)\cdot u \le\frac{f(x-hu)-f(x)}{h}. − ∇ f ( x ) ⋅ u ≤ h f ( x − h u ) − f ( x ) .
A parallel argument shows that
f ( x − h u ) − f ( x ) h ≤ ( 2 A + B ) + B ∥ x ∥ 2 h + 2 B ∥ x ∥ + B h \frac{f(x-hu)-f(x)}{h} \le\frac{(2A+B)+B\lVert x\rVert^2}{h}+2B\lVert x\rVert+Bh h f ( x − h u ) − f ( x ) ≤ h ( 2 A + B ) + B ∥ x ∥ 2 + 2 B ∥ x ∥ + B h
for all ∥ x ∥ > 1 \lVert x\rVert> 1 ∥ x ∥ > 1 , h > 0 h > 0 h > 0 , and u ∈ S d − 1 u \in\mathbb{S}^{d-1} u ∈ S d − 1 . Choosing h = ∥ x ∥ h=\lVert x\rVert h = ∥ x ∥ yields
− ∇ f ( x ) ⋅ u ≤ ( 2 A + B ) + 5 B ∥ x ∥ . -\nabla f(x)\cdot u \le(2A+B)+5B\lVert x\rVert. − ∇ f ( x ) ⋅ u ≤ ( 2 A + B ) + 5 B ∥ x ∥ .
This proves that
∣ ∇ f ( x ) ⋅ u ∣ ≤ ( 2 A + B ) + 5 B ∥ x ∥ , \lvert\nabla f(x)\cdot u\rvert\le(2A+B)+5B\lVert x\rVert, ∣ ∇ f ( x ) ⋅ u ∣ ≤ ( 2 A + B ) + 5 B ∥ x ∥ ,
for all ∥ x ∥ > 1 \lVert x\rVert> 1 ∥ x ∥ > 1 , and since u u u is arbitrary, we have
∥ ∇ f ( x ) ∥ ≤ ( 2 A + B ) + 5 B ∥ x ∥ . \lVert\nabla f(x)\rVert\le(2A+B)+5B\lVert x\rVert. ∥ ∇ f ( x )∥ ≤ ( 2 A + B ) + 5 B ∥ x ∥ .
Proof of Proposition 3.2. Clearly it suffices to verify the result in the case of a single head and without the skip connection: given weight matrices V ∈ R k × d V\in\mathbb{R}^{k\times d} V ∈ R k × d and A ∈ R d × d A\in\mathbb{R}^{d\times d} A ∈ R d × d , we aim to prove that there exist constants K 1 , K 2 > 0 K_1,K_2>0 K 1 , K 2 > 0 such that
Att θ ( μ , x ) : = ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ∫ e ⟨ x , A z ⟩ μ ( d z ) ≤ K 1 + K 2 ∥ x ∥ \operatorname{Att}_{\theta}(\mu,x):=\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu(\mathrm{d}y)}{\int e^{\langle x,Az\rangle}\,\mu(\mathrm{d}z)}\le K_1+K_2\lVert x\rVert Att θ ( μ , x ) := ∫ e ⟨ x , A z ⟩ μ ( d z ) ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ≤ K 1 + K 2 ∥ x ∥
for all x ∈ R d x\in\mathbb{R}^d x ∈ R d . To this end, define the cumulant generating function
Z μ ( t ) : = log ∫ e ⟨ t , y ⟩ μ ( d y ) , Z_\mu(t):=\log\int e^{\langle t,y\rangle}\,\mu(\mathrm{d}y), Z μ ( t ) := log ∫ e ⟨ t , y ⟩ μ ( d y ) ,
and note that Z μ Z_\mu Z μ is convex. We can express the map Att θ ( μ , x ) \operatorname{Att}_{\theta}(\mu,x) Att θ ( μ , x ) in terms of the cumulant generating function:
Att θ ( μ , x ) = V ∇ Z μ ( A x ) . \operatorname{Att}_{\theta}(\mu,x)=V\nabla Z_\mu(Ax). Att θ ( μ , x ) = V ∇ Z μ ( A x ) .
Thus, to show the desired claim, it suffices to prove that ∇ Z μ ( t ) \nabla Z_\mu(t) ∇ Z μ ( t ) grows at most affine-linearly, with constants depending only on the sub-Gaussian parameters of μ \mu μ . We divide this into two cases.
Case 1: ∥ t ∥ ≤ 1 \lVert t\rVert\le1 ∥ t ∥ ≤ 1 . We claim that ∇ Z μ ( t ) \nabla Z_\mu(t) ∇ Z μ ( t ) is bounded on the unit ball by a constant depending only on the sub-Gaussian parameters of μ \mu μ . Observe that
∇ Z μ ( t ) = ∫ y e ⟨ y , t ⟩ μ ( d y ) ∫ e ⟨ y , t ⟩ μ ( d y ) = Z μ ( 1 ) ( t ) Z μ ( 2 ) ( t ) \nabla Z_\mu(t)=\frac{\int y e^{\langle y,t\rangle}\,\mu(\mathrm{d}y)}{\int e^{\langle y,t\rangle}\,\mu(\mathrm{d}y)}=\frac{Z_\mu^{(1)}(t)}{Z_\mu^{(2)}(t)} ∇ Z μ ( t ) = ∫ e ⟨ y , t ⟩ μ ( d y ) ∫ y e ⟨ y , t ⟩ μ ( d y ) = Z μ ( 2 ) ( t ) Z μ ( 1 ) ( t )
For the numerator, we have
Z μ ( 1 ) ( t ) ≤ ( ∫ ∥ y ∥ 2 μ ( d y ) ) 1 / 2 ( ∫ e 2 ∥ y ∥ μ ( d y ) ) 1 / 2 Z_\mu^{(1)}(t)\le\left(\int\lVert y\rVert^2\,\mu(\mathrm{d}y)\right)^{1/2}\left(\int e^{2\lVert y\rVert}\,\mu(\mathrm{d}y)\right)^{1/2} Z μ ( 1 ) ( t ) ≤ ( ∫ ∥ y ∥ 2 μ ( d y ) ) 1/2 ( ∫ e 2 ∥ y ∥ μ ( d y ) ) 1/2
for all ∥ t ∥ ≤ 1 \lVert t\rVert\le1 ∥ t ∥ ≤ 1 . By Lemma B.1, this expression admits an upper bound depending only on the sub-Gaussian parameters α \alpha α and β \beta β . For the denominator, we have by Jensen’s inequality and the Cauchy–Schwarz inequality,
Z μ ( 2 ) ( t ) ≥ exp ( − ∫ ∥ y ∥ μ ( d y ) ) , Z_\mu^{(2)}(t)\ge\exp\left(-\int\lVert y\rVert\,\mu(\mathrm{d}y)\right), Z μ ( 2 ) ( t ) ≥ exp ( − ∫ ∥ y ∥ μ ( d y ) ) ,
and by Lemma B.1 the integrand in the exponential can be upper bounded uniformly in μ \mu μ . This proves that sup ∥ t ∥ ≤ 1 ∥ ∇ μ Z ( t ) ∥ \sup_{\lVert t\rVert\le1}\lVert\nabla_\mu Z(t)\rVert sup ∥ t ∥ ≤ 1 ∥ ∇ μ Z ( t )∥ is uniformly bounded over μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) .
Case 2: ∥ t ∥ ≥ 1 \lVert t\rVert\ge1 ∥ t ∥ ≥ 1 . Since μ \mu μ is sub-Gaussian, it follows (see the book of Vershynin [58 ] for equivalent characterizations of sub-Gaussian random variables) that there exist constants M 1 , M 2 > 0 M_1,M_2>0 M 1 , M 2 > 0 depending only on α \alpha α and β \beta β such that
Z μ ( t ) ≤ M 1 + M 2 ∥ t ∥ 2 , Z_\mu(t) \le M_1 + M_2\lVert t\rVert^2, Z μ ( t ) ≤ M 1 + M 2 ∥ t ∥ 2 ,
for all t t t with ∥ t ∥ > 1 \lVert t\rVert>1 ∥ t ∥ > 1 . Since Z μ ( t ) Z_\mu(t) Z μ ( t ) is convex, it holds by Lemma A.1 that
∥ ∇ Z μ ( t ) ∥ ≤ ( 2 M 1 + M 2 ) + 5 M 2 ∥ t ∥ \lVert\nabla Z_\mu(t)\rVert\le(2M_1+M_2)+5M_2\lVert t\rVert ∥ ∇ Z μ ( t )∥ ≤ ( 2 M 1 + M 2 ) + 5 M 2 ∥ t ∥
for all t t t with ∥ t ∥ ≥ 1 \lVert t\rVert\ge1 ∥ t ∥ ≥ 1 and μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) . Combining the two cases, we have shown that Att θ ( μ , x ) \operatorname{Att}_\theta(\mu,x) Att θ ( μ , x ) grows affine linearly with constants depending only on the sub-Gaussian parameters of μ \mu μ and the attention matrices.
Proofs for Section 3.2: Hölder Regularity of Transformers on Sub-Gaussian Domains
Fix α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta>0 β > 0 , and recall that our goal is to bound the Wasserstein distance
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) W_1\left(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\mu_0,\cdot)_{\#}\mu_0\right) W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 )
in terms of W 1 ( μ , μ 0 ) W_1(\mu,\mu_0) W 1 ( μ , μ 0 ) , where Γ \Gamma Γ is a mean-field multi-head attention layer. Our proof is based on a truncation argument. For R > 0 R>0 R > 0 , we let Π R : R d → R d \Pi_R:\mathbb{R}^d\to\mathbb{R}^d Π R : R d → R d denote the projection map onto the ball of radius R R R . An important step in the proof of Theorem 3.4 is the following truncation estimate, which controls the difference between Γ ( μ , x ) \Gamma(\mu,x) Γ ( μ , x ) and Γ ( ( Π R ) # μ , x ) \Gamma((\Pi_R)_{\#}\mu,x) Γ (( Π R ) # μ , x ) . We first prove the estimate for a single-head attention layer (with the head matrix included in the definition for emphasis), from which the multi-head case follows as a corollary.
Proposition A.2. Define
Att θ ( μ , x ) = W ∫ R d e ⟨ A x , y ⟩ V y μ ( d y ) ∫ R d e ⟨ A x , z ⟩ μ ( d z ) . \operatorname{Att}_\theta(\mu,x)=W\frac{\int_{\mathbb{R}^d}e^{\langle Ax,y\rangle}Vy\,\mu(\mathrm{d}y)}{\int_{\mathbb{R}^d}e^{\langle Ax,z\rangle}\,\mu(\mathrm{d}z)}. Att θ ( μ , x ) = W ∫ R d e ⟨ A x , z ⟩ μ ( d z ) ∫ R d e ⟨ A x , y ⟩ V y μ ( d y ) . Then for any R > 0 R>0 R > 0 and M > 0 M>0 M > 0 , it holds that
sup μ ∈ S G α , β ( R d ) sup ∥ x ∥ ≤ M ∥ Att θ ( μ , x ) − Att θ ( ( Π R ) # μ , x ) ∥ ≤ ∥ W ∥ ∥ V ∥ e ∥ A ∥ M C α , β ( 2 + R ) ∥ A ∥ M e β 2 α 2 ∥ A ∥ 2 M 2 2 ( ∥ A ∥ M β 2 R + 2 β ) e − R 2 2 β 2 , \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\ \sup_{\lVert x\rVert\le M}\left\lVert\operatorname{Att}_\theta(\mu,x)-\operatorname{Att}_\theta((\Pi_R)_{\#}\mu,x)\right\rVert
\le\lVert W\rVert\lVert V\rVert e^{\lVert A\rVert M}C_{\alpha,\beta}(2+R)\lVert A\rVert M e^{\frac{\beta^2\alpha^2\lVert A\rVert^2M^2}{2}}\left(\frac{\lVert A\rVert M\beta^2}{R}+2\beta\right)e^{-\frac{R^2}{2\beta^2}}, μ ∈ SG α , β ( R d ) sup ∥ x ∥ ≤ M sup ∥ Att θ ( μ , x ) − Att θ (( Π R ) # μ , x ) ∥ ≤ ∥ W ∥ ∥ V ∥ e ∥ A ∥ M C α , β ( 2 + R ) ∥ A ∥ M e 2 β 2 α 2 ∥ A ∥ 2 M 2 ( R ∥ A ∥ M β 2 + 2 β ) e − 2 β 2 R 2 , where we have defined
C α , β : = sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ ν ( d x ) < ∞ . C_{\alpha,\beta}:=\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int\lVert x\rVert\,\nu(\mathrm{d}x)<\infty. C α , β := ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ ν ( d x ) < ∞.
Proof. Throughout the proof we will assume that M > ∥ A ∥ − 1 M>\lVert A\rVert^{-1} M > ∥ A ∥ − 1 . Clearly this assumption is without loss of generality because
sup μ ∈ S G α , β ( R d ) sup ∥ x ∥ ≤ M ∥ Att θ ( μ , x ) − Att θ ( ( Π R ) # μ , x ) ∥ ≤ sup μ ∈ S G α , β ( R d ) sup ∥ x ∥ ≤ max ( M , ∥ A ∥ − 1 ) ∥ Att θ ( μ , x ) − Att θ ( ( Π R ) # μ , x ) ∥ . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\ \sup_{\lVert x\rVert\le M}\left\lVert\operatorname{Att}_\theta(\mu,x)-\operatorname{Att}_\theta((\Pi_R)_{\#}\mu,x)\right\rVert
\le
\sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\ \sup_{\lVert x\rVert\le\max(M,\lVert A\rVert^{-1})}\left\lVert\operatorname{Att}_\theta(\mu,x)-\operatorname{Att}_\theta((\Pi_R)_{\#}\mu,x)\right\rVert. μ ∈ SG α , β ( R d ) sup ∥ x ∥ ≤ M sup ∥ Att θ ( μ , x ) − Att θ (( Π R ) # μ , x ) ∥ ≤ μ ∈ SG α , β ( R d ) sup ∥ x ∥ ≤ m a x ( M , ∥ A ∥ − 1 ) sup ∥ Att θ ( μ , x ) − Att θ (( Π R ) # μ , x ) ∥ .
Fix μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) and x ∈ B M x\in B_M x ∈ B M . Write μ R : = ( Π R ) # μ \mu_R:=(\Pi_R)_{\#}\mu μ R := ( Π R ) # μ . Then
Att θ ( μ R , x ) = N μ , R ( x ) D μ , R ( x ) : = ∫ R d W V Π R ( y ) e ⟨ Π R ( y ) , A x ⟩ μ ( d y ) ∫ R d e ⟨ Π R ( z ) , A x ⟩ μ ( d z ) . \operatorname{Att}_\theta(\mu_R,x)=\frac{N_{\mu,R}(x)}{D_{\mu,R}(x)}:=\frac{\int_{\mathbb{R}^d}WV\Pi_R(y)e^{\langle\Pi_R(y),Ax\rangle}\,\mu(\mathrm{d}y)}{\int_{\mathbb{R}^d}e^{\langle\Pi_R(z),Ax\rangle}\,\mu(\mathrm{d}z)}. Att θ ( μ R , x ) = D μ , R ( x ) N μ , R ( x ) := ∫ R d e ⟨ Π R ( z ) , A x ⟩ μ ( d z ) ∫ R d W V Π R ( y ) e ⟨ Π R ( y ) , A x ⟩ μ ( d y ) .
We similarly write Att θ ( μ , x ) = N μ ( x ) / D μ ( x ) \operatorname{Att}_\theta(\mu,x)=N_\mu(x)/D_\mu(x) Att θ ( μ , x ) = N μ ( x ) / D μ ( x ) . We estimate
∥ Att θ ( μ , x ) − Att θ ( μ R , x ) ∥ ≤ 1 D μ ( x ) ∥ N μ ( x ) − N μ , R ( x ) ∥ + ∥ N μ , R ( x ) ∥ ∣ 1 D μ ( x ) − 1 D μ , R ( x ) ∣ . (9) \left\lVert\operatorname{Att}_\theta(\mu,x)-\operatorname{Att}_\theta(\mu_R,x)\right\rVert
\le
\frac{1}{D_\mu(x)}\left\lVert N_\mu(x)-N_{\mu,R}(x)\right\rVert
+
\left\lVert N_{\mu,R}(x)\right\rVert\left\lvert\frac{1}{D_\mu(x)}-\frac{1}{D_{\mu,R}(x)}\right\rvert. \tag*{(9)} ∥ Att θ ( μ , x ) − Att θ ( μ R , x ) ∥ ≤ D μ ( x ) 1 ∥ N μ ( x ) − N μ , R ( x ) ∥ + ∥ N μ , R ( x ) ∥ D μ ( x ) 1 − D μ , R ( x ) 1 . (9)
We begin with term (II). Since
∣ ⟨ ∫ R d z μ ( d z ) , A x ⟩ ∣ ≤ ∥ A ∥ M sup ν ∈ S G α , β ( R d ) ∫ R d ∥ x ∥ ν ( d x ) = : ∥ A ∥ M C α , β , \left|\left\langle\int_{\mathbb{R}^{d}} z\,\mu(\mathrm{d}z),Ax\right\rangle\right|
\leq\|A\|M\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d})}\int_{\mathbb{R}^{d}}\|x\|\nu(\mathrm{d}x)=:\|A\|MC_{\alpha,\beta}, ⟨ ∫ R d z μ ( d z ) , A x ⟩ ≤ ∥ A ∥ M ν ∈ SG α , β ( R d ) sup ∫ R d ∥ x ∥ ν ( d x ) =: ∥ A ∥ M C α , β ,
Jensen’s inequality gives
D μ ( x ) ≥ exp ( ⟨ ∫ R d z μ ( d z ) , A x ⟩ ) ≥ exp ( − ∥ A ∥ M C α , β ) . D_{\mu}(x)\geq\exp\left(\left\langle\int_{\mathbb{R}^{d}}z\,\mu(\mathrm{d}z),Ax\right\rangle\right)\geq\exp(-\|A\|MC_{\alpha,\beta}). D μ ( x ) ≥ exp ( ⟨ ∫ R d z μ ( d z ) , A x ⟩ ) ≥ exp ( − ∥ A ∥ M C α , β ) .
Moreover, since μ R ∈ P ( B R ) \mu_{R}\in\mathcal{P}(B_{R}) μ R ∈ P ( B R ) , Lemma B.13 gives ∥ Att θ ( μ R , x ) ∥ ≤ ∥ W ∥ ∥ V ∥ R \|\operatorname{Att}_{\theta}(\mu_{R},x)\|\leq\|W\|\|V\|R ∥ Att θ ( μ R , x ) ∥ ≤ ∥ W ∥∥ V ∥ R . Thus,
( I I ) = ∥ N μ , R ( x ) ∥ D μ , R ( x ) 1 D μ ( x ) ∣ D μ ( x ) − D μ , R ( x ) ∣ ≤ ∥ W ∥ ∥ V ∥ R e ∥ A ∥ M C α , β ∣ D μ ( x ) − D μ , R ( x ) ∣ . \begin{aligned}
(\mathrm{II})&=\frac{\|N_{\mu,R}(x)\|}{D_{\mu,R}(x)}\frac{1}{D_{\mu}(x)}\left|D_{\mu}(x)-D_{\mu,R}(x)\right|\\
&\leq\|W\|\|V\|R e^{\|A\|MC_{\alpha,\beta}}\left|D_{\mu}(x)-D_{\mu,R}(x)\right|.
\end{aligned} ( II ) = D μ , R ( x ) ∥ N μ , R ( x ) ∥ D μ ( x ) 1 ∣ D μ ( x ) − D μ , R ( x ) ∣ ≤ ∥ W ∥∥ V ∥ R e ∥ A ∥ M C α , β ∣ D μ ( x ) − D μ , R ( x ) ∣ .
By the mean value theorem, ∣ e s − e t ∣ ≤ e max ( s , t ) ∣ s − t ∣ |e^{s}-e^{t}|\leq e^{\max(s,t)}|s-t| ∣ e s − e t ∣ ≤ e m a x ( s , t ) ∣ s − t ∣ . Then
∣ D μ ( x ) − D μ , R ( x ) ∣ ≤ ∫ R d ∣ e ⟨ y , A x ⟩ − e ⟨ Π R ( y ) , A x ⟩ ∣ μ ( d y ) ≤ ∫ R d e max ( ⟨ y , A x ⟩ , ⟨ Π R ( y ) , A x ⟩ ) ∣ ⟨ y − Π R ( y ) , A x ⟩ ∣ μ ( d y ) ≤ ∥ A ∥ M ∫ R d e ∥ A ∥ M max ( ∥ y ∥ , R ) ∥ y − Π R ( y ) ∥ μ ( d y ) ≤ ∥ A ∥ M ∫ ∥ y ∥ > R e ∥ A ∥ M ∥ y ∥ ( ∥ y ∥ − R ) μ ( d y ) . \begin{aligned}
\left|D_{\mu}(x)-D_{\mu,R}(x)\right|
&\leq\int_{\mathbb{R}^{d}}\left|e^{\langle y,Ax\rangle}-e^{\langle\Pi_{R}(y),Ax\rangle}\right|\mu(\mathrm{d}y)\\
&\leq\int_{\mathbb{R}^{d}}e^{\max(\langle y,Ax\rangle,\langle\Pi_{R}(y),Ax\rangle)}\left|\langle y-\Pi_{R}(y),Ax\rangle\right|\mu(\mathrm{d}y)\\
&\leq\|A\|M\int_{\mathbb{R}^{d}}e^{\|A\|M\max(\|y\|,R)}\|y-\Pi_{R}(y)\|\mu(\mathrm{d}y)\\
&\leq\|A\|M\int_{\|y\|>R}e^{\|A\|M\|y\|}(\|y\|-R)\mu(\mathrm{d}y).
\end{aligned} ∣ D μ ( x ) − D μ , R ( x ) ∣ ≤ ∫ R d e ⟨ y , A x ⟩ − e ⟨ Π R ( y ) , A x ⟩ μ ( d y ) ≤ ∫ R d e m a x (⟨ y , A x ⟩ , ⟨ Π R ( y ) , A x ⟩) ∣ ⟨ y − Π R ( y ) , A x ⟩ ∣ μ ( d y ) ≤ ∥ A ∥ M ∫ R d e ∥ A ∥ M m a x ( ∥ y ∥ , R ) ∥ y − Π R ( y ) ∥ μ ( d y ) ≤ ∥ A ∥ M ∫ ∥ y ∥ > R e ∥ A ∥ M ∥ y ∥ ( ∥ y ∥ − R ) μ ( d y ) .
We can bound the last line using the exponential uniform integrability implied by Lemma B.12 .
Turning to term (I), it suffices to bound the difference in numerators because we have already bounded D μ ( x ) D_{\mu}(x) D μ ( x ) from below uniformly in μ \mu μ and x x x . Let f ( y ) : = y e ⟨ y , λ ⟩ f(y):=ye^{\langle y,\lambda\rangle} f ( y ) := y e ⟨ y , λ ⟩ . Then D f ( y ) = e ⟨ y , λ ⟩ ( I + y ⊗ λ ) Df(y)=e^{\langle y,\lambda\rangle}(I+y\otimes\lambda) D f ( y ) = e ⟨ y , λ ⟩ ( I + y ⊗ λ ) . Hence, the mean value theorem implies that
∥ f ( y ) − f ( z ) ∥ ≤ e max ( ⟨ y , λ ⟩ , ⟨ z , λ ⟩ ) ( 1 + max ( ∥ y ∥ , ∥ z ∥ ) ∥ λ ∥ ) ∥ y − z ∥ . \|f(y)-f(z)\|\leq e^{\max(\langle y,\lambda\rangle,\langle z,\lambda\rangle)}\left(1+\max(\|y\|,\|z\|)\|\lambda\|\right)\|y-z\|. ∥ f ( y ) − f ( z ) ∥ ≤ e m a x (⟨ y , λ ⟩ , ⟨ z , λ ⟩) ( 1 + max ( ∥ y ∥ , ∥ z ∥ ) ∥ λ ∥ ) ∥ y − z ∥.
Applying this result gives
∥ N μ ( x ) − N μ , R ( x ) ∥ ∥ W ∥ ∥ V ∥ ≤ ∫ R d ∥ y e ⟨ y , A x ⟩ − Π R ( y ) e ⟨ Π R ( y ) , A x ⟩ ∥ μ ( d y ) ≤ ∫ ∥ y ∥ > R e ∥ A ∥ M ∥ y ∥ ( 1 + ∥ A ∥ M ∥ y ∥ ) ( ∥ y ∥ − R ) μ ( d y ) , \begin{aligned}
\frac{\|N_{\mu}(x)-N_{\mu,R}(x)\|}{\|W\|\|V\|}
&\leq\int_{\mathbb{R}^{d}}\left\|ye^{\langle y,Ax\rangle}-\Pi_{R}(y)e^{\langle\Pi_{R}(y),Ax\rangle}\right\|\mu(\mathrm{d}y)\\
&\leq\int_{\|y\|>R}e^{\|A\|M\|y\|}\left(1+\|A\|M\|y\|\right)(\|y\|-R)\mu(\mathrm{d}y),
\end{aligned} ∥ W ∥∥ V ∥ ∥ N μ ( x ) − N μ , R ( x ) ∥ ≤ ∫ R d y e ⟨ y , A x ⟩ − Π R ( y ) e ⟨ Π R ( y ) , A x ⟩ μ ( d y ) ≤ ∫ ∥ y ∥ > R e ∥ A ∥ M ∥ y ∥ ( 1 + ∥ A ∥ M ∥ y ∥ ) ( ∥ y ∥ − R ) μ ( d y ) ,
which is further bounded by Lemma B.12 . Applying Lemma B.12 to bound the sub-Gaussian integrals and putting together the pieces completes the proof. □
Proposition A.3. Define
Γ ( μ , x ) = x + ∑ h = 1 H W h ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) ∫ e ⟨ x , A h z ⟩ μ ( d z ) . \Gamma(\mu,x)=x+\sum_{h=1}^{H}W_{h}\frac{\int e^{\langle x,A_{h}y\rangle}V_{h}y\,\mu(\mathrm{d}y)}{\int e^{\langle x,A_{h}z\rangle}\mu(\mathrm{d}z)}. Γ ( μ , x ) = x + h = 1 ∑ H W h ∫ e ⟨ x , A h z ⟩ μ ( d z ) ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) . where A 1 , … , A H ∈ R d × d A_{1},\ldots,A_{H}\in\mathbb{R}^{d\times d} A 1 , … , A H ∈ R d × d , V 1 , … , V H ∈ R k × d V_{1},\ldots,V_{H}\in\mathbb{R}^{k\times d} V 1 , … , V H ∈ R k × d , and W 1 , … , W H ∈ R d × k W_{1},\ldots,W_{H}\in\mathbb{R}^{d\times k} W 1 , … , W H ∈ R d × k . Set c A = max h ∈ [ H ] ∥ A h ∥ c_{A}=\max_{h\in[H]}\|A_{h}\| c A = max h ∈ [ H ] ∥ A h ∥ , W h = max h ∈ [ H ] ∥ W h ∥ W_{h}=\max_{h\in[H]}\|W_{h}\| W h = max h ∈ [ H ] ∥ W h ∥ , and c V = max h ∈ [ H ] ∥ V h ∥ c_{V}=\max_{h\in[H]}\|V_{h}\| c V = max h ∈ [ H ] ∥ V h ∥ . Then for any R > 0 R>0 R > 0 and M > 0 M>0 M > 0 , it holds that
sup μ ∈ S G α , β ( R d ) sup ∥ x ∥ ≤ M ∥ Γ ( μ , x ) − Γ ( ( Π R ) # μ , x ) ∥ ≤ H c W c V e c A M C α , β ( 2 + R ) α c A M e β 2 c A 2 M 2 2 ( c A M β 2 R + 2 β ) e − R 2 2 β 2 . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d})}\sup_{\|x\|\leq M}\|\Gamma(\mu,x)-\Gamma((\Pi_{R})_{\#}\mu,x)\|
\leq Hc_{W}c_{V}e^{c_{A}MC_{\alpha,\beta}}(2+R)\alpha c_{A}M e^{\frac{\beta^{2}c_{A}^{2}M^{2}}{2}}\left(\frac{c_{A}M\beta^{2}}{R}+2\beta\right)e^{-\frac{R^{2}}{2\beta^{2}}}. μ ∈ SG α , β ( R d ) sup ∥ x ∥ ≤ M sup ∥Γ ( μ , x ) − Γ (( Π R ) # μ , x ) ∥ ≤ H c W c V e c A M C α , β ( 2 + R ) α c A M e 2 β 2 c A 2 M 2 ( R c A M β 2 + 2 β ) e − 2 β 2 R 2 . where we have defined
C α , β : = sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ ν ( d x ) < ∞ . C_{\alpha,\beta}:=\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d})}\int\|x\|\nu(\mathrm{d}x)<\infty. C α , β := ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ ν ( d x ) < ∞.
Proof. This follows directly from Proposition A.2 .
Proof of Theorem 3.4. Throughout the proof, we use the notation μ r = ( Π r ) # μ \mu^r = (\Pi_r)_\#\mu μ r = ( Π r ) # μ and K = S G α , β ( R d ) K = \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) K = SG α , β ( R d ) . We begin with the error decomposition
W 1 ( Γ ( μ ) # μ , Γ ( μ 0 ) # μ 0 ) ≤ W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) + W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) + W 1 ( Γ ( μ 0 r ) # μ 0 r , Γ ( μ 0 ) # μ 0 ) ≤ W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) ⏟ ( I ) + 2 sup μ ∈ K W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) . \begin{aligned}
W_1(\Gamma(\mu)_\#\mu,\Gamma(\mu_0)_\#\mu_0)
&\le W_1(\Gamma(\mu)_\#\mu,\Gamma(\mu^r)_\#\mu^r) \\
&\quad+ W_1(\Gamma(\mu^r)_\#\mu^r,\Gamma(\mu_0^r)_\#\mu_0^r) \\
&\quad+ W_1(\Gamma(\mu_0^r)_\#\mu_0^r,\Gamma(\mu_0)_\#\mu_0) \\
&\le\underbrace{W_1(\Gamma(\mu^r)_\#\mu^r,\Gamma(\mu_0^r)_\#\mu_0^r)}_{\mathrm{(I)}} + 2\sup_{\mu\in K}W_1(\Gamma(\mu)_\#\mu,\Gamma(\mu^r)_\#\mu^r).
\end{aligned} W 1 ( Γ ( μ ) # μ , Γ ( μ 0 ) # μ 0 ) ≤ W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) + W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) + W 1 ( Γ ( μ 0 r ) # μ 0 r , Γ ( μ 0 ) # μ 0 ) ≤ ( I ) W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) + 2 μ ∈ K sup W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) .
for any r > 0 r>0 r > 0 . For term (I), since μ r \mu^r μ r and μ 0 r \mu_0^r μ 0 r are supported in B r B_r B r , Lemma B.15 guarantees that
( I ) = W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) ≤ C c A , c V , c W e 5 c A r 2 W 1 ( μ r , μ 0 r ) ≤ C c A , c V , c W e 5 c A r 2 W 1 ( μ , μ 0 ) . \mathrm{(I)}=W_1(\Gamma(\mu^r)_\#\mu^r,\Gamma(\mu_0^r)_\#\mu_0^r)\le C_{c_A,c_V,c_W}e^{5c_A r^2}W_1(\mu^r,\mu_0^r)\le C_{c_A,c_V,c_W}e^{5c_A r^2}W_1(\mu,\mu_0). ( I ) = W 1 ( Γ ( μ r ) # μ r , Γ ( μ 0 r ) # μ 0 r ) ≤ C c A , c V , c W e 5 c A r 2 W 1 ( μ r , μ 0 r ) ≤ C c A , c V , c W e 5 c A r 2 W 1 ( μ , μ 0 ) .
where the second inequality follows from the fact that Π r \Pi_r Π r is 1-Lipschitz for any r > 0 r>0 r > 0 . We next bound term (II). Since ∥ Π r ( x ) ∥ ≤ min ( r , ∥ x ∥ ) ≤ ∥ x ∥ \|\Pi_r(x)\|\le\min(r,\|x\|)\le\|x\| ∥ Π r ( x ) ∥ ≤ min ( r , ∥ x ∥ ) ≤ ∥ x ∥ , we have μ r ∈ S G α , β ( R d ) \mu^r\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ r ∈ SG α , β ( R d ) by (7) . Then
W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) ≤ W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ ) + W 1 ( Γ ( μ r ) # μ , Γ ( μ r ) # μ r ) ≤ ∥ Γ ( μ ) − Γ ( μ r ) ∥ L μ 1 + Lip ( Γ ( μ r ) ) W 1 ( μ , μ r ) ≤ sup ∥ x ∥ ≤ R ∥ Γ ( μ , x ) − Γ ( μ r , x ) ∥ + ∫ ∥ x ∥ > R ( ∥ Γ ( μ , x ) ∥ + ∥ Γ ( μ r , x ) ∥ ) μ ( d x ) + Lip ( Γ ( μ r ) ) W 1 ( μ , μ r ) ≤ sup ∥ x ∥ ≤ R ∥ Γ ( μ , x ) − Γ ( μ r , x ) ∥ + 2 C α , β , V , Q ∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) + ( 1 + H c A c V c W r 2 ) W 1 ( μ , μ r ) \begin{aligned}
W_1(\Gamma(\mu)_\#\mu,\Gamma(\mu^r)_\#\mu^r)
&\le W_1(\Gamma(\mu)_\#\mu,\Gamma(\mu^r)_\#\mu)+W_1(\Gamma(\mu^r)_\#\mu,\Gamma(\mu^r)_\#\mu^r) \\
&\le\|\Gamma(\mu)-\Gamma(\mu^r)\|_{L^1_\mu}+\operatorname{Lip}(\Gamma(\mu^r))W_1(\mu,\mu^r) \\
&\le\sup_{\|x\|\le R}\|\Gamma(\mu,x)-\Gamma(\mu^r,x)\|+\int_{\|x\|>R}\bigl(\|\Gamma(\mu,x)\|+\|\Gamma(\mu^r,x)\|\bigr)\,\mu(dx) \\
&\quad+\operatorname{Lip}(\Gamma(\mu^r))W_1(\mu,\mu^r) \\
&\le\sup_{\|x\|\le R}\|\Gamma(\mu,x)-\Gamma(\mu^r,x)\|+2C_{\alpha,\beta,V,Q}\int_{\|x\|>R}(1+\|x\|)\,\mu(dx) \\
&\quad+(1+Hc_Ac_Vc_Wr^2)W_1(\mu,\mu^r)
\end{aligned} W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ r ) ≤ W 1 ( Γ ( μ ) # μ , Γ ( μ r ) # μ ) + W 1 ( Γ ( μ r ) # μ , Γ ( μ r ) # μ r ) ≤ ∥Γ ( μ ) − Γ ( μ r ) ∥ L μ 1 + Lip ( Γ ( μ r )) W 1 ( μ , μ r ) ≤ ∥ x ∥ ≤ R sup ∥Γ ( μ , x ) − Γ ( μ r , x ) ∥ + ∫ ∥ x ∥ > R ( ∥Γ ( μ , x ) ∥ + ∥Γ ( μ r , x ) ∥ ) μ ( d x ) + Lip ( Γ ( μ r )) W 1 ( μ , μ r ) ≤ ∥ x ∥ ≤ R sup ∥Γ ( μ , x ) − Γ ( μ r , x ) ∥ + 2 C α , β , V , Q ∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) + ( 1 + H c A c V c W r 2 ) W 1 ( μ , μ r )
for any R > 0 R>0 R > 0 , where we used Lemma B.13 to bound the Lipschitz constant of Γ ( μ r ) \Gamma(\mu^r) Γ ( μ r ) in the final line. Using Proposition A.3 to bound the supremum above, Lemma B.11 to bound the integral ∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) \int_{\|x\|>R}(1+\|x\|)\,\mu(dx) ∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) , and Lemma B.10 to bound the truncation error W 1 ( μ , μ r ) W_1(\mu,\mu^r) W 1 ( μ , μ r ) , we have the following bound for term (II):
( I I ) ≤ H c V c W e c A R C α , β ( 2 + R ) α c A R e β 2 α 2 c A 2 R 2 2 ( c A R β 2 r + 2 β ) e − r 2 2 β + 2 C α , β , c V , c A , c W α ( β 2 R + 1 + R ) e − R 2 / β + α β 2 r e − r 2 / β ≤ H e c A 2 2 α 2 β 2 c V c W ( 2 + R ) α c A R e β 2 α 2 c A 2 R 2 2 ( c A R β 2 r + 2 β ) e − r 2 2 β + 2 C α , β , c V , c A , c W α ( β 2 R + 1 + R ) e − R 2 / β + α β 2 r e − r 2 / β , \begin{aligned}
\mathrm{(II)}
&\le Hc_Vc_W e^{c_A R C_{\alpha,\beta}}(2+R)^{\alpha c_A R}e^{\frac{\beta^2\alpha^2c_A^2R^2}{2}}\left(\frac{c_A R\beta^2}{r}+2\beta\right)e^{-\frac{r^2}{2\beta}} \\
&\quad+2C_{\alpha,\beta,c_V,c_A,c_W}\alpha\left(\frac{\beta}{2R}+1+R\right)e^{-R^2/\beta}+\frac{\alpha\beta}{2r}e^{-r^2/\beta} \\
&\le H e^{\frac{c_A^2}{2\alpha^2\beta^2}}c_Vc_W(2+R)^{\alpha c_A R}e^{\frac{\beta^2\alpha^2c_A^2R^2}{2}}\left(\frac{c_A R\beta^2}{r}+2\beta\right)e^{-\frac{r^2}{2\beta}} \\
&\quad+2C_{\alpha,\beta,c_V,c_A,c_W}\alpha\left(\frac{\beta}{2R}+1+R\right)e^{-R^2/\beta}+\frac{\alpha\beta}{2r}e^{-r^2/\beta},
\end{aligned} ( II ) ≤ H c V c W e c A R C α , β ( 2 + R ) α c A R e 2 β 2 α 2 c A 2 R 2 ( r c A R β 2 + 2 β ) e − 2 β r 2 + 2 C α , β , c V , c A , c W α ( 2 R β + 1 + R ) e − R 2 / β + 2 r α β e − r 2 / β ≤ H e 2 α 2 β 2 c A 2 c V c W ( 2 + R ) α c A R e 2 β 2 α 2 c A 2 R 2 ( r c A R β 2 + 2 β ) e − 2 β r 2 + 2 C α , β , c V , c A , c W α ( 2 R β + 1 + R ) e − R 2 / β + 2 r α β e − r 2 / β ,
where the last inequality follows from Young’s inequality. To simplify the rest of this proof, we express this inequality as
( I I ) ≤ C H , α , β , c A , c V , c W ( R ( 1 + R ) ( R r − 1 + 1 ) e β 2 α 2 c A 2 R 2 2 − r 2 2 β + ( 1 + r + r − 1 ) ( e − r 2 / β + e − R 2 / β ) ) , \mathrm{(II)}\le C_{H,\alpha,\beta,c_A,c_V,c_W}\left(R(1+R)(Rr^{-1}+1)e^{\frac{\beta^2\alpha^2c_A^2R^2}{2}-\frac{r^2}{2\beta}}+(1+r+r^{-1})\left(e^{-r^2/\beta}+e^{-R^2/\beta}\right)\right), ( II ) ≤ C H , α , β , c A , c V , c W ( R ( 1 + R ) ( R r − 1 + 1 ) e 2 β 2 α 2 c A 2 R 2 − 2 β r 2 + ( 1 + r + r − 1 ) ( e − r 2 / β + e − R 2 / β ) ) ,
where the constant C H , α , β , c A , c V , c W C_{H,\alpha,\beta,c_A,c_V,c_W} C H , α , β , c A , c V , c W may change from line to line throughout the rest of the proof. To conclude the proof, we must choose r r r and R R R as functions of W 1 ( μ , μ 0 ) W_1(\mu,\mu_0) W 1 ( μ , μ 0 ) . We first set
R = 1 2 ( β 3 α 2 c A 2 + 1 ) r . R=\sqrt{\frac{1}{2(\beta^3\alpha^2c_A^2+1)}r}. R = 2 ( β 3 α 2 c A 2 + 1 ) 1 r .
so that the upper bound on term (II) becomes
( I I ) ≤ C H , α , β , c A , c V , c W ( 1 + r 2 + r − 1 ) e − min ( 1 2 ( β 3 α 2 c A 2 + 1 ) , 1 β ) r 2 . (II) \le C_{H,\alpha,\beta,c_A,c_V,c_W}\left(1+r^2+r^{-1}\right)e^{-\min\left(\frac{1}{2(\beta^3\alpha^2c_A^2+1)},\frac{1}{\beta}\right)r^2}. ( I I ) ≤ C H , α , β , c A , c V , c W ( 1 + r 2 + r − 1 ) e − m i n ( 2 ( β 3 α 2 c A 2 + 1 ) 1 , β 1 ) r 2 .
To balance terms (I) and (II), we set
r = 1 k 1 + k 2 log + ( W 1 ( μ , μ 0 ) − 1 ) . r=\sqrt{\frac{1}{k_1+k_2}\log_{+}\left(W_1(\mu,\mu_0)^{-1}\right)}. r = k 1 + k 2 1 log + ( W 1 ( μ , μ 0 ) − 1 ) .
where
k 1 : = 5 c A and k 2 : = min ( 1 β , 1 2 ( β 3 α 2 c A 2 + 1 ) ) . (10) k_1:=5c_A\quad\text{and}\quad k_2:=\min\left(\frac{1}{\beta},\frac{1}{2(\beta^3\alpha^2c_A^2+1)}\right). \tag*{(10)} k 1 := 5 c A and k 2 := min ( β 1 , 2 ( β 3 α 2 c A 2 + 1 ) 1 ) . (10)
This leads to the estimate
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C H , α , β , c A , c V , c W ( 1 + max ( log ( W 1 ( μ , μ 0 ) ) , log + ( W 1 ( μ , μ 0 ) − 1 ) ) ) W 1 ( μ , μ 0 ) k 2 k 1 + k 2 . \begin{aligned}
W_1(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\mu_0,\cdot)_{\#}\mu_0)
&\le C_{H,\alpha,\beta,c_A,c_V,c_W}\left(1+\max\left(\log(W_1(\mu,\mu_0)),\log_{+}(W_1(\mu,\mu_0)^{-1})\right)\right)W_1(\mu,\mu_0)^{\frac{k_2}{k_1+k_2}}.
\end{aligned} W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C H , α , β , c A , c V , c W ( 1 + max ( log ( W 1 ( μ , μ 0 )) , log + ( W 1 ( μ , μ 0 ) − 1 ) ) ) W 1 ( μ , μ 0 ) k 1 + k 2 k 2 .
where k 1 k_1 k 1 and k 2 k_2 k 2 are defined in Equation (A.1). To conclude, we remove the log-factor at the expense of enlarging the constant factor and the Hölder estimate. This gives the final estimate
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C H , α , β , c A , c V , c W W 1 ( μ , μ 0 ) γ W_1(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\mu_0,\cdot)_{\#}\mu_0)\le C_{H,\alpha,\beta,c_A,c_V,c_W}W_1(\mu,\mu_0)^\gamma W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C H , α , β , c A , c V , c W W 1 ( μ , μ 0 ) γ
for γ ∈ ( 0 , k 2 k 1 + k 2 ) \gamma\in\left(0,\frac{k_2}{k_1+k_2}\right) γ ∈ ( 0 , k 1 + k 2 k 2 ) . We conclude the proof.
Proof of Theorem 3.5. We will prove the statement by induction on the number of layers L L L . For the base case, assume that T \mathrm{T} T is an in-context mapping given by T ( μ , x ) = ϕ ( Γ ( μ , x ) ) \mathrm{T}(\mu,x)=\phi(\Gamma(\mu,x)) T ( μ , x ) = ϕ ( Γ ( μ , x )) , where Γ \Gamma Γ is a multi-head self-attention layer and ϕ \phi ϕ is a ReLU feedforward neural network. The mapping μ ↦ Γ ( μ , ⋅ ) # μ \mu\mapsto\Gamma(\mu,\cdot)_{\#}\mu μ ↦ Γ ( μ , ⋅ ) # μ is Hölder continuous on S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) , and the mapping μ ↦ ϕ # μ \mu\mapsto\phi_{\#}\mu μ ↦ ϕ # μ is globally Lipschitz (since ϕ \phi ϕ is a Lipschitz mapping). Therefore, the mapping μ ↦ T ( μ ) # μ \mu\mapsto\mathrm{T}(\mu)_{\#}\mu μ ↦ T ( μ ) # μ is Hölder continuous on S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) ; this establishes the base case. For the induction step, let T \mathrm{T} T be an in-context composition of L L L multi-head self-attention layers and ReLU feedforward layers. Then we can write
T = ( T L ⋄ T L − 1 ) , \mathrm{T}=(\mathrm{T}_L\diamond\mathrm{T}_{L-1}), T = ( T L ⋄ T L − 1 ) ,
where T L − 1 \mathrm{T}_{L-1} T L − 1 is an in-context composition of L − 1 L-1 L − 1 multi-head self-attention layers and ReLU feedforward layers, and T L = ϕ L ⋄ Γ L \mathrm{T}_L=\phi_L\diamond\Gamma_L T L = ϕ L ⋄ Γ L is a multi-head self attention layer composed with a ReLU feedforward layer. By induction, there exist constants C > 0 C>0 C > 0 and γ ∈ ( 0 , 1 ) \gamma\in(0,1) γ ∈ ( 0 , 1 ) such that G L − 1 G_{L-1} G L − 1 satisfies the estimate
W 1 ( T L − 1 ( μ , ⋅ ) # μ , T L − 1 ( μ 0 , ⋅ ) # μ 0 ) ≤ C W 1 ( μ , μ 0 ) γ W_1(\mathrm{T}_{L-1}(\mu,\cdot)_{\#}\mu,\mathrm{T}_{L-1}(\mu_0,\cdot)_{\#}\mu_0)\le CW_1(\mu,\mu_0)^\gamma W 1 ( T L − 1 ( μ , ⋅ ) # μ , T L − 1 ( μ 0 , ⋅ ) # μ 0 ) ≤ C W 1 ( μ , μ 0 ) γ
for all μ \mu μ and μ 0 \mu_0 μ 0 in S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) . In addition, by Theorem 3.3, there exist constants α ′ ≥ 1 \alpha'\ge1 α ′ ≥ 1 and β ′ > 0 \beta'>0 β ′ > 0 , depending only on α \alpha α , β \beta β , and T L − 1 \mathrm{T}_{L-1} T L − 1 , such that T L − 1 ( μ , ⋅ ) # μ ∈ S G α ′ , β ′ ( R k ) \mathrm{T}_{L-1}(\mu,\cdot)_{\#}\mu\in\mathrm{SG}_{\alpha',\beta'}(\mathbb{R}^k) T L − 1 ( μ , ⋅ ) # μ ∈ SG α ′ , β ′ ( R k ) for all μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) . Since the base case argument guarantees that T L \mathrm{T}_L T L is Hölder continuous on S G α ′ , β ′ ( R k ) \mathrm{SG}_{\alpha',\beta'}(\mathbb{R}^k) SG α ′ , β ′ ( R k ) (say, with constant C ′ > 0 C'>0 C ′ > 0 and exponent γ ′ ∈ ( 0 , 1 ) \gamma'\in(0,1) γ ′ ∈ ( 0 , 1 ) ), it follows that
W 1 ( T ( μ , ⋅ ) # μ , T ( μ 0 , ⋅ ) # μ 0 ) = W 1 ( ( T L ⋄ T L − 1 ) ( μ , ⋅ ) # μ , ( T L ⋄ T L − 1 ) ( μ 0 , ⋅ ) # μ 0 ) ≤ C ′ W 1 ( T L − 1 ( μ , ⋅ ) # μ , T L − 1 ( μ 0 , ⋅ ) # μ 0 ) γ ′ ≤ C C ′ W 1 ( μ , μ 0 ) γ γ ′ . \begin{aligned}
W_1(\mathrm{T}(\mu,\cdot)_{\#}\mu,\mathrm{T}(\mu_0,\cdot)_{\#}\mu_0)
&=W_1((\mathrm{T}_L\diamond\mathrm{T}_{L-1})(\mu,\cdot)_{\#}\mu,(\mathrm{T}_L\diamond\mathrm{T}_{L-1})(\mu_0,\cdot)_{\#}\mu_0)\\
&\le C'W_1(\mathrm{T}_{L-1}(\mu,\cdot)_{\#}\mu,\mathrm{T}_{L-1}(\mu_0,\cdot)_{\#}\mu_0)^{\gamma'}\\
&\le CC'W_1(\mu,\mu_0)^{\gamma\gamma'}.
\end{aligned} W 1 ( T ( μ , ⋅ ) # μ , T ( μ 0 , ⋅ ) # μ 0 ) = W 1 (( T L ⋄ T L − 1 ) ( μ , ⋅ ) # μ , ( T L ⋄ T L − 1 ) ( μ 0 , ⋅ ) # μ 0 ) ≤ C ′ W 1 ( T L − 1 ( μ , ⋅ ) # μ , T L − 1 ( μ 0 , ⋅ ) # μ 0 ) γ ′ ≤ C C ′ W 1 ( μ , μ 0 ) γ γ ′ .
We conclude the proof.
Proof of Theorem 3.7. Throughout this proof, C C C denotes a positive constant—depending only on α \alpha α , β \beta β , and the parameters of T \mathrm{T} T —whose precise value may differ from line to line. Fix μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , let x 1 , … , x N ∼ μ x_1,\ldots,x_N\sim\mu x 1 , … , x N ∼ μ be iid, and let μ N = 1 N ∑ i = 1 N δ x i \mu_N = \frac{1}{N}\sum_{i=1}^{N}\delta_{x_i} μ N = N 1 ∑ i = 1 N δ x i . Let A N A_N A N denote the event on which μ N ∈ S G 3 + α / 7 , 7 β \mu_N \in\mathrm{SG}_{3+\alpha/7,7\beta} μ N ∈ SG 3 + α /7 , 7 β . By Proposition B.7, there exists a N α , β ∈ N N_{\alpha,\beta} \in\mathbb{N} N α , β ∈ N such that
P ( A N ) ≥ 1 − 2 α N − 2 for all N ≥ N α , β . \mathbb{P}(A_N) \ge1 - 2\alpha N^{-2} \quad\text{for all } N \ge N_{\alpha,\beta}. P ( A N ) ≥ 1 − 2 α N − 2 for all N ≥ N α , β .
Notice that
S G α , β ( R d ) ⋃ S G 3 + α / 7 , 7 β ( R d ) ⊂ S G max ( α , 3 + α / 7 ) , 7 β ( R d ) . \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) \bigcup\mathrm{SG}_{3+\alpha/7,7\beta}(\mathbb{R}^d) \subset\mathrm{SG}_{\max(\alpha,3+\alpha/7),7\beta}(\mathbb{R}^d). SG α , β ( R d ) ⋃ SG 3 + α /7 , 7 β ( R d ) ⊂ SG m a x ( α , 3 + α /7 ) , 7 β ( R d ) .
By Theorem 3.5 , the mapping μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto T(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ is Hölder continuous on S G max ( α , 3 + α / 7 ) , 7 β ( R d ) \mathrm{SG}_{\max(\alpha,3+\alpha/7),7\beta}(\mathbb{R}^d) SG m a x ( α , 3 + α /7 ) , 7 β ( R d ) with Hölder exponent γ = γ ( α , β , T ) ∈ ( 0 , 1 ) \gamma= \gamma(\alpha,\beta,T) \in(0,1) γ = γ ( α , β , T ) ∈ ( 0 , 1 ) and constant C = C ( α , β , T ) > 0 C = C(\alpha,\beta,T) > 0 C = C ( α , β , T ) > 0 depending only on α \alpha α , β \beta β , and the parameters of T T T . We then proceed to estimate
E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) = E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ( 1 A N + 1 A N c ) ] ≤ C G E [ W 1 ( μ , μ N ) ] γ + E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1 / 2 ⋅ P ( A N c ) ≤ C G E [ W 1 ( μ , μ N ) ] γ + E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1 / 2 ⋅ 2 α N . (11) \begin{aligned}
\mathbb{E}W_1(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N)
&= \mathbb{E}\left[W_1(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N)(1_{A_N}+1_{A_N^c})\right] \\
&\le C_G\mathbb{E}[W_1(\mu,\mu_N)]^\gamma+\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N)\right]^{1/2}\cdot\sqrt{\mathbb{P}(A_N^c)} \\
&\le C_G\mathbb{E}[W_1(\mu,\mu_N)]^\gamma+\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N)\right]^{1/2}\cdot\frac{\sqrt{2\alpha}}{N}. \tag*{(11)}
\end{aligned} E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) = E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ( 1 A N + 1 A N c ) ] ≤ C G E [ W 1 ( μ , μ N ) ] γ + E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1/2 ⋅ P ( A N c ) ≤ C G E [ W 1 ( μ , μ N ) ] γ + E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1/2 ⋅ N 2 α . (11)
where the second line follows from the Cauchy–Schwarz inequality and the final line follows from Jensen’s inequality. To estimate the second term, we have
E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ 2 E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] + 2 E [ W 1 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] = : I + I I . \mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu,T(\mu_N,\cdot)_{\#}\mu_N)\right]
\le2\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu,T(\mu,\cdot)_{\#}\mu_N)\right]
+2\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu_N,T(\mu_N,\cdot)_{\#}\mu_N)\right]
=: I+II. E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ 2 E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] + 2 E [ W 1 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] =: I + I I .
For term I I I , if γ N \gamma_N γ N denotes any coupling of μ \mu μ and μ N \mu_N μ N , we have
E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] ≤ E [ W 2 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] ≤ E [ ∫ ∥ T ( μ , x ) − T ( μ , x ′ ) ∥ 2 γ N ( d x , d x ′ ) ] ≤ 2 E [ ∫ ( ∥ T ( μ , x ) ∥ 2 + ∥ T ( μ , x ′ ) ∥ 2 ) γ N ( d x , d x ′ ) ] ≤ 2 C E [ ∫ ( 1 + ∥ x ∥ 2 + ∥ x ′ ∥ 2 ) γ N ( d x , d x ′ ) ] ≤ 2 C ( 1 + ∫ ∥ x ∥ 2 μ ( d x ) + E [ 1 N ∑ i = 1 N ∥ x i ∥ 2 ] ) = 2 C ( 1 + 2 ∫ ∥ x ∥ 2 μ ( d x ) ) = O α , β , T ( 1 ) , \begin{aligned}
\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu,T(\mu,\cdot)_{\#}\mu_N)\right]
&\le\mathbb{E}\left[W_2^2(T(\mu,\cdot)_{\#}\mu,T(\mu,\cdot)_{\#}\mu_N)\right] \\
&\le\mathbb{E}\left[\int\|T(\mu,x)-T(\mu,x')\|^2\gamma_N(dx,dx')\right] \\
&\le2\mathbb{E}\left[\int\left(\|T(\mu,x)\|^2+\|T(\mu,x')\|^2\right)\gamma_N(dx,dx')\right] \\
&\le2C\mathbb{E}\left[\int\left(1+\|x\|^2+\|x'\|^2\right)\gamma_N(dx,dx')\right] \\
&\le2C\left(1+\int\|x\|^2\mu(dx)+\mathbb{E}\left[\frac{1}{N}\sum_{i=1}^{N}\|x_i\|^2\right]\right) \\
&=2C\left(1+2\int\|x\|^2\mu(dx)\right) \\
&=O_{\alpha,\beta,T}(1),
\end{aligned} E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] ≤ E [ W 2 2 ( T ( μ , ⋅ ) # μ , T ( μ , ⋅ ) # μ N ) ] ≤ E [ ∫ ∥ T ( μ , x ) − T ( μ , x ′ ) ∥ 2 γ N ( d x , d x ′ ) ] ≤ 2 E [ ∫ ( ∥ T ( μ , x ) ∥ 2 + ∥ T ( μ , x ′ ) ∥ 2 ) γ N ( d x , d x ′ ) ] ≤ 2 C E [ ∫ ( 1 + ∥ x ∥ 2 + ∥ x ′ ∥ 2 ) γ N ( d x , d x ′ ) ] ≤ 2 C ( 1 + ∫ ∥ x ∥ 2 μ ( d x ) + E [ N 1 i = 1 ∑ N ∥ x i ∥ 2 ] ) = 2 C ( 1 + 2 ∫ ∥ x ∥ 2 μ ( d x ) ) = O α , β , T ( 1 ) ,
where the third line applies Lemma B.2 to deduce that ∥ T ( μ , x ) ∥ 2 + ∥ T ( μ , x ′ ) ∥ 2 ≲ 1 + ∥ x ∥ 2 + ∥ x ′ ∥ 2 \|T(\mu,x)\|^2+\|T(\mu,x')\|^2\lesssim1+\|x\|^2+\|x'\|^2 ∥ T ( μ , x ) ∥ 2 + ∥ T ( μ , x ′ ) ∥ 2 ≲ 1 + ∥ x ∥ 2 + ∥ x ′ ∥ 2 , and the last line applies Lemma B.11. This shows that term I I I can be bounded by a constant independent of N N N and depending only on α \alpha α and β \beta β and the parameters of T T T . For term I I II I I , we have
E [ W 1 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] ≤ E [ W 2 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] ≤ E [ 1 N ∑ i = 1 N ∥ T ( μ , x i ) − T ( μ N , x i ) ∥ 2 ] ≤ 2 E [ 1 N ∑ i = 1 N ( ∥ T ( μ , x i ) ∥ 2 + ∥ T ( μ N , x i ) ∥ 2 ) ] ≤ 2 E [ 1 N ∑ i = 1 N C ( 1 + ∥ x i ∥ 2 ) + 1 N ∑ i = 1 N ∥ T ( μ N , x i ) ∥ 2 ] . \begin{aligned}
\mathbb{E}\left[W_1^2(T(\mu,\cdot)_{\#}\mu_N,T(\mu_N,\cdot)_{\#}\mu_N)\right]
&\le\mathbb{E}\left[W_2^2(T(\mu,\cdot)_{\#}\mu_N,T(\mu_N,\cdot)_{\#}\mu_N)\right] \\
&\le\mathbb{E}\left[\frac{1}{N}\sum_{i=1}^{N}\|T(\mu,x_i)-T(\mu_N,x_i)\|^2\right] \\
&\le2\mathbb{E}\left[\frac{1}{N}\sum_{i=1}^{N}\left(\|T(\mu,x_i)\|^2+\|T(\mu_N,x_i)\|^2\right)\right] \\
&\le2\mathbb{E}\left[\frac{1}{N}\sum_{i=1}^{N}C(1+\|x_i\|^2)+\frac{1}{N}\sum_{i=1}^{N}\|T(\mu_N,x_i)\|^2\right].
\end{aligned} E [ W 1 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] ≤ E [ W 2 2 ( T ( μ , ⋅ ) # μ N , T ( μ N , ⋅ ) # μ N ) ] ≤ E [ N 1 i = 1 ∑ N ∥ T ( μ , x i ) − T ( μ N , x i ) ∥ 2 ] ≤ 2 E [ N 1 i = 1 ∑ N ( ∥ T ( μ , x i ) ∥ 2 + ∥ T ( μ N , x i ) ∥ 2 ) ] ≤ 2 E [ N 1 i = 1 ∑ N C ( 1 + ∥ x i ∥ 2 ) + N 1 i = 1 ∑ N ∥ T ( μ N , x i ) ∥ 2 ] .
Lemma B.16 proves that
max i ∈ [ N ] ∥ T ( μ N , x i ) ∥ ≤ C max n ∈ [ N ] ∥ x n ∥ , \max_{i\in[N]}\left\|\mathsf{T}(\mu_N,x_i)\right\| \le C\max_{n\in[N]}\left\|x_n\right\|, i ∈ [ N ] max ∥ T ( μ N , x i ) ∥ ≤ C n ∈ [ N ] max ∥ x n ∥ ,
where the constant C C C depends only on the parameters of T \mathsf{T} T . This proves that term I I II I I satisfies the bound
I I ≤ C E [ 1 + max i ∈ [ N ] ∥ x i ∥ 2 ] ≤ C ( 1 + log ( N ) ) , \begin{aligned}
II \le CE\left[1+\max_{i\in[N]}\left\|x_i\right\|^2\right] \\
&\le C(1+\log(N)),
\end{aligned} I I ≤ C E [ 1 + i ∈ [ N ] max ∥ x i ∥ 2 ] ≤ C ( 1 + log ( N )) ,
where we applied Lemma B.5 in the second line. Combining the estimates for terms I I I and I I II I I , we conclude that
E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1 / 2 ≤ C 1 + log ( N ) . \mathbb{E}\left[W_1^2\left(\mathsf{T}(\mu,\cdot)_{\#}\mu,\mathsf{T}(\mu_N,\cdot)_{\#}\mu_N\right)\right]^{1/2}\le C\sqrt{1+\log(N)}. E [ W 1 2 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] 1/2 ≤ C 1 + log ( N ) .
Plugging this bound into (A.2), we obtain
E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ C ( E [ W 1 ( μ , μ N ) ] γ + 1 + log ( N ) N ) . \mathbb{E}\left[W_1\left(\mathsf{T}(\mu,\cdot)_{\#}\mu,\mathsf{T}(\mu_N,\cdot)_{\#}\mu_N\right)\right]\le C\left(\mathbb{E}\left[W_1(\mu,\mu_N)\right]^\gamma+\frac{\sqrt{1+\log(N)}}{N}\right). E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ C ( E [ W 1 ( μ , μ N ) ] γ + N 1 + log ( N ) ) .
To conclude, Proposition B.18 guarantees that
E [ W 1 ( μ , μ N ) ] ≤ C log ( N ) ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d , \mathbb{E}\left[W_1(\mu,\mu_N)\right]\le C\sqrt{\log(N)(1+\log(1+N^{1/d}))}\,N^{-1/d}, E [ W 1 ( μ , μ N ) ] ≤ C log ( N ) ( 1 + log ( 1 + N 1/ d )) N − 1/ d ,
where the implicit constant depends only on d d d , α \alpha α , and β \beta β . In turn, this proves that
E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ C ( log ( N ) γ / 2 ( 1 + log ( 1 + N 1 / d ) ) γ / 2 N − γ / d + 1 + log ( N ) N ) ≤ C log ( N ) γ / 2 ( 1 + log ( 1 + N 1 / d ) ) γ / 2 N − γ / d , \begin{aligned}
\mathbb{E}\left[W_1\left(\mathsf{T}(\mu,\cdot)_{\#}\mu,\mathsf{T}(\mu_N,\cdot)_{\#}\mu_N\right)\right]
&\le C\left(\log(N)^{\gamma/2}\left(1+\log(1+N^{1/d})\right)^{\gamma/2}N^{-\gamma/d}+\frac{\sqrt{1+\log(N)}}{N}\right)\\
&\le C\log(N)^{\gamma/2}\left(1+\log(1+N^{1/d})\right)^{\gamma/2}N^{-\gamma/d},
\end{aligned} E [ W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ] ≤ C ( log ( N ) γ /2 ( 1 + log ( 1 + N 1/ d ) ) γ /2 N − γ / d + N 1 + log ( N ) ) ≤ C log ( N ) γ /2 ( 1 + log ( 1 + N 1/ d ) ) γ /2 N − γ / d ,
as was to be shown.
Proof of Proposition 3.8. Fix μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) . Lemma B.15, along with the fact that ReLU feedforward networks are globally Lipschitz continuous, guarantees that the mapping μ ↦ T ( μ , ⋅ ) # μ \mu\mapsto\mathsf{T}(\mu,\cdot)_{\#}\mu μ ↦ T ( μ , ⋅ ) # μ is Lipschitz continuous on P ( B R ) \mathcal{P}(B_R) P ( B R ) with Lipschitz constant C R , T C_{R,\mathsf{T}} C R , T depending on R R R and the parameters of T \mathsf{T} T . Therefore,
E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C R , T E W 1 ( μ , μ N ) . \mathbb{E}W_1\left(\mathsf{T}(\mu,\cdot)_{\#}\mu,\mathsf{T}(\mu_N,\cdot)_{\#}\mu_N\right)\le C_{R,\mathsf{T}}\mathbb{E}W_1(\mu,\mu_N). E W 1 ( T ( μ , ⋅ ) # μ , T ( μ N , ⋅ ) # μ N ) ≤ C R , T E W 1 ( μ , μ N ) .
Then, by Proposition B.17, there is a constant C d C_d C d depending on the dimension d d d such that
E W 1 ( μ , μ N ) ≤ C d R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . \mathbb{E}W_1(\mu,\mu_N)\le C_dR\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}. E W 1 ( μ , μ N ) ≤ C d R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d .
Combining these two inequalities gives the desired result.
Proofs for Section 3.4: Transformers With Mean-Field Cross-Attention
Proof of Theorem 3.9. We seek to bound
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) , W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0\right), W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ,
where μ , μ 0 ∈ S G α , β ( R d ) \mu,\mu_0\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ , μ 0 ∈ SG α , β ( R d ) and η , η 0 ∈ S G α , β ( R d ′ ) \eta,\eta_0\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'}) η , η 0 ∈ SG α , β ( R d ′ ) for α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta>0 β > 0 . We decompose this as
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η ) + W 1 ( Γ ( μ 0 , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) = : I + I I . \begin{aligned}
W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0\right)
&\le W_1\left(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta\right)\\
&\quad+W_1\left(\Gamma(\mu_0,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0\right)\\
&=: I+II.
\end{aligned} W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η ) + W 1 ( Γ ( μ 0 , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) =: I + I I .
For term I I I , we introduce auxiliary parameters R > 0 R>0 R > 0 and r > 0 r>0 r > 0 , and further decompose it as
I ≤ ∫ ∥ Γ ( μ , z ) − Γ ( μ 0 , z ) ∥ η ( d z ) ≤ ∫ ( ∥ Γ ( μ , z ) − Γ ( μ r , z ) ∥ + ∥ Γ ( μ r , z ) − Γ ( μ 0 r , z ) ∥ + ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 , z ) ∥ ) η ( d z ) ≤ 2 sup ν ∈ S G α , β ( R d ) , ∥ z ∥ ≤ R ∥ Γ ( ν , z ) − Γ ( ν r , z ) ∥ + sup ∥ z ∥ ≤ R ∥ Γ ( μ r , z ) − Γ ( μ 0 , z ) ∥ + 3 sup ν , ν 0 ∈ S G α , β ( R d ) , ρ ∈ S G α , β ( R d ′ ) ∫ ∥ z ∥ > R ∥ Γ ( ν , z ) − Γ ( ν 0 , z ) ∥ ρ ( d z ) = : I I + I I I + I I I I . \begin{aligned}
I &\le\int\lVert\Gamma(\mu,z)-\Gamma(\mu_0,z)\rVert\,\eta(dz)\\
&\le\int\bigl(\lVert\Gamma(\mu,z)-\Gamma(\mu^r,z)\rVert+\lVert\Gamma(\mu^r,z)-\Gamma(\mu_0^r,z)\rVert+\lVert\Gamma(\mu_0^r,z)-\Gamma(\mu_0,z)\rVert\bigr)\,\eta(dz)\\
&\le2\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d),\lVert z\rVert\le R}\lVert\Gamma(\nu,z)-\Gamma(\nu^r,z)\rVert+\sup_{\lVert z\rVert\le R}\lVert\Gamma(\mu^r,z)-\Gamma(\mu_0,z)\rVert\\
&\qquad+3\sup_{\nu,\nu_0\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d),\rho\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'})}\int_{\lVert z\rVert>R}\lVert\Gamma(\nu,z)-\Gamma(\nu_0,z)\rVert\rho(dz)\\
&=:I_I+I_{II}+I_{III}.
\end{aligned} I ≤ ∫ ∥ Γ ( μ , z ) − Γ ( μ 0 , z )∥ η ( d z ) ≤ ∫ ( ∥ Γ ( μ , z ) − Γ ( μ r , z )∥ + ∥ Γ ( μ r , z ) − Γ ( μ 0 r , z )∥ + ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 , z )∥ ) η ( d z ) ≤ 2 ν ∈ SG α , β ( R d ) , ∥ z ∥ ≤ R sup ∥ Γ ( ν , z ) − Γ ( ν r , z )∥ + ∥ z ∥ ≤ R sup ∥ Γ ( μ r , z ) − Γ ( μ 0 , z )∥ + 3 ν , ν 0 ∈ SG α , β ( R d ) , ρ ∈ SG α , β ( R d ′ ) sup ∫ ∥ z ∥ > R ∥ Γ ( ν , z ) − Γ ( ν 0 , z )∥ ρ ( d z ) =: I I + I I I + I I I I .
By Proposition A.3, term I I I_I I I is bounded by
I I ≤ 2 H c V c W e c A R C α , β ( 2 + r ) α c A R e β 2 α 2 c A 2 R 2 2 ( c A R β 2 r + 2 β ) e − r 2 2 β ≤ C H , c A , c V , c W , α , β ( 1 + r ) R ( 1 + R r − 1 ) e β 2 α 2 c A 2 R 2 − r 2 2 β , \begin{aligned}
I_I\le2Hc_Vc_W e^{c_A R C_{\alpha,\beta}}(2+r)\alpha c_A R e^{\frac{\beta^2\alpha^2c_A^2R^2}{2}}\left(\frac{c_A R\beta^2}{r}+2\beta\right)e^{-\frac{r^2}{2\beta}} \\
&\le C_{H,c_A,c_V,c_W,\alpha,\beta}(1+r)R(1+Rr^{-1})e^{\beta^2\alpha^2c_A^2R^2-\frac{r^2}{2\beta}},
\end{aligned} I I ≤ 2 H c V c W e c A R C α , β ( 2 + r ) α c A R e 2 β 2 α 2 c A 2 R 2 ( r c A R β 2 + 2 β ) e − 2 β r 2 ≤ C H , c A , c V , c W , α , β ( 1 + r ) R ( 1 + R r − 1 ) e β 2 α 2 c A 2 R 2 − 2 β r 2 ,
where the last line is an application of Young’s inequality. For term I I I I_{II} I I I , we apply Corollary B.14, which bounds the Lipschitz constant of the mapping ν ↦ Γ ( ν , z ) \nu\mapsto\Gamma(\nu,z) ν ↦ Γ ( ν , z ) for ν ∈ P ( B r ) \nu\in\mathcal{P}(B_r) ν ∈ P ( B r ) and z ∈ B R z\in B_R z ∈ B R , to obtain
I I I ≤ H e 4 c A R r max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) W 1 ( μ r , μ 0 r ) ≤ H e 4 c A R r max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) W 1 ( μ , μ 0 ) , \begin{aligned}
I_{II}\le He^{4c_A Rr}\max\bigl(c_Vc_W(1+c_A rR),c_Ac_Vc_WrR\bigr)W_1(\mu^r,\mu_0^r) \\
&\le He^{4c_A Rr}\max\bigl(c_Vc_W(1+c_A rR),c_Ac_Vc_WrR\bigr)W_1(\mu,\mu_0),
\end{aligned} I I I ≤ H e 4 c A R r max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) W 1 ( μ r , μ 0 r ) ≤ H e 4 c A R r max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) W 1 ( μ , μ 0 ) ,
where the last line follows from the fact that the truncation map is 1-Lipschitz for each r > 0 r>0 r > 0 , and hence the mapping ν ↦ ν r \nu\mapsto\nu^r ν ↦ ν r is 1-Lipschitz with respect to W 1 W_1 W 1 . For term I I I I I_{III} I I I I , we use the linear growth of Γ ( ν , z ) \Gamma(\nu,z) Γ ( ν , z ) with respect to z z z and the tail decay of ρ \rho ρ ; this yields
I I I I ≤ 3 sup ν , ν 0 ∈ S G α , β ( R d ) , ρ ∈ S G α , β ( R d ′ ) ∫ ∥ z ∥ > R ( ∥ Γ ( ν , z ) ∥ + ∥ Γ ( ν 0 , z ) ∥ ) ρ ( d z ) I_{III}\le3\sup_{\nu,\nu_0\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d),\rho\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'})}\int_{\lVert z\rVert>R}\bigl(\lVert\Gamma(\nu,z)\rVert+\lVert\Gamma(\nu_0,z)\rVert\bigr)\rho(dz) I I I I ≤ 3 ν , ν 0 ∈ SG α , β ( R d ) , ρ ∈ SG α , β ( R d ′ ) sup ∫ ∥ z ∥ > R ( ∥ Γ ( ν , z )∥ + ∥ Γ ( ν 0 , z )∥ ) ρ ( d z )
≤ 3 C α , β sup ρ ∈ S G α , β ( R d ′ ) ∫ ∥ z ∥ > R ( 1 + ∥ z ∥ ) ρ ( d z ) \le3C_{\alpha,\beta}\sup_{\rho\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'})}\int_{\lVert z\rVert>R}(1+\lVert z\rVert)\rho(dz) ≤ 3 C α , β ρ ∈ SG α , β ( R d ′ ) sup ∫ ∥ z ∥ > R ( 1 + ∥ z ∥) ρ ( d z )
≤ 3 C α , β α ( 1 + β 2 2 R + R ) e − R 2 / β , \le3C_{\alpha,\beta}\alpha\left(1+\frac{\beta^2}{2R}+R\right)e^{-R^2/\beta}, ≤ 3 C α , β α ( 1 + 2 R β 2 + R ) e − R 2 / β ,
where the second line follows from Proposition 3.2 and the last line follows from Lemma B.11. Summing the estimates of terms I I I_I I I , I I I I_{II} I I I , and I I I I I_{III} I I I I furnishes a bound on term I I I .
Turning to term I I II I I , we let Π \Pi Π denote the optimal coupling between η \eta η and η 0 \eta_0 η 0 . Then we have
I I ≤ ∫ ∥ Γ ( μ 0 , z ) − Γ ( μ 0 , z ′ ) ∥ Π ( d z , d z ′ ) ≤ ∫ ∥ Γ ( μ 0 , z ) − Γ ( μ 0 r , z ) ∥ η ( d z ) + ∫ ∥ Γ ( μ 0 , z ′ ) − Γ ( μ 0 r , z ′ ) ∥ η 0 ( d z ) + ∫ ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 r , z ′ ) ∥ Π ( d z , d z ′ ) ≤ 2 sup ν ∈ S G α , β ( R d ) , ∥ z ∥ ≤ R ∥ Γ ( ν , z ) − Γ ( ν r , z ) ∥ + 2 sup ν ∈ S G α , β ( R d ) , ρ ∈ S G α , β ( R d ′ ) ∫ ∥ z ∥ > R ∥ Γ ( ν , z ) − Γ ( ν r , z ) ∥ ρ ( d z ) + ∫ ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 r , z ′ ) ∥ Π ( d z , d z ′ ) = : I I I + I I I I + I I I I I . \begin{aligned}
II&\le\int\lVert\Gamma(\mu_0,z)-\Gamma(\mu_0,z')\rVert\Pi(dz,dz')\\
&\le\int\lVert\Gamma(\mu_0,z)-\Gamma(\mu_0^r,z)\rVert\eta(dz)+\int\lVert\Gamma(\mu_0,z')-\Gamma(\mu_0^r,z')\rVert\eta_0(dz)\\
&\qquad+\int\lVert\Gamma(\mu_0^r,z)-\Gamma(\mu_0^r,z')\rVert\Pi(dz,dz')\\
&\le2\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d),\lVert z\rVert\le R}\lVert\Gamma(\nu,z)-\Gamma(\nu^r,z)\rVert\\
&\qquad+2\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d),\rho\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^{d'})}\int_{\lVert z\rVert>R}\lVert\Gamma(\nu,z)-\Gamma(\nu^r,z)\rVert\rho(dz)\\
&\qquad+\int\lVert\Gamma(\mu_0^r,z)-\Gamma(\mu_0^r,z')\rVert\Pi(dz,dz')\\
&=:II_I+II_{II}+II_{III}.
\end{aligned} I I ≤ ∫ ∥ Γ ( μ 0 , z ) − Γ ( μ 0 , z ′ )∥ Π ( d z , d z ′ ) ≤ ∫ ∥ Γ ( μ 0 , z ) − Γ ( μ 0 r , z )∥ η ( d z ) + ∫ ∥ Γ ( μ 0 , z ′ ) − Γ ( μ 0 r , z ′ )∥ η 0 ( d z ) + ∫ ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 r , z ′ )∥ Π ( d z , d z ′ ) ≤ 2 ν ∈ SG α , β ( R d ) , ∥ z ∥ ≤ R sup ∥ Γ ( ν , z ) − Γ ( ν r , z )∥ + 2 ν ∈ SG α , β ( R d ) , ρ ∈ SG α , β ( R d ′ ) sup ∫ ∥ z ∥ > R ∥ Γ ( ν , z ) − Γ ( ν r , z )∥ ρ ( d z ) + ∫ ∥ Γ ( μ 0 r , z ) − Γ ( μ 0 r , z ′ )∥ Π ( d z , d z ′ ) =: I I I + I I I I + I I I I I .
Terms I I I II_I I I I and I I I I II_{II} I I I I can be bounded using the estimates of terms I I I_I I I and I I I I I_{III} I I I I :
I I I ≤ 2 H c V e c A R C α , β ( 2 + r ) α c A R e β 2 α 2 c A 2 R 2 2 ( c A R β 2 r + 2 β ) e − r 2 2 β ≤ C H , c A , c V , c W , α , β ( 1 + r ) R ( 1 + R r − 1 ) e β 2 α 2 c A 2 R 2 − r 2 2 β \begin{aligned}
II_I\le2Hc_Ve^{c_A R C_{\alpha,\beta}}(2+r)\alpha c_A R e^{\frac{\beta^2\alpha^2c_A^2R^2}{2}}\left(\frac{c_A R\beta^2}{r}+2\beta\right)e^{-\frac{r^2}{2\beta}} \\
&\le C_{H,c_A,c_V,c_W,\alpha,\beta}(1+r)R(1+Rr^{-1})e^{\beta^2\alpha^2c_A^2R^2-\frac{r^2}{2\beta}}
\end{aligned} I I I ≤ 2 H c V e c A R C α , β ( 2 + r ) α c A R e 2 β 2 α 2 c A 2 R 2 ( r c A R β 2 + 2 β ) e − 2 β r 2 ≤ C H , c A , c V , c W , α , β ( 1 + r ) R ( 1 + R r − 1 ) e β 2 α 2 c A 2 R 2 − 2 β r 2
and
I I I I ≤ 2 C α , β α ( 1 + β 2 R + R ) e − R 2 / β . I_{III} \le2C_{\alpha,\beta}\alpha\left(1+\frac{\beta}{2R}+R\right)e^{-R^2/\beta}. I I I I ≤ 2 C α , β α ( 1 + 2 R β + R ) e − R 2 / β .
To bound term I I I I I_{III} I I I I , we can apply Corollary B.14 , which guarantees that the mapping z ↦ Γ ( ν , z ) z \mapsto\Gamma(\nu,z) z ↦ Γ ( ν , z ) is ( 1 + H c A c V r 2 ) (1+H c_A c_V r^2) ( 1 + H c A c V r 2 ) -Lipschitz for any ν ∈ P ( B r ) \nu\in\mathcal{P}(B_r) ν ∈ P ( B r ) . This implies that
I I I I ≤ ( 1 + H c A c V r 2 ) ∫ ∥ z − z ′ ∥ Π ( d z , d z ′ ) = ( 1 + H c A c V r 2 ) W 1 ( η , η 0 ) . \begin{aligned}
I_{III} \le(1+H c_A c_V r^2)\int\|z-z'\|\Pi(dz,dz') \\
&= (1+H c_A c_V r^2)W_1(\eta,\eta_0).
\end{aligned} I I I I ≤ ( 1 + H c A c V r 2 ) ∫ ∥ z − z ′ ∥Π ( d z , d z ′ ) = ( 1 + H c A c V r 2 ) W 1 ( η , η 0 ) .
To finish the proof, let us assume that r ≥ 1 r \ge1 r ≥ 1 and R ≥ 1 R \ge1 R ≥ 1 ; hence, the estimates 1 / r ≤ 1 1/r \le1 1/ r ≤ 1 and 1 / R ≤ 1 1/R \le1 1/ R ≤ 1 hold. Combining estimates for terms I I I and I I II I I , and applying Young’s inequality as in the proof of Theorem 3.4 , we have
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C ( r R 2 e β 2 α 2 c A 2 R 2 − r 2 / ( 2 β ) + R e − R 2 / β + r R e 4 c A r R W 1 ( μ , μ 0 ) + r 2 W 1 ( η , η 0 ) ) . W_1(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0)
\le C\left(rR^2e^{\beta^2\alpha^2c_A^2R^2-r^2/(2\beta)}+Re^{-R^2/\beta}+rRe^{4c_A rR}W_1(\mu,\mu_0)+r^2W_1(\eta,\eta_0)\right). W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C ( r R 2 e β 2 α 2 c A 2 R 2 − r 2 / ( 2 β ) + R e − R 2 / β + r R e 4 c A r R W 1 ( μ , μ 0 ) + r 2 W 1 ( η , η 0 ) ) .
where C C C denotes a constant which depends only on α \alpha α , β \beta β , H H H , c A c_A c A , c V c_V c V , and c W c_W c W , and which may change from line to line. To finish the proof, we first choose R R R as a suitable function of r r r , and then choose r r r as a suitable function of W 1 ( μ , μ 0 ) W_1(\mu,\mu_0) W 1 ( μ , μ 0 ) . By choosing
R = 1 2 ( β 3 α 2 c A 2 + 1 ) r , R=\sqrt{\frac{1}{2(\beta^3\alpha^2c_A^2+1)}}r, R = 2 ( β 3 α 2 c A 2 + 1 ) 1 r ,
the upper bound on W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) W_1(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0) W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) simplifies to
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C ( r 3 e − r 2 2 β ( β 3 α 2 c A 2 + 1 ) + r 2 e 2 c A 2 β 3 α 2 c A 2 + 1 r 2 W 1 ( μ , μ 0 ) + r 2 W 1 ( η , η 0 ) ) . W_1(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0)
\le C\left(r^3e^{-\frac{r^2}{2\beta(\beta^3\alpha^2c_A^2+1)}}+r^2e^{\sqrt{\frac{2c_A^2}{\beta^3\alpha^2c_A^2+1}}r^2}W_1(\mu,\mu_0)+r^2W_1(\eta,\eta_0)\right). W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ C r 3 e − 2 β ( β 3 α 2 c A 2 + 1 ) r 2 + r 2 e β 3 α 2 c A 2 + 1 2 c A 2 r 2 W 1 ( μ , μ 0 ) + r 2 W 1 ( η , η 0 ) .
up to a change in the value of C C C from line to line. We write
k 1 : = 1 2 β ( β 3 α 2 c A 2 + 1 ) and k 2 : = 2 2 c A 2 β 3 α 2 c A 2 + 1 . (12) k_1:=\frac{1}{2\beta(\beta^3\alpha^2c_A^2+1)}
\qquad\text{and}\qquad
k_2:=2\sqrt{\frac{2c_A^2}{\beta^3\alpha^2c_A^2+1}}. \tag*{(12)} k 1 := 2 β ( β 3 α 2 c A 2 + 1 ) 1 and k 2 := 2 β 3 α 2 c A 2 + 1 2 c A 2 . (12)
for the exponents above. We then set
r = 1 k 1 + k 2 log ( W 1 ( μ , μ 0 ) − 1 ) . r=\sqrt{\frac{1}{k_1+k_2}\log(W_1(\mu,\mu_0)^{-1})}. r = k 1 + k 2 1 log ( W 1 ( μ , μ 0 ) − 1 ) .
Under the assumption that r ≥ 1 r\ge1 r ≥ 1 and R ≥ 1 R\ge1 R ≥ 1 , this leads to a final estimate of the form
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C log ( W 1 ( μ , μ 0 ) − 1 ) 3 / 2 ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) , W_1(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\mu_0,\cdot)_{\#}\mu_0)
\le C\log(W_1(\mu,\mu_0)^{-1})^{3/2}\left(W_1(\mu,\mu_0)^\gamma+W_1(\eta,\eta_0)\right), W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( μ 0 , ⋅ ) # μ 0 ) ≤ C log ( W 1 ( μ , μ 0 ) − 1 ) 3/2 ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) ,
where γ : = k 2 k 1 + k 2 \gamma:=\frac{k_2}{k_1+k_2} γ := k 1 + k 2 k 2 , with k 1 k_1 k 1 and k 2 k_2 k 2 defined in (A.3). Notice that there exists a sufficiently small M = M ( α , β , H , c A , c V ) > 0 M=M(\alpha,\beta,H,c_A,c_V)>0 M = M ( α , β , H , c A , c V ) > 0 such that if W 1 ( μ , μ 0 ) ≤ M W_1(\mu,\mu_0)\le M W 1 ( μ , μ 0 ) ≤ M , then the estimates r ≥ 1 r\ge1 r ≥ 1 and R ≥ 1 R\ge1 R ≥ 1 indeed hold. On the other hand, if W 1 ( μ , μ 0 ) > M W_1(\mu,\mu_0)>M W 1 ( μ , μ 0 ) > M , then Proposition 3.2 implies that
W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ W 1 ( Γ ( μ , ⋅ ) # η , δ 0 ) + W 1 ( δ 0 , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ ∫ ∥ Γ ( μ , x ) ∥ η ( d x ) + ∫ ∥ Γ ( μ 0 , x ) ∥ η 0 ( d x ) \begin{aligned}
W_1(\Gamma(\mu,\cdot)_{\#}\eta,\Gamma(\mu_0,\cdot)_{\#}\eta_0)
\le W_1(\Gamma(\mu,\cdot)_{\#}\eta,\delta_0)+W_1(\delta_0,\Gamma(\mu_0,\cdot)_{\#}\eta_0) \\
&\le\int\|\Gamma(\mu,x)\|\eta(dx)+\int\|\Gamma(\mu_0,x)\|\eta_0(dx)
\end{aligned} W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ W 1 ( Γ ( μ , ⋅ ) # η , δ 0 ) + W 1 ( δ 0 , Γ ( μ 0 , ⋅ ) # η 0 ) ≤ ∫ ∥Γ ( μ , x ) ∥ η ( d x ) + ∫ ∥Γ ( μ 0 , x ) ∥ η 0 ( d x )
≤ 2 C ( α , β , H , c A , c V ) sup ν ∈ S G α , β ( R d ′ ) ∫ ( 1 + ∥ x ∥ ) ν ( d x ) = : C ′ ( α , β , H , c A , c V ) . \le2C(\alpha,\beta,H,c_A,c_V)\sup_{\nu\in\mathcal{S}\mathcal{G}_{\alpha,\beta}(\mathbb{R}^{d'})}\int(1+\|x\|)\,\nu(dx)=:C'(\alpha,\beta,H,c_A,c_V). ≤ 2 C ( α , β , H , c A , c V ) ν ∈ S G α , β ( R d ′ ) sup ∫ ( 1 + ∥ x ∥ ) ν ( d x ) =: C ′ ( α , β , H , c A , c V ) .
It therefore holds that
W 1 ( G ( μ , ⋅ ) # η , G ( μ 0 , ⋅ ) # η 0 ) ≤ C ′ M − γ W 1 ( μ , μ 0 ) γ ≤ C ′ M − γ ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) ≤ C ′ M − γ max ( 1 , log + ( W 1 ( μ , μ 0 ) − 1 ) 3 / 2 ) ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) . \begin{aligned}
W_1(G(\mu,\cdot)_{\#}\eta,G(\mu_0,\cdot)_{\#}\eta_0)
\le C'M^{-\gamma}W_1(\mu,\mu_0)^\gamma\\
&\le C'M^{-\gamma}\left(W_1(\mu,\mu_0)^\gamma+W_1(\eta,\eta_0)\right) \\
&\le C'M^{-\gamma}\max\left(1,\log_+(W_1(\mu,\mu_0)^{-1})^{3/2}\right)\left(W_1(\mu,\mu_0)^\gamma+W_1(\eta,\eta_0)\right).
\end{aligned} W 1 ( G ( μ , ⋅ ) # η , G ( μ 0 , ⋅ ) # η 0 ) ≤ C ′ M − γ W 1 ( μ , μ 0 ) γ ≤ C ′ M − γ ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) ≤ C ′ M − γ max ( 1 , log + ( W 1 ( μ , μ 0 ) − 1 ) 3/2 ) ( W 1 ( μ , μ 0 ) γ + W 1 ( η , η 0 ) ) .
Enlarging constants completes the proof.
Proof of Theorem 3.10. Case 1: μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) and η ∈ S G α , β ( R d ) \eta\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) η ∈ SG α , β ( R d ) : Fix μ ∈ P ( B R ( R d ) ) \mu\in\mathcal{P}(B_R(\mathbb{R}^d)) μ ∈ P ( B R ( R d )) and η ∈ S G α , β ( R d ) \eta\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) η ∈ SG α , β ( R d ) . By the triangle inequality, we have
E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η ) + E W 1 ( Γ ( μ N , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) = : I + I I . \begin{aligned}
\mathbb{E}W_1(\Gamma(\mu,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta_M) \leq\mathbb{E}W_1(\Gamma(\mu,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta) + \mathbb{E}W_1(\Gamma(\mu_N,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta_M) \\
&=: I + II.
\end{aligned} E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η ) + E W 1 ( Γ ( μ N , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) =: I + I I .
To bound term I I I , we introduce an auxiliary parameter r > 0 r > 0 r > 0 and use the estimate
I ≤ E ∫ ∥ Γ ( μ , x ) − Γ ( μ N , x ) ∥ η ( d x ) ≤ E sup ∥ x ∥ ≤ r ∥ Γ ( μ , x ) − Γ ( μ N , x ) ∥ + E ∫ ∥ x ∥ > r ∥ Γ ( μ , x ) − Γ ( μ N , x ) ∥ η ( d x ) = : I I + I I I . \begin{aligned}
I \leq\mathbb{E}\int\|\Gamma(\mu,x)-\Gamma(\mu_N,x)\|\,\eta(dx) \\
&\leq\mathbb{E}\sup_{\|x\|\leq r}\|\Gamma(\mu,x)-\Gamma(\mu_N,x)\|+\mathbb{E}\int_{\|x\|>r}\|\Gamma(\mu,x)-\Gamma(\mu_N,x)\|\,\eta(dx) \\
&=: I_I+I_{II}.
\end{aligned} I ≤ E ∫ ∥Γ ( μ , x ) − Γ ( μ N , x ) ∥ η ( d x ) ≤ E ∥ x ∥ ≤ r sup ∥Γ ( μ , x ) − Γ ( μ N , x ) ∥ + E ∫ ∥ x ∥ > r ∥Γ ( μ , x ) − Γ ( μ N , x ) ∥ η ( d x ) =: I I + I I I .
To bound term I I I_I I I , we apply Corollary B.14, which controls the Lipschitz constant of the mapping μ ↦ Γ ( μ , x ) \mu\mapsto\Gamma(\mu,x) μ ↦ Γ ( μ , x ) for x ∈ B r x \in B_r x ∈ B r and μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) :
I I ≤ H e 4 c A r 2 max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) E W 1 ( μ , μ N ) ≤ H e 4 c A r 2 max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) C d R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d , \begin{aligned}
I_I \leq H e^{4c_A r^2}\max(c_Vc_W(1+c_A rR),c_Ac_Vc_WrR)\mathbb{E}W_1(\mu,\mu_N) \\
&\leq H e^{4c_A r^2}\max(c_Vc_W(1+c_A rR),c_Ac_Vc_WrR)C_dR\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d},
\end{aligned} I I ≤ H e 4 c A r 2 max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) E W 1 ( μ , μ N ) ≤ H e 4 c A r 2 max ( c V c W ( 1 + c A r R ) , c A c V c W r R ) C d R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d ,
where the last line follows from Wasserstein law of large numbers stated in Proposition B.17.
To bound term I I I I_{II} I I I , note that since both μ \mu μ and μ N \mu_N μ N belong to P ( B R ) \mathcal{P}(B_R) P ( B R ) , it holds by Lemma B.4 that there exists an α R ≥ 1 \alpha_R \geq1 α R ≥ 1 and β R > 0 \beta_R > 0 β R > 0 such that μ \mu μ and μ N \mu_N μ N belong to S G α R , β R ( R d ) \mathrm{SG}_{\alpha_R,\beta_R}(\mathbb{R}^d) SG α R , β R ( R d ) . Using Proposition 3.2, it follows that there exists a constant C C C depending on α R \alpha_R α R and β R \beta_R β R such that
I I I ≤ E ∫ ∥ x ∥ > r ( ∥ Γ ( μ , x ) ∥ + ∥ Γ ( μ N , x ) ∥ ) η ( d x ) ≤ C ∫ ∥ x ∥ > r ( 1 + ∥ x ∥ ) η ( d x ) ≤ e − r 2 / β , \begin{aligned}
I_{II} \leq\mathbb{E}\int_{\|x\|>r}\left(\|\Gamma(\mu,x)\|+\|\Gamma(\mu_N,x)\|\right)\eta(dx) \\
&\leq C\int_{\|x\|>r}(1+\|x\|)\eta(dx) \\
&\leq e^{-r^2/\beta},
\end{aligned} I I I ≤ E ∫ ∥ x ∥ > r ( ∥Γ ( μ , x ) ∥ + ∥Γ ( μ N , x ) ∥ ) η ( d x ) ≤ C ∫ ∥ x ∥ > r ( 1 + ∥ x ∥ ) η ( d x ) ≤ e − r 2 / β ,
where the last line follows from Lemma B.11.
For term I I II I I , Corollary B.14 guarantees that the Lipschitz constant of the map Γ ( ν , ⋅ ) \Gamma(\nu,\cdot) Γ ( ν , ⋅ ) is bounded by ( 1 + H c A c V R 2 ) (1+Hc_Ac_VR^2) ( 1 + H c A c V R 2 ) for any ν ∈ P ( B R ) \nu\in\mathcal{P}(B_R) ν ∈ P ( B R ) . It follows from Proposition B.18 that
I I ≤ ( 1 + H c A c V c W R 2 ) E W 1 ( η , η M ) ≤ ( 1 + H c A c V c W R 2 ) C d , α , β log ( M ) ( 1 + log ( 1 + M 1 / d ) ) M − 1 / d \begin{aligned}
II \leq(1+Hc_Ac_Vc_WR^2)\mathbb{E}W_1(\eta,\eta_M) \\
&\leq(1+Hc_Ac_Vc_WR^2)C_{d,\alpha,\beta}\sqrt{\log(M)(1+\log(1+M^{1/d}))}M^{-1/d}
\end{aligned} I I ≤ ( 1 + H c A c V c W R 2 ) E W 1 ( η , η M ) ≤ ( 1 + H c A c V c W R 2 ) C d , α , β log ( M ) ( 1 + log ( 1 + M 1/ d )) M − 1/ d
for all M ∈ N M \in\mathbb{N} M ∈ N . To finish the proof, we set the value of r r r as
r = β d ( 4 c A β + 1 ) log ( N ) , r=\sqrt{\frac{\beta}{d(4c_A\beta+1)}}\log(N), r = d ( 4 c A β + 1 ) β log ( N ) ,
which leads to the estimates
e 4 c A r 2 N − 1 / d = e − r 2 / β = N − 1 d ( 4 c A β + 1 ) . e^{4c_A r^2}N^{-1/d}=e^{-r^2/\beta}=N^{-\frac{1}{d(4c_A\beta+1)}}. e 4 c A r 2 N − 1/ d = e − r 2 / β = N − d ( 4 c A β + 1 ) 1 .
This concludes the proof of the first case.
Case 2: μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) and η ∈ P ( B R ) \eta\in\mathcal{P}(B_R) η ∈ P ( B R ) : Our proof is similar to the proof of results from work of Bohbot et al. [7 ] and involves controlling the covering numbers of certain function classes associated with multi-head attention layers. Fixing μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) and γ ∈ P ( B R ) \gamma\in\mathcal{P}(B_R) γ ∈ P ( B R ) , it holds that
E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η ) + E W 1 ( Γ ( μ N , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) = : I + I I . \begin{aligned}
\mathbb{E}W_1(\Gamma(\mu,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta_M) \leq\mathbb{E}W_1(\Gamma(\mu,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta) + \mathbb{E}W_1(\Gamma(\mu_N,\cdot)\#\eta,\Gamma(\mu_N,\cdot)\#\eta_M) \\
&=: I + II.
\end{aligned} E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) ≤ E W 1 ( Γ ( μ , ⋅ ) # η , Γ ( μ N , ⋅ ) # η ) + E W 1 ( Γ ( μ N , ⋅ ) # η , Γ ( μ N , ⋅ ) # η M ) =: I + I I .
For term I I I , we have the bound
I ≤ E sup x ∈ B R ∥ Γ ( μ , x ) − Γ ( μ N , x ) ∥ ≤ H C W ⋅ max ∥ A ∥ ≤ c A , ∥ V ∥ ≤ c V E sup x ∈ B R ∥ ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ∫ e ⟨ x , A y ⟩ μ ( d y ) − ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ∫ e ⟨ x , A y ⟩ μ N ( d y ) ∥ , \begin{aligned}
I \le\mathbb{E}\sup_{x\in B_R}\|\Gamma(\mu,x)-\Gamma(\mu_N,x)\| \\
&\le H_CW\cdot\max_{\|A\|\le c_A,\|V\|\le c_V}\mathbb{E}\sup_{x\in B_R}\left\|\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu(dy)}{\int e^{\langle x,Ay\rangle}\mu(dy)}-\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu_N(dy)}{\int e^{\langle x,Ay\rangle}\mu_N(dy)}\right\|,
\end{aligned} I ≤ E x ∈ B R sup ∥Γ ( μ , x ) − Γ ( μ N , x ) ∥ ≤ H C W ⋅ ∥ A ∥ ≤ c A , ∥ V ∥ ≤ c V max E x ∈ B R sup ∫ e ⟨ x , A y ⟩ μ ( d y ) ∫ e ⟨ x , A y ⟩ V y μ ( d y ) − ∫ e ⟨ x , A y ⟩ μ N ( d y ) ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ,
where we used the definition of Γ \Gamma Γ as a multi-head attention layer. We further decompose term I I I :
E sup x ∈ B R ∥ ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ∫ e ⟨ x , A y ⟩ μ ( d y ) − ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ∫ e ⟨ x , A y ⟩ μ N ( d y ) ∥ ≤ E sup x ∈ B R ( ∥ ∫ e ⟨ x , A y ⟩ V y ( μ − μ N ) ( d y ) ∫ e ⟨ x , A y ⟩ μ ( d y ) ∥ + ∥ ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ( 1 ∫ e ⟨ x , A y ⟩ μ ( d y ) − 1 ∫ e ⟨ x , A y ⟩ μ N ( d y ) ) ∥ ) ≤ e c A R 2 E sup x ∈ B R ∥ ∫ e ⟨ x , A y ⟩ V y ( μ − μ N ) ( d y ) ∥ + c V R e 3 c A R 2 E sup x ∈ B R ∣ ∫ e ⟨ x , A y ⟩ ( μ − μ N ) ( d y ) ∣ = : I I + I I I . \begin{aligned}
\mathbb{E}\sup_{x\in B_R}\left\|\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu(dy)}{\int e^{\langle x,Ay\rangle}\mu(dy)}-\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu_N(dy)}{\int e^{\langle x,Ay\rangle}\mu_N(dy)}\right\| \\
&\le\mathbb{E}\sup_{x\in B_R}\left(\left\|\frac{\int e^{\langle x,Ay\rangle}Vy(\mu-\mu_N)(dy)}{\int e^{\langle x,Ay\rangle}\mu(dy)}\right\|+\left\|\int e^{\langle x,Ay\rangle}Vy\,\mu_N(dy)\left(\frac{1}{\int e^{\langle x,Ay\rangle}\mu(dy)}-\frac{1}{\int e^{\langle x,Ay\rangle}\mu_N(dy)}\right)\right\|\right) \\
&\le e^{c_AR^2}\mathbb{E}\sup_{x\in B_R}\left\|\int e^{\langle x,Ay\rangle}Vy(\mu-\mu_N)(dy)\right\|+c_VRe^{3c_AR^2}\mathbb{E}\sup_{x\in B_R}\left|\int e^{\langle x,Ay\rangle}(\mu-\mu_N)(dy)\right| \\
&=:I_I+I_{II}.
\end{aligned} E x ∈ B R sup ∫ e ⟨ x , A y ⟩ μ ( d y ) ∫ e ⟨ x , A y ⟩ V y μ ( d y ) − ∫ e ⟨ x , A y ⟩ μ N ( d y ) ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ≤ E x ∈ B R sup ( ∫ e ⟨ x , A y ⟩ μ ( d y ) ∫ e ⟨ x , A y ⟩ V y ( μ − μ N ) ( d y ) + ∫ e ⟨ x , A y ⟩ V y μ N ( d y ) ( ∫ e ⟨ x , A y ⟩ μ ( d y ) 1 − ∫ e ⟨ x , A y ⟩ μ N ( d y ) 1 ) ) ≤ e c A R 2 E x ∈ B R sup ∫ e ⟨ x , A y ⟩ V y ( μ − μ N ) ( d y ) + c V R e 3 c A R 2 E x ∈ B R sup ∫ e ⟨ x , A y ⟩ ( μ − μ N ) ( d y ) =: I I + I I I .
We bound terms I I I_I I I and I I I I_{II} I I I using covering number estimates of appropriate function spaces. In more detail, let us define the function spaces
F 1 , i ( R ) : = { y ↦ e ⟨ x , A y ⟩ ( V y ) i : x ∈ B R } \mathcal{F}_{1,i}(R):=\{y\mapsto e^{\langle x,Ay\rangle}(Vy)_i:x\in B_R\} F 1 , i ( R ) := { y ↦ e ⟨ x , A y ⟩ ( V y ) i : x ∈ B R }
and
F 2 ( R ) : = { y ↦ e ⟨ x , A y ⟩ : x ∈ B R } . \mathcal{F}_2(R):=\{y\mapsto e^{\langle x,Ay\rangle}:x\in B_R\}. F 2 ( R ) := { y ↦ e ⟨ x , A y ⟩ : x ∈ B R } .
Then by Dudley’s chaining estimate, there exists a universal constant C > 0 C>0 C > 0 such that
I I ≤ C e c A R 2 d N max i ∈ [ d ] ∫ 0 c V R e c A R 2 log ( N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) d ϵ I_I\le\frac{Ce^{c_AR^2}\sqrt{d}}{\sqrt{N}}\max_{i\in[d]}\int_0^{c_VRe^{c_AR^2}}\sqrt{\log\left(\mathcal{N}(\mathcal{F}_{1,i}(R);\epsilon,\|\cdot\|_{L^\infty(B_R)})\right)}\,d\epsilon I I ≤ N C e c A R 2 d i ∈ [ d ] max ∫ 0 c V R e c A R 2 log ( N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) d ϵ
and
I I I ≤ c V R e 3 c A R 2 N ∫ 0 e c A R 2 log ( N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) d ϵ . I_{II}\le\frac{c_VRe^{3c_AR^2}}{\sqrt{N}}\int_0^{e^{c_AR^2}}\sqrt{\log\left(\mathcal{N}(\mathcal{F}_2(R);\epsilon,\|\cdot\|_{L^\infty(B_R)})\right)}\,d\epsilon. I I I ≤ N c V R e 3 c A R 2 ∫ 0 e c A R 2 log ( N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) d ϵ .
Lemma B.20 bounds the covering numbers of the functions classes F 1 , i ( R ) \mathcal{F}_{1,i}(R) F 1 , i ( R ) and F 2 ( R ) \mathcal{F}_2(R) F 2 ( R ) . Plugging these covering number bounds into the estimates on I I I_I I I and I I I I_{II} I I I , we deduce that
I I ≤ C e c A R 2 d N ∫ 0 c V R e c A R 2 log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) d ϵ = 2 C c A c V R 3 e 2 c A R 2 d N ∫ 0 1 2 c A − 1 R − 2 log ( 1 + x − 1 ) d x ≤ C 8 c A − 1 c V R 2 e 2 c A R 2 d N , \begin{aligned}
I_I\le\frac{Ce^{c_AR^2}d}{\sqrt{N}}\int_0^{c_VRe^{c_AR^2}}\sqrt{\log(1+2c_Ac_VR^3e^{c_AR^2}\epsilon^{-1})}\,d\epsilon\\
&=\frac{2Cc_Ac_VR^3e^{2c_AR^2}d}{\sqrt{N}}\int_0^{\frac{1}{2}c_A^{-1}R^{-2}}\sqrt{\log(1+x^{-1})}\,dx \\
&\le\frac{C\sqrt{8c_A^{-1}}c_VR^2e^{2c_AR^2}d}{\sqrt{N}},
\end{aligned} I I ≤ N C e c A R 2 d ∫ 0 c V R e c A R 2 log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) d ϵ = N 2 C c A c V R 3 e 2 c A R 2 d ∫ 0 2 1 c A − 1 R − 2 log ( 1 + x − 1 ) d x ≤ N C 8 c A − 1 c V R 2 e 2 c A R 2 d ,
where we used Lemma B.21 in the final line to bound the logarithmic integral. Similarly,
I I I ≤ C c V R e 3 c A R 2 d 1 / 2 N ∫ 0 e c A R 2 log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) d ϵ = 2 C c V c A R 3 e 4 c A R 2 d 1 / 2 N ∫ 0 1 2 R − 2 log ( 1 + x − 1 ) d x ≤ C 8 c V e 4 c A R 2 d 1 / 2 N . \begin{aligned}
I_{II}\le\frac{Cc_VRe^{3c_AR^2}d^{1/2}}{\sqrt{N}}\int_0^{e^{c_AR^2}}\sqrt{\log(1+2c_AR^2e^{c_AR^2}\epsilon^{-1})}\,d\epsilon\\
&=\frac{2Cc_Vc_AR^3e^{4c_AR^2}d^{1/2}}{\sqrt{N}}\int_0^{\frac{1}{2}R^{-2}}\sqrt{\log(1+x^{-1})}\,dx \\
&\le\frac{C\sqrt{8c_V}e^{4c_AR^2}d^{1/2}}{\sqrt{N}}.
\end{aligned} I I I ≤ N C c V R e 3 c A R 2 d 1/2 ∫ 0 e c A R 2 log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) d ϵ = N 2 C c V c A R 3 e 4 c A R 2 d 1/2 ∫ 0 2 1 R − 2 log ( 1 + x − 1 ) d x ≤ N C 8 c V e 4 c A R 2 d 1/2 .
Combining the estimates for I I I_I I I and I I I I_{II} I I I , we obtain
I ≤ 4 C H c V c W max ( c A 1 / 2 R 2 e 2 c A R 2 , e 4 c A R 2 d 1 / 2 ) N − 1 / 2 . I \le4CH_{c_V}c_W\max\left(c_A^{1/2}R^2e^{2c_AR^2},e^{4c_AR^2}d^{1/2}\right)N^{-1/2}. I ≤ 4 C H c V c W max ( c A 1/2 R 2 e 2 c A R 2 , e 4 c A R 2 d 1/2 ) N − 1/2 .
To bound term I I II I I , Corollary B.14 ensures that the Lipschitz constant of the mapping x ↦ Γ ( μ N , x ) x\mapsto\Gamma(\mu_N,x) x ↦ Γ ( μ N , x ) is at most 1 + H c A c V c W R 2 1+H_{c_A}c_Vc_WR^2 1 + H c A c V c W R 2 with probability 1. Therefore,
I I ≤ ( 1 + H c A c V c W R 2 ) E W 1 ( η , η M ) ≤ ( 1 + H c A c V c W R 2 ) C d R ( 1 + log ( 1 + M 1 / d ) ) M − 1 / d . \begin{aligned}
II\leq(1+H_{c_A}c_Vc_WR^2)\mathbb{E}W_1(\eta,\eta_M) \\
&\leq(1+H_{c_A}c_Vc_WR^2)C_dR\left(1+\sqrt{\log(1+M^{1/d})}\right)M^{-1/d}.
\end{aligned} I I ≤ ( 1 + H c A c V c W R 2 ) E W 1 ( η , η M ) ≤ ( 1 + H c A c V c W R 2 ) C d R ( 1 + log ( 1 + M 1/ d ) ) M − 1/ d .
where the last line follows from an application of Proposition B.17.
Proof of Theorem 3.11
Proof. Given ϵ > 0 \epsilon>0 ϵ > 0 , Theorem 4.4 due to Furuya et al. [25 ] ensures the existence of a transformer T ϵ T_\epsilon T ϵ such that
sup μ ∈ K W 1 ( T ϵ ( μ , ⋅ ) # μ , F ( μ ) ) ≤ ϵ / 2. \sup_{\mu\in K}W_1(T_\epsilon(\mu,\cdot)_{\#}\mu,F(\mu))\leq\epsilon/2. μ ∈ K sup W 1 ( T ϵ ( μ , ⋅ ) # μ , F ( μ )) ≤ ϵ /2.
Then, by the triangle inequality, we have
sup μ ∈ K E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ ) ) ≤ sup μ ∈ K E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , T ϵ ( μ , ⋅ ) # μ ) + sup μ ∈ K W 1 ( T ϵ ( μ , ⋅ ) # μ , F ( μ ) ) ≤ sup μ ∈ K E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , T ϵ ( μ , ⋅ ) # μ ) + ϵ / 2 ≤ C ϵ log ( N ) γ ϵ / 2 ( 1 + log ( 1 + N 1 / d ) ) γ ϵ / 2 N − γ ϵ / d + ϵ / 2 , \begin{aligned}
\sup_{\mu\in K}\mathbb{E}W_1(T_\epsilon(\mu_N,\cdot)_{\#}\mu_N,F(\mu))
\leq\sup_{\mu\in K}\mathbb{E}W_1(T_\epsilon(\mu_N,\cdot)_{\#}\mu_N,T_\epsilon(\mu,\cdot)_{\#}\mu)+\sup_{\mu\in K}W_1(T_\epsilon(\mu,\cdot)_{\#}\mu,F(\mu)) \\
&\leq\sup_{\mu\in K}\mathbb{E}W_1(T_\epsilon(\mu_N,\cdot)_{\#}\mu_N,T_\epsilon(\mu,\cdot)_{\#}\mu)+\epsilon/2 \\
&\leq C_\epsilon\log(N)^{\gamma_\epsilon/2}\left(1+\log(1+N^{1/d})\right)^{\gamma_\epsilon/2}N^{-\gamma_\epsilon/d}+\epsilon/2,
\end{aligned} μ ∈ K sup E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , F ( μ )) ≤ μ ∈ K sup E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , T ϵ ( μ , ⋅ ) # μ ) + μ ∈ K sup W 1 ( T ϵ ( μ , ⋅ ) # μ , F ( μ )) ≤ μ ∈ K sup E W 1 ( T ϵ ( μ N , ⋅ ) # μ N , T ϵ ( μ , ⋅ ) # μ ) + ϵ /2 ≤ C ϵ log ( N ) γ ϵ /2 ( 1 + log ( 1 + N 1/ d ) ) γ ϵ /2 N − γ ϵ / d + ϵ /2 ,
where the last inequality follows from an application of Theorem 3.7 . We conclude the proof.
Auxiliary Lemmas
This appendix contains auxiliary lemmas that support the proofs of the main results.
Properties of Sub-Gaussian Measures
We record some useful properties of sub-Gaussian measures. We begin with the following result which characterizes the compactness and uniform integrability properties of the sets { S G α , β ( R d ) } α ≥ 1 , β > 0 \{\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)\}_{\alpha\geq1,\beta>0} { SG α , β ( R d ) } α ≥ 1 , β > 0 .
Lemma B.1. For any α ≥ 1 \alpha\geq1 α ≥ 1 and β > 0 \beta>0 β > 0 , the set S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) is W 1 W_1 W 1 -compact. Moreover, for any p > 0 p>0 p > 0 , it holds that
sup μ ∈ S G α , β ( R d ) ∫ R d ∥ x ∥ p μ ( d x ) < ∞ and sup μ ∈ S G α , β ∫ R d e β ∥ x ∥ μ ( d x ) < ∞ . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int_{\mathbb{R}^d}\lVert x\rVert^p\mu(dx)<\infty
\quad\text{and}\quad
\sup_{\mu\in\mathrm{SG}_{\alpha,\beta}}\int_{\mathbb{R}^d}e^{\beta\lVert x\rVert}\mu(dx)<\infty. μ ∈ SG α , β ( R d ) sup ∫ R d ∥ x ∥ p μ ( d x ) < ∞ and μ ∈ SG α , β sup ∫ R d e β ∥ x ∥ μ ( d x ) < ∞.
Proof. We first prove the second assertion. For any μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , we have by Fubini’s theorem that
∫ ∥ x ∥ p μ ( d x ) = ∫ 0 ∞ μ ( ∥ x ∥ p > t ) d t = ∫ 0 ∞ μ ( ∥ x ∥ > t 1 / p ) d t ≤ α ∫ 0 ∞ exp ( − t 2 / p β ) d t . \begin{aligned}
\int\lVert x\rVert^p\mu(dx)=\int_0^\infty\mu(\lVert x\rVert^p>t)\,dt \\
&=\int_0^\infty\mu(\lVert x\rVert>t^{1/p})\,dt \\
&\leq\alpha\int_0^\infty\exp\left(-\frac{t^{2/p}}{\beta}\right)\,dt.
\end{aligned} ∫ ∥ x ∥ p μ ( d x ) = ∫ 0 ∞ μ (∥ x ∥ p > t ) d t = ∫ 0 ∞ μ (∥ x ∥ > t 1/ p ) d t ≤ α ∫ 0 ∞ exp ( − β t 2/ p ) d t .
This upper bounds ∫ ∥ x ∥ p μ ( d x ) \int\lVert x\rVert^p\mu(dx) ∫ ∥ x ∥ p μ ( d x ) by a convergent integral which only depends on μ \mu μ through its sub-Gaussian parameters. The proof of the exponential moment bounds is essentially the same.
For the first assertion, we use the characterization due to Villani [59 ] that a sequence of measures { μ n } n ≥ 1 \{\mu_n\}_{n \ge1} { μ n } n ≥ 1 converges to a measure μ \mu μ in W 1 \mathcal{W}_1 W 1 if and only if μ n → μ \mu_n \to\mu μ n → μ and ∫ ∥ x ∥ μ n ( d x ) → ∫ ∥ x ∥ μ ( d x ) \int\lVert x\rVert\,\mu_n(dx) \to\int\lVert x\rVert\,\mu(dx) ∫ ∥ x ∥ μ n ( d x ) → ∫ ∥ x ∥ μ ( d x ) . Let { μ n } n ≥ 1 \{\mu_n\}_{n \ge1} { μ n } n ≥ 1 be a sequence in S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) . Then clearly { μ n } n ≥ 1 \{\mu_n\}_{n \ge1} { μ n } n ≥ 1 is tight, so by Prokhorov’s theorem (after passing to a subsequence), { μ n } n ≥ 1 \{\mu_n\}_{n \ge1} { μ n } n ≥ 1 has a weak limit μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^d) μ ∈ P ( R d ) . To prove that μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , let B R ⊂ R d B_R \subset\mathbb{R}^d B R ⊂ R d denote the closed ball of radius R R R centered at zero. Then, since μ n → μ \mu_n \to\mu μ n → μ , we have by the Portmanteau Theorem that
1 − α exp ( − R 2 β ) ≤ lim sup n → ∞ ∫ B R μ n ( d x ) ≤ ∫ B R μ ( d x ) . 1-\alpha\exp\left(-\frac{R^2}{\beta}\right)\le\limsup_{n\to\infty}\int_{B_R}\mu_n(dx)\le\int_{B_R}\mu(dx). 1 − α exp ( − β R 2 ) ≤ n → ∞ lim sup ∫ B R μ n ( d x ) ≤ ∫ B R μ ( d x ) .
and therefore
∫ ∥ x ∥ > R μ ( d x ) ≤ α exp ( − R 2 β ) , \int_{\lVert x\rVert>R}\mu(dx)\le\alpha\exp\left(-\frac{R^2}{\beta}\right), ∫ ∥ x ∥ > R μ ( d x ) ≤ α exp ( − β R 2 ) ,
which proves that μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) . Last, to prove that the first moments of { μ n } n ≥ 1 \{\mu_n\}_{n\ge1} { μ n } n ≥ 1 converge to the first moment of μ \mu μ , define the functions f R ( x ) = min ( ∥ x ∥ , R ) f_R(x)=\min(\lVert x\rVert,R) f R ( x ) = min (∥ x ∥ , R ) . Then we have
∣ ∫ ∥ x ∥ μ n ( d x ) − ∫ ∥ x ∥ μ ( d x ) ∣ ≤ ∣ ∫ f R ( x ) μ n ( d x ) − ∫ f R ( x ) μ ( d x ) ∣ + ∣ ∫ ∥ x ∥ > R ( ∥ x ∥ − R ) μ n ( d x ) − ∫ ∥ x ∥ > R ( ∥ x ∥ − R ) μ ( d x ) ∣ = : I + I I . \begin{aligned}
\left|\int\lVert x\rVert\,\mu_n(dx)-\int\lVert x\rVert\,\mu(dx)\right|
&\le\left|\int f_R(x)\,\mu_n(dx)-\int f_R(x)\,\mu(dx)\right| \\
&\quad+\left|\int_{\lVert x\rVert>R}(\lVert x\rVert-R)\,\mu_n(dx)-\int_{\lVert x\rVert>R}(\lVert x\rVert-R)\,\mu(dx)\right| \\
&=: I+II.
\end{aligned} ∫ ∥ x ∥ μ n ( d x ) − ∫ ∥ x ∥ μ ( d x ) ≤ ∫ f R ( x ) μ n ( d x ) − ∫ f R ( x ) μ ( d x ) + ∫ ∥ x ∥ > R (∥ x ∥ − R ) μ n ( d x ) − ∫ ∥ x ∥ > R (∥ x ∥ − R ) μ ( d x ) =: I + I I .
Since both the sequence elements { μ n } n ≥ 1 \{\mu_n\}_{n\ge1} { μ n } n ≥ 1 and the weak limit μ \mu μ belong to S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) , the second term can be bounded by Fubini’s theorem:
I I ≤ 2 sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ > R ( ∥ x ∥ − R ) ν ( d x ) ≤ 2 sup ν ∈ S G α , β ( R d ) ∫ R ∞ ν ( ∥ x ∥ > t ) d t ≤ 2 α ∫ R ∞ exp ( − t 2 β ) d t = O ( exp ( − Ω ( R 2 ) ) ) . \begin{aligned}
II&\le2\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int_{\lVert x\rVert>R}(\lVert x\rVert-R)\,\nu(dx)\\
&\le2\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int_R^\infty\nu(\lVert x\rVert>t)\,dt\\
&\le2\alpha\int_R^\infty\exp\left(-\frac{t^2}{\beta}\right)\,dt\\
&=O\left(\exp\left(-\Omega(R^2)\right)\right).
\end{aligned} I I ≤ 2 ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ > R (∥ x ∥ − R ) ν ( d x ) ≤ 2 ν ∈ SG α , β ( R d ) sup ∫ R ∞ ν (∥ x ∥ > t ) d t ≤ 2 α ∫ R ∞ exp ( − β t 2 ) d t = O ( exp ( − Ω ( R 2 ) ) ) .
Given ϵ > 0 \epsilon>0 ϵ > 0 , we may choose R ϵ > 0 R_\epsilon>0 R ϵ > 0 large enough that the above expression is no larger than ϵ / 2 \epsilon/2 ϵ /2 , and hence
∣ ∫ ∥ x ∥ μ n ( d x ) − ∫ ∥ x ∥ μ ( d x ) ∣ ≤ ∣ ∫ f R ϵ ( x ) μ n ( d x ) − ∫ f R ϵ ( x ) μ ( d x ) ∣ + ϵ / 2. \left|\int\lVert x\rVert\,\mu_n(dx)-\int\lVert x\rVert\,\mu(dx)\right|\le\left|\int f_{R_\epsilon}(x)\,\mu_n(dx)-\int f_{R_\epsilon}(x)\,\mu(dx)\right|+\epsilon/2. ∫ ∥ x ∥ μ n ( d x ) − ∫ ∥ x ∥ μ ( d x ) ≤ ∫ f R ϵ ( x ) μ n ( d x ) − ∫ f R ϵ ( x ) μ ( d x ) + ϵ /2.
Since f R ϵ f_{R_\epsilon} f R ϵ is bounded and continuous and μ n → μ \mu_n\to\mu μ n → μ , we can choose n ϵ ∈ N n_\epsilon\in\mathbb{N} n ϵ ∈ N depending on R ϵ R_\epsilon R ϵ such that
∣ ∫ f R ϵ ( x ) μ n ( d x ) − ∫ f R ϵ ( x ) μ ( d x ) ∣ < ϵ / 2 for all n ≥ n ϵ . \left|\int f_{R_\epsilon}(x)\,\mu_n(dx)-\int f_{R_\epsilon}(x)\,\mu(dx)\right|<\epsilon/2\quad\text{for all }n\ge n_\epsilon. ∫ f R ϵ ( x ) μ n ( d x ) − ∫ f R ϵ ( x ) μ ( d x ) < ϵ /2 for all n ≥ n ϵ .
This ensures that the first moment of μ n \mu_n μ n is within ϵ \epsilon ϵ of the first moment of μ \mu μ for all n ≥ n ϵ n\ge n_\epsilon n ≥ n ϵ . □
Another important property, which plays a crucial role in the results of Section 3.1, is that the set S G ( R d ) \mathrm{SG}(\mathbb{R}^d) SG ( R d ) is closed under certain pushforwards.
Lemma B.2. Fix α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta>0 β > 0 . If μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) and T : R d → R k T:\mathbb{R}^d\to\mathbb{R}^k T : R d → R k satisfies ∥ T ( x ) ∥ ≤ a + b ∥ x ∥ \lVert T(x)\rVert\le a+b\lVert x\rVert ∥ T ( x )∥ ≤ a + b ∥ x ∥ for positive constants a a a and b b b , then T # μ ∈ S G α ~ , β ~ ( R k ) T_{\#}\mu\in\mathrm{SG}_{\widetilde{\alpha},\widetilde{\beta}}(\mathbb{R}^k) T # μ ∈ SG α , β ( R k ) , where α ~ = α e a 2 / ( b 2 β ) \widetilde{\alpha}=\alpha e^{a^2/(b^2\beta)} α = α e a 2 / ( b 2 β ) and β ~ = 2 b 2 β \widetilde{\beta}=2b^2\beta β = 2 b 2 β .
Proof. By our assumptions, we have { ∥ T ( x ) ∥ > R } ⊆ { ∥ x ∥ > ( R − a ) / b } \{\|T(x)\| > R\} \subseteq\{\|x\| > (R-a)/b\} { ∥ T ( x ) ∥ > R } ⊆ { ∥ x ∥ > ( R − a ) / b } . Then
∫ ∥ x ∥ > R ( T # μ ) ( d x ) = ∫ ∥ T ( x ) ∥ > R μ ( d x ) ≤ ∫ ∥ x ∥ > ( R − a ) / b μ ( d x ) ≤ α exp ( − ( R − a ) 2 b 2 β ) = α exp ( − a 2 b 2 β ) exp ( − R 2 + 2 a R b 2 β ) ≤ α exp ( − a 2 b 2 β ) exp ( − ( 1 / 2 ) R 2 + 2 a 2 b 2 β ) = C ~ 1 exp ( − R 2 C ~ 2 ) , \begin{aligned}
\int_{\|x\|>R} (T_{\#}\mu)(\mathrm{d}x)
&= \int_{\|T(x)\|>R} \mu(\mathrm{d}x) \\
&\le\int_{\|x\|>(R-a)/b} \mu(\mathrm{d}x) \\
&\le\alpha\exp\left(-\frac{(R-a)^2}{b^2\beta}\right) \\
&= \alpha\exp\left(-\frac{a^2}{b^2\beta}\right)\exp\left(-\frac{R^2+2aR}{b^2\beta}\right) \\
&\le\alpha\exp\left(-\frac{a^2}{b^2\beta}\right)\exp\left(-\frac{(1/2)R^2+2a^2}{b^2\beta}\right) \\
&= \widetilde{C}_1\exp\left(-\frac{R^2}{\widetilde{C}_2}\right),
\end{aligned} ∫ ∥ x ∥ > R ( T # μ ) ( d x ) = ∫ ∥ T ( x ) ∥ > R μ ( d x ) ≤ ∫ ∥ x ∥ > ( R − a ) / b μ ( d x ) ≤ α exp ( − b 2 β ( R − a ) 2 ) = α exp ( − b 2 β a 2 ) exp ( − b 2 β R 2 + 2 a R ) ≤ α exp ( − b 2 β a 2 ) exp ( − b 2 β ( 1/2 ) R 2 + 2 a 2 ) = C 1 exp ( − C 2 R 2 ) ,
where the final inequality is an application of Young’s inequality.
The following result characterizes sub-Gaussian sets in terms of Gaussian moment bounds.
Lemma B.3. Let α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta> 0 β > 0 . Let μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^d) μ ∈ P ( R d ) .
If ∫ R d exp ( ∥ x ∥ 2 β ) μ ( d x ) ≤ α \int_{\mathbb{R}^d}\exp\left(\frac{\|x\|^2}{\beta}\right)\mu(\mathrm{d}x) \le\alpha ∫ R d exp ( β ∥ x ∥ 2 ) μ ( d x ) ≤ α , then μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) .
Conversely, if μ ∈ S G α , β \mu\in\mathrm{SG}_{\alpha,\beta} μ ∈ SG α , β , then
∫ R d exp ( ∥ x ∥ 2 M ) μ ( d x ) ≤ 1 + α β M − β for all M > β . \int_{\mathbb{R}^d}\exp\left(\frac{\|x\|^2}{M}\right)\mu(\mathrm{d}x) \le1+\frac{\alpha\beta}{M-\beta}\quad\text{for all }M>\beta. ∫ R d exp ( M ∥ x ∥ 2 ) μ ( d x ) ≤ 1 + M − β α β for all M > β . Proof. The first assertion follows from the standard technique of applying Markov’s inequality to the exponential moment:
μ ( { ∥ x ∥ > R } ) = μ ( exp ( ∥ x ∥ 2 β ) > exp ( R 2 β ) ) ≤ ( ∫ exp ( ∥ x ∥ 2 β ) μ ( d x ) ) exp ( − R 2 β ) ≤ α exp ( − R 2 β ) . \begin{aligned}
\mu(\{\|x\|>R\})
&= \mu\left(\exp\left(\frac{\|x\|^2}{\beta}\right)>\exp\left(\frac{R^2}{\beta}\right)\right) \\
&\le\left(\int\exp\left(\frac{\|x\|^2}{\beta}\right)\mu(\mathrm{d}x)\right)\exp\left(-\frac{R^2}{\beta}\right) \\
&\le\alpha\exp\left(-\frac{R^2}{\beta}\right).
\end{aligned} μ ({ ∥ x ∥ > R }) = μ ( exp ( β ∥ x ∥ 2 ) > exp ( β R 2 ) ) ≤ ( ∫ exp ( β ∥ x ∥ 2 ) μ ( d x ) ) exp ( − β R 2 ) ≤ α exp ( − β R 2 ) . For the second assertion, by the layer cake formula with derivatives, we have
∫ exp ( ∥ x ∥ 2 M ) μ ( d x ) = 1 + 2 M ∫ 0 ∞ t exp ( t 2 M ) μ ( { ∥ x ∥ > t } ) d t ≤ 1 + 2 α M ∫ 0 ∞ t exp ( − ( β − 1 − M − 1 ) t 2 ) d t = 1 + α M ( β − 1 − M − 1 ) ∫ 0 ∞ e − t d t = 1 + α M ( β − 1 − M − 1 ) = 1 + α β M − β . \begin{aligned}
\int\exp\left(\frac{\|x\|^2}{M}\right)\mu(\mathrm{d}x)
&= 1+\frac{2}{M}\int_0^\infty t\exp\left(\frac{t^2}{M}\right)\mu(\{\|x\|>t\})\mathrm{d}t \\
&\le1+\frac{2\alpha}{M}\int_0^\infty t\exp\left(-(\beta^{-1}-M^{-1})t^2\right)\mathrm{d}t \\
&= 1+\frac{\alpha}{M(\beta^{-1}-M^{-1})}\int_0^\infty e^{-t}\mathrm{d}t \\
&= 1+\frac{\alpha}{M(\beta^{-1}-M^{-1})} \\
&= 1+\frac{\alpha\beta}{M-\beta}.
\end{aligned} ∫ exp ( M ∥ x ∥ 2 ) μ ( d x ) = 1 + M 2 ∫ 0 ∞ t exp ( M t 2 ) μ ({ ∥ x ∥ > t }) d t ≤ 1 + M 2 α ∫ 0 ∞ t exp ( − ( β − 1 − M − 1 ) t 2 ) d t = 1 + M ( β − 1 − M − 1 ) α ∫ 0 ∞ e − t d t = 1 + M ( β − 1 − M − 1 ) α = 1 + M − β α β . The proof is complete.
The following result shows that P ( B R ( R d ) ) \mathcal{P}(B_R(\mathbb{R}^d)) P ( B R ( R d )) is contained in S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) for appropriate choices of α \alpha α and β \beta β .
Lemma B.4. Fix R > 0 R > 0 R > 0 . For any β > 0 \beta> 0 β > 0 , it holds that
P ( B R ( R d ) ) ⊂ S G e R 2 / β , β ( R d ) . \mathcal{P}(B_R(\mathbb{R}^d)) \subset\mathrm{SG}_{e^{R^2/\beta},\beta}(\mathbb{R}^d). P ( B R ( R d )) ⊂ SG e R 2 / β , β ( R d ) . Proof. Since
sup μ ∈ P ( B R ) ∫ exp ( ∥ x ∥ 2 β ) μ ( d x ) ≤ e R 2 / β , \sup_{\mu\in\mathcal{P}(B_R)} \int\exp\left(\frac{\lVert x\rVert^2}{\beta}\right) \mu(\mathrm{d}x) \le e^{R^2/\beta}, μ ∈ P ( B R ) sup ∫ exp ( β ∥ x ∥ 2 ) μ ( d x ) ≤ e R 2 / β , the result follows from Lemma B.3.
The following standard lemma controls the expected maximum of sub-Gaussians.
Lemma B.5. Fix α ≥ 1 \alpha\ge1 α ≥ 1 and β > 0 \beta> 0 β > 0 . There exists a constant C α , β > 0 C_{\alpha,\beta} > 0 C α , β > 0 such that
sup μ ∈ S G α , β ( R d ) E ( x 1 , … , x N ) ∼ μ ⊗ N [ max n ∈ [ N ] ∥ x n ∥ 2 ] ≤ C α , β ( 1 + log ( N ) ) . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)} \mathbb{E}_{(x_1,\ldots,x_N)\sim\mu^{\otimes N}}\left[\max_{n\in[N]} \lVert x_n\rVert^2\right] \le C_{\alpha,\beta}(1+\log(N)). μ ∈ SG α , β ( R d ) sup E ( x 1 , … , x N ) ∼ μ ⊗ N [ n ∈ [ N ] max ∥ x n ∥ 2 ] ≤ C α , β ( 1 + log ( N )) . Proof. By Lemma B.3, if μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , then
∫ exp ( ∥ x ∥ 2 2 β ) μ ( d x ) ≤ 1 + α . \int\exp\left(\frac{\lVert x\rVert^2}{2\beta}\right) \mu(\mathrm{d}x) \le1+\alpha. ∫ exp ( 2 β ∥ x ∥ 2 ) μ ( d x ) ≤ 1 + α . For μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , we then estimate
E [ max i ∈ [ N ] ∥ x i ∥ 2 ] ≤ 2 β log E [ max i ∈ [ N ] e ∥ x i ∥ 2 / ( 2 β ) ] ≤ 2 β log E [ ∑ i = 1 N e ∥ x i ∥ 2 / ( 2 β ) ] ≤ 2 β ( log ( N ) + log ( 1 + α ) ) ≤ C α , β ( 1 + log ( N ) ) . \begin{aligned}
\mathbb{E}\left[\max_{i\in[N]}\lVert x_i\rVert^2\right]
&\le2\beta\log\mathbb{E}\left[\max_{i\in[N]}e^{\lVert x_i\rVert^2/(2\beta)}\right] \\
&\le2\beta\log\mathbb{E}\left[\sum_{i=1}^{N}e^{\lVert x_i\rVert^2/(2\beta)}\right] \\
&\le2\beta(\log(N)+\log(1+\alpha)) \\
&\le C_{\alpha,\beta}(1+\log(N)).
\end{aligned} E [ i ∈ [ N ] max ∥ x i ∥ 2 ] ≤ 2 β log E [ i ∈ [ N ] max e ∥ x i ∥ 2 / ( 2 β ) ] ≤ 2 β log E [ i = 1 ∑ N e ∥ x i ∥ 2 / ( 2 β ) ] ≤ 2 β ( log ( N ) + log ( 1 + α )) ≤ C α , β ( 1 + log ( N )) . The proof is complete.
The following technical lemma controls the difference in Gaussian moments between μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) and its normalized restriction to a ball of radius R R R .
Lemma B.6. Let μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) and R > β log ( α ) R > \sqrt{\beta\log(\alpha)} R > β log ( α ) . Let μ R \mu_R μ R denote the conditional distribution of μ \mu μ given ∥ x ∥ ≤ R \lVert x\rVert\le R ∥ x ∥ ≤ R . Then, for any k ≥ 2 k \ge2 k ≥ 2 , it holds that
∣ ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ e ∥ x ∥ 2 / ( k β ) μ R ( d x ) ∣ ≤ α ( 1 + 2 k 2 β 2 ) e − R 2 / ( k β ) + ( 1 + α k − 1 ) e − R 2 / β 1 − α e − R 2 / β . \left|\int e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x)-\int e^{\lVert x\rVert^2/(k\beta)}\mu_R(\mathrm{d}x)\right|
\le\alpha\frac{\left(1+\frac{2}{k^2\beta^2}\right)e^{-R^2/(k\beta)}+\left(1+\frac{\alpha}{k-1}\right)e^{-R^2/\beta}}{1-\alpha e^{-R^2/\beta}}. ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ e ∥ x ∥ 2 / ( k β ) μ R ( d x ) ≤ α 1 − α e − R 2 / β ( 1 + k 2 β 2 2 ) e − R 2 / ( k β ) + ( 1 + k − 1 α ) e − R 2 / β . Proof. We have
∣ ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ e ∥ x ∥ 2 / ( k β ) μ R ( d x ) ∣ = ∣ ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ ∥ x ∥ ≤ R e ∥ x ∥ 2 / ( k β ) μ ( d x ) ∫ ∥ x ∥ ≤ R μ ( d x ) ∣ \left|\int e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x)-\int e^{\lVert x\rVert^2/(k\beta)}\mu_R(\mathrm{d}x)\right|
=
\left|\int e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x)
-\frac{\int_{\lVert x\rVert\le R}e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x)}
{\int_{\lVert x\rVert\le R}\mu(\mathrm{d}x)}\right| ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ e ∥ x ∥ 2 / ( k β ) μ R ( d x ) = ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) − ∫ ∥ x ∥ ≤ R μ ( d x ) ∫ ∥ x ∥ ≤ R e ∥ x ∥ 2 / ( k β ) μ ( d x ) ≤ ∣ ∫ ∥ x ∥ > R e ∥ x ∥ 2 / ( k β ) μ ( d x ) ∫ ∥ x ∥ ≤ R μ ( d x ) ∣ + ∣ 1 − 1 ∫ ∥ x ∥ ≤ R μ ( d x ) ∣ ⋅ ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) \le
\left|\frac{\int_{\lVert x\rVert>R}e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x)}
{\int_{\lVert x\rVert\le R}\mu(\mathrm{d}x)}\right|
+
\left|1-\frac{1}{\int_{\lVert x\rVert\le R}\mu(\mathrm{d}x)}\right|
\cdot\int e^{\lVert x\rVert^2/(k\beta)}\mu(\mathrm{d}x) ≤ ∫ ∥ x ∥ ≤ R μ ( d x ) ∫ ∥ x ∥ > R e ∥ x ∥ 2 / ( k β ) μ ( d x ) + 1 − ∫ ∥ x ∥ ≤ R μ ( d x ) 1 ⋅ ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) = : I + I I . (13) =: I+II. \tag*{(13)} =: I + I I . (13)
For term I I I , we upper bound the numerator and lower bound the denominator. For the numerator, we use the layer cake formula with derivative:
∫ ∥ x ∥ > R e ∥ x ∥ 2 / ( k β ) μ ( d x ) = e R 2 / ( k β ) μ ( ∥ x ∥ > R ) + 2 k β ∫ R ∞ t e t 2 / ( k β ) μ ( ∥ x ∥ > t ) d t ≤ α e − ( k − 1 ) R 2 k β + 2 α k β ∫ R ∞ t e − t 2 / ( k β ) d t = α e − ( k − 1 ) R 2 k β + α k β ∫ R 2 ∞ e − t / ( k β ) d t = α e − ( k − 1 ) R 2 k β + 2 α k 2 β 2 e − R 2 / ( k β ) = α ( 1 + 2 k 2 β 2 ) e − R 2 / ( k β ) , \begin{aligned}
\int_{\lVert x\rVert>R} e^{\lVert x\rVert^2/(k\beta)}\,\mu(dx)
&=e^{R^2/(k\beta)}\mu(\lVert x\rVert>R)+\frac{2}{k\beta}\int_R^\infty te^{t^2/(k\beta)}\mu(\lVert x\rVert>t)\,dt\\
&\leq\alpha e^{-\frac{(k-1)R^2}{k\beta}}+\frac{2\alpha}{k\beta}\int_R^\infty te^{-t^2/(k\beta)}\,dt\\
&=\alpha e^{-\frac{(k-1)R^2}{k\beta}}+\frac{\alpha}{k\beta}\int_{R^2}^\infty e^{-t/(k\beta)}\,dt\\
&=\alpha e^{-\frac{(k-1)R^2}{k\beta}}+\frac{2\alpha}{k^2\beta^2}e^{-R^2/(k\beta)}\\
&=\alpha\left(1+\frac{2}{k^2\beta^2}\right)e^{-R^2/(k\beta)},
\end{aligned} ∫ ∥ x ∥ > R e ∥ x ∥ 2 / ( k β ) μ ( d x ) = e R 2 / ( k β ) μ (∥ x ∥ > R ) + k β 2 ∫ R ∞ t e t 2 / ( k β ) μ (∥ x ∥ > t ) d t ≤ α e − k β ( k − 1 ) R 2 + k β 2 α ∫ R ∞ t e − t 2 / ( k β ) d t = α e − k β ( k − 1 ) R 2 + k β α ∫ R 2 ∞ e − t / ( k β ) d t = α e − k β ( k − 1 ) R 2 + k 2 β 2 2 α e − R 2 / ( k β ) = α ( 1 + k 2 β 2 2 ) e − R 2 / ( k β ) ,
where the last line uses the fact that k ≥ 2 k\geq2 k ≥ 2 , and hence e − ( k − 1 ) R 2 k β < e − R 2 / ( k β ) e^{-\frac{(k-1)R^2}{k\beta}}<e^{-R^2/(k\beta)} e − k β ( k − 1 ) R 2 < e − R 2 / ( k β ) . For the denominator, we have the bound
∫ ∥ x ∥ ≤ R μ ( d x ) ≥ 1 − α e − R 2 / β , \int_{\lVert x\rVert\leq R}\mu(dx)\geq1-\alpha e^{-R^2/\beta}, ∫ ∥ x ∥ ≤ R μ ( d x ) ≥ 1 − α e − R 2 / β ,
simply due to the fact that μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) . This establishes the bound
I ≤ α ( 1 + 2 k 2 β 2 ) e − R 2 / ( k β ) 1 − α e − R 2 / β . I\leq\frac{\alpha\left(1+\frac{2}{k^2\beta^2}\right)e^{-R^2/(k\beta)}}{1-\alpha e^{-R^2/\beta}}. I ≤ 1 − α e − R 2 / β α ( 1 + k 2 β 2 2 ) e − R 2 / ( k β ) .
For term I I II I I , we use the lower bound on ∫ ∥ x ∥ ≤ R μ ( d x ) \int_{\lVert x\rVert\leq R}\mu(dx) ∫ ∥ x ∥ ≤ R μ ( d x ) to deduce that
∣ 1 − 1 ∫ ∥ x ∥ ≤ R μ ( d x ) ∣ ≤ ∣ 1 − 1 1 − α e − R 2 / β ∣ = α e − R 2 / β 1 − α e − R 2 / β . \left|1-\frac{1}{\int_{\lVert x\rVert\leq R}\mu(dx)}\right|
\leq\left|1-\frac{1}{1-\alpha e^{-R^2/\beta}}\right|
=\frac{\alpha e^{-R^2/\beta}}{1-\alpha e^{-R^2/\beta}}. 1 − ∫ ∥ x ∥ ≤ R μ ( d x ) 1 ≤ 1 − 1 − α e − R 2 / β 1 = 1 − α e − R 2 / β α e − R 2 / β .
Next, since μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , Lemma B.3 furnishes the exponential moment bound
∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) ≤ 1 + α k − 1 . \int e^{\lVert x\rVert^2/(k\beta)}\mu(dx)\leq1+\frac{\alpha}{k-1}. ∫ e ∥ x ∥ 2 / ( k β ) μ ( d x ) ≤ 1 + k − 1 α .
Putting things together, we get
I I ≤ α ( 1 + α k − 1 ) e − R 2 / β 1 − α e − R 2 / β , II\leq\frac{\alpha\left(1+\frac{\alpha}{k-1}\right)e^{-R^2/\beta}}{1-\alpha e^{-R^2/\beta}}, I I ≤ 1 − α e − R 2 / β α ( 1 + k − 1 α ) e − R 2 / β ,
and combining the bounds for terms I I I and I I II I I yields the estimate as stated in the lemma. □
The following provides high-probability bounds on the sub-Gaussian parameters of an empirical measure μ N \mu_N μ N when μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , which may be a result of independent interest.
Proposition B.7. Let α ≥ 1 \alpha\geq1 α ≥ 1 and β > 0 \beta>0 β > 0 , and let μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) . Fix ρ > 1 \rho>1 ρ > 1 and k > 2 ρ k>2\rho k > 2 ρ . If x 1 , … , x N x_1,\ldots,x_N x 1 , … , x N are iid samples from μ \mu μ and μ N = 1 N ∑ i = 1 N δ x i \mu_N=\frac{1}{N}\sum_{i=1}^N\delta_{x_i} μ N = N 1 ∑ i = 1 N δ x i , then there exists N α , β , ρ , k ∈ N N_{\alpha,\beta,\rho,k}\in\mathbb{N} N α , β , ρ , k ∈ N such that
P x 1 , … , x N ( μ N ∈ S G ( 3 + α / ( k − 1 ) ) , k β ( R d ) ) ≥ 1 − 2 α N 1 − ρ for all N ≥ N α , β , ρ , k . \mathbb{P}_{x_1,\ldots,x_N}\left(\mu_N\in\mathrm{SG}_{(3+\alpha/(k-1)),k\beta}(\mathbb{R}^d)\right)\geq1-2\alpha N^{1-\rho}\quad\text{for all }N\geq N_{\alpha,\beta,\rho,k}. P x 1 , … , x N ( μ N ∈ SG ( 3 + α / ( k − 1 )) , k β ( R d ) ) ≥ 1 − 2 α N 1 − ρ for all N ≥ N α , β , ρ , k .
Proof. For R > 0 R>0 R > 0 , let E N , R \mathcal{E}_{N,R} E N , R denote the event that max i ∈ [ N ] ∥ x i ∥ ≤ R \max_{i\in[N]}\lVert x_i\rVert\leq R max i ∈ [ N ] ∥ x i ∥ ≤ R . Since μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , it follows from an application of the union bound that
P x 1 , … , x N ( E N , R ) ≥ 1 − α N exp ( − R 2 β ) . \mathbb{P}_{x_1,\ldots,x_N}(\mathcal{E}_{N,R})\geq1-\alpha N\exp\left(-\frac{R^2}{\beta}\right). P x 1 , … , x N ( E N , R ) ≥ 1 − α N exp ( − β R 2 ) .
In particular, choosing R = R N = β ρ log ( N ) R=R_N=\sqrt{\beta\rho\log(N)} R = R N = β ρ log ( N ) , we have
P x 1 , … , x N ( E N , R ) ≥ 1 − α N 1 − ρ . \mathbb{P}_{x_1,\ldots,x_N}(\mathcal{E}_{N,R})\ge1-\alpha N^{1-\rho}. P x 1 , … , x N ( E N , R ) ≥ 1 − α N 1 − ρ .
To bound the desired probability, we use Lemma B.3, which states that if ν ∈ P ( R d ) \nu\in\mathcal{P}(\mathbb{R}^d) ν ∈ P ( R d ) and ∫ e ∥ x ∥ 2 k β ν ( d x ) ≤ 2 + α k − 1 \int e^{\frac{\lVert x\rVert^2}{k\beta}}\nu(dx)\le2+\frac{\alpha}{k-1} ∫ e k β ∥ x ∥ 2 ν ( d x ) ≤ 2 + k − 1 α , then ν ∈ S G ( 2 + α / ( k − 1 ) ) , k β ( R d ) \nu\in\mathrm{SG}_{(2+\alpha/(k-1)),k\beta}(\mathbb{R}^d) ν ∈ SG ( 2 + α / ( k − 1 )) , k β ( R d ) . Applying this to the empirical measure μ N \mu_N μ N , it implies that
P x 1 , … , x N ( μ N ∈ S G ( 2 + α / ( k − 1 ) ) , k β ) ≥ P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β ≤ 2 + α k − 1 ) . \mathbb{P}_{x_1,\ldots,x_N}\left(\mu_N\in\mathrm{SG}_{(2+\alpha/(k-1)),k\beta}\right)\ge\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}\le2+\frac{\alpha}{k-1}\right). P x 1 , … , x N ( μ N ∈ SG ( 2 + α / ( k − 1 )) , k β ) ≥ P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 ≤ 2 + k − 1 α ) .
To bound the above probability, we use the fact that
P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β ≤ 2 + α k − 1 ) ≥ P x 1 , … , x N ( { 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β ≤ 2 + α k − 1 } ∩ E N , R ) = P x 1 , … , x N ( E N , R ) P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β ≤ 2 + α k − 1 | E N , R ) ≥ ( 1 − α N 1 − ρ ) P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β ≤ 2 + α k − 1 | E N , R ) . \begin{aligned}
\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}\le2+\frac{\alpha}{k-1}\right)\ge\mathbb{P}_{x_1,\ldots,x_N}\left(\left\{\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}\le2+\frac{\alpha}{k-1}\right\}\cap\mathcal{E}_{N,R}\right) \\
&= \mathbb{P}_{x_1,\ldots,x_N}(\mathcal{E}_{N,R})\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}\le2+\frac{\alpha}{k-1}\,\middle|\,\mathcal{E}_{N,R}\right) \\
&\ge\left(1-\alpha N^{1-\rho}\right)\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}\le2+\frac{\alpha}{k-1}\,\middle|\,\mathcal{E}_{N,R}\right).
\end{aligned} P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 ≤ 2 + k − 1 α ) ≥ P x 1 , … , x N ( { N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 ≤ 2 + k − 1 α } ∩ E N , R ) = P x 1 , … , x N ( E N , R ) P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 ≤ 2 + k − 1 α E N , R ) ≥ ( 1 − α N 1 − ρ ) P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 ≤ 2 + k − 1 α E N , R ) .
It therefore suffices to bound the conditional probability above. Let μ R \mu_R μ R denote the normalized restriction of μ \mu μ to the ball of radius R R R , and note that the joint law of x 1 , … , x N x_1,\ldots,x_N x 1 , … , x N conditioned on E N , R \mathcal{E}_{N,R} E N , R coincides with the joint law of N N N iid samples from μ R \mu_R μ R . Therefore, as a consequence of Hoeffding’s inequality, we have
P x 1 , … , x N ( ∣ 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β − ∫ e ∥ x ∥ 2 k β μ R ( d x ) ∣ > t | E N , R ) = P x 1 , … , x N ∼ μ R ( ∣ 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β − ∫ e ∥ x ∥ 2 k β μ R ( d x ) ∣ > t ) \mathbb{P}_{x_1,\ldots,x_N}\left(\left|\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}-\int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\right|>t\,\middle|\,\mathcal{E}_{N,R}\right)=\mathbb{P}_{x_1,\ldots,x_N\sim\mu_R}\left(\left|\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}-\int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\right|>t\right) P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 − ∫ e k β ∥ x ∥ 2 μ R ( d x ) > t E N , R ) = P x 1 , … , x N ∼ μ R ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 − ∫ e k β ∥ x ∥ 2 μ R ( d x ) > t )
≤ 2 exp ( − 2 N t 2 exp ( 2 R 2 k β ) ) = 2 exp ( − 2 N 1 − 2 ρ / k t 2 ) . \begin{aligned}
\le2\exp\left(-\frac{2Nt^2}{\exp\left(\frac{2R^2}{k\beta}\right)}\right) \\
&=2\exp\left(-2N^{1-2\rho/k}t^2\right).
\end{aligned} ≤ 2 exp − exp ( k β 2 R 2 ) 2 N t 2 = 2 exp ( − 2 N 1 − 2 ρ / k t 2 ) .
where we used the definition of R = R N R=R_N R = R N . Note that 1 − 2 ρ k > 0 1-\frac{2\rho}{k}>0 1 − k 2 ρ > 0 by assumption. Since μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , Lemma B.3 guarantees that
∫ e ∥ x ∥ 2 k β μ ( d x ) ≤ 1 + α k − 1 . \int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu(dx)\le1+\frac{\alpha}{k-1}. ∫ e k β ∥ x ∥ 2 μ ( d x ) ≤ 1 + k − 1 α .
In addition, Lemma B.6 proves, provided R > β log ( α ) R>\sqrt{\beta\log(\alpha)} R > β log ( α ) , that
∫ e ∥ x ∥ 2 k β μ R ( d x ) ≤ ∫ e ∥ x ∥ 2 k β μ ( d x ) + α ( 1 + 2 k 2 β 2 ) e − R 2 / ( k β ) + ( 1 + α k − 1 ) e − R 2 / β 1 − α e − R 2 / β . \int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\le\int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu(dx)+\alpha\frac{\left(1+\frac{2}{k^2\beta^2}\right)e^{-R^2/(k\beta)}+\left(1+\frac{\alpha}{k-1}\right)e^{-R^2/\beta}}{1-\alpha e^{-R^2/\beta}}. ∫ e k β ∥ x ∥ 2 μ R ( d x ) ≤ ∫ e k β ∥ x ∥ 2 μ ( d x ) + α 1 − α e − R 2 / β ( 1 + k 2 β 2 2 ) e − R 2 / ( k β ) + ( 1 + k − 1 α ) e − R 2 / β .
Recalling the definition of R = R N R=R_N R = R N , the second term on the right-hand side of the preceding display converges to zero as N → ∞ N\to\infty N → ∞ . Therefore, there exists a natural number N α , β , ρ , k N_{\alpha,\beta,\rho,k} N α , β , ρ , k such that for all N ≥ N α , β , ρ , k N\ge N_{\alpha,\beta,\rho,k} N ≥ N α , β , ρ , k , we have R > β log ( α ) R>\sqrt{\beta\log(\alpha)} R > β log ( α ) and
∫ e ∥ x ∥ 2 k β μ R ( d x ) ≤ 2 + α k − 1 for all N ≥ N α , β . \int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\le2+\frac{\alpha}{k-1}\quad\text{for all }N\ge N_{\alpha,\beta}. ∫ e k β ∥ x ∥ 2 μ R ( d x ) ≤ 2 + k − 1 α for all N ≥ N α , β .
Thus, setting t = 1 t=1 t = 1 in Hoeffding’s inequality, we have whenever N ≥ N α , β , ρ , k N\ge N_{\alpha,\beta,\rho,k} N ≥ N α , β , ρ , k that
P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β > 3 + α k − 1 | E N , R ) ≤ P x 1 , … , x N ( 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β > 1 + ∫ e ∥ x ∥ 2 k β μ R ( d x ) | E N , R ) ≤ P x 1 , … , x N ∼ μ R ( ∣ 1 N ∑ i = 1 N e ∥ x i ∥ 2 k β − ∫ e ∥ x ∥ 2 k β μ R ( d x ) ∣ > 1 ) \begin{aligned}
\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}>3+\frac{\alpha}{k-1}\,\middle|\,\mathcal{E}_{N,R}\right)\le\mathbb{P}_{x_1,\ldots,x_N}\left(\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}>1+\int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\,\middle|\,\mathcal{E}_{N,R}\right) \\
&\le\mathbb{P}_{x_1,\ldots,x_N\sim\mu_R}\left(\left|\frac{1}{N}\sum_{i=1}^{N}e^{\frac{\lVert x_i\rVert^2}{k\beta}}-\int e^{\frac{\lVert x\rVert^2}{k\beta}}\mu_R(dx)\right|>1\right)
\end{aligned} P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 > 3 + k − 1 α E N , R ) ≤ P x 1 , … , x N ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 > 1 + ∫ e k β ∥ x ∥ 2 μ R ( d x ) E N , R ) ≤ P x 1 , … , x N ∼ μ R ( N 1 i = 1 ∑ N e k β ∥ x i ∥ 2 − ∫ e k β ∥ x ∥ 2 μ R ( d x ) > 1 )
≤ 2 exp ( − 2 N 1 − 2 ρ / k ) . \le2\exp\left(-2N^{1-2\rho/k}\right). ≤ 2 exp ( − 2 N 1 − 2 ρ / k ) .
Putting all the pieces together, we have
P x 1 , … , x N ( μ N ∈ S G ( 3 + α k − 1 , k β ) ) ≥ ( 1 − α N 1 − ρ ) ( 1 − 2 exp ( − 2 N 1 − 2 ρ / k ) ) . \mathbb{P}_{x_1,\ldots,x_N}\left(\mu_N\in\mathrm{SG}\left(3+\frac{\alpha}{k-1},k\beta\right)\right)\geq\left(1-\alpha N^{1-\rho}\right)\left(1-2\exp\left(-2N^{1-2\rho/k}\right)\right). P x 1 , … , x N ( μ N ∈ SG ( 3 + k − 1 α , k β ) ) ≥ ( 1 − α N 1 − ρ ) ( 1 − 2 exp ( − 2 N 1 − 2 ρ / k ) ) .
To conclude, we choose N α , β , ρ , k N_{\alpha,\beta,\rho,k} N α , β , ρ , k large enough that
( 1 − α N 1 − ρ ) ( 1 − 2 exp ( − 2 N 1 − 2 ρ / k ) ) ≥ 1 − 2 α N 1 − ρ for all N ≥ N α , β , ρ , k . \left(1-\alpha N^{1-\rho}\right)\left(1-2\exp\left(-2N^{1-2\rho/k}\right)\right)\geq1-2\alpha N^{1-\rho}\quad\text{for all }N\geq N_{\alpha,\beta,\rho,k}. ( 1 − α N 1 − ρ ) ( 1 − 2 exp ( − 2 N 1 − 2 ρ / k ) ) ≥ 1 − 2 α N 1 − ρ for all N ≥ N α , β , ρ , k .
The proof is complete. □
Gaussian and Sub-Gaussian Tail Bounds
We herein record relevant several tail estimates for Gaussian and sub-Gaussian distributions. These estimates are used several times in establishing the Hölder continuity of transformers. We begin with some elementary tail bounds for the one-dimensional Gaussian.
Lemma B.8. Let R > 0 R>0 R > 0 . Then
∫ R ∞ e − x 2 d x ≤ 1 2 R e − R 2 , ∫ R ∞ x e − x 2 d x = 1 2 e − R 2 , and ∫ R ∞ x 2 e − x 2 d x ≤ ( R 2 + 1 4 R ) e − R 2 . \begin{aligned}
\int_R^\infty e^{-x^2}\,dx &\leq\frac{1}{2R}e^{-R^2},\\
\int_R^\infty xe^{-x^2}\,dx &= \frac{1}{2}e^{-R^2},\qquad\text{and}\\
\int_R^\infty x^2e^{-x^2}\,dx &\leq\left(\frac{R}{2}+\frac{1}{4R}\right)e^{-R^2}.
\end{aligned} ∫ R ∞ e − x 2 d x ∫ R ∞ x e − x 2 d x ∫ R ∞ x 2 e − x 2 d x ≤ 2 R 1 e − R 2 , = 2 1 e − R 2 , and ≤ ( 2 R + 4 R 1 ) e − R 2 .
Proof. The second line follows from direct integration. The first line follows from the second line:
∫ R ∞ e − x 2 d x ≤ ∫ R ∞ x R e − x 2 d x = 1 2 R e − R 2 . \int_R^\infty e^{-x^2}\,dx\leq\int_R^\infty\frac{x}{R}e^{-x^2}\,dx=\frac{1}{2R}e^{-R^2}. ∫ R ∞ e − x 2 d x ≤ ∫ R ∞ R x e − x 2 d x = 2 R 1 e − R 2 .
The third line follows from the first line and integration by parts:
∫ R ∞ x 2 e − x 2 d x = 1 2 R e − R 2 + 1 2 ∫ R ∞ e − x 2 d x ≤ ( R 2 + 1 4 R ) e − R 2 . \begin{aligned}
\int_R^\infty x^2e^{-x^2}\,dx
&=\frac{1}{2}Re^{-R^2}+\frac{1}{2}\int_R^\infty e^{-x^2}\,dx\\
&\leq\left(\frac{R}{2}+\frac{1}{4R}\right)e^{-R^2}.
\end{aligned} ∫ R ∞ x 2 e − x 2 d x = 2 1 R e − R 2 + 2 1 ∫ R ∞ e − x 2 d x ≤ ( 2 R + 4 R 1 ) e − R 2 .
The proof is complete. □
Lemma B.9. Let a , b > 0 a,b>0 a , b > 0 and R ≥ a 2 b R\geq\frac{a}{2b} R ≥ 2 b a . Then
∫ R ∞ e a x − b x 2 d x ≤ 1 2 b R − a e − b R 2 + a R , \int_R^\infty e^{ax-bx^2}\,dx\leq\frac{1}{2bR-a}e^{-bR^2+aR}, ∫ R ∞ e a x − b x 2 d x ≤ 2 b R − a 1 e − b R 2 + a R , ∫ R ∞ x e a x − b x 2 d x ≤ ( a 2 b 2 R − a b + b − 1 ) e − b R 2 + a R , and \int_R^\infty xe^{ax-bx^2}\,dx\leq\left(\frac{a}{2b^2R-ab}+b^{-1}\right)e^{-bR^2+aR},\qquad\text{and} ∫ R ∞ x e a x − b x 2 d x ≤ ( 2 b 2 R − ab a + b − 1 ) e − b R 2 + a R , and ∫ R ∞ x 2 e a x − b x 2 d x ≤ ( a 2 4 b 5 / 2 ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) + a 2 b 2 + b 1 / 2 R − a / ( 2 b 1 / 2 ) 2 b 3 / 2 + 1 4 b 3 / 2 ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) ) e − b R 2 + a R . \int_R^\infty x^2e^{ax-bx^2}\,dx\leq\left(\frac{a^2}{4b^{5/2}(b^{1/2}R-a/(2b^{1/2}))}+\frac{a}{2b^2}+\frac{b^{1/2}R-a/(2b^{1/2})}{2b^{3/2}}+\frac{1}{4b^{3/2}(b^{1/2}R-a/(2b^{1/2}))}\right)e^{-bR^2+aR}. ∫ R ∞ x 2 e a x − b x 2 d x ≤ ( 4 b 5/2 ( b 1/2 R − a / ( 2 b 1/2 )) a 2 + 2 b 2 a + 2 b 3/2 b 1/2 R − a / ( 2 b 1/2 ) + 4 b 3/2 ( b 1/2 R − a / ( 2 b 1/2 )) 1 ) e − b R 2 + a R . Proof. For the first line, we have
∫ R ∞ e a x − b x 2 d x = e a 2 4 b ∫ R ∞ e − ( b 1 / 2 x − a 2 b 1 / 2 ) 2 d x = b − 1 / 2 e a 2 4 b ∫ b 1 / 2 R − a 2 b 1 / 2 ∞ e − x 2 d x ≤ b − 1 / 2 2 ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) e a 2 4 b − ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) 2 = 1 2 b R − a e − b R 2 + a R , \begin{aligned}
\int_R^\infty e^{ax-bx^2}\,dx
&=e^{\frac{a^2}{4b}}\int_R^\infty e^{-\left(b^{1/2}x-\frac{a}{2b^{1/2}}\right)^2}\,dx\\
&=b^{-1/2}e^{\frac{a^2}{4b}}\int_{b^{1/2}R-\frac{a}{2b^{1/2}}}^\infty e^{-x^2}\,dx\\
&\leq\frac{b^{-1/2}}{2(b^{1/2}R-a/(2b^{1/2}))}e^{\frac{a^2}{4b}-(b^{1/2}R-a/(2b^{1/2}))^2}\\
&=\frac{1}{2bR-a}e^{-bR^2+aR},
\end{aligned} ∫ R ∞ e a x − b x 2 d x = e 4 b a 2 ∫ R ∞ e − ( b 1/2 x − 2 b 1/2 a ) 2 d x = b − 1/2 e 4 b a 2 ∫ b 1/2 R − 2 b 1/2 a ∞ e − x 2 d x ≤ 2 ( b 1/2 R − a / ( 2 b 1/2 )) b − 1/2 e 4 b a 2 − ( b 1/2 R − a / ( 2 b 1/2 ) ) 2 = 2 b R − a 1 e − b R 2 + a R ,
where we used Lemma B.8 . For the second line, using a similar argument, we have
∫ R ∞ x e a x − b x 2 d x = b − 1 e a 2 4 b ∫ b 1 / 2 R − a 2 b 1 / 2 ∞ ( x + a 2 b ) e − x 2 d x ≤ ( a 2 b 2 R − a b + b − 1 ) e − b R 2 + a R . \begin{aligned}
\int_R^\infty x e^{a x-bx^2}\,dx=b^{-1}e^{\frac{a^2}{4b}}\int_{b^{1/2}R-\frac{a}{2b^{1/2}}}^\infty\left(x+\frac{a}{2\sqrt{b}}\right)e^{-x^2}\,dx \\
&\le\left(\frac{a}{2b^2R-ab}+b^{-1}\right)e^{-bR^2+aR}.
\end{aligned} ∫ R ∞ x e a x − b x 2 d x = b − 1 e 4 b a 2 ∫ b 1/2 R − 2 b 1/2 a ∞ ( x + 2 b a ) e − x 2 d x ≤ ( 2 b 2 R − ab a + b − 1 ) e − b R 2 + a R .
where we again used Lemma B.8 . Finally, for the third line, we use the same change of variables, along with the inequalities in the first to second lines of the statement of the result:
∫ R ∞ x 2 e a x − b x 2 d x = b − 3 / 2 e a 2 4 b ∫ b 1 / 2 R − a 2 b 1 / 2 ∞ ( a 2 4 b + a b 1 / 2 x + x 2 ) e − x 2 d x ≤ ( a 2 4 b 5 / 2 ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) + a 2 b 2 + b 1 / 2 R − a / ( 2 b 1 / 2 ) 2 b 3 / 2 + 1 4 b 3 / 2 ( b 1 / 2 R − a / ( 2 b 1 / 2 ) ) ) e − b R 2 + a R , \begin{aligned}
\int_R^\infty x^2e^{ax-bx^2}\,dx=b^{-3/2}e^{\frac{a^2}{4b}}\int_{b^{1/2}R-\frac{a}{2b^{1/2}}}^\infty\left(\frac{a^2}{4b}+\frac{a}{b^{1/2}}x+x^2\right)e^{-x^2}\,dx \\
&\le\left(\frac{a^2}{4b^{5/2}\left(b^{1/2}R-a/(2b^{1/2})\right)}+\frac{a}{2b^2}+\frac{b^{1/2}R-a/(2b^{1/2})}{2b^{3/2}}+\frac{1}{4b^{3/2}\left(b^{1/2}R-a/(2b^{1/2})\right)}\right)e^{-bR^2+aR},
\end{aligned} ∫ R ∞ x 2 e a x − b x 2 d x = b − 3/2 e 4 b a 2 ∫ b 1/2 R − 2 b 1/2 a ∞ ( 4 b a 2 + b 1/2 a x + x 2 ) e − x 2 d x ≤ ( 4 b 5/2 ( b 1/2 R − a / ( 2 b 1/2 ) ) a 2 + 2 b 2 a + 2 b 3/2 b 1/2 R − a / ( 2 b 1/2 ) + 4 b 3/2 ( b 1/2 R − a / ( 2 b 1/2 ) ) 1 ) e − b R 2 + a R ,
where we used Lemma B.8 yet again.
We apply these one-dimensional Gaussian tail bounds to prove tail bounds for certain moments of sub-Gaussian measures. Our first result shows that truncation is uniformly accurate.
Lemma B.10. Let Π R : R d → B R ⊂ R d \Pi_R:\mathbb{R}^d\to B_R\subset\mathbb{R}^d Π R : R d → B R ⊂ R d be the truncation map. Then
sup μ ∈ S G α , β ( R d ) W 1 ( μ , ( Π R ) # μ ) ≤ α β 2 R e − R 2 / β . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}W_1(\mu,(\Pi_R)_\#\mu)\le\frac{\alpha\beta}{2R}e^{-R^2/\beta}. μ ∈ SG α , β ( R d ) sup W 1 ( μ , ( Π R ) # μ ) ≤ 2 R α β e − R 2 / β . Proof. For any μ ∈ S G α , β \mu\in\mathrm{SG}_{\alpha,\beta} μ ∈ SG α , β , the quantity W 1 ( μ , ( Π R ) # μ ) W_1(\mu,(\Pi_R)_\#\mu) W 1 ( μ , ( Π R ) # μ ) is bounded above by
∫ R d ∥ x − Π R ( x ) ∥ μ ( d x ) = ∫ ∥ x ∥ > R ( ∥ x ∥ − R ) μ ( d x ) ≤ ∫ R ∞ μ ( ∥ x ∥ > t ) d t ≤ α ∫ R ∞ e − t 2 / β d t . \int_{\mathbb{R}^d}\lVert x-\Pi_R(x)\rVert\mu(dx)=\int_{\lVert x\rVert>R}(\lVert x\rVert-R)\mu(dx)\le\int_R^\infty\mu(\lVert x\rVert>t)\,dt\le\alpha\int_R^\infty e^{-t^2/\beta}\,dt. ∫ R d ∥ x − Π R ( x )∥ μ ( d x ) = ∫ ∥ x ∥ > R (∥ x ∥ − R ) μ ( d x ) ≤ ∫ R ∞ μ (∥ x ∥ > t ) d t ≤ α ∫ R ∞ e − t 2 / β d t . Application of Lemma B.9 with r = R r=R r = R , a = 0 a=0 a = 0 , and b = 1 / β b=1/\beta b = 1/ β completes the proof.
We need a similar bound for quantitative sub-Gaussian uniform integrability of first moments.
Lemma B.11. For any R > 0 R>0 R > 0 , it holds that
sup μ ∈ S G α , β ( R d ) ∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) ≤ α ( β 2 R + 1 + R ) e − R 2 / β . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int_{\lVert x\rVert>R}(1+\lVert x\rVert)\,\mu(dx)\le\alpha\left(\frac{\beta}{2R}+1+R\right)e^{-R^2/\beta}. μ ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ > R ( 1 + ∥ x ∥) μ ( d x ) ≤ α ( 2 R β + 1 + R ) e − R 2 / β . Proof. By the proof of Lemma B.10 , we have
∫ ∥ x ∥ > R ( 1 + ∥ x ∥ ) μ ( d x ) = ∫ ∥ x ∥ > R ( 1 + R ) μ ( d x ) + ∫ ∥ x ∥ > R ( ∥ x ∥ − R ) μ ( d x ) \int_{\lVert x\rVert>R}(1+\lVert x\rVert)\,\mu(dx)=\int_{\lVert x\rVert>R}(1+R)\,\mu(dx)+\int_{\lVert x\rVert>R}(\lVert x\rVert-R)\,\mu(dx) ∫ ∥ x ∥ > R ( 1 + ∥ x ∥) μ ( d x ) = ∫ ∥ x ∥ > R ( 1 + R ) μ ( d x ) + ∫ ∥ x ∥ > R (∥ x ∥ − R ) μ ( d x ) ≤ α ( 1 + R ) e − R 2 / β + α β 2 R e − R 2 / β , \le\alpha(1+R)e^{-R^2/\beta}+\frac{\alpha\beta}{2R}e^{-R^2/\beta}, ≤ α ( 1 + R ) e − R 2 / β + 2 R α β e − R 2 / β , which is the assertion.
Finally, we prove tail bounds for modulated exponential moments of sub-Gaussian measures.
Lemma B.12. For all α ≥ 1 \alpha\ge1 α ≥ 1 , β > 0 \beta>0 β > 0 , μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) , λ > 0 \lambda>0 λ > 0 , and R > 0 R>0 R > 0 , it holds that
∫ ∥ y ∥ > R λ e λ ∥ y ∥ ( ∥ y ∥ − R ) μ ( d y ) ≤ α λ e β λ 2 / 2 ( β R + β 2 λ R 2 ) e − R 2 2 β \int_{\lVert y\rVert>R}\lambda e^{\lambda\lVert y\rVert}(\lVert y\rVert-R)\,\mu(dy)\le\alpha\lambda e^{\beta\lambda^2/2}\left(\frac{\beta}{R}+\frac{\beta^2}{\lambda R^2}\right)e^{-\frac{R^2}{2\beta}} ∫ ∥ y ∥ > R λ e λ ∥ y ∥ (∥ y ∥ − R ) μ ( d y ) ≤ α λ e β λ 2 /2 ( R β + λ R 2 β 2 ) e − 2 β R 2 and
∫ ∥ y ∥ > R λ e λ ∥ y ∥ ∥ y ∥ ( ∥ y ∥ − R ) μ ( d y ) ≤ α λ e β λ 2 / 2 ( β 2 λ R + 2 β ) e − R 2 2 β . \int_{\lVert y\rVert>R}\lambda e^{\lambda\lVert y\rVert}\lVert y\rVert(\lVert y\rVert-R)\,\mu(dy)\le\alpha\lambda e^{\beta\lambda^2/2}\left(\frac{\beta^2}{\lambda R}+2\beta\right)e^{-\frac{R^2}{2\beta}}. ∫ ∥ y ∥ > R λ e λ ∥ y ∥ ∥ y ∥ (∥ y ∥ − R ) μ ( d y ) ≤ α λ e β λ 2 /2 ( λ R β 2 + 2 β ) e − 2 β R 2 .
Proof. Fix μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) throughout the proof. Write I 1 I_1 I 1 and I 2 I_2 I 2 for the first and second integrals, respectively. The layer cake formula states that if f : R → R f:\mathbb{R}\to\mathbb{R} f : R → R is nonnegative and differentiable, then
∫ ∥ y ∥ > R f ( ∥ y ∥ ) μ ( d y ) = f ( R ) μ ( ∥ y ∥ > R ) + ∫ R ∞ f ′ ( t ) μ ( ∥ y ∥ > t ) d t . \int_{\lVert y\rVert>R} f(\lVert y\rVert)\,\mu(\mathrm{d}y)=f(R)\mu(\lVert y\rVert>R)+\int_R^\infty f'(t)\mu(\lVert y\rVert>t)\,\mathrm{d}t . ∫ ∥ y ∥ > R f (∥ y ∥) μ ( d y ) = f ( R ) μ (∥ y ∥ > R ) + ∫ R ∞ f ′ ( t ) μ (∥ y ∥ > t ) d t .
Applying this to f ( t ) : = λ e λ t ( t − R ) f(t):=\lambda e^{\lambda t}(t-R) f ( t ) := λ e λ t ( t − R ) , we get f ′ ( t ) = λ ( 1 + λ ( t − R ) ) e λ t f'(t)=\lambda(1+\lambda(t-R))e^{\lambda t} f ′ ( t ) = λ ( 1 + λ ( t − R )) e λ t , f ( R ) = 0 f(R)=0 f ( R ) = 0 , and
I 1 ≤ α ∫ R ∞ f ′ ( t ) e − t 2 / β d t = α λ ∫ R ∞ ( 1 + λ ( t − R ) ) e λ t − t 2 / β d t . I_1\leq\alpha\int_R^\infty f'(t)e^{-t^2/\beta}\,\mathrm{d}t=\alpha\lambda\int_R^\infty(1+\lambda(t-R))e^{\lambda t-t^2/\beta}\,\mathrm{d}t . I 1 ≤ α ∫ R ∞ f ′ ( t ) e − t 2 / β d t = α λ ∫ R ∞ ( 1 + λ ( t − R )) e λ t − t 2 / β d t .
Young’s inequality shows that
λ t = ( β λ ) ( t / β ) ≤ β λ 2 2 + t 2 2 β . \lambda t=(\sqrt{\beta}\lambda)(t/\sqrt{\beta})\leq\frac{\beta\lambda^2}{2}+\frac{t^2}{2\beta}. λ t = ( β λ ) ( t / β ) ≤ 2 β λ 2 + 2 β t 2 .
Subtracting t 2 / β t^2/\beta t 2 / β and exponentiating the preceding display yields
I 1 ≤ α λ e β λ 2 2 ∫ R ∞ ( 1 + λ ( t − R ) ) e − t 2 / ( 2 β ) d t . I_1\leq\alpha\lambda e^{\frac{\beta\lambda^2}{2}}\int_R^\infty(1+\lambda(t-R))e^{-t^2/(2\beta)}\,\mathrm{d}t . I 1 ≤ α λ e 2 β λ 2 ∫ R ∞ ( 1 + λ ( t − R )) e − t 2 / ( 2 β ) d t .
Now since t 2 = ( R + ( t − R ) ) 2 ≥ R 2 + 2 R ( t − R ) t^2=(R+(t-R))^2\geq R^2+2R(t-R) t 2 = ( R + ( t − R ) ) 2 ≥ R 2 + 2 R ( t − R ) , we have
∫ R ∞ ( t − R ) e − t 2 / ( 2 β ) d t ≤ e − R 2 / ( 2 β ) ∫ R ∞ ( t − R ) e − R ( t − R ) / β d t = β 2 R 2 e − R 2 / ( 2 β ) ∫ 0 ∞ u e − u d u = β 2 R 2 e − R 2 / ( 2 β ) . \int_R^\infty(t-R)e^{-t^2/(2\beta)}\,\mathrm{d}t\leq e^{-R^2/(2\beta)}\int_R^\infty(t-R)e^{-R(t-R)/\beta}\,\mathrm{d}t=\frac{\beta^2}{R^2}e^{-R^2/(2\beta)}\int_0^\infty ue^{-u}\,\mathrm{d}u=\frac{\beta^2}{R^2}e^{-R^2/(2\beta)} . ∫ R ∞ ( t − R ) e − t 2 / ( 2 β ) d t ≤ e − R 2 / ( 2 β ) ∫ R ∞ ( t − R ) e − R ( t − R ) / β d t = R 2 β 2 e − R 2 / ( 2 β ) ∫ 0 ∞ u e − u d u = R 2 β 2 e − R 2 / ( 2 β ) .
The first equality is due to the variable substitution u = R ( t − R ) / β u=R(t-R)/\beta u = R ( t − R ) / β and the second is due to integration by parts. The preceding display and Lemma B.9 imply the asserted upper bound on I 1 I_1 I 1 .
For I 2 I_2 I 2 , let f ( t ) : = λ e λ t t ( t − R ) f(t):=\lambda e^{\lambda t}t(t-R) f ( t ) := λ e λ t t ( t − R ) so that f ′ ( t ) = λ ( λ t ( t − R ) + ( 2 t − R ) ) e λ t f'(t)=\lambda(\lambda t(t-R)+(2t-R))e^{\lambda t} f ′ ( t ) = λ ( λ t ( t − R ) + ( 2 t − R )) e λ t and f ( R ) = 0 f(R)=0 f ( R ) = 0 . The layer cake formula and Young’s inequality yield
I 2 ≤ α λ e β λ 2 2 ∫ R ∞ ( λ t ( t − R ) + ( 2 t − R ) ) e − t 2 / ( 2 β ) d t . I_2\leq\alpha\lambda e^{\frac{\beta\lambda^2}{2}}\int_R^\infty(\lambda t(t-R)+(2t-R))e^{-t^2/(2\beta)}\,\mathrm{d}t . I 2 ≤ α λ e 2 β λ 2 ∫ R ∞ ( λ t ( t − R ) + ( 2 t − R )) e − t 2 / ( 2 β ) d t .
Integration by parts shows that
∫ R ∞ t ( t − R ) e − t 2 / ( 2 β ) d t = β ∫ R ∞ e − t 2 / ( 2 β ) d t . \int_R^\infty t(t-R)e^{-t^2/(2\beta)}\,\mathrm{d}t=\beta\int_R^\infty e^{-t^2/(2\beta)}\,\mathrm{d}t . ∫ R ∞ t ( t − R ) e − t 2 / ( 2 β ) d t = β ∫ R ∞ e − t 2 / ( 2 β ) d t .
This, bounding ( 2 t − R ) ≤ 2 t (2t-R)\leq2t ( 2 t − R ) ≤ 2 t , and Lemma B.9 imply the asserted upper bound on I 2 I_2 I 2 .
We record some prior results on the regularity of self-attention mappings. The result below controls the Lipschitz constants of in-context mappings defined by self-attention layers. These results are proven by Furuya et al. [24 ] when A = V A=V A = V , but we record the full proofs for posterity and to make the constants explicit.
Lemma B.13. Let G ( μ , x ) G(\mu,x) G ( μ , x ) be defined by
G ( μ , x ) = W ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ∫ e ⟨ x , A y ⟩ μ ( d y ) , G(\mu,x)=W\frac{\int e^{\langle x,Ay\rangle}Vy\,\mu(\mathrm{d}y)}{\int e^{\langle x,Ay\rangle}\,\mu(\mathrm{d}y)} , G ( μ , x ) = W ∫ e ⟨ x , A y ⟩ μ ( d y ) ∫ e ⟨ x , A y ⟩ V y μ ( d y ) ,
where A ∈ R d × d A\in\mathbb{R}^{d\times d} A ∈ R d × d , V ∈ R k × d V\in\mathbb{R}^{k\times d} V ∈ R k × d , and W ∈ R d × k W\in\mathbb{R}^{d\times k} W ∈ R d × k . Then for any R > 0 R>0 R > 0 and R ′ > 0 R'>0 R ′ > 0 , it holds that
sup μ ∈ P ( B R ) , x ∈ R d ∥ G ( μ , x ) ∥ ≤ ∥ W ∥ ∥ V ∥ R , \sup_{\mu\in\mathcal{P}(B_R),x\in\mathbb{R}^d}\lVert G(\mu,x)\rVert\leq\lVert W\rVert\lVert V\rVert R, μ ∈ P ( B R ) , x ∈ R d sup ∥ G ( μ , x )∥ ≤ ∥ W ∥ ∥ V ∥ R ,
sup μ ∈ P ( B R ) Lip ( G ( μ , ⋅ ) ) ≤ ∥ A ∥ ∥ V ∥ ∥ W ∥ R 2 , and \sup_{\mu\in\mathcal{P}(B_R)}\operatorname{Lip}(G(\mu,\cdot))\leq\lVert A\rVert\lVert V\rVert\lVert W\rVert R^2,\qquad\text{and} μ ∈ P ( B R ) sup Lip ( G ( μ , ⋅ )) ≤ ∥ A ∥ ∥ V ∥ ∥ W ∥ R 2 , and
sup x ∈ B R ′ Lip ( G ( ⋅ , x ) ∣ P ( B R ) ) ≤ e 4 ∥ A ∥ R R ′ max ( ∥ V ∥ ∥ W ∥ ( 1 + ∥ A ∥ R R ′ ) , ∥ A ∥ ∥ V ∥ ∥ W ∥ R R ′ ) . \sup_{x\in B_{R'}}\operatorname{Lip}\left(G(\cdot,x)|_{\mathcal{P}(B_R)}\right)\leq e^{4\lVert A\rVert RR'}\max\left(\lVert V\rVert\lVert W\rVert(1+\lVert A\rVert RR'),\lVert A\rVert\lVert V\rVert\lVert W\rVert RR'\right). x ∈ B R ′ sup Lip ( G ( ⋅ , x ) ∣ P ( B R ) ) ≤ e 4 ∥ A ∥ R R ′ max ( ∥ V ∥ ∥ W ∥ ( 1 + ∥ A ∥ R R ′ ) , ∥ A ∥ ∥ V ∥ ∥ W ∥ R R ′ ) .
Proof. For the first estimate, fix μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) and x ∈ R d x \in\mathbb{R}^d x ∈ R d . We can express G ( μ , x ) = E y ∼ μ x [ V y ] G(\mu,x)=\mathbb{E}_{y\sim\mu_x}[Vy] G ( μ , x ) = E y ∼ μ x [ V y ] , where μ x \mu_x μ x is defined by
d μ x d μ ( y ) ∝ e ⟨ x , A y ⟩ . \frac{d\mu_x}{d\mu}(y) \propto e^{\langle x,Ay\rangle}. d μ d μ x ( y ) ∝ e ⟨ x , A y ⟩ .
In particular, μ x \mu_x μ x is supported in B R B_R B R (since μ \mu μ is supported in B R B_R B R ), which yields
∥ G ( μ , x ) ∥ = ∥ E y ∼ μ x [ V y ] ∥ ≤ ∥ W ∥ ∥ V ∥ E y ∼ μ x ∥ y ∥ ≤ ∥ W ∥ ∥ V ∥ R . \|G(\mu,x)\|=\|\mathbb{E}_{y\sim\mu_x}[Vy]\|\leq\|W\|\|V\|\mathbb{E}_{y\sim\mu_x}\|y\|\leq\|W\|\|V\|R. ∥ G ( μ , x ) ∥ = ∥ E y ∼ μ x [ V y ] ∥ ≤ ∥ W ∥∥ V ∥ E y ∼ μ x ∥ y ∥ ≤ ∥ W ∥∥ V ∥ R .
For the second estimate, viewing G ( μ , x ) G(\mu,x) G ( μ , x ) again as a conditional expectation, a direct computation yields
∇ x G ( μ , x ) = W V Cov ( μ x ) A T . \nabla_xG(\mu,x)=WV\operatorname{Cov}(\mu_x)A^{\mathsf{T}}. ∇ x G ( μ , x ) = W V Cov ( μ x ) A T .
Since μ x \mu_x μ x is supported in B R B_R B R , we have ∥ Σ x ∥ ≤ R 2 \|\Sigma_x\|\leq R^2 ∥ Σ x ∥ ≤ R 2 . Therefore,
sup x ∈ R d ∥ ∇ x G ( μ , x ) ∥ ≤ ∥ W ∥ ∥ V ∥ ∥ Cov ( μ x ) ∥ ∥ A T ∥ ≤ ∥ A ∥ ∥ W ∥ ∥ V ∥ R 2 \sup_{x\in\mathbb{R}^d}\|\nabla_xG(\mu,x)\|\leq\|W\|\|V\|\|\operatorname{Cov}(\mu_x)\|\|A^{\mathsf{T}}\|\leq\|A\|\|W\|\|V\|R^2 x ∈ R d sup ∥ ∇ x G ( μ , x ) ∥ ≤ ∥ W ∥∥ V ∥∥ Cov ( μ x ) ∥∥ A T ∥ ≤ ∥ A ∥∥ W ∥∥ V ∥ R 2
holds uniformly in μ ∈ P ( B R ) \mu\in\mathcal{P}(B_R) μ ∈ P ( B R ) .
For the third estimate, it holds that
∥ G ( μ , x ) − G ( ν , x ) ∥ ≤ ∥ W ∥ ∥ ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) ∣ ∫ e ⟨ x , A y ⟩ d μ ∣ ∥ + ∥ W ∥ ∥ ∫ e ⟨ x , A y ⟩ V y d ν ∥ ∣ 1 ∣ ∫ e ⟨ x , A y ⟩ d μ ∣ − 1 ∣ ∫ e ⟨ x , A y ⟩ d ν ∣ ∣ ≤ ∥ W ∥ e ∥ A ∥ R R ′ ∥ ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) ∥ + ∥ W ∥ ∥ V ∥ R e ∥ A ∥ R R ′ ∣ 1 ∣ ∫ e ⟨ x , A y ⟩ d μ ∣ − 1 ∣ ∫ e ⟨ x , A y ⟩ d ν ∣ ∣ . \begin{aligned}
\|G(\mu,x)-G(\nu,x)\|&\leq\|W\|\left\|\frac{\int e^{\langle x,Ay\rangle}Vy\,d(\mu-\nu)}{\left|\int e^{\langle x,Ay\rangle}d\mu\right|}\right\|+\|W\|\left\|\int e^{\langle x,Ay\rangle}Vy\,d\nu\right\|\left|\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\mu\right|}-\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\nu\right|}\right|\\
&\leq\|W\|e^{\|A\|RR'}\left\|\int e^{\langle x,Ay\rangle}Vy\,d(\mu-\nu)\right\|+\|W\|\|V\|Re^{\|A\|RR'}\left|\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\mu\right|}-\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\nu\right|}\right|.
\end{aligned} ∥ G ( μ , x ) − G ( ν , x ) ∥ ≤ ∥ W ∥ ∫ e ⟨ x , A y ⟩ d μ ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) + ∥ W ∥ ∫ e ⟨ x , A y ⟩ V y d ν ∫ e ⟨ x , A y ⟩ d μ 1 − ∫ e ⟨ x , A y ⟩ d ν 1 ≤ ∥ W ∥ e ∥ A ∥ R R ′ ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) + ∥ W ∥∥ V ∥ R e ∥ A ∥ R R ′ ∫ e ⟨ x , A y ⟩ d μ 1 − ∫ e ⟨ x , A y ⟩ d ν 1 .
where we used the facts that x ∈ B R ′ x\in B_{R'} x ∈ B R ′ and both μ \mu μ and ν \nu ν belong to P ( B R ) \mathcal{P}(B_R) P ( B R ) . For the first term in the last line of the preceding display, a direct computation of the Jacobian of the mapping y ↦ e ⟨ x , A y ⟩ V y y\mapsto e^{\langle x,Ay\rangle}Vy y ↦ e ⟨ x , A y ⟩ V y shows that
Lip ( ( y ↦ e ⟨ x , A y ⟩ V y ) ∣ B R ) ≤ e ∥ A ∥ R R ′ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) , \operatorname{Lip}\left((y\mapsto e^{\langle x,Ay\rangle}Vy)|_{B_R}\right)\leq e^{\|A\|RR'}\|V\|(1+\|A\|RR'), Lip ( ( y ↦ e ⟨ x , A y ⟩ V y ) ∣ B R ) ≤ e ∥ A ∥ R R ′ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) ,
and therefore, by the dual formulation of the W 1 W_1 W 1 metric,
∥ ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) ∥ ≤ e ∥ A ∥ R R ′ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) W 1 ( μ , ν ) . \left\|\int e^{\langle x,Ay\rangle}Vy\,d(\mu-\nu)\right\|\leq e^{\|A\|RR'}\|V\|(1+\|A\|RR')W_1(\mu,\nu). ∫ e ⟨ x , A y ⟩ V y d ( μ − ν ) ≤ e ∥ A ∥ R R ′ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) W 1 ( μ , ν ) .
For the second term, using the fact that the Jacobian of y ↦ e ⟨ x , A y ⟩ y\mapsto e^{\langle x,Ay\rangle} y ↦ e ⟨ x , A y ⟩ is bounded by ∥ A ∥ R ′ e ∥ A ∥ R R ′ \|A\|R'e^{\|A\|RR'} ∥ A ∥ R ′ e ∥ A ∥ R R ′ for x ∈ B R ′ x\in B_{R'} x ∈ B R ′ , we have the bounds
∣ 1 ∣ ∫ e ⟨ x , A y ⟩ d μ ∣ − 1 ∣ ∫ e ⟨ x , A y ⟩ d ν ∣ ∣ ≤ e 2 ∥ A ∥ R R ′ ∣ ∫ e ⟨ x , A y ⟩ d ( μ − ν ) ∣ ≤ ∥ A ∥ R ′ e 3 ∥ A ∥ R R ′ W 1 ( μ , ν ) . \begin{aligned}
\left|\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\mu\right|}-\frac{1}{\left|\int e^{\langle x,Ay\rangle}d\nu\right|}\right|\leq e^{2\|A\|RR'}\left|\int e^{\langle x,Ay\rangle}d(\mu-\nu)\right| \\
&\leq\|A\|R'e^{3\|A\|RR'}W_1(\mu,\nu).
\end{aligned} ∫ e ⟨ x , A y ⟩ d μ 1 − ∫ e ⟨ x , A y ⟩ d ν 1 ≤ e 2∥ A ∥ R R ′ ∫ e ⟨ x , A y ⟩ d ( μ − ν ) ≤ ∥ A ∥ R ′ e 3∥ A ∥ R R ′ W 1 ( μ , ν ) .
Putting the pieces together, we obtain
∥ G ( μ , x ) − G ( ν , x ) ∥ ≤ ( e 2 ∥ A ∥ R R ′ ∥ W ∥ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) + ∥ A ∥ ∥ W ∥ ∥ V ∥ R R ′ e 4 ∥ A ∥ R R ′ ) W 1 ( μ , ν ) ≤ e 4 ∥ A ∥ ∥ R R ′ max ( ∥ W ∥ ∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) , ∥ A ∥ ∥ W ∥ ∥ V ∥ R R ′ ) W 1 ( μ , ν ) , \begin{aligned}
\|G(\mu,x)-G(\nu,x)\|&\leq\left(e^{2\|A\|RR'}\|W\|\|V\|(1+\|A\|RR')+\|A\|\|W\|\|V\|RR'e^{4\|A\|RR'}\right)W_1(\mu,\nu)\\
&\leq e^{4\|A\|\|RR'}\max\left(\|W\|\|V\|(1+\|A\|RR'),\|A\|\|W\|\|V\|RR'\right)W_1(\mu,\nu),
\end{aligned} ∥ G ( μ , x ) − G ( ν , x ) ∥ ≤ ( e 2∥ A ∥ R R ′ ∥ W ∥∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) + ∥ A ∥∥ W ∥∥ V ∥ R R ′ e 4∥ A ∥ R R ′ ) W 1 ( μ , ν ) ≤ e 4∥ A ∥∥ R R ′ max ( ∥ W ∥∥ V ∥ ( 1 + ∥ A ∥ R R ′ ) , ∥ A ∥∥ W ∥∥ V ∥ R R ′ ) W 1 ( μ , ν ) ,
as was to be shown.
We now present a straightforward generalization of the previous result to multi-head self-attention layers with residual connections.
Corollary B.14. Define
( μ , x ) ↦ Γ ( μ , x ) : = x + ∑ h = 1 H W h ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) ∫ e ⟨ x , A h y ⟩ μ ( d y ) . (14) (\mu,x)\mapsto\Gamma(\mu,x):=x+\sum_{h=1}^{H}W_h\frac{\int e^{\langle x,A_hy\rangle}V_hy\,\mu(dy)}{\int e^{\langle x,A_hy\rangle}\,\mu(dy)}. \tag*{(14)} ( μ , x ) ↦ Γ ( μ , x ) := x + h = 1 ∑ H W h ∫ e ⟨ x , A h y ⟩ μ ( d y ) ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) . (14) where A 1 , … , A H ∈ R d × d A_1,\ldots,A_H\in\mathbb{R}^{d\times d} A 1 , … , A H ∈ R d × d , V 1 , … , V H ∈ R k × d V_1,\ldots,V_H\in\mathbb{R}^{k\times d} V 1 , … , V H ∈ R k × d , and W 1 , … , W H ∈ R d × k W_1,\ldots,W_H\in\mathbb{R}^{d\times k} W 1 , … , W H ∈ R d × k . Define c A : = max h ∈ [ H ] ∥ A h ∥ c_A:=\max_{h\in[H]}\lVert A_h\rVert c A := max h ∈ [ H ] ∥ A h ∥ , c V = max h ∈ [ H ] ∥ V h ∥ c_V=\max_{h\in[H]}\lVert V_h\rVert c V = max h ∈ [ H ] ∥ V h ∥ , and c W = max h ∈ [ H ] ∥ W h ∥ c_W=\max_{h\in[H]}\lVert W_h\rVert c W = max h ∈ [ H ] ∥ W h ∥ . Then for any R > 0 R>0 R > 0 and R ′ > 0 R'>0 R ′ > 0 , it holds that
sup μ ∈ P ( B R ) Lip ( Γ ( μ , ⋅ ) ) ≤ 1 + H c A c V c W R 2 and \sup_{\mu\in\mathcal{P}(B_R)}\operatorname{Lip}(\Gamma(\mu,\cdot))\leq1+Hc_Ac_Vc_WR^2
\quad\text{and} μ ∈ P ( B R ) sup Lip ( Γ ( μ , ⋅ )) ≤ 1 + H c A c V c W R 2 and sup x ∈ B R ′ Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) ≤ H e 4 c A R R ′ max ( c V c W ( 1 + c A R R ′ ) , c A c V c W R R ′ ) . \sup_{x\in B_{R'}}\operatorname{Lip}\left(\left.\Gamma(\cdot,x)\right|_{\mathcal{P}(B_R)}\right)
\leq He^{4c_AR R'}\max\left(c_Vc_W(1+c_AR R'),c_Ac_Vc_WR R'\right). x ∈ B R ′ sup Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) ≤ H e 4 c A R R ′ max ( c V c W ( 1 + c A R R ′ ) , c A c V c W R R ′ ) .
Via simple coupling arguments, these estimates on the Lipschitz constants of the in-context mappings defined by multi-head self-attention layers translate directly to estimates on the Lipschitz constant of the corresponding multi-head self-attention layers themselves when viewed as measure-to-measure operators.
Lemma B.15. Instate the hypotheses of Corollary B.14. Let Γ \Gamma Γ be as in (B.2). There exists a constant C = C ( c A , c V , c W , H ) > 0 C=C(c_A,c_V,c_W,H)>0 C = C ( c A , c V , c W , H ) > 0 such that for any R > 0 R>0 R > 0 , it holds that
sup μ , ν ∈ P ( B R ) : W 1 ( μ , ν ) ≤ ϵ W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ C e 5 c A R 2 ϵ . \sup_{\substack{\mu,\nu\in\mathcal{P}(B_R):\\W_1(\mu,\nu)\leq\epsilon}}W_1\left(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\nu,\cdot)_{\#}\nu\right)\leq Ce^{5c_AR^2}\epsilon. μ , ν ∈ P ( B R ) : W 1 ( μ , ν ) ≤ ϵ sup W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ C e 5 c A R 2 ϵ .
Proof. By the triangle inequality and standard Wasserstein stability estimates, it holds that
W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # μ ) + W 1 ( Γ ( ν , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ ( sup x ∈ B R Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) + Lip ( Γ ( ν , ⋅ ) ) ) W 1 ( μ , ν ) . \begin{aligned}
W_1\left(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\nu,\cdot)_{\#}\nu\right)
\leq W_1\left(\Gamma(\mu,\cdot)_{\#}\mu,\Gamma(\nu,\cdot)_{\#}\mu\right)+W_1\left(\Gamma(\nu,\cdot)_{\#}\mu,\Gamma(\nu,\cdot)_{\#}\nu\right) \\
&\leq\left(\sup_{x\in B_R}\operatorname{Lip}\left(\left.\Gamma(\cdot,x)\right|_{\mathcal{P}(B_R)}\right)+\operatorname{Lip}(\Gamma(\nu,\cdot))\right)W_1(\mu,\nu).
\end{aligned} W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ W 1 ( Γ ( μ , ⋅ ) # μ , Γ ( ν , ⋅ ) # μ ) + W 1 ( Γ ( ν , ⋅ ) # μ , Γ ( ν , ⋅ ) # ν ) ≤ ( x ∈ B R sup Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) + Lip ( Γ ( ν , ⋅ )) ) W 1 ( μ , ν ) .
Applying the Lipschitz constant estimates from Corollary B.14, the preceding display shows that
Lip μ ↦ Γ ( μ , ⋅ ) # μ ≤ ( sup x ∈ B R Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) + Lip ( Γ ( ν , ⋅ ) ) ) ≤ ( 1 + H c A c V c W R 2 + H e 4 c A R 2 max ( c V c W ( 1 + c A R 2 ) , c A c V c W R ) ) . \begin{aligned}
\operatorname{Lip}_{\mu\mapsto\Gamma(\mu,\cdot)_{\#}\mu}
\leq\left(\sup_{x\in B_R}\operatorname{Lip}\left(\left.\Gamma(\cdot,x)\right|_{\mathcal{P}(B_R)}\right)+\operatorname{Lip}(\Gamma(\nu,\cdot))\right) \\
&\leq\left(1+Hc_Ac_Vc_WR^2+He^{4c_AR^2}\max\left(c_Vc_W(1+c_AR^2),c_Ac_Vc_WR\right)\right).
\end{aligned} Lip μ ↦ Γ ( μ , ⋅ ) # μ ≤ ( x ∈ B R sup Lip ( Γ ( ⋅ , x ) ∣ P ( B R ) ) + Lip ( Γ ( ν , ⋅ )) ) ≤ ( 1 + H c A c V c W R 2 + H e 4 c A R 2 max ( c V c W ( 1 + c A R 2 ) , c A c V c W R ) ) .
To conclude the proof, we choose C = C ( c A , c V , H ) > 0 C=C(c_A,c_V,H)>0 C = C ( c A , c V , H ) > 0 sufficiently large so that
( 1 + H c A c V c W R 2 + H e 4 c A R 2 max ( c V c W ( 1 + c A R 2 ) , c A c V c W R ) ) ≤ C e 5 c A R 2 \left(1+Hc_Ac_Vc_WR^2+He^{4c_AR^2}\max\left(c_Vc_W(1+c_AR^2),c_Ac_Vc_WR\right)\right)\leq Ce^{5c_AR^2} ( 1 + H c A c V c W R 2 + H e 4 c A R 2 max ( c V c W ( 1 + c A R 2 ) , c A c V c W R ) ) ≤ C e 5 c A R 2
for all R > 0 R>0 R > 0 .
:::
For technical reasons, we will need estimates on the quantity
max i ∈ [ N ] ∥ T ( μ N , x i ) ∥ , \max_{i\in[N]}\lVert T(\mu_N,x_i)\rVert, i ∈ [ N ] max ∥ T ( μ N , x i )∥ ,
where μ N = 1 N ∑ i = 1 N δ x i \mu_N=\frac{1}{N}\sum_{i=1}^{N}\delta_{x_i} μ N = N 1 ∑ i = 1 N δ x i is a discrete measure and T T T is a mean-field transformer. Such estimates are furnished in the following lemma.
Lemma B.16. Let T : P ( R d ) × R d → R k T:\mathcal{P}(\mathbb{R}^d)\times\mathbb{R}^d\to\mathbb{R}^k T : P ( R d ) × R d → R k be a mean-field transformer. Then there exists a constant C T C_T C T such that for every N ∈ N N\in\mathbb{N} N ∈ N and every measure ν N \nu_N ν N supported on a finite set of points { x 1 , … , x N } \{x_1,\ldots,x_N\} { x 1 , … , x N } , it holds that
max i ∈ [ N ] ∥ T ( ν N , x i ) ∥ ≤ C T ( max n ∈ [ N ] ∥ x n ∥ ) . \max_{i\in[N]}\lVert T(\nu_N,x_i)\rVert\leq C_T\left(\max_{n\in[N]}\lVert x_n\rVert\right). i ∈ [ N ] max ∥ T ( ν N , x i )∥ ≤ C T ( n ∈ [ N ] max ∥ x n ∥ ) .
Proof. We will prove the result by induction on the number L L L of layers of T T T , where we view a single layer of the transformer as an application of a mean-field multi-head self-attention operator followed by a context-free MLP layer with ReLU activation
( μ , x ) ↦ ϕ ( Γ ( μ , x ) ) , (15) (\mu,x)\mapsto\phi(\Gamma(\mu,x)), \tag*{(15)} ( μ , x ) ↦ ϕ ( Γ ( μ , x )) , (15)
and where we recall that the mean-field multi-headed self-attention operator with parameter matrices A 1 , … , A H ∈ R d × d A_1,\ldots,A_H \in\mathbb{R}^{d\times d} A 1 , … , A H ∈ R d × d , V 1 , … , V H ∈ R k × d V_1,\ldots,V_H \in\mathbb{R}^{k\times d} V 1 , … , V H ∈ R k × d , and W 1 , … , W H ∈ R d × k W_1,\ldots,W_H \in\mathbb{R}^{d\times k} W 1 , … , W H ∈ R d × k is defined by
Γ ( μ , x ) = x + ∑ h = 1 H W h ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) ∫ e ⟨ x , A h y ⟩ μ ( d y ) . \Gamma(\mu,x)=x+\sum_{h=1}^{H}W_h\frac{\int e^{\langle x,A_hy\rangle}V_hy\,\mu(dy)}{\int e^{\langle x,A_hy\rangle}\,\mu(dy)}. Γ ( μ , x ) = x + h = 1 ∑ H W h ∫ e ⟨ x , A h y ⟩ μ ( d y ) ∫ e ⟨ x , A h y ⟩ V h y μ ( d y ) .
For the base case, we assume that T ( μ , x ) T(\mu,x) T ( μ , x ) is given by (B.3) for some choice of A 1 , … , A H , V 1 , … , V H A_1,\ldots,A_H,V_1,\ldots,V_H A 1 , … , A H , V 1 , … , V H , and ϕ \phi ϕ . First, since ϕ \phi ϕ is a ReLU MLP layer, it is globally Lipschitz. Hence
sup i ∈ [ N ] ∥ ϕ ( T ( ν N , x i ) ) ∥ ≤ ( ∥ ϕ ( 0 ) ∥ + Lip ( ϕ ) ) sup i ∈ [ N ] ∥ Γ ( ν N , x i ) ∥ ≤ ( ∥ ϕ ( 0 ) ∥ + Lip ( ϕ ) ) ( max i ∈ [ N ] ∥ x i ∥ + max h ∈ [ H ] ∥ W h ∥ ⋅ max i ∈ [ N ] ∥ ∑ h = 1 H ∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) ∥ ) . \begin{aligned}
\sup_{i\in[N]}\|\phi(T(\nu_N,x_i))\|\leq\bigl(\|\phi(0)\|+\operatorname{Lip}(\phi)\bigr)\sup_{i\in[N]}\|\Gamma(\nu_N,x_i)\| \\
&\leq\bigl(\|\phi(0)\|+\operatorname{Lip}(\phi)\bigr)\left(\max_{i\in[N]}\|x_i\|+\max_{h\in[H]}\|W_h\|\cdot\max_{i\in[N]}\left\|\sum_{h=1}^{H}\frac{\int e^{\langle x_i,A_hy\rangle}V_hy\,\mu_N(dy)}{\int e^{\langle x_i,A_hy\rangle}\,\mu_N(dy)}\right\|\right).
\end{aligned} i ∈ [ N ] sup ∥ ϕ ( T ( ν N , x i )) ∥ ≤ ( ∥ ϕ ( 0 ) ∥ + Lip ( ϕ ) ) i ∈ [ N ] sup ∥Γ ( ν N , x i ) ∥ ≤ ( ∥ ϕ ( 0 ) ∥ + Lip ( ϕ ) ) ( i ∈ [ N ] max ∥ x i ∥ + h ∈ [ H ] max ∥ W h ∥ ⋅ i ∈ [ N ] max h = 1 ∑ H ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y ) ) .
Next, we note that for each h ∈ [ H ] h\in[H] h ∈ [ H ] , the quantity
∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) \frac{\int e^{\langle x_i,A_hy\rangle}V_hy\,\mu_N(dy)}{\int e^{\langle x_i,A_hy\rangle}\,\mu_N(dy)} ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y )
belongs to the convex hull of V h x 1 , … , V h x N V_hx_1,\ldots,V_hx_N V h x 1 , … , V h x N . Therefore,
max i ∈ [ N ] ∥ ∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) ∥ ≤ ∥ V h ∥ max i ∈ [ N ] ∥ x i ∥ . \max_{i\in[N]}\left\|\frac{\int e^{\langle x_i,A_hy\rangle}V_hy\,\mu_N(dy)}{\int e^{\langle x_i,A_hy\rangle}\,\mu_N(dy)}\right\|\leq\|V_h\|\max_{i\in[N]}\|x_i\|. i ∈ [ N ] max ∫ e ⟨ x i , A h y ⟩ μ N ( d y ) ∫ e ⟨ x i , A h y ⟩ V h y μ N ( d y ) ≤ ∥ V h ∥ i ∈ [ N ] max ∥ x i ∥.
This proves the base case. Next, suppose that the claim has been proven for all transformers defined by L L L compositions of (B.3). Let T : P ( R d ) × R d → R k T:\mathcal{P}(\mathbb{R}^d)\times\mathbb{R}^d\to\mathbb{R}^k T : P ( R d ) × R d → R k be a composition of ( L + 1 ) (L+1) ( L + 1 ) applications of (B.3). Write
T ( μ , x ) = ( ϕ L + 1 ∘ Γ L + 1 ∘ G L ) ( μ , x ) = ϕ L + 1 ( Γ L + 1 ( T L ( μ , ⋅ ) # μ , T L ( μ , x ) ) ) , T(\mu,x)=(\phi_{L+1}\circ\Gamma_{L+1}\circ G_L)(\mu,x)=\phi_{L+1}\bigl(\Gamma_{L+1}(T_L(\mu,\cdot)_{\#}\mu,T_L(\mu,x))\bigr), T ( μ , x ) = ( ϕ L + 1 ∘ Γ L + 1 ∘ G L ) ( μ , x ) = ϕ L + 1 ( Γ L + 1 ( T L ( μ , ⋅ ) # μ , T L ( μ , x )) ) ,
where T L : P ( R d ) × R d → R d L T_L:\mathcal{P}(\mathbb{R}^d)\times\mathbb{R}^d\to\mathbb{R}^{d_L} T L : P ( R d ) × R d → R d L is an L L L -layer transformer, and ϕ L + 1 ∘ Γ L + 1 : P ( R d L ) × R d L → R k \phi_{L+1}\circ\Gamma_{L+1}:\mathcal{P}(\mathbb{R}^{d_L})\times\mathbb{R}^{d_L}\to\mathbb{R}^k ϕ L + 1 ∘ Γ L + 1 : P ( R d L ) × R d L → R k is a single transformer layer. The inductive hypothesis furnishes a constant C ~ T > 0 \widetilde C_T>0 C T > 0 such that
sup x ∈ R d ∥ T L ( ν N , x ) ∥ ≤ C ~ T max i ∈ [ N ] ∥ x i ∥ . \sup_{x\in\mathbb{R}^d}\|T_L(\nu_N,x)\|\leq\widetilde C_T\max_{i\in[N]}\|x_i\|. x ∈ R d sup ∥ T L ( ν N , x ) ∥ ≤ C T i ∈ [ N ] max ∥ x i ∥.
In addition, we can write T L ( ν N ) # ν N = ∑ i = 1 N c i δ z i T_L(\nu_N)_{\#}\nu_N=\sum_{i=1}^{N}c_i\delta_{z_i} T L ( ν N ) # ν N = ∑ i = 1 N c i δ z i , where z i = T L ( ν N , x i ) z_i=T_L(\nu_N,x_i) z i = T L ( ν N , x i ) . Thus, a parallel argument to the one used to prove the base case yields
max i ∈ [ N ] ∥ T ( ν N , x i ) ∥ = sup x ∈ R d ∥ ( ϕ L + 1 ∘ Γ L + 1 ) ( T L ( ν N ) # ν N , T L ( ν N , x i ) ) ∥ ≤ max i ∈ [ N ] ∥ ( ϕ L + 1 ∘ Γ L + 1 ) ( T L ( ν N ) # ν N , z i ) ∥ ≲ max i ∈ [ N ] ∥ z i ∥ ≲ max i ∈ [ N ] ∥ x i ∥ , \begin{aligned}
\max_{i\in[N]}\|T(\nu_N,x_i)\|
&=\sup_{x\in\mathbb{R}^d}\|(\phi_{L+1}\circ\Gamma_{L+1})(T_L(\nu_N)_{\#}\nu_N,T_L(\nu_N,x_i))\|\\
&\leq\max_{i\in[N]}\|(\phi_{L+1}\circ\Gamma_{L+1})(T_L(\nu_N)_{\#}\nu_N,z_i)\|\\
&\lesssim\max_{i\in[N]}\|z_i\|\\
&\lesssim\max_{i\in[N]}\|x_i\|,
\end{aligned} i ∈ [ N ] max ∥ T ( ν N , x i ) ∥ = x ∈ R d sup ∥ ( ϕ L + 1 ∘ Γ L + 1 ) ( T L ( ν N ) # ν N , T L ( ν N , x i )) ∥ ≤ i ∈ [ N ] max ∥ ( ϕ L + 1 ∘ Γ L + 1 ) ( T L ( ν N ) # ν N , z i ) ∥ ≲ i ∈ [ N ] max ∥ z i ∥ ≲ i ∈ [ N ] max ∥ x i ∥ ,
where the inequality in the third line follows from the proof of the base case, and the inequality in the final line follows from the induction hypothesis. We conclude the proof.
Lemma B.16 guarantees that when a transformer is applied to an empirical measure ν N \nu_N ν N , the in-context map is uniformly bounded by the radius of the support of ν N \nu_N ν N , up to multiplicative constants which naturally may depend exponentially on the number of layers.
Wasserstein Law of Large Numbers
One variant of the Wasserstein law of large numbers asserts that
lim N → ∞ E W 1 ( μ , μ N ) = 0 , \lim_{N\to\infty}\mathbb{E}W_1(\mu,\mu_N)=0, N → ∞ lim E W 1 ( μ , μ N ) = 0 ,
where μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^{d}) μ ∈ P ( R d ) has finite first moment and μ N \mu_N μ N is its associated empirical measure. For every W 1 W_1 W 1 -compact set K ⊂ P 1 ( R d ) K \subset\mathcal{P}_1(\mathbb{R}^{d}) K ⊂ P 1 ( R d ) , one can actually prove that
lim N → ∞ sup μ ∈ K E W 1 ( μ , μ N ) = 0. \lim_{N \to\infty} \sup_{\mu\in K} \mathbb{E}W_1(\mu,\mu_N)=0. N → ∞ lim μ ∈ K sup E W 1 ( μ , μ N ) = 0.
Moreover, for more structured compact sets K K K , the rate of convergence in the previous display can be quantified. The following is a well-known quantitative Wasserstein law of large numbers for measures supported in a ball of radius R R R (which is a W 1 W_1 W 1 -compact set). The proof, based on a chaining argument, is included for posterity.
Proposition B.17. Let d ∈ N d \in\mathbb{N} d ∈ N with d ≥ 3 d \ge3 d ≥ 3 , let Ω ⊂ R d \Omega\subset\mathbb{R}^{d} Ω ⊂ R d be a compact set, and let R : = sup x ∈ Ω ∥ x ∥ R := \sup_{x \in\Omega} \lVert x \rVert R := sup x ∈ Ω ∥ x ∥ . Then
sup μ ∈ P ( Ω ) E W 1 ( μ , μ N ) ≤ C d R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d for all N ∈ N , \sup_{\mu\in\mathcal{P}(\Omega)} \mathbb{E}W_1(\mu,\mu_N) \le C_dR\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}\qquad\text{for all }N\in\mathbb{N}, μ ∈ P ( Ω ) sup E W 1 ( μ , μ N ) ≤ C d R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d for all N ∈ N , where C d C_d C d is a constant depending only on d d d and μ N = 1 N ∑ n = 1 N δ X n \mu_N=\frac{1}{N}\sum_{n=1}^{N}\delta_{X_n} μ N = N 1 ∑ n = 1 N δ X n for X n ∼ μ X_n\sim\mu X n ∼ μ iid.
Proof. We will prove the result for Ω = B R \Omega=B_R Ω = B R , but the proof can easily be adapted to the case of general Ω \Omega Ω . Let Lip 1 ( R ) = { f : B R → R ∣ f is 1-Lipschitz , f ( 0 ) = 0 } \operatorname{Lip}_1(R)=\{f:B_R\to\mathbb{R}\mid f\text{ is 1-Lipschitz}, f(0)=0\} Lip 1 ( R ) = { f : B R → R ∣ f is 1-Lipschitz , f ( 0 ) = 0 } . Then
E W 1 ( μ , μ N ) = E [ sup f ∈ Lip 1 ( R ) 1 N ∑ i = 1 N ( f ( X i ) − E μ [ f ] ) ] \mathbb{E}W_1(\mu,\mu_N)=\mathbb{E}\left[\sup_{f\in\operatorname{Lip}_1(R)}\frac{1}{N}\sum_{i=1}^{N}\left(f(X_i)-\mathbb{E}_{\mu}[f]\right)\right] E W 1 ( μ , μ N ) = E [ f ∈ Lip 1 ( R ) sup N 1 i = 1 ∑ N ( f ( X i ) − E μ [ f ] ) ]
≤ 2 E { σ 1 , … , σ N } ∼ ( Unif { 1 , − 1 } ) ⊗ N [ sup f ∈ Lip 1 ( R ) 1 N ∑ i = 1 N σ i f ( X i ) ] \le2\mathbb{E}_{\{\sigma_1,\ldots,\sigma_N\}\sim(\operatorname{Unif}\{1,-1\})^{\otimes N}}\left[\sup_{f\in\operatorname{Lip}_1(R)}\frac{1}{N}\sum_{i=1}^{N}\sigma_i f(X_i)\right] ≤ 2 E { σ 1 , … , σ N } ∼ ( Unif { 1 , − 1 } ) ⊗ N [ f ∈ Lip 1 ( R ) sup N 1 i = 1 ∑ N σ i f ( X i ) ]
≤ 2 inf τ > 0 ( τ + 12 N ∫ τ 2 R log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) d ϵ ) , \le2\inf_{\tau>0}\left(\tau+\frac{12}{\sqrt{N}}\int_{\tau}^{2R}\sqrt{\log\mathcal{N}(\operatorname{Lip}_1(R),\lVert\cdot\rVert_{\infty},\epsilon)}\,\mathrm{d}\epsilon\right), ≤ 2 τ > 0 inf ( τ + N 12 ∫ τ 2 R log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) d ϵ ) ,
where we applied the symmetrization identity for Rademacher complexities (Shalev-Shwartz and Ben-David [50 ] ) and Dudley’s chaining bound (Dudley [20 ] ). Note that the diameter bound in the integral follows from the fact that f ∈ Lip 1 ( R ) f\in\operatorname{Lip}_1(R) f ∈ Lip 1 ( R ) maps B R B_R B R into B R B_R B R . Next, we need to estimate the covering number of the class of 1-Lipschitz functions. Dudley [20 ] proves that
log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) ≲ ( 1 + R ϵ ) d log ( 1 + R / ϵ ) , \log\mathcal{N}(\operatorname{Lip}_1(R),\lVert\cdot\rVert_{\infty},\epsilon)\lesssim\left(1+\frac{R}{\epsilon}\right)^d\log(1+R/\epsilon), log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) ≲ ( 1 + ϵ R ) d log ( 1 + R / ϵ ) ,
where the implicit constant is dimension-dependent. We can then upper bound the integral as
∫ τ 2 R log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) d ϵ ≲ ∫ τ R ( 1 + R ϵ ) d log ( 1 + R / ϵ ) d ϵ ≤ log ( 1 + R / τ ) ∫ τ R ( 1 + R ϵ ) d / 2 d ϵ \begin{aligned}
\int_{\tau}^{2R}\sqrt{\log\mathcal{N}(\operatorname{Lip}_1(R),\lVert\cdot\rVert_{\infty},\epsilon)}\,\mathrm{d}\epsilon
\lesssim\int_{\tau}^{R}\sqrt{\left(1+\frac{R}{\epsilon}\right)^d\log(1+R/\epsilon)}\,\mathrm{d}\epsilon\\
&\le\sqrt{\log(1+R/\tau)}\int_{\tau}^{R}\left(1+\frac{R}{\epsilon}\right)^{d/2}\,\mathrm{d}\epsilon
\end{aligned} ∫ τ 2 R log N ( Lip 1 ( R ) , ∥ ⋅ ∥ ∞ , ϵ ) d ϵ ≲ ∫ τ R ( 1 + ϵ R ) d log ( 1 + R / ϵ ) d ϵ ≤ log ( 1 + R / τ ) ∫ τ R ( 1 + ϵ R ) d /2 d ϵ
≲ log ( 1 + R / τ ) ( ( R − τ ) + R d / 2 ∫ τ R ϵ − d / 2 d ϵ ) \lesssim\sqrt{\log(1+R/\tau)}\left((R-\tau)+R^{d/2}\int_{\tau}^{R}\epsilon^{-d/2}\,\mathrm{d}\epsilon\right) ≲ log ( 1 + R / τ ) ( ( R − τ ) + R d /2 ∫ τ R ϵ − d /2 d ϵ )
≲ log ( 1 + R / τ ) ( ( R − τ ) + 2 d − 2 R d / 2 τ ( 2 − d ) / 2 ) \lesssim\sqrt{\log(1+R/\tau)}\left((R-\tau)+\frac{2}{d-2}R^{d/2}\tau^{(2-d)/2}\right) ≲ log ( 1 + R / τ ) ( ( R − τ ) + d − 2 2 R d /2 τ ( 2 − d ) /2 )
≲ log ( 1 + R / τ ) R d / 2 τ ( 2 − d ) / 2 . \lesssim\sqrt{\log(1+R/\tau)}R^{d/2}\tau^{(2-d)/2}. ≲ log ( 1 + R / τ ) R d /2 τ ( 2 − d ) /2 .
Thus, taking τ = R N − 1 / d \tau=RN^{-1/d} τ = R N − 1/ d , we get the bound
E W 1 ( μ , μ N ) ≲ R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d , \mathbb{E}W_1(\mu,\mu_N)\lesssim R\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}, E W 1 ( μ , μ N ) ≲ R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d ,
where the implicit constants are independent of R R R and depend on μ \mu μ only through the dimension d d d . This proves that
sup μ ∈ P ( B R ) E W 1 ( μ , μ N ) ≲ R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . \sup_{\mu\in\mathcal{P}(B_R)}\mathbb{E}W_1(\mu,\mu_N)\lesssim R\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}. μ ∈ P ( B R ) sup E W 1 ( μ , μ N ) ≲ R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d .
The proof is complete.
Below, we extend the Wasserstein law of large numbers from P ( B R ) \mathcal{P}(B_R) P ( B R ) to S G α , β ( R d ) \mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) SG α , β ( R d ) using a truncation argument.
Proposition B.18. Fix d ∈ N d \in\mathbb{N} d ∈ N with d ≥ 3 d \ge3 d ≥ 3 . There exists a constant C d , α , β C_{d,\alpha,\beta} C d , α , β depending only on d d d , α \alpha α , and β \beta β such that
sup μ ∈ S G α , β ( R d ) E W 1 ( μ , μ N ) ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)} \mathbb{E}W_1(\mu,\mu_N) \le C_{d,\alpha,\beta}\sqrt{\log(N)(1+\log(1+N^{1/d}))}N^{-1/d}. μ ∈ SG α , β ( R d ) sup E W 1 ( μ , μ N ) ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1/ d )) N − 1/ d . Proof. For R > 0 R > 0 R > 0 and μ ∈ P ( R d ) \mu\in\mathcal{P}(\mathbb{R}^d) μ ∈ P ( R d ) , we let Π R : R d → B R ⊂ R d \Pi_R:\mathbb{R}^d \to B_R \subset\mathbb{R}^d Π R : R d → B R ⊂ R d denote the truncation operator to B R B_R B R and μ R = ( Π R ) # μ \mu_R=(\Pi_R)_{\#}\mu μ R = ( Π R ) # μ . Given μ ∈ S G α , β ( R d ) \mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d) μ ∈ SG α , β ( R d ) and iid samples X 1 , … , X N ∼ μ X_1,\ldots,X_N \sim\mu X 1 , … , X N ∼ μ , we define the random measures μ N = 1 N ∑ i = 1 N δ X i \mu_N=\frac{1}{N}\sum_{i=1}^N\delta_{X_i} μ N = N 1 ∑ i = 1 N δ X i and μ N , R = 1 N ∑ i = 1 N δ Π R ( X i ) \mu_{N,R}=\frac{1}{N}\sum_{i=1}^N\delta_{\Pi_R(X_i)} μ N , R = N 1 ∑ i = 1 N δ Π R ( X i ) . Then by the triangle inequality, we have
E W 1 ( μ , μ N ) ≤ W 1 ( μ , μ R ) + E W 1 ( μ R , μ N , R ) + E W 1 ( μ N , R , μ N ) . \mathbb{E}W_1(\mu,\mu_N) \le W_1(\mu,\mu_R)+\mathbb{E}W_1(\mu_R,\mu_{N,R})+\mathbb{E}W_1(\mu_{N,R},\mu_N). E W 1 ( μ , μ N ) ≤ W 1 ( μ , μ R ) + E W 1 ( μ R , μ N , R ) + E W 1 ( μ N , R , μ N ) . For the first term, we have
W 1 ( μ , μ R ) ≤ ∫ ∥ x − Π R ( x ) ∥ μ ( d x ) W_1(\mu,\mu_R) \le\int\lVert x-\Pi_R(x)\rVert\,\mu(dx) W 1 ( μ , μ R ) ≤ ∫ ∥ x − Π R ( x )∥ μ ( d x ) ≤ ∫ ∥ x ∥ > R ∥ x ∥ μ ( d x ) \le\int_{\lVert x\rVert>R}\lVert x\rVert\,\mu(dx) ≤ ∫ ∥ x ∥ > R ∥ x ∥ μ ( d x ) ≤ ( sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ 2 ν ( d x ) ) 1 / 2 α exp ( − R 2 2 β ) . \le\left(\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int\lVert x\rVert^2\nu(dx)\right)^{1/2}\sqrt{\alpha}\exp\left(-\frac{R^2}{2\beta}\right). ≤ ( ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ 2 ν ( d x ) ) 1/2 α exp ( − 2 β R 2 ) . By Lemma B.1, the supremum above is finite. For the second term, Proposition B.17 guarantees that
E W 1 ( μ R , μ N , R ) ≤ C d R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d \mathbb{E}W_1(\mu_R,\mu_{N,R})\le C_dR\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d} E W 1 ( μ R , μ N , R ) ≤ C d R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d for some dimension-dependent constant C d C_d C d , uniformly in μ \mu μ . For the third term, we have
E W 1 ( μ N , R , μ N ) ≤ E [ 1 N ∑ i = 1 N ∥ Π R ( X i ) − X i ∥ ] \mathbb{E}W_1(\mu_{N,R},\mu_N)\le\mathbb{E}\left[\frac{1}{N}\sum_{i=1}^N\lVert\Pi_R(X_i)-X_i\rVert\right] E W 1 ( μ N , R , μ N ) ≤ E [ N 1 i = 1 ∑ N ∥ Π R ( X i ) − X i ∥ ] = ∫ ∥ Π R ( x ) − x ∥ μ ( d x ) = \int\lVert\Pi_R(x)-x\rVert\,\mu(dx) = ∫ ∥ Π R ( x ) − x ∥ μ ( d x ) ≤ ( sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ 2 ν ( d x ) ) 1 / 2 α exp ( − R 2 2 β ) \le\left(\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int\lVert x\rVert^2\nu(dx)\right)^{1/2}\sqrt{\alpha}\exp\left(-\frac{R^2}{2\beta}\right) ≤ ( ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ 2 ν ( d x ) ) 1/2 α exp ( − 2 β R 2 ) yet again. We therefore have that
sup μ ∈ S G α , β ( R d ) E W 1 ( μ , μ N ) ≤ 2 ( sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ 2 μ ( d x ) ) 1 / 2 α exp ( − R 2 2 β ) \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\mathbb{E}W_1(\mu,\mu_N)\le2\left(\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int\lVert x\rVert^2\mu(dx)\right)^{1/2}\sqrt{\alpha}\exp\left(-\frac{R^2}{2\beta}\right) μ ∈ SG α , β ( R d ) sup E W 1 ( μ , μ N ) ≤ 2 ( ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ 2 μ ( d x ) ) 1/2 α exp ( − 2 β R 2 ) + C d R ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . {}+C_dR\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}. + C d R ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d . By choosing R = ( 2 β ) / d log ( N ) R=\sqrt{(2\beta)/d\log(N)} R = ( 2 β ) / d log ( N ) , we have
sup μ ∈ S G α , β ( R d ) E W 1 ( μ , μ N ) ≤ 2 ( sup ν ∈ S G α , β ( R d ) ∫ ∥ x ∥ 2 μ ( d x ) ) 1 / 2 α N − 1 / d \sup_{\mu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\mathbb{E}W_1(\mu,\mu_N)\le2\left(\sup_{\nu\in\mathrm{SG}_{\alpha,\beta}(\mathbb{R}^d)}\int\lVert x\rVert^2\mu(dx)\right)^{1/2}\sqrt{\alpha}N^{-1/d} μ ∈ SG α , β ( R d ) sup E W 1 ( μ , μ N ) ≤ 2 ( ν ∈ SG α , β ( R d ) sup ∫ ∥ x ∥ 2 μ ( d x ) ) 1/2 α N − 1/ d + C d ( 2 β ) / d log ( N ) ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . {}+C_d\sqrt{(2\beta)/d\log(N)}\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d}. + C d ( 2 β ) / d log ( N ) ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d . ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d \le C_{d,\alpha,\beta}\sqrt{\log(N)}\left(1+\sqrt{\log(1+N^{1/d})}\right)N^{-1/d} ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1/ d ) ) N − 1/ d ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1 / d ) ) N − 1 / d . \le C_{d,\alpha,\beta}\sqrt{\log(N)(1+\log(1+N^{1/d}))}N^{-1/d}. ≤ C d , α , β log ( N ) ( 1 + log ( 1 + N 1/ d )) N − 1/ d . This concludes the proof.
Covering Number Estimates
The proof of Theorem 3.10 uses estimates on the covering numbers of various function classes associated with multi-head attention layers. We first quote the standard upper bound on the metric entropy of Euclidean balls, which can be found, e.g., in work of Chewi et al. [18 ] .
Lemma B.19. For any ϵ > 0 \epsilon> 0 ϵ > 0 and R > 0 R > 0 R > 0 , it holds that
log ( N ( B R ; ϵ , ∥ ⋅ ∥ ) ) ≤ d log ( 1 + 2 R ϵ − 1 ) . \log\left(\mathcal{N}(B_R;\epsilon,\lVert\cdot\rVert)\right) \le d\log(1+2R\epsilon^{-1}). log ( N ( B R ; ϵ , ∥ ⋅ ∥) ) ≤ d log ( 1 + 2 R ϵ − 1 ) .
The following result contains the main upper bound used to control the entropy integrals associated with multi-head attention.
Lemma B.20. Define the function classes
F 1 , i ( R ) : = { y ↦ e ⟨ x , A y ⟩ ( V y ) i : x ∈ B R } \mathcal{F}_{1,i}(R):=\{y\mapsto e^{\langle x,Ay\rangle}(Vy)_i:x\in B_R\} F 1 , i ( R ) := { y ↦ e ⟨ x , A y ⟩ ( V y ) i : x ∈ B R } and
F 2 ( R ) : = { y ↦ e ⟨ x , A y ⟩ : x ∈ B R } . \mathcal{F}_2(R):=\{y\mapsto e^{\langle x,Ay\rangle}:x\in B_R\}. F 2 ( R ) := { y ↦ e ⟨ x , A y ⟩ : x ∈ B R } . Then, for any ϵ > 0 \epsilon> 0 ϵ > 0 , it holds that
max i ∈ [ d ] log N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ d log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) \max_{i\in[d]}\log\mathcal{N}(\mathcal{F}_{1,i}(R);\epsilon,\lVert\cdot\rVert_{L^\infty(B_R)})\le d\log\left(1+2c_Ac_VR^3e^{c_AR^2}\epsilon^{-1}\right) i ∈ [ d ] max log N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ d log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) and
log N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ d log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) . \log\mathcal{N}(\mathcal{F}_2(R);\epsilon,\lVert\cdot\rVert_{L^\infty(B_R)})\le d\log\left(1+2c_AR^2e^{c_AR^2}\epsilon^{-1}\right). log N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ d log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) . Proof. Fix i ∈ [ d ] i\in[d] i ∈ [ d ] . Observe that, for any x ∈ B R x\in B_R x ∈ B R , x ′ ∈ B R x'\in B_R x ′ ∈ B R , and y ∈ B R y\in B_R y ∈ B R , it holds that
∣ e ⟨ x , A y ⟩ ( V y ) i − e ⟨ x ′ , A y ⟩ ( V y ) i ∣ ≤ c V R ∣ e ⟨ x , A y ⟩ − e ⟨ x ′ , A y ⟩ ∣ . \left|e^{\langle x,Ay\rangle}(Vy)_i-e^{\langle x',Ay\rangle}(Vy)_i\right|\le c_VR\left|e^{\langle x,Ay\rangle}-e^{\langle x',Ay\rangle}\right|. e ⟨ x , A y ⟩ ( V y ) i − e ⟨ x ′ , A y ⟩ ( V y ) i ≤ c V R e ⟨ x , A y ⟩ − e ⟨ x ′ , A y ⟩ . The mapping x ↦ e ⟨ x , A y ⟩ x\mapsto e^{\langle x,Ay\rangle} x ↦ e ⟨ x , A y ⟩ has gradient given by e ⟨ x , A y ⟩ A y e^{\langle x,Ay\rangle}Ay e ⟨ x , A y ⟩ A y , and hence is c A R e c A R 2 c_ARe^{c_AR^2} c A R e c A R 2 -Lipschitz on B R B_R B R when y ∈ B R y\in B_R y ∈ B R . Along with the previous estimate, this implies that
∣ e ⟨ x , A y ⟩ ( V y ) i − e ⟨ x ′ , A y ⟩ ( V y ) i ∣ ≤ c A c V R 2 e c A R 2 ∥ x − x ′ ∥ \left|e^{\langle x,Ay\rangle}(Vy)_i-e^{\langle x',Ay\rangle}(Vy)_i\right|\le c_Ac_VR^2e^{c_AR^2}\lVert x-x'\rVert e ⟨ x , A y ⟩ ( V y ) i − e ⟨ x ′ , A y ⟩ ( V y ) i ≤ c A c V R 2 e c A R 2 ∥ x − x ′ ∥ for all ( x , x ′ , y ) ∈ ( B R ) 3 (x,x',y)\in(B_R)^3 ( x , x ′ , y ) ∈ ( B R ) 3 and i ∈ [ d ] i\in[d] i ∈ [ d ] .
It follows that a ( c A − 1 c V − 1 R − 2 e − c A R 2 ) ϵ (c_A^{-1}c_V^{-1}R^{-2}e^{-c_AR^2})\epsilon ( c A − 1 c V − 1 R − 2 e − c A R 2 ) ϵ -covering of B R B_R B R in the Euclidean norm induces an ϵ \epsilon ϵ covering of F 1 , i ( R ) \mathcal{F}_{1,i}(R) F 1 , i ( R ) in the L ∞ ( B R ) L^\infty(B_R) L ∞ ( B R ) norm. Therefore,
max i ∈ [ d ] log ( N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) ≤ log ( N ( B R ; ( c A − 1 c V − 1 R − 2 e − c A R 2 ) ϵ , ∥ ⋅ ∥ ) ) \max_{i\in[d]}\log\left(\mathcal{N}(\mathcal{F}_{1,i}(R);\epsilon,\lVert\cdot\rVert_{L^\infty(B_R)})\right)
\le\log\left(\mathcal{N}\left(B_R;(c_A^{-1}c_V^{-1}R^{-2}e^{-c_AR^2})\epsilon,\lVert\cdot\rVert\right)\right) i ∈ [ d ] max log ( N ( F 1 , i ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ) ≤ log ( N ( B R ; ( c A − 1 c V − 1 R − 2 e − c A R 2 ) ϵ , ∥ ⋅ ∥ ) ) ≤ d log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) , \le d\log\left(1+2c_Ac_VR^3e^{c_AR^2}\epsilon^{-1}\right), ≤ d log ( 1 + 2 c A c V R 3 e c A R 2 ϵ − 1 ) , where the final estimate follows from Lemma B.19. This proves the first inequality in the statement of the lemma. The second inequality follows by an essentially analogous argument. Using the fact that x ↦ e ⟨ x , A y ⟩ x\mapsto e^{\langle x,Ay\rangle} x ↦ e ⟨ x , A y ⟩ is c A R e c A R 2 c_ARe^{c_AR^2} c A R e c A R 2 -Lipschitz on B R B_R B R uniformly in y ∈ B R y\in B_R y ∈ B R , it holds that
log N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ log ( N ( B R ; c A − 1 R − 1 e − c A R 2 ϵ , ∥ ⋅ ∥ ) ) \log\mathcal{N}(\mathcal{F}_2(R);\epsilon,\lVert\cdot\rVert_{L^\infty(B_R)})\le\log\left(\mathcal{N}(B_R;c_A^{-1}R^{-1}e^{-c_AR^2}\epsilon,\lVert\cdot\rVert)\right) log N ( F 2 ( R ) ; ϵ , ∥ ⋅ ∥ L ∞ ( B R ) ) ≤ log ( N ( B R ; c A − 1 R − 1 e − c A R 2 ϵ , ∥ ⋅ ∥) ) ≤ d log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) , \le d\log\left(1+2c_AR^2e^{c_AR^2}\epsilon^{-1}\right), ≤ d log ( 1 + 2 c A R 2 e c A R 2 ϵ − 1 ) , where the last line follows from Lemma B.19.
The following elementary estimate is useful in upper bounding entropy integrals.
Lemma B.21. For any C > 0 C>0 C > 0 , it holds that
∫ 0 C log ( 1 + x − 1 ) d x ≤ 2 C . \int_0^C\sqrt{\log(1+x^{-1})}\,dx\le2\sqrt{C}. ∫ 0 C log ( 1 + x − 1 ) d x ≤ 2 C .
Proof. Since 1 + x ≤ e x 1+x \le e^{x} 1 + x ≤ e x for x > 0 x>0 x > 0 , it follows that
∫ 0 C log ( 1 + x − 1 ) d x ≤ ∫ 0 C x − 1 / 2 d x = 2 C . \int_{0}^{C} \sqrt{\log(1+x^{-1})}\,\mathrm{d}x \le\int_{0}^{C} x^{-1/2}\,\mathrm{d}x = 2\sqrt{C}. ∫ 0 C log ( 1 + x − 1 ) d x ≤ ∫ 0 C x − 1/2 d x = 2 C .
The proof is complete.