Introduction
Introduced by Vaswani et al. (2017), transformers have driven major advances in natural language processing (Devlin et al., [15 ] ), computer vision (Dosovitskiy et al., [16 ] ) and reasoning (Wei et al., 2022). This widespread success motivates several key questions regarding their architecture, including their expressive power, their ‘inductive bias’ or feature-learning abilities, and ultimately their ability to generalize in the current pretrain/post-train paradigm.
Towards this long-term goal, the first stepping stone is to characterize a flexible class of transformer architectures with enough expressive power to interpolate any given dataset, as a basis for studying scaling laws. A standard approach to studying expressivity in neural architectures is to consider infinitely wide limits, starting with the classic universal approximation theory of Cybenko [13 ] , Hornik et al. [23 ] and others in the single-hidden layer setting. In this context, the design of simple hypothesis spaces (e.g. random feature models) with universal approximation has enabled the subsequent study of non-linear feature learning. Given the prevalent role of depth in the success of recent deep learning models, it is natural to ask whether other mechanisms for universal approximation exist where depth is the instrumental variable; in other words, to consider the deep analogs of random feature models.
In this work we focus on transformer models, and specifically their self-attention modules. Motivated by recent interest on looped transformers, we make an additional distinction: while traditional memo-rization asks whether, for any given task, it is possible to adjust the parameters of the architecture to produce prescribed outputs, we are interested in capturing the notion of parameter reuse. Specifically, we ask whether it is possible to predefine a finite family of attention blocks a priori , without looking at the data, and then achieve exact interpolation only by choosing which block, and with which scalar gain, to use at each layer. Following the fixed-generator formulations in Cuchiero et al. [12 ] ; Agrachov & Letrouit (2026), we call this property universal interpolation .
These questions are particularly relevant to recent Transformer architectures that reuse a small number of blocks across depth. Such recurrent-depth or looped architectures have recently been explored at scale in language models, including recurrent-depth models [19 ] , Mixture-of-Recursions [6 ] , Nanbeige4.2-3B [29 ] , and Hyperloop Transformers (Zeitoun et al., 2026). Rather than introducing independent parameters at every layer, these models obtain additional effective depth by repeatedly applying the same transformations. This makes it natural to ask how much expressive power can arise from depth and composition alone when the available transformations are fixed.
Exact interpolation. A large body of work studies expressivity of neural networks by asking whether, for each finite dataset, network parameters can be chosen to match the prescribed outputs exactly. Such results characterize the fitting capacity of an architecture, while allowing all of its parameters to depend on the dataset. Ruiz-Balet & Zuazua [30 ] establish exact interpolation of finite datasets of distinct points by ReLU neural ODEs in dimension at least two, using data-dependent controls and biases; one active hidden unit suffices. For transformers, Kajitsuka & Sato [25 ] construct contextual representations with one attention head and rank-one projections, followed by a feed-forward decoder whose size grows with the data. Dana et al. [14 ] prove next-token memorization for attention-only models with constructed embeddings and a readout, with capacity controlled by the number and dimension of heads. Alcalde et al. [3 ] obtain exact interpolation of output token sets, without prescribed token correspondences, using attention and ReLU feed-forward blocks with explicit depth bounds. Geshkovski et al. [20 ] instead study interpolation of token distributions on the sphere using attention, perceptrons, and spherical layer normalization. In all of these settings, the transformations used by the network may be adapted to the particular interpolation problem.
Universal approximation. A related notion of expressivity is universal approximation, which asks whether a network class can approximate every mapping in a prescribed function class to arbitrary accuracy, under an appropriate topology. Here too, the network parameters may depend on the target function; universality concerns the network class rather than a fixed collection of transformations. Classical results establish universal approximation for sufficiently wide networks with a single hidden layer and a continuous sigmoidal activation [e.g. 13 , 23 ] . Lin & Jegelka [26 ] establish L 1 L^1 L 1 universal approximation for deep ReLU residual networks with one-neuron hidden layers and target-dependent weights and biases. From a control-theoretic perspective, Tabuada & Gharesifard [35 ] derive approximation guarantees through ensemble controllability and monotonicity. For transformers, Yun et al. (2020) establish L p L^p L p approximation of continuous permutation-equivariant mappings with compact support at fixed sequence length, using two attention heads of width one and feed-forward blocks of width four. Furuya et al. [18 ] obtain uniform approximation of continuous in-context mappings on compact token domains, with token dimension and head count bounded independently of context length and accuracy while retaining tokenwise MLPs. Hu et al. [24 ] establish approximation using two attention layers supplemented with linear transformations. These results address approximation of function classes rather than exact interpolation under a fixed set of reusable transformations.
Universal interpolation with fixed generators. Beyond classical exact interpolation, one can ask whether the transformations available to the network can be fixed in advance and reused across datasets. Cuchiero et al. [12 ] construct five fixed vector fields that interpolate every finite dataset of distinct points in a bounded connected domain of dimension at least two, with only the scalar controls depending on the data. Related fixed-family interpolation results have been obtained for general neural ODEs [21 ] and for smooth-activation residual networks [36 ] . For ReLU dynamics, Cai & Duan [9 ] establish exact interpolation using arbitrary affine vector fields together with a fixed ReLU field. Combining their result with an exact factorization of affine flow maps into elementary linear flows and translations yields a finite family of fixed generators, independent of the dataset and its size, with biases allowed. Closest to our work, Agrachev & Letrouit [1 ] prove that two generic equivariant vector fields suffice for simultaneous interpolation of arbitrarily many compatible point clouds. Their genericity is formulated over an infinite-dimensional space of vector fields, and they explicitly leave extensions to standard softmax attention as an open direction. Establishing such a result is one focus of our work.
Our contributions. We formalize exact and universal interpolation (Definitions 2.3 and 2.4), two related notions used in the literature, and give simple criteria that follow directly from classical theorems in control theory (§ 2.2.1 ). We also provide a PyTorch implementation to investigate these criteria numerically (§ 2.2.2 ). Our main contributions are:
to transfer exact (resp. universal) interpolation from continuous to finite depth under the corresponding Lie-rank conditions (Proposition 2.9, resp. Proposition 2.10);
to establish universal interpolation with frozen random noncausal attention blocks for any prescribed number of heads, using a number of blocks that grows linearly with the batch size (Theorem 3.3);
to show that only two frozen random single-head noncausal attention blocks suffice for universal interpolation on a connected domain of full measure (Theorem 3.5);
to rule out exact and universal interpolation on the full configuration space for causal attention when the batch size exceeds the token dimension, by characterizing the exact dimension of the associated Lie-algebra trace (Proposition 3.8);
to recover universal interpolation for causal attention on each connected component of a class of batches sharing the same linear relations among their first tokens (Corollary 3.10).
Exact interpolation and universal interpolation
In this section, we formulate exact and universal interpolation in continuous depth and show how the resulting criteria transfer to finite-depth residual networks. We begin by recalling the standard continuous-depth formulation of residual architectures.
From residual layers to continuous-depth networks
Given a partition 0 = s 0 < ⋯ < s L = : S 0=s_0<\cdots<s_L=:S 0 = s 0 < ⋯ < s L =: S , a residual layer takes the form
x k + 1 = x k + h k f θ k ( x k ) , h k = s k + 1 − s k . x_{k+1}=x_k+h_kf_{\theta_k}(x_k),\qquad h_k=s_{k+1}-s_k. x k + 1 = x k + h k f θ k ( x k ) , h k = s k + 1 − s k .
Taking θ ( s ) = θ k \theta(s)=\theta_k θ ( s ) = θ k on [ s k , s k + 1 ) [s_k,s_{k+1}) [ s k , s k + 1 ) , this update is a forward Euler discretization of the continuous-depth dynamics [27 , 22 , 10 ]
d x ( s ) d s = f θ ( s ) ( x ( s ) ) , x ( 0 ) = x 0 . (1) \frac{\mathrm{d}x(s)}{\mathrm{d}s}=f_{\theta(s)}(x(s)),\qquad x(0)=x_0. \tag*{(1)} d s d x ( s ) = f θ ( s ) ( x ( s )) , x ( 0 ) = x 0 . (1)
where s ∈ [ 0 , S ] s\in[0,S] s ∈ [ 0 , S ] represents continuous depth and the parameters θ ( s ) \theta(s) θ ( s ) may vary with depth but are shared across inputs.
For self-attention, we represent each sequence by its ordered token coordinates x = vec ( x 1 , … , x n ) ∈ R n d x=\operatorname{vec}(x_1,\ldots,x_n)\in\mathbb{R}^{nd} x = vec ( x 1 , … , x n ) ∈ R n d and use the finite-dimensional ODE formulation (1) . This representation retains the prescribed tokenwise input–output correspondences, which are not encoded by an empirical-measure description [31 ] .
We consider two classes of vector fields, corresponding to residual ReLU networks and residual self-attention networks.
Example 2.1 (Continuous-depth ResNets). A bias-free residual block with one ReLU hidden layer has update
f U , V : x ∈ R d ↦ U σ ( V T x ) ∈ R d , (2) f_{U,V}:x\in\mathbb{R}^{d}\mapsto U\sigma(V^{\mathsf{T}}x)\in\mathbb{R}^{d}, \tag*{(2)} f U , V : x ∈ R d ↦ U σ ( V T x ) ∈ R d , (2) where σ ( t ) : = max { t , 0 } \sigma(t):=\max\{t,0\} σ ( t ) := max { t , 0 } is applied componentwise and U , V ∈ R d × r U,V\in\mathbb{R}^{d\times r} U , V ∈ R d × r , with r r r the hidden width.
Example 2.2 (Continuous-depth self-attention). For x = vec ( x 1 , … , x n ) ∈ R n d x=\operatorname{vec}(x_1,\ldots,x_n)\in\mathbb{R}^{nd} x = vec ( x 1 , … , x n ) ∈ R n d , let J = ( J i ) i = 1 n \mathcal{J}=(\mathcal{J}_i)_{i=1}^{n} J = ( J i ) i = 1 n specify the visible key positions. An H H H -head block updates token i i i by
[ f W , V ( x ) ] i : = ∑ h = 1 H ∑ j ∈ J i e ⟨ W h x i , x j ⟩ V h x j ∑ q ∈ J i e ⟨ W h x i , x q ⟩ , i = 1 , … , n . (3) [f_{\mathbf{W},\mathbf{V}}(x)]_i:=\sum_{h=1}^{H}\frac{\sum_{j\in\mathcal{J}_i}\mathrm{e}^{\langle W_hx_i,x_j\rangle}V_hx_j}{\sum_{q\in\mathcal{J}_i}\mathrm{e}^{\langle W_hx_i,x_q\rangle}},\qquad i=1,\ldots,n. \tag*{(3)} [ f W , V ( x ) ] i := h = 1 ∑ H ∑ q ∈ J i e ⟨ W h x i , x q ⟩ ∑ j ∈ J i e ⟨ W h x i , x j ⟩ V h x j , i = 1 , … , n . (3) Here W = ( W h ) h = 1 H \mathbf{W}=(W_h)_{h=1}^{H} W = ( W h ) h = 1 H and V = ( V h ) h = 1 H \mathbf{V}=(V_h)_{h=1}^{H} V = ( V h ) h = 1 H , with the standard parametrization (Vaswani et al., 2017)
W h = ( W h K ) T W h Q r h , V h = W h O W h V , W_h=\frac{(W_h^{K})^{\mathsf{T}}W_h^{Q}}{\sqrt{r_h}},\qquad V_h=W_h^{O}W_h^{V}, W h = r h ( W h K ) T W h Q , V h = W h O W h V , where W h Q , W h K , W h V ∈ R r h × d W_h^{Q},W_h^{K},W_h^{V}\in\mathbb{R}^{r_h\times d} W h Q , W h K , W h V ∈ R r h × d and W h O ∈ R d × r h W_h^{O}\in\mathbb{R}^{d\times r_h} W h O ∈ R d × r h . The head widths r h r_h r h are arbitrary positive integers, including the standard choice r h = d / H r_h=d/H r h = d / H when H H H divides d d d . We write f W , V f_{\mathbf{W},\mathbf{V}} f W , V for noncausal attention (J i = { 1 , … , n } \mathcal{J}_i=\{1,\ldots,n\} J i = { 1 , … , n } ) and f W , V c f_{\mathbf{W},\mathbf{V}}^{\mathrm{c}} f W , V c for causal attention (J i = { 1 , … , i } \mathcal{J}_i=\{1,\ldots,i\} J i = { 1 , … , i } ).
Exact and universal interpolation
Let F = { f θ : R p → R p : θ ∈ Θ } \mathcal{F} = \{f_\theta: \mathbb{R}^{p} \to\mathbb{R}^{p} : \theta\in\Theta\} F = { f θ : R p → R p : θ ∈ Θ } be the family of available updates, with each f θ f_\theta f θ locally Lipschitz. We represent a dataset of N N N samples by its vectorisation X = vec ( x 1 , … , x N ) ∈ R p N X = \operatorname{vec}(x^1,\ldots,x^N) \in\mathbb{R}^{pN} X = vec ( x 1 , … , x N ) ∈ R pN , where ( x 1 , … , x N ) (x^1,\ldots,x^N) ( x 1 , … , x N ) is an ordered batch. For residual ReLU networks, each sample is a vector in R d \mathbb{R}^{d} R d , so p = d p=d p = d . For self-attention, each sample is a sequence of n n n tokens vectorized in R n d \mathbb{R}^{nd} R n d , so p = n d p=nd p = n d and N N N counts sequences rather than tokens. Applying the same weights to the whole batch gives the lifted update
f θ ( N ) ( X ) : = ( f θ ( x 1 ) , … , f θ ( x N ) ) . f_\theta^{(N)}(X) := \left(f_\theta(x^1),\ldots,f_\theta(x^N)\right). f θ ( N ) ( X ) := ( f θ ( x 1 ) , … , f θ ( x N ) ) .
A depth-dependent choice of parameters θ ( ⋅ ) \theta(\cdot) θ ( ⋅ ) is called a control ; throughout, controls are piecewise constant with finitely many depth intervals.
Architectural symmetries and preserved relations constrain which input–output pairs can be interpolated. We study interpolation on a chosen configuration domain M N ⊆ R p N \mathcal{M}_N \subseteq\mathbb{R}^{pN} M N ⊆ R pN , specified for each architecture below. Both input and target configurations must lie in this domain, with targets represented in the same space as the inputs.
Definition 2.3 (Exact interpolation). Fix N ≥ 1 N \ge1 N ≥ 1 and a nonempty, open, connected set M N ⊆ R p N \mathcal{M}_N \subseteq\mathbb{R}^{pN} M N ⊆ R pN . For S > 0 S > 0 S > 0 , a piecewise-constant control θ : [ 0 , S ] → Θ \theta: [0,S] \to\Theta θ : [ 0 , S ] → Θ with finitely many depth intervals exactly interpolates a pair X , Y ∈ M N X,Y \in\mathcal{M}_N X , Y ∈ M N if the solution of
Z ˙ ( s ) = f θ ( s ) ( N ) ( Z ( s ) ) , Z ( 0 ) = X , \dot{Z}(s) = f_{\theta(s)}^{(N)}(Z(s)), \qquad Z(0) = X, Z ˙ ( s ) = f θ ( s ) ( N ) ( Z ( s )) , Z ( 0 ) = X , remains in M N \mathcal{M}_N M N and satisfies Z ( S ) = Y Z(S)=Y Z ( S ) = Y . We say that F \mathcal{F} F has the exact interpolation property on M N \mathcal{M}_N M N if every pair X , Y ∈ M N X,Y \in\mathcal{M}_N X , Y ∈ M N admits such a terminal depth S > 0 S>0 S > 0 and a control.
Universal interpolation additionally requires a finite dictionary of updates to be fixed before the input–target dataset is given. For the next definition, the architecture must allow the negative of each selected update. Both architectures above have this property by negating the output matrices.
Definition 2.4 (Universal interpolation). Fix N ≥ 1 N \ge1 N ≥ 1 and a nonempty, open, connected set M N ⊆ R p N \mathcal{M}_N \subseteq\mathbb{R}^{pN} M N ⊆ R pN . The architecture described by F \mathcal{F} F has universal interpolation on M N \mathcal{M}_N M N if there exist an integer m ≥ 1 m \ge1 m ≥ 1 and parameters θ 1 , … , θ m ∈ Θ \theta_1,\ldots,\theta_m \in\Theta θ 1 , … , θ m ∈ Θ such that, for every X , Y ∈ M N X,Y \in\mathcal{M}_N X , Y ∈ M N , there exist a terminal depth S > 0 S>0 S > 0 and a piecewise-constant control
g : [ 0 , S ] → D N , D N : = { ± f θ j ( N ) : 1 ≤ j ≤ m } , g : [0,S] \to D_N, \qquad D_N := \{\pm f_{\theta_j}^{(N)} : 1 \le j \le m\}, g : [ 0 , S ] → D N , D N := { ± f θ j ( N ) : 1 ≤ j ≤ m } , with finitely many depth intervals, such that
Z ˙ ( s ) = g ( s ) ( Z ( s ) ) , Z ( 0 ) = X , Z ( S ) = Y , \dot{Z}(s) = g(s)(Z(s)), \qquad Z(0) = X, \qquad Z(S) = Y, Z ˙ ( s ) = g ( s ) ( Z ( s )) , Z ( 0 ) = X , Z ( S ) = Y , with Z ( s ) ∈ M N Z(s) \in\mathcal{M}_N Z ( s ) ∈ M N for all s ∈ [ 0 , S ] s \in[0,S] s ∈ [ 0 , S ] .
For fixed N N N , the parameters are chosen once for all admissible input–target datasets. Fitting a dataset changes only the selected signed updates, their order, and their durations, shared across all samples; in particular, S S S may depend on X X X and Y Y Y . The selected parameters and their number may depend on N N N , while p p p and the architecture remain fixed. We count the m m m base fields; their lifts and negatives form D N D_N D N without additional parameter choices or random draws.
Our use of universal interpolation follows the fixed-vector-field formulations in Cuchiero et al. [12 ] ; Agrachev & Letrouit [1 ] ; Grong & Vega-Molino [21 ] . Elsewhere, this term also denotes exact interpolation for every N N N without requiring a fixed finite dictionary [11 , 9 ] .
Criteria for exact and universal interpolation
The rank criteria below ask whether the lifted updates and their iterated Lie brackets span the entire batch space, of dimension D = N p D=Np D = N p . Composing flows in different orders can produce directions outside the span of the instantaneous updates. For smooth fields, this effect is captured by the Lie bracket
[ g , h ] ( X ) : = D h ( X ) g ( X ) − D g ( X ) h ( X ) , [g,h](X) := Dh(X)g(X) - Dg(X)h(X), [ g , h ] ( X ) := D h ( X ) g ( X ) − D g ( X ) h ( X ) ,
where D g Dg D g denotes the Jacobian. For a family G \mathcal{G} G of smooth fields on an open set U \mathcal{U} U , the Lie algebra Lie ( G ) \operatorname{Lie}(\mathcal{G}) Lie ( G ) is the real linear span of its fields and their iterated brackets. Its trace at X ∈ U X \in\mathcal{U} X ∈ U is
Lie ( G ) ( X ) : = span { h ( X ) : h ∈ Lie ( G ) } . \operatorname{Lie}(\mathcal{G})(X) := \operatorname{span}\{h(X) : h \in\operatorname{Lie}(\mathcal{G})\}. Lie ( G ) ( X ) := span { h ( X ) : h ∈ Lie ( G )} .
We use the control formulation of the classical Chow–Rashevskii criterion [2 Theorem 5.9 and Corollary 5.11] , a consequence of the orbit theorem [34 ] . Closure under negation allows flow segments to be traversed in both directions, with no prescribed terminal depth.
Theorem 2.5 (Chow–Rashevskii, control formulation). Let D ≥ 1 D \ge1 D ≥ 1 , let M ⊆ R D \mathcal{M} \subseteq\mathbb{R}^{D} M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of smooth vector fields on M \mathcal{M} M closed under negation. If
Lie ( G ) ( X ) = R D for every X ∈ M , \operatorname{Lie}(\mathcal{G})(X) = \mathbb{R}^{D} \qquad\text{for every } X \in\mathcal{M}, Lie ( G ) ( X ) = R D for every X ∈ M , then, for every X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M , there exist S > 0 S > 0 S > 0 and a piecewise-constant control g : [ 0 , S ] → G g : [0,S] \to\mathcal{G} g : [ 0 , S ] → G with finitely many intervals such that
Z ˙ ( s ) = g ( s ) ( Z ( s ) ) , Z ( 0 ) = X , Z ( S ) = Y , \dot{Z}(s) = g(s)(Z(s)), \qquad Z(0) = X, \qquad Z(S) = Y, Z ˙ ( s ) = g ( s ) ( Z ( s )) , Z ( 0 ) = X , Z ( S ) = Y , with Z ( s ) ∈ M Z(s) \in\mathcal{M} Z ( s ) ∈ M for all s ∈ [ 0 , S ] s \in[0,S] s ∈ [ 0 , S ] .
Full rank makes every nearby configuration reachable. Connectedness then extends this local property to the whole domain. The two corollaries below (see Sections A and B for the proofs) apply this theorem to all available updates or to a fixed finite selection together with its negatives. In both, we assume that F \mathcal{F} F is closed under negation. To include ReLU updates, we only require the fields selected at each configuration to be smooth in a neighborhood of that configuration. In the universal criterion, the index set I X I_X I X selects these fields from the fixed dictionary and may vary with X X X .
Corollary 2.6 (Criterion for exact interpolation). Fix N ≥ 1 N \ge1 N ≥ 1 and a nonempty, open, connected configuration space M N ⊆ R N p \mathcal{M}_N \subseteq\mathbb{R}^{Np} M N ⊆ R N p . Suppose that, for every X ∈ M N X \in\mathcal{M}_N X ∈ M N , there are finitely many parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m whose lifted fields are smooth near X X X and satisfy
Lie ( f θ 1 ( N ) , … , f θ m ( N ) ) ( X ) = R N p . \operatorname{Lie}\left(f_{\theta_1}^{(N)},\ldots,f_{\theta_m}^{(N)}\right)(X) = \mathbb{R}^{Np}. Lie ( f θ 1 ( N ) , … , f θ m ( N ) ) ( X ) = R N p . Then F \mathcal{F} F has the exact interpolation property on M N \mathcal{M}_N M N in the sense of Definition 2.3.
Corollary 2.7 (Criterion for universal interpolation). Fix N ≥ 1 N \ge1 N ≥ 1 and a configuration space M N \mathcal{M}_N M N as in Definition 2.4. Suppose there exist finitely many parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m such that, at each X ∈ M N X \in\mathcal{M}_N X ∈ M N , an index set I X ⊆ { 1 , … , m } I_X \subseteq\{1,\ldots,m\} I X ⊆ { 1 , … , m } selects lifted fields smooth near X X X with
Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . \operatorname{Lie}\left(f_{\theta_j}^{(N)} : j \in I_X\right)(X) = \mathbb{R}^{Np}. Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . Then F \mathcal{F} F has universal interpolation on M N \mathcal{M}_N M N in the sense of Definition 2.4.
In the exact criterion, the parameters may depend on the configuration X X X . In the universal criterion, the same finite parameter set must work for every X ∈ M N X \in\mathcal{M}_N X ∈ M N . For globally smooth updates, one can take I X = { 1 , … , m } I_X = \{1,\ldots,m\} I X = { 1 , … , m } .
Remark 2.8. (Analytic converse). For real-analytic fields, the rank conditions above are also necessary, by the analytic orbit theorem [2 Corollary 5.17] . This applies in particular to linear networks and softmax attention. For merely smooth fields, the conditions remain sufficient but need not be necessary. See Section C.
A stronger sufficient condition is that the update fields themselves span R N p \mathbb{R}^{Np} R N p at every configuration, without using Lie brackets. This direct spanning condition only requires local C 1 C^1 C 1 regularity of the selected fields; see Corollary D.1 in Section D. For a fixed dictionary, it requires at least N p Np N p fields, whereas Lie brackets may yield full rank with fewer fields.
Computing the Lie-algebra rank
Following Marcotte et al. (2023, Section 3.3), we investigate the Lie-algebra rank condition by iteratively generating Lie brackets and computing the rank of their evaluations. For a finite family of smooth lifted fields g 1 , … , g m g_1,\ldots,g_m g 1 , … , g m , set W 0 : = span { g 1 , … , g m } W_0 := \operatorname{span}\{g_1,\ldots,g_m\} W 0 := span { g 1 , … , g m } and construct
W k : = W k − 1 + [ W 0 , W k − 1 ] , k ≥ 1. W_k := W_{k-1} + [W_0,W_{k-1}], \qquad k \ge1. W k := W k − 1 + [ W 0 , W k − 1 ] , k ≥ 1.
Here [ W 0 , W k − 1 ] [W_0, W_{k-1}] [ W 0 , W k − 1 ] is the real span of the corresponding brackets, and Lie ( W 0 ) = ⋃ k ≥ 0 W k \operatorname{Lie}(W_0) = \bigcup_{k \ge0} W_k Lie ( W 0 ) = ⋃ k ≥ 0 W k . At each step, the original generators are bracketed with the fields constructed so far, and their evaluations at a configuration X X X give the rank r k ( X ) : = dim W k ( X ) r_k(X) := \dim W_k(X) r k ( X ) := dim W k ( X ) . A rank r k ( X ) = D r_k(X) = D r k ( X ) = D certifies full Lie rank at X X X . More generally, the stopping criterion of Marcotte et al. [28 ] applies if r k + 1 ( Y ) = r k ( X ) r_{k+1}(Y) = r_k(X) r k + 1 ( Y ) = r k ( X ) for every Y Y Y in a neighborhood of X X X : the traces W j ( Y ) W_j(Y) W j ( Y ) then equal W k ( Y ) W_k(Y) W k ( Y ) locally for all j ≥ k j \ge k j ≥ k . We adapt their SageMath implementation to PyTorch (code in https://github.com/sibyllema/attention_universality), replacing symbolic differentiation with automatic differentiation. Lie brackets are evaluated through Jacobian–vector products, which can themselves be differentiated to compute nested brackets without forming full Jacobians or expanding symbolic expressions. This makes it possible to explore larger configuration spaces and higher bracket orders for computationally demanding vector fields, such as the softmax-attention updates in (3) , whose repeated symbolic differentiation becomes costly.
Exact and universal interpolation at finite depth
Euler discretization of an interpolating ODE generally leaves a nonzero output error. For a fixed finite family of smooth fields, full Lie rank nevertheless suffices for finite-depth interpolation using residual layers with signed scalar coefficients; see Proposition 2.9. The stronger direct spanning condition gives an explicit correction bound: under local C 1 C^1 C 1 regularity of the selected fields, at most D = N p D = Np D = N p additional residual layers make a sufficiently fine Euler discretization exact. Near the target, D D D independent update directions make the endpoint map locally invertible in the corresponding step sizes, allowing them to cancel a sufficiently small discretization error exactly.
At finite depth, exact and universal interpolation are defined as in Definitions 2.3 and 2.4, respectively, replacing the controlled ODEs with finite compositions of residual layers on the batch. In the exact case, we write these layers as Id + f θ j ( N ) \operatorname{Id} + f_{\theta_j}^{(N)} Id + f θ j ( N ) : for both architectures considered here, any scalar step size can be absorbed into the output projections. In the universal case, the layers take the form Id + c k f θ j k ( N ) \operatorname{Id} + c_k f_{\theta_{j_k}}^{(N)} Id + c k f θ j k ( N ) , where the parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m are fixed across all admissible datasets, while the indices j k j_k j k and scalar coefficients c k ∈ R c_k \in\mathbb{R} c k ∈ R may depend on the dataset. All intermediate configurations must remain in M N \mathcal{M}_N M N .
Proposition 2.9 (Exact finite-depth interpolation under Lie rank). Let D ≥ 1 D \ge1 D ≥ 1 , let M ⊆ R D \mathcal{M} \subseteq\mathbb{R}^D M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of locally Lipschitz vector fields on M \mathcal{M} M closed under real scalar multiplication. Suppose that, at each Z ∈ M Z \in\mathcal{M} Z ∈ M , there are finitely many fields g 1 , … , g m ∈ G g_1,\ldots,g_m \in\mathcal{G} g 1 , … , g m ∈ G that are smooth on a neighborhood of Z Z Z and satisfy
Lie ( g 1 , … , g m ) ( Z ) = R D . \operatorname{Lie}(g_1,\ldots,g_m)(Z) = \mathbb{R}^D. Lie ( g 1 , … , g m ) ( Z ) = R D . Then, for every X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M , there exist a finite integer L ≥ 0 L \ge0 L ≥ 0 and fields h 0 , … , h L − 1 ∈ G h_0,\ldots,h_{L-1} \in\mathcal{G} h 0 , … , h L − 1 ∈ G such that
Z 0 = X , Z k + 1 = Z k + h k ( Z k ) , Z L = Y , Z^0 = X,\qquad Z^{k+1} = Z^k + h_k(Z^k),\qquad Z^L = Y, Z 0 = X , Z k + 1 = Z k + h k ( Z k ) , Z L = Y , with Z k ∈ M Z^k \in\mathcal{M} Z k ∈ M for every 0 ≤ k ≤ L 0 \le k \le L 0 ≤ k ≤ L .
For a batch space M N \mathcal{M}_N M N , the dimension is D = N p D = Np D = N p . The proof is given in Section E.2. The direct-spanning version is stated and proved in Section E.1.
Proposition 2.10 (Universal finite-depth interpolation under Lie rank). Fix N ≥ 1 N \ge1 N ≥ 1 and a configuration space M N \mathcal{M}_N M N as in Definition 2.4, and assume that F \mathcal{F} F allows real scalar multiplication. Suppose there exist finitely many parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m such that, at each X ∈ M N X \in\mathcal{M}_N X ∈ M N , an index set I X ⊆ { 1 , … , m } I_X \subseteq\{1,\ldots,m\} I X ⊆ { 1 , … , m } selects lifted fields smooth near X X X with
Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . \operatorname{Lie}\left(f_{\theta_j}^{(N)} : j \in I_X\right)(X) = \mathbb{R}^{Np}. Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . Then F \mathcal{F} F has universal interpolation at finite depth on M N \mathcal{M}_N M N , using these same parameters.
The proof is given in Section F.2. The direct-spanning version is stated and proved in Section F.1. Under the direct-spanning assumption of Proposition E.1, at most D = N p D = Np D = N p layers are needed for the final correction. Neither construction gives a bound on total depth or parameter norms in terms of dataset size and architecture dimensions.
Applications to continuous- and finite-depth networks
We apply the criteria of § 2 to noncausal and causal self-attention. The appendix also discusses bias-free ReLU ResNets and the obstruction to interpolation in linear networks (Sections G and G.1).
Noncausal self-attention networks
In this section, we show that noncausal self-attention networks achieve universal interpolation with a finite number of frozen Gaussian blocks. For single-head attention of width r ≥ d r \ge d r ≥ d , two blocks suffice for every batch size and sequence length (Theorem 3.5).
For N ≥ 1 N \ge1 N ≥ 1 , write X = vec ( x 1 , … , x N ) ∈ R N n d X = \operatorname{vec}(x^1,\ldots,x^N) \in\mathbb{R}^{Nnd} X = vec ( x 1 , … , x N ) ∈ R N n d , where x ℓ = vec ( x 1 ℓ , … , x n ℓ ) x^\ell= \operatorname{vec}(x^\ell_1,\ldots,x^\ell_n) x ℓ = vec ( x 1 ℓ , … , x n ℓ ) and x i ℓ ∈ R d x^\ell_i \in\mathbb{R}^d x i ℓ ∈ R d . Our interpolation domain is
B N , n , d : = { X ∈ R N n d : x i ℓ ≠ 0 , x i ℓ ∉ R x i ′ ℓ for i ≠ i ′ , x ℓ ′ ≠ ± P x ℓ for ℓ < ℓ ′ , P ∈ S n } . \mathcal{B}_{N,n,d} := \left\{ X \in\mathbb{R}^{Nnd} : x^\ell_i \ne0,\ x^\ell_i \notin\mathbb{R}x^\ell_{i'}\ \text{for } i \ne i',\ x^{\ell'} \ne\pm P x^\ell\ \text{for } \ell< \ell',\ P \in S_n \right\}. B N , n , d := { X ∈ R N n d : x i ℓ = 0 , x i ℓ ∈ / R x i ′ ℓ for i = i ′ , x ℓ ′ = ± P x ℓ for ℓ < ℓ ′ , P ∈ S n } .
where S n S_n S n acts by permuting tokens. Tokens are nonzero and pairwise non-collinear within each sequence, may be shared across sequences, and no two sequences are related by a signed permutation. We will also consider the generic subset
A N , n , d : = { X ∈ R N n d : x i ℓ ≠ 0 , and x i ℓ ∉ R x i ′ ℓ ′ whenever ( ℓ , i ) ≠ ( ℓ ′ , i ′ ) } . \mathcal{A}_{N,n,d} := \left\{ X \in\mathbb{R}^{Nnd} : x^\ell_i \ne0,\ \text{and } x^\ell_i \notin\mathbb{R}x^{\ell'}_{i'}\ \text{whenever } (\ell,i) \ne(\ell',i') \right\}. A N , n , d := { X ∈ R N n d : x i ℓ = 0 , and x i ℓ ∈ / R x i ′ ℓ ′ whenever ( ℓ , i ) = ( ℓ ′ , i ′ ) } .
For d ≥ 3 d \ge3 d ≥ 3 , both domains are open, dense and connected, with A N , n , d ⊂ B N , n , d \mathcal{A}_{N,n,d} \subset\mathcal{B}_{N,n,d} A N , n , d ⊂ B N , n , d ; see Sections H and J. Noncausal attention is permutation-equivariant and odd, as are its residual layers and controlled flows. Thus, two input sequences related by x ℓ ′ = ε P x ℓ x^{\ell'} = \varepsilon P x^\ell x ℓ ′ = εP x ℓ , where ℓ ≠ ℓ ′ \ell\ne\ell' ℓ = ℓ ′ , P P P permutes tokens, and ε ∈ { ± 1 } \varepsilon\in\{\pm1\} ε ∈ { ± 1 } , require targets satisfying y ℓ ′ = ε P y ℓ y^{\ell'} = \varepsilon P y^\ell y ℓ ′ = εP y ℓ . Both domains exclude such input pairs. These are sufficient restrictions: symmetry-related sequences can also be interpolable when their targets respect those symmetries.
Lemma 3.1 (Pointwise spanning by noncausal self-attention). Let d ≥ 2 d \ge2 d ≥ 2 , n ≥ 2 n \ge2 n ≥ 2 , and N ≥ 1 N \ge1 N ≥ 1 . At every X ∈ A N , n , d X \in\mathcal{A}_{N,n,d} X ∈ A N , n , d , the single-head batch fields satisfy
span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } = R N n d . \operatorname{span}\left\{f^{(N)}_{W,V}(X) : \operatorname{rank} W,\operatorname{rank} V \le1\right\} = \mathbb{R}^{Nnd}. span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } = R N n d .
The proof is given in Section H.
Remark 3.2 (Exact interpolation on A N , n , d \mathcal{A}_{N,n,d} A N , n , d ). For d ≥ 3 d \ge3 d ≥ 3 , connectedness and the criteria of § 2 turn this lemma into exact interpolation on A N , n , d \mathcal{A}_{N,n,d} A N , n , d at both continuous and finite depth, with all intermediate configurations in this domain. One head of width one suffices, so the conclusion holds for any prescribed number of heads and positive head widths. For n = 1 n = 1 n = 1 , attention is linear and exact interpolation fails for N > d N > d N > d by Lemma G.5 .
The following theorem (see Section J for a proof) shows that a finite number of random attention blocks suffices to achieve universal interpolation on B N , n , d \mathcal{B}_{N,n,d} B N , n , d , and hence exact interpolation, with the required number of blocks growing with N N N .
Theorem 3.3 (Universal interpolation with Gaussian-initialized attention blocks). Let d ≥ 3 d \ge3 d ≥ 3 , n ≥ 2 n \ge2 n ≥ 2 , and N ≥ 1 N \ge1 N ≥ 1 , and put D : = N n d D := Nnd D := N n d . Fix an H H H -head architecture with positive widths r 1 , … , r H r_1,\ldots,r_H r 1 , … , r H . Initialize m N : = 2 D m_N := 2D m N := 2 D noncausal attention blocks by drawing every entry of all their query, key, value, and output projection matrices independently from N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) . The effective matrices are defined by the factorizations in Example 2.2. With probability one over this single draw, these frozen blocks yield universal interpolation at continuous depth on B N , n , d \mathcal{B}_{N,n,d} B N , n , d in the sense of Definition 2.4, simultaneously for all input and target configurations in the domain. Only the block indices, signs, and durations depend on the prescribed interpolation problem; the terminal depth S > 0 S > 0 S > 0 may depend on the endpoints.
The proof has two steps. First, we prove a uniform version of Lemma 3.1: almost surely, 2 D 2D 2 D Gaussian blocks drawn independently of X X X span the tangent space at every X ∈ A N , n , d X \in\mathcal{A}_{N,n,d} X ∈ A N , n , d simultaneously. This follows from the pointwise full-rank witness given by Lemma 3.1 and an analyticity argument (see Lemma I.1). Second, we extend full Lie rank to B N , n , d \mathcal{B}_{N,n,d} B N , n , d . By contextual separation, a short flow along one of the sampled blocks moves any configuration into A N , n , d \mathcal{A}_{N,n,d} A N , n , d (see Lemma J.2 ). The system is analytic, so the Lie rank stays the same along this flow and is therefore full at the starting point. Universal interpolation then follows from the connectedness of B N , n , d \mathcal{B}_{N,n,d} B N , n , d by Corollary 2.7.
Corollary 3.4 (Universal interpolation at finite depth). Under the assumptions of Theorem 3.3 , with probability one, the same 2 N n d 2Nnd 2 N n d sampled fields yield universal interpolation at finite depth on B N , n , d \mathcal{B}_{N,n,d} B N , n , d , in the sense of Section 2.3. All nonendpoint configurations can be chosen in A N , n , d \mathcal{A}_{N,n,d} A N , n , d .
See Section K for a proof. The 2 N n d 2Nnd 2 N n d sampled blocks form a reusable dictionary; the number of layers may depend on the interpolation problem. In Theorem 3.3 , the number of frozen blocks grows with N N N . Our main result removes this dependence: for single-head attention of width r ≥ d r \ge d r ≥ d , a dictionary of only two frozen blocks suffices for every batch size and sequence length.
Theorem 3.5 (Universal interpolation with two Gaussian attention blocks). Fix d ≥ 3 d \ge3 d ≥ 3 . Consider two noncausal single-head attention blocks with head width r ≥ d r \ge d r ≥ d and query, key, value, and output projection matrices whose entries are all sampled independently from N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) . With probability one, simultaneously for every N ≥ 1 N \ge1 N ≥ 1 and n ≥ 2 n \ge2 n ≥ 2 , there exists an open and connected subset
R N , n ⊆ B N , n , d \mathcal{R}_{N,n} \subseteq\mathcal{B}_{N,n,d} R N , n ⊆ B N , n , d depending on the sampled matrices, whose complement in B N , n , d \mathcal{B}_{N,n,d} B N , n , d has Lebesgue measure zero. On R N , n \mathcal{R}_{N,n} R N , n , these two frozen blocks yield universal interpolation at continuous depth in the sense of Definition 2.4, with m N = 2 m_N = 2 m N = 2 . The same sampled matrices work for every N N N and n n n ; only the block selection, signs, and durations depend on the interpolation problem.
For almost every draw of the blocks, input and target batches with i.i.d. standard Gaussian coordinates, sampled independently of the blocks, belong to R N , n \mathcal{R}_{N,n} R N , n with probability one.
We define R N , n \mathcal{R}_{N,n} R N , n as the configurations where the two sampled fields and their iterated Lie brackets span the full batch space. The main step is to show that the analytic rank-deficient set has codimension at least two. Removing this set preserves connectedness, allowing the interpolation criterion in Corollary 2.7 to connect any two configurations in R N , n \mathcal{R}_{N,n} R N , n . The full proof and the precise definition of the domain are given in Section L, which also contains the proof of the finite-depth corollary.
Remark 3.6 (Head width and dictionary size). The theorem covers the standard single-head choice r = d r = d r = d . For r < d r < d r < d , our numerical experiments (Section M) suggest that m ≥ ⌈ d / r ⌉ m \ge\lceil d/r \rceil m ≥ ⌈ d / r ⌉ independent Gaussian-initialized frozen blocks suffice for generic full lifted Lie rank, independently of N N N and n n n , with n ≥ 2 n \ge2 n ≥ 2 . With the standard width r = d / H r = d/H r = d / H (H ≥ 2 H \ge2 H ≥ 2 ), this gives the conjectured threshold m ≥ H m \ge H m ≥ H , using one active head per block and setting the other heads to zero. A corresponding universal interpolation theorem remains open.
Corollary 3.7 (Universal interpolation at finite depth with two blocks). Under the assumptions of Theorem 3.5, with probability one, the same two frozen blocks yield universal interpolation at finite depth on the same domains R N , n \mathcal{R}_{N,n} R N , n , in the sense of Section 2.3, simultaneously for every N ≥ 1 N \ge1 N ≥ 1 and n ≥ 2 n \ge2 n ≥ 2 . Every layer uses one of the two sampled fields with a real scalar gain, and every intermediate batch configuration remains in R N , n \mathcal{R}_{N,n} R N , n .
Causal self-attention networks
In this section, we show that causal masking makes the first-token update linear, so every linear relation among the first tokens of a batch is preserved at every depth. As a result, exact interpolation fails for N > d N > d N > d , whatever the number of heads (Proposition 3.8 ). Positive results are recovered once input and target batches share the same first-token relations: on each such class, finitely many frozen Gaussian blocks achieve universal interpolation (Corollary 3.10 ).
We consider the causal attention architecture of Example 2.2 with any prescribed number of heads and positive head widths. Causal masking makes the first-token update linear: the first token attends only to itself. We retain the globally noncollinear domain A N , n , d \mathcal{A}_{N,n,d} A N , n , d ; the extension allowing shared tokens in Section 3.1 concerns noncausal attention. The interpolation constructions below require only one active head; all other value matrices can be set to zero. We denote the batch lift of a single-head causal update by F W , V c F^{c}_{W,V} F W , V c . For a general head block, [ f W , V c ( x ) ] 1 = ∇ Σ x 1 [f^{c}_{W,V}(x)]_1 = \nabla_{\Sigma}x_1 [ f W , V c ( x ) ] 1 = ∇ Σ x 1 , where Σ : = ∑ h = 1 H V h \Sigma:= \sum_{h=1}^{H} V_h Σ := ∑ h = 1 H V h . For any batch X X X , denote its first-token matrix by
X 1 : = [ x 1 1 ⋯ x 1 N ] ∈ R d × N . X_1 := \left[x_1^1 \ \cdots\ x_1^N\right] \in\mathbb{R}^{d \times N}. X 1 := [ x 1 1 ⋯ x 1 N ] ∈ R d × N .
Along continuous and discrete batch trajectories Z ( s ) Z(s) Z ( s ) and Z k Z^k Z k starting at X X X , the first-token matrices satisfy Z ˙ 1 = V Σ ( s ) Z 1 \dot{Z}_1=V_{\Sigma}(s)Z_1 Z ˙ 1 = V Σ ( s ) Z 1 and Z 1 k + 1 = ( I + V Σ , k ) Z 1 k Z_1^{k+1}=(I+V_{\Sigma,k})Z_1^k Z 1 k + 1 = ( I + V Σ , k ) Z 1 k , respectively. In both settings, the first-token matrix at any depth has the form M X 1 MX_1 M X 1 for some M ∈ R d × d M\in\mathbb{R}^{d\times d} M ∈ R d × d . Hence every initial linear relation among the first tokens remains valid at every depth. For example, an input relation x 1 3 = x 1 1 + x 1 2 x_1^3=x_1^1+x_1^2 x 1 3 = x 1 1 + x 1 2 forces every reachable target to satisfy y 1 3 = y 1 1 + y 1 2 y_1^3=y_1^1+y_1^2 y 1 3 = y 1 1 + y 1 2 , at both continuous and finite depth. The following proposition shows that later token positions admit independent update directions.
Proposition 3.8 (Exact rank of causal attention). Let d ≥ 2 d\ge2 d ≥ 2 , n ≥ 2 n\ge2 n ≥ 2 , and N ≥ 1 N\ge1 N ≥ 1 . At a fixed batch X ∈ A N , n , d X\in\mathcal{A}_{N,n,d} X ∈ A N , n , d , let S X c S_X^c S X c denote the linear span of the batch updates F W , V c ( X ) F_{W,V}^c(X) F W , V c ( X ) with rank W W W , rank V ≤ 1 V\le1 V ≤ 1 . Then
S X c = { Z ∈ R N n d : Z 1 = A X 1 for some A ∈ R d × d } . (4) S_X^c=\left\{Z\in\mathbb{R}^{Nnd}:Z_1=AX_1\text{ for some }A\in\mathbb{R}^{d\times d}\right\}. \tag*{(4)} S X c = { Z ∈ R N n d : Z 1 = A X 1 for some A ∈ R d × d } . (4) Consequently,
dim S X c = N ( n − 1 ) d + d rank X 1 . (5) \dim S_X^c=N(n-1)d+d\operatorname{rank}X_1. \tag*{(5)} dim S X c = N ( n − 1 ) d + d rank X 1 . (5) The same span and rank hold for any prescribed number of heads and positive head widths. Lie brackets do not increase this dimension. Full ambient rank N n d Nnd N n d holds exactly when the N N N first tokens are linearly independent, which requires N ≤ d N\le d N ≤ d .
The proof is given in Section N. The N ( n − 1 ) d N(n-1)d N ( n − 1 ) d directions associated with later tokens are unrestricted; the first-token directions are exactly those obtained by applying a common linear map to the first tokens. By the rank criterion and its analytic converse in Corollary 2.6 and Remark 2.8, causal attention has the continuous-depth exact interpolation property on a nonempty connected open subset of A N , n , d \mathcal{A}_{N,n,d} A N , n , d if and only if the first tokens are linearly independent at every configuration in that subset. For N > d N>d N > d , this is impossible; the preserved first-token relations also rule out arbitrary interpolation at finite depth. This obstruction concerns interpolation of the full target sequences, including their first tokens. Pairwise noncollinearity alone does not ensure linear independence when N ≥ 3 N\ge3 N ≥ 3 .
To obtain positive interpolation results for arbitrary N N N , we restrict input and target batches to have exactly the same linear relations among their first tokens. For a fixed subspace K ⊆ R N K\subseteq\mathbb{R}^N K ⊆ R N , define
A N , n , d K : = { X ∈ A N , n , d : ker X 1 = K } , r : = N − dim K . \mathcal{A}_{N,n,d}^K:=\{X\in\mathcal{A}_{N,n,d}:\ker X_1=K\},\qquad r:=N-\dim K. A N , n , d K := { X ∈ A N , n , d : ker X 1 = K } , r := N − dim K .
Here c ∈ K c\in K c ∈ K means that ∑ ℓ = 1 N c ℓ x 1 ℓ = 0 \sum_{\ell=1}^{N}c_\ell x_1^\ell=0 ∑ ℓ = 1 N c ℓ x 1 ℓ = 0 . This class is an open subset of the linear space
E K : = { Z ∈ R N n d : Z 1 c = 0 for every c ∈ K } , dim E K = R : = N ( n − 1 ) d + d r . E_K:=\{Z\in\mathbb{R}^{Nnd}:Z_1c=0\text{ for every }c\in K\},\qquad\dim E_K=R:=N(n-1)d+dr. E K := { Z ∈ R N n d : Z 1 c = 0 for every c ∈ K } , dim E K = R := N ( n − 1 ) d + d r .
We apply the interpolation criteria of Section 2 within each connected component, using E K E_K E K as the ambient space. The rank in (5) is full in this space.
Corollary 3.9 (Exact interpolation by causal attention). Let d ≥ 2 d\ge2 d ≥ 2 , n ≥ 2 n\ge2 n ≥ 2 , N ≥ 1 N\ge1 N ≥ 1 , and fix K ⊆ R N K\subseteq\mathbb{R}^N K ⊆ R N such that A N , n , d K \mathcal{A}_{N,n,d}^K A N , n , d K is nonempty. The causal attention family has exact interpolation on each connected component of A N , n , d K \mathcal{A}_{N,n,d}^K A N , n , d K , both at continuous depth on [ 0 , S ] [0,S] [ 0 , S ] for a suitable S > 0 S>0 S > 0 and at finite depth. One head of width one suffices, with effective parameter matrices W , V W,V W , V of rank at most one shared across all sequences. The continuous trajectory and all intermediate residual configurations remain in the chosen component.
The proof is given in Section O. Continuous flows keep the first-token kernel fixed, since their linear action is invertible. Their trajectories within A N , n , d K \mathcal{A}_{N,n,d}^K A N , n , d K remain in a single connected component.
Corollary 3.10 (Universal interpolation by causal attention). Under the assumptions of Corollary 3.9 , fix K K K before sampling and set R = N ( n − 1 ) d + d r R=N(n-1)d+dr R = N ( n − 1 ) d + d r . Draw independent standard Gaussian vectors a j , b j , u j , v j ∈ R d a_j,b_j,u_j,v_j\in\mathbb{R}^d a j , b j , u j , v j ∈ R d , 1 ≤ j ≤ 2 R 1\le j\le2R 1 ≤ j ≤ 2 R , and set W j = a j b j T W_j=a_jb_j^\mathsf{T} W j = a j b j T , V j = u j v j T V_j=u_jv_j^\mathsf{T} V j = u j v j T . These matrices specify one active head in each block; any additional heads have zero matrices. With probability one, these 2 R 2R 2 R frozen blocks yield universal interpolation on each connected component of A N , n , d K \mathcal{A}_{N,n,d}^K A N , n , d K , at both continuous and finite depth. The blocks may be used with either sign and, at finite depth, with real scalar gains. A single draw works simultaneously for all components of this fixed relation class, with each interpolation remaining in its chosen component.
Conclusion
In this paper, we establish universal interpolation for residual self-attention networks with frozen attention parameters, at both continuous and finite depth. In the single-head setting, two randomly sampled fixed blocks are sufficient, independently of the dataset size. A natural direction for future work is to better understand the trade-off between the number of fixed generators and the depth required for interpolation.
Acknowledgements
We wish to thank Margot Bruneaux, Frédéric Marbach, Domènec Ruiz-Balet and Federico Scavia for fruitful discussions, and we are particularly grateful to Cyril Letrouit, who introduced us to his article Agrachev & Letrouit [1 ] and the open question it raises.
AI Disclosure Section
We used LLMs to aid or polish our writing. We primarily used OpenAI GPT-6 Astra, and all parts of this paper were polished by an LLM at some point, following the instructions provided by the authors. We used LLMs for retrieval and discovery, particularly to find related work both within the ML community and in other fields that helped us prove certain results, such as Amir et al. [4 ] and Ax [5 ] . We used LLMs for research execution both to assist with code development and to develop proofs (see our final point below). We used LLMs to draft sections of the paper. Many sections were initially drafted by Astra. The authors systematically refined these drafts through extensive iteration, providing precise feedback at each step, and editing the text manually when needed. Finally, we used LLMs to prove mathematical claims at three different levels: i) proving direct consequences of known / previously proven theorems (see e.g. Section A–Section D), which LLMs can do easily and faster than the authors; ii) refining proofs starting from our own drafts (e.g., Section E, Section G, Section H, Section N); and iii) finding ideas for difficult proofs that required tools from other research communities (e.g., parts of § 16 , parts of § 19 .§ 3 –§ 19 .6). We used Astra for all three purposes. All proofs have been checked by the authors. For iii), we took particular care to explain the tools and arguments drawn from other research communities in a way that is accessible to the ML community. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
Reproducibility Statement
We provide code that can reproduce our results as supplementary materials, and describe experimental details and results in Section M.
Proof of the exact interpolation criterion
Proof. Write M = M N \mathcal{M}=\mathcal{M}_N M = M N , D = N p D=Np D = N p , and G = { f θ ( N ) : θ ∈ Θ } \mathcal{G}=\{f_\theta^{(N)}:\theta\in\Theta\} G = { f θ ( N ) : θ ∈ Θ } . Fix X ∈ M X\in\mathcal{M} X ∈ M and choose the locally smooth lifted fields g 1 , … , g m g_1,\ldots,g_m g 1 , … , g m from the hypothesis. Full Lie rank at X X X gives D D D Lie-algebra elements whose evaluations form a basis. Their determinant stays nonzero on a smaller connected neighborhood U \mathcal{U} U of X X X . Apply Theorem 2.5 on U \mathcal{U} U to the family { ± g j ∣ U : 1 ≤ j ≤ m } \{\pm g_j|_{\mathcal{U}}:1\le j\le m\} { ± g j ∣ U : 1 ≤ j ≤ m } . This joins every pair in U \mathcal{U} U by a piecewise-constant control using the selected fields and their negatives. Thus a neighborhood of X X X belongs to its reachability class.
Reachability by finite concatenations of flows of fields in G \mathcal{G} G , with every segment contained in M \mathcal{M} M , is an equivalence relation: transitivity follows by concatenation, while symmetry follows by reversing the segments and replacing each field by its negative. Applying the preceding local argument at every point shows that every equivalence class is open. Since M \mathcal{M} M is connected, it has only one reachability class. Thus any distinct X , Y ∈ M X,Y\in\mathcal{M} X , Y ∈ M can be joined by finitely many positive-time flow segments:
Y = Φ h L τ L ∘ ⋯ ∘ Φ h 1 τ 1 ( X ) , h j ∈ G , τ j > 0 , Y=\Phi_{h_L}^{\tau_L}\circ\cdots\circ\Phi_{h_1}^{\tau_1}(X),\qquad h_j\in\mathcal{G},\quad\tau_j>0, Y = Φ h L τ L ∘ ⋯ ∘ Φ h 1 τ 1 ( X ) , h j ∈ G , τ j > 0 ,
with every segment contained in M \mathcal{M} M , where Φ h t \Phi_h^t Φ h t denotes the local flow of h h h . Taking S : = ∑ j τ j S:=\sum_j\tau_j S := ∑ j τ j gives the required piecewise-constant control on [ 0 , S ] [0,S] [ 0 , S ] . When X = Y X=Y X = Y , follow any field in G \mathcal{G} G for a sufficiently short positive time and then its negative for the same duration. Local existence and openness of M \mathcal{M} M ensure that this trajectory stays in M \mathcal{M} M and returns to X X X with S > 0 S>0 S > 0 .
Conversely, suppose all lifted fields are analytic and exact interpolation holds. Each controlled trajectory is a finite concatenation of their flows, so every orbit is M \mathcal{M} M . By Remark 2.8, Lie ( G ) ( X ) = R D \operatorname{Lie}(\mathcal{G})(X)=\mathbb{R}^D Lie ( G ) ( X ) = R D at every X X X . A basis of this trace involves only finitely many Lie brackets and hence finitely many fields of G \mathcal{G} G , giving the required finite parameter selection at X X X .
Proof of the universal interpolation criterion
Proof. Fix the finite parameter selection from the hypothesis. Apply Corollary 2.6 to
F ~ N = { ± f θ j : 1 ≤ j ≤ m } . \widetilde{\mathcal{F}}_N=\{\pm f_{\theta_j}:1\le j\le m\}. F N = { ± f θ j : 1 ≤ j ≤ m } .
This family is closed under negation, and at each configuration the indices I X I_X I X supply a locally smooth subfamily with full Lie rank. On the batch, the resulting controls select one signed lifted update on each of finitely many intervals, with a terminal depth S > 0 S>0 S > 0 , exactly as in Definition 2.4. The parameters were chosen before the endpoints, so F \mathcal{F} F has universal interpolation on M N \mathcal{M}_N M N .
Conversely, suppose the lifted fields are analytic and choose the finite parameters supplied by universal interpolation on M N \mathcal{M}_N M N . These fields and their negatives have one orbit on M N \mathcal{M}_N M N . By Remark 2.8 their Lie algebra has rank N p Np N p everywhere. Adding negatives does not change the generated Lie algebra, so the fixed lifted fields themselves have full Lie rank; take I X = { 1 , … , m } I_X=\{1,\ldots,m\} I X = { 1 , … , m } .
Justification of the analytic converse
Proof. Let M ⊆ R D \mathcal{M}\subseteq\mathbb{R}^D M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of real-analytic fields on M \mathcal{M} M closed under negation. Let O ( X ) \mathcal{O}(X) O ( X ) denote the orbit through X X X generated by their local flows. The analytic orbit theorem gives
T X O ( X ) = Lie ( G ) ( X ) T_X\mathcal{O}(X)=\operatorname{Lie}(\mathcal{G})(X) T X O ( X ) = Lie ( G ) ( X )
for every X ∈ M X\in\mathcal{M} X ∈ M (Agrachev & Sachkov, [2 ] , Corollary 5.17) (see also Sussmann, [33 ] , Theorem 5). Closure under negation allows flow segments to be reversed. Thus O ( X ) \mathcal{O}(X) O ( X ) is precisely the set reachable from X X X by piecewise-constant controls on some finite interval [ 0 , S ] [0,S] [ 0 , S ] . The point X X X itself is reachable by a short flow segment followed by its reverse. If the conclusion of Theorem 2.5 holds, then O ( X ) = M \mathcal{O}(X)=\mathcal{M} O ( X ) = M , so Lie ( G ) ( X ) = T X M = R D \operatorname{Lie}(\mathcal{G})(X)=T_X\mathcal{M}=\mathbb{R}^D Lie ( G ) ( X ) = T X M = R D . Sufficiency is already given by Theorem 2.5.
Pointwise full-rank criterion
Corollary D.1 (Pointwise full-rank criterion). Let D ≥ 1 D\ge1 D ≥ 1 , let M ⊆ R D \mathcal{M}\subseteq\mathbb{R}^D M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of locally Lipschitz vector fields on M \mathcal{M} M . Suppose that
for every X ∈ M X \in\mathcal{M} X ∈ M , there are D D D vector fields g 1 , … , g D ∈ G g_1,\ldots,g_D \in\mathcal{G} g 1 , … , g D ∈ G that are C 1 C^1 C 1 on a neighborhood of X X X and whose values g 1 ( X ) , … , g D ( X ) g_1(X),\ldots,g_D(X) g 1 ( X ) , … , g D ( X ) form a basis of R D \mathbb{R}^D R D ; and
g ∈ G g \in\mathcal{G} g ∈ G implies − g ∈ G -g \in\mathcal{G} − g ∈ G .
Then piecewise-constant controls with values in G \mathcal{G} G exactly interpolate every pair X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M on [ 0 , S ] [0,S] [ 0 , S ] for some S > 0 S>0 S > 0 depending on the pair.
Proof. Fix X ∈ M X \in\mathcal{M} X ∈ M and choose g 1 , … , g D g_1,\ldots,g_D g 1 , … , g D as in the first assumption. If φ t j \varphi^j_t φ t j denotes the local flow of g j g_j g j , the endpoint map
E ( t 1 , … , t D ) : = φ t D D ∘ ⋯ ∘ φ t 1 1 ( X ) E(t_1,\ldots,t_D):=\varphi^D_{t_D}\circ\cdots\circ\varphi^1_{t_1}(X) E ( t 1 , … , t D ) := φ t D D ∘ ⋯ ∘ φ t 1 1 ( X )
has derivative at the origin whose columns are g 1 ( X ) , … , g D ( X ) g_1(X),\ldots,g_D(X) g 1 ( X ) , … , g D ( X ) . The inverse function theorem therefore shows that the reachability class of X X X contains a neighborhood of X X X ; negative times are realized using the fields − g j -g_j − g j . The symmetry, concatenation, and connectedness arguments in the proof of Corollary 2.6 then give the conclusion.
Finite-depth interpolation
Direct spanning
Proposition E.1 (Exact finite-depth interpolation). Let D ≥ 1 D \ge1 D ≥ 1 , let M ⊆ R D \mathcal{M} \subseteq\mathbb{R}^D M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of locally Lipschitz vector fields on M \mathcal{M} M closed under real scalar multiplication. Suppose that, at each X ∈ M X \in\mathcal{M} X ∈ M , G \mathcal{G} G contains D D D fields that are C 1 C^1 C 1 near X X X and whose values at X X X form a basis of R D \mathbb{R}^D R D . Then, for every X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M , there exist a finite integer L ≥ 0 L \ge0 L ≥ 0 and fields g 0 , … , g L − 1 ∈ G g_0,\ldots,g_{L-1} \in\mathcal{G} g 0 , … , g L − 1 ∈ G such that
Z 0 = X , Z k + 1 = Z k + g k ( Z k ) , Z L = Y , (6) Z^0=X,\qquad Z^{k+1}=Z^k+g_k(Z^k),\qquad Z^L=Y, \tag*{(6)} Z 0 = X , Z k + 1 = Z k + g k ( Z k ) , Z L = Y , (6) with Z k ∈ M Z^k \in\mathcal{M} Z k ∈ M for every $0 \le k \le L.
Proof. Fix X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M .
Step 1: construct an exact correction near the target. We first find a neighborhood of Y Y Y such that each point in this neighborhood can be sent exactly to Y Y Y by at most D D D admissible residual layers, with all intermediate states remaining in M \mathcal{M} M . The layer coefficients may depend on the point being corrected. Choose g 1 , … , g D ∈ G g_1,\ldots,g_D \in\mathcal{G} g 1 , … , g D ∈ G that are C 1 C^1 C 1 on a neighborhood of Y Y Y and whose values at Y Y Y form a basis of R D \mathbb{R}^D R D . For a = ( a 1 , … , a D ) ∈ R D a=(a_1,\ldots,a_D)\in\mathbb{R}^D a = ( a 1 , … , a D ) ∈ R D , set
R j a j ( Z ) : = Z + a j g j ( Z ) , E ( Z , a ) : = R D a D ∘ ⋯ ∘ R 1 a 1 ( Z ) . R_j^{a_j}(Z):=Z+a_jg_j(Z),\qquad E(Z,a):=R_D^{a_D}\circ\cdots\circ R_1^{a_1}(Z). R j a j ( Z ) := Z + a j g j ( Z ) , E ( Z , a ) := R D a D ∘ ⋯ ∘ R 1 a 1 ( Z ) .
This map is C 1 C^1 C 1 near ( Y , 0 ) (Y,0) ( Y , 0 ) . By shrinking this neighborhood, all intermediate states in the composition remain in M \mathcal{M} M and in the common C 1 C^1 C 1 neighborhood of the selected fields. At ( Y , 0 ) (Y,0) ( Y , 0 ) ,
E ( Y , 0 ) = Y , D a E ( Y , 0 ) = [ g 1 ( Y ) ⋯ g D ( Y ) ] . (7) E(Y,0)=Y,\qquad D_aE(Y,0)=[g_1(Y)\ \cdots\ g_D(Y)]. \tag*{(7)} E ( Y , 0 ) = Y , D a E ( Y , 0 ) = [ g 1 ( Y ) ⋯ g D ( Y )] . (7)
The latter matrix is invertible. Applying the implicit function theorem to E ( Z , a ) − Y = 0 E(Z,a)-Y=0 E ( Z , a ) − Y = 0 gives an open neighborhood U Y ⊆ M U_Y\subseteq\mathcal{M} U Y ⊆ M of Y Y Y and a C 1 C^1 C 1 map a : U Y → R D a:U_Y\to\mathbb{R}^D a : U Y → R D , with a ( Y ) = 0 a(Y)=0 a ( Y ) = 0 , such that
E ( Z , a ( Z ) ) = Y for every Z ∈ U Y . (8) E(Z,a(Z))=Y\qquad\text{for every }Z\in U_Y. \tag*{(8)} E ( Z , a ( Z )) = Y for every Z ∈ U Y . (8)
Each nonzero coefficient a j ( Z ) a_j(Z) a j ( Z ) can be absorbed into its field, since closure under real scalar multiplication gives a j ( Z ) g j ∈ G a_j(Z)g_j\in\mathcal{G} a j ( Z ) g j ∈ G . A zero coefficient gives an identity layer and can be omitted. Thus every Z ∈ U Y Z\in U_Y Z ∈ U Y can be mapped exactly to Y Y Y by at most D D D admissible residual layers.
Step 2: reach the correction neighborhood by Euler discretization. We next approximate a controlled trajectory from X X X to Y Y Y by admissible residual layers. We show that a sufficiently fine mesh keeps every iterate in M \mathcal{M} M and places the endpoint in the neighborhood U Y U_Y U Y constructed in Step 1. By Corollary D.1, a piecewise-constant controlled trajectory γ : [ 0 , S ] → M \gamma:[0,S]\to\mathcal{M} γ : [ 0 , S ] → M joins X X X to Y Y Y for some S > 0 S>0 S > 0 . Fix any such trajectory. Its image Γ \Gamma Γ is compact, so there is ρ > 0 \rho>0 ρ > 0 such that the compact tube
K ρ : = { Z ∈ R D : dist ( Z , Γ ) ≤ ρ } ⊆ M . K_\rho:=\{Z\in\mathbb{R}^D:\operatorname{dist}(Z,\Gamma)\le\rho\}\subseteq\mathcal{M}. K ρ := { Z ∈ R D : dist ( Z , Γ ) ≤ ρ } ⊆ M .
::: Let 0 = s 0 < ⋯ < s q = S 0=s_0<\cdots<s_q=S 0 = s 0 < ⋯ < s q = S be the switching times of the fixed control, and let h i ∈ G h_i\in\mathcal{G} h i ∈ G denote the vector field selected on [ s i − 1 , s i ) [s_{i-1},s_i) [ s i − 1 , s i ) , so that
γ ˙ ( t ) = h i ( γ ( t ) ) for t ∈ ( s i − 1 , s i ) . \dot{\gamma}(t)=h_i(\gamma(t)) \qquad\text{for }t\in(s_{i-1},s_i). γ ˙ ( t ) = h i ( γ ( t )) for t ∈ ( s i − 1 , s i ) .
The fields h 1 , … , h q h_1,\ldots,h_q h 1 , … , h q need not be distinct. By compactness and local Lipschitz continuity, these finitely many fields have a common norm bound B ≥ 1 B\geq1 B ≥ 1 and a common Lipschitz constant Λ ≥ 1 \Lambda\geq1 Λ ≥ 1 on K ρ K_\rho K ρ .
Indeed, each h i h_i h i is continuous, so compactness of K ρ K_\rho K ρ gives
B : = max { 1 , max 1 ≤ i ≤ q max Z ∈ K ρ ∥ h i ( Z ) ∥ } < ∞ . B:=\max\left\{1,\max_{1\leq i\leq q}\max_{Z\in K_\rho}\lVert h_i(Z)\rVert\right\}<\infty. B := max { 1 , 1 ≤ i ≤ q max Z ∈ K ρ max ∥ h i ( Z )∥ } < ∞.
To obtain a common Lipschitz constant, local Lipschitz continuity and finiteness of the family imply that, for every x ∈ K ρ x\in K_\rho x ∈ K ρ , there exist r x > 0 r_x>0 r x > 0 and L x ≥ 1 L_x\geq1 L x ≥ 1 such that B ( x , 2 r x ) ⊆ M \mathbb{B}(x,2r_x)\subseteq\mathcal{M} B ( x , 2 r x ) ⊆ M and all the h i h_i h i are L x L_x L x -Lipschitz on this ball. Here B ( x , r ) \mathbb{B}(x,r) B ( x , r ) denotes the open Euclidean ball of radius r r r centered at x x x .
By compactness, finitely many balls B ( x ℓ , r ℓ ) \mathbb{B}(x_\ell,r_\ell) B ( x ℓ , r ℓ ) , ℓ = 1 , … , J \ell=1,\ldots,J ℓ = 1 , … , J , cover K ρ K_\rho K ρ . Here r ℓ = r x ℓ r_\ell=r_{x_\ell} r ℓ = r x ℓ . Set
η : = min 1 ≤ ℓ ≤ J r ℓ > 0 , L l o c : = max 1 ≤ ℓ ≤ J L x ℓ . \eta:=\min_{1\leq\ell\leq J}r_\ell>0,\qquad L_{\mathrm{loc}}:=\max_{1\leq\ell\leq J}L_{x_\ell}. η := 1 ≤ ℓ ≤ J min r ℓ > 0 , L loc := 1 ≤ ℓ ≤ J max L x ℓ .
If Z , W ∈ K ρ Z,W\in K_\rho Z , W ∈ K ρ satisfy ∥ Z − W ∥ < η \lVert Z-W\rVert<\eta ∥ Z − W ∥ < η , choose ℓ \ell ℓ with Z ∈ B ( x ℓ , r ℓ ) Z\in\mathbb{B}(x_\ell,r_\ell) Z ∈ B ( x ℓ , r ℓ ) . Then both Z Z Z and W W W belong to B ( x ℓ , 2 r ℓ ) \mathbb{B}(x_\ell,2r_\ell) B ( x ℓ , 2 r ℓ ) , and hence
∥ h i ( Z ) − h i ( W ) ∥ ≤ L l o c ∥ Z − W ∥ for every i . \lVert h_i(Z)-h_i(W)\rVert\leq L_{\mathrm{loc}}\lVert Z-W\rVert\qquad\text{for every }i. ∥ h i ( Z ) − h i ( W )∥ ≤ L loc ∥ Z − W ∥ for every i .
If instead ∥ Z − W ∥ ≥ η \lVert Z-W\rVert\geq\eta ∥ Z − W ∥ ≥ η , the norm bound gives
∥ h i ( Z ) − h i ( W ) ∥ ≤ 2 B ≤ 2 B η ∥ Z − W ∥ . \lVert h_i(Z)-h_i(W)\rVert\leq2B\leq\frac{2B}{\eta}\lVert Z-W\rVert. ∥ h i ( Z ) − h i ( W )∥ ≤ 2 B ≤ η 2 B ∥ Z − W ∥ .
Thus
Λ : = max { 1 , L l o c , 2 B / η } \Lambda:=\max\{1,L_{\mathrm{loc}},2B/\eta\} Λ := max { 1 , L loc , 2 B / η }
is a Lipschitz constant on K ρ K_\rho K ρ shared by all the fields h 1 , … , h q h_1,\ldots,h_q h 1 , … , h q .
Choose a finite mesh 0 = t 0 < ⋯ < t m = S 0=t_0<\cdots<t_m=S 0 = t 0 < ⋯ < t m = S containing every switching time. Write Δ k = t k + 1 − t k \Delta_k=t_{k+1}-t_k Δ k = t k + 1 − t k , h = max k Δ k h=\max_k\Delta_k h = max k Δ k , and let H k ∈ { h 1 , … , h q } H_k\in\{h_1,\ldots,h_q\} H k ∈ { h 1 , … , h q } be the field active on [ t k , t k + 1 ) [t_k,t_{k+1}) [ t k , t k + 1 ) . Forward Euler gives Z 0 = X Z^0=X Z 0 = X and Z k + 1 = Z k + Δ k H k ( Z k ) Z^{k+1}=Z^k+\Delta_kH_k(Z^k) Z k + 1 = Z k + Δ k H k ( Z k ) . On each mesh interval, the integral equation for γ \gamma γ yields
∥ γ ( t k + 1 ) − γ ( t k ) − Δ k H k ( γ ( t k ) ) ∥ ≤ 1 2 Λ B Δ k 2 . \left\lVert\gamma(t_{k+1})-\gamma(t_k)-\Delta_kH_k(\gamma(t_k))\right\rVert\leq\frac{1}{2}\Lambda B\Delta_k^2. ∥ γ ( t k + 1 ) − γ ( t k ) − Δ k H k ( γ ( t k )) ∥ ≤ 2 1 Λ B Δ k 2 .
Consequently, while Z k ∈ K ρ Z^k\in K_\rho Z k ∈ K ρ , the errors e k : = ∥ Z k − γ ( t k ) ∥ e_k:=\lVert Z^k-\gamma(t_k)\rVert e k := ∥ Z k − γ ( t k )∥ satisfy
e k + 1 ≤ ( 1 + Λ Δ k ) e k + 1 2 Λ B Δ k 2 . e_{k+1}\leq(1+\Lambda\Delta_k)e_k+\frac{1}{2}\Lambda B\Delta_k^2. e k + 1 ≤ ( 1 + Λ Δ k ) e k + 2 1 Λ B Δ k 2 .
Since e 0 = 0 e_0=0 e 0 = 0 and Δ k 2 ≤ h Δ k \Delta_k^2\leq h\Delta_k Δ k 2 ≤ h Δ k , induction gives
e k ≤ B h 2 ( ∏ j < k ( 1 + Λ Δ j ) − 1 ) ≤ B h 2 ( e Λ t k − 1 ) ≤ C h , C : = B 2 ( e Λ S − 1 ) . (9) e_k\leq\frac{Bh}{2}\left(\prod_{j<k}(1+\Lambda\Delta_j)-1\right)\leq\frac{Bh}{2}\left(e^{\Lambda t_k}-1\right)\leq Ch,\qquad C:=\frac{B}{2}\left(e^{\Lambda S}-1\right). \tag*{(9)} e k ≤ 2 B h j < k ∏ ( 1 + Λ Δ j ) − 1 ≤ 2 B h ( e Λ t k − 1 ) ≤ C h , C := 2 B ( e Λ S − 1 ) . (9)
Choose ε > 0 \varepsilon>0 ε > 0 with { Z : ∥ Z − Y ∥ < ε } ⊆ U Y \{Z:\lVert Z-Y\rVert<\varepsilon\}\subseteq U_Y { Z : ∥ Z − Y ∥ < ε } ⊆ U Y , and refine the mesh until C h < min { ρ , ε } Ch<\min\{\rho,\varepsilon\} C h < min { ρ , ε } . This can be done with finitely many steps while retaining every switching time. There can be no first iterate outside K ρ K_\rho K ρ : the bound for that iterate, computed from its predecessor inside the tube, would give distance less than ρ \rho ρ from Γ \Gamma Γ . Thus all iterates lie in M \mathcal{M} M , (9) holds throughout, and Y ^ : = Z m \widehat{Y}:=Z^m Y := Z m lies in the fixed neighborhood U Y U_Y U Y . Each Euler step is an admissible residual layer, since Δ k H k ∈ G \Delta_kH_k\in\mathcal{G} Δ k H k ∈ G by positive scaling.
Step 3: combine the Euler and correction layers to obtain exact interpolation. Step 2 gives an Euler endpoint Y ^ ∈ U Y \widehat{Y}\in U_Y Y ∈ U Y . We now apply the correction from Step 1 at this point to reach Y Y Y exactly with at most D D D additional layers. With the controlled trajectory and Euler mesh now fixed, set c j : = a j ( Y ^ ) c_j:=a_j(\widehat{Y}) c j := a j ( Y ) for j = 1 , … , D j=1,\ldots,D j = 1 , … , D , and define the correction fields
g ^ j : W ⟼ c j g j ( W ) . \widehat{g}_j:W\longmapsto c_jg_j(W). g j : W ⟼ c j g j ( W ) .
Each c j c_j c j is a real number, so closure under real scalar multiplication gives g ^ j ∈ G \widehat{g}_j\in\mathcal{G} g j ∈ G . Append the residual layers Id + g ^ j \operatorname{Id}+\widehat{g}_j Id + g j to the Euler network. Their intermediate states satisfy
W 0 = Y ^ , W j = W j − 1 + c j g j ( W j − 1 ) , j = 1 , … , D . W_0=\widehat{Y},\qquad W_j=W_{j-1}+c_jg_j(W_{j-1}),\qquad j=1,\ldots,D. W 0 = Y , W j = W j − 1 + c j g j ( W j − 1 ) , j = 1 , … , D .
By (8), their final output is W D = E ( Y ^ , c ) = Y W_D=E(\widehat{Y},c)=Y W D = E ( Y , c ) = Y , where c = ( c 1 , … , c D ) c=(c_1,\ldots,c_D) c = ( c 1 , … , c D ) , and all intermediate states remain in M \mathcal{M} M . Coefficients c j = 0 c_j=0 c j = 0 give identity layers and may be omitted. Together with the Euler layers, this gives (6) with at most m + D m+D m + D layers. ∎
Extension under a Lie-rank condition
We now prove Proposition 2.9, which replaces the direct-spanning assumption of Proposition E.1 by a local Lie-rank condition. The proof follows the same three steps, with a new local correction in Step 1.
Proposition 2.9 (Exact finite-depth interpolation under Lie rank). Let D ≥ 1 D \ge1 D ≥ 1 , let M ⊆ R D \mathcal{M} \subseteq\mathbb{R}^{D} M ⊆ R D be nonempty, open, and connected, and let G \mathcal{G} G be a family of locally Lipschitz vector fields on M \mathcal{M} M closed under real scalar multiplication. Suppose that, at each Z ∈ M Z \in\mathcal{M} Z ∈ M , there are finitely many fields g 1 , … , g m ∈ G g_1,\ldots,g_m \in\mathcal{G} g 1 , … , g m ∈ G that are smooth on a neighborhood of Z Z Z and satisfy
Lie ( g 1 , … , g m ) ( Z ) = R D . \operatorname{Lie}(g_1,\ldots,g_m)(Z)=\mathbb{R}^{D}. Lie ( g 1 , … , g m ) ( Z ) = R D . Then, for every X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M , there exist a finite integer L ≥ 0 L \ge0 L ≥ 0 and fields h 0 , … , h L − 1 ∈ G h_0,\ldots,h_{L-1} \in\mathcal{G} h 0 , … , h L − 1 ∈ G such that
Z 0 = X , Z k + 1 = Z k + h k ( Z k ) , Z L = Y , Z^0=X,\qquad Z^{k+1}=Z^k+h_k(Z^k),\qquad Z^L=Y, Z 0 = X , Z k + 1 = Z k + h k ( Z k ) , Z L = Y , with Z k ∈ M Z^k \in\mathcal{M} Z k ∈ M for every 0 ≤ k ≤ L 0 \le k \le L 0 ≤ k ≤ L .
Proof. Fix X , Y ∈ M X,Y \in\mathcal{M} X , Y ∈ M . We construct a local correction at Y Y Y , reach its domain by Euler discretization, and concatenate the two networks. If X = Y X=Y X = Y , no layers are needed to interpolate.
Step 1: construct an exact correction near the target. We seek a fixed finite sequence of residual layers whose coefficients can be adjusted to send any point near Y Y Y to Y Y Y . Choose a finite family g 1 , … , g m ∈ G g_1,\ldots,g_m \in\mathcal{G} g 1 , … , g m ∈ G that is smooth on an open neighborhood U ⊆ M U \subseteq\mathcal{M} U ⊆ M of Y Y Y and has full Lie rank at Y Y Y . Write φ g j t \varphi_{g_j}^{t} φ g j t for the local flow of g j g_j g j .
A flow correction with independent parameter directions. Let Ψ \Psi Ψ range over finite compositions of the local flows φ g j t \varphi_{g_j}^{t} φ g j t , with signed times, defined near Y Y Y and with all their flow segments contained in U U U , including the identity composition. For a smooth vector field h h h , its pullback by Ψ \Psi Ψ is the vector field
( Ψ ∗ h ) ( Z ) : = D Ψ ( Z ) − 1 h ( Ψ ( Z ) ) . (\Psi^*h)(Z):=D\Psi(Z)^{-1}h(\Psi(Z)). ( Ψ ∗ h ) ( Z ) := D Ψ ( Z ) − 1 h ( Ψ ( Z )) .
The Jacobian D Ψ ( Z ) D\Psi(Z) D Ψ ( Z ) is invertible since Ψ \Psi Ψ is a composition of local flow maps. Let V Y V_Y V Y be the linear span of ( Ψ ∗ g j ) ( Y ) (\Psi^*g_j)(Y) ( Ψ ∗ g j ) ( Y ) over all such Ψ \Psi Ψ and 1 ≤ j ≤ m 1 \le j \le m 1 ≤ j ≤ m . We write ad g h : = [ g , h ] \operatorname{ad}_g h := [g,h] ad g h := [ g , h ] . The standard differentiation formula for pullbacks (Agrachev & Sachkov, [2 ] , Section 2.5, Eq. (2.21)) gives
d d t ( φ g i t ) ∗ h ∣ t = 0 = [ g i , h ] = ad g i h . \left.\frac{d}{dt}(\varphi_{g_i}^{t})^*h\right|_{t=0}=[g_i,h]=\operatorname{ad}_{g_i}h. d t d ( φ g i t ) ∗ h t = 0 = [ g i , h ] = ad g i h .
Mixed derivatives of pullbacks by successive flows therefore give the evaluations at Y Y Y of all brackets of the form ad g i 1 ⋯ ad g i k g j \operatorname{ad}_{g_{i_1}}\cdots\operatorname{ad}_{g_{i_k}}g_j ad g i 1 ⋯ ad g i k g j . Every such derivative is a limit of finite linear combinations of vectors in V Y V_Y V Y . Since this subspace of R D \mathbb{R}^{D} R D is closed, the derivative also belongs to V Y V_Y V Y . These brackets span the generated Lie algebra by the Jacobi identity. The rank assumption consequently implies V Y = R D V_Y=\mathbb{R}^{D} V Y = R D .
Choose compositions Ψ 1 , … , Ψ D \Psi_1,\ldots,\Psi_D Ψ 1 , … , Ψ D and indices i 1 , … , i D i_1,\ldots,i_D i 1 , … , i D such that
v ℓ = ( Ψ ℓ ∗ g i ℓ ) ( Y ) , 1 ≤ ℓ ≤ D , v_\ell=(\Psi_\ell^*g_{i_\ell})(Y),\qquad1\le\ell\le D, v ℓ = ( Ψ ℓ ∗ g i ℓ ) ( Y ) , 1 ≤ ℓ ≤ D ,
form a basis of R D \mathbb{R}^{D} R D . For a = ( a 1 , … , a D ) a=(a_1,\ldots,a_D) a = ( a 1 , … , a D ) near zero, define
C ℓ a ℓ : = Ψ ℓ − 1 ∘ φ g i ℓ a ℓ ∘ Ψ ℓ , E ( Z , a ) : = C D a D ∘ ⋯ ∘ C 1 a 1 ( Z ) . C_\ell^{a_\ell}:=\Psi_\ell^{-1}\circ\varphi_{g_{i_\ell}}^{a_\ell}\circ\Psi_\ell,\qquad E(Z,a):=C_D^{a_D}\circ\cdots\circ C_1^{a_1}(Z). C ℓ a ℓ := Ψ ℓ − 1 ∘ φ g i ℓ a ℓ ∘ Ψ ℓ , E ( Z , a ) := C D a D ∘ ⋯ ∘ C 1 a 1 ( Z ) .
Each C ℓ a ℓ C_\ell^{a_\ell} C ℓ a ℓ follows Ψ ℓ \Psi_\ell Ψ ℓ , flows along g i ℓ g_{i_\ell} g i ℓ for time a ℓ a_\ell a ℓ , and follows Ψ ℓ − 1 \Psi_\ell^{-1} Ψ ℓ − 1 . The inverse uses the same flows in reverse order with negated times. Thus E E E uses only the g j g_j g j , and E ( Z , 0 ) = Z E(Z,0)=Z E ( Z , 0 ) = Z . Differentiating with respect to a a a gives
E ( Y , 0 ) = Y , A : = D a E ( Y , 0 ) = [ v 1 ⋯ v D ] (10) E(Y,0)=Y,\qquad A:=D_aE(Y,0)=[\,v_1\ \cdots\ v_D\,] \tag*{(10)} E ( Y , 0 ) = Y , A := D a E ( Y , 0 ) = [ v 1 ⋯ v D ] (10)
with A A A invertible. On a sufficiently small compact product neighborhood of ( Y , 0 ) (Y,0) ( Y , 0 ) , all trajectories defining E ( Z , a ) E(Z,a) E ( Z , a ) lie in a common compact subset of U U U .
Replace each flow segment by residual layers. Number the J J J successive flow segments in E E E as
E ( Z , a ) = φ j J τ J ( a ) ∘ ⋯ ∘ φ j 1 τ 1 ( a ) ( Z ) . E(Z,a)=\varphi_{j_J}^{\tau_J(a)}\circ\cdots\circ\varphi_{j_1}^{\tau_1(a)}(Z). E ( Z , a ) = φ j J τ J ( a ) ∘ ⋯ ∘ φ j 1 τ 1 ( a ) ( Z ) .
Here j ℓ j_\ell j ℓ is the field index and τ ℓ ( a ) \tau_\ell(a) τ ℓ ( a ) is the signed time of segment ℓ \ell ℓ . Each τ ℓ \tau_\ell τ ℓ is either a constant, from a fixed composition Ψ k \Psi_k Ψ k or its inverse, or a coordinate a k a_k a k . For fixed a a a , segment ℓ \ell ℓ starting at an incoming state ζ \zeta ζ is the solution, on s ∈ [ 0 , 1 ] s \in[0,1] s ∈ [ 0 , 1 ] , of
d z ℓ d s ( s ) = τ ℓ ( a ) g j ℓ ( z ℓ ( s ) ) , z ℓ ( 0 ) = ζ . \frac{d z_\ell}{d s}(s)=\tau_\ell(a)g_{j_\ell}(z_\ell(s)),\qquad z_\ell(0)=\zeta. d s d z ℓ ( s ) = τ ℓ ( a ) g j ℓ ( z ℓ ( s )) , z ℓ ( 0 ) = ζ .
Its endpoint is z ℓ ( 1 ) = φ j ℓ τ ℓ ( a ) ( ζ ) z_\ell(1)=\varphi_{j_\ell}^{\tau_\ell(a)}(\zeta) z ℓ ( 1 ) = φ j ℓ τ ℓ ( a ) ( ζ ) . This rescaling also covers negative or zero values of τ ℓ ( a ) \tau_\ell(a) τ ℓ ( a ) . Choose an integer q ≥ 1 q \ge1 q ≥ 1 and approximate each such ODE by q q q Euler steps on the grid s r = r / q s_r=r/q s r = r / q :
z ℓ 0 = ζ , z ℓ r + 1 = z ℓ r + τ ℓ ( a ) q g j ℓ ( z ℓ r ) , r = 0 , … , q − 1. z_\ell^0=\zeta,\qquad z_\ell^{r+1}=z_\ell^r+\frac{\tau_\ell(a)}{q}g_{j_\ell}(z_\ell^r),\qquad r=0,\ldots,q-1. z ℓ 0 = ζ , z ℓ r + 1 = z ℓ r + q τ ℓ ( a ) g j ℓ ( z ℓ r ) , r = 0 , … , q − 1.
Thus the exact flow of segment ℓ \ell ℓ is approximated by q q q residual layers with coefficient τ ℓ ( a ) / q \tau_\ell(a)/q τ ℓ ( a ) / q . Starting from Z Z Z and feeding each segment’s Euler endpoint into the next defines
E q ( Z , a ) = ( Id + τ J ( a ) q g j J ) ∘ q ∘ ⋯ ∘ ( Id + τ 1 ( a ) q g j 1 ) ∘ q ( Z ) . E_q(Z,a)=\left(\operatorname{Id}+\frac{\tau_J(a)}{q}g_{j_J}\right)^{\circ q}\circ\cdots\circ\left(\operatorname{Id}+\frac{\tau_1(a)}{q}g_{j_1}\right)^{\circ q}(Z). E q ( Z , a ) = ( Id + q τ J ( a ) g j J ) ∘ q ∘ ⋯ ∘ ( Id + q τ 1 ( a ) g j 1 ) ∘ q ( Z ) .
We use the same q q q for all J J J segments, giving q J qJ q J layers. Increasing q q q refines every segment’s approximation; for each fixed q q q , the starting state Z Z Z and parameters a a a can vary.
On a sufficiently small compact product neighborhood of ( Y , 0 ) (Y,0) ( Y , 0 ) ,
E q ⟶ E in C 1 ( q → ∞ ) . (11) E_q\longrightarrow E\qquad\text{in }C^1\quad(q\to\infty). \tag*{(11)} E q ⟶ E in C 1 ( q → ∞ ) . (11)
where derivatives are taken with respect to ( Z , a ) (Z,a) ( Z , a ) . All intermediate residual states remain in U U U for large q q q . To control derivatives with respect to a a a as well as the incoming state, adjoin the constant parameter a a a to each segment’s ODE. The augmented state u = ( z , a ) ∈ R 2 D u=(z,a)\in\mathbb{R}^{2D} u = ( z , a ) ∈ R 2 D evolves under
H ℓ ( z , a ) : = ( τ ℓ ( a ) g j ℓ ( z ) , 0 ) . H_\ell(z,a):=(\tau_\ell(a)g_{j_\ell}(z),0). H ℓ ( z , a ) := ( τ ℓ ( a ) g j ℓ ( z ) , 0 ) .
Its time-one flow is ( z , a ) ↦ ( φ j ℓ τ ℓ ( a ) ( z ) , a ) (z,a)\mapsto(\varphi_{j_\ell}^{\tau_\ell(a)}(z),a) ( z , a ) ↦ ( φ j ℓ τ ℓ ( a ) ( z ) , a ) , and its Euler scheme is the one above with a a a unchanged. The Jacobian P ( s ) = D u ( 0 ) u ( s ) P(s)=D_{u(0)}u(s) P ( s ) = D u ( 0 ) u ( s ) satisfies
u ˙ = H ℓ ( u ) , P ˙ = D H ℓ ( u ) P , P ( 0 ) = I 2 D . \dot{u}=H_\ell(u),\qquad\dot{P}=DH_\ell(u)P,\qquad P(0)=I_{2D}. u ˙ = H ℓ ( u ) , P ˙ = D H ℓ ( u ) P , P ( 0 ) = I 2 D .
Differentiating the Euler updates gives exactly the Euler scheme for this variational system. Smoothness on the compact neighborhoods above provides uniform bounds, so the Euler estimate in the preceding proof applies to both u u u and P P P . It gives uniform convergence in ( z , a ) (z,a) ( z , a ) of the maps and their Jacobians, while keeping the state iterates in U U U . The chain rule for the finitely many segments then gives (11).
Recover an exact residual correction. Although E ( Y , 0 ) = Y E(Y,0)=Y E ( Y , 0 ) = Y , generally E q ( Y , 0 ) ≠ Y E_q(Y,0)\ne Y E q ( Y , 0 ) = Y . We first adjust a a a to recover an exact return from Y Y Y to Y Y Y . Choose r > 0 r>0 r > 0 small enough that the closed parameter ball B r ( 0 ) ‾ \overline{B_r(0)} B r ( 0 ) lies in the preceding neighborhood and
sup a ∈ B r ( 0 ) ‾ ∥ I − A − 1 D a E ( Y , a ) ∥ ≤ 1 4 . \sup_{a\in\overline{B_r(0)}}\left\lVert I-A^{-1}D_aE(Y,a)\right\rVert\le\frac14. a ∈ B r ( 0 ) sup I − A − 1 D a E ( Y , a ) ≤ 4 1 .
By (11), for all sufficiently large q q q ,
sup a ∈ B r ( 0 ) ‾ ∥ I − A − 1 D a E q ( Y , a ) ∥ ≤ 1 2 , ∥ A − 1 ( E q ( Y , 0 ) − Y ) ∥ ≤ r 4 . \sup_{a\in\overline{B_r(0)}}\left\lVert I-A^{-1}D_aE_q(Y,a)\right\rVert\le\frac12,\qquad\left\lVert A^{-1}(E_q(Y,0)-Y)\right\rVert\le\frac r4. a ∈ B r ( 0 ) sup I − A − 1 D a E q ( Y , a ) ≤ 2 1 , A − 1 ( E q ( Y , 0 ) − Y ) ≤ 4 r .
Fix one such q q q , also large enough to keep every intermediate state in U U U . The map
T q ( a ) : = a − A − 1 ( E q ( Y , a ) − Y ) T_q(a):=a-A^{-1}(E_q(Y,a)-Y) T q ( a ) := a − A − 1 ( E q ( Y , a ) − Y )
is a contraction with constant at most 1 / 2 1/2 1/2 on B r ( 0 ) ‾ \overline{B_r(0)} B r ( 0 ) and satisfies
∥ T q ( a ) ∥ ≤ ∥ T q ( 0 ) ∥ + 1 2 ∥ a ∥ ≤ 3 r 4 . \lVert T_q(a)\rVert\le\lVert T_q(0)\rVert+\frac12\lVert a\rVert\le\frac{3r}{4}. ∥ T q ( a )∥ ≤ ∥ T q ( 0 )∥ + 2 1 ∥ a ∥ ≤ 4 3 r .
The contraction mapping theorem supplies a fixed point a q ∈ B r ( 0 ) a_q\in B_r(0) a q ∈ B r ( 0 ) . Thus E q ( Y , a q ) = Y E_q(Y,a_q)=Y E q ( Y , a q ) = Y , and the derivative bound implies that D a E q ( Y , a q ) D_aE_q(Y,a_q) D a E q ( Y , a q ) is invertible.
Now allow the starting point Z Z Z to vary near Y Y Y . The implicit function theorem at ( Y , a q ) (Y,a_q) ( Y , a q ) gives a neighborhood U Y ⊆ U U_Y \subseteq U U Y ⊆ U and a C 1 C^1 C 1 map α : U Y → B r ( 0 ) \alpha:U_Y \to B_r(0) α : U Y → B r ( 0 ) , with α ( Y ) = a q \alpha(Y)=a_q α ( Y ) = a q , such that
E q ( Z , α ( Z ) ) = Y for every Z ∈ U Y . (12) E_q(Z,\alpha(Z))=Y \qquad\text{for every } Z\in U_Y. \tag*{(12)} E q ( Z , α ( Z )) = Y for every Z ∈ U Y . (12)
Shrinking U Y U_Y U Y keeps all intermediate states in U U U . The correction uses L Y : = q J L_Y := qJ L Y := q J layers: in segment ℓ \ell ℓ , each coefficient is τ ℓ ( α ( Z ) ) / q \tau_\ell(\alpha(Z))/q τ ℓ ( α ( Z )) / q . These are fixed real scalars once Z Z Z is specified, so scalar closure makes every layer admissible. The integer q q q , the layer sequence, and U Y U_Y U Y are fixed before the next step.
Step 2: reach the correction neighborhood by Euler discretization. We now approximate a trajectory from X X X to Y Y Y closely enough to reach the fixed neighborhood U Y U_Y U Y . By the local rank and connectedness argument proving Corollary 2.6, a piecewise-constant controlled trajectory γ : [ 0 , S ] → M \gamma:[0,S]\to\mathcal{M} γ : [ 0 , S ] → M joins X X X to Y Y Y for some S > 0 S>0 S > 0 . Fix any such trajectory. Its image Γ \Gamma Γ is compact, so there is ρ > 0 \rho>0 ρ > 0 such that the compact tube
K ρ : = { Z ∈ R D : dist ( Z , Γ ) ≤ ρ } ⊆ M . K_\rho:=\{Z\in\mathbb{R}^{D}:\operatorname{dist}(Z,\Gamma)\leq\rho\}\subseteq\mathcal{M}. K ρ := { Z ∈ R D : dist ( Z , Γ ) ≤ ρ } ⊆ M .
Let 0 = s 0 < ⋯ < s ν = S 0=s_0<\cdots<s_\nu=S 0 = s 0 < ⋯ < s ν = S be the switching times of the fixed control, and let h i ∈ G h_i\in\mathcal{G} h i ∈ G denote the vector field selected on [ s i − 1 , s i ) [s_{i-1},s_i) [ s i − 1 , s i ) , so that
γ ˙ ( t ) = h i ( γ ( t ) ) for t ∈ ( s i − 1 , s i ) . \dot{\gamma}(t)=h_i(\gamma(t)) \qquad\text{for } t\in(s_{i-1},s_i). γ ˙ ( t ) = h i ( γ ( t )) for t ∈ ( s i − 1 , s i ) .
These finitely many locally Lipschitz fields have a common norm bound B ≥ 1 B\geq1 B ≥ 1 and Lipschitz constant Λ ≥ 1 \Lambda\geq1 Λ ≥ 1 on K ρ K_\rho K ρ . Indeed, continuity and compactness give
B : = max { 1 , max 1 ≤ i ≤ ν max Z ∈ K ρ ∥ h i ( Z ) ∥ } < ∞ . B:=\max\left\{1,\max_{1\leq i\leq\nu}\max_{Z\in K_\rho}\lVert h_i(Z)\rVert\right\}<\infty. B := max { 1 , 1 ≤ i ≤ ν max Z ∈ K ρ max ∥ h i ( Z )∥ } < ∞.
The finite-cover argument in the preceding proof gives η > 0 \eta>0 η > 0 and a common L l o c L_{\mathrm{loc}} L loc for pairs of points in K ρ K_\rho K ρ at distance less than η \eta η . For more distant pairs, the norm bound gives ∥ h i ( Z ) − h i ( W ) ∥ ≤ 2 B ≤ ( 2 B / η ) ∥ Z − W ∥ \lVert h_i(Z)-h_i(W)\rVert\leq2B\leq(2B/\eta)\lVert Z-W\rVert ∥ h i ( Z ) − h i ( W )∥ ≤ 2 B ≤ ( 2 B / η ) ∥ Z − W ∥ . Hence Λ = max { 1 , L l o c , 2 B / η } \Lambda=\max\{1,L_{\mathrm{loc}},2B/\eta\} Λ = max { 1 , L loc , 2 B / η } works on all of K ρ K_\rho K ρ .
Choose a finite mesh 0 = t 0 < ⋯ < t L E = S 0=t_0<\cdots<t_{L_E}=S 0 = t 0 < ⋯ < t L E = S containing every switching time. Write Δ k = t k + 1 − t k \Delta_k=t_{k+1}-t_k Δ k = t k + 1 − t k , h = max k Δ k h=\max_k\Delta_k h = max k Δ k , and let H k ∈ { h 1 , … , h ν } H_k\in\{h_1,\ldots,h_\nu\} H k ∈ { h 1 , … , h ν } be the field active on [ t k , t k + 1 ) [t_k,t_{k+1}) [ t k , t k + 1 ) . Forward Euler gives Z 0 = X Z^0=X Z 0 = X and Z k + 1 = Z k + Δ k H k ( Z k ) Z^{k+1}=Z^k+\Delta_kH_k(Z^k) Z k + 1 = Z k + Δ k H k ( Z k ) . On each mesh interval, the integral equation for γ \gamma γ yields
∥ γ ( t k + 1 ) − γ ( t k ) − Δ k H k ( γ ( t k ) ) ∥ ≤ 1 2 Λ B Δ k 2 . \left\lVert\gamma(t_{k+1})-\gamma(t_k)-\Delta_kH_k(\gamma(t_k))\right\rVert\leq\tfrac{1}{2}\Lambda B\Delta_k^2. ∥ γ ( t k + 1 ) − γ ( t k ) − Δ k H k ( γ ( t k )) ∥ ≤ 2 1 Λ B Δ k 2 .
Consequently, while Z k ∈ K ρ Z^k\in K_\rho Z k ∈ K ρ , the errors e k : = ∥ Z k − γ ( t k ) ∥ e_k:=\lVert Z^k-\gamma(t_k)\rVert e k := ∥ Z k − γ ( t k )∥ satisfy
e k + 1 ≤ ( 1 + Λ Δ k ) e k + 1 2 Λ B Δ k 2 . e_{k+1}\leq(1+\Lambda\Delta_k)e_k+\tfrac{1}{2}\Lambda B\Delta_k^2. e k + 1 ≤ ( 1 + Λ Δ k ) e k + 2 1 Λ B Δ k 2 .
Since e 0 = 0 e_0=0 e 0 = 0 and Δ k 2 ≤ h Δ k \Delta_k^2\leq h\Delta_k Δ k 2 ≤ h Δ k , induction gives
e k ≤ B h 2 ( ∏ j < k ( 1 + Λ Δ j ) − 1 ) ≤ B h 2 ( e Λ t k − 1 ) ≤ C h , C : = B 2 ( e Λ S − 1 ) . (13) e_k\leq\frac{Bh}{2}\left(\prod_{j<k}(1+\Lambda\Delta_j)-1\right)\leq\frac{Bh}{2}\left(e^{\Lambda t_k}-1\right)\leq Ch,\qquad C:=\frac{B}{2}\left(e^{\Lambda S}-1\right). \tag*{(13)} e k ≤ 2 B h j < k ∏ ( 1 + Λ Δ j ) − 1 ≤ 2 B h ( e Λ t k − 1 ) ≤ C h , C := 2 B ( e Λ S − 1 ) . (13)
Choose ε > 0 \varepsilon>0 ε > 0 with { Z : ∥ Z − Y ∥ < ε } ⊆ U Y \{Z:\lVert Z-Y\rVert<\varepsilon\}\subseteq U_Y { Z : ∥ Z − Y ∥ < ε } ⊆ U Y , and refine the mesh until C h < min { ρ , ε } Ch<\min\{\rho,\varepsilon\} C h < min { ρ , ε } . This can be done with finitely many steps while retaining every switching time. There can be no first iterate outside K ρ K_\rho K ρ : the bound for that iterate, computed from its predecessor inside the tube, would give distance less than ρ \rho ρ from Γ \Gamma Γ . Thus all iterates lie in M \mathcal{M} M , (13) holds throughout, and Y ~ : = Z L E \widetilde{Y}:=Z^{L_E} Y := Z L E lies in the fixed neighborhood U Y U_Y U Y . Each Euler step is an admissible residual layer, since Δ k H k ∈ G \Delta_kH_k\in\mathcal{G} Δ k H k ∈ G by positive scaling.
Step 3: concatenate the Euler and correction layers. Step 2 gives an Euler endpoint Y ~ ∈ U Y \widetilde{Y}\in U_Y Y ∈ U Y . Set a = α ( Y ~ ) a=\alpha(\widetilde{Y}) a = α ( Y ) and append the L Y L_Y L Y residual layers defining E q ( ⋅ , a ) E_q(\mathord{\cdot},a) E q ( ⋅ , a ) to this Euler network. Their fields all belong to G \mathcal{G} G : each is a fixed real scalar multiple of one of the fields selected in Step 1. By (12) , the final output is E q ( Y ~ , a ) = Y E_q(\widetilde{Y},a)=Y E q ( Y , a ) = Y , and all intermediate configurations remain in M \mathcal{M} M . Together with the L E L_E L E Euler layers, this gives a finite admissible network with at most L E + L Y L_E+L_Y L E + L Y layers. All its scalar coefficients are fixed for the prescribed interpolation problem. In a batch application, these scalars are shared across all samples. ∙იდ
Universal finite-depth interpolation
Direct spanning
Proposition F.1 (Universal finite-depth interpolation). Fix N ≥ 1 N \ge1 N ≥ 1 and a configuration space M N \mathcal{M}_N M N as in Definition 2.4 , and assume that F \mathcal{F} F allows real scalar multiplication. Suppose there exist finitely many parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m such that, at each X ∈ M N X \in\mathcal{M}_N X ∈ M N , one can select N p Np N p of their lifted fields that are C 1 C^1 C 1 near X X X and whose values at X X X form a basis of R N p \mathbb{R}^{Np} R N p . Then F \mathcal{F} F has universal interpolation at finite depth on M N \mathcal{M}_N M N , using these same parameters.
Proof. Fix the parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m in the hypothesis and set
G N : = { a f θ j ( N ) : a ∈ R , 1 ≤ j ≤ m } . \mathcal{G}_N := \{a f_{\theta_j}^{(N)} : a \in\mathbb{R},\ 1 \le j \le m\}. G N := { a f θ j ( N ) : a ∈ R , 1 ≤ j ≤ m } .
Every field in G N \mathcal{G}_N G N is locally Lipschitz on R N p \mathbb{R}^{Np} R N p , hence also on M N \mathcal{M}_N M N . The family is closed under real scalar multiplication and, on M N \mathcal{M}_N M N , satisfies the pointwise basis condition of Corollary D.1 with D = N p D = Np D = N p . Thus Proposition E.1 joins every pair of configurations by residual layers Id + c k f θ j k ( N ) \operatorname{Id} + c_k f_{\theta_{j_k}}^{(N)} Id + c k f θ j k ( N ) , with all intermediate configurations in M N \mathcal{M}_N M N . The parameters were fixed before the endpoints; only the depth, indices, and scalar coefficients depend on them. This is universal interpolation at finite depth as defined in § 2.3 . □
Extension under a Lie-rank condition
Proposition 2.10 (Universal finite-depth interpolation under Lie rank). Fix N ≥ 1 N \ge1 N ≥ 1 and a configuration space M N \mathcal{M}_N M N as in Definition 2.4 , and assume that F \mathcal{F} F allows real scalar multiplication. Suppose there exist finitely many parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m such that, at each X ∈ M N X \in\mathcal{M}_N X ∈ M N , an index set I X ⊆ { 1 , … , m } I_X \subseteq\{1,\ldots,m\} I X ⊆ { 1 , … , m } selects lifted fields smooth near X X X with
Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . \operatorname{Lie}(f_{\theta_j}^{(N)} : j \in I_X)(X) = \mathbb{R}^{Np}. Lie ( f θ j ( N ) : j ∈ I X ) ( X ) = R N p . Then F \mathcal{F} F has universal interpolation at finite depth on M N \mathcal{M}_N M N , using these same parameters.
Proof. Fix the parameters θ 1 , … , θ m \theta_1,\ldots,\theta_m θ 1 , … , θ m in the hypothesis and set
G N : = { c f θ j ( N ) : c ∈ R , 1 ≤ j ≤ m } . \mathcal{G}_N := \{c f_{\theta_j}^{(N)} : c \in\mathbb{R},\ 1 \le j \le m\}. G N := { c f θ j ( N ) : c ∈ R , 1 ≤ j ≤ m } .
This family is locally Lipschitz and closed under real scalar multiplication. At each X ∈ M N X \in\mathcal{M}_N X ∈ M N , the fields indexed by I X I_X I X form a finite subfamily that is smooth near X X X and has full Lie rank there. Thus Proposition 2.9, with D = N p D = Np D = N p , joins every pair X , Y ∈ M N X,Y \in\mathcal{M}_N X , Y ∈ M N by finitely many residual layers
Id + c k f θ j k ( N ) , c k ∈ R , j k ∈ { 1 , … , m } , \operatorname{Id} + c_k f_{\theta_{j_k}}^{(N)}, \qquad c_k \in\mathbb{R}, \quad j_k \in\{1,\ldots,m\}, Id + c k f θ j k ( N ) , c k ∈ R , j k ∈ { 1 , … , m } ,
with all intermediate configurations in M N \mathcal{M}_N M N . The parameters were fixed before the endpoints; only the depth, indices, and scalar coefficients depend on them. This is universal interpolation at finite depth using the same dictionary. □
Residual networks
For N ≥ 1 N \ge1 N ≥ 1 and d ≥ 2 d \ge2 d ≥ 2 , define the generic configuration space
C N , d : = { ( x 1 , … , x N ) ∈ ( R d ) N : x i ≠ 0 and x i ∉ R x j for all i ≠ j } . \mathcal{C}_{N,d} := \left\{(x_1,\ldots,x_N) \in(\mathbb{R}^d)^N : x_i \ne0 \text{ and } x_i \notin\mathbb{R}x_j \text{ for all } i \ne j\right\}. C N , d := { ( x 1 , … , x N ) ∈ ( R d ) N : x i = 0 and x i ∈ / R x j for all i = j } .
It is nonempty and open: distinct nonzero projective directions give examples, while the excluded zero vectors and collinear pairs form a finite union of closed sets.
Theorem G.1 (Exact interpolation by bias-free ResNets). Let d ≥ 3 d \ge3 d ≥ 3 and r ≥ 1 r \ge1 r ≥ 1 . For every N ≥ 1 N \ge1 N ≥ 1 , the family of vector fields in (2) has the exact interpolation property on C N , d \mathcal{C}_{N,d} C N , d , both at continuous depth in the sense of Definition 2.3 and at finite depth in the sense of § 2.3 . One active hidden unit per layer suffices, and every intermediate configuration remains in C N , d \mathcal{C}_{N,d} C N , d .
The proof is given in Section G.2.
With identity activation, both continuous- and finite-depth networks apply a common linear map to all samples and preserve their linear relations. For N > d N > d N > d , the lifted Lie algebra has rank at most d 2 < N d d^2 < Nd d 2 < N d , so the analytic converse in Corollary 2.6 rules out continuous-depth exact interpolation on any nonempty open subset of ( R d ) N (\mathbb{R}^d)^N ( R d ) N . The preserved linear relations give the same obstruction at finite depth, thereby also excluding universal interpolation at both depths. The proof is given in Section G.1. The following theorem establishes universal interpolation for bias-free ReLU ResNets on C N , d \mathcal{C}_{N,d} C N , d , using a fixed family of updates that works for every N N N .
Theorem G.3 (Universal interpolation by bias-free ResNets). Let d ≥ 3 d \ge3 d ≥ 3 and r ≥ 1 r \ge1 r ≥ 1 , and let e 1 , … , e d e_1,\ldots,e_d e 1 , … , e d be the standard basis of R d \mathbb{R}^d R d . Define the fixed family
R d : = { g i j ε : x ↦ e i σ ( ε x j ) : 1 ≤ i , j ≤ d , ε ∈ { − 1 , 1 } } . (14) \mathcal{R}_d := \left\{g_{ij}^{\varepsilon}:x\mapsto e_i\sigma(\varepsilon x_j):1\le i,j\le d,\ \varepsilon\in\{-1,1\}\right\}. \tag*{(14)} R d := { g ij ε : x ↦ e i σ ( ε x j ) : 1 ≤ i , j ≤ d , ε ∈ { − 1 , 1 } } . (14) For every N ≥ 1 N \ge1 N ≥ 1 , the ResNet family in (2) has universal interpolation on C N , d \mathcal{C}_{N,d} C N , d , both at continuous depth in the sense of Definition 2.4 and at finite depth in the sense of § 2.3 , using the same 2 d 2 2d^2 2 d 2 generators from R d \mathcal{R}_d R d . At continuous depth, each generator may be used in either sign. These generators are independent of N N N and require only one active hidden unit per layer.
The proof in Section G.3 realizes the flows used in Theorem G.1 by composing flows from the fixed family (14). Each such flow is itself exactly a residual layer with a suitable scalar gain.
Fixed families giving exact interpolation are known for general neural ODEs ([12 , 21 ] ) and for certain smooth-activation ResNets ([36 ] ). For ReLU, Duan & Cai [17 ] prove universal approximation using a finite family of linear fields, translations, and ReLU, while Cai & Duan [9 ] prove exact interpolation using affine fields and ReLU. Cai [8 ] also constructs a finite vocabulary of maps for universal approximation. Theorem G.3 gives an explicit family of bias-free, width-one ReLU updates, reusable for every N N N , with exact interpolation at both continuous and finite depth.
Linear activation and the obstruction to interpolation
The following lemma also applies to the shared linear dynamics of attention with sequence length n = 1 n = 1 n = 1 .
Lemma G.5 (Linear-relation obstruction). Let d ≥ 1 d \ge1 d ≥ 1 , N > d N > d N > d , and M ⊆ ( R d ) N \mathcal{M} \subseteq(\mathbb{R}^d)^N M ⊆ ( R d ) N be nonempty and open. For every X ∈ M X \in\mathcal{M} X ∈ M , there are arbitrarily close targets Y ∈ M Y \in\mathcal{M} Y ∈ M in the same connected component that cannot be obtained from X X X by a shared linear map. Thus neither controlled linear ODEs nor finite compositions of linear residual layers can interpolate every pair of configurations in M \mathcal{M} M .
Proof. For A ∈ R d × d A \in\mathbb{R}^{d\times d} A ∈ R d × d , define f A ( x ) = A x f_A(x)=Ax f A ( x ) = A x and its lift F A ( X ) = ( A x 1 , … , A x N ) F_A(X)=(Ax^1,\ldots,Ax^N) F A ( X ) = ( A x 1 , … , A x N ) . The bracket convention gives
[ F A , F B ] = F B A − A B . [F_A,F_B]=F_{BA-AB}. [ F A , F B ] = F B A − A B .
Therefore, for any family of linear fields,
Lie { F A θ : θ ∈ Θ } ( X ) ⊆ { ( A x 1 , … , A x N ) : A ∈ R d × d } . \operatorname{Lie}\{F_{A_\theta}:\theta\in\Theta\}(X)\subseteq\{(Ax^1,\ldots,Ax^N):A\in\mathbb{R}^{d\times d}\}. Lie { F A θ : θ ∈ Θ } ( X ) ⊆ {( A x 1 , … , A x N ) : A ∈ R d × d } .
The space on the right is the image of a linear map from R d × d \mathbb{R}^{d\times d} R d × d , so its dimension is at most d 2 < N d d^2 < Nd d 2 < N d .
To establish the obstruction for both depth conventions, observe that a continuous linear network applies a common fundamental matrix to all samples, and a finite linear residual network applies the common matrix ( I + A L − 1 ) ⋯ ( I + A 0 ) (I + A_{L-1}) \cdots(I + A_0) ( I + A L − 1 ) ⋯ ( I + A 0 ) . In either case, write A ∗ A_* A ∗ for the common output matrix. Every input linear relation is retained at the output:
∑ i = 1 N c i x i = 0 ⟹ ∑ i = 1 N c i A ∗ x i = A ∗ ∑ i = 1 N c i x i = 0. \sum_{i=1}^{N} c_i x^i = 0 \quad\Longrightarrow\quad\sum_{i=1}^{N} c_i A_* x^i = A_* \sum_{i=1}^{N} c_i x^i = 0. i = 1 ∑ N c i x i = 0 ⟹ i = 1 ∑ N c i A ∗ x i = A ∗ i = 1 ∑ N c i x i = 0.
Fix any X = ( x 1 , … , x N ) ∈ M X = (x^1,\ldots,x^N) \in\mathcal{M} X = ( x 1 , … , x N ) ∈ M . Since N > d N > d N > d , choose a nonzero relation ∑ i c i x i = 0 \sum_i c_i x^i = 0 ∑ i c i x i = 0 and an index j j j with c j ≠ 0 c_j \ne0 c j = 0 . Choose any nonzero u ∈ R d u \in\mathbb{R}^d u ∈ R d and set y j = x j + ε u y_j = x_j + \varepsilon u y j = x j + ε u and y i = x i y_i = x_i y i = x i for i ≠ j i \ne j i = j . For sufficiently small ε ≠ 0 \varepsilon\ne0 ε = 0 , openness of M \mathcal{M} M ensures that the segment from X X X to Y Y Y lies in M \mathcal{M} M . Thus Y Y Y is in the same connected component as X X X , but
∑ i c i y i = ε c j u ≠ 0. \sum_i c_i y_i = \varepsilon c_j u \ne0. i ∑ c i y i = ε c j u = 0.
No shared linear map can send X X X to Y Y Y . Taking arbitrarily small nonzero ε \varepsilon ε proves the lemma.
For ResNets with identity activation, the vector fields take the form
f U , V ( x ) = U σ ( V T x ) = U V T x , U , V ∈ R d × r . f_{U,V}(x) = U\sigma(V^\mathsf{T}x) = UV^\mathsf{T}x,\qquad U,V \in\mathbb{R}^{d\times r}. f U , V ( x ) = U σ ( V T x ) = U V T x , U , V ∈ R d × r .
Since Lemma G.5 applies to arbitrary linear fields x ↦ A x x \mapsto Ax x ↦ A x , it applies in particular to A = U V T A = UV^\mathsf{T} A = U V T , for every hidden width r r r . Thus, when N > d N > d N > d , increasing the hidden width cannot remove the obstruction to interpolation, at either continuous or finite depth.
Proof of the ResNet theorem
Proof. We first prove the stronger statement that exact interpolation holds at both continuous and finite depth on every connected component of C N , d \mathcal{C}_{N,d} C N , d for all d ≥ 2 d \ge2 d ≥ 2 . For X = ( x 1 , … , x N ) X = (x^1,\ldots,x^N) X = ( x 1 , … , x N ) , write
f U , V ( N ) ( X ) : = ( U σ ( V T x 1 ) , … , U σ ( V T x N ) ) . f_{U,V}^{(N)}(X) := (U\sigma(V^\mathsf{T}x^1),\ldots,U\sigma(V^\mathsf{T}x^N)). f U , V ( N ) ( X ) := ( U σ ( V T x 1 ) , … , U σ ( V T x N )) .
The width-one subfamily
G u , v ( X ) : = ( u σ ( v T x 1 ) , … , u σ ( v T x N ) ) , u , v ∈ R d , G_{u,v}(X) := (u\sigma(v^\mathsf{T}x^1),\ldots,u\sigma(v^\mathsf{T}x^N)),\qquad u,v \in\mathbb{R}^d, G u , v ( X ) := ( u σ ( v T x 1 ) , … , u σ ( v T x N )) , u , v ∈ R d ,
is contained in the width-r r r family for every r ≥ 1 r \ge1 r ≥ 1 : take U = ( u , 0 , … , 0 ) U = (u,0,\ldots,0) U = ( u , 0 , … , 0 ) and V = ( v , … , v ) V = (v,\ldots,v) V = ( v , … , v ) .
Fix X ∈ C N , d X \in\mathcal{C}_{N,d} X ∈ C N , d and set
H i : = { v ∈ R d : v T x i = 0 } , O X : = R d ∖ ⋃ j = 1 N H j . \mathcal{H}_i := \{v \in\mathbb{R}^d : v^\mathsf{T}x^i = 0\},\qquad\mathcal{O}_X := \mathbb{R}^d \setminus\bigcup_{j=1}^{N}\mathcal{H}_j. H i := { v ∈ R d : v T x i = 0 } , O X := R d ∖ j = 1 ⋃ N H j .
The hyperplanes H 1 , … , H N \mathcal{H}_1,\ldots,\mathcal{H}_N H 1 , … , H N are pairwise distinct. Hence, for each i i i , we may choose
w ∈ H i ∖ ⋃ j ≠ i H j . w \in\mathcal{H}_i \setminus\bigcup_{j \ne i}\mathcal{H}_j. w ∈ H i ∖ j = i ⋃ H j .
For sufficiently small δ > 0 \delta> 0 δ > 0 , the four vectors
v k : = w + k δ x i , k ∈ { − 2 , − 1 , 1 , 2 } , v_k := w + k\delta x^i,\qquad k \in\{-2,-1,1,2\}, v k := w + k δ x i , k ∈ { − 2 , − 1 , 1 , 2 } ,
all belong to O X \mathcal{O}_X O X , and, for j ≠ i j \ne i j = i , the signs of v k T x j v_k^\mathsf{T}x^j v k T x j do not depend on k k k . Therefore, for every u ∈ R d u \in\mathbb{R}^d u ∈ R d ,
G u , v 2 ( X ) − G u , v 1 ( X ) − G u , v − 1 ( X ) + G u , v − 2 ( X ) = δ ∥ x i ∥ 2 ( 0 , … , 0 , u , 0 , … , 0 ) , (15) \begin{aligned}
G_{u,v_2}(X) - G_{u,v_1}(X) - G_{u,v_{-1}}(X) + G_{u,v_{-2}}(X)
= \delta\lVert x^i\rVert^2(0,\ldots,0,u,0,\ldots,0), \tag*{(15)}
\end{aligned} G u , v 2 ( X ) − G u , v 1 ( X ) − G u , v − 1 ( X ) + G u , v − 2 ( X ) = δ ∥ x i ∥ 2 ( 0 , … , 0 , u , 0 , … , 0 ) , (15)
where u u u occupies the i i i -th block on the right-hand side. Indeed, in every block j ≠ i j \ne i j = i , the ReLU is either zero or affine as a function of k k k , so its finite difference vanishes. In the i i i -th block, v k T x i = k δ ∥ x i ∥ 2 v_k^\mathsf{T}x^i = k\delta\lVert x^i\rVert^2 v k T x i = k δ ∥ x i ∥ 2 , and the finite difference is δ ∥ x i ∥ 2 u \delta\lVert x^i\rVert^2u δ ∥ x i ∥ 2 u .
Since i i i and u u u are arbitrary, (15) gives
span { f U , V ( N ) ( X ) : U , V ∈ R d × r } = ( R d ) N . (16) \operatorname{span}\left\{f_{U,V}^{(N)}(X): U,V \in\mathbb{R}^{d\times r}\right\} = (\mathbb{R}^d)^N. \tag*{(16)} span { f U , V ( N ) ( X ) : U , V ∈ R d × r } = ( R d ) N . (16)
In fact, the width-one subfamily { G u , v } \{G_{u,v}\} { G u , v } already has this full pointwise span. Moreover, every field used in (15) is smooth on a neighborhood of X X X , because v T x j ≠ 0 v^{\mathsf T}x^j \ne0 v T x j = 0 for all j j j . Thus, at each X ∈ C N , d X \in C_{N,d} X ∈ C N , d , we may select N d Nd N d locally smooth width-one fields whose values form a basis of ( R d ) N (\mathbb{R}^d)^N ( R d ) N .
The lifted ResNet family is closed under negation:
− f U , V ( N ) = f − U , V ( N ) . -f^{(N)}_{U,V}=f^{(N)}_{-U,V}. − f U , V ( N ) = f − U , V ( N ) .
Since C N , d C_{N,d} C N , d is open, Corollary D.1 and (16) give exact interpolation at continuous depth on every connected component of C N , d C_{N,d} C N , d . For finite depth, the family is also closed under real scalar multiplication, since a f U , V ( N ) = f a U , V ( N ) af^{(N)}_{U,V}=f^{(N)}_{aU,V} a f U , V ( N ) = f a U , V ( N ) . The locally smooth width-one fields selected above therefore satisfy the hypotheses of Proposition E.1, with D = N d D=Nd D = N d . It gives exact interpolation at finite depth, with every intermediate configuration in the same component. Each scalar gain is absorbed into the output matrix U U U .
It remains to prove that C N , d C_{N,d} C N , d is connected when d ≥ 3 d \ge3 d ≥ 3 . Write x i = r i u i x^i=r_i u_i x i = r i u i , where r i > 0 r_i>0 r i > 0 and u i ∈ S d − 1 u_i\in S^{d-1} u i ∈ S d − 1 . This identifies C N , d C_{N,d} C N , d with
( 0 , ∞ ) N × D N , d , D N , d : = { ( u 1 , … , u N ) ∈ ( S d − 1 ) N : u i ≠ ± u j for i ≠ j } . (0,\infty)^N \times D_{N,d}, \qquad D_{N,d}:=\{(u_1,\ldots,u_N)\in(S^{d-1})^N:u_i\ne\pm u_j\text{ for }i\ne j\}. ( 0 , ∞ ) N × D N , d , D N , d := {( u 1 , … , u N ) ∈ ( S d − 1 ) N : u i = ± u j for i = j } .
Let u = ( u 1 , … , u N ) u=(u_1,\ldots,u_N) u = ( u 1 , … , u N ) and u ~ = ( u ~ 1 , … , u ~ N ) \widetilde{u}=(\widetilde{u}_1,\ldots,\widetilde{u}_N) u = ( u 1 , … , u N ) belong to D N , d D_{N,d} D N , d . Choose points p 1 , … , p N ∈ S d − 1 p_1,\ldots,p_N\in S^{d-1} p 1 , … , p N ∈ S d − 1 inductively, with each p i p_i p i different from the finitely many points
{ ± u j , ± u ~ j : 1 ≤ j ≤ N } ∪ { ± p j : 1 ≤ j < i } . \{\pm u_j,\pm\widetilde{u}_j:1\le j\le N\}\cup\{\pm p_j:1\le j<i\}. { ± u j , ± u j : 1 ≤ j ≤ N } ∪ { ± p j : 1 ≤ j < i } .
Because d − 1 ≥ 2 d-1\ge2 d − 1 ≥ 2 , a sphere with finitely many points removed is path connected. We may consequently move u 1 , … , u N u_1,\ldots,u_N u 1 , … , u N , one at a time, to p 1 , … , p N p_1,\ldots,p_N p 1 , … , p N while avoiding the directions and antipodal directions of the points kept fixed. Moving the p i p_i p i one at a time to u ~ i \widetilde{u}_i u i gives a path in D N , d D_{N,d} D N , d from u u u to u ~ \widetilde{u} u . The factor ( 0 , ∞ ) N (0,\infty)^N ( 0 , ∞ ) N is path connected as well. Hence C N , d C_{N,d} C N , d is path connected for d ≥ 3 d\ge3 d ≥ 3 , and the componentwise result proved above yields the theorem. For d = 2 d=2 d = 2 and N ≥ 2 N\ge2 N ≥ 2 , the continuous function X ↦ det ( x 1 , x 2 ) X\mapsto\det(x^1,x^2) X ↦ det ( x 1 , x 2 ) never vanishes on C N , 2 C_{N,2} C N , 2 by definition of C N , 2 C_{N,2} C N , 2 , and takes both signs, so this space is disconnected.
Proof of Theorem G.3
Proof. Fix d ≥ 3 d\ge3 d ≥ 3 , N ≥ 1 N\ge1 N ≥ 1 , and the family R d \mathcal{R}_d R d in the statement. Write ϕ g t \phi_g^t ϕ g t for the flow of a field g g g , acting componentwise on configurations. For g ( x ) = u σ ( v T x ) g(x)=u\sigma(v^{\mathsf T}x) g ( x ) = u σ ( v T x ) and α = v T u \alpha=v^{\mathsf T}u α = v T u , this flow is defined for every t ∈ R t\in\mathbb{R} t ∈ R and satisfies
ϕ g t ( x ) = x + β α ( t ) g ( x ) , β α ( t ) = { ( e α t − 1 ) / α , α ≠ 0 , t , α = 0. (17) \phi_g^t(x)=x+\beta_\alpha(t)g(x),\qquad\beta_\alpha(t)=
\begin{cases}
(e^{\alpha t}-1)/\alpha,&\alpha\ne0,\\
t,&\alpha=0.
\end{cases} \tag*{(17)} ϕ g t ( x ) = x + β α ( t ) g ( x ) , β α ( t ) = { ( e α t − 1 ) / α , t , α = 0 , α = 0. (17)
Indeed, q ( t ) = v T ϕ g t ( x ) q(t)=v^{\mathsf T}\phi_g^t(x) q ( t ) = v T ϕ g t ( x ) solves q ˙ = α σ ( q ) \dot q=\alpha\sigma(q) q ˙ = α σ ( q ) : it remains constant when q ( 0 ) ≤ 0 q(0)\le0 q ( 0 ) ≤ 0 and equals e α t q ( 0 ) e^{\alpha t}q(0) e α t q ( 0 ) otherwise. Integrating the equation for ϕ g t ( x ) \phi_g^t(x) ϕ g t ( x ) gives (17).
We first show that the fixed family can realize every linear map A ∈ G L + ( d ) : = { A : det A > 0 } A\in GL^+(d):=\{A:\det A>0\} A ∈ G L + ( d ) := { A : det A > 0 } while keeping a prescribed configuration in C N , d C_{N,d} C N , d . Put E i j = e i e j T E_{ij}=e_i e_j^{\mathsf T} E ij = e i e j T . The flows of g i j + 1 g_{ij}^{+1} g ij + 1 and g i j − 1 g_{ij}^{-1} g ij − 1 commute: for i ≠ j i\ne j i = j they preserve x j x_j x j , and for i = j i=j i = j they act on separate invariant half-lines. Since g i j + 1 ( x ) − g i j − 1 ( x ) = E i j x g_{ij}^{+1}(x)-g_{ij}^{-1}(x)=E_{ij}x g ij + 1 ( x ) − g ij − 1 ( x ) = E ij x , we have
ϕ g i j + 1 t ∘ ϕ g i j − 1 − t ( x ) = e t E i j x . (18) \phi_{g_{ij}^{+1}}^t\circ\phi_{g_{ij}^{-1}}^{-t}(x)=e^{tE_{ij}}x. \tag*{(18)} ϕ g ij + 1 t ∘ ϕ g ij − 1 − t ( x ) = e t E ij x . (18)
Every matrix in G L + ( d ) GL^+(d) G L + ( d ) is a finite product of these exponentials. To see this, the derivative at zero of ( t i j ) ↦ exp ( ∑ i , j t i j E i j ) (t_{ij})\mapsto\exp(\sum_{i,j}t_{ij}E_{ij}) ( t ij ) ↦ exp ( ∑ i , j t ij E ij ) , with any fixed ordering of the factors, is the isomorphism ( t i j ) ↦ ∑ i , j t i j E i j (t_{ij})\mapsto\sum_{i,j}t_{ij}E_{ij} ( t ij ) ↦ ∑ i , j t ij E ij . The inverse function theorem shows that the subgroup generated by these exponentials contains a neighborhood of the identity. It is therefore open, and connectedness of G L + ( d ) GL^+(d) G L + ( d ) implies that it is the whole group.
Although the endpoints in (18) are related by a linear map, its two intermediate flows need not preserve noncolliearity. This is resolved by subdivision. For X ∈ C N , d X\in C_{N,d} X ∈ C N , d , the linear path Γ = { e s t E i j X : 0 ≤ s ≤ 1 } \Gamma=\{e^{stE_{ij}}X:0\le s\le1\} Γ = { e s t E ij X : 0 ≤ s ≤ 1 } is a compact subset of C N , d C_{N,d} C N , d . Choose δ > 0 \delta>0 δ > 0 such that its δ \delta δ -neighborhood is contained in C N , d \mathcal{C}_{N,d} C N , d , and put M = max Z ∈ Γ ∥ Z ∥ M=\max_{Z\in\Gamma}\lVert Z\rVert M = max Z ∈ Γ ∥ Z ∥ . Replace the pair in (18) by K K K repetitions with h = t / K h=t/K h = t / K . Their successive endpoints are exactly e k h E i j X e^{khE_{ij}}X e k h E ij X . Every lifted field in R d \mathbb{R}_d R d satisfies ∥ g ( N ) ( Z ) ∥ ≤ ∥ Z ∥ \lVert g^{(N)}(Z)\rVert\le\lVert Z\rVert ∥ g ( N ) ( Z )∥ ≤ ∥ Z ∥ . Hence, during either subflow of a pair, Gronwall’s inequality bounds the distance from the pair’s initial point on Γ \Gamma Γ by M ( e 2 ∣ h ∣ − 1 ) M(e^{2|h|}-1) M ( e 2∣ h ∣ − 1 ) . For sufficiently large K K K , this is less than δ \delta δ . All intermediate configurations then stay in C N , d \mathcal{C}_{N,d} C N , d . Applying this construction to each exponential factor realizes A A A with finitely many flows from the same fixed family, with the required constraint throughout.
Next, every width-one field g ( x ) = u σ ( v ⊤ x ) g(x)=u\sigma(v^\top x) g ( x ) = u σ ( v ⊤ x ) is conjugate, up to a real scalar, to one of
H ( x ) = e 1 σ ( x 1 ) , T ( x ) = e 2 σ ( x 1 ) , H(x)=e_1\sigma(x_1),\qquad T(x)=e_2\sigma(x_1), H ( x ) = e 1 σ ( x 1 ) , T ( x ) = e 2 σ ( x 1 ) ,
which belong to R d \mathcal{R}_d R d . Zero fields require no flow, so assume u , v ≠ 0 u,v\ne0 u , v = 0 . If α = v ⊤ u ≠ 0 \alpha=v^\top u\ne0 α = v ⊤ u = 0 , choose A ∈ G L + ( d ) A\in GL^+(d) A ∈ G L + ( d ) whose first column is u / α u/\alpha u / α and whose remaining columns form a basis of ker v ⊤ \ker v^\top ker v ⊤ . Reversing one of those columns if necessary makes the determinant positive. Then e 1 ⊤ A − 1 = v ⊤ e_1^\top A^{-1}=v^\top e 1 ⊤ A − 1 = v ⊤ and
g ( x ) = α A H ( A − 1 x ) , ϕ g t = A ∘ ϕ H α t ∘ A − 1 . g(x)=\alpha AH(A^{-1}x),\qquad\phi_g^t=A\circ\phi_H^{\alpha t}\circ A^{-1}. g ( x ) = α A H ( A − 1 x ) , ϕ g t = A ∘ ϕ H α t ∘ A − 1 .
If α = 0 \alpha=0 α = 0 , choose the first column a 1 a_1 a 1 so that v ⊤ a 1 = 1 v^\top a_1=1 v ⊤ a 1 = 1 , take the second column to be u u u , and complete these columns to a basis using vectors in ker v ⊤ \ker v^\top ker v ⊤ . Since d ≥ 3 d\ge3 d ≥ 3 , the sign of a further column can be chosen to ensure det A > 0 \det A>0 det A > 0 . This gives
g ( x ) = A T ( A − 1 x ) , ϕ g t = A ∘ ϕ T t ∘ A − 1 . g(x)=AT(A^{-1}x),\qquad\phi_g^t=A\circ\phi_T^t\circ A^{-1}. g ( x ) = A T ( A − 1 x ) , ϕ g t = A ∘ ϕ T t ∘ A − 1 .
Suppose a segment of the flow of g g g starting at X X X remains in C N , d \mathcal{C}_{N,d} C N , d . Realize A − 1 A^{-1} A − 1 and A A A by the admissible compositions just constructed. Between them, the flow of H H H or T T T is the image under A − 1 A^{-1} A − 1 of the prescribed segment, so it also stays in C N , d \mathcal{C}_{N,d} C N , d . Thus that segment can be replaced exactly by finitely many flows from R d \mathcal{R}_d R d , without leaving the configuration space.
By Theorem G.1 at width one, any X , Y ∈ C N , d X,Y\in\mathcal{C}_{N,d} X , Y ∈ C N , d are joined inside this set by a finite concatenation of flows of fields x ↦ u σ ( v ⊤ x ) x\mapsto u\sigma(v^\top x) x ↦ u σ ( v ⊤ x ) . Replacing each segment as above gives a finite concatenation of flows from R d \mathcal{R}_d R d with signed times τ 1 , … , τ L \tau_1,\ldots,\tau_L τ 1 , … , τ L . Discard zero-time segments and run each remaining segment on the batch with sgn ( τ k ) g k ( N ) \operatorname{sgn}(\tau_k)g_k^{(N)} sgn ( τ k ) g k ( N ) for duration ∣ τ k ∣ |\tau_k| ∣ τ k ∣ , where g k ∈ R d g_k\in\mathcal{R}_d g k ∈ R d is its generator. With S = ∑ k ∣ τ k ∣ S=\sum_k|\tau_k| S = ∑ k ∣ τ k ∣ , this gives a piecewise-constant control in { ± g ( N ) : g ∈ R d } \{\pm g^{(N)}:g\in\mathcal{R}_d\} { ± g ( N ) : g ∈ R d } on [ 0 , S ] [0,S] [ 0 , S ] , whose trajectory satisfies Z ( 0 ) = X Z(0)=X Z ( 0 ) = X , Z ( S ) = Y Z(S)=Y Z ( S ) = Y and remains in C N , d \mathcal{C}_{N,d} C N , d . If no segment remains, a sufficiently short flow of any generator followed by its reverse gives the identity with S > 0 S>0 S > 0 and stays in this open set. The 2 d 2 2d^2 2 d 2 generators were fixed before both N N N and the endpoints, proving the continuous-depth conclusion in Definition 2.4.
Finally, (17) turns each of these flows exactly into a residual layer Id + β ε δ i j ( τ k ) g i j t \operatorname{Id}+\beta\varepsilon\delta_{ij}(\tau_k)g_{ij}^t Id + β ε δ ij ( τ k ) g ij t . The resulting finite network uses the same family and has the same intermediate configurations at the layer endpoints. This proves universal interpolation at finite depth directly, without a discretization error. All blocks embed into every hidden width r ≥ 1 r\ge1 r ≥ 1 by setting unused output columns to zero. □
The preceding proof uses changes of activation patterns along the trajectory. The local condition of Corollary 2.7 is not satisfied by this fixed family when N > d N>d N > d : when all inputs lie in one open orthant, its fields are locally linear, so their lifted Lie algebra has rank at most d 2 < N d d^2<Nd d 2 < N d . More generally, the same observation applies to any finite family of bias-free ReLU blocks on an open cone where all their activation patterns are constant. This does not contradict the analytic converse in Remark 2.8, since these fields are not analytic across their activation hyperplanes.
Proof of Lemma 3.1
Lemma 3.1 (Pointwise spanning by noncausal self-attention). Let d ≥ 2 d\ge2 d ≥ 2 , n ≥ 2 n\ge2 n ≥ 2 , and N ≥ 1 N\ge1 N ≥ 1 . At every X ∈ A N , n , d X\in\mathcal{A}_{N,n,d} X ∈ A N , n , d , the single-head batch fields satisfy
span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } = R N n d . \operatorname{span}\left\{f_{W,V}^{(N)}(X):\operatorname{rank}W,\operatorname{rank}V\le1\right\}=\mathbb{R}^{Nnd}. span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } = R N n d .
Proof. The pointwise rank argument below only requires d ≥ 2 d\ge2 d ≥ 2 . We will also prove exact interpolation at both continuous and finite depth on every connected component of A N , n , 2 \mathcal{A}_{N,n,2} A N , n , 2 . Fix N ≥ 1 N\ge1 N ≥ 1 and d ≥ 2 d\ge2 d ≥ 2 . The set A N , n , d \mathcal{A}_{N,n,d} A N , n , d is open: its complement is a finite union of the closed sets where one token is zero or where all 2 × 2 2 \times2 2 × 2 minors of a pair of token columns vanish. Hence its connected components are open. Take X = ( x i ℓ ) ℓ , i ∈ A N , n , d X=(x_i^\ell)_{\ell,i}\in A_{N,n,d} X = ( x i ℓ ) ℓ , i ∈ A N , n , d . It is enough to use one head: set V h = 0 V_h=0 V h = 0 for h ≥ 2 h\ge2 h ≥ 2 , and denote the effective matrices of the remaining head by W , V ∈ R d × d W,V\in\mathbb{R}^{d\times d} W , V ∈ R d × d . We will further restrict both matrices to have rank at most one. Let f W , V ( N ) f_{W,V}^{(N)} f W , V ( N ) be the corresponding lifted vector field and define its pointwise span
S X : = span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } ⊆ ( R d ) N n . \mathcal{S}_X:=\operatorname{span}\left\{f_{W,V}^{(N)}(X):\operatorname{rank}W,\operatorname{rank}V\le1\right\}\subseteq(\mathbb{R}^d)^{Nn}. S X := span { f W , V ( N ) ( X ) : rank W , rank V ≤ 1 } ⊆ ( R d ) N n .
This is a finite-dimensional linear subspace and is therefore closed.
For b ∈ R d b\in\mathbb{R}^d b ∈ R d and 1 ≤ ℓ ≤ N 1\le\ell\le N 1 ≤ ℓ ≤ N , introduce the softmax barycenter
z ℓ ( b ) : = ∑ j = 1 n exp ( ⟨ b , x j ℓ ⟩ ) x j ℓ ∑ j = 1 n exp ( ⟨ b , x j ℓ ⟩ ) . (19) z_\ell(b):=\frac{\sum_{j=1}^{n}\exp\left(\langle b,x_j^\ell\rangle\right)x_j^\ell}{\sum_{j=1}^{n}\exp\left(\langle b,x_j^\ell\rangle\right)}. \tag*{(19)} z ℓ ( b ) := ∑ j = 1 n exp ( ⟨ b , x j ℓ ⟩ ) ∑ j = 1 n exp ( ⟨ b , x j ℓ ⟩ ) x j ℓ . (19)
The ( i , ℓ ) (i,\ell) ( i , ℓ ) block of the lifted field is then
f W , V ( N ) ( X ) i , ℓ = V z ℓ ( W x i ℓ ) . f_{W,V}^{(N)}(X)_{i,\ell}=Vz_\ell(Wx_i^\ell). f W , V ( N ) ( X ) i , ℓ = V z ℓ ( W x i ℓ ) .
We show that an arbitrary block can be controlled independently. Fix a target ( i 0 , ℓ 0 ) (i_0,\ell_0) ( i 0 , ℓ 0 ) and put q : = x i 0 ℓ 0 q:=x_{i_0}^{\ell_0} q := x i 0 ℓ 0 . First choose a ∈ R d a\in\mathbb{R}^d a ∈ R d such that
⟨ a , x j ℓ ⟩ ≠ ⟨ a , x k ℓ ⟩ ( 1 ≤ ℓ ≤ N , j ≠ k ) . (20) \langle a,x_j^\ell\rangle\ne\langle a,x_k^\ell\rangle\qquad(1\le\ell\le N,\ j\ne k). \tag*{(20)} ⟨ a , x j ℓ ⟩ = ⟨ a , x k ℓ ⟩ ( 1 ≤ ℓ ≤ N , j = k ) . (20)
Such an a a a exists: each forbidden equality defines the proper hyperplane ( x j ℓ − x k ℓ ) ⊥ (x_j^\ell-x_k^\ell)^\perp ( x j ℓ − x k ℓ ) ⊥ , and only finitely many hyperplanes are excluded.
Next choose α ∈ q ⊥ \alpha\in q^\perp α ∈ q ⊥ satisfying
⟨ α , x i ℓ ⟩ ≠ 0 whenever ( i , ℓ ) ≠ ( i 0 , ℓ 0 ) . (21) \langle\alpha,x_i^\ell\rangle\ne0\qquad\text{whenever }(i,\ell)\ne(i_0,\ell_0). \tag*{(21)} ⟨ α , x i ℓ ⟩ = 0 whenever ( i , ℓ ) = ( i 0 , ℓ 0 ) . (21)
Indeed, every other token r = x i ℓ r=x_i^\ell r = x i ℓ is not collinear with q q q , so q ⊥ ∩ r ⊥ q^\perp\cap r^\perp q ⊥ ∩ r ⊥ is a proper linear subspace of q ⊥ q^\perp q ⊥ . A finite union of proper linear subspaces cannot cover q ⊥ q^\perp q ⊥ .
Let V ∈ R d × d V\in\mathbb{R}^{d\times d} V ∈ R d × d have rank at most one; its value will be chosen below. For t > 0 t>0 t > 0 , define the rank-one score matrices
W t ± : = a ( t α ± q ∥ q ∥ 2 ) T . (22) W_t^\pm:=a\left(t\alpha\pm\frac{q}{\lVert q\rVert^2}\right)^\mathsf{T}. \tag*{(22)} W t ± := a ( t α ± ∥ q ∥ 2 q ) T . (22)
Since α ⊥ q \alpha\perp q α ⊥ q , they satisfy W t ± q = ± a W_t^\pm q=\pm a W t ± q = ± a . Consequently, at the target block,
f W t + , V ( N ) ( X ) i 0 , ℓ 0 − f W t − , V ( N ) ( X ) i 0 , ℓ 0 = V c , c : = z ℓ 0 ( a ) − z ℓ 0 ( − a ) . f_{W_t^+,V}^{(N)}(X)_{i_0,\ell_0}-f_{W_t^-,V}^{(N)}(X)_{i_0,\ell_0}=Vc,\qquad c:=z_{\ell_0}(a)-z_{\ell_0}(-a). f W t + , V ( N ) ( X ) i 0 , ℓ 0 − f W t − , V ( N ) ( X ) i 0 , ℓ 0 = V c , c := z ℓ 0 ( a ) − z ℓ 0 ( − a ) .
The vector c c c is nonzero. To see this, let
ψ ( s ) : = log ( ∑ j = 1 n exp ( s ⟨ a , x j ℓ 0 ⟩ ) ) . \psi(s):=\log\left(\sum_{j=1}^{n}\exp\left(s\langle a,x_j^{\ell_0}\rangle\right)\right). ψ ( s ) := log ( j = 1 ∑ n exp ( s ⟨ a , x j ℓ 0 ⟩ ) ) .
Then ψ ′ ( s ) = ⟨ a , z ℓ 0 ( s a ) ⟩ \psi'(s)=\langle a,z_{\ell_0}(sa)\rangle ψ ′ ( s ) = ⟨ a , z ℓ 0 ( s a )⟩ , and
ψ ′ ′ ( s ) = ∑ j = 1 n p j ( s ) ⟨ a , x j ℓ 0 ⟩ 2 − ( ∑ j = 1 n p j ( s ) ⟨ a , x j ℓ 0 ⟩ ) 2 = ∑ j = 1 n p j ( s ) ( ⟨ a , x j ℓ 0 ⟩ − ∑ k = 1 n p k ( s ) ⟨ a , x k ℓ 0 ⟩ ) 2 > 0 , \begin{aligned}
\psi''(s)
&=\sum_{j=1}^{n}p_j(s)\langle a,x_j^{\ell_0}\rangle^2-\left(\sum_{j=1}^{n}p_j(s)\langle a,x_j^{\ell_0}\rangle\right)^2\\
&=\sum_{j=1}^{n}p_j(s)\left(\langle a,x_j^{\ell_0}\rangle-\sum_{k=1}^{n}p_k(s)\langle a,x_k^{\ell_0}\rangle\right)^2>0,
\end{aligned} ψ ′′ ( s ) = j = 1 ∑ n p j ( s ) ⟨ a , x j ℓ 0 ⟩ 2 − ( j = 1 ∑ n p j ( s ) ⟨ a , x j ℓ 0 ⟩ ) 2 = j = 1 ∑ n p j ( s ) ( ⟨ a , x j ℓ 0 ⟩ − k = 1 ∑ n p k ( s ) ⟨ a , x k ℓ 0 ⟩ ) 2 > 0 ,
where
p j ( s ) : = exp ( s ⟨ a , x j ℓ 0 ⟩ ) ∑ k = 1 n exp ( s ⟨ a , x k ℓ 0 ⟩ ) . p_j(s):=\frac{\exp\left(s\langle a,x_j^{\ell_0}\rangle\right)}{\sum_{k=1}^{n}\exp\left(s\langle a,x_k^{\ell_0}\rangle\right)}. p j ( s ) := ∑ k = 1 n exp ( s ⟨ a , x k ℓ 0 ⟩ ) exp ( s ⟨ a , x j ℓ 0 ⟩ ) .
Strict positivity follows from n ≥ 2 n\ge2 n ≥ 2 and (20). Hence
⟨ a , c ⟩ = ψ ′ ( 1 ) − ψ ′ ( − 1 ) > 0. \langle a,c\rangle=\psi'(1)-\psi'(-1)>0. ⟨ a , c ⟩ = ψ ′ ( 1 ) − ψ ′ ( − 1 ) > 0.
Consider now a non-target query r = x i ℓ r=x_i^\ell r = x i ℓ . From (22) ,
W t ± r = λ t ± ( r ) a , λ t ± ( r ) : = t ⟨ α , r ⟩ ± ⟨ q , r ⟩ ∥ q ∥ 2 . W_t^\pm r=\lambda_t^\pm(r)a,\qquad\lambda_t^\pm(r):=t\langle\alpha,r\rangle\pm\frac{\langle q,r\rangle}{\lVert q\rVert^2}. W t ± r = λ t ± ( r ) a , λ t ± ( r ) := t ⟨ α , r ⟩ ± ∥ q ∥ 2 ⟨ q , r ⟩ .
By (21) , both λ t + ( r ) \lambda_t^+(r) λ t + ( r ) and λ t − ( r ) \lambda_t^-(r) λ t − ( r ) tend to the same signed infinity. If the sign is positive, both softmax barycenters converge to the unique key in sequence ℓ \ell ℓ maximizing ⟨ a , x i ℓ ⟩ \langle a,x_i^\ell\rangle ⟨ a , x i ℓ ⟩ ; if it is negative, both converge to the unique minimizing key. The uniqueness is guaranteed by (20) . Therefore
z ℓ ( W t + r ) − z ℓ ( W t − r ) ⟶ 0 ( t → ∞ ) z_\ell(W_t^+r)-z_\ell(W_t^-r)\longrightarrow0\qquad(t\to\infty) z ℓ ( W t + r ) − z ℓ ( W t − r ) ⟶ 0 ( t → ∞ )
at every non-target block.
Let E i 0 , ℓ 0 ( u ) E_{i_0,\ell_0}(u) E i 0 , ℓ 0 ( u ) denote the vector in ( R d ) N n (\mathbb{R}^d)^{Nn} ( R d ) N n whose ( i 0 , ℓ 0 ) (i_0,\ell_0) ( i 0 , ℓ 0 ) block equals u u u and whose other blocks vanish. The preceding limits give
f W t + , V ( N ) ( X ) − f W t − , V ( N ) ( X ) ⟶ E i 0 , ℓ 0 ( V c ) . f_{W_t^+,V}^{(N)}(X)-f_{W_t^-,V}^{(N)}(X)\longrightarrow E_{i_0,\ell_0}(V c). f W t + , V ( N ) ( X ) − f W t − , V ( N ) ( X ) ⟶ E i 0 , ℓ 0 ( V c ) .
Every vector on the left belongs to S X S_X S X , and this subspace is closed. Given any u ∈ R d u\in\mathbb{R}^d u ∈ R d , choose the value matrix of rank at most one
V : = u c T ∥ c ∥ 2 , V:=\frac{u c^{\mathsf T}}{\lVert c\rVert^2}, V := ∥ c ∥ 2 u c T ,
for which V c = u V c=u V c = u . Thus E i 0 , ℓ 0 ( u ) E_{i_0,\ell_0}(u) E i 0 , ℓ 0 ( u ) belongs to S X S_X S X . Since the target block and u u u were arbitrary,
S X = ( R d ) N n . (23) S_X=(\mathbb{R}^d)^{Nn}. \tag*{(23)} S X = ( R d ) N n . (23)
Theorem H.1 (Exact interpolation by noncausal self-attention). Let d ≥ 3 d\ge3 d ≥ 3 , n ≥ 2 n\ge2 n ≥ 2 , and H ≥ 1 H\ge1 H ≥ 1 . For every $N\ge 1, the noncausal self-attention family in (3) has the exact interpolation property on A N , n , d \mathcal{A}_{N,n,d} A N , n , d , both at continuous depth in the sense of Definition 2.3 and at finite depth in the sense of Section 2.3. The conclusion holds for any prescribed positive head widths. The token dimension remains d d d , and every intermediate configuration remains in A N , n , d \mathcal{A}_{N,n,d} A N , n , d .
Proof. Fix N ≥ 1 N\ge1 N ≥ 1 and X ∈ A N , n , d X\in\mathcal{A}_{N,n,d} X ∈ A N , n , d . The attention vector fields are analytic, because every softmax denominator is strictly positive. Negating all value matrices negates the field, so the family is closed under negation. Equation (23) supplies a finite collection of actual rank-one attention fields whose values form a basis at X X X . In particular, the limiting argument only establishes a full finite-dimensional span: the selected basis fields have finite parameter values, and no infinite-temperature layer is used. Since X X X was arbitrary, Corollary D.1 gives exact interpolation at continuous depth on every connected component of A N , n , d \mathcal{A}_{N,n,d} A N , n , d . Multiplying the value matrix by any real scalar scales the field by that scalar, so the same rank-one family satisfies Proposition E.1, with D = N n d D=Nnd D = N n d , and therefore gives exact interpolation at finite depth, with every intermediate configuration in the same component. Absorbing the scalar gains into V V V preserves its rank. Rank-one factorizations of W , V W,V W , V realize each layer with a head of width one; setting unused value matrices to zero embeds it into every prescribed H H H -head architecture.
It remains to determine these components. Put m : = N n m:=Nn m := N n . Writing each token as x k = r k u k x_k=r_k u_k x k = r k u k , with r k > 0 r_k>0 r k > 0 and u k ∈ S d − 1 u_k\in\mathbb{S}^{d-1} u k ∈ S d − 1 , gives a homeomorphism
A N , n , d ≅ ( 0 , ∞ ) m × D m , d , D m , d : = { ( u 1 , … , u m ) ∈ ( S d − 1 ) m : u k ≠ ± u ℓ for k ≠ ℓ } . \mathcal{A}_{N,n,d}\cong(0,\infty)^m\times\mathcal{D}_{m,d},\qquad
\mathcal{D}_{m,d}:=\{(u_1,\ldots,u_m)\in(\mathbb{S}^{d-1})^m:u_k\ne\pm u_\ell\text{ for }k\ne\ell\}. A N , n , d ≅ ( 0 , ∞ ) m × D m , d , D m , d := {( u 1 , … , u m ) ∈ ( S d − 1 ) m : u k = ± u ℓ for k = ℓ } .
For d ≥ 3 d\ge3 d ≥ 3 , the path-connectedness argument in Section G.2 applies with N N N replaced by m m m . Hence A N , n , d = C m , d \mathcal{A}_{N,n,d}=\mathcal{C}_{m,d} A N , n , d = C m , d is path connected, proving the theorem.
Uniform direct spanning on the generic attention domain
Fix an H H H -head architecture with positive integer widths r 1 , … , r H r_1,\ldots,r_H r 1 , … , r H . Its full projection parameter space is
Θ = ∏ h = 1 H ( ( R r h × d ) 3 × R d × r h ) ≅ R p , p = 4 d ∑ h = 1 H r h . (24) \Theta=\prod_{h=1}^{H}\left((\mathbb{R}^{r_h\times d})^3\times\mathbb{R}^{d\times r_h}\right)\cong\mathbb{R}^p,\qquad
p=4d\sum_{h=1}^{H}r_h. \tag*{(24)} Θ = h = 1 ∏ H ( ( R r h × d ) 3 × R d × r h ) ≅ R p , p = 4 d h = 1 ∑ H r h . (24)
Write θ = ( Q h , K h , U h , O h ) h = 1 H \theta= (Q_h,K_h,U_h,O_h)_{h=1}^{H} θ = ( Q h , K h , U h , O h ) h = 1 H , set W h = K h T Q h / r h W_h = K_h^{\mathsf{T}}Q_h/\sqrt{r_h} W h = K h T Q h / r h and V h = O h U h V_h = O_hU_h V h = O h U h , and denote the corresponding batch field by F θ = f W , V ( N ) F_\theta= f_{W,V}^{(N)} F θ = f W , V ( N ) . Thus Θ \Theta Θ parametrizes the query, key, value, and output projections, not independent effective matrices W h W_h W h , V h V_h V h .
Lemma I.1 (Uniform direct spanning on the generic domain). Let d ≥ 3 d \ge3 d ≥ 3 , n ≥ 2 n \ge2 n ≥ 2 , and N ≥ 1 N \ge1 N ≥ 1 , and put D : = N n d D := Nnd D := N n d . Draw ( θ 1 , … , θ 2 D ) (\theta_1,\ldots,\theta_{2D}) ( θ 1 , … , θ 2 D ) from any jointly absolutely continuous law on Θ 2 D \Theta^{2D} Θ 2 D . Then, with probability one over this single draw,
span { F θ k ( X ) : 1 ≤ k ≤ 2 D } = R D simultaneously for every X ∈ A N , n , d . (25) \operatorname{span}\{F_{\theta_k}(X):1 \le k \le2D\} = \mathbb{R}^{D}
\qquad\text{simultaneously for every }X \in\mathcal{A}_{N,n,d}. \tag*{(25)} span { F θ k ( X ) : 1 ≤ k ≤ 2 D } = R D simultaneously for every X ∈ A N , n , d . (25) Thus, the same frozen finite dictionary is full rank at every generic configuration. In particular, it satisfies the uniform Lie-rank condition without using any Lie brackets, with m N ≤ 2 D = 2 N n d m_N \le2D = 2Nnd m N ≤ 2 D = 2 N n d .
We first isolate the general principle behind this lemma. Amir et al. [4 ] establish a more general finite-witness theorem using tools from o-minimal geometry. For accessibility, we state only its consequence for jointly real analytic maps on open Euclidean domains, which covers all applications below. We apply their argument to covectors annihilating the sampled fields and include the resulting dimension-counting proof.
Theorem I.2 (Uniform random spanning principle). Let p , q , r ≥ 1 p,q,r \ge1 p , q , r ≥ 1 . Let Θ ⊆ R p \Theta\subseteq\mathbb{R}^{p} Θ ⊆ R p be a nonempty, connected open set, and let X ⊆ R q \mathcal{X} \subseteq\mathbb{R}^{q} X ⊆ R q be a nonempty open set. Suppose that G : Θ × X → R r G:\Theta\times\mathcal{X} \to\mathbb{R}^{r} G : Θ × X → R r is jointly real analytic and that
span { G ( θ , X ) : θ ∈ Θ } = R r for every X ∈ X . (26) \operatorname{span}\{G(\theta,X):\theta\in\Theta\} = \mathbb{R}^{r}
\qquad\text{for every }X \in\mathcal{X}. \tag*{(26)} span { G ( θ , X ) : θ ∈ Θ } = R r for every X ∈ X . (26) For every m ≥ q + r m \ge q+r m ≥ q + r , the exceptional set
B m : = { ( θ 1 , … , θ m ) ∈ Θ m : span { G ( θ k , X ) : 1 ≤ k ≤ m } ≠ R r for some X ∈ X } \mathcal{B}_m := \{(\theta_1,\ldots,\theta_m) \in\Theta^m : \operatorname{span}\{G(\theta_k,X):1 \le k \le m\} \ne\mathbb{R}^{r}\text{ for some }X \in\mathcal{X}\} B m := {( θ 1 , … , θ m ) ∈ Θ m : span { G ( θ k , X ) : 1 ≤ k ≤ m } = R r for some X ∈ X } satisfies
dim H B m ≤ m p − m + q + r − 1 ≤ m p − 1. (27) \dim_{\mathrm{H}}\mathcal{B}_m \le mp-m+q+r-1 \le mp-1. \tag*{(27)} dim H B m ≤ m p − m + q + r − 1 ≤ m p − 1. (27) Here dim H \dim_{\mathrm{H}} dim H denotes Hausdorff dimension. In particular, B m \mathcal{B}_m B m has Lebesgue measure zero, so every jointly absolutely continuous random bank in Θ m \Theta^m Θ m spans R r \mathbb{R}^{r} R r simultaneously at every X ∈ X X \in\mathcal{X} X ∈ X with probability one.
Proof. For ( X , λ ) ∈ X × S r − 1 (X,\lambda) \in\mathcal{X} \times S^{r-1} ( X , λ ) ∈ X × S r − 1 , define
h X , λ ( θ ) : = ⟨ λ , G ( θ , X ) ⟩ . h_{X,\lambda}(\theta) := \langle\lambda,G(\theta,X)\rangle. h X , λ ( θ ) := ⟨ λ , G ( θ , X )⟩ .
By (26), this analytic function is not identically zero on the connected set Θ \Theta Θ . The zero set Z X , λ Z_{X,\lambda} Z X , λ of this nontrivial analytic function therefore satisfies
dim H Z X , λ ≤ p − 1. \dim_{\mathrm{H}} Z_{X,\lambda} \le p-1. dim H Z X , λ ≤ p − 1.
Consider the incidence set
I m : = { ( θ 1 , … , θ m , X , λ ) ∈ Θ m × X × S r − 1 : θ k ∈ Z X , λ for every 1 ≤ k ≤ m } . \mathcal{I}_m := \{(\theta_1,\ldots,\theta_m,X,\lambda) \in\Theta^m \times\mathcal{X} \times S^{r-1} : \theta_k \in Z_{X,\lambda}\text{ for every }1 \le k \le m\}. I m := {( θ 1 , … , θ m , X , λ ) ∈ Θ m × X × S r − 1 : θ k ∈ Z X , λ for every 1 ≤ k ≤ m } .
Joint analyticity ensures that I m \mathcal{I}_m I m , like each Z X , λ Z_{X,\lambda} Z X , λ , is an analytic set and hence a countable union of smooth submanifolds; see Amir et al. [4 ] . For each fixed ( X , λ ) (X,\lambda) ( X , λ ) , the parameter tuples satisfying the incidence conditions form exactly the Cartesian product Z X , λ m Z_{X,\lambda}^{m} Z X , λ m , whose Hausdorff dimension is at most m ( p − 1 ) m(p-1) m ( p − 1 ) (Amir et al. [4 ] ). Since ( X , λ ) (X,\lambda) ( X , λ ) ranges over X × S r − 1 \mathcal{X} \times S^{r-1} X × S r − 1 , of dimension q + r − 1 q+r-1 q + r − 1 , the dimension bound for countable unions of smooth submanifolds (Amir et al. [4 ] ) gives
dim H I m ≤ m p − m + q + r − 1. \dim_{\mathrm{H}}\mathcal{I}_m \le mp-m+q+r-1. dim H I m ≤ m p − m + q + r − 1.
A bank fails to span at some X X X if and only if a unit covector λ \lambda λ annihilates all its values there. Hence B m \mathcal{B}_m B m is exactly the projection of I m \mathcal{I}_m I m onto Θ m \Theta^m Θ m . Coordinate projections are Lipschitz and do not increase Hausdorff dimension, which proves (27). For m ≥ q + r m \ge q+r m ≥ q + r , this dimension is strictly smaller than m p mp m p , so B m \mathcal{B}_m B m has Lebesgue measure zero. Moreover, I m \mathcal{I}_m I m is a countable union of compact sets, as is its projection, so B m \mathcal{B}_m B m is Borel. Any jointly absolutely continuous law assigns probability zero to this exceptional set. ∎
Proof of Lemma I.1. Every rank-one single-head field belongs to the architecture family. Indeed, for a , b , u , v ∈ R d a,b,u,v \in\mathbb{R}^{d} a , b , u , v ∈ R d , choose a head of width r r r , let e 1 ∈ R r e_1 \in\mathbb{R}^{r} e 1 ∈ R r be its first coordinate vector, and set
Q = r e 1 b T , K = e 1 a T , U = e 1 v T , O = u e 1 T . (28) Q=\sqrt{r}e_1b^{\mathsf T},\qquad K=e_1a^{\mathsf T},\qquad U=e_1v^{\mathsf T},\qquad O=ue_1^{\mathsf T}. \tag*{(28)} Q = r e 1 b T , K = e 1 a T , U = e 1 v T , O = u e 1 T . (28)
Set the output projections of all other heads to zero. The effective matrices of the active head are W = a b T W=ab^{\mathsf T} W = a b T and V = u v T V=uv^{\mathsf T} V = u v T . These parameter choices are witnesses inside Θ \Theta Θ ; no such restriction is imposed on the random draw. Therefore the rank-one pointwise spanning result (23) implies
span { F θ ( X ) : θ ∈ Θ } = R D \operatorname{span}\{F_\theta(X):\theta\in\Theta\}=\mathbb{R}^{D} span { F θ ( X ) : θ ∈ Θ } = R D
for every X ∈ A N , n , d X\in\mathcal{A}_{N,n,d} X ∈ A N , n , d .
The map ( θ , X ) ↦ F θ ( X ) (\theta,X)\mapsto F_\theta(X) ( θ , X ) ↦ F θ ( X ) is jointly real analytic: the projection factorizations are polynomial, and the attention formula involves only finite sums, products, exponentials, and division by strictly positive softmax denominators. Thus the analytic regularity assumption of Theorem I.2 is satisfied.
The configuration space A N , n , d \mathcal{A}_{N,n,d} A N , n , d is nonempty and open in R D \mathbb{R}^{D} R D , so it has dimension D D D . Apply Theorem I.2 with Θ \Theta Θ as in (24), X = A N , n , d \mathcal{X}=\mathcal{A}_{N,n,d} X = A N , n , d , G ( θ , X ) = F θ ( X ) G(\theta,X)=F_\theta(X) G ( θ , X ) = F θ ( X ) , and
p = 4 d ∑ h = 1 H r h , q = D , r = D , m = 2 D . p=4d\sum_{h=1}^{H}r_h,\qquad q=D,\qquad r=D,\qquad m=2D. p = 4 d h = 1 ∑ H r h , q = D , r = D , m = 2 D .
The exceptional banks form a subset of Θ 2 D \Theta^{2D} Θ 2 D of Hausdorff dimension at most 2 D p − 1 2Dp-1 2 D p − 1 , hence of Lebesgue measure zero. Every jointly absolutely continuous draw, including independent Gaussian projection entries with prescribed positive variances, avoids this set almost surely and satisfies (25). The Lie algebra generated by the sampled fields contains their real linear span.
Proof of the Gaussian attention universal interpolation theorem
Theorem 3.3 (Universal interpolation with Gaussian-initialized attention blocks). Let d ≥ 3 d\geq3 d ≥ 3 , n ≥ 2 n\geq2 n ≥ 2 , and N ≥ 1 N\geq1 N ≥ 1 , and put D : = N n d D:=Nnd D := N n d . Fix an H H H -head architecture with positive widths r 1 , … , r H r_1,\ldots,r_H r 1 , … , r H . Initialize m N = 2 D m_N=2D m N = 2 D noncausal attention blocks by drawing every entry of all their query, key, value, and output projection matrices independently from N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) . The effective matrices are defined by the factorizations in Example 2.2. With probability one over this single draw, these frozen blocks yield universal interpolation at continuous depth on B N , n , d \mathcal{B}_{N,n,d} B N , n , d in the sense of Definition 2.4, simultaneously for all input and target configurations in this domain. Only the block indices, signs, and durations depend on the prescribed interpolation problem; the terminal depth S > 0 S>0 S > 0 may depend on the endpoints.
Throughout this section, put D = N n d D=Nnd D = N n d , A = A N , n , d \mathcal{A}=\mathcal{A}_{N,n,d} A = A N , n , d , B = B N , n , d \mathcal{B}=\mathcal{B}_{N,n,d} B = B N , n , d , and use the full projection space Θ \Theta Θ from (24). For x , y ∈ R d x,y\in\mathbb{R}^{d} x , y ∈ R d , we identify their exterior product x ∧ y x\wedge y x ∧ y with the vector ( x i y j − x j y i ) i < j ∈ R ( d 2 ) (x_i y_j-x_j y_i)_{i<j}\in\mathbb{R}^{\binom{d}{2}} ( x i y j − x j y i ) i < j ∈ R ( 2 d ) . It vanishes exactly when x x x and y y y are linearly dependent. The set B \mathcal{B} B is nonempty and open: its defining conditions are open, and A ⊆ B \mathcal{A}\subseteq\mathcal{B} A ⊆ B . For d ≥ 3 d\geq3 d ≥ 3 , A \mathcal{A} A is connected by Section H and dense in B \mathcal{B} B , so B \mathcal{B} B is connected as well.
Lemma J.1 (Contextual separation). Let d ≥ 2 d\geq2 d ≥ 2 , n ≥ 2 n\geq2 n ≥ 2 , and N ≥ 1 N\geq1 N ≥ 1 . For every X ∈ B X\in\mathcal{B} X ∈ B , there exists ( a , b , u , v ) ∈ ( R d ) 4 (a,b,u,v)\in(\mathbb{R}^{d})^4 ( a , b , u , v ) ∈ ( R d ) 4 such that, setting W = a b T W=ab^{\mathsf T} W = a b T and V = u v T V=uv^{\mathsf T} V = u v T , one has
f W , V ( x i ℓ ) ∧ x j m + x i ℓ ∧ f W , V ( x j m ) ≠ 0 (29) f_{W,V}(x_i^\ell)\wedge x_j^m+x_i^\ell\wedge f_{W,V}(x_j^m)\ne0 \tag*{(29)} f W , V ( x i ℓ ) ∧ x j m + x i ℓ ∧ f W , V ( x j m ) = 0 (29) for every pair ( ℓ , i ) ≠ ( m , j ) (\ell,i)\ne(m,j) ( ℓ , i ) = ( m , j ) with x i ℓ ∧ x j m = 0 x_i^\ell\wedge x_j^m=0 x i ℓ ∧ x j m = 0 . Consequently, one rank-one residual attention layer with sufficiently small nonzero scalar gain sends X X X into A \mathcal{A} A .
Proof. Fix X ∈ B X\in\mathcal{B} X ∈ B . For each sequence, define its normalized exponential sum and softmax barycenter by
M ℓ ( η ) : = 1 n ∑ j = 1 n e ⟨ η , x j ℓ ⟩ , z ℓ ( η ) : = ∇ log M ℓ ( η ) = ∑ j e ⟨ η , x j ℓ ⟩ x j ℓ ∑ j e ⟨ η , x j ℓ ⟩ . M_\ell(\eta):=\frac{1}{n}\sum_{j=1}^{n}e^{\langle\eta,x_j^\ell\rangle},\qquad z_\ell(\eta):=\nabla\log M_\ell(\eta)=\frac{\sum_j e^{\langle\eta,x_j^\ell\rangle}x_j^\ell}{\sum_j e^{\langle\eta,x_j^\ell\rangle}}. M ℓ ( η ) := n 1 j = 1 ∑ n e ⟨ η , x j ℓ ⟩ , z ℓ ( η ) := ∇ log M ℓ ( η ) = ∑ j e ⟨ η , x j ℓ ⟩ ∑ j e ⟨ η , x j ℓ ⟩ x j ℓ .
The token update is f W , V ( x i ℓ ) = V z ℓ ( W x i ℓ ) f_{W,V}(x_i^\ell)=Vz_\ell(Wx_i^\ell) f W , V ( x i ℓ ) = V z ℓ ( W x i ℓ ) .
Step 1: separate one initially collinear pair. Consider a collinear pair q = x i ℓ q=x_i^\ell q = x i ℓ and x j m = c q x_j^m=cq x j m = c q . Nonzero tokens imply c ≠ 0 c\ne0 c = 0 , and within-sequence noncollinearity implies ℓ ≠ m \ell\ne m ℓ = m . We claim that
δ ( η ) : = z m ( c η ) − c z ℓ ( η ) (30) \delta(\eta):=z_m(c\eta)-cz_\ell(\eta) \tag*{(30)} δ ( η ) := z m ( cη ) − c z ℓ ( η ) (30)
is not identically zero. Otherwise, z m ( c η ) = c z ℓ ( η ) z_m(c\eta)=cz_\ell(\eta) z m ( cη ) = c z ℓ ( η ) for all η ∈ R d \eta\in\mathbb{R}^d η ∈ R d . Since z k = ∇ log M k z_k=\nabla\log M_k z k = ∇ log M k , the chain rule gives
∇ η [ log M m ( c η ) − c 2 log M ℓ ( η ) ] = c z m ( c η ) − c 2 z ℓ ( η ) = 0. \nabla_\eta\left[\log M_m(c\eta)-c^2\log M_\ell(\eta)\right]=cz_m(c\eta)-c^2z_\ell(\eta)=0. ∇ η [ log M m ( cη ) − c 2 log M ℓ ( η ) ] = c z m ( cη ) − c 2 z ℓ ( η ) = 0.
Thus the difference is constant on R d \mathbb{R}^d R d . Evaluating at η = 0 \eta=0 η = 0 and using M m ( 0 ) = M ℓ ( 0 ) = 1 M_m(0)=M_\ell(0)=1 M m ( 0 ) = M ℓ ( 0 ) = 1 shows that this constant is zero, hence
log M m ( c η ) = c 2 log M ℓ ( η ) for all η ∈ R d . \log M_m(c\eta)=c^2\log M_\ell(\eta)\qquad\text{for all }\eta\in\mathbb{R}^d. log M m ( cη ) = c 2 log M ℓ ( η ) for all η ∈ R d .
Choose h ∈ R d h\in\mathbb{R}^d h ∈ R d such that
⟨ h , x i k ⟩ ≠ ⟨ h , x j k ⟩ ( k ∈ { ℓ , m } , i ≠ j ) . \langle h,x_i^k\rangle\ne\langle h,x_j^k\rangle\qquad(k\in\{\ell,m\},\ i\ne j). ⟨ h , x i k ⟩ = ⟨ h , x j k ⟩ ( k ∈ { ℓ , m } , i = j ) .
Such an h h h exists: each forbidden equality defines the proper hyperplane ( x i k − x j k ) ⊥ (x_i^k-x_j^k)^\perp ( x i k − x j k ) ⊥ , and only finitely many hyperplanes are excluded. Since c ≠ 0 c\ne0 c = 0 , each exponential sum has a unique dominant term along η = t h \eta=th η = t h as t → + ∞ t\to+\infty t → + ∞ , which gives
log M m ( c t h ) = t A − log n + o ( 1 ) , log M ℓ ( t h ) = t B − log n + o ( 1 ) , \log M_m(cth)=tA-\log n+o(1),\qquad\log M_\ell(th)=tB-\log n+o(1), log M m ( c t h ) = t A − log n + o ( 1 ) , log M ℓ ( t h ) = tB − log n + o ( 1 ) ,
where A = max j c ⟨ h , x j m ⟩ A=\max_j c\langle h,x_j^m\rangle A = max j c ⟨ h , x j m ⟩ and B = max i ⟨ h , x i ℓ ⟩ B=\max_i\langle h,x_i^\ell\rangle B = max i ⟨ h , x i ℓ ⟩ . This also holds when c < 0 c<0 c < 0 . Dividing the identity by t t t first yields A = c 2 B A=c^2B A = c 2 B ; comparing the remaining constants yields ( c 2 − 1 ) log n = 0 (c^2-1)\log n=0 ( c 2 − 1 ) log n = 0 . Since n ≥ 2 n\ge2 n ≥ 2 , c = ± 1 c=\pm1 c = ± 1 , and the identity reduces to M m ( c η ) = M ℓ ( η ) M_m(c\eta)=M_\ell(\eta) M m ( cη ) = M ℓ ( η ) . Let y 1 , … , y R y_1,\ldots,y_R y 1 , … , y R be the distinct vectors in { c x j m } j ∪ { x i ℓ } i \{cx_j^m\}_j\cup\{x_i^\ell\}_i { c x j m } j ∪ { x i ℓ } i , and let a r a_r a r be the multiplicity of y r y_r y r in the first multiset minus its multiplicity in the second. Multiplying the identity by n n n and grouping equal vectors gives
∑ r = 1 R a r e ⟨ η , y r ⟩ = 0 for all η ∈ R d . \sum_{r=1}^{R}a_r e^{\langle\eta,y_r\rangle}=0\qquad\text{for all }\eta\in\mathbb{R}^d. r = 1 ∑ R a r e ⟨ η , y r ⟩ = 0 for all η ∈ R d .
Choose g ∈ R d g\in\mathbb{R}^d g ∈ R d outside the finitely many proper hyperplanes ( y r − y s ) ⊥ (y_r-y_s)^\perp ( y r − y s ) ⊥ , r ≠ s r\ne s r = s , and relabel so that λ 1 < ⋯ < λ R \lambda_1<\cdots<\lambda_R λ 1 < ⋯ < λ R , where λ r = ⟨ g , y r ⟩ \lambda_r=\langle g,y_r\rangle λ r = ⟨ g , y r ⟩ . Taking η = t g \eta=tg η = t g and dividing by e t λ R e^{t\lambda_R} e t λ R yields
a R + ∑ r < R a r e − t ( λ R − λ r ) = 0. a_R+\sum_{r<R}a_r e^{-t(\lambda_R-\lambda_r)}=0. a R + r < R ∑ a r e − t ( λ R − λ r ) = 0.
Letting t → + ∞ t\to+\infty t → + ∞ gives a R = 0 a_R=0 a R = 0 ; repeating with the remaining exponents gives a r = 0 a_r=0 a r = 0 for every r r r . Thus the two multisets agree, so there is a permutation π \pi π such that c x j m = x π ( j ) ℓ cx_j^m=x_{\pi(j)}^\ell c x j m = x π ( j ) ℓ for all j j j . Since c = ± 1 c=\pm1 c = ± 1 , the two sequences are related by a signed permutation, contradicting X ∈ B X\in\mathcal{B} X ∈ B . This proves the claim.
Choose η \eta η with δ ( η ) ≠ 0 \delta(\eta)\ne0 δ ( η ) = 0 and u ∉ R q u\notin\mathbb{R}q u ∈ / R q , and set
W = η q T ∥ q ∥ 2 , V = u δ ( η ) T ∥ δ ( η ) ∥ 2 . W=\frac{\eta q^{\mathsf T}}{\lVert q\rVert^2},\qquad V=\frac{u\delta(\eta)^{\mathsf T}}{\lVert\delta(\eta)\rVert^2}. W = ∥ q ∥ 2 η q T , V = ∥ δ ( η ) ∥ 2 u δ ( η ) T .
These matrices have rank at most one, W q = η Wq=\eta W q = η , and
f W , V ( x j m ) − c f W , V ( x i ℓ ) = V δ ( η ) = u . f_{W,V}(x_j^m)-cf_{W,V}(x_i^\ell)=V\delta(\eta)=u. f W , V ( x j m ) − c f W , V ( x i ℓ ) = V δ ( η ) = u .
By bilinearity and antisymmetry of the exterior product, the left-hand side of (29) for this pair is
f W , V ( x i ℓ ) ∧ x j m + x i ℓ ∧ f W , V ( x j m ) = f W , V ( x i ℓ ) ∧ ( c q ) + q ∧ f W , V ( x j m ) = − c q ∧ f W , V ( x i ℓ ) + q ∧ f W , V ( x j m ) = q ∧ ( f W , V ( x j m ) − c f W , V ( x i ℓ ) ) = q ∧ u ≠ 0 , \begin{aligned}
f_{W,V}(x_i^\ell)\wedge x_j^m+x_i^\ell\wedge f_{W,V}(x_j^m)
&=f_{W,V}(x_i^\ell)\wedge(cq)+q\wedge f_{W,V}(x_j^m)\\
&=-cq\wedge f_{W,V}(x_i^\ell)+q\wedge f_{W,V}(x_j^m)\\
&=q\wedge\left(f_{W,V}(x_j^m)-cf_{W,V}(x_i^\ell)\right)\\
&=q\wedge u\ne0,
\end{aligned} f W , V ( x i ℓ ) ∧ x j m + x i ℓ ∧ f W , V ( x j m ) = f W , V ( x i ℓ ) ∧ ( c q ) + q ∧ f W , V ( x j m ) = − c q ∧ f W , V ( x i ℓ ) + q ∧ f W , V ( x j m ) = q ∧ ( f W , V ( x j m ) − c f W , V ( x i ℓ ) ) = q ∧ u = 0 ,
where the last inequality follows from u ∉ R q u\notin\mathbb{R}q u ∈ / R q .
Step 2: choose common parameters for all initially collinear pairs. For each initially collinear pair, the squared norm of the left-hand side of (29) is a real analytic function of ( a , b , u , v ) ∈ ( R d ) 4 (a,b,u,v)\in(\mathbb{R}^d)^4 ( a , b , u , v ) ∈ ( R d ) 4 , with W = a b T W=ab^{\mathsf T} W = a b T and V = u v T V=uv^{\mathsf T} V = u v T . The preceding construction shows that it is not identically zero. Its zero set is therefore closed with empty interior, so its complement is open and dense. There are only finitely many initially collinear pairs; hence the intersection of these open dense complements is itself open and dense, and in particular nonempty. Any ( a , b , u , v ) (a,b,u,v) ( a , b , u , v ) in this intersection satisfies all the required inequalities.
Step 3: apply one residual layer to reach A \mathcal{A} A . Fix such a common choice of a , b , u , v a,b,u,v a , b , u , v . All token updates lie in the image of V = u v T V=uv^{\mathsf{T}} V = u v T , which has dimension at most one. Hence, for every pair,
( x i ℓ + t f W , V ( x ℓ ) i ) ∧ ( x j m + t f W , V ( x m ) j ) = x i ℓ ∧ x j m + t ( f W , V ( x ℓ ) i ∧ x j m + x i ℓ ∧ f W , V ( x m ) j ) . \left(x_i^\ell+t f_{W,V}(x^\ell)_i\right)\wedge\left(x_j^m+t f_{W,V}(x^m)_j\right)
= x_i^\ell\wedge x_j^m+t\left(f_{W,V}(x^\ell)_i\wedge x_j^m+x_i^\ell\wedge f_{W,V}(x^m)_j\right). ( x i ℓ + t f W , V ( x ℓ ) i ) ∧ ( x j m + t f W , V ( x m ) j ) = x i ℓ ∧ x j m + t ( f W , V ( x ℓ ) i ∧ x j m + x i ℓ ∧ f W , V ( x m ) j ) .
Every initially collinear pair separates for all t ≠ 0 t\ne0 t = 0 . Previously noncollinear pairs remain noncollinear, and nonzero tokens remain nonzero, for all sufficiently small ∣ t ∣ \lvert t\rvert ∣ t ∣ . There are finitely many tokens and pairs, giving one common neighborhood of t = 0 t=0 t = 0 . The resulting batch therefore belongs to A \mathcal{A} A for every sufficiently small nonzero t t t .
For θ ∈ Θ \theta\in\Theta θ ∈ Θ , write f θ = f W , V f_\theta=f_{W,V} f θ = f W , V for the field on one sequence and f θ ( N ) f_\theta^{(N)} f θ ( N ) for its corresponding batch field.
Lemma J.2 (A uniform separating dictionary). For the fixed attention architecture above, let m ≥ D + 1 m\ge D+1 m ≥ D + 1 and draw ( θ 1 , … , θ m ) (\theta_1,\ldots,\theta_m) ( θ 1 , … , θ m ) from a jointly absolutely continuous law on Θ m \Theta^m Θ m . With probability one, simultaneously for every X ∈ B X\in\mathcal{B} X ∈ B , there is k ∈ { 1 , … , m } k\in\{1,\ldots,m\} k ∈ { 1 , … , m } such that
f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j ≠ 0 f_{\theta_k}(x^\ell)_i\wedge x_j^{\ell'}+x_i^\ell\wedge f_{\theta_k}(x^{\ell'})_j\ne0 f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j = 0 for every pair ( ℓ , i ) ≠ ( ℓ ′ , j ) (\ell,i)\ne(\ell',j) ( ℓ , i ) = ( ℓ ′ , j ) with x i ℓ ∧ x j ℓ ′ = 0 x_i^\ell\wedge x_j^{\ell'}=0 x i ℓ ∧ x j ℓ ′ = 0 . For this same k k k and all sufficiently small nonzero t t t , both
X + t f θ k ( N ) ( X ) ∈ A , Φ f θ k ( N ) t ( X ) ∈ A . X+t f_{\theta_k}^{(N)}(X)\in\mathcal{A},\qquad\Phi_{f_{\theta_k}^{(N)}}^t(X)\in\mathcal{A}. X + t f θ k ( N ) ( X ) ∈ A , Φ f θ k ( N ) t ( X ) ∈ A . Both curves remain in B \mathcal{B} B for sufficiently small ∣ t ∣ \lvert t\rvert ∣ t ∣ .
Proof. Step 1: establish uniform separation by the sampled bank. Define the scalar selector
S ( θ , X ) = ∏ ( ℓ , i ) < ( ℓ ′ , j ) ( ∥ x i ℓ ∧ x j ℓ ′ ∥ 2 + ∥ f θ ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ ( x ℓ ′ ) j ∥ 2 ) . (31) S(\theta,X)=\prod_{(\ell,i)<(\ell',j)}
\left(\lVert x_i^\ell\wedge x_j^{\ell'}\rVert^2+
\left\lVert f_\theta(x^\ell)_i\wedge x_j^{\ell'}+x_i^\ell\wedge f_\theta(x^{\ell'})_j\right\rVert^2\right). \tag*{(31)} S ( θ , X ) = ( ℓ , i ) < ( ℓ ′ , j ) ∏ ( ∥ x i ℓ ∧ x j ℓ ′ ∥ 2 + f θ ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ ( x ℓ ′ ) j 2 ) . (31)
Here < < < denotes lexicographic order on the token indices, so each pair of distinct token positions occurs once. The function S S S is nonnegative and jointly real analytic on Θ × B \Theta\times\mathcal{B} Θ × B . By Lemma J.1 and the embedding (28), for every X ∈ B X\in\mathcal{B} X ∈ B there is θ ∈ Θ \theta\in\Theta θ ∈ Θ with S ( θ , X ) > 0 S(\theta,X)>0 S ( θ , X ) > 0 . For a scalar-valued map, this is exactly the spanning assumption of Theorem I.2.
Since Θ ≃ R p \Theta\simeq\mathbb{R}^p Θ ≃ R p and B ⊆ R D \mathcal{B}\subseteq\mathbb{R}^D B ⊆ R D is nonempty and open, we can apply that theorem with X = B \mathcal{X}=\mathcal{B} X = B , G = S G=S G = S , q = D q=D q = D , and r = 1 r=1 r = 1 . Thus, for m ≥ D + 1 m\ge D+1 m ≥ D + 1 , a jointly absolutely continuous draw ( θ 1 , … , θ m ) ∈ Θ m (\theta_1,\ldots,\theta_m)\in\Theta^m ( θ 1 , … , θ m ) ∈ Θ m almost surely satisfies
∀ X ∈ B , ∃ k ∈ { 1 , … , m } : S ( θ k , X ) > 0. \forall X\in\mathcal{B},\quad\exists k\in\{1,\ldots,m\}: \quad S(\theta_k,X)>0. ∀ X ∈ B , ∃ k ∈ { 1 , … , m } : S ( θ k , X ) > 0.
By definition of S S S , this is precisely the required transversality for all initially collinear pairs at X X X .
Step 2: reach A \mathcal{A} A with a residual layer. Fix such a bank and configuration, and choose k k k with S ( θ k , X ) > 0 S(\theta_k,X)>0 S ( θ k , X ) > 0 . For an initially collinear pair x i ℓ , x j ℓ ′ x_i^\ell,x_j^{\ell'} x i ℓ , x j ℓ ′ , the wedge after a residual step is
( x i ℓ + t f θ k ( x ℓ ) i ) ∧ ( x j ℓ ′ + t f θ k ( x ℓ ′ ) j ) = t ( f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j ) + t 2 f θ k ( x ℓ ) i ∧ f θ k ( x ℓ ′ ) j . \begin{aligned}
&\left(x_i^\ell+t f_{\theta_k}(x^\ell)_i\right)\wedge\left(x_j^{\ell'}+t f_{\theta_k}(x^{\ell'})_j\right)\\
&=t\left(f_{\theta_k}(x^\ell)_i\wedge x_j^{\ell'}+x_i^\ell\wedge f_{\theta_k}(x^{\ell'})_j\right)
+t^2 f_{\theta_k}(x^\ell)_i\wedge f_{\theta_k}(x^{\ell'})_j.
\end{aligned} ( x i ℓ + t f θ k ( x ℓ ) i ) ∧ ( x j ℓ ′ + t f θ k ( x ℓ ′ ) j ) = t ( f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j ) + t 2 f θ k ( x ℓ ) i ∧ f θ k ( x ℓ ′ ) j .
The linear coefficient is nonzero, so the pair separates for all sufficiently small nonzero t t t . Previously noncollinear pairs and nonzero tokens persist by continuity.
Step 3: reach A \mathcal{A} A along the flow. Keep the same k k k and write V k , h = O k , h U k , h V_{k,h}=O_{k,h}U_{k,h} V k , h = O k , h U k , h . For Z = vec ( z 1 , … , z N ) Z=\operatorname{vec}(z^1,\ldots,z^N) Z = vec ( z 1 , … , z N ) , each softmax barycenter is a convex combination of the tokens in its sequence. Hence, for every ℓ , i \ell,i ℓ , i ,
∥ f θ k ( z ℓ ) i ∥ ≤ ( ∑ h = 1 H ∥ V k , h ∥ o p ) ∥ z ℓ ∥ . \lVert f_{\theta_k}(z^\ell)_i\rVert\le\left(\sum_{h=1}^{H}\lVert V_{k,h}\rVert_{\mathrm{op}}\right)\lVert z^\ell\rVert. ∥ f θ k ( z ℓ ) i ∥ ≤ ( h = 1 ∑ H ∥ V k , h ∥ op ) ∥ z ℓ ∥ .
Summing the squared norms over all tokens and sequences gives
∥ f θ k ( N ) ( Z ) ∥ 2 = ∑ ℓ = 1 N ∑ i = 1 n ∥ f θ k ( z ℓ ) i ∥ 2 ≤ n ( ∑ h = 1 H ∥ V k , h ∥ o p ) 2 ∑ ℓ = 1 N ∥ z ℓ ∥ 2 . \left\lVert f_{\theta_k}^{(N)}(Z)\right\rVert^2
=\sum_{\ell=1}^{N}\sum_{i=1}^{n}\left\lVert f_{\theta_k}(z^\ell)_i\right\rVert^2
\le n\left(\sum_{h=1}^{H}\lVert V_{k,h}\rVert_{\mathrm{op}}\right)^2\sum_{\ell=1}^{N}\lVert z^\ell\rVert^2. f θ k ( N ) ( Z ) 2 = ℓ = 1 ∑ N i = 1 ∑ n f θ k ( z ℓ ) i 2 ≤ n ( h = 1 ∑ H ∥ V k , h ∥ op ) 2 ℓ = 1 ∑ N ∥ z ℓ ∥ 2 .
Taking square roots yields
∥ f θ k ( N ) ( Z ) ∥ ≤ n ( ∑ h = 1 H ∥ V k , h ∥ o p ) ∥ Z ∥ on R D . \left\|f_{\theta_k}^{(N)}(Z)\right\| \leq\sqrt{n}\left(\sum_{h=1}^{H}\left\|V_{k,h}\right\|_{\mathrm{op}}\right)\|Z\| \quad\text{on }\mathbb{R}^{D}. f θ k ( N ) ( Z ) ≤ n ( h = 1 ∑ H ∥ V k , h ∥ op ) ∥ Z ∥ on R D .
Analyticity gives local existence and uniqueness. By Gronwall’s inequality, this linear growth bound rules out finite-time blow-up for both the field and its negative, so the flow is defined for all t ∈ R t \in\mathbb{R} t ∈ R .
Write Z ( t ) = Φ f θ k ( N ) t ( X ) Z(t)=\Phi_{f_{\theta_k}^{(N)}}^{t}(X) Z ( t ) = Φ f θ k ( N ) t ( X ) and denote its tokens by z i ℓ ( t ) z_i^\ell(t) z i ℓ ( t ) . Then z i ℓ ( 0 ) = x i ℓ z_i^\ell(0)=x_i^\ell z i ℓ ( 0 ) = x i ℓ and z ˙ i ℓ ( 0 ) = f θ k ( x ℓ ) i \dot{z}_i^\ell(0)=f_{\theta_k}(x^\ell)_i z ˙ i ℓ ( 0 ) = f θ k ( x ℓ ) i . For every initially collinear pair, bilinearity gives
d d t ( z i ℓ ( t ) ∧ z j ℓ ′ ( t ) ) ∣ t = 0 = f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j ≠ 0. \left.\frac{d}{dt}\left(z_i^\ell(t)\wedge z_j^{\ell'}(t)\right)\right|_{t=0}
=f_{\theta_k}(x^\ell)_i\wedge x_j^{\ell'}+x_i^\ell\wedge f_{\theta_k}(x^{\ell'})_j\ne0. d t d ( z i ℓ ( t ) ∧ z j ℓ ′ ( t ) ) t = 0 = f θ k ( x ℓ ) i ∧ x j ℓ ′ + x i ℓ ∧ f θ k ( x ℓ ′ ) j = 0.
Since x i ℓ ∧ x j ℓ ′ = 0 x_i^\ell\wedge x_j^{\ell'}=0 x i ℓ ∧ x j ℓ ′ = 0 , Taylor’s formula yields
z i ℓ ( t ) ∧ z j ℓ ′ ( t ) = t f θ k ( x ℓ ) i ∧ x j ℓ ′ + t x i ℓ ∧ f θ k ( x ℓ ′ ) j + O ( t 2 ) . z_i^\ell(t)\wedge z_j^{\ell'}(t)
=t f_{\theta_k}(x^\ell)_i\wedge x_j^{\ell'}
+t x_i^\ell\wedge f_{\theta_k}(x^{\ell'})_j+O(t^2). z i ℓ ( t ) ∧ z j ℓ ′ ( t ) = t f θ k ( x ℓ ) i ∧ x j ℓ ′ + t x i ℓ ∧ f θ k ( x ℓ ′ ) j + O ( t 2 ) .
The coefficient of t t t is nonzero, so this product is nonzero for all sufficiently small nonzero t t t . Initially noncollinear pairs and nonzero tokens persist by continuity. There are finitely many tokens and pairs, so one common interval works for all of them. Finally, both the residual curve and the flow start at X ∈ B X\in\mathcal{B} X ∈ B ; by continuity and openness of B \mathcal{B} B , they remain there for sufficiently small ∣ t ∣ |t| ∣ t ∣ .
Proof of Theorem 3.3. Let ( θ 1 , … , θ 2 D ) ∈ Θ 2 D (\theta_1,\ldots,\theta_{2D})\in\Theta^{2D} ( θ 1 , … , θ 2 D ) ∈ Θ 2 D be the sampled parameters, with batch fields f θ j ( N ) f_{\theta_j}^{(N)} f θ j ( N ) , 1 ≤ j ≤ 2 D 1\leq j\leq2D 1 ≤ j ≤ 2 D . Independent Gaussian projection entries have a joint density on Θ 2 D \Theta^{2D} Θ 2 D . By Lemma I.1, with probability one these fields span R D \mathbb{R}^{D} R D simultaneously at every X ∈ A X\in\mathcal{A} X ∈ A . For separation, recall that the proof of Lemma J.2 applies Theorem I.2 to the scalar selector S : Θ × B → R S:\Theta\times\mathcal{B}\to\mathbb{R} S : Θ × B → R from (31), with q = D q=D q = D and r = 1 r=1 r = 1 . Since our bank has 2 D ≥ q + r = D + 1 2D\geq q+r=D+1 2 D ≥ q + r = D + 1 fields, it almost surely satisfies
∀ X ∈ B , ∃ k ∈ { 1 , … , 2 D } : S ( θ k , X ) > 0. \forall X\in\mathcal{B},\quad\exists k\in\{1,\ldots,2D\}: \quad S(\theta_k,X)>0. ∀ X ∈ B , ∃ k ∈ { 1 , … , 2 D } : S ( θ k , X ) > 0.
Fix a bank in the intersection of these two probability-one events. Both properties then hold uniformly in the configuration for this same bank.
We now prove that the sampled fields have full Lie rank on B \mathcal{B} B . Fix X ∈ B X\in\mathcal{B} X ∈ B and choose k ∈ { 1 , … , 2 D } k\in\{1,\ldots,2D\} k ∈ { 1 , … , 2 D } with S ( θ k , X ) > 0 S(\theta_k,X)>0 S ( θ k , X ) > 0 , as in Lemma J.2. Write Φ t = Φ f θ k ( N ) t \Phi_t=\Phi_{f_{\theta_k}^{(N)}}^t Φ t = Φ f θ k ( N ) t for its flow and put
L X = Lie ( f θ 1 ( N ) , … , f θ 2 D ( N ) ) ( X ) ⊆ R D . L_X=\operatorname{Lie}\left(f_{\theta_1}^{(N)},\ldots,f_{\theta_{2D}}^{(N)}\right)(X)\subseteq\mathbb{R}^{D}. L X = Lie ( f θ 1 ( N ) , … , f θ 2 D ( N ) ) ( X ) ⊆ R D .
For an analytic vector field G G G , its pullback by Φ t \Phi_t Φ t is the vector field defined by
( Φ t ∗ G ) ( Z ) : = ( D Φ t ( Z ) ) − 1 G ( Φ t ( Z ) ) . (\Phi_t^*G)(Z):=(D\Phi_t(Z))^{-1}G(\Phi_t(Z)). ( Φ t ∗ G ) ( Z ) := ( D Φ t ( Z ) ) − 1 G ( Φ t ( Z )) .
The Jacobian D Φ t ( Z ) D\Phi_t(Z) D Φ t ( Z ) is invertible since Φ − t \Phi_{-t} Φ − t is the inverse of Φ t \Phi_t Φ t . For each j ∈ { 1 , … , 2 D } j\in\{1,\ldots,2D\} j ∈ { 1 , … , 2 D } , the map
t ⟼ U j ( t ) = ( Φ t ∗ f θ j ( N ) ) ( X ) ∈ R D t\longmapsto U_j(t)=\left(\Phi_t^*f_{\theta_j}^{(N)}\right)(X)\in\mathbb{R}^{D} t ⟼ U j ( t ) = ( Φ t ∗ f θ j ( N ) ) ( X ) ∈ R D
is real analytic near t = 0 t=0 t = 0 . The standard differentiation formula for pullbacks (Agrachev & Sachkov, 2004, Section 2.5, eq:2.21 ) and its iterates give
d d t Φ t ∗ G = Φ t ∗ [ f θ k ( N ) , G ] , \frac{d}{dt}\Phi_t^*G=\Phi_t^*\left[f_{\theta_k}^{(N)},G\right], d t d Φ t ∗ G = Φ t ∗ [ f θ k ( N ) , G ] ,
d r d t r ( Φ t ∗ G ) = Φ t ∗ ( ad f θ k ( N ) r G ) , r ≥ 0. \frac{d^r}{dt^r}\left(\Phi_t^*G\right)=\Phi_t^*\left(\operatorname{ad}_{f_{\theta_k}^{(N)}}^r G\right),\qquad r\geq0. d t r d r ( Φ t ∗ G ) = Φ t ∗ ( ad f θ k ( N ) r G ) , r ≥ 0.
where ad f θ k ( N ) G = [ f θ k ( N ) , G ] \operatorname{ad}_{f_{\theta_k}^{(N)}}G=[f_{\theta_k}^{(N)},G] ad f θ k ( N ) G = [ f θ k ( N ) , G ] . Taking G = f θ j ( N ) G=f_{\theta_j}^{(N)} G = f θ j ( N ) and evaluating at t = 0 t=0 t = 0 , where Φ 0 ∗ \Phi_0^* Φ 0 ∗ is the identity, gives
U j ( r ) ( 0 ) = ( ad f θ k ( N ) r f θ j ( N ) ) ( X ) ∈ L X , r ≥ 0. U_j^{(r)}(0)=\left(\operatorname{ad}_{f_{\theta_k}^{(N)}}^r f_{\theta_j}^{(N)}\right)(X)\in L_X,\qquad r\geq0. U j ( r ) ( 0 ) = ( ad f θ k ( N ) r f θ j ( N ) ) ( X ) ∈ L X , r ≥ 0.
Every partial sum of the Taylor series of U j U_j U j belongs to L X L_X L X . Since this series converges to U j ( t ) U_j(t) U j ( t ) for sufficiently small ∣ t ∣ |t| ∣ t ∣ and L X L_X L X is closed, we obtain U j ( t ) ∈ L X U_j(t) \in L_X U j ( t ) ∈ L X for every j j j and all sufficiently small ∣ t ∣ |t| ∣ t ∣ .
Choose such a nonzero t t t with X ′ = Φ t ( X ) ∈ A X'=\Phi_t(X)\in\mathcal{A} X ′ = Φ t ( X ) ∈ A , as guaranteed by Lemma J.2. Uniform direct spanning gives
span { f θ j ( N ) ( X ′ ) : 1 ≤ j ≤ 2 D } = R D . \operatorname{span}\{f_{\theta_j}^{(N)}(X') : 1 \le j \le2D\}=\mathbb{R}^D. span { f θ j ( N ) ( X ′ ) : 1 ≤ j ≤ 2 D } = R D .
Since D Φ t ( X ) D\Phi_t(X) D Φ t ( X ) is invertible, their pullbacks U j ( t ) U_j(t) U j ( t ) also span R D \mathbb{R}^D R D . Since they belong to L X L_X L X ,
R D = span { U j ( t ) : 1 ≤ j ≤ 2 D } ⊆ L X ⊆ R D . \mathbb{R}^D=\operatorname{span}\{U_j(t):1\le j\le2D\}\subseteq L_X\subseteq\mathbb{R}^D. R D = span { U j ( t ) : 1 ≤ j ≤ 2 D } ⊆ L X ⊆ R D .
Thus L X = R D L_X=\mathbb{R}^D L X = R D . This holds at every X ∈ B X\in\mathcal{B} X ∈ B for the same bank of full multi-head blocks. The same proof applies to independent Gaussian entries with any prescribed positive variances, or more generally to a jointly absolutely continuous law on Θ 2 D \Theta^{2D} Θ 2 D .
The sampled fields are analytic, and B \mathcal{B} B is nonempty, open, and connected for d ≥ 3 d\ge3 d ≥ 3 by the domain argument above. Moreover, − f θ j -f_{\theta_j} − f θ j belongs to the same architecture family: it is realized by negating all output-projection blocks of θ j \theta_j θ j . The draw is fixed before the endpoints, so Corollary 2.7 proves universal interpolation on B N , n , d \mathcal{B}_{N,n,d} B N , n , d with the same 2 D 2D 2 D sampled generators, used in either sign over a horizon [ 0 , S ] [0,S] [ 0 , S ] that may depend on the endpoints. Since N N N was arbitrary, this holds for every N N N .
Remark J.3 (Rank-one attention). Theorem 3.3 includes the case of one head of width one. Taking H = 1 H=1 H = 1 and r 1 = 1 r_1=1 r 1 = 1 , write the Gaussian projections as Q k = b k T Q_k=b_k^{\mathsf{T}} Q k = b k T , K k = a k T K_k=a_k^{\mathsf{T}} K k = a k T , U k = v k T U_k=v_k^{\mathsf{T}} U k = v k T , and O k = u k O_k=u_k O k = u k . Then
W k = a k b k T , V k = u k v k T , 1 ≤ k ≤ 2 D , W_k=a_kb_k^{\mathsf{T}},\qquad V_k=u_kv_k^{\mathsf{T}},\qquad1\le k\le2D, W k = a k b k T , V k = u k v k T , 1 ≤ k ≤ 2 D ,
where all vectors a k , b k , u k , v k a_k,b_k,u_k,v_k a k , b k , u k , v k are independent standard Gaussian vectors in R d \mathbb{R}^d R d . Both effective matrices have rank one almost surely. Thus the same theorem gives universal interpolation at continuous depth on B N , n , d \mathcal{B}_{N,n,d} B N , n , d with a frozen bank of 2 N n d 2Nnd 2 N n d such fields.
Dependence of the terminal depth on the endpoints. Allowing the terminal time to vary is essential for this formulation. Each sampled field, or its negative, satisfies ∥ G ( Z ) ∥ ≤ C ∥ Z ∥ \lVert G(Z)\rVert\le C\lVert Z\rVert ∥ G ( Z )∥ ≤ C ∥ Z ∥ with a common C < ∞ C<\infty C < ∞ , since softmax takes convex combinations of token values. Gronwall’s inequality therefore bounds every trajectory using these unscaled fields by
∥ Z ( S ) ∥ ≤ e C S ∥ Z ( 0 ) ∥ . \lVert Z(S)\rVert\le e^{CS}\lVert Z(0)\rVert. ∥ Z ( S )∥ ≤ e C S ∥ Z ( 0 )∥ .
Yet λ X ∈ B N , n , d \lambda X\in\mathcal{B}_{N,n,d} λ X ∈ B N , n , d for every X ∈ B N , n , d X\in\mathcal{B}_{N,n,d} X ∈ B N , n , d and λ > 0 \lambda>0 λ > 0 . For any fixed horizon S 0 S_0 S 0 , choosing λ > e C S 0 \lambda>e^{CS_0} λ > e C S 0 gives an admissible target Y = λ X Y=\lambda X Y = λ X that cannot be reached by time S 0 S_0 S 0 . A horizon depending on the endpoints removes this obstruction without introducing adjustable scalar gains.
Proof of the finite-depth universal interpolation corollary
Proof. Fix N ≥ 1 N\ge1 N ≥ 1 , put D = N n d D=Nnd D = N n d , and choose a draw ( θ 1 , … , θ 2 D ) ∈ Θ 2 D (\theta_1,\ldots,\theta_{2D})\in\Theta^{2D} ( θ 1 , … , θ 2 D ) ∈ Θ 2 D in the intersection of the probability-one events in Lemmas I.1 and J.2. These events hold simultaneously for all configurations in their respective domains, so the bank is fixed before the endpoints are chosen. The batch fields f θ 1 ( N ) , … , f θ 2 D ( N ) f_{\theta_1}^{(N)},\ldots,f_{\theta_{2D}}^{(N)} f θ 1 ( N ) , … , f θ 2 D ( N ) are analytic and span R D \mathbb{R}^D R D at every point of A N , n , d \mathcal{A}_{N,n,d} A N , n , d by Lemma I.1. This set is open and connected for d ≥ 3 d\ge3 d ≥ 3 , and the attention architecture allows real scalar multiplication since c f W , V = f c W , c V c f_{W,V}=f_{cW,cV} c f W , V = f c W , c V . Hence Proposition F.1 gives universal interpolation at finite depth on A N , n , d \mathcal{A}_{N,n,d} A N , n , d using this same bank, with all intermediate configurations in A N , n , d \mathcal{A}_{N,n,d} A N , n , d .
Now fix arbitrary endpoints X , Y ∈ B N , n , d X,Y\in\mathcal{B}_{N,n,d} X , Y ∈ B N , n , d . By Lemma J.2, choose an index k X ∈ { 1 , … , 2 D } k_X\in\{1,\ldots,2D\} k X ∈ { 1 , … , 2 D } and set F : = f θ k X ( N ) F:=f_{\theta_{k_X}}^{(N)} F := f θ k X ( N ) . For sufficiently small s > 0 s>0 s > 0 ,
X + : = X + s F ( X ) ∈ A N , n , d . X^+:=X+sF(X)\in\mathcal{A}_{N,n,d}. X + := X + s F ( X ) ∈ A N , n , d .
This is one admissible residual layer.
At the target, choose an index k Y ∈ { 1 , … , 2 D } k_Y\in\{1,\ldots,2D\} k Y ∈ { 1 , … , 2 D } supplied by the same lemma and set G : = f θ k Y ( N ) G:=f_{\theta_{k_Y}}^{(N)} G := f θ k Y ( N ) . For every pair ( ℓ , i ) ≠ ( ℓ ′ , j ) (\ell,i)\ne(\ell',j) ( ℓ , i ) = ( ℓ ′ , j ) with y i ℓ ∧ y j ℓ ′ = 0 y_i^\ell\wedge y_j^{\ell'}=0 y i ℓ ∧ y j ℓ ′ = 0 , this choice gives
f θ k Y ( N ) ( y i ℓ ∧ y j ℓ ′ + y i ℓ ∧ f θ k Y ( N ) ( y j ℓ ′ ) ) ≠ 0. f_{\theta_{k_Y}}^{(N)}(y_i^\ell\wedge y_j^{\ell'}+y_i^\ell\wedge f_{\theta_{k_Y}}^{(N)}(y_j^{\ell'}))\ne0. f θ k Y ( N ) ( y i ℓ ∧ y j ℓ ′ + y i ℓ ∧ f θ k Y ( N ) ( y j ℓ ′ )) = 0.
Consider the equation
Z + t G ( Z ) − Y = 0. Z+tG(Z)-Y=0. Z + tG ( Z ) − Y = 0.
Its derivative with respect to Z Z Z at ( t , Z ) = ( 0 , Y ) (t,Z)=(0,Y) ( t , Z ) = ( 0 , Y ) is the identity. The implicit function theorem therefore gives an analytic curve Z ( t ) Z(t) Z ( t ) for t t t near zero satisfying
Z ( 0 ) = Y , Z ( t ) + t G ( Z ( t ) ) = Y , Z(0)=Y,\qquad Z(t)+tG(Z(t))=Y, Z ( 0 ) = Y , Z ( t ) + tG ( Z ( t )) = Y ,
Z ′ ( 0 ) = − G ( Y ) . Z'(0)=-G(Y). Z ′ ( 0 ) = − G ( Y ) .
Taylor’s formula therefore gives
Z ( t ) = Z ( 0 ) + t Z ′ ( 0 ) + O ( t 2 ) = Y − t G ( Y ) + O ( t 2 ) . Z(t)=Z(0)+tZ'(0)+O(t^2)=Y-tG(Y)+O(t^2). Z ( t ) = Z ( 0 ) + t Z ′ ( 0 ) + O ( t 2 ) = Y − tG ( Y ) + O ( t 2 ) .
Write z i ℓ ( t ) z_i^\ell(t) z i ℓ ( t ) for the tokens of Z ( t ) Z(t) Z ( t ) . For each initially collinear pair, its wedge along this curve is
z i ℓ ′ ( t ) ∧ z j ℓ ′ ( t ) = − t f θ k Y ( y i ℓ ′ ) ∧ y j ℓ ′ − t y i ℓ ′ ∧ f θ k Y ( y j ℓ ′ ) + O ( t 2 ) . z_i^{\ell'}(t)\wedge z_j^{\ell'}(t)
=-t f_{\theta_kY}(y_i^{\ell'})\wedge y_j^{\ell'}
-t y_i^{\ell'}\wedge f_{\theta_kY}(y_j^{\ell'})+O(t^2). z i ℓ ′ ( t ) ∧ z j ℓ ′ ( t ) = − t f θ k Y ( y i ℓ ′ ) ∧ y j ℓ ′ − t y i ℓ ′ ∧ f θ k Y ( y j ℓ ′ ) + O ( t 2 ) .
It is consequently nonzero for all sufficiently small nonzero t t t . Initially noncollinear pairs remain noncollinear by continuity, and all tokens remain nonzero. There are finitely many tokens and pairs, so we may choose one sufficiently small t > 0 t>0 t > 0 such that
Y − : = Z ( t ) ∈ A N , n , d , Y − + t G ( Y − ) = Y . Y^-:=Z(t)\in\mathcal{A}_{N,n,d},\qquad Y^-+tG(Y^-)=Y. Y − := Z ( t ) ∈ A N , n , d , Y − + tG ( Y − ) = Y .
Apply the finite-depth interpolation result on A N , n , d \mathcal{A}_{N,n,d} A N , n , d to connect X + X^+ X + to Y − Y^- Y − . Prepend the layer Id + s F \operatorname{Id}+sF Id + s F and append the layer Id + t G \operatorname{Id}+tG Id + tG . This gives the required finite residual network. All configurations other than the prescribed endpoints belong to A N , n , d \mathcal{A}_{N,n,d} A N , n , d , and hence every configuration belongs to B N , n , d \mathcal{B}_{N,n,d} B N , n , d . The construction uses at most two additional layers around an interpolation inside A N , n , d \mathcal{A}_{N,n,d} A N , n , d . The implicit function theorem only defines the intermediate target Y − Y^- Y − ; the last network layer is the admissible forward residual map Id + t G \operatorname{Id}+tG Id + tG .
Every selected index and scalar gain is shared across the entire batch. Finally, each multiple c f θ j cf_{\theta_j} c f θ j is realized by a scalar gain on the frozen block output; the head widths and all stored projections remain unchanged. The same bank works for every endpoint pair. If X = Y X=Y X = Y , the depth-zero network also suffices. Since the sampled fields are fixed before the endpoints, this is universal interpolation at finite depth on B N , n , d \mathcal{B}_{N,n,d} B N , n , d in the sense of Section 2.3. The argument applies to every N ≥ 1 N\ge1 N ≥ 1 .
Proof of Theorem 3.5
This appendix proves Theorem 3.5 for noncausal attention with unrestricted effective score and value matrices. The admissible interpolation domain here is allowed to depend on the sampled pair, whereas the Gaussian multihead bank in Theorem 3.3 works on the fixed domain B N , n , d \mathcal{B}_{N,n,d} B N , n , d . The same pair works for every finite batch size and sequence length. For a single sequence x = vec ( x 1 , … , x n ) x=\operatorname{vec}(x_1,\ldots,x_n) x = vec ( x 1 , … , x n ) , we use the single-head field
f W , V ( x ) i = V ∑ j = 1 n x j exp ( x j T W x i ) ∑ j = 1 n exp ( x j T W x i ) , W , V ∈ R d × d , (32) f_{W,V}(x)_i
=V\frac{\sum_{j=1}^{n}x_j\exp(x_j^{\mathsf T}Wx_i)}
{\sum_{j=1}^{n}\exp(x_j^{\mathsf T}Wx_i)},
\qquad W,V\in\mathbb{R}^{d\times d}, \tag*{(32)} f W , V ( x ) i = V ∑ j = 1 n exp ( x j T W x i ) ∑ j = 1 n x j exp ( x j T W x i ) , W , V ∈ R d × d , (32)
and its batch lift f W , V ( N ) f_{W,V}^{(N)} f W , V ( N ) . One head of width at least d d d realizes every such field; in a multihead block, the remaining heads can be set to zero. Under the standard equal-width convention r h = d / H r_h=d/H r h = d / H , this single-active-head realization corresponds to H = 1 H=1 H = 1 .
Write θ = ( W 1 , V 1 , W 2 , V 2 ) ∈ R 4 d 2 \theta=(W_1,V_1,W_2,V_2)\in\mathbb{R}^{4d^2} θ = ( W 1 , V 1 , W 2 , V 2 ) ∈ R 4 d 2 and, for N ≥ 1 N\ge1 N ≥ 1 and n ≥ 2 n\ge2 n ≥ 2 , put D = N n d D=Nnd D = N n d and f r ( N ) : = f W r , V r ( N ) f_r^{(N)}:=f_{W_r,V_r}^{(N)} f r ( N ) := f W r , V r ( N ) . We choose the interpolation domain as
R θ , N , n : = { X ∈ B N , n , d : Lie ( f 1 ( N ) , f 2 ( N ) ) ( X ) = R D } , (33) \mathcal{R}_{\theta,N,n}:=\left\{X\in\mathcal{B}_{N,n,d}:\operatorname{Lie}(f_1^{(N)},f_2^{(N)})(X)=\mathbb{R}^{D}\right\}, \tag*{(33)} R θ , N , n := { X ∈ B N , n , d : Lie ( f 1 ( N ) , f 2 ( N ) ) ( X ) = R D } , (33)
Σ θ , N , n : = B N , n , d ∖ R θ , N , n . \Sigma_{\theta,N,n}:=\mathcal{B}_{N,n,d}\setminus\mathcal{R}_{\theta,N,n}. Σ θ , N , n := B N , n , d ∖ R θ , N , n .
Thus R N , n = R θ , N , n \mathcal{R}_{N,n}=\mathcal{R}_{\theta,N,n} R N , n = R θ , N , n in the main statement. We prove the stronger bound
dim R Σ θ , N , n ≤ N n d − 2 , (34) \dim_{\mathbb{R}}\Sigma_{\theta,N,n}\le Nnd-2, \tag*{(34)} dim R Σ θ , N , n ≤ N n d − 2 , (34)
almost surely, simultaneously for every N ≥ 1 N \ge1 N ≥ 1 and n ≥ 2 n \ge2 n ≥ 2 . In particular, the domain also has full Lebesgue measure in B N , n , d \mathcal{B}_{N,n,d} B N , n , d and is path connected. More generally, the same conclusions hold when θ \theta θ is drawn from any joint law absolutely continuous with respect to Lebesgue measure on R 4 d 2 \mathbb{R}^{4d^2} R 4 d 2 . Both value matrices V 1 , V 2 V_1,V_2 V 1 , V 2 are then invertible almost surely.
The Gaussian projection initialization in Theorem 3.5 induces such a law. Indeed, condition on the key and value projections, which almost surely have full column rank when r ≥ d r \ge d r ≥ d . The maps from the query and output projections to the effective matrices are then surjective linear maps. Since all projection entries are independent standard Gaussians, the conditional joint law of θ \theta θ is a nondegenerate Gaussian, and its unconditional joint law is therefore absolutely continuous. The arguments below only exclude Lebesgue-null parameter sets.
The two frozen base fields, used with either sign on a freely chosen interval [ 0 , S ] [0,S] [ 0 , S ] , give universal interpolation in the sense of Definition 2.4 on R θ , N , n \mathcal{R}_{\theta,N,n} R θ , N , n , with m N = 2 m_N=2 m N = 2 . Their negatives are fixed by the same draw and require no additional sampled matrices. The matrices are independent of N N N and n n n , while the domain may depend on θ , N , n \theta,N,n θ , N , n . The theorem does not assert full Lie rank on all of B N , n , d \mathcal{B}_{N,n,d} B N , n , d , nor a width-one realization.
A finite Lie-minor witness for every batch size
Lemma L.1 (A two-field witness for arbitrary batch size). *For every d ≥ 3 d \ge3 d ≥ 3 , n ≥ 2 n \ge2 n ≥ 2 , and N ≥ 1 N \ge1 N ≥ 1 , there exist invertible W 1 , V 1 , W 2 , V 2 ∈ R d × d W_1,V_1,W_2,V_2 \in\mathbb{R}^{d \times d} W 1 , V 1 , W 2 , V 2 ∈ R d × d and X ∈ A N , n , d X \in\mathcal{A}_{N,n,d} X ∈ A N , n , d such that, with D = N n d D=Nnd D = N n d ,
Lie ( f W 1 , V 1 ( N ) , f W 2 , V 2 ( N ) ) ( X ) = R D . \operatorname{Lie}\left(f^{(N)}_{W_1,V_1},f^{(N)}_{W_2,V_2}\right)(X)=\mathbb{R}^{D}. Lie ( f W 1 , V 1 ( N ) , f W 2 , V 2 ( N ) ) ( X ) = R D .
Proof. Put M = N n M=Nn M = N n , η = ( 4 M ) − 1 \eta=(4M)^{-1} η = ( 4 M ) − 1 , and choose
s ℓ i = 1 4 + ( ( ℓ − 1 ) n + i ) η , x i ℓ = s ℓ i e 1 + 1 − s ℓ i 2 e 2 . (35) s_{\ell i}=\frac{1}{4}+\bigl((\ell-1)n+i\bigr)\eta,\qquad x_i^\ell=s_{\ell i}e_1+\sqrt{1-s_{\ell i}^{2}}e_2. \tag*{(35)} s ℓ i = 4 1 + ( ( ℓ − 1 ) n + i ) η , x i ℓ = s ℓ i e 1 + 1 − s ℓ i 2 e 2 . (35)
All M M M tokens are distinct points in the open first quadrant of the unit circle, so this batch belongs to A N , n , d \mathcal{A}_{N,n,d} A N , n , d . For each token define the real-analytic function
h ℓ i ( β ) = ∑ j = 1 n s ℓ j e β s ℓ i s ℓ j ∑ j = 1 n e β s ℓ i s ℓ j . h_{\ell i}(\beta)=\frac{\sum_{j=1}^{n}s_{\ell j}e^{\beta s_{\ell i}s_{\ell j}}}{\sum_{j=1}^{n}e^{\beta s_{\ell i}s_{\ell j}}}. h ℓ i ( β ) = ∑ j = 1 n e β s ℓ i s ℓ j ∑ j = 1 n s ℓ j e β s ℓ i s ℓ j .
The largest and second-largest scalars in sequence ℓ \ell ℓ differ by η \eta η (indeed s ℓ n − s ℓ , n − 1 = [ n − ( n − 1 ) ] η = η s_{\ell n}-s_{\ell,n-1}=[n-(n-1)]\eta=\eta s ℓ n − s ℓ , n − 1 = [ n − ( n − 1 )] η = η ). Dividing the numerator and denominator by e β s ℓ i s ℓ n e^{\beta s_{\ell i}s_{\ell n}} e β s ℓ i s ℓ n gives
h ℓ i ( β ) = s ℓ n − η e − n η s ℓ i β + o ( e − n η s ℓ i β ) , β ⟶ + ∞ . (36) h_{\ell i}(\beta)=s_{\ell n}-\eta e^{-n\eta s_{\ell i}\beta}+o\left(e^{-n\eta s_{\ell i}\beta}\right),\qquad\beta\longrightarrow+\infty. \tag*{(36)} h ℓ i ( β ) = s ℓ n − η e − n η s ℓ i β + o ( e − n η s ℓ i β ) , β ⟶ + ∞. (36)
The functions 1 , h ℓ i 1,h_{\ell i} 1 , h ℓ i are linearly independent: indeed suppose that
a 0 + ∑ ℓ , i a ℓ i h ℓ i ( β ) = 0. a_0+\sum_{\ell,i}a_{\ell i}h_{\ell i}(\beta)=0. a 0 + ℓ , i ∑ a ℓ i h ℓ i ( β ) = 0.
Subtracting its limit as β → + ∞ \beta\to+\infty β → + ∞ gives
∑ ℓ , i a ℓ i ( h ℓ i ( β ) − s ℓ n ) = 0. \sum_{\ell,i}a_{\ell i}\bigl(h_{\ell i}(\beta)-s_{\ell n}\bigr)=0. ℓ , i ∑ a ℓ i ( h ℓ i ( β ) − s ℓ n ) = 0.
By the asymptotic expansion,
h ℓ i ( β ) − s ℓ n = ( − η + o ( 1 ) ) e − n η s ℓ i β . h_{\ell i}(\beta)-s_{\ell n}=(-\eta+o(1))e^{-n\eta s_{\ell i}\beta}. h ℓ i ( β ) − s ℓ n = ( − η + o ( 1 )) e − n η s ℓ i β .
If any coefficient a ℓ i a_{\ell i} a ℓ i is nonzero, choose the unique index (as the rates η s ℓ i \eta s_{\ell i} η s ℓ i are pairwise distinct) ( ℓ ∗ , i ∗ ) (\ell^*,i^*) ( ℓ ∗ , i ∗ ) with the smallest decay rate among those with nonzero coefficients. Dividing by e − n η s ℓ ∗ i ∗ β e^{-n\eta s_{\ell^*i^*}\beta} e − n η s ℓ ∗ i ∗ β and letting β → + ∞ \beta\to+\infty β → + ∞ , all other terms vanish, yielding
− n η a ℓ ∗ i ∗ = 0 , -n\eta a_{\ell^*i^*}=0, − n η a ℓ ∗ i ∗ = 0 ,
a contradiction. Thus all a ℓ i a_{\ell i} a ℓ i vanish, and the original relation then gives a 0 = 0 a_0=0 a 0 = 0 , proving linear independence.
Consider the auxiliary pair consisting of the tokenwise linear field L Λ L_{\Lambda} L Λ and an attention field H H H , where
Λ = diag ( λ 1 , … , λ d ) , λ r = 1 + r − 1 d , v = ( 1 , … , 1 ) ⊤ , H = f e 1 e 1 ⊤ , v e 1 ⊤ ( N ) . \Lambda=\operatorname{diag}(\lambda_1,\ldots,\lambda_d),\qquad\lambda_r=1+\frac{r-1}{d},\qquad v=(1,\ldots,1)^{\top},\qquad H=f^{(N)}_{e_1e_1^{\top},ve_1^{\top}}. Λ = diag ( λ 1 , … , λ d ) , λ r = 1 + d r − 1 , v = ( 1 , … , 1 ) ⊤ , H = f e 1 e 1 ⊤ , v e 1 ⊤ ( N ) .
Here ( L Λ ( X ) ) i ℓ = Λ x i ℓ (L_{\Lambda}(X))^\ell_i=\Lambda x^\ell_i ( L Λ ( X ) ) i ℓ = Λ x i ℓ . The flow Φ t \Phi_t Φ t of L Λ L_{\Lambda} L Λ multiplies every token by e t Λ e^{t\Lambda} e t Λ . Its pushforward of H H H , evaluated at the batch (35) , has spatial component r r r
( ( Φ t ) ∗ H ) i , r ℓ ( X ) = e ( λ r − 1 ) t h i , r ℓ ( e − 2 t ) . (37) \left((\Phi_t)_*H\right)^\ell_{i,r}(X)=e^{(\lambda_r-1)t}h^\ell_{i,r}(e^{-2t}). \tag*{(37)} ( ( Φ t ) ∗ H ) i , r ℓ ( X ) = e ( λ r − 1 ) t h i , r ℓ ( e − 2 t ) . (37)
We claim that the evaluations of ad L Λ k H \operatorname{ad}_{L_{\Lambda}}^k H ad L Λ k H , k ≥ 0 k\ge0 k ≥ 0 , span R D \mathbb{R}^D R D . If a covector ( c ℓ i , r ) (c_{\ell i,r}) ( c ℓ i , r ) annihilated them all, the real-analytic function obtained by pairing it with (37) would have every derivative zero at t = 0 t=0 t = 0 , and hence vanish for all real t t t . Indeed, these derivatives are the iterated brackets, up to signs. Set
B r ( β ) = ∑ ℓ , i c ℓ i , r h ℓ i ℓ ( β ) , z = e − t / d . B_r(\beta)=\sum_{\ell,i}c_{\ell i,r}h^\ell_{\ell i}(\beta),\qquad z=e^{-t/d}. B r ( β ) = ℓ , i ∑ c ℓ i , r h ℓ i ℓ ( β ) , z = e − t / d .
The resulting identity is
∑ r = 1 d z − ( r − 1 ) B r ( z 2 d ) = 0 , z > 0. (38) \sum_{r=1}^{d}z^{-(r-1)}B_r(z^{2d})=0,\qquad z>0. \tag*{(38)} r = 1 ∑ d z − ( r − 1 ) B r ( z 2 d ) = 0 , z > 0. (38)
Each B r B_r B r is analytic near zero. After multiplication by z d − 1 z^{d-1} z d − 1 , its contribution to (38) contains only powers d − r + 2 d k d-r+2dk d − r + 2 d k , k ≥ 0 k\ge0 k ≥ 0 . These sets of exponents are disjoint for different r r r . Every Taylor coefficient of every B r B_r B r therefore vanishes. Analyticity and the independence of the h i ℓ h^\ell_{i} h i ℓ imply c ℓ i , r = 0 c_{\ell i,r}=0 c ℓ i , r = 0 for all indices, proving the claim.
Finite dimensionality now provides nonnegative integers k 1 , … , k D k_1,\ldots,k_D k 1 , … , k D for which
det ( ( ad L Λ k j H ) ( X ) ) j = 1 D ≠ 0. (39) \det\left((\operatorname{ad}_{L_{\Lambda}}^{k_j}H)(X)\right)_{j=1}^{D}\ne0. \tag*{(39)} det ( ( ad L Λ k j H ) ( X ) ) j = 1 D = 0. (39)
To replace the linear field by attention, put G T = f T I , Λ ( N ) G_T=f^{(N)}_{TI,\Lambda} G T = f T I , Λ ( N ) . At the fixed batch all tokens have norm one and, within each sequence, ⟨ x i ℓ , x j ℓ ⟩ < 1 \langle x^\ell_i,x^\ell_j\rangle<1 ⟨ x i ℓ , x j ℓ ⟩ < 1 when i ≠ j i\ne j i = j . Thus, for every fixed derivative order a a a ,
D a G T ( X ) ⟶ D a L Λ ( X ) ( T ⟶ + ∞ ) . (40) D^aG_T(X)\longrightarrow D^aL_{\Lambda}(X)\qquad(T\longrightarrow+\infty). \tag*{(40)} D a G T ( X ) ⟶ D a L Λ ( X ) ( T ⟶ + ∞ ) . (40)
For completeness, divide each softmax row by its diagonal exponential. Every remaining exponential is e − T g i j ℓ e^{-Tg^\ell_{ij}} e − T g ij ℓ at the witness, with g i j ℓ = 1 − ⟨ x i ℓ , x j ℓ ⟩ > 0 g^\ell_{ij}=1-\langle x^\ell_i,x^\ell_j\rangle>0 g ij ℓ = 1 − ⟨ x i ℓ , x j ℓ ⟩ > 0 . Every fixed-order derivative is bounded by a polynomial in T T T times e − T g e^{-Tg} e − T g , where g g g is the smallest of these finitely many gaps. The denominators after division are bounded below by one. This proves (40) , including derivatives transverse to the plane containing the witness tokens.
A fixed Lie word evaluated at a point depends polynomially on finitely many derivatives of its generators. Hence the determinant in (39) remains nonzero after replacing L Λ L_{\Lambda} L Λ by G T G_T G T , for some finite sufficiently large T T T . Finally replace the second field’s parameters by
W 2 = e 1 e 1 ⊤ + ε I , V 2 = v e 1 ⊤ + ε I . W_2=e_1e_1^{\top}+\varepsilon I,\qquad V_2=ve_1^{\top}+\varepsilon I. W 2 = e 1 e 1 ⊤ + ε I , V 2 = v e 1 ⊤ + ε I .
Both determinants equal ε d − 1 ( 1 + ε ) \varepsilon^{d-1}(1+\varepsilon) ε d − 1 ( 1 + ε ) , and the selected Lie determinant remains nonzero for sufficiently small ε > 0 \varepsilon>0 ε > 0 by continuity. Together with W 1 = T I W_1=TI W 1 = T I and V 1 = Λ V_1=\Lambda V 1 = Λ , this gives four invertible matrices and proves the lemma. □
Lemma L.2 (Generic rank simultaneously for all finite batches). Fix d ≥ 3 d\ge3 d ≥ 3 , and draw ( W 1 , V 1 , W 2 , V 2 ) (W_1,V_1,W_2,V_2) ( W 1 , V 1 , W 2 , V 2 ) from a joint law absolutely continuous with respect to Lebesgue measure on R 4 d 2 \mathbb{R}^{4d^2} R 4 d 2 . Almost surely, simultaneously for every n ≥ 2 n\ge2 n ≥ 2 and N ≥ 1 N\ge1 N ≥ 1 , the full Lie-rank locus in B N , n , d \mathcal{B}_{N,n,d} B N , n , d is open, dense, and has full Lebesgue measure.
Proof. For fixed n n n , N N N , Lemma L.1 provides a fixed batch X 0 X_0 X 0 and finitely many Lie words whose determinant Δ n , N ( θ , X ) \Delta_{n,N}(\theta,X) Δ n , N ( θ , X ) is nonzero at one parameter choice, where θ = ( W 1 , V 1 , W 2 , V 2 ) \theta=(W_1,V_1,W_2,V_2) θ = ( W 1 , V 1 , W 2 , V 2 ) . The determinant is jointly real analytic in all parameters and state coordinates: the softmax denominators are strictly positive on the entire real domain. Therefore θ ↦ Δ n , N ( θ , X 0 ) \theta\mapsto\Delta_{n,N}(\theta,X_0) θ ↦ Δ n , N ( θ , X 0 ) is a nonzero analytic function, whose zero set has Lebesgue measure zero. For almost every draw, Δ n , N ( θ , ⋅ ) \Delta_{n,N}(\theta,\cdot) Δ n , N ( θ , ⋅ ) is consequently nonzero analytic. Its nonvanishing locus is open, dense, and of full measure, also after restriction to B N , n , d \mathcal{B}_{N,n,d} B N , n , d . The full Lie-rank locus contains it and is itself open, so it has the same three properties. Finally intersect these probability-one parameter events over the countably many pairs ( n , N ) (n,N) ( n , N ) . The resulting event still has probability one and uses the same two generators for every pair. □
Generic matrix conditions
Write
S r = W r + W r T 2 , K r = W r − W r T 2 , r = 1 , 2. S_r=\frac{W_r+W_r^{\mathsf T}}{2},\qquad K_r=\frac{W_r-W_r^{\mathsf T}}{2},\qquad r=1,2. S r = 2 W r + W r T , K r = 2 W r − W r T , r = 1 , 2.
In addition to the event supplied by Lemma L.2, we impose the following conditions:
Lie m a t ( V 1 , V 2 ) = g l d ( R ) \operatorname{Lie}_{\mathrm{mat}}(V_1,V_2)=\mathfrak{gl}_d(\mathbb{R}) Lie mat ( V 1 , V 2 ) = gl d ( R ) ;
S 1 , S 2 S_1,S_2 S 1 , S 2 are invertible and nonproportional, and K 1 , K 2 K_1,K_2 K 1 , K 2 are nonzero and nonproportional;
for r ≠ s r\ne s r = s ,
V s T S r + S r V s ∉ R S r , V s T K r + K r V s ∉ R K r (41) V_s^{\mathsf T}S_r+S_rV_s\notin\mathbb{R}S_r,\qquad V_s^{\mathsf T}K_r+K_rV_s\notin\mathbb{R}K_r \tag*{(41)} V s T S r + S r V s ∈ / R S r , V s T K r + K r V s ∈ / R K r (41)
each V r V_r V r has simple complex spectrum and no two of its eigenvalues, allowing repetition, sum to zero.
These conditions hold almost surely and do not depend on N , n N,n N , n . For the first, the matrices
D 0 = diag ( 1 , 2 , 4 , … , 2 d − 1 ) , R 0 = I + 11 T D_0=\operatorname{diag}(1,2,4,\ldots,2^{d-1}),\qquad R_0=I+11^{\mathsf T} D 0 = diag ( 1 , 2 , 4 , … , 2 d − 1 ) , R 0 = I + 1 1 T
generate g l d \mathfrak{gl}_d gl d : their distinct nonzero adjoint eigenvalue gaps isolate every off-diagonal matrix unit from R 0 R_0 R 0 ; brackets give the traceless diagonals, and D 0 D_0 D 0 has nonzero trace. A finite matrix Lie determinant is therefore a nonzero polynomial in the two values. The second and fourth conditions also exclude proper algebraic sets. Here the skew-symmetric matrix space has dimension at least two because d ≥ 3 d\ge3 d ≥ 3 .
For fixed invertible symmetric S S S , the map V ↦ V T S + S V V\mapsto V^{\mathsf T}S+SV V ↦ V T S + S V is onto the symmetric matrices, so the inverse image of R S \mathbb{R}S R S is a proper linear subspace. For fixed nonzero skew-symmetric K K K , put K K K in real block-diagonal canonical form with K 12 ≠ 0 K_{12}\ne0 K 12 = 0 . The choice V = E 13 V=E_{13} V = E 13 gives V T K + K V V^{\mathsf T}K+KV V T K + K V a nonzero ( 2 , 3 ) (2,3) ( 2 , 3 ) entry, whereas K 23 = 0 K_{23}=0 K 23 = 0 . Thus the skew condition also excludes a proper linear subspace. Fubini’s theorem proves (41) almost surely. Independence of the parameter blocks is unnecessary: the joint law has a density.
Fix a parameter pair satisfying these conditions. Enumerate the p = 2 N n 2 p=2Nn^2 p = 2 N n 2 score quadratics as
Q r , a , i , j ( X ) = ( x j a ) T W r x i a . (42) Q_{r,a,i,j}(X)=(x_j^a)^{\mathsf T}W_rx_i^a. \tag*{(42)} Q r , a , i , j ( X ) = ( x j a ) T W r x i a . (42)
They are linearly independent over C \mathbb{C} C . Indeed, terms from different sequences or different unordered token pairs have distinct multidegrees. For a diagonal token pair, independence follows from that of S 1 , S 2 S_1,S_2 S 1 , S 2 . For an off-diagonal pair, a relation among W 1 , W 1 T , W 2 , W 2 T W_1,W_1^{\mathsf T},W_2,W_2^{\mathsf T} W 1 , W 1 T , W 2 , W 2 T separates into a relation among S 1 , S 2 S_1,S_2 S 1 , S 2 and one among K 1 , K 2 K_1,K_2 K 1 , K 2 , so all coefficients vanish.
Let L V r LV_r L V r denote the shared tokenwise linear field ( L V r X ) i a = V r x i a (LV_rX)_i^a=V_rx_i^a ( L V r X ) i a = V r x i a . The fourth condition implies that L V r LV_r L V r , acting by differentiation, is invertible on the space of homogeneous quadratic polynomials in all D D D state coordinates. In an eigenbasis, its eigenvalues on that space are precisely sums of two spatial eigenvalues, with repetitions from the token indices.
Exclusion of invariant algebraic hypersurfaces
We first record the independence property needed for polynomial exponents on a regular real hypersurface patch.
Lemma L.3 (Exponential independence on a hypersurface patch). Let h ∈ R [ x 1 , … , x q ] h\in\mathbb{R}[x_1,\ldots,x_q] h ∈ R [ x 1 , … , x q ] , with q ≥ 2 q\ge2 q ≥ 2 , and let M \mathcal{M} M be a nonempty connected relatively open subset of
{ x ∈ R q : h ( x ) = 0 , ∇ h ( x ) ≠ 0 } . \{x\in\mathbb{R}^q:h(x)=0,\ \nabla h(x)\ne0\}. { x ∈ R q : h ( x ) = 0 , ∇ h ( x ) = 0 } . Let P 1 , … , P s P_1,\ldots,P_s P 1 , … , P s and A 1 , … , A s A_1,\ldots,A_s A 1 , … , A s be real polynomials in these coordinates. Suppose that P i − P j P_i-P_j P i − P j is nonconstant on M \mathcal{M} M whenever i ≠ j i\ne j i = j . If
∑ j = 1 s A j ( x ) e P j ( x ) = 0 for every x ∈ M , \sum_{j=1}^{s}A_j(x)e^{P_j(x)}=0\qquad\text{for every }x\in\mathcal{M}, j = 1 ∑ s A j ( x ) e P j ( x ) = 0 for every x ∈ M , then A j ( x ) = 0 A_j(x)=0 A j ( x ) = 0 for every x ∈ M x\in\mathcal{M} x ∈ M and every j j j . The conclusion concerns the restrictions of the coefficients to M \mathcal{M} M , not their values outside this patch.
Proof. We first explain a fact about functions of one real variable, and then use the implicit function theorem to restrict the proposed identity to such functions.
Algebraic functions of one variable. A real analytic function b ( t ) b(t) b ( t ) on an interval is called algebraic if it satisfies
Q ( t , b ( t ) ) = 0 Q(t,b(t))=0 Q ( t , b ( t )) = 0
for a nonzero polynomial Q Q Q in two variables. For example, b ( t ) = 1 + t 2 b(t)=\sqrt{1+t^2} b ( t ) = 1 + t 2 satisfies b ( t ) 2 − 1 − t 2 = 0 b(t)^2-1-t^2=0 b ( t ) 2 − 1 − t 2 = 0 . We use the elementary elimination properties of polynomial equations: sums, products, and quotients of algebraic functions are algebraic wherever defined; moreover, any two algebraic functions b ( t ) b(t) b ( t ) , c ( t ) c(t) c ( t ) satisfy a nonzero polynomial relation R ( b ( t ) , c ( t ) ) = 0 R(b(t),c(t))=0 R ( b ( t ) , c ( t )) = 0 . In the latter property the parameter t t t is eliminated from their polynomial equations. Derivatives are algebraic as well. Indeed, choose an equation Q ( t , b ( t ) ) = 0 Q(t,b(t))=0 Q ( t , b ( t )) = 0 of smallest possible degree in its second variable. Its partial derivative Q z ( t , b ( t ) ) Q_z(t,b(t)) Q z ( t , b ( t )) cannot vanish identically, since that would give an equation of smaller degree. Implicit differentiation therefore gives, after restricting to a smaller interval if needed,
b ′ ( t ) = − Q t ( t , b ( t ) ) Q z ( t , b ( t ) ) . b'(t)=-\frac{Q_t(t,b(t))}{Q_z(t,b(t))}. b ′ ( t ) = − Q z ( t , b ( t )) Q t ( t , b ( t )) .
An exponential of a nonconstant algebraic function is not algebraic. Suppose that both b b b and e b e^b e b were algebraic, with b b b nonconstant. The preceding elimination property would give R ( b ( t ) , e b ( t ) ) = 0 R(b(t),e^{b(t)})=0 R ( b ( t ) , e b ( t ) ) = 0 for some nonzero polynomial R R R . The range of b b b contains a nonempty open interval, so R ( u , e u ) = 0 R(u,e^u)=0 R ( u , e u ) = 0 on that interval. Since this expression is real analytic on all of R \mathbb{R} R , it vanishes for every real u u u . Writing R ( u , v ) = ∑ k = 0 m p k ( u ) v k R(u,v)=\sum_{k=0}^{m}p_k(u)v^k R ( u , v ) = ∑ k = 0 m p k ( u ) v k with p m ≠ 0 p_m\ne0 p m = 0 , and dividing by e m u e^{mu} e m u , gives
p m ( u ) + ∑ k < m p k ( u ) e − ( m − k ) u = 0. p_m(u)+\sum_{k<m}p_k(u)e^{-(m-k)u}=0. p m ( u ) + k < m ∑ p k ( u ) e − ( m − k ) u = 0.
As u → + ∞ u\to+\infty u → + ∞ , every term in the sum tends to zero. This would force the nonzero polynomial p m ( u ) p_m(u) p m ( u ) to tend to zero, which is impossible.
Independence in one variable. Let f 1 ( t ) , … , f s ( t ) f_1(t),\ldots,f_s(t) f 1 ( t ) , … , f s ( t ) be algebraic real analytic functions on an open interval I I I , with pairwise nonconstant differences. Suppose that their exponentials satisfy a nontrivial relation with algebraic analytic coefficients. A coefficient is counted as nonzero if it is not identically zero as a function, even though it may vanish at some individual points.
Keep the functions f 1 , … , f s f_1,\ldots,f_s f 1 , … , f s fixed, but consider all possible choices of algebraic real analytic coefficients giving a nontrivial relation, on I I I or on a nonempty open subinterval. Among these relations, choose one with the smallest number m m m of nonzero coefficients. Such a minimum exists because this number is an integer between 1 1 1 and s s s . Discard the identically zero terms and relabel the remaining functions and coefficients, so that the chosen relation reads
a 1 ( t ) e f 1 ( t ) + ⋯ + a m ( t ) e f m ( t ) = 0 , a_1(t)e^{f_1(t)}+\cdots+a_m(t)e^{f_m(t)}=0, a 1 ( t ) e f 1 ( t ) + ⋯ + a m ( t ) e f m ( t ) = 0 ,
with every a j a_j a j not identically zero. Necessarily m ≥ 2 m\ge2 m ≥ 2 : a relation with only one term would force its coefficient to vanish identically, since an exponential never vanishes.
Since a m a_m a m is not identically zero, choose a point t 0 t_0 t 0 where a m ( t 0 ) ≠ 0 a_m(t_0)\ne0 a m ( t 0 ) = 0 . By continuity, there is a smaller open interval J J J containing t 0 t_0 t 0 on which a m ( t ) a_m(t) a m ( t ) never vanishes. The product a m ( t ) e f m ( t ) a_m(t)e^{f_m(t)} a m ( t ) e f m ( t ) is therefore nonzero throughout J J J , and division gives
1 + ∑ j = 1 m − 1 a j ( t ) a m ( t ) e f j ( t ) − f m ( t ) = 0 ( t ∈ J ) . 1+\sum_{j=1}^{m-1}\frac{a_j(t)}{a_m(t)}e^{f_j(t)-f_m(t)}=0 \qquad(t\in J). 1 + j = 1 ∑ m − 1 a m ( t ) a j ( t ) e f j ( t ) − f m ( t ) = 0 ( t ∈ J ) .
Define
r j ( t ) = a j ( t ) a m ( t ) , b j ( t ) = f j ( t ) − f m ( t ) , j < m . r_j(t)=\frac{a_j(t)}{a_m(t)},\qquad b_j(t)=f_j(t)-f_m(t),\qquad j<m. r j ( t ) = a m ( t ) a j ( t ) , b j ( t ) = f j ( t ) − f m ( t ) , j < m .
Each r j r_j r j is algebraic and real analytic on J J J , and remains not identically zero. Each b j b_j b j is algebraic and nonconstant; analyticity ensures that a nonconstant difference cannot become constant on a smaller open interval. We thus obtain
1 + ∑ j < m r j ( t ) e b j ( t ) = 0. 1+\sum_{j<m}r_j(t)e^{b_j(t)}=0. 1 + j < m ∑ r j ( t ) e b j ( t ) = 0.
The purpose of this division is to turn the last term into the constant 1, which disappears when we differentiate:
∑ j < m ( r j ′ + r j b j ′ ) e b j = 0. \sum_{j<m}(r'_j+r_jb'_j)e^{b_j}=0. j < m ∑ ( r j ′ + r j b j ′ ) e b j = 0.
All the new coefficients are algebraic and real analytic. If any were nonzero, multiplying by e b m e^{b_m} e b m would give a relation among the original exponentials with fewer than m m m terms. Minimality thus gives r j ′ + r j b j ′ = 0 r'_j+r_jb'_j=0 r j ′ + r j b j ′ = 0 for every j j j . Consequently,
( r j e b j ) ′ = 0 , r j = c j e − b j , c j ≠ 0. (r_je^{b_j})'=0,\qquad r_j=c_je^{-b_j},\quad c_j\ne0. ( r j e b j ) ′ = 0 , r j = c j e − b j , c j = 0.
This contradicts the preceding paragraph: − b j -b_j − b j is a nonconstant algebraic function, whereas e − b j = r j / c j e^{-b_j}=r_j/c_j e − b j = r j / c j would be algebraic.
Restriction of the hypersurface identity to one variable. Suppose, toward a contradiction, that there exists p ∈ M p\in\mathcal{M} p ∈ M such that A ℓ ( p ) ≠ 0 A_\ell(p)\ne0 A ℓ ( p ) = 0 . Since ∇ h ( p ) ≠ 0 \nabla h(p)\ne0 ∇ h ( p ) = 0 , we may permute coordinates so that ∂ x q h ( p ) ≠ 0 \partial_{x_q}h(p)\ne0 ∂ x q h ( p ) = 0 . The real analytic implicit function theorem then solves h ( x ) = 0 h(x)=0 h ( x ) = 0 locally for the last coordinate as a real analytic function x q = φ ( u ) x_q=\varphi(u) x q = φ ( u ) of u = ( x 1 , … , x q − 1 ) u=(x_1,\ldots,x_{q-1}) u = ( x 1 , … , x q − 1 ) . Thus a neighborhood of p p p in M \mathcal{M} M is parametrized by
x = Φ ( u ) = ( u , φ ( u ) ) , h ( u , φ ( u ) ) = 0 , u ∈ U ⊆ R q − 1 , x=\Phi(u)=(u,\varphi(u)),\qquad h(u,\varphi(u))=0,\qquad u\in U\subseteq\mathbb{R}^{q-1}, x = Φ ( u ) = ( u , φ ( u )) , h ( u , φ ( u )) = 0 , u ∈ U ⊆ R q − 1 ,
where U U U is open. In particular, the coefficient on this graph is u ↦ A ℓ ( Φ ( u ) ) u\mapsto A_\ell(\Phi(u)) u ↦ A ℓ ( Φ ( u )) . By shrinking U U U , continuity ensures that both ∂ x q h ( Φ ( u ) ) \partial_{x_q}h(\Phi(u)) ∂ x q h ( Φ ( u )) and A ℓ ( Φ ( u ) ) A_\ell(\Phi(u)) A ℓ ( Φ ( u )) remain nonzero throughout U U U . Each difference ( P i − P j ) ∘ Φ (P_i-P_j)\circ\Phi ( P i − P j ) ∘ Φ is nonconstant on every open subset of U U U : otherwise analytic continuation on the connected patch M \mathcal{M} M would make P i − P j P_i-P_j P i − P j constant throughout M \mathcal{M} M . Its gradient is therefore nonzero on an open dense subset of U U U . There are only finitely many differences, so we can choose u 0 ∈ U u_0\in U u 0 ∈ U where all these gradients are nonzero and A ℓ ( Φ ( u 0 ) ) ≠ 0 A_\ell(\Phi(u_0))\ne0 A ℓ ( Φ ( u 0 )) = 0 . Choose a direction v v v such that
∇ ( ( P i − P j ) ∘ Φ ) ( u 0 ) ⋅ v ≠ 0 ( i ≠ j ) . \nabla\bigl((P_i-P_j)\circ\Phi\bigr)(u_0)\cdot v\ne0\qquad(i\ne j). ∇ ( ( P i − P j ) ∘ Φ ) ( u 0 ) ⋅ v = 0 ( i = j ) .
The forbidden directions lie in finitely many proper linear hyperplanes, which cannot cover R q − 1 \mathbb{R}^{q-1} R q − 1 .
For sufficiently small t t t , set x ( t ) = Φ ( u 0 + t v ) x(t)=\Phi(u_0+tv) x ( t ) = Φ ( u 0 + t v ) . Its first q − 1 q-1 q − 1 coordinates are affine functions of t t t . Its last coordinate satisfies the polynomial equation
h ( u 0 + t v , x q ( t ) ) = 0. h(u_0+tv,x_q(t))=0. h ( u 0 + t v , x q ( t )) = 0.
This equation is nonzero as a polynomial in ( t , x q ) (t,x_q) ( t , x q ) , because ∂ x q h \partial_{x_q}h ∂ x q h is nonzero at the starting point. Thus all coordinates of x ( t ) x(t) x ( t ) are algebraic functions of t t t , and so are f j ( t ) = P j ( x ( t ) ) f_j(t)=P_j(x(t)) f j ( t ) = P j ( x ( t )) and a j ( t ) = A j ( x ( t ) ) a_j(t)=A_j(x(t)) a j ( t ) = A j ( x ( t )) . Our choice of v v v ensures ( f i − f j ) ′ ( 0 ) ≠ 0 (f_i-f_j)'(0)\ne0 ( f i − f j ) ′ ( 0 ) = 0 , while a ℓ ( 0 ) ≠ 0 a_\ell(0)\ne0 a ℓ ( 0 ) = 0 . Restricting the assumed identity gives
∑ j a j ( t ) e f j ( t ) = 0 , \sum_j a_j(t)e^{f_j(t)}=0, j ∑ a j ( t ) e f j ( t ) = 0 ,
contradicting the one-variable independence just proved. □
Lemma L.4 (No algebraic hypersurface barrier). Under conditions 1, 2, and 3 of Section L.2, put D = N n d D=Nnd D = N n d and write X = ( x i a ) a , i ∈ R D X=(x^{a}_{i})_{a,i}\in\mathbb{R}^{D} X = ( x i a ) a , i ∈ R D for the batch. There do not exist a nonconstant real polynomial h h h in these D D D scalar coordinates and a nonempty connected relatively open subset M \mathcal{M} M of
{ X ∈ B N , n , d : h ( X ) = 0 , ∇ h ( X ) ≠ 0 } \{X\in B_{N,n,d}:h(X)=0,\ \nabla h(X)\ne0\} { X ∈ B N , n , d : h ( X ) = 0 , ∇ h ( X ) = 0 } such that both batch attention fields are tangent to M \mathcal{M} M at every point.
Proof. Suppose that such a polynomial h h h and set M \mathcal{M} M exist. Thus h = 0 h=0 h = 0 is a polynomial equation for the hypothetical hypersurface, and M \mathcal{M} M is a local portion of this hypersurface, called a patch.
Step 1: Polynomial divisibility on M \mathcal{M} M . After shrinking M \mathcal{M} M , we may assume that h h h is irreducible over R \mathbb{R} R . Indeed, factor h h h and fix a point of M \mathcal{M} M . Since ∇ h ≠ 0 \nabla h\ne0 ∇ h = 0 there, exactly one irreducible factor vanishes at that point, with multiplicity one. The other factors remain nonzero in a sufficiently small neighborhood. Replacing h h h by the vanishing factor and restricting M \mathcal{M} M to a connected portion of this neighborhood preserves the hypersurface and its tangent spaces.
We will use the following polynomial divisibility fact: if a real polynomial F F F vanishes on M \mathcal{M} M , then h h h divides F F F . Fix a point p ∈ M p\in\mathcal{M} p ∈ M . Since ∇ h ( p ) ≠ 0 \nabla h(p)\ne0 ∇ h ( p ) = 0 , we can relabel the coordinates as ( u , y ) ∈ R D − 1 × R (u,y) \in\mathbb{R}^{D-1} \times\mathbb{R} ( u , y ) ∈ R D − 1 × R so that ∂ y h ( p ) ≠ 0 \partial_y h(p) \ne0 ∂ y h ( p ) = 0 . The implicit function theorem gives a local parametrization X = ( u , φ ( u ) ) X=(u,\varphi(u)) X = ( u , φ ( u )) of M \mathcal{M} M , where u u u ranges over a nonempty open set U ⊆ R D − 1 U \subseteq\mathbb{R}^{D-1} U ⊆ R D − 1 . On this graph,
h ( u , φ ( u ) ) = F ( u , φ ( u ) ) = 0 for every u ∈ U . h(u,\varphi(u))=F(u,\varphi(u))=0 \qquad\text{for every }u\in U. h ( u , φ ( u )) = F ( u , φ ( u )) = 0 for every u ∈ U .
Suppose that h h h does not divide F F F . Regard both polynomials as polynomials in the single variable y y y , and allow their coefficients to be rational functions of u = ( u 1 , … , u D − 1 ) u=(u_1,\ldots,u_{D-1}) u = ( u 1 , … , u D − 1 ) . These coefficients form the field K = R ( u 1 , … , u D − 1 ) K=\mathbb{R}(u_1,\ldots,u_{D-1}) K = R ( u 1 , … , u D − 1 ) . The condition ∂ y h ( p ) ≠ 0 \partial_y h(p)\ne0 ∂ y h ( p ) = 0 ensures that h h h has positive degree in y y y . Moreover, its coefficients in R [ u ] \mathbb{R}[u] R [ u ] have no common nonconstant factor, since such a factor would contradict the irreducibility of h h h in R [ u , y ] \mathbb{R}[u,y] R [ u , y ] . Gauss’s lemma therefore implies that h h h remains irreducible in K [ y ] K[y] K [ y ] , and that divisibility by h h h of a polynomial F ∈ R [ u , y ] F\in\mathbb{R}[u,y] F ∈ R [ u , y ] is the same in these two polynomial rings. Thus h h h does not divide F F F in K [ y ] K[y] K [ y ] either, so their greatest common divisor in K [ y ] K[y] K [ y ] is 1 1 1 .
The Euclidean algorithm for polynomials in one variable over a field now gives a Bézout identity
B ~ ( u , y ) h ( u , y ) + C ~ ( u , y ) F ( u , y ) = 1 , B ~ , C ~ ∈ K [ y ] . \widetilde{B}(u,y)h(u,y)+\widetilde{C}(u,y)F(u,y)=1,\qquad\widetilde{B},\widetilde{C}\in K[y]. B ( u , y ) h ( u , y ) + C ( u , y ) F ( u , y ) = 1 , B , C ∈ K [ y ] .
Choose a nonzero polynomial c ( u ) c(u) c ( u ) that is a common denominator of the finitely many rational coefficients of B ~ \widetilde{B} B and C ~ \widetilde{C} C . Multiplying by c ( u ) c(u) c ( u ) gives B = c B ~ B=c\widetilde{B} B = c B and C = c C ~ C=c\widetilde{C} C = c C in R [ u , y ] \mathbb{R}[u,y] R [ u , y ] , and hence the polynomial identity
B ( u , y ) h ( u , y ) + C ( u , y ) F ( u , y ) = c ( u ) , c ≠ 0. B(u,y)h(u,y)+C(u,y)F(u,y)=c(u),\qquad c\ne0. B ( u , y ) h ( u , y ) + C ( u , y ) F ( u , y ) = c ( u ) , c = 0.
This identity is valid for every ( u , y ) (u,y) ( u , y ) , including points where c ( u ) = 0 c(u)=0 c ( u ) = 0 . Substituting y = φ ( u ) y=\varphi(u) y = φ ( u ) makes both terms on the left zero, so c ( u ) = 0 c(u)=0 c ( u ) = 0 for every u ∈ U u\in U u ∈ U . A real polynomial vanishing on a nonempty open set is the zero polynomial: one can apply the corresponding one-variable fact successively to each coordinate on an open box contained in U U U . This contradicts the choice c ≠ 0 c\ne0 c = 0 and proves that h h h divides F F F .
Step 2: At least one generator is resonant. Since T X M = ker d h X T_X\mathcal{M}=\ker dh_X T X M = ker d h X , the assumed tangency of the two batch fields means precisely
d h X [ f r ( N ) ( X ) ] = ∑ a = 1 N ∑ i = 1 n ∂ x i a h ( X ) ⋅ f r , i ( N ) ( X ) a = 0 , X ∈ M , r = 1 , 2 , dh_X\left[f_r^{(N)}(X)\right]=\sum_{a=1}^{N}\sum_{i=1}^{n}\partial_{x_i^a}h(X)\cdot f_{r,i}^{(N)}(X)^a=0,\qquad X\in\mathcal{M},\quad r=1,2, d h X [ f r ( N ) ( X ) ] = a = 1 ∑ N i = 1 ∑ n ∂ x i a h ( X ) ⋅ f r , i ( N ) ( X ) a = 0 , X ∈ M , r = 1 , 2 ,
where ∂ x i a h ∈ R d \partial_{x_i^a}h\in\mathbb{R}^d ∂ x i a h ∈ R d is the gradient with respect to the coordinates of token x i a x_i^a x i a . For one generator ( W , V ) (W,V) ( W , V ) , fix X ∈ M X\in\mathcal{M} X ∈ M and write
s a , i , j = ( x j a ) ⊤ W x i a , Z a , i = ∑ j = 1 n e s a , i , j , b a , i , j = ( V x j a ) ⋅ ∂ x i a h ( X ) . s_{a,i,j}=(x_j^a)^\top W x_i^a,\qquad Z_{a,i}=\sum_{j=1}^{n}e^{s_{a,i,j}},\qquad b_{a,i,j}=(Vx_j^a)\cdot\partial_{x_i^a}h(X). s a , i , j = ( x j a ) ⊤ W x i a , Z a , i = j = 1 ∑ n e s a , i , j , b a , i , j = ( V x j a ) ⋅ ∂ x i a h ( X ) .
The tangency equation is
0 = ∑ a , i ∑ j b a , i , j e s a , i , j Z a , i . 0=\sum_{a,i}\frac{\sum_j b_{a,i,j}e^{s_{a,i,j}}}{Z_{a,i}}. 0 = a , i ∑ Z a , i ∑ j b a , i , j e s a , i , j .
Each Z a , i Z_{a,i} Z a , i is positive. Multiplying by ∏ a , i Z a , i \prod_{a,i}Z_{a,i} ∏ a , i Z a , i cancels the denominator in each summand, giving
0 = ∑ a , i ( ∑ j b a , i , j e s a , i , j ) ∏ ( b , k ) ≠ ( a , i ) ( ∑ ℓ e s b , k , ℓ ) . 0=\sum_{a,i}\left(\sum_j b_{a,i,j}e^{s_{a,i,j}}\right)\prod_{(b,k)\ne(a,i)}\left(\sum_\ell e^{s_{b,k,\ell}}\right). 0 = a , i ∑ ( j ∑ b a , i , j e s a , i , j ) ( b , k ) = ( a , i ) ∏ ( ℓ ∑ e s b , k , ℓ ) .
Expanding the products amounts to choosing one key index for each token position. Such a choice is a map σ : { 1 , … , N } × { 1 , … , n } → { 1 , … , n } \sigma:\{1,\ldots,N\}\times\{1,\ldots,n\}\to\{1,\ldots,n\} σ : { 1 , … , N } × { 1 , … , n } → { 1 , … , n } , where σ ( a , i ) \sigma(a,i) σ ( a , i ) selects a key in sequence a a a ; different token positions may select the same key. For a fixed σ \sigma σ , every summand has the common exponential factor ∏ a , i e s a , i , σ ( a , i ) = e ∑ a , i s a , i , σ ( a , i ) \prod_{a,i}e^{s_{a,i,\sigma(a,i)}}=e^{\sum_{a,i}s_{a,i,\sigma(a,i)}} ∏ a , i e s a , i , σ ( a , i ) = e ∑ a , i s a , i , σ ( a , i ) . Summing over the distinguished token position ( a , i ) (a,i) ( a , i ) adds the coefficients b a , i , σ ( a , i ) b_{a,i,\sigma(a,i)} b a , i , σ ( a , i ) . Thus we obtain
∑ σ e P σ ( X ) A σ ( X ) = 0 on M , (43) \sum_{\sigma}e^{P_\sigma(X)}A_\sigma(X)=0\qquad\text{on }\mathcal{M}, \tag*{(43)} σ ∑ e P σ ( X ) A σ ( X ) = 0 on M , (43)
where
P σ = ∑ a , i ( x σ ( a , i ) a ) ⊤ W x i a , A σ = ∑ a , i ( V x σ ( a , i ) a ) ⋅ ∂ x i a h . P_\sigma=\sum_{a,i}(x^{a}_{\sigma(a,i)})^\top W x_i^a,\qquad A_\sigma=\sum_{a,i}(Vx^{a}_{\sigma(a,i)})\cdot\partial_{x_i^a}h. P σ = a , i ∑ ( x σ ( a , i ) a ) ⊤ W x i a , A σ = a , i ∑ ( V x σ ( a , i ) a ) ⋅ ∂ x i a h .
Call the generator nonresonant on M \mathcal{M} M if every difference P σ − P τ P_\sigma-P_\tau P σ − P τ , σ ≠ τ \sigma\ne\tau σ = τ , is nonconstant on M \mathcal{M} M . We first suppose that both generators are nonresonant on M \mathcal{M} M . We will show that T X M = R D T_X\mathcal{M}=\mathbb{R}^D T X M = R D for every X ∈ M X\in\mathcal{M} X ∈ M , contradicting the fact that M \mathcal{M} M is a hypersurface of dimension D − 1 D-1 D − 1 .
For either generator ( W , V ) (W,V) ( W , V ) , Lemma L.3 applies to (43) and gives A σ = 0 A_\sigma=0 A σ = 0 on M \mathcal{M} M for every σ \sigma σ . Let L V L_V L V denote the linear batch field defined by ( L V ( X ) ) i a = V x i a (L_V(X))_i^a=Vx_i^a ( L V ( X ) ) i a = V x i a , which applies the same matrix V V V to every token. Taking σ ( a , i ) = i \sigma(a,i)=i σ ( a , i ) = i for every token position gives
A σ ( X ) = ∑ a , i ( V x i a ) ⋅ ∂ x i a h ( X ) = d h X [ L V ( X ) ] = 0 on M . A_\sigma(X)=\sum_{a,i}(Vx_i^a)\cdot\partial_{x_i^a}h(X)=dh_X[L_V(X)]=0\qquad\text{on }\mathcal{M}. A σ ( X ) = a , i ∑ ( V x i a ) ⋅ ∂ x i a h ( X ) = d h X [ L V ( X )] = 0 on M .
Hence L V L_V L V is tangent to M \mathcal{M} M .
Now take two of the identities A σ = A τ = 0 A_\sigma=A_\tau=0 A σ = A τ = 0 whose index maps agree at every token position except ( a , i ) (a,i) ( a , i ) , where σ ( a , i ) = j \sigma(a,i)=j σ ( a , i ) = j and τ ( a , i ) = k \tau(a,i)=k τ ( a , i ) = k . Keeping the same X X X , W W W , and V V V , subtracting these identities gives
0 = A σ ( X ) − A τ ( X ) = V ( x j a − x k a ) ⋅ ∂ x i a h ( X ) . 0=A_\sigma(X)-A_\tau(X)=V(x_j^a-x_k^a)\cdot\partial_{x_i^a}h(X). 0 = A σ ( X ) − A τ ( X ) = V ( x j a − x k a ) ⋅ ∂ x i a h ( X ) .
Thus the vector in R D \mathbb{R}^D R D with component V ( x j a − x k a ) V(x_j^a-x_k^a) V ( x j a − x k a ) at position ( a , i ) (a,i) ( a , i ) and zero at every other position belongs to T X M T_X\mathcal{M} T X M . Since this holds for every X ∈ M X\in\mathcal{M} X ∈ M , the corresponding linear field is tangent to M \mathcal{M} M .
Fix a , i , j , k a,i,j,k a , i , j , k . We have obtained tangent linear fields whose only nonzero component is B ( x j a − x k a ) B(x_j^a-x_k^a) B ( x j a − x k a ) at position ( a , i ) (a,i) ( a , i ) , for B = V 1 B=V_1 B = V 1 and B = V 2 B=V_2 B = V 2 . The fields L V 1 L_{V_1} L V 1 and L V 2 L_{V_2} L V 2 are also tangent to M \mathcal{M} M . Taking the bracket of L V r L_{V_r} L V r with such a field, for r = 1 , 2 r=1,2 r = 1 , 2 , gives a field of the same form, with B B B replaced by B V r − V r B BV_r-V_rB B V r − V r B . Since linear combinations and Lie brackets preserve tangency, repeating these operations gives tangent fields for all matrices in the linear span of nested commutators of V 1 , V 2 V_1,V_2 V 1 , V 2 , including the generators themselves. This span is Lie m a t ( V 1 , V 2 ) \operatorname{Lie}_{\mathrm{mat}}(V_1,V_2) Lie mat ( V 1 , V 2 ) , which equals g l d ( R ) \mathfrak{gl}_d(\mathbb{R}) gl d ( R ) by condition 1 of Section L.2. Choose j ≠ k j\ne k j = k . Since the tokens within each sequence are distinct, v = x j a − x k a ≠ 0 v=x_j^a-x_k^a\ne0 v = x j a − x k a = 0 , and { B v : B ∈ g l d ( R ) } = R d \{Bv:B\in\mathfrak{gl}_d(\mathbb{R})\}=\mathbb{R}^d { B v : B ∈ gl d ( R )} = R d . Consequently, T X M T_X\mathcal{M} T X M contains every vector supported at a single token position. These vectors span R D \mathbb{R}^D R D , contradicting dim T X M = D − 1 \dim T_X\mathcal{M}=D-1 dim T X M = D − 1 .
Consequently, for at least one of the two generators ( W , V ) (W,V) ( W , V ) , there exist distinct index maps σ , τ \sigma,\tau σ , τ and a real constant c c c such that P σ − P τ = c P_\sigma-P_\tau=c P σ − P τ = c on M \mathcal{M} M .
Step 3: At most one generator is resonant. Fix such a generator, such maps, and this constant. Order all M = N n M=Nn M = N n tokens and write the chosen exponent difference as
Q C , W ( X ) : = P σ ( X ) − P τ ( X ) = ∑ r , s = 1 M C r s x r ⊤ W x s = X ⊤ ( C ⊗ W ) X , \begin{aligned}
Q_{C,W}(X):=P_\sigma(X)-P_\tau(X) \\
&=\sum_{r,s=1}^{M}C_{rs}x_r^\top W x_s=X^\top(C\otimes W)X,
\end{aligned} Q C , W ( X ) := P σ ( X ) − P τ ( X ) = r , s = 1 ∑ M C r s x r ⊤ W x s = X ⊤ ( C ⊗ W ) X ,
where C ≠ 0 C\ne0 C = 0 is block diagonal by sequences, with key rows and query columns, and X = ( x 1 ⊤ , … , x M ⊤ ) ⊤ X=(x_1^\top,\ldots,x_M^\top)^\top X = ( x 1 ⊤ , … , x M ⊤ ) ⊤ . By construction,
Q C , W ( X ) = P σ ( X ) − P τ ( X ) = c for every X ∈ M . Q_{C,W}(X)=P_\sigma(X)-P_\tau(X)=c\qquad\text{for every }X\in\mathcal{M}. Q C , W ( X ) = P σ ( X ) − P τ ( X ) = c for every X ∈ M .
Let H = H ⊤ H=H^\top H = H ⊤ be the symmetric matrix representing this quadratic form, so that
Q C , W ( X ) = X ⊤ H X . Q_{C,W}(X)=X^\top HX. Q C , W ( X ) = X ⊤ H X .
A matrix and its symmetric part define the same quadratic form. Thus, writing S = ( W + W ⊤ ) / 2 S=(W+W^\top)/2 S = ( W + W ⊤ ) /2 and K = ( W − W ⊤ ) / 2 K=(W-W^\top)/2 K = ( W − W ⊤ ) /2 , we obtain
H = C ⊗ W + C ⊤ ⊗ W ⊤ 2 = sym ( C ) ⊗ S + skew ( C ) ⊗ K . (44) H=\frac{C\otimes W+C^\top\otimes W^\top}{2}=\operatorname{sym}(C)\otimes S+\operatorname{skew}(C)\otimes K. \tag*{(44)} H = 2 C ⊗ W + C ⊤ ⊗ W ⊤ = sym ( C ) ⊗ S + skew ( C ) ⊗ K . (44)
If sym ( C ) ≠ 0 \operatorname{sym}(C)\ne0 sym ( C ) = 0 , choose a fixed t = ( t 1 , … , t M ) ∈ R M t=(t_1,\ldots,t_M)\in\mathbb{R}^M t = ( t 1 , … , t M ) ∈ R M with t ⊤ C t ≠ 0 t^\top Ct\ne0 t ⊤ C t = 0 . Restrict Q C , W Q_{C,W} Q C , W to the linear subspace X = ( t 1 z , … , t M z ) X=(t_1z,\ldots,t_Mz) X = ( t 1 z , … , t M z ) , with z ∈ R d z\in\mathbb{R}^d z ∈ R d variable: each token x r x_r x r is replaced by the scalar multiple t r z t_rz t r z of the same vector z z z . Substitution gives
Q C , W ( t 1 z , … , t M z ) = ∑ r , s C r s t r t s z ⊤ W z = ( t ⊤ C t ) z ⊤ S z . Q_{C,W}(t_1z,\ldots,t_Mz)=\sum_{r,s}C_{rs}t_rt_s z^\top Wz=(t^\top Ct)z^\top Sz. Q C , W ( t 1 z , … , t M z ) = r , s ∑ C r s t r t s z ⊤ W z = ( t ⊤ C t ) z ⊤ S z .
This restricted quadratic form has matrix ( t ⊤ C t ) S (t^{\top}Ct)S ( t ⊤ C t ) S , of rank d d d because t ⊤ C t ≠ 0 t^{\top}Ct \ne0 t ⊤ C t = 0 and S S S is invertible. Restriction to a linear subspace cannot increase the rank of a quadratic form, so rank ( H ) ≥ d > 2 \operatorname{rank}(H) \ge d > 2 rank ( H ) ≥ d > 2 . This is an algebraic restriction of the polynomial; the substituted configurations need not belong to M \mathcal{M} M or to B N , n , d \mathcal{B}_{N,n,d} B N , n , d . If sym ( C ) = 0 \operatorname{sym}(C)=0 sym ( C ) = 0 , then C C C is skew and rank ( H ) = rank ( C ) rank ( K ) ≥ 4 > 2 \operatorname{rank}(H)=\operatorname{rank}(C)\operatorname{rank}(K) \ge4 > 2 rank ( H ) = rank ( C ) rank ( K ) ≥ 4 > 2 . That means that in any case: rank ( H ) > 2 \operatorname{rank}(H)>2 rank ( H ) > 2 . Thus Q C , W − c Q_{C,W}-c Q C , W − c is irreducible over C \mathbb{C} C for every constant c c c : a product of two affine linear factors would have quadratic part of rank at most two. Since Q C , W − c Q_{C,W}-c Q C , W − c vanishes on M \mathcal{M} M by construction, the divisibility fact above gives h ∣ Q C , W − c h \mid Q_{C,W}-c h ∣ Q C , W − c , so irreducibility forces h h h to be proportional to Q C , W − c Q_{C,W}-c Q C , W − c .
Suppose now that both generators are resonant on M \mathcal{M} M . Their index pairs may differ, giving coefficient matrices C 1 , C 2 ≠ 0 C_1,C_2 \ne0 C 1 , C 2 = 0 and constants c 1 , c 2 c_1,c_2 c 1 , c 2 . By the preceding argument, both Q C 1 , W 1 − c 1 Q_{C_1,W_1}-c_1 Q C 1 , W 1 − c 1 and Q C 2 , W 2 − c 2 Q_{C_2,W_2}-c_2 Q C 2 , W 2 − c 2 are proportional to the same polynomial h h h . Hence, for some λ ∈ R ∖ { 0 } \lambda\in\mathbb{R}\setminus\{0\} λ ∈ R ∖ { 0 } ,
Q C 1 , W 1 − c 1 = λ ( Q C 2 , W 2 − c 2 ) . Q_{C_1,W_1}-c_1=\lambda(Q_{C_2,W_2}-c_2). Q C 1 , W 1 − c 1 = λ ( Q C 2 , W 2 − c 2 ) .
Comparing the terms of degree two gives
Q C 1 , W 1 = λ Q C 2 , W 2 , H 1 = λ H 2 . Q_{C_1,W_1}=\lambda Q_{C_2,W_2}, \qquad H_1=\lambda H_2. Q C 1 , W 1 = λ Q C 2 , W 2 , H 1 = λ H 2 .
where H r H_r H r is the symmetric matrix representing Q C r , W r Q_{C_r,W_r} Q C r , W r . The decomposition in (44) then forces either S 1 , S 2 S_1,S_2 S 1 , S 2 or K 1 , K 2 K_1,K_2 K 1 , K 2 to be proportional, contradicting condition 2 of Section L.2.
Step 4: Excluding the remaining case. Thus exactly one generator is resonant; denote it by r r r and the nonresonant generator by s s s . Applying the nonresonance argument to generator s s s and choosing σ ( a , i ) = i \sigma(a,i)=i σ ( a , i ) = i shows that L V s L_{V_s} L V s is tangent to M \mathcal{M} M . After multiplying h h h by a nonzero constant, we may write h = Q C , W r − c h=Q_{C,W_r}-c h = Q C , W r − c . Tangency means that the polynomial F ( X ) : = d h X [ L V s ( X ) ] F(X):=dh_X[L_{V_s}(X)] F ( X ) := d h X [ L V s ( X )] vanishes on M \mathcal{M} M . Since L V s L_{V_s} L V s applies V s V_s V s to every token, differentiating each quadratic term in both token variables gives
F ( X ) = ∑ p , q C p q [ ( V s x p ) ⊤ W r x q + x p ⊤ W r ( V s x q ) ] = Q C , V s ⊤ W r + W r V s ( X ) . \begin{aligned}
F(X)&=\sum_{p,q}C_{pq}\left[(V_sx_p)^{\top}W_rx_q+x_p^{\top}W_r(V_sx_q)\right]\\
&=Q_{C,V_s^{\top}W_r+W_rV_s}(X).
\end{aligned} F ( X ) = p , q ∑ C pq [ ( V s x p ) ⊤ W r x q + x p ⊤ W r ( V s x q ) ] = Q C , V s ⊤ W r + W r V s ( X ) .
The divisibility fact gives h ∣ F h \mid F h ∣ F . As h h h has degree two and F F F has degree at most two, the quotient is a scalar:
F = γ h = γ ( Q C , W r − c ) , γ ∈ R . F=\gamma h=\gamma(Q_{C,W_r}-c), \qquad\gamma\in\mathbb{R}. F = γ h = γ ( Q C , W r − c ) , γ ∈ R .
Comparing the terms of degree two therefore yields
Q C , V s ⊤ W r + W r V s = γ Q C , W r Q_{C,V_s^{\top}W_r+W_rV_s}=\gamma Q_{C,W_r} Q C , V s ⊤ W r + W r V s = γ Q C , W r
(the constant terms also give γ c = 0 \gamma c=0 γ c = 0 ).
The symmetric and skew-symmetric parts of V s ⊤ W r + W r V s V_s^{\top}W_r+W_rV_s V s ⊤ W r + W r V s are respectively V s ⊤ S r + S r V s V_s^{\top}S_r+S_rV_s V s ⊤ S r + S r V s and V s ⊤ K r + K r V s V_s^{\top}K_r+K_rV_s V s ⊤ K r + K r V s . Using (44) and separating the symmetric and skew-symmetric factors in the token indices therefore gives
sym ( C ) ⊗ ( V s ⊤ S r + S r V s − γ S r ) = 0 , \operatorname{sym}(C)\otimes(V_s^{\top}S_r+S_rV_s-\gamma S_r)=0, sym ( C ) ⊗ ( V s ⊤ S r + S r V s − γ S r ) = 0 ,
skew ( C ) ⊗ ( V s ⊤ K r + K r V s − γ K r ) = 0. \operatorname{skew}(C)\otimes(V_s^{\top}K_r+K_rV_s-\gamma K_r)=0. skew ( C ) ⊗ ( V s ⊤ K r + K r V s − γ K r ) = 0.
If sym ( C ) ≠ 0 \operatorname{sym}(C)\ne0 sym ( C ) = 0 , the first identity implies V s ⊤ S r + S r V s = γ S r V_s^{\top}S_r+S_rV_s=\gamma S_r V s ⊤ S r + S r V s = γ S r . Otherwise skew ( C ) = C ≠ 0 \operatorname{skew}(C)=C\ne0 skew ( C ) = C = 0 , and the second implies V s ⊤ K r + K r V s = γ K r V_s^{\top}K_r+K_rV_s=\gamma K_r V s ⊤ K r + K r V s = γ K r . Either relation contradicts condition 3 of Section L.2, namely (41). □
Polynomial lifts and common invariant divisors
Some notations and background. Write X = ( x 1 , … , x D ) ∈ C D X=(x_1,\ldots,x_D)\in\mathbb{C}^D X = ( x 1 , … , x D ) ∈ C D for the complexified batch. Enumerate the p = 2 N n 2 p=2Nn^2 p = 2 N n 2 score quadratics in (42) as Q 1 , … , Q p Q_1,\ldots,Q_p Q 1 , … , Q p . For each Q ν Q_\nu Q ν , introduce a formal variable z ν z_\nu z ν representing the exponential e Q ν ( X ) e^{Q_\nu(X)} e Q ν ( X ) . In the algebraic calculations, the z ν z_\nu z ν are algebraically independent of one another and of the state coordinates: the relation z ν = e Q ν ( X ) z_\nu=e^{Q_\nu(X)} z ν = e Q ν ( X ) is imposed only when evaluating the resulting expressions at the original exponential functions.
Since exponentials never vanish, we also allow inverses of these variables and work in the Laurent polynomial ring
A = C [ x 1 , … , x D , z 1 ± 1 , … , z p ± 1 ] , A=\mathbb{C}[x_1,\ldots,x_D,z_1^{\pm1},\ldots,z_p^{\pm1}], A = C [ x 1 , … , x D , z 1 ± 1 , … , z p ± 1 ] ,
where z ν ± 1 z_\nu^{\pm1} z ν ± 1 means that both z ν z_\nu z ν and its inverse z ν − 1 = 1 / z ν z_\nu^{-1}=1/z_\nu z ν − 1 = 1/ z ν are allowed. Thus an element of A A A has the form
P ( X , z ) = ∑ β ∈ Z p p β ( X ) z β , z β = ∏ ν = 1 p z ν β ν , P(X,z)=\sum_{\beta\in\mathbb{Z}^p}p_\beta(X)z^\beta,\qquad z^\beta=\prod_{\nu=1}^{p}z_\nu^{\beta_\nu}, P ( X , z ) = β ∈ Z p ∑ p β ( X ) z β , z β = ν = 1 ∏ p z ν β ν ,
with only finitely many nonzero coefficients p β ∈ C [ X ] = C [ x 1 , … , x D ] p_\beta\in\mathbb{C}[X]=\mathbb{C}[x_1,\ldots,x_D] p β ∈ C [ X ] = C [ x 1 , … , x D ] . The exponents of the z ν z_\nu z ν may therefore be negative, while the coefficients remain polynomials in the state coordinates.
We also write z r , a , i , j z_{r,a,i,j} z r , a , i , j for the variable corresponding to Q r , a , i , j Q_{r,a,i,j} Q r , a , i , j ; the variables with a fixed r ∈ { 1 , 2 } r\in\{1,2\} r ∈ { 1 , 2 } form that generator’s score block. A single subscript ν ∈ { 1 , … , p } \nu\in\{1,\ldots,p\} ν ∈ { 1 , … , p } enumerates all these variables, and z = ( z ν ) ν = 1 p z=(z_\nu)_{\nu=1}^p z = ( z ν ) ν = 1 p .
For a linear state field L ( X ) = ( L 1 ( X ) , … , L D ( X ) ) L(X)=(L_1(X),\ldots,L_D(X)) L ( X ) = ( L 1 ( X ) , … , L D ( X )) , we also use L L L to denote the associated differential operator: for a polynomial f f f in the state coordinates,
( L f ) ( X ) : = d f X [ L ( X ) ] = ∑ k = 1 D L k ( X ) ∂ f ∂ x k ( X ) . (Lf)(X):=df_X[L(X)]=\sum_{k=1}^{D}L_k(X)\frac{\partial f}{\partial x_k}(X). ( L f ) ( X ) := d f X [ L ( X )] = k = 1 ∑ D L k ( X ) ∂ x k ∂ f ( X ) .
In particular, L Q ν LQ_\nu L Q ν is the derivative of Q ν Q_\nu Q ν in the direction of the field L L L . Define the horizontal lift of L L L by
D L = L + ∑ ν = 1 p z ν ( L Q ν ) ∂ z ν . \mathcal{D}_L=L+\sum_{\nu=1}^{p}z_\nu(LQ_\nu)\partial_{z_\nu}. D L = L + ν = 1 ∑ p z ν ( L Q ν ) ∂ z ν .
For a key choice σ \sigma σ , put z σ = ∏ a , i z r , a , i , σ ( a , i ) z^\sigma=\prod_{a,i}z_{r,a,i,\sigma(a,i)} z σ = ∏ a , i z r , a , i , σ ( a , i ) and ( L r , σ ( X ) ) i a = V r x σ ( a , i ) a (L_{r,\sigma}(X))_i^a=V_r x_{\sigma(a,i)}^a ( L r , σ ( X ) ) i a = V r x σ ( a , i ) a . Multiplying the lifted attention field by the product of its row denominators yields the exact polynomial derivation
δ r = ∑ σ z r σ D L r , σ . (45) \delta_r=\sum_\sigma z_r^\sigma\mathcal{D}_{L_{r,\sigma}}. \tag*{(45)} δ r = σ ∑ z r σ D L r , σ . (45)
Indeed, let F r ( X , z ) F_r(X,z) F r ( X , z ) denote the attention field with each e Q r , a , i , j ( X ) e^{Q_{r,a,i,j}(X)} e Q r , a , i , j ( X ) replaced by z r , a , i , j z_{r,a,i,j} z r , a , i , j , and set H r ( z ) = ∏ a , i ( ∑ j z r , a , i , j ) H_r(z)=\prod_{a,i}(\sum_j z_{r,a,i,j}) H r ( z ) = ∏ a , i ( ∑ j z r , a , i , j ) . Clearing denominators and expanding the product of row sums gives
H r F r = ∑ σ z r σ L r , σ . H_rF_r=\sum_\sigma z_r^\sigma L_{r,\sigma}. H r F r = σ ∑ z r σ L r , σ .
The lift F ↦ F + ∑ ν z ν d Q ν [ F ] ∂ z ν F\mapsto F+\sum_\nu z_\nu dQ_\nu[F]\partial_{z_\nu} F ↦ F + ∑ ν z ν d Q ν [ F ] ∂ z ν is linear in the field components. Applying it to this identity therefore gives (45). The identity key choice σ ( a , i ) = i \sigma(a,i)=i σ ( a , i ) = i gives L r , σ = L V r L_{r,\sigma}=LV_r L r , σ = L V r .
Lemma L.5 (Reduction to a single monomial in z z z ). Suppose the score quadratics are linearly independent and L V 1 , L V 2 LV_1,LV_2 L V 1 , L V 2 are invertible on homogeneous quadratics. If 0 ≠ P ∈ A 0\ne P\in A 0 = P ∈ A satisfies δ r P = B r P \delta_rP=B_rP δ r P = B r P with B r ∈ A B_r\in A B r ∈ A , r = 1 , 2 r=1,2 r = 1 , 2 , then
P = z β p ( X ) P=z^\beta p(X) P = z β p ( X ) for a Laurent monomial z β z^\beta z β and a polynomial p ∈ C [ X ] p\in\mathbb{C}[X] p ∈ C [ X ] .
Proof. Write P = ∑ β p β ( X ) z β P=\sum_\beta p_\beta(X)z^\beta P = ∑ β p β ( X ) z β and Q β = ∑ ν β ν Q ν Q_\beta=\sum_\nu\beta_\nu Q_\nu Q β = ∑ ν β ν Q ν . The horizontal lift preserves each exponent:
D L ( p β z β ) = z β ( L p β + ( L Q β ) p β ) . (46) \mathcal{D}_L(p_\beta z^\beta)=z^\beta\bigl(Lp_\beta+(LQ_\beta)p_\beta\bigr). \tag*{(46)} D L ( p β z β ) = z β ( L p β + ( L Q β ) p β ) . (46)
Step 1: Determine the possible monomials in B r B_r B r . Fix r ∈ { 1 , 2 } r\in\{1,2\} r ∈ { 1 , 2 } and first suppose that B r ≠ 0 B_r\ne0 B r = 0 . We use an elementary property of Laurent polynomials: the smallest and largest exponents of any one variable add under multiplication of nonzero polynomials. The same holds for the smallest and largest sums of exponents over any fixed group of variables. Indeed, group the terms by the exponent or sum in question. The product of the two groups with largest values is nonzero and gives the largest value in the product; the argument for the smallest values is identical.
By (46), every monomial of δ r P \delta_rP δ r P comes from multiplying a monomial of P P P by some z r σ z_r^\sigma z r σ . Such multiplication never decreases any individual exponent. Since δ r P = B r P \delta_rP=B_rP δ r P = B r P , additivity of the smallest exponents implies that every exponent in B r B_r B r is nonnegative. The variables of the other score block do not occur in z r σ z_r^\sigma z r σ : their smallest exponents cannot decrease and their largest exponents cannot increase in δ r P \delta_rP δ r P . Thus their smallest exponents in B r B_r B r are at least zero and their largest at most zero, so they do not occur in B r B_r B r . For each position ( a , i ) (a,i) ( a , i ) , multiplication by z r σ z_r^\sigma z r σ increases the sum of the exponents of z r , a , i , 1 , … , z r , a , i , n z_{r,a,i,1},\ldots,z_{r,a,i,n} z r , a , i , 1 , … , z r , a , i , n by exactly one. The same additivity argument shows that, among the monomials of B r B_r B r , the smallest such sum is at least one and the largest is at most one. Every such sum therefore equals one. As the individual exponents are nonnegative integers, each monomial of B r B_r B r contains exactly one of these variables, to the first power, for every position ( a , i ) (a,i) ( a , i ) . Moreover, (46) increases degree in X X X by at most two. Since this degree adds in nonzero products, deg X B r ≤ 2 \deg_X B_r \le2 deg X B r ≤ 2 . We have proved
B r = ∑ σ b r , σ ( X ) z r σ , deg X b r , σ ≤ 2. (47) B_r=\sum_\sigma b_{r,\sigma}(X)z_r^\sigma,\qquad\deg_X b_{r,\sigma}\le2. \tag*{(47)} B r = σ ∑ b r , σ ( X ) z r σ , deg X b r , σ ≤ 2. (47)
If B r = 0 B_r=0 B r = 0 , the same formula holds with all coefficients zero.
Step 2: Compare a monomial of largest weight. Assign a real weight w ν w_\nu w ν to each variable z ν z_\nu z ν , so that the weight of z β z^\beta z β is w ⋅ β = ∑ ν w ν β ν w\cdot\beta=\sum_\nu w_\nu\beta_\nu w ⋅ β = ∑ ν w ν β ν . Choose weights satisfying
w r , a , i , i > w r , a , i , j for every a , i and j ≠ i . w_{r,a,i,i}>w_{r,a,i,j}\qquad\text{for every }a,i\text{ and }j\ne i. w r , a , i , i > w r , a , i , j for every a , i and j = i .
Then z id z^{\operatorname{id}} z id , where id ( a , i ) = i \operatorname{id}(a,i)=i id ( a , i ) = i , has strictly larger weight than every other z σ z^\sigma z σ . The weights in the other score block are unrestricted. We may also choose the weights so that distinct monomials of P P P have different weights: ties require one of finitely many equalities w ⋅ ( α − β ) = 0 w\cdot(\alpha-\beta)=0 w ⋅ ( α − β ) = 0 , which an arbitrarily small perturbation avoids while preserving the strict inequalities.
Let β \beta β be the exponent of the monomial of P P P with largest weight. In δ r P = B r P \delta_rP=B_rP δ r P = B r P , the coefficient of z β z id z^\beta z^{\operatorname{id}} z β z id can only come from this monomial of P P P and the identity choice: every other pair has smaller total weight. Comparing this coefficient gives
L V r p β + ( L V r Q β − b r , id ) p β = 0. L_{V_r}p_\beta+(L_{V_r}Q_\beta-b_{r,\operatorname{id}})p_\beta=0. L V r p β + ( L V r Q β − b r , id ) p β = 0.
Since L V r p β L_{V_r}p_\beta L V r p β has degree at most deg X p β \deg_Xp_\beta deg X p β , comparison at degree deg X p β + 2 \deg_Xp_\beta+2 deg X p β + 2 , followed by cancelling the nonzero homogeneous part of highest degree of p β p_\beta p β , gives
L V r Q β = ( b r , id ) [ 2 ] , (48) L_{V_r}Q_\beta=(b_{r,\operatorname{id}})_{[2]}, \tag*{(48)} L V r Q β = ( b r , id ) [ 2 ] , (48)
where [ 2 ] [2] [ 2 ] denotes the homogeneous quadratic part. The right side does not depend on the weights. Invertibility of L V r L_{V_r} L V r on homogeneous quadratics therefore determines Q β Q_\beta Q β uniquely, and linear independence of the Q ν Q_\nu Q ν determines β \beta β uniquely. For this fixed r r r , the same exponent, denoted by β ∗ \beta_* β ∗ , thus has largest weight for every such choice without ties.
Step 3: Show that all monomials have the same exponent. Every weight vector satisfying the strict inequalities above can be approximated by choices without ties. Passing to the limit gives w ⋅ ( α − β ∗ ) ≤ 0 w\cdot(\alpha-\beta_*)\le0 w ⋅ ( α − β ∗ ) ≤ 0 for every exponent α \alpha α appearing in P P P and every such weight vector. Split the weights and exponents into their two score blocks. Fix any weights w r w_r w r satisfying the strict inequalities and let w 3 − r w_{3-r} w 3 − r vary freely. We obtain
w r ⋅ ( α r − β ∗ , r ) + w 3 − r ⋅ ( α 3 − r − β ∗ , 3 − r ) ≤ 0 for every w 3 − r . w_r\cdot(\alpha_r-\beta_{*,r})+w_{3-r}\cdot(\alpha_{3-r}-\beta_{*,3-r})\le0\qquad\text{for every }w_{3-r}. w r ⋅ ( α r − β ∗ , r ) + w 3 − r ⋅ ( α 3 − r − β ∗ , 3 − r ) ≤ 0 for every w 3 − r .
If α 3 − r − β ∗ , 3 − r ≠ 0 \alpha_{3-r}-\beta_{*,3-r}\ne0 α 3 − r − β ∗ , 3 − r = 0 , taking w 3 − r = t ( α 3 − r − β ∗ , 3 − r ) w_{3-r}=t(\alpha_{3-r}-\beta_{*,3-r}) w 3 − r = t ( α 3 − r − β ∗ , 3 − r ) and letting t → + ∞ t\to+\infty t → + ∞ contradicts this inequality. Hence every exponent appearing in P P P has the same coordinates in block 3 − r 3-r 3 − r . Applying the argument for r = 1 r=1 r = 1 and r = 2 r=2 r = 2 shows that all exponents coincide. Thus P = z β p ( X ) P=z^\beta p(X) P = z β p ( X ) , as claimed. □
Analytic hypersurfaces and the Ax–Schanuel theorem
For functions f 1 , … , f ℓ f_1,\ldots,f_\ell f 1 , … , f ℓ , the notation C ( f 1 , … , f ℓ ) \mathbb{C}(f_1,\ldots,f_\ell) C ( f 1 , … , f ℓ ) denotes the field of rational expressions in these functions with complex coefficients. Its transcendence degree , denoted by trdeg C C ( f 1 , … , f ℓ ) \operatorname{trdeg}_{\mathbb{C}}\mathbb{C}(f_1,\ldots,f_\ell) trdeg C C ( f 1 , … , f ℓ ) , is the largest number of these functions that are algebraically independent : no nonzero polynomial with complex coefficients vanishes identically when evaluated on them. For example, trdeg C C ( t , t 2 ) = 1 \operatorname{trdeg}_{\mathbb{C}}\mathbb{C}(t,t^2)=1 trdeg C C ( t , t 2 ) = 1 , since t 2 t^2 t 2 is already a polynomial in t t t .
We use the following theorem for complex-analytic functions.
Theorem L.6 (Ax–Schanuel; Ax, [5 ] ). Let g 1 , … , g s g_1,\ldots,g_s g 1 , … , g s be complex-analytic functions on a connected open neighborhood U ⊆ C m U\subseteq\mathbb{C}^m U ⊆ C m of the origin. Suppose they are linearly independent over Q \mathbb{Q} Q modulo constants: if ∑ i q i g i \sum_i q_i g_i ∑ i q i g i is constant on U U U , with q i ∈ Q q_i\in\mathbb{Q} q i ∈ Q , then every q i q_i q i is zero. Then
trdeg C C ( g 1 , … , g s , e g 1 , … , e g s ) ≥ s + max t ∈ U rank ( ∂ g i ∂ t j ( t ) ) . \operatorname{trdeg}_{\mathbb{C}}\mathbb{C}(g_1,\ldots,g_s,e^{g_1},\ldots,e^{g_s})\ge s+\max_{t\in U}\operatorname{rank}\left(\frac{\partial g_i}{\partial t_j}(t)\right). trdeg C C ( g 1 , … , g s , e g 1 , … , e g s ) ≥ s + t ∈ U max rank ( ∂ t j ∂ g i ( t ) ) . The rank on the right is the largest rank attained by the Jacobian on $U.
Only the functions on this neighborhood are needed; no extension to all of C m \mathbb{C}^{m} C m is required.
Lemma L.7 (An analytic singular hypersurface gives a lifted divisor). Assume the conditions of § 19 .§ 2 , and suppose a Lie determinant is nonzero at some state. A smooth real-analytic hypersurface patch H ⊆ Σ θ , N , n H \subseteq\Sigma_{\theta,N,n} H ⊆ Σ θ , N , n tangent to both fields would give a nonunit irreducible P ∈ A P \in A P ∈ A satisfying δ r P ∈ ( P ) \delta_rP \in(P) δ r P ∈ ( P ) for r = 1 , 2 r=1,2 r = 1 , 2 . Moreover, no nonzero polynomial with complex coefficients vanishes on any nonempty relatively open subset of H H H .
Proof. Suppose a nonzero real polynomial vanished on a nonempty relatively open subset of H H H . Restrict to a connected open portion. Factoring the polynomial and using the identity theorem for real-analytic functions shows that one real irreducible factor h h h vanishes throughout this portion. The set { h = 0 , ∇ h = 0 } \{h=0,\nabla h=0\} { h = 0 , ∇ h = 0 } has dimension at most D − 2 D-2 D − 2 , so it cannot contain this smooth ( D − 1 ) (D-1) ( D − 1 ) -dimensional portion. Near a point where ∇ h ≠ 0 \nabla h\ne0 ∇ h = 0 , the portion is therefore relatively open in the smooth algebraic hypersurface h = 0 h=0 h = 0 and remains tangent to both fields, contradicting Lemma L.4. Separating real and imaginary parts gives the same conclusion for polynomials with complex coefficients.
Extend a real-analytic local parametrization of H H H to complex parameters using its convergent power series. After restricting the parameter domain, this gives a complex-analytic map X ( t ) = ( x 1 ( t ) , … , x D ( t ) ) X(t)=(x_1(t),\ldots,x_D(t)) X ( t ) = ( x 1 ( t ) , … , x D ( t )) on a connected open neighborhood U ⊆ C D − 1 U\subseteq\mathbb{C}^{D-1} U ⊆ C D − 1 of 0 0 0 , with rank D X ( t ) = D − 1 DX(t)=D-1 D X ( t ) = D − 1 ; its restriction to real parameters parametrizes an open portion of H H H . The image X ( U ) X(U) X ( U ) is Zariski dense in C D \mathbb{C}^{D} C D : this means that the only polynomial in C [ X ] \mathbb{C}[X] C [ X ] vanishing throughout X ( U ) X(U) X ( U ) is the zero polynomial. Indeed, any such identity would also hold on the real portion of H H H , which was just ruled out. Row denominators are nonzero at X ( 0 ) X(0) X ( 0 ) and remain nonzero after shrinking U U U . The tangency identities likewise extend from real to complex parameters by their convergent power series.
Apply Theorem L.6 to the p + D p+D p + D functions
Q 1 ( X ( t ) ) , … , Q p ( X ( t ) ) , x 1 ( t ) , … , x D ( t ) . Q_1(X(t)),\ldots,Q_p(X(t)),x_1(t),\ldots,x_D(t). Q 1 ( X ( t )) , … , Q p ( X ( t )) , x 1 ( t ) , … , x D ( t ) .
They are linearly independent modulo constants even over C \mathbb{C} C : a relation would give a polynomial vanishing on X ( U ) X(U) X ( U ) , hence the zero polynomial. Separating its homogeneous degrees and using independence of the score quadratics forces every coefficient to vanish. Their Jacobian has rank D − 1 D-1 D − 1 because it includes D X DX D X . Consequently,
trdeg C C ( X ( t ) , e Q ( X ( t ) ) , e X ( t ) ) ≥ p + 2 D − 1 , \operatorname{trdeg}_{\mathbb{C}}\mathbb{C}\left(X(t),e^{Q(X(t))},e^{X(t)}\right)\ge p+2D-1, trdeg C C ( X ( t ) , e Q ( X ( t )) , e X ( t ) ) ≥ p + 2 D − 1 ,
where exponentials of tuples are taken componentwise. Removing the D D D auxiliary coordinate exponentials lowers transcendence degree by at most D D D , giving
trdeg C C ( X ( t ) , e Q ( X ( t ) ) ) ≥ p + D − 1. (49) \operatorname{trdeg}_{\mathbb{C}}\mathbb{C}\left(X(t),e^{Q(X(t))}\right)\ge p+D-1. \tag*{(49)} trdeg C C ( X ( t ) , e Q ( X ( t )) ) ≥ p + D − 1. (49)
These auxiliary exponentials are used only in the proof.
Let O ( U ) \mathcal{O}(U) O ( U ) denote the ring of complex-analytic functions on U U U . The substitution homomorphism
A ⟶ O ( U ) , x i ↦ x i ( t ) , z ν ↦ e Q ν ( X ( t ) ) A\longrightarrow\mathcal{O}(U),\qquad x_i\mapsto x_i(t),\quad z_\nu\mapsto e^{Q_\nu(X(t))} A ⟶ O ( U ) , x i ↦ x i ( t ) , z ν ↦ e Q ν ( X ( t ))
has a prime kernel I I I , since on connected U U U a product of two nonzero complex-analytic functions cannot vanish identically. The nonzero Lie determinant, after replacing exponentials by formal variables and clearing row denominators, gives a nonzero element of I I I : it vanishes on H H H , but is not identically zero under ambient analytic substitution. This relation shows that the D + p D+p D + p functions X ( t ) , e Q ( X ( t ) ) X(t),e^{Q(X(t))} X ( t ) , e Q ( X ( t )) are not algebraically independent. Together with (49), it follows that their generated field has transcendence degree exactly D + p − 1 D+p-1 D + p − 1 .
Choose D + p − 1 D+p-1 D + p − 1 algebraically independent functions among these generators, and let K K K be their field of rational expressions. The remaining function satisfies a nonzero polynomial equation with coefficients in K K K . A nonzero polynomial of least degree that vanishes at this function divides every other such polynomial, by the Euclidean division algorithm. Clearing its denominators and removing the common factor of its coefficients gives a polynomial P P P in the original variables. Gauss’s lemma makes P P P irreducible and shows that every polynomial relation is divisible by P P P . This remains true for Laurent polynomial relations after clearing negative powers of the z ν z_\nu z ν . Hence I = ( P ) I=(P) I = ( P ) in A A A . Inverting the z ν z_\nu z ν preserves irreducibility unless P P P becomes a unit. This is impossible: P P P vanishes under substitution, whereas all inverted variables become nonzero exponentials.
The chain rule intertwines the horizontal lifts with differentiation on the exponential graph. Tangency to H H H therefore makes I I I invariant under the cleared derivations (45). Hence δ r P = B r P \delta_rP=B_rP δ r P = B r P for some B r ∈ A B_r\in A B r ∈ A , as required. ∎
Connectedness of the interpolation domain
Theorem 3.5 (Universal interpolation with two Gaussian attention blocks). Fix d ≥ 3 d \ge3 d ≥ 3 . Consider two noncausal single-head attention blocks with head width r ≥ d r \ge d r ≥ d and query, key, value, and output projection matrices whose entries are all sampled independently from N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) . With probability one, simultaneously for every N ≥ 1 N \ge1 N ≥ 1 and n ≥ 2 n \ge2 n ≥ 2 , there exists an open and connected subset
R N , n ⊆ B N , n , d , \mathcal{R}_{N,n} \subseteq\mathcal{B}_{N,n,d}, R N , n ⊆ B N , n , d , depending on the sampled matrices, whose complement in B N , n , d \mathcal{B}_{N,n,d} B N , n , d has Lebesgue measure zero. On R N , n \mathcal{R}_{N,n} R N , n , these two frozen blocks yield universal interpolation at continuous depth in the sense of Definition 2.4 , with m N = 2 m_N=2 m N = 2 . The same sampled matrices work for every N N N and n n n ; only the block selection, signs, and durations depend on the interpolation problem.
Proof of Theorem 3.5. Fix a pair in the probability-one event of Lemma L.2 and § 19 .§ 2 , and fix N N N , n n n . Put D = N n d D=Nnd D = N n d and Σ = Σ θ , N , n \Sigma=\Sigma_{\theta,N,n} Σ = Σ θ , N , n .
Step 1: A finite rank test and its preservation along flows. Write the reciprocal softmax denominators as
u r , a , i ( X ) : = ( ∑ j e Q r , a , i , j ( X ) ) − 1 . u_{r,a,i}(X) := \left(\sum_j e^{Q_{r,a,i,j}(X)}\right)^{-1}. u r , a , i ( X ) := ( j ∑ e Q r , a , i , j ( X ) ) − 1 .
Define
A = R [ x 1 , … , x D , e Q 1 ( X ) , … , e Q p ( X ) , ( u r , a , i ( X ) ) r , a , i ] . \mathcal{A}=\mathbb{R}\left[x_1,\ldots,x_D,e^{Q_1(X)},\ldots,e^{Q_p(X)},(u_{r,a,i}(X))_{r,a,i}\right]. A = R [ x 1 , … , x D , e Q 1 ( X ) , … , e Q p ( X ) , ( u r , a , i ( X ) ) r , a , i ] .
This algebra is fixed for the chosen θ \theta θ , N N N , n n n ; X X X is the variable of its functions. More precisely, its generators depend only on W 1 , W 2 W_1,W_2 W 1 , W 2 and N , n N,n N , n : the entries of V 1 , V 2 V_1,V_2 V 1 , V 2 appear only as real coefficients in the attention fields. Here square brackets denote all finite sums and products of the listed functions, with real coefficients. No algebraic independence of these functions is assumed. Every function in A \mathcal{A} A is real analytic because the softmax denominators are positive. The attention formula (32) shows that every component of the two batch fields belongs to A \mathcal{A} A .
Partial derivatives also remain in A \mathcal{A} A . Indeed, derivatives of the state coordinates are constants, while
∂ x k e Q ν = ( ∂ x k Q ν ) e Q ν , \partial_{x_k}e^{Q_\nu}=(\partial_{x_k}Q_\nu)e^{Q_\nu}, ∂ x k e Q ν = ( ∂ x k Q ν ) e Q ν ,
∂ x k u r , a , i = − u r , a , i 2 ∑ j ( ∂ x k Q r , a , i , j ) e Q r , a , i , j . \partial_{x_k}u_{r,a,i}=-u_{r,a,i}^{2}\sum_j(\partial_{x_k}Q_{r,a,i,j})e^{Q_{r,a,i,j}}. ∂ x k u r , a , i = − u r , a , i 2 j ∑ ( ∂ x k Q r , a , i , j ) e Q r , a , i , j .
Since the Q ν Q_\nu Q ν are quadratic, their derivatives are linear polynomials in the state coordinates. Both right sides therefore belong to A \mathcal{A} A , and the sum and product rules give the same conclusion for every function in A \mathcal{A} A . Finally, each component of a Lie bracket is a sum of products of field components and their first derivatives. Hence all iterated Lie brackets of the two fields have components in A \mathcal{A} A as well.
Since A \mathcal{A} A is generated by finitely many functions over R \mathbb{R} R , Hilbert’s basis theorem has the following consequence: any family of vectors with D D D components in A \mathcal{A} A is generated by finitely many of its members, using coefficients in A \mathcal{A} A (Saffarich, 1990, §6, pp. 44–45). Applied to the two fields and all their iterated Lie brackets, this gives a finite list Y 1 , … , Y b Y_1,\ldots,Y_b Y 1 , … , Y b among such that every original field or iterated bracket Z Z Z satisfies
Z ( X ) = ∑ ℓ = 1 b a Z , ℓ ( X ) Y ℓ ( X ) , a Z , ℓ ∈ A . Z(X)=\sum_{\ell=1}^{b}a_{Z,\ell}(X)Y_\ell(X),\qquad a_{Z,\ell}\in\mathcal{A}. Z ( X ) = ℓ = 1 ∑ b a Z , ℓ ( X ) Y ℓ ( X ) , a Z , ℓ ∈ A .
The same finite list Y 1 , … , Y b Y_1,\ldots,Y_b Y 1 , … , Y b works for every X X X . Consequently, the columns of Y ( X ) = ( Y 1 ( X ) , … , Y b ( X ) ) Y(X)=(Y_1(X),\ldots,Y_b(X)) Y ( X ) = ( Y 1 ( X ) , … , Y b ( X )) span the Lie algebra at X X X , and
Σ = { X ∈ B N , n , d : rank Y ( X ) < D } . \Sigma=\{X\in\mathcal{B}_{N,n,d}:\operatorname{rank}Y(X)<D\}. Σ = { X ∈ B N , n , d : rank Y ( X ) < D } .
Equivalently, all determinants formed by choosing D D D columns of Y ( X ) Y(X) Y ( X ) vanish. This describes Σ \Sigma Σ by finitely many real-analytic equations. It has no interior by Lemma L.2.
Each bracket [ f r ( N ) , Y ℓ ] [f_r^{(N)},Y_\ell] [ f r ( N ) , Y ℓ ] is also such a linear combination, so [ f r ( N ) , Y ] = Y C r [f_r^{(N)},Y]=YC_r [ f r ( N ) , Y ] = Y C r for an analytic b × b b\times b b × b matrix C r C_r C r , with the bracket taken column by column. Let ϕ t \phi_t ϕ t be the local flow of f r ( N ) f_r^{(N)} f r ( N ) starting at X X X . Differentiating D ϕ t ( X ) − 1 Y ( ϕ t ( X ) ) D\phi_t(X)^{-1}Y(\phi_t(X)) D ϕ t ( X ) − 1 Y ( ϕ t ( X )) gives
Y ( ϕ t ( X ) ) = D ϕ t ( X ) Y ( X ) R ( t ) , R ′ ( t ) = R ( t ) C r ( ϕ t ( X ) ) , R ( 0 ) = I b . Y(\phi_t(X))=D\phi_t(X)Y(X)R(t),\qquad R'(t)=R(t)C_r(\phi_t(X)),\qquad R(0)=I_b. Y ( ϕ t ( X )) = D ϕ t ( X ) Y ( X ) R ( t ) , R ′ ( t ) = R ( t ) C r ( ϕ t ( X )) , R ( 0 ) = I b .
Both D ϕ t ( X ) D_{\phi_t}(X) D ϕ t ( X ) and R ( t ) R(t) R ( t ) are invertible, the latter by uniqueness for this linear matrix differential equation. Hence the rank of Y Y Y is unchanged along either flow. In particular, a trajectory starting in Σ \Sigma Σ remains in Σ \Sigma Σ for as long as it stays in B N , n , d \mathcal{B}_{N,n,d} B N , n , d .
Step 2: The exceptional set has dimension at most D − 2 D-2 D − 2 . Suppose instead that dim R Σ = D − 1 \dim_{\mathbb{R}}\Sigma=D-1 dim R Σ = D − 1 . A standard property of real-analytic zero sets then gives a neighborhood in which Σ \Sigma Σ is a smooth real-analytic hypersurface H H H ; see [7 Section 2] . The preceding flow property makes both fields tangent to H H H . The construction in Lemma L.7 gives a nonzero P ∈ A P\in A P ∈ A such that
P ( X , e Q ( X ) ) = 0 on H , δ r P = B r P ( r = 1 , 2 ) , B r ∈ A . P(X,e^{Q(X)})=0\quad\text{on }H,\qquad\delta_rP=B_rP\quad(r=1,2),\qquad B_r\in A. P ( X , e Q ( X ) ) = 0 on H , δ r P = B r P ( r = 1 , 2 ) , B r ∈ A .
By Lemma L.5 , P = z β p ( X ) P=z^\beta p(X) P = z β p ( X ) for a nonzero polynomial p ∈ C [ X ] p\in\mathbb{C}[X] p ∈ C [ X ] . Substitution yields
0 = e ∑ ν β ν Q ν ( X ) p ( X ) on H . 0=e^{\sum_\nu\beta_\nu Q_\nu(X)}p(X)\quad\text{on }H. 0 = e ∑ ν β ν Q ν ( X ) p ( X ) on H .
Since the exponential factor never vanishes, p p p vanishes on H H H . This contradicts the last assertion of Lemma L.7 . Thus dim R Σ ≤ D − 2 \dim_{\mathbb{R}}\Sigma\le D-2 dim R Σ ≤ D − 2 .
Step 3: The remaining domain is connected. The sets excluded from B N , n , d \mathcal{B}_{N,n,d} B N , n , d consist of proportional token pairs within a sequence, zero tokens, and pairs of sequences related by a permutation and an optional overall sign change. Their dimensions are, respectively, D − d + 1 D-d+1 D − d + 1 , D − d D-d D − d , and D − n d D-nd D − n d , all at most D − 2 D-2 D − 2 because d ≥ 3 d\ge3 d ≥ 3 . Together with Σ \Sigma Σ , they form the excluded set
E = ( R D ∖ B N , n , d ) ∪ Σ . E=(\mathbb{R}^{D}\setminus\mathcal{B}_{N,n,d})\cup\Sigma. E = ( R D ∖ B N , n , d ) ∪ Σ.
Real-analytic zero sets can be covered by countably many smooth pieces, each of dimension at most that of the set itself [7 Corollary 2.11] . Each smooth piece is a smooth submanifold of R D \mathbb{R}^{D} R D . If its dimension is k k k , it admits local parametrizations by k k k real variables. Here Σ \Sigma Σ is defined inside B N , n , d \mathcal{B}_{N,n,d} B N , n , d by the analytic determinant equations of Step 1, and has dimension at most D − 2 D-2 D − 2 by Step 2. The sets excluded from B N , n , d \mathcal{B}_{N,n,d} B N , n , d are defined by polynomial equations and satisfy the same dimension bound. Applying the cited result separately to these sets therefore covers E E E by smooth pieces of dimension at most D − 2 D-2 D − 2 . We can then cover these pieces by countably many local parametrizations of the form
Y = ψ ( u ) , u ∈ U ⊆ R k , k ≤ D − 2. Y=\psi(u),\qquad u\in U\subseteq\mathbb{R}^{k},\qquad k\le D-2. Y = ψ ( u ) , u ∈ U ⊆ R k , k ≤ D − 2.
where U U U is open and ψ \psi ψ is smooth.
Take X 0 , X 1 ∉ E X_0,X_1\notin E X 0 , X 1 ∈ / E . We seek an intermediate point Z Z Z such that both segments [ X 0 , Z ] [X_0,Z] [ X 0 , Z ] and [ Z , X 1 ] [Z,X_1] [ Z , X 1 ] avoid E E E . Fix i ∈ { 0 , 1 } i\in\{0,1\} i ∈ { 0 , 1 } . If [ X i , Z ] [X_i,Z] [ X i , Z ] meets E E E at Y Y Y , then Y = X i + λ ( Z − X i ) Y=X_i+\lambda(Z-X_i) Y = X i + λ ( Z − X i ) for some λ ∈ [ 0 , 1 ] \lambda\in[0,1] λ ∈ [ 0 , 1 ] . Since X i ∉ E X_i\notin E X i ∈ / E , we have Y ≠ X i Y\ne X_i Y = X i and thus λ > 0 \lambda>0 λ > 0 . Solving for Z Z Z , setting t = 1 / λ ≥ 1 t=1/\lambda\ge1 t = 1/ λ ≥ 1 , and writing Y = ψ ( u ) Y=\psi(u) Y = ψ ( u ) gives
Z = X i + t ( Y − X i ) = X i + t ( ψ ( u ) − X i ) , u ∈ U , t ≥ 1. Z=X_i+t(Y-X_i)=X_i+t(\psi(u)-X_i),\qquad u\in U,\quad t\ge1. Z = X i + t ( Y − X i ) = X i + t ( ψ ( u ) − X i ) , u ∈ U , t ≥ 1.
Thus these forbidden choices of Z Z Z lie on rays from X i X_i X i through points Y ∈ E Y\in E Y ∈ E , at or beyond Y Y Y . For each parametrization, this expression depends smoothly on k + 1 ≤ D − 1 k+1\le D-1 k + 1 ≤ D − 1 parameters, namely u u u and t t t , so its image has D D D -dimensional Lebesgue measure zero. Taking the countable union over all parametrizations still gives a measure-zero set. We can therefore choose Z Z Z outside the two measure-zero sets of forbidden intermediate points. Both segments [ X 0 , Z ] [X_0,Z] [ X 0 , Z ] and [ Z , X 1 ] [Z,X_1] [ Z , X 1 ] then avoid E E E . This proves that R θ , N , n = R D ∖ E \mathcal{R}_{\theta,N,n}=\mathbb{R}^{D}\setminus E R θ , N , n = R D ∖ E is path connected. It is open by the rank test in Step 1, and dense with full Lebesgue measure in B N , n , d \mathcal{B}_{N,n,d} B N , n , d by Lemma L.2.
Step 4: Interpolation with the same two sampled blocks. At every point of this connected open domain, the two fields and their iterated Lie brackets span R D \mathbb{R}^{D} R D . The criterion in Corollary 2.7 therefore joins any two configurations in the domain by finitely many successive flows of fields from { ± f 1 ( N ) , ± f 2 ( N ) } \{\pm f_1^{(N)},\pm f_2^{(N)}\} { ± f 1 ( N ) , ± f 2 ( N ) } , with the entire trajectory remaining in the domain. The flow durations, and hence the terminal time S > 0 S>0 S > 0 , may depend on the prescribed endpoints.
Finally, the matrix conditions do not depend on N , n N,n N , n , and the probability-one event of Lemma L.2 already holds simultaneously for every finite N , n N,n N , n . Hence all conclusions hold for the same sampled pair.
Exact interpolation at finite depth
The passage to residual layers follows from Proposition 2.9, applied to the scalar multiples of the two sampled fields.
Proof of Corollary 3.7. Fix a draw in the probability-one event established in the proof of Theorem 3.5. For every N ≥ 1 N \ge1 N ≥ 1 and n ≥ 2 n \ge2 n ≥ 2 , the two batch fields f 1 ( N ) , f 2 ( N ) f_1^{(N)}, f_2^{(N)} f 1 ( N ) , f 2 ( N ) are analytic on the open connected domain R θ , N , n \mathcal{R}_{\theta,N,n} R θ , N , n , and their Lie algebra has full rank there by (33) . Apply Proposition 2.9 with D = N n d D=Nnd D = N n d , M = R θ , N , n \mathcal{M}=\mathcal{R}_{\theta,N,n} M = R θ , N , n , and
G = { c f r ( N ) : c ∈ R , r ∈ { 1 , 2 } } . \mathcal{G}=\{cf_r^{(N)}:c\in\mathbb{R},\ r\in\{1,2\}\}. G = { c f r ( N ) : c ∈ R , r ∈ { 1 , 2 }} .
This family is closed under real scalar multiplication, and its two generators are smooth and have full Lie rank on M \mathcal{M} M . It joins every pair of configurations in this domain by finitely many residual layers
Id + c k f W r k , V r k ( N ) , r k ∈ { 1 , 2 } , c k ∈ R , \operatorname{Id}+c_k f_{W_{r_k},V_{r_k}}^{(N)},\qquad r_k\in\{1,2\},\quad c_k\in\mathbb{R}, Id + c k f W r k , V r k ( N ) , r k ∈ { 1 , 2 } , c k ∈ R ,
with every intermediate configuration still in the domain. Each scalar gain and block index is shared across the batch. The matrices remain fixed; only the depth, indices, and gains depend on the prescribed endpoints. This is universal interpolation at finite depth with m N = 2 m_N=2 m N = 2 in the sense of § 2.3 . The argument is deterministic for every N , n N,n N , n once the draw is fixed, so no additional probability-one event is needed.
Remark L.8 (Scope of the conclusion). The exceptional set Σ θ , N , n \Sigma_{\theta,N,n} Σ θ , N , n may be nonempty. The theorem gives two-field interpolation on the connected generic domain (33), whereas Theorem 3.3 gives a bank of 2 N n d 2Nnd 2 N n d multihead blocks with Gaussian-initialized projections, valid at every point of B N , n , d \mathcal{B}_{N,n,d} B N , n , d for any fixed number of heads and positive head widths. Its rank-one special case is described in Remark J.3. The two-block result requires a single head of width at least d d d . Corollary 3.7 gives exact finite-depth interpolation on the same domain, with adjustable real scalar gains and the same two frozen fields. No bound on the required depth is asserted.
Numerical tests of the head-width threshold
We test whether m ≥ t : = ⌈ d / r ⌉ m \ge t := \lceil d/r\rceil m ≥ t := ⌈ d / r ⌉ frozen noncausal single-head blocks of width r < d r<d r < d suffice for generic full lifted Lie rank in dimension D = N n d D=Nnd D = N n d . The condition m r ≥ d mr \ge d m r ≥ d is necessary: all bracket values lie tokenwise in the sum of the output projection images, of dimension at most m r mr m r , so the Lie rank is at most N n min ( d , m r ) Nn\min(d,mr) N n min ( d , m r ) . A single generator has Lie rank at most one.
Protocol. We use ( d , r ) ∈ { ( 3 , 1 ) , ( 3 , 2 ) , ( 4 , 1 ) , ( 4 , 2 ) , ( 4 , 3 ) , ( 6 , 1 ) , ( 6 , 2 ) , ( 6 , 3 ) } (d,r)\in\{(3,1),(3,2),(4,1),(4,2),(4,3),(6,1),(6,2),(6,3)\} ( d , r ) ∈ {( 3 , 1 ) , ( 3 , 2 ) , ( 4 , 1 ) , ( 4 , 2 ) , ( 4 , 3 ) , ( 6 , 1 ) , ( 6 , 2 ) , ( 6 , 3 )} , ( N , n ) ∈ { ( 1 , 2 ) , ( 2 , 2 ) , ( 1 , 4 ) , ( 2 , 3 ) } (N,n)\in\{(1,2),(2,2),(1,4),(2,3)\} ( N , n ) ∈ {( 1 , 2 ) , ( 2 , 2 ) , ( 1 , 4 ) , ( 2 , 3 )} , and m ∈ { t − 1 , t , t + 1 } m\in\{t-1,t,t+1\} m ∈ { t − 1 , t , t + 1 } . All query, key, value, and output projection entries are independent centered Gaussians of variance v ∈ { 1 , 1 / d } v\in\{1,1/d\} v ∈ { 1 , 1/ d } . Using seeds 0 , 1 , 2 0,1,2 0 , 1 , 2 for each setting gives 576 cases with 6 ≤ D ≤ 36 6\le D\le36 6 ≤ D ≤ 36 . The state X X X is sampled independently with standard Gaussian coordinates. Cases are paired: increasing m m m takes prefixes of the same bank, banks are shared across ( N , n ) (N,n) ( N , n ) , and the two variances rescale the same base draws. Rescaling changes the fields.
We compute the spaces W k ( X ) W_k(X) W k ( X ) of § 2.2.2 using nested PyTorch Jacobian-vector products in float64, retaining all generated bracket fields. Step k k k includes brackets of length at most k + 1 k+1 k + 1 . Evaluated columns of norm above 10 − 14 10^{-14} 1 0 − 14 are normalized, and singular values exceeding max { 10 − 12 , ε } \max\{10^{-12},\varepsilon\} max { 1 0 − 12 , ε } are counted. We use ε = 10 − 8 \varepsilon=10^{-8} ε = 1 0 − 8 for stopping and record 10 − 6 , 10 − 10 10^{-6},10^{-10} 1 0 − 6 , 1 0 − 10 for sensitivity. Runs stop at full rank or the first pointwise rank plateau, subject to k ≤ 6 k\le6 k ≤ 6 and 4096 words. Analyticity justifies plateau stopping at generic points for exact ranks; numerical plateaus can be premature.
Results. The table reports full-rank counts at the final step of the original runs, before any continuation. Each entry contains 96 cases.
All 192 below-threshold cases are structurally excluded from full rank. At m = t m=t m = t , each of the 64 combinations ( v , d , r , N , n ) (v,d,r,N,n) ( v , d , r , N , n ) has at least one seed reaching full rank at all three tolerances. The two primary deficits occur at v = 1 v=1 v = 1 . For ( d , r , N , n , m ) = ( 4 , 1 , 2 , 2 , 4 ) (d,r,N,n,m)=(4,1,2,2,4) ( d , r , N , n , m ) = ( 4 , 1 , 2 , 2 , 4 ) , seed 0 stops at rank 15/16; continuing the same fields and state through k = 5 k=5 k = 5 gives rank 16 only at ε = 10 − 10 \varepsilon=10^{-10} ε = 1 0 − 10 . For ( 6 , 3 , 2 , 3 , 2 ) (6,3,2,3,2) ( 6 , 3 , 2 , 3 , 2 ) , seed 1 reaches rank 35/36 at k = 6 k=6 k = 6 and full primary rank at k = 7 k=7 k = 7 . These separate checks do not replace the original counts.
Larger dimension. A separate pilot fixes D = 96 D=96 D = 96 , d = 3 d=3 d = 3 , r = 1 r=1 r = 1 , m = 3 = t m=3=t m = 3 = t , v = 1 / d v=1/d v = 1/ d , and seed 0, using the same projections for ( N , n ) = ( 16 , 2 ) , ( 8 , 4 ) , ( 4 , 8 ) (N,n)=(16,2),(8,4),(4,8) ( N , n ) = ( 16 , 2 ) , ( 8 , 4 ) , ( 4 , 8 ) . At k = 5 k=5 k = 5 , the respective rank triplets, in tolerance order ( 10 − 6 , 10 − 8 , 10 − 10 ) (10^{-6},10^{-8},10^{-10}) ( 1 0 − 6 , 1 0 − 8 , 1 0 − 10 ) , are ( 93 , 95 , 96 ) (93,95,96) ( 93 , 95 , 96 ) , ( 94 , 96 , 96 ) (94,96,96) ( 94 , 96 , 96 ) , and ( 96 , 96 , 96 ) (96,96,96) ( 96 , 96 , 96 ) . Continuing the first case through k = 6 k=6 k = 6 gives ( 92 , 95 , 96 ) (92,95,96) ( 92 , 95 , 96 ) ; relative numerical rank need not increase when columns are added. Thus full rank is observed for all three shapes at 10 − 10 10^{-10} 1 0 − 10 , but only two at the primary tolerance.
These results support the proposed threshold across the tested batch sizes and sequence lengths, with sensitivity to conditioning at the boundary. They do not establish a universal interpolation theorem, which would also require control of the connectedness of the full-rank domain. The experiment is reproduced by run_threshold.py, using lie_rank.py and the helpers in experiment_utils.py; saved results include rank histories, singular values, and stopping reasons.
Proof of the causal rank proposition
Proof. Fix X ∈ A N , n , d X \in A_{N,n,d} X ∈ A N , n , d . Every single-head causal field has first-token block V X 1 V X_1 V X 1 ; for a multi-head field, this block is ( ∑ h = 1 H V h ) X 1 (\sum_{h=1}^{H} V_h)X_1 ( ∑ h = 1 H V h ) X 1 . More generally, if two fields have first-token blocks A X 1 A X_1 A X 1 and C X 1 C X_1 C X 1 for constant matrices A A A , C C C , their Lie bracket has first-token block ( C A − A C ) X 1 (CA-AC)X_1 ( C A − A C ) X 1 . Thus both the direct span and all iterated brackets lie in the space on the right of (4) .
It remains to show that all directions in this space are attained. We adapt the argument from the proof of Lemma 3.1 in Section H to causal prefixes. Define the prefix barycenters
z ℓ , i ( b ) : = ∑ j = 1 i e ⟨ b , x j ℓ ⟩ x j ℓ ∑ j = 1 i e ⟨ b , x j ℓ ⟩ , F W , V c ( X ) i , ℓ = V z ℓ , i ( W x i ℓ ) . z_{\ell,i}(b):=\frac{\sum_{j=1}^{i}e^{\langle b,x^\ell_j\rangle}x^\ell_j}{\sum_{j=1}^{i}e^{\langle b,x^\ell_j\rangle}},\qquad F^c_{W,V}(X)_{i,\ell}=V z_{\ell,i}(W x^\ell_i). z ℓ , i ( b ) := ∑ j = 1 i e ⟨ b , x j ℓ ⟩ ∑ j = 1 i e ⟨ b , x j ℓ ⟩ x j ℓ , F W , V c ( X ) i , ℓ = V z ℓ , i ( W x i ℓ ) .
Fix a target block ( i 0 , ℓ 0 ) (i_0,\ell_0) ( i 0 , ℓ 0 ) with i 0 ≥ 2 i_0\ge2 i 0 ≥ 2 , and put q = x i 0 ℓ 0 q=x^{\ell_0}_{i_0} q = x i 0 ℓ 0 . Choose a a a separating the keys in each sequence as in (20), and choose α ∈ q ⊥ \alpha\in q^\perp α ∈ q ⊥ nonorthogonal to every other token as in (21). These choices are possible because the tokens are nonzero and pairwise noncollinear. Set
W t ± = a ( t α ± q ∥ q ∥ 2 ) ⊤ . W_t^\pm=a\left(t\alpha\pm\frac{q}{\lVert q\rVert^2}\right)^\top. W t ± = a ( t α ± ∥ q ∥ 2 q ) ⊤ .
At the target block their difference gives V c Vc V c , where c = z ℓ 0 , i 0 ( a ) − z ℓ 0 , i 0 ( − a ) c=z_{\ell_0,i_0}(a)-z_{\ell_0,i_0}(-a) c = z ℓ 0 , i 0 ( a ) − z ℓ 0 , i 0 ( − a ) . This vector is nonzero: we apply the argument in Section H to the function
ψ ( s ) : = log ∑ j = 1 i 0 e s ⟨ a , x j ℓ 0 ⟩ \psi(s):=\log\sum_{j=1}^{i_0}e^{s\langle a,x^{\ell_0}_j\rangle} ψ ( s ) := log j = 1 ∑ i 0 e s ⟨ a , x j ℓ 0 ⟩
to obtain ψ ′ ′ ( s ) > 0 \psi''(s)>0 ψ ′′ ( s ) > 0 , since i 0 ≥ 2 i_0\ge2 i 0 ≥ 2 and the numbers ⟨ a , x j ℓ 0 ⟩ \langle a,x^{\ell_0}_j\rangle ⟨ a , x j ℓ 0 ⟩ are distinct. Hence ⟨ a , c ⟩ = ψ ′ ( 1 ) − ψ ′ ( − 1 ) > 0 \langle a,c\rangle=\psi'(1)-\psi'(-1)>0 ⟨ a , c ⟩ = ψ ′ ( 1 ) − ψ ′ ( − 1 ) > 0 . At any other query, the two score vectors tend along a a a to the same signed infinity. Both prefix barycenters therefore converge to the same unique maximizing or minimizing key. At a first-token block they are already identical, since z ℓ , 1 ( b ) = x 1 ℓ z_{\ell,1}(b)=x_1^\ell z ℓ , 1 ( b ) = x 1 ℓ for every b b b . Hence
F W t + , V c ( X ) − F W t − , V c ( X ) ⟶ E i 0 , ℓ 0 ( V c ) , F^{\mathrm c}_{W_t^+,V}(X)-F^{\mathrm c}_{W_t^-,V}(X)\longrightarrow E_{i_0,\ell_0}(Vc), F W t + , V c ( X ) − F W t − , V c ( X ) ⟶ E i 0 , ℓ 0 ( V c ) ,
where E i 0 , ℓ 0 ( u ) E_{i_0,\ell_0}(u) E i 0 , ℓ 0 ( u ) has block u u u at the target and zeros elsewhere. The pointwise span S X c S_X^{\mathrm c} S X c is finite-dimensional and closed, so it contains this limit. Thus the limiting direction is a finite linear combination of field values with finite parameters. Taking V = u c ⊤ / ∥ c ∥ 2 V=uc^\top/\lVert c\rVert^2 V = u c ⊤ / ∥ c ∥ 2 shows that it contains E i 0 , ℓ 0 ( u ) E_{i_0,\ell_0}(u) E i 0 , ℓ 0 ( u ) for every u ∈ R d u\in\mathbb{R}^d u ∈ R d . Thus every later-token direction can be varied independently.
Finally, write any A ∈ R d × d A\in\mathbb{R}^{d\times d} A ∈ R d × d as A = ∑ r V r A=\sum_r V_r A = ∑ r V r with rank V r ≤ 1 \operatorname{rank}V_r\le1 rank V r ≤ 1 . Then ∑ r F 0 , V r c ( X ) \sum_r F^{\mathrm c}_{0,V_r}(X) ∑ r F 0 , V r c ( X ) has first-token block A X 1 AX_1 A X 1 . The directions constructed above allow all later-token blocks to be adjusted arbitrarily without changing A X 1 AX_1 A X 1 . This proves (4). The image of A ↦ A X 1 A\mapsto AX_1 A ↦ A X 1 has dimension d rank X 1 d\operatorname{rank}X_1 d rank X 1 , giving (5); the bracket upper bound is therefore sharp as well. Any head of positive width realizes these rank-at-most-one fields, with the remaining heads set to zero, so the same span and rank hold for the multi-head family.
For completeness, the first-token constraint also obstructs global interpolation on A N , n , d \mathcal{A}_{N,n,d} A N , n , d when N > d N>d N > d . Choose a nonzero relation X 1 c = 0 X_1c=0 X 1 c = 0 and an index ℓ \ell ℓ with c ℓ ≠ 0 c_\ell\ne0 c ℓ = 0 . Scaling only x 1 ℓ x_1^\ell x 1 ℓ by two breaks this relation while staying in the same component of A N , n , d \mathcal{A}_{N,n,d} A N , n , d along the positive scaling path. Every causal flow and finite causal residual network preserves the original relation, so neither reaches this target.
Proof of the causal interpolation corollary
Proof. Let r = N − dim K r=N-\dim K r = N − dim K . Choose a full-row-rank matrix Q ∈ R r × N Q\in\mathbb{R}^{r\times N} Q ∈ R r × N with ker Q = K \ker Q=K ker Q = K . A first-token matrix X 1 X_1 X 1 annihilates K K K if and only if it has the unique form X 1 = P Q X_1=PQ X 1 = P Q for P ∈ R d × r P\in\mathbb{R}^{d\times r} P ∈ R d × r . Thus E K E_K E K is a linear space of dimension R = N ( n − 1 ) d + d r R=N(n-1)d+dr R = N ( n − 1 ) d + d r . Within E K E_K E K , the condition ker X 1 = K \ker X_1=K ker X 1 = K is equivalent to P P P being injective, since Q Q Q is surjective onto R r \mathbb{R}^r R r . Equivalently, rank P = r \operatorname{rank}P=r rank P = r , an open condition because a nonzero r × r r\times r r × r minor remains nonzero under small perturbations. Since A N , n , d \mathcal{A}_{N,n,d} A N , n , d is open, it follows that A N , n , d K \mathcal{A}_{N,n,d}^K A N , n , d K is relatively open in E K E_K E K . Every point therefore has a small ball in E K E_K E K contained in this set. This ball is connected and hence lies in the same connected component as its center, so each component is relatively open.
Every causal field maps E K E_K E K into E K E_K E K : for X ∈ E K X\in E_K X ∈ E K and c ∈ K c\in K c ∈ K , its first-token block satisfies ( V Σ X X 1 ) c = V Σ X ( X 1 c ) = 0 (V\Sigma_X X_1)c=V\Sigma_X(X_1c)=0 ( V Σ X X 1 ) c = V Σ X ( X 1 c ) = 0 . Now fix X ∈ A N , n , d K X\in\mathcal{A}_{N,n,d}^K X ∈ A N , n , d K and Z ∈ E K Z\in E_K Z ∈ E K . The rule A ( X 1 u ) = Z 1 u A(X_1u)=Z_1u A ( X 1 u ) = Z 1 u defines a linear map on im X 1 \operatorname{im}X_1 im X 1 : if X 1 u = X 1 v X_1u=X_1v X 1 u = X 1 v , then u − v ∈ ker X 1 = K u-v\in\ker X_1=K u − v ∈ ker X 1 = K , so Z 1 u = Z 1 v Z_1u=Z_1v Z 1 u = Z 1 v . Extending A A A linearly to R d \mathbb{R}^d R d gives Z 1 = A X 1 Z_1=AX_1 Z 1 = A X 1 . Thus every Z ∈ E K Z\in E_K Z ∈ E K satisfies the condition in (4), and Proposition 3.8 yields
span { F W , V c ( X ) : rank W , rank V ≤ 1 } = E K . \operatorname{span}\{F^{\mathrm c}_{W,V}(X):\operatorname{rank}W,\operatorname{rank}V\le1\}=E_K. span { F W , V c ( X ) : rank W , rank V ≤ 1 } = E K .
Choose linear coordinates identifying E K E_K E K with R R \mathbb{R}^R R R . The restricted fields are analytic and closed under negation by replacing V V V with − V -V − V . On each connected component, Corollary D.1 gives the continuous-depth conclusion on a horizon [ 0 , S ] [0,S] [ 0 , S ] depending on the endpoints. Closure under real scalar multiplication by scaling V V V also permits applying Proposition E.1 to obtain the finite residual network. Both constructions stay in that component. The rank-at-most-one factorizations give one head of width one; additional prescribed heads can be set to zero.
Proof of the universal causal interpolation corollary
Proof. Fix K K K as in the statement and a linear isomorphism T : E K → R R T:E_K\to\mathbb{R}^R T : E K → R R . In these coordinates, define
G ( θ , z ) : = T ( F a b ⊤ , u v c ( T − 1 z ) ) , θ = ( a , b , u , v ) ∈ R 4 d . G(\theta,z):=T\bigl(F^{\mathrm c}_{ab^\top,u v}(T^{-1}z)\bigr),\qquad\theta=(a,b,u,v)\in\mathbb{R}^{4d}. G ( θ , z ) := T ( F a b ⊤ , uv c ( T − 1 z ) ) , θ = ( a , b , u , v ) ∈ R 4 d .
The domain T ( A N , n , d K ) T(\mathcal{A}_{N,n,d}^K) T ( A N , n , d K ) is a nonempty open subset of R R \mathbb{R}^R R R . The function G G G is jointly real analytic in ( θ , z ) (\theta,z) ( θ , z ) , since T T T is linear and all prefix softmax denominators are strictly positive. Its values span R R \mathbb{R}^R R R at every configuration by Proposition 3.8. Apply Theorem 1.2 with parameter dimension 4 d 4d 4 d and with both configuration and output dimensions equal to R R R . It follows that 2 R 2R 2 R independent-factor samples span simultaneously throughout this domain with probability one. The same event covers all its connected components, for this fixed K K K .
Fix a draw on this event and consider the signed family
{ ± F W j , V j c : 1 ≤ j ≤ 2 R } . \{\pm F^{c}_{W_j,V_j}: 1 \le j \le2R\}. { ± F W j , V j c : 1 ≤ j ≤ 2 R } .
This family is closed under negation and has pointwise full rank in E K E_K E K at every point of the class. Applying Corollary D.1 in the coordinates T T T on each connected component gives exact interpolation on a horizon [ 0 , S ] [0,S] [ 0 , S ] depending on the endpoints, within that component. Each control segment selects one of the same 2 R 2R 2 R sampled generators and its sign, so this is the relative universal interpolation property of Definition 2.4 . The signed dictionary contains at most 4 R 4R 4 R fields, all realized by the same architecture since − F W j , V j c = F W j , − V j c -F^{c}_{W_j,V_j}=F^{c}_{W_j,-V_j} − F W j , V j c = F W j , − V j c .
For finite depth, apply Proposition E.1 to the scalar-closed family { c F W j , V j c : c ∈ R , 1 ≤ j ≤ 2 R } \{cF^{c}_{W_j,V_j}: c \in\mathbb{R},\ 1 \le j \le2R\} { c F W j , V j c : c ∈ R , 1 ≤ j ≤ 2 R } . A sufficiently fine Euler discretization of an interpolating trajectory first gives a network of L 0 L_0 L 0 residual layers, where L 0 L_0 L 0 is finite and may depend on the interpolation problem. Appending at most R R R correction layers then yields exact interpolation, with total depth at most L 0 + R L_0+R L 0 + R and scalar gains shared across the batch. Linearity in V V V preserves the rank-at-most-one realization. The sampled matrices are fixed before the endpoints are chosen, proving universal interpolation at finite depth with the same 2 R 2R 2 R fields.
□ \square □