Introduction
In-context learning with transformers. In-context learning (ICL) is an AI paradigm in which a large language model (LLM) learns to perform a new task dynamically by looking at a few input-output examples, without changing its internal model weights, i.e., without retraining its parameters [12 , 29 , 3 ] . The transformer architecture is the primary engine that enables ICL in modern LLMs. A transformer processes a sequence of vectors called tokens, updates their vector representations through successive layers, and extracts prediction after the last layer. For example, a linear regression prompt in ICL contains several input–label pairs from an unknown linear function, followed by a new query token. The goal is to predict the corresponding response.
Pre-trained transformers can solve unseen regression tasks in context, matching the sample efficiency of canonical estimators such as ordinary least squares and the Lasso for linear models [29 , 3 ] . Theoretically, a growing body of constructive work explains this capability by showing that transformers can explicitly emulate iterative optimization algorithms with appropriate parameter configurations and attention layers [3 , 63 , 4 ] .
However, existing work on ICL theory leaves two critical gaps. From a theoretical perspective , most constructive analyses focus strictly on linear regression. Recent extensions to nonlinear functions via neural feature maps [45 , 48 ] rely on independently sampled static inputs and provide no prediction guarantees for nonlinear functionals of stochastic paths with temporal dependence. In practice, however, the demonstrations may consist of successive segments of a common stochastic process. The learning problem must therefore account both for nonlinear dependence on each observed path and for statistical dependence among the demonstration paths and the query. From an interpretability perspective , pure approximation guarantees do not, by themselves, explain what the features represent. The black-box neural features in these constructions do not have an intrinsic interpretation in terms of the observed path.
The question is: can a transformer with fixed parameters learn nonlinear functionals of stochastic paths in context, under statistical dependence across demonstrations and the query?
Path signatures and financial applications. Originally introduced and studied in algebraic topology [16 , 17 ] , the path signature, also known as the signature transform or signature [52 , 27 ] , has proven to be a powerful tool for feature generation and pattern recognition with state-of-the-art performance in machine learning. (See for instance, [10 , 20 , 19 , 54 , 31 , 33 ] and the references therein).
The signature has recently been widely adopted in finance, for example, for information extraction from financial time series data [36 ] , for the calibration of signature-based asset-price models [25 , 26 , 15 ] , for derivative pricing and hedging under signature volatility models [58 , 1 ] , in signature-kernel methods for path-dependent hedging [22 , 35 ] , and for optimal execution [42 ] .
Many of the empirical successes, as well as theoretical studies, are built upon the signature’s striking universal nonlinearity property [50 ] : any continuous function of the time series can be approximated arbitrarily well by a linear combination of its signature components. This property linearizes the problem of feature selection and does not require the engineering of neural network architectures for nonlinear and path-dependent functions, with the added benefit of interpretability [26 , 15 ] . Most recently, this property has been shown to be efficient with path-dependent objective functions in [34 ] for contextual bandit problems and in [35 ] for hedging problems.
Integrating ICL and path signatures. For many practical problems, it is natural to combine the universal nonlinearity property of the signature with ICL. On one hand, signature features provide an expressive representation of path geometry . For instance, lead-lag signatures may encode quadratic variation through second-order terms. Meanwhile, ICL complements this representation with a mechanism for adaptation to unseen stochastic environments , using demonstrations to infer the relationship prevailing under new conditions. Moreover, because signature coordinates are defined as path integrals, evaluating the same feature map across varying sampling frequencies and irregular timestamps provides natural robustness to observation grids .
The universal nonlinearity of the signature, the demonstrated efficiency of the signature for path-dependent objectives, and the adaptive power of ICL, motivate us to focus on the following question. Can a transformer explicitly implement in-context Lasso on a shared signature representation with a prediction error bound?
Our work. In this paper, we explore the integration of signatures and ICL for transformers.
This construction is novel. All prior theoretical analyses of in-context Lasso rely predominantly on unmasked attention [40 ] , linear attention [63 ] , or ReLU or Sigmoid attention [4 , 48 ] , whereas masked softmax attention is the standard mechanism used in frontier LLMs.
We establish a universal in-context prediction guarantee for general nonlinear, path-dependent target functions via signature features (Theorem 3.2 ). More precisely, with N N N in-context demonstrations the mean square error can be bounded by O ( ϵ 2 + 1 / N + ϵ T F 2 ) O(\epsilon^2 + 1/N + \epsilon_{\mathrm{TF}}^2) O ( ϵ 2 + 1/ N + ϵ TF 2 ) , consisting of the signature universal approximation error ϵ 2 \epsilon^2 ϵ 2 , the Lasso statistical estimation rate 1 / N 1/N 1/ N , and an arbitrarily small transformer approximation error ϵ T F 2 \epsilon_{\mathrm{TF}}^2 ϵ TF 2 .
Our prediction guarantee goes beyond the IID data in the existing ICL theory, allowing dependence among the demonstrations and the query. Even within the high-dimensional Lasso literature [37 , 2 ] , statistical analyses of dependent data typically rely on indirect assumptions governing decaying temporal correlations. In contrast, we formulate direct moment and concentration conditions on the signature features and verify them for dissipative diffusions, the CIR process, and fractional OU processes (Propositions 3.3 to 3.5).
Our experiments confirm that transformers with signatures can simulate in-context Lasso for sparse feature recovery and perform path-dependent ICL effectively with a compact architecture. Across extensive financial tasks, the prediction accuracy is comparable to or better than that of vanilla transformers, while requiring substantially fewer trainable parameters. We also show that signature-based ICL is robust with respect to changes in the path observation grids.
Overall, the signature transform enhances the transformer’s capability by reducing the burden of learning a path representation from scratch. Meanwhile, the transformer provides essential expressivity when the signature truncation level is insufficient to fully linearize the target functional, while ICL leverages cross-task priors from pre-training beyond single-task signature Lasso fitting.
Preliminaries
Transformer Architecture
A transformer updates token representations through successive layers, each comprising a causal multi-head attention block followed by a multilayer perceptron (MLP). The attention block combines information across sequence positions, while the MLP applies a nonlinear transformation to each token representation. The predictions are then computed from the final layer’s outputs.
Rather than computing a single attention map over the full embedding space, multi-head attention operates several attention heads in parallel to capture distinct relational patterns across the sequence. Specifically, each head projects the input token embeddings into lower-dimensional subspaces via separate learnable weight matrices for queries (Q Q Q ), keys (K K K ) and values (V V V ).
We write a sequence of N N N tokens of dimension D D D as H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D \mathbf{H} = [h_0,\ldots,h_{N-1}]^{\top} \in\mathbb{R}^{N \times D} H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D .
Definition 2.1 (Masked Softmax Attention). A masked softmax attention block Attn θ ( ⋅ ) \operatorname{Attn}_{\theta}(\cdot) Attn θ ( ⋅ ) with M M M heads and head dimension d h d_h d h has parameters θ = { ( Q j , K j , V j ) } j = 1 M \theta= \{(Q_j, K_j, V_j)\}_{j=1}^{M} θ = {( Q j , K j , V j ) } j = 1 M , where Q j , K j ∈ R D × d h Q_j, K_j \in\mathbb{R}^{D \times d_h} Q j , K j ∈ R D × d h and V j ∈ R D × D V_j \in\mathbb{R}^{D \times D} V j ∈ R D × D . On any input sequence H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D \mathbf{H} = [h_0,\ldots,h_{N-1}]^{\top} \in\mathbb{R}^{N \times D} H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D ,
Attn θ ( H ) = H + ∑ j = 1 M softmax ( Mask ( ( H Q j ) ( H K j ) ⊤ ) ) H V j ∈ R N × D . (1) \operatorname{Attn}_{\theta}(\mathbf{H}) = \mathbf{H} + \sum_{j=1}^{M} \operatorname{softmax}\left(\operatorname{Mask}\left((\mathbf{H}Q_j)(\mathbf{H}K_j)^{\top}\right)\right)\mathbf{H}V_j \in\mathbb{R}^{N \times D}. \tag*{(1)} Attn θ ( H ) = H + j = 1 ∑ M softmax ( Mask ( ( H Q j ) ( H K j ) ⊤ ) ) H V j ∈ R N × D . (1)
Here Mask ( ⋅ ) \operatorname{Mask}(\cdot) Mask ( ⋅ ) stands for the causal mask operator: for a matrix A = ( A t s ) ∈ R N × N \mathbf{A} = (A_{ts}) \in\mathbb{R}^{N \times N} A = ( A t s ) ∈ R N × N ,
[ Mask ( A ) ] t s : = { A t s , s ≤ t , − ∞ , s > t . (2) [\operatorname{Mask}(\mathbf{A})]_{ts} :=
\begin{cases}
A_{ts}, & s \le t,\\
-\infty, & s > t.
\end{cases} \tag*{(2)} [ Mask ( A ) ] t s := { A t s , − ∞ , s ≤ t , s > t . (2)
Equivalently, for 0 ≤ t < N 0 \le t < N 0 ≤ t < N ,
[ Attn θ ( H ) ] t = h t + ∑ j = 1 M ∑ s = 0 t exp ( ⟨ Q j ⊤ h t , K j ⊤ h s ⟩ ) ∑ r = 0 t exp ( ⟨ Q j ⊤ h t , K j ⊤ h r ⟩ ) V j ⊤ h s . (3) [\operatorname{Attn}_{\theta}(\mathbf{H})]_t = h_t + \sum_{j=1}^{M}\sum_{s=0}^{t} \frac{\exp\left(\langle Q_j^{\top}h_t, K_j^{\top}h_s\rangle\right)}{\sum_{r=0}^{t}\exp\left(\langle Q_j^{\top}h_t, K_j^{\top}h_r\rangle\right)}V_j^{\top}h_s. \tag*{(3)} [ Attn θ ( H ) ] t = h t + j = 1 ∑ M s = 0 ∑ t ∑ r = 0 t exp ( ⟨ Q j ⊤ h t , K j ⊤ h r ⟩ ) exp ( ⟨ Q j ⊤ h t , K j ⊤ h s ⟩ ) V j ⊤ h s . (3)
Figure 1 illustrates the procedures of attention computation. Each attention head uses three linear projections: query, key, and value. At position t t t head j j j matches the query Q j ⊤ h t Q_j^{\top}h_t Q j ⊤ h t with the keys K j ⊤ h s K_j^{\top}h_s K j ⊤ h s . The inner product ⟨ Q j ⊤ h t , K j ⊤ h s ⟩ \langle Q_j^{\top}h_t, K_j^{\top}h_s\rangle ⟨ Q j ⊤ h t , K j ⊤ h s ⟩ is the attention score for position s s s , while V j ⊤ h s V_j^{\top}h_s V j ⊤ h s is the corresponding value vector. Queries and keys therefore determine how much weight a token h s h_s h s receives, while values determine the information it contributes. Each head has its own projections ( Q j , K j , V j ) (Q_j, K_j, V_j) ( Q j , K j , V j ) , allowing the heads to combine information in different ways. Their outputs lie in R D \mathbb{R}^{D} R D and are summed directly.
Figure 1. Attention computation at position t t t . The query and key vectors determine the attention scores through their inner products. The causal mask restricts each token to information from itself and preceding tokens. Each head forms a weighted average of the corresponding value vectors; the head outputs are summed and added to h t h_t h t , as in eq. (3) .
Importantly, the causal mask restricts the information available at position t t t to the first t + 1 t + 1 t + 1 tokens in the prompt, h 0 , … , h t h_0,\ldots,h_t h 0 , … , h t . A query placed after the demonstrations can, therefore, use information from all of them, while earlier tokens cannot access the query.
It is worth reiterating that prior theoretical ICL constructions focus on unmasked, or linear attention, or ReLU, or Sigmoid attention, whereas our analysis will be for masked softmax attention used in SOTA LLMs.
After the attention block, the MLP block further processes each individual token, without mixing information between tokens. Here we use the activation ReLU ( a ) = max { a , 0 } \operatorname{ReLU}(a) = \max\{a, 0\} ReLU ( a ) = max { a , 0 } .
Definition 2.2 (MLP). An MLP block with hidden width D ′ D' D ′ , denoted by MLP θ ( ⋅ ) \operatorname{MLP}_{\theta}(\cdot) MLP θ ( ⋅ ) , has parameters θ = ( W 1 , W 2 ) \theta= (W_1, W_2) θ = ( W 1 , W 2 ) , where W 1 , W 2 ∈ R D × D ′ W_1, W_2 \in\mathbb{R}^{D \times D'} W 1 , W 2 ∈ R D × D ′ . For any input sequence H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D \mathbf{H} = [h_0,\ldots,h_{N-1}]^{\top} \in\mathbb{R}^{N \times D} H = [ h 0 , … , h N − 1 ] ⊤ ∈ R N × D ,
MLP θ ( H ) = H + ReLU ( H W 1 ) W 2 ⊤ . (4) \operatorname{MLP}_{\theta}(\mathbf{H}) = \mathbf{H} + \operatorname{ReLU}(\mathbf{H}W_1)W_2^{\top}. \tag*{(4)} MLP θ ( H ) = H + ReLU ( H W 1 ) W 2 ⊤ . (4) We can write in vector form [ MLP θ ( H ) ] t = h t + W 2 ReLU ( W 1 ⊤ h t ) [\operatorname{MLP}_{\theta}(\mathbf{H})]_t = h_t + W_2\operatorname{ReLU}(W_1^{\top}h_t) [ MLP θ ( H ) ] t = h t + W 2 ReLU ( W 1 ⊤ h t ) .
Definition 2.3 (Transformer). An L L L -layer transformer with parameters θ = { θ a t t n ( ℓ ) , θ m l p ( ℓ ) } ℓ = 1 L \theta= \{\theta_{\mathrm{attn}}^{(\ell)}, \theta_{\mathrm{mlp}}^{(\ell)}\}_{\ell=1}^{L} θ = { θ attn ( ℓ ) , θ mlp ( ℓ ) } ℓ = 1 L maps H ( 0 ) ∈ R N × D H^{(0)} \in\mathbb{R}^{N \times D} H ( 0 ) ∈ R N × D to H ( L ) = TF θ ( H ( 0 ) ) ∈ R N × D H^{(L)} = \operatorname{TF}_{\theta}(H^{(0)}) \in\mathbb{R}^{N \times D} H ( L ) = TF θ ( H ( 0 ) ) ∈ R N × D through
H ( ℓ ) = MLP θ m l p ( ℓ ) ( Attn θ a t t n ( ℓ ) ( H ( ℓ − 1 ) ) ) , ℓ = 1 , … , L . (5) H^{(\ell)} = \operatorname{MLP}_{\theta_{\mathrm{mlp}}^{(\ell)}}\left(\operatorname{Attn}_{\theta_{\mathrm{attn}}^{(\ell)}}\left(H^{(\ell-1)}\right)\right), \qquad\ell= 1,\ldots,L. \tag*{(5)} H ( ℓ ) = MLP θ mlp ( ℓ ) ( Attn θ attn ( ℓ ) ( H ( ℓ − 1 ) ) ) , ℓ = 1 , … , L . (5)
The MLP acts individually on each token, so the causal restriction from masked attention is preserved throughout all L L L layers.
The attention and MLP blocks play complementary roles in transformers. Attention retrieves and aggregates information from the current and preceding tokens, while MLP further processes the resulting representation through nonlinearity.
Path Representation by the Signature
Let x : [ 0 , 1 ] → R d x : [0,1] \to\mathbb{R}^{d} x : [ 0 , 1 ] → R d be a continuous path with x 0 = 0 x_0 = 0 x 0 = 0 .4 The time-augmented path is
x ~ t : = ( t , x t ) , 0 ≤ t ≤ 1. (6) \widetilde{x}_t := (t,x_t), \qquad0 \le t \le1. \tag*{(6)} x t := ( t , x t ) , 0 ≤ t ≤ 1. (6)
Definition 2.4 (Signature transform). The signature of the time-augmented path is the sequence Sig ( x ~ ) = ( Sig ( k ) ( x ~ ) ) k ≥ 0 \operatorname{Sig}(\widetilde{x}) = (\operatorname{Sig}^{(k)}(\widetilde{x}))_{k \ge0} Sig ( x ) = ( Sig ( k ) ( x ) ) k ≥ 0 . The zeroth level is Sig ( 0 ) ( x ~ ) : = 1 \operatorname{Sig}^{(0)}(\widetilde{x}) := 1 Sig ( 0 ) ( x ) := 1 . For k ≥ 1 k \ge1 k ≥ 1 , the k k k -th level Sig ( k ) ( x ~ ) ∈ ( R d + 1 ) ⊗ k \operatorname{Sig}^{(k)}(\widetilde{x}) \in(\mathbb{R}^{d+1})^{\otimes k} Sig ( k ) ( x ) ∈ ( R d + 1 ) ⊗ k is defined coordinatewise by
[ Sig ( k ) ( x ~ ) ] i 1 , … , i k : = ∫ 0 < u 1 < ⋯ < u k < 1 d x ~ u 1 ( i 1 ) ⋯ d x ~ u k ( i k ) , i 1 , … , i k ∈ { 0 , … , d } . (7) \left[\operatorname{Sig}^{(k)}(\widetilde{x})\right]_{i_1,\ldots,i_k} := \int_{0<u_1<\cdots<u_k<1} \mathrm{d}\widetilde{x}_{u_1}^{(i_1)} \cdots\mathrm{d}\widetilde{x}_{u_k}^{(i_k)}, \qquad i_1,\ldots,i_k \in\{0,\ldots,d\}. \tag*{(7)} [ Sig ( k ) ( x ) ] i 1 , … , i k := ∫ 0 < u 1 < ⋯ < u k < 1 d x u 1 ( i 1 ) ⋯ d x u k ( i k ) , i 1 , … , i k ∈ { 0 , … , d } . (7) For M ≥ 0 M \ge0 M ≥ 0 , the truncated signature transform of x ~ \widetilde{x} x up to level M M M is defined as
Sig M ( x ~ ) : = ( 1 , Sig ( 1 ) ( x ~ ) , … , Sig ( M ) ( x ~ ) ) ∈ R P M , P M : = ∑ k = 0 M ( d + 1 ) k . (8) \operatorname{Sig}_{M}(\widetilde{x}) := \left(1,\operatorname{Sig}^{(1)}(\widetilde{x}),\ldots,\operatorname{Sig}^{(M)}(\widetilde{x})\right) \in\mathbb{R}^{P_M}, \qquad P_M := \sum_{k=0}^{M}(d+1)^k. \tag*{(8)} Sig M ( x ) := ( 1 , Sig ( 1 ) ( x ) , … , Sig ( M ) ( x ) ) ∈ R P M , P M := k = 0 ∑ M ( d + 1 ) k . (8)
Throughout, the iterated integrals are interpreted in the Stratonovich sense unless otherwise specified.
Because the full signature coordinates in eq. (8) can exhibit collinearity induced by their algebraic structure, the signature pruning technique can be applied to remove feature redundancy. Formally, it embeds each path through a fixed feature map ψ : X → R P \psi:\mathcal{X}\to\mathbb{R}^{P} ψ : X → R P shared across all tasks, constructed from the pruned signature coordinates up to level M M M :
ψ ( x ) : = Sig ‾ M ( x ~ ) : = ( 1 , ( [ Sig ( k ) ( x ~ ) ] i 1 , … , i k ) 1 ≤ k ≤ M , i k ≠ 0 ) ∈ R P , P : = ( d + 1 ) M . (9) \psi(x):=\overline{\operatorname{Sig}}_{M}(\widetilde{x}):=\left(1,\left(\left[\operatorname{Sig}^{(k)}(\widetilde{x})\right]_{i_1,\ldots,i_k}\right)_{1\leq k\leq M,\ i_k\ne0}\right)\in\mathbb{R}^{P},\quad P:=(d+1)^{M}. \tag*{(9)} ψ ( x ) := Sig M ( x ) := ( 1 , ( [ Sig ( k ) ( x ) ] i 1 , … , i k ) 1 ≤ k ≤ M , i k = 0 ) ∈ R P , P := ( d + 1 ) M . (9)
Crucially, there is no loss of expressiveness from this pruning, as every coordinate of the full truncated signature Sig M ( x ~ ) \operatorname{Sig}_{M}(\widetilde{x}) Sig M ( x ) lies in the linear span of Sig ‾ M ( x ~ ) \overline{\operatorname{Sig}}_{M}(\widetilde{x}) Sig M ( x ) [34 ] .
In practice, for discretely observed data, we linearly interpolate between consecutive observations before time augmentation. The augmented path is then piecewise linear, and Chen’s identity [16 ] expresses its signature coordinates as polynomials in the observations.
Theory of Signature-Based In-Context Learning
In-Context Learning in Path Space: Problem Formulation
In ICL, the target function is unknown and varies across tasks, so the transformer must learn from the demonstrations in context to predict the task-specific label for the query, while keeping its parameters fixed.
In the standard formulation of ICL, each demonstration pairs a finite dimensional input feature vector with its label:
( x 1 , Y 1 ) , … , ( x N , Y N ) , x N + 1 , x i ∈ R d . (10) (x_1,Y_1),\ldots,(x_N,Y_N),x_{N+1},\qquad x_i\in\mathbb{R}^{d}. \tag*{(10)} ( x 1 , Y 1 ) , … , ( x N , Y N ) , x N + 1 , x i ∈ R d . (10)
The goal is to predict the label corresponding to the query x N + 1 x_{N+1} x N + 1 .
This formulation can be generalized to path inputs. Let W \mathcal{W} W denote the task space and F : = { f w : w ∈ W } \mathcal{F}:=\{f_w:w\in\mathcal{W}\} F := { f w : w ∈ W } the corresponding class of target functionals f w : X → R f_w:\mathcal{X}\to\mathbb{R} f w : X → R on a standard Borel path space X \mathcal{X} X . Each task w ∈ W w\in\mathcal{W} w ∈ W selects f w ∈ F f_w\in\mathcal{F} f w ∈ F and may also govern the distribution of the input process. Within each prompt, demonstrations and the query share the same unknown task w w w . Let Z = ( Z t ) t ≥ 0 Z=(Z_t)_{t\geq0} Z = ( Z t ) t ≥ 0 be an input process in R d \mathbb{R}^{d} R d . For i ≥ 1 i\geq1 i ≥ 1 , we define the i i i -th demonstration path by restricting Z Z Z to [ i − 1 , i ] [i-1,i] [ i − 1 , i ] and reparametrizing time onto [ 0 , 1 ] [0,1] [ 0 , 1 ] :
X i = ( Z i − 1 + t ) 0 ≤ t ≤ 1 , i = 1 , 2 , … . (11) X_i=(Z_{i-1+t})_{0\leq t\leq1},\qquad i=1,2,\ldots. \tag*{(11)} X i = ( Z i − 1 + t ) 0 ≤ t ≤ 1 , i = 1 , 2 , … . (11)
Each segment X i X_i X i takes values in X \mathcal{X} X . For an integer N ≥ 1 N\geq1 N ≥ 1 , the labels are
Y i = f w ( X i ) + ξ i , i = 1 , … , N + 1 , (12) Y_i=f_w(X_i)+\xi_i,\qquad i=1,\ldots,N+1, \tag*{(12)} Y i = f w ( X i ) + ξ i , i = 1 , … , N + 1 , (12)
where ξ i \xi_i ξ i denotes label noise. The full prompt presented to the transformer is ( X i , Y i ) i = 1 N (X_i,Y_i)_{i=1}^{N} ( X i , Y i ) i = 1 N together with the query X N + 1 X_{N+1} X N + 1 . For each task w w w , write P w P_w P w for the joint law of the input process and label noises, and E w E_w E w for the corresponding expectation.
In § 5.4 , we will present and analyze an example, where each demonstration pairs a price path with the payoff of an undisclosed path-dependent option. All demonstrations in a prompt use the same option. Given a new price path as the query, the model predicts its payoff from that option.
Prompt format. Given ( X i , Y i ) i = 1 N (X_i,Y_i)_{i=1}^{N} ( X i , Y i ) i = 1 N and the query X N + 1 X_{N+1} X N + 1 , the input sequence, with token dimension D = 2 P + 3 D = 2P + 3 D = 2 P + 3 , is
H ( 0 ) = ( 0 P ψ ( X 1 ) ⋯ ψ ( X N ) ψ ( X N + 1 ) 0 Y 1 ⋯ Y N 0 0 P 0 P ⋯ 0 P 0 P 0 1 ⋯ 1 0 0 0 ⋯ 0 1 ) T ∈ R ( N + 2 ) × ( 2 P + 3 ) . (13) H^{(0)} =
\begin{pmatrix}
\mathbf{0}_P & \psi(X_1) & \cdots& \psi(X_N) & \psi(X_{N+1}) \\
0 & Y_1 & \cdots& Y_N & 0 \\
\mathbf{0}_P & \mathbf{0}_P & \cdots& \mathbf{0}_P & \mathbf{0}_P \\
0 & 1 & \cdots& 1 & 0 \\
0 & 0 & \cdots& 0 & 1
\end{pmatrix}^{\mathsf{T}} \in\mathbb{R}^{(N+2)\times(2P+3)}. \tag*{(13)} H ( 0 ) = 0 P 0 0 P 0 0 ψ ( X 1 ) Y 1 0 P 1 0 ⋯ ⋯ ⋯ ⋯ ⋯ ψ ( X N ) Y N 0 P 1 0 ψ ( X N + 1 ) 0 0 P 0 1 T ∈ R ( N + 2 ) × ( 2 P + 3 ) . (13)
Here h 0 ( 0 ) h^{(0)}_0 h 0 ( 0 ) is the fixed zero anchor, each demonstration ( X i , Y i ) (X_i,Y_i) ( X i , Y i ) corresponds to token h i ( 0 ) h_i^{(0)} h i ( 0 ) for 1 ≤ i ≤ N 1 \le i \le N 1 ≤ i ≤ N , and the query X N + 1 X_{N+1} X N + 1 corresponds to h N + 1 ( 0 ) h_{N+1}^{(0)} h N + 1 ( 0 ) . Each example or query token holds its signature features and label (zero for the query). The next P P P coordinates are initialized to zero and reserved for the coefficient iterate. The final two coordinates indicate labeled examples and query tokens, respectively.
Read out operator. Given an input sequence H ( 0 ) H^{(0)} H ( 0 ) , the transformer yields the prediction y ^ T F = read y ( TF θ ( H ( 0 ) ) ) \widehat{y}_{\mathrm{TF}} = \operatorname{read}_{y}(\operatorname{TF}_{\theta}(H^{(0)})) y TF = read y ( TF θ ( H ( 0 ) )) , where read y \operatorname{read}_{y} read y is a linear readout operator that maps the final output matrix to a scalar by extracting the ( P + 1 ) (P+1) ( P + 1 ) -th coordinate of the final token:
y ^ T F = read y ( TF θ ( H ( 0 ) ) ) = [ ( TF θ ( H ( 0 ) ) ) N + 1 ] P + 1 . (14) \widehat{y}_{\mathrm{TF}} = \operatorname{read}_{y}\left(\operatorname{TF}_{\theta}(H^{(0)})\right) = \left[\left(\operatorname{TF}_{\theta}(H^{(0)})\right)_{N+1}\right]_{P+1}. \tag*{(14)} y TF = read y ( TF θ ( H ( 0 ) ) ) = [ ( TF θ ( H ( 0 ) ) ) N + 1 ] P + 1 . (14)
The population squared loss is thus
L w ( θ ) = E w [ ( y ^ T F − Y N + 1 ) 2 ] , (15) \mathcal{L}_{w}(\theta) = \mathbb{E}_{w}\left[\left(\widehat{y}_{\mathrm{TF}} - Y_{N+1}\right)^2\right], \tag*{(15)} L w ( θ ) = E w [ ( y TF − Y N + 1 ) 2 ] , (15)
where the expectation is over prompts and query responses under the fixed task w w w . The training objective of θ \theta θ is to reduce this loss across tasks. At inference, the parameters θ \theta θ remain fixed, and the model uses the demonstrations to predict the task-specific label for the query.
Universal Nonlinearity of Signature Transform for ICL
We now present a uniform signature approximation over a class of continuous functionals. This is the universal nonlinearity property of the signature transform for the ICL setting.
Lemma 3.1 (Uniform signature approximation). Let K ⊂ X \mathcal{K} \subset\mathcal{X} K ⊂ X be a set of paths starting at zero, compact in the p p p -variation metric for some p ≥ 1 p \ge1 p ≥ 1 , and let F \mathcal{F} F be a class of functionals whose restrictions to K \mathcal{K} K are continuous and totally bounded in the supremum norm ∥ f ∥ ∞ : = sup x ∈ K ∣ f ( x ) ∣ \lVert f \rVert_{\infty} := \sup_{x \in\mathcal{K}} \lvert f(x) \rvert ∥ f ∥ ∞ := sup x ∈ K ∣ f ( x )∣ . For any ϵ > 0 \epsilon> 0 ϵ > 0 , there exists a truncation level M M M and coefficient vectors β f ∈ R P M \beta_f \in\mathbb{R}^{P_M} β f ∈ R P M , f ∈ F f \in\mathcal{F} f ∈ F , such that
sup f ∈ F sup x ∈ K ∣ f ( x ) − β f T Sig M ( x ~ ) ∣ ≤ ϵ . (16) \sup_{f \in\mathcal{F}}\sup_{x \in\mathcal{K}} \lvert f(x) - \beta_f^{\mathsf{T}}\operatorname{Sig}_M(\widetilde{x}) \rvert\le\epsilon. \tag*{(16)} f ∈ F sup x ∈ K sup ∣ f ( x ) − β f T Sig M ( x )∣ ≤ ϵ . (16) The truncation level M M M is uniform over F \mathcal{F} F , while the coefficients may depend on f f f . The lemma indicates that path-dependent target functions can be approximated by linear combinations of a common set of signature features. Consequently, the original ICL problem is reduced to fitting a task-specific linear model within a transformer. The proof of Lemma 3.1 is given in Appendix § 7 .§ 1 .
Signature level and truncation error. Generally speaking, the nonlinearity property of the signature is a Stone–Weierstrass-type result that guarantees uniform approximation but does not specify an explicit rate relating ϵ \epsilon ϵ to M M M . Recently, Horvath et al. [ [38 ] established, under additional smoothness assumptions, an approximation error for Itô diffusions of order ϵ = O ( M − 2 ν ) \epsilon= O(M^{-2\nu}) ϵ = O ( M − 2 ν ) , where ν > 0 \nu> 0 ν > 0 measures the smoothness of the functional. Schenck [ [59 ] gives finite-sample mean squared error bounds for truncated expected signatures from dependent observations, including fractional Ornstein–Uhlenbeck processes.
Empirically, low truncation levels are shown to provide good approximations to path functionals in applications. In finance, terminal and Asian payoffs admit exact linear representations in augmented signatures truncated up to levels three [[58 ] ]. Guo et al. [ [33 ] fits European, Asian, and lookback option payoffs using signatures truncated at level six, and Pérez Arribas [ [58 ] approximates derivative prices under the Black–Scholes model using level four. Lyons et al. [ [51 ] also obtains accurate exotic derivative prices at level five, and Futter et al. [ [28 ] approximates an MACD momentum strategy by a linear signature functional at level three, achieving R 2 = 89.2 % R^2 = 89.2\% R 2 = 89.2% . Beyond derivatives, Gu et al. [ [31 ] combine signature features with Lasso regression to forecast freight transportation rates, with signatures truncated at level three.
Universal Expressivity of Signature-ICL and Error-bound Analysis
In-context Lasso. By the universal signature approximation (Lemma 3.1 ), the original ICL problem is reduced to fitting a task-specific linear model within a transformer.
To exploit the sparsity in the high-dimensional signature space [[33 ] ], we use the Lasso estimator. Let Ψ ∈ R N × P \Psi\in\mathbb{R}^{N \times P} Ψ ∈ R N × P have rows of the pruned signature ψ ( X i ) ⊤ \psi(X_i)^\top ψ ( X i ) ⊤ (eq. (9) ), y = ( Y 1 , … , Y N ) ⊤ y = (Y_1,\ldots,Y_N)^\top y = ( Y 1 , … , Y N ) ⊤ , and define the Lasso objective
J λ ( u ) : = 1 2 N ∥ Ψ u − y ∥ 2 2 + λ ∥ u ∥ 1 , λ > 0. (17) J_\lambda(u) := \frac{1}{2N}\lVert\Psi u-y\rVert_2^2+\lambda\lVert u\rVert_1,\qquad\lambda>0. \tag*{(17)} J λ ( u ) := 2 N 1 ∥ Ψ u − y ∥ 2 2 + λ ∥ u ∥ 1 , λ > 0. (17)
Now, define the corresponding empirical Gram matrix
G N : = N − 1 Ψ ⊤ Ψ = 1 N ∑ i = 1 N ψ ( X i ) ψ ( X i ) ⊤ . (18) G_N := N^{-1}\Psi^\top\Psi= \frac{1}{N}\sum_{i=1}^{N}\psi(X_i)\psi(X_i)^\top. \tag*{(18)} G N := N − 1 Ψ ⊤ Ψ = N 1 i = 1 ∑ N ψ ( X i ) ψ ( X i ) ⊤ . (18)
We will show that transformers (def. 2.3) with signature embeddings have universal expressivity to solve ICL problems in path space.
The analysis relies on several assumptions, which will be further discussed in § 3.4 . All constants in the following are common across tasks.
Assumption 1 (Bounded moments). For any task w w w and i ≥ 1 i \ge1 i ≥ 1 , E w ∥ ψ ( X i ) ∥ 4 4 ≤ B 4 \mathbb{E}_w\lVert\psi(X_i)\rVert_4^4 \le B^4 E w ∥ ψ ( X i ) ∥ 4 4 ≤ B 4 .
Assumption 2 (Sparse signature approximation). For some ϵ ≥ 0 \epsilon\ge0 ϵ ≥ 0 and integer s < P s < P s < P , any target f w ∈ F f_w \in\mathcal{F} f w ∈ F , w ∈ W w \in\mathcal{W} w ∈ W , admits a vector β w ⋆ ∈ R P \beta_w^\star\in\mathbb{R}^P β w ⋆ ∈ R P satisfying, for every X ∈ X X \in\mathcal{X} X ∈ X ,
∣ f w ( X ) − ψ ( X ) ⊤ β w ⋆ ∣ ≤ ϵ , ∥ β w ⋆ ∥ 0 ≤ s . (19) \lvert f_w(X)-\psi(X)^\top\beta_w^\star\rvert\le\epsilon,\qquad\lVert\beta_w^\star\rVert_0 \le s. \tag*{(19)} ∣ f w ( X ) − ψ ( X ) ⊤ β w ⋆ ∣ ≤ ϵ , ∥ β w ⋆ ∥ 0 ≤ s . (19)
The coefficients satisfy ∥ β w ⋆ ∥ 2 ≤ R \lVert\beta_w^\star\rVert_2 \le R ∥ β w ⋆ ∥ 2 ≤ R .
Because the dimension of the signature grows exponentially with the truncation depth, sparsity on the coefficient vector are commonly imposed for statistical analyses of signature regression, for instance, in [[38 ] ] for signature approximation of the Ornstein–Uhlenbeck process and in [[35 ] ] for sparse Itô signature regression of derivative hedging.
For a given task w w w , let S : = supp ( β w ⋆ ) S := \operatorname{supp}(\beta_w^\star) S := supp ( β w ⋆ ) denote the support of β w ⋆ \beta_w^\star β w ⋆ .
Assumption 3 (Restricted strong convexity (RSC)). Let
E w [ G N ] = 1 N ∑ i = 1 N E w [ ψ ( X i ) ψ ( X i ) ⊤ ] , C ( S ) : = { v ∈ R P : ∥ v S c ∥ 1 ≤ 4 ∥ v S ∥ 1 } . (20) \mathbb{E}_w[G_N] = \frac{1}{N}\sum_{i=1}^{N}\mathbb{E}_w[\psi(X_i)\psi(X_i)^\top], \qquad C(S) := \{v \in\mathbb{R}^{P} : \|v_{S^c}\|_1 \le4\|v_S\|_1\}. \tag*{(20)} E w [ G N ] = N 1 i = 1 ∑ N E w [ ψ ( X i ) ψ ( X i ) ⊤ ] , C ( S ) := { v ∈ R P : ∥ v S c ∥ 1 ≤ 4∥ v S ∥ 1 } . (20) There is a common α > 0 \alpha> 0 α > 0 such that, for every task w w w ,
v ⊤ E w [ G N ] v ≥ 2 α ∥ v ∥ 2 2 , ∀ v ∈ C ( S ) . (21) v^\top\mathbb{E}_w[G_N]v \ge2\alpha\|v\|_2^2, \qquad\forall\ v \in C(S). \tag*{(21)} v ⊤ E w [ G N ] v ≥ 2 α ∥ v ∥ 2 2 , ∀ v ∈ C ( S ) . (21)
RSC is a standard condition for Lasso analysis [57 ] . Note that it requires curvature of E w [ G N ] \mathbb{E}_w[G_N] E w [ G N ] only on the cone C ( S ) C(S) C ( S ) instead of the whole space R P \mathbb{R}^P R P . For smooth uniformly elliptic diffusions, linear independence of the pruned time-augmented signature coordinates implies positive definiteness of their Gram matrix at each fixed truncation level [11 ] .
Assumption 4 (Concentration). There exists an absolute constant c > 0 c > 0 c > 0 such that, for any task w w w , the empirical Gram matrix satisfies
P w ( sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v ⊤ ( G N − E w [ G N ] ) v ∣ ≤ α ) ≥ 1 − c ( P N ) − 4 . (22) \mathbb{P}_w\left(\sup_{\substack{v \in C(S),\ \|v\|_2 \le1}}\left|v^\top(G_N-\mathbb{E}_w[G_N])v\right| \le\alpha\right) \ge1-c(PN)^{-4}. \tag*{(22)} P w ( v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v ⊤ ( G N − E w [ G N ]) v ≤ α ) ≥ 1 − c ( P N ) − 4 . (22) In addition, the label noise has conditional mean zero and is σ \sigma σ -sub-Gaussian:
E w [ e t ξ i ∣ X 1 , … , X i , ξ 1 , … , ξ i − 1 ] ≤ e σ 2 t 2 / 2 , t ∈ R , i = 1 , … , N . (23) \mathbb{E}_w\left[e^{t\xi_i}\mid X_1,\ldots,X_i,\xi_1,\ldots,\xi_{i-1}\right]\le e^{\sigma^2t^2/2}, \qquad t\in\mathbb{R},\ i=1,\ldots,N. \tag*{(23)} E w [ e t ξ i ∣ X 1 , … , X i , ξ 1 , … , ξ i − 1 ] ≤ e σ 2 t 2 /2 , t ∈ R , i = 1 , … , N . (23)
The concentration assumption ensures that the empirical Gram matrix G N G_N G N inherits the RSC property of E w [ G N ] \mathbb{E}_w[G_N] E w [ G N ] . It can be verified for several standard stochastic processes, as shown in § 3.4 .
Now we are ready to present our main results, a universal ICL approximation theory of signature-based transformers.
Theorem 3.2 (Universal ICL of path functionals). Suppose Assumptions 1 to 4 hold. For any ϵ T F > 0 \epsilon_{\mathrm{TF}} > 0 ϵ TF > 0 , there exists a transformer T F θ ( ⋅ ) \mathrm{TF}_{\theta}(\cdot) TF θ ( ⋅ ) and a constant C C C such that, for any w ∈ W w \in\mathcal{W} w ∈ W ,
E w ( y ^ T F − f w ( X N + 1 ) ) 2 ≤ C ( ϵ 2 + σ 2 s log ( P N ) N + 1 P N 2 ) + ϵ T F 2 . (24) \mathbb{E}_w\left(\widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2 \le C\left(\epsilon^2+\frac{\sigma^2s\log(PN)}{N}+\frac{1}{PN^2}\right)+\epsilon_{\mathrm{TF}}^2. \tag*{(24)} E w ( y TF − f w ( X N + 1 ) ) 2 ≤ C ( ϵ 2 + N σ 2 s log ( P N ) + P N 2 1 ) + ϵ TF 2 . (24) Here y ^ T F = read y ( T F θ ( H ( 0 ) ) ) \widehat{y}_{\mathrm{TF}}=\operatorname{read}_y(\mathrm{TF}_{\theta}(H^{(0)})) y TF = read y ( TF θ ( H ( 0 ) )) , with H ( 0 ) H^{(0)} H ( 0 ) defined in eq. (13) . The transformer implements in-context signature Lasso: it outputs coefficients ∥ β ^ ∥ ∞ ≤ R \|\widehat{\beta}\|_\infty\le R ∥ β ∥ ∞ ≤ R satisfying E w ( y ^ T F − ⟨ Sig M ( X ~ N + 1 ) , β ^ ⟩ ) 2 ≤ ϵ T F 2 \mathbb{E}_w(\widehat{y}_{\mathrm{TF}}-\langle\operatorname{Sig}_M(\widetilde{X}_{N+1}),\widehat{\beta}\rangle)^2\le\epsilon_{\mathrm{TF}}^2 E w ( y TF − ⟨ Sig M ( X N + 1 ) , β ⟩ ) 2 ≤ ϵ TF 2 and
E w [ J λ ( β ^ ) − min ∥ u ∥ ∞ ≤ R J λ ( u ) ] ≤ ϵ T F \mathbb{E}_w\left[J_\lambda(\widehat{\beta})-\min_{\|u\|_\infty\le R}J_\lambda(u)\right]\le\epsilon_{\mathrm{TF}} E w [ J λ ( β ) − ∥ u ∥ ∞ ≤ R min J λ ( u ) ] ≤ ϵ TF for some penalty λ \lambda λ .
Moreover, the transformer has O ( ϵ T F − 3 ) O(\epsilon_{\mathrm{TF}}^{-3}) O ( ϵ TF − 3 ) layers, with each layer comprising two attention heads of dimension P + 1 P+1 P + 1 and an MLP of width 4 P + 1 4P+1 4 P + 1 , with P = ( d + 1 ) M P=(d+1)^M P = ( d + 1 ) M .
Theorem 3.2 gives an explicit construction of a causal softmax transformer that uses the signature as path embeddings and simulates in-context Lasso: two softmax heads per layer and an MLP that performs soft-thresholding and projection.
It establishes an in-context prediction guarantee for general nonlinear, path-dependent target functions, extending the scope of existing in-context linear-regression constructions [4 , 40 ] . A single signature-based transformer learns any f w ∈ F f_w\in\mathcal{F} f w ∈ F from the demonstrations in context without retraining its parameters. The bound in eq. (24) consists of several sources of error: ϵ 2 \epsilon^2 ϵ 2 captures the signature approximation error, σ 2 s log ( P N ) / N \sigma^2s\log(PN)/N σ 2 s log ( P N ) / N is the canonical Lasso estimation rate, and 1 / ( P N 2 ) 1/(PN^2) 1/ ( P N 2 ) is a tail error term from outside the truncation event. Finally, ϵ T F 2 \epsilon_{\mathrm{TF}}^2 ϵ TF 2 represents the approximation error arising from the transformer construction.
For exact signature representations (ϵ = 0 \epsilon= 0 ϵ = 0 ), sufficiently small ϵ T F \epsilon_{\mathrm{TF}} ϵ TF , and label noise σ 2 ≥ O ( 1 / P N ) \sigma^2 \ge O(1/PN) σ 2 ≥ O ( 1/ P N ) , the theorem yields
E w ( y ^ T F − f w ( X N + 1 ) ) 2 ≤ C σ 2 s log ( P N ) N . (25) \mathbb{E}_w\left(\widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2 \le C\frac{\sigma^2 s\log(PN)}{N}. \tag*{(25)} E w ( y TF − f w ( X N + 1 ) ) 2 ≤ C N σ 2 s log ( P N ) . (25)
This matches the classical Lasso rate up to logarithmic factors [8 , 57 ] .
Assumptions on Bounded Moments and Concentration Inequalities
We now verify Assumption 1 and the empirical RSC bound eq. (3.13) for two classes of processes commonly adopted in financial applications: geometrically mixing diffusions and fractional Ornstein–Uhlenbeck processes. Beyond their role in our ICL analysis, these concentration guarantees are of independent interest for high-dimensional signature regression on dependent paths. The proofs are given in Appendix § 7 .§ 4 .
Diffusion Processes with Geometric Mixing
We first consider dissipative diffusion processes, which are widely studied in short-rate modeling [61 ] , commodity pricing [60 ] , portfolio optimization [32 , 49 ] , and dynamic risk measurement [21 ] . Let Z Z Z be a diffusion process on R d \mathbb{R}^d R d satisfying
d Z t = b ( Z t ) d t + σ ( Z t ) d W t , Z 0 = z 0 , (26) \mathrm{d}Z_t = b(Z_t)\,\mathrm{d}t + \sigma(Z_t)\,\mathrm{d}W_t,\qquad Z_0=z_0, \tag*{(26)} d Z t = b ( Z t ) d t + σ ( Z t ) d W t , Z 0 = z 0 , (26)
where W W W is a standard d d d -dimensional Brownian motion.
Proposition 3.3. Suppose that b b b and σ \sigma σ are globally Lipschitz and satisfy, for all z ∈ R d z \in\mathbb{R}^d z ∈ R d ,
⟨ z , b ( z ) ⟩ ≤ − m ∥ z ∥ 2 2 + γ , c I d ⪯ σ ( z ) σ ( z ) ⊤ ⪯ c ˉ I d , (27) \langle z,b(z)\rangle\le-m\lVert z\rVert_2^2+\gamma,\qquad cI_d \preceq\sigma(z)\sigma(z)^\top\preceq\bar{c}I_d, \tag*{(27)} ⟨ z , b ( z )⟩ ≤ − m ∥ z ∥ 2 2 + γ , c I d ⪯ σ ( z ) σ ( z ) ⊤ ⪯ c ˉ I d , (27) where m , c , c ˉ , γ > 0 m,c,\bar{c},\gamma>0 m , c , c ˉ , γ > 0 are constants. Then the signature features have uniformly bounded fourth moments. Moreover, with probability at least 1 − δ 1-\delta 1 − δ ,
sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v ⊤ ( G N − E w [ G N ] ) v ∣ ≤ C ( s log ( P / δ ) log ( N / δ ) N + s log ( P / δ ) [ log ( N / δ ) ] M + 1 N ) . (28) \sup_{v\in\mathcal{C}(S),\lVert v\rVert_2\le1}\left|v^\top(G_N-\mathbb{E}_w[G_N])v\right|
\le C\left(\sqrt{\frac{s\log(P/\delta)\log(N/\delta)}{N}}+\frac{s\log(P/\delta)[\log(N/\delta)]^{M+1}}{N}\right). \tag*{(28)} v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v ⊤ ( G N − E w [ G N ]) v ≤ C ( N s log ( P / δ ) log ( N / δ ) + N s log ( P / δ ) [ log ( N / δ ) ] M + 1 ) . (28)
Dissipativity with uniform ellipticity leads to geometric ergodicity and thus geometric mixing of successive unit-time paths [53 ] . Together with the signature tail estimates and Bernstein’s inequality, we have the restricted empirical RSC in eq. (28) . In particular, Assumption 1 and eq. (3.13) hold if
N ≥ C s [ log P ] M + 2 . (29) N \ge Cs[\log P]^{M+2}. \tag*{(29)} N ≥ C s [ log P ] M + 2 . (29)
CIR short-rate process. The classical Cox–Ingersoll–Ross (CIR) short-rate model [24 ] satisfies
d Z t = κ ( μ − Z t ) d t + ν Z t d W t , Z 0 = z 0 . (30) \mathrm{d}Z_t=\kappa(\mu-Z_t)\,\mathrm{d}t+\nu\sqrt{Z_t}\,\mathrm{d}W_t,\qquad Z_0=z_0. \tag*{(30)} d Z t = κ ( μ − Z t ) d t + ν Z t d W t , Z 0 = z 0 . (30)
where κ , μ , ν > 0 \kappa,\mu,\nu> 0 κ , μ , ν > 0 , and z 0 ≥ 0 z_0 \ge0 z 0 ≥ 0 . Its diffusion coefficient does not satisfy uniform ellipticity, so Proposition 3.3 does not apply. Nevertheless, its transition kernel is geometrically ergodic [41 ] , and we can verify the conditions directly.
Proposition 3.4. For the CIR process, the signature features have uniformly bounded fourth moments. Moreover, with probability at least 1 − δ 1-\delta 1 − δ ,
sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v T ( G N − E w [ G N ] ) v ∣ ≤ C ( s log ( P / δ ) log ( N / δ ) N + s log ( P / δ ) [ log ( N / δ ) ] 2 M + 1 N ) . (31) \sup_{v\in\mathcal{C}(S),\lVert v\rVert_2\le1}\left|v^{\mathsf{T}}(G_N-\mathbb{E}_w[G_N])v\right|\le C\left(\sqrt{\frac{s\log(P/\delta)\log(N/\delta)}{N}}+\frac{s\log(P/\delta)[\log(N/\delta)]^{2M+1}}{N}\right). \tag*{(31)} v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v T ( G N − E w [ G N ]) v ≤ C ( N s log ( P / δ ) log ( N / δ ) + N s log ( P / δ ) [ log ( N / δ ) ] 2 M + 1 ) . (31)
Therefore Assumption 1 and eq. (3.13) holds for the CIR process if N ≥ C [ s log P ] 2 M + 2 N\ge C[s\log P]^{2M+2} N ≥ C [ s log P ] 2 M + 2 .
Paths with Long-Range Dependence
Fractional Gaussian factors appear in long-memory stochastic volatility models [23 ] and rough log-volatility models [30 ] . We focus on the long-range regime H > 1 / 2 H>1/2 H > 1/2 but treat all Hurst parameters for comparison.
Consider the one-dimensional fractional Ornstein–Uhlenbeck (OU) process
d Z t = − κ Z t d t + ν d W t H , Z 0 = z 0 , (32) \mathrm{d}Z_t=-\kappa Z_t\mathrm{d}t+\nu\mathrm{d}W_t^H,\qquad Z_0=z_0, \tag*{(32)} d Z t = − κ Z t d t + ν d W t H , Z 0 = z 0 , (32)
where W H W^H W H is a standard fractional Brownian motion with H ∈ ( 0 , 1 ) H\in(0,1) H ∈ ( 0 , 1 ) and κ , ν > 0 \kappa,\nu>0 κ , ν > 0 . For H > 1 / 2 H>1/2 H > 1/2 , the covariance of its stationary counterpart decays at rate t 2 H − 2 t^{2H-2} t 2 H − 2 and is not integrable [18 ] . Gaussian covariance estimates give the following bounds for all H ∈ ( 0 , 1 ) H\in(0,1) H ∈ ( 0 , 1 ) .
Proposition 3.5. For the fractional OU process, the signature features have uniformly bounded fourth moments. Moreover, with probability at least 1 − δ 1-\delta 1 − δ ,
sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v T ( G N − E w [ G N ] ) v ∣ ≤ C [ log ( N / δ ) ] M − 1 / 2 s log ( P / δ ) N 2 − max ( 2 H , 1 ) . (33) \sup_{v\in\mathcal{C}(S),\lVert v\rVert_2\le1}\left|v^{\mathsf{T}}(G_N-\mathbb{E}_w[G_N])v\right|\le C[\log(N/\delta)]^{M-1/2}\sqrt{\frac{s\log(P/\delta)}{N^{2-\max(2H,1)}}}. \tag*{(33)} v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v T ( G N − E w [ G N ]) v ≤ C [ log ( N / δ ) ] M − 1/2 N 2 − m a x ( 2 H , 1 ) s log ( P / δ ) . (33)
The constants depend only on M , H , κ , ν M,H,\kappa,\nu M , H , κ , ν , and z 0 z_0 z 0 , so Assumption 1 and eq. (3.13) hold if
N ≥ C ( s [ log P ] 2 M ) 1 / ( 2 − max ( 2 H , 1 ) ) , (34) N\ge C\left(s[\log P]^{2M}\right)^{1/(2-\max(2H,1))}, \tag*{(34)} N ≥ C ( s [ log P ] 2 M ) 1/ ( 2 − m a x ( 2 H , 1 )) , (34)
where C C C also depends on α \alpha α . For H > 1 / 2 H>1/2 H > 1/2 , concentration is governed by N 2 − 2 H N^{2-2H} N 2 − 2 H , so long-range dependence increases the required sample size; for H ≤ 1 / 2 H\le1/2 H ≤ 1/2 the rate is N N N , and H = 1 / 2 H=1/2 H = 1/2 gives the ordinary OU process.
Proof of Theorem 3.2
Assuming the sparse signature approximation, which reduces the non-linear, path-dependent prediction problem to sparse linear regression in the signature feature space, we can decompose the prediction error as
y ^ T F − f w ( X N + 1 ) = ( y ^ T F − ψ ( X N + 1 ) T β ^ ) ⏟ I . T r a n s f o r m e r c o n s t r u c t i o n + ψ ( X N + 1 ) T ( β ^ − β w ⋆ ) ⏟ I I . L a s s o + ( ψ ( X N + 1 ) T β w ⋆ − f w ( X N + 1 ) ) ⏟ I I I . S i g n a t u r e a p p r o x i m a t i o n . (35) \widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})=
\underbrace{\left(\widehat{y}_{\mathrm{TF}}-\psi(X_{N+1})^{\mathsf{T}}\widehat{\beta}\right)}_{\mathrm{I.\ Transformer\ construction}}
+\underbrace{\psi(X_{N+1})^{\mathsf{T}}(\widehat{\beta}-\beta_w^\star)}_{\mathrm{II.\ Lasso}}
+\underbrace{\left(\psi(X_{N+1})^{\mathsf{T}}\beta_w^\star-f_w(X_{N+1})\right)}_{\mathrm{III.\ Signature\ approximation}}. \tag*{(35)} y TF − f w ( X N + 1 ) = I. Transformer construction ( y TF − ψ ( X N + 1 ) T β ) + II. Lasso ψ ( X N + 1 ) T ( β − β w ⋆ ) + III. Signature approximation ( ψ ( X N + 1 ) T β w ⋆ − f w ( X N + 1 ) ) . (35)
Here β w ∗ \beta_w^* β w ∗ is the ground-truth coefficient in signature space and β ^ \hat{\beta} β ^ is an estimator of signature in-context Lasso problem.
In this section, we first outline how the constructed transformer performs in-context Lasso (I), then establish the statistical rate of the signature Lasso estimator (II), and finally combine these ingredients to prove our main theorem.
Step I: Construction of the Transformer
Recall that the transformer takes the prompt format eq. (13) as input and the ℓ \ell ℓ -th layer stores the current coefficient estimate v ( ℓ ) v^{(\ell)} v ( ℓ ) in the last token, i.e.,
v ( ℓ ) = [ H N + 1 ( ℓ ) ] P + 2 : 2 P + 1 ∈ R P . (36) v^{(\ell)} = [H_{N+1}^{(\ell)}]_{P+2:2P+1} \in\mathbb{R}^{P}. \tag*{(36)} v ( ℓ ) = [ H N + 1 ( ℓ ) ] P + 2 : 2 P + 1 ∈ R P . (36)
It approximately minimizes the Lasso objective over [ − R , R ] P [-R,R]^P [ − R , R ] P , which contains β w ∗ \beta_w^* β w ∗ for every task Assumption 2 . The following lemma summarizes this designated mechanism.
Lemma 4.1 (Transformer solves in-context Lasso). Fix a truncation radius K K K . For any γ > 0 \gamma> 0 γ > 0 , there is a transformer with L + 1 L + 1 L + 1 layers and a step size η > 0 \eta> 0 η > 0 satisfying the following for any task w w w when max i ∥ ψ ( X i ) ∥ 2 ≤ K \max_i \|\psi(X_i)\|_2 \le K max i ∥ ψ ( X i ) ∥ 2 ≤ K and max i ∣ Y i ∣ ≤ K \max_i |Y_i| \le K max i ∣ Y i ∣ ≤ K .
(1) It contains L L L optimization layers, and each approximates one proximal-gradient step for J λ ( ⋅ ) J_\lambda(\cdot) J λ ( ⋅ ) in eq. (17) :
∥ v ( ℓ + 1 ) − proj [ − R , R ] P ( S η λ ( v ( ℓ ) − η N Ψ ⊤ ( Ψ v ( ℓ ) − y ) ) ) ∥ 2 ≤ γ , 0 ≤ ℓ < L . (37) \left\|v^{(\ell+1)}-\operatorname{proj}_{[-R,R]^P}\left(S_{\eta\lambda}\left(v^{(\ell)}-\frac{\eta}{N}\Psi^\top(\Psi v^{(\ell)}-y)\right)\right)\right\|_2 \le\gamma,\qquad0\le\ell< L. \tag*{(37)} v ( ℓ + 1 ) − proj [ − R , R ] P ( S η λ ( v ( ℓ ) − N η Ψ ⊤ ( Ψ v ( ℓ ) − y ) ) ) 2 ≤ γ , 0 ≤ ℓ < L . (37) Here S t ( u ) = sign ( u ) ( ∣ u ∣ − t ) + S_t(u)=\operatorname{sign}(u)(|u|-t)_+ S t ( u ) = sign ( u ) ( ∣ u ∣ − t ) + . Specifically, the attention block approximates the squared-loss gradient step, while the MLP applies nonlinear soft-thresholding and projection.
(2) It contains one label readout layer, producing coefficients v = v ( L ) v=v^{(L)} v = v ( L ) and prediction y ^ T F \hat{y}_{\mathrm{TF}} y ^ TF such that
J λ ( v ) ≤ min u ∈ [ − R , R ] P J λ ( u ) + γ , ∣ y ^ T F − ψ ( X N + 1 ) ⊤ v ∣ ≤ γ . (38) J_\lambda(v)\le\min_{u\in[-R,R]^P}J_\lambda(u)+\gamma,\qquad\left|\hat{y}_{\mathrm{TF}}-\psi(X_{N+1})^\top v\right|\le\gamma. \tag*{(38)} J λ ( v ) ≤ u ∈ [ − R , R ] P min J λ ( u ) + γ , y ^ TF − ψ ( X N + 1 ) ⊤ v ≤ γ . (38) (3) Each layer consists of two attention heads with head dimension P + 1 P+1 P + 1 and an MLP block of width 4 P + 1 4P+1 4 P + 1 , and L = O ( K 2 R 2 P / γ ) L=O(K^2R^2P/\gamma) L = O ( K 2 R 2 P / γ ) .
Moreover, for any input prompt (without requiring the bounds on ∥ ψ ( X i ) ∥ 2 \|\psi(X_i)\|_2 ∥ ψ ( X i ) ∥ 2 and ∣ Y i ∣ |Y_i| ∣ Y i ∣ ), it holds that ∥ v ∥ ∞ ≤ R \|v\|_\infty\le R ∥ v ∥ ∞ ≤ R , ∣ y ^ T F ∣ ≤ ∣ ψ ( X N + 1 ) ⊤ v ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 |\hat{y}_{\mathrm{TF}}|\le|\psi(X_{N+1})^\top v|\le R\sqrt{P}\|\psi(X_{N+1})\|_2 ∣ y ^ TF ∣ ≤ ∣ ψ ( X N + 1 ) ⊤ v ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 .
Proof Sketch (for details see Appendix § 8 ). Recall the Lasso objective J λ ( u ) : = 1 2 N ∑ i = 1 N ( ψ ( X i ) ⊤ u − Y i ) 2 + λ ∥ u ∥ 1 J_\lambda(u):=\frac{1}{2N}\sum_{i=1}^{N}(\psi(X_i)^\top u-Y_i)^2+\lambda\|u\|_1 J λ ( u ) := 2 N 1 ∑ i = 1 N ( ψ ( X i ) ⊤ u − Y i ) 2 + λ ∥ u ∥ 1 . We write a token embedding as h = [ x ; y ; v ; b d ; b q ] h=[x;y;v;b_d;b_q] h = [ x ; y ; v ; b d ; b q ] , where x ∈ R P x\in\mathbb{R}^P x ∈ R P is its feature vector and b d b_d b d and b q b_q b q indicate demonstration and query tokens, respectively. We encode the path-label pairs and the query, together with a zero anchor, as
h 0 = [ 0 P ; 0 ; 0 P ; 0 ; 0 ] , h i = [ ψ ( X i ) ; Y i ; 0 P ; 1 ; 0 ] , 1 ≤ i ≤ N , h N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] . (39) \begin{aligned}
h_0 &= [0_P;0;0_P;0;0],\\
h_i &= [\psi(X_i);Y_i;0_P;1;0],\qquad1\le i\le N,\\
h_{N+1} &= [\psi(X_{N+1});0;v;0;1]. \tag*{(39)}
\end{aligned} h 0 h i h N + 1 = [ 0 P ; 0 ; 0 P ; 0 ; 0 ] , = [ ψ ( X i ) ; Y i ; 0 P ; 1 ; 0 ] , 1 ≤ i ≤ N , = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] . (39)
The coefficient vector v v v is initially zero and stores the successive coefficient estimates. We start with input v ( 0 ) = 0 P v^{(0)}=0_P v ( 0 ) = 0 P in the query token, apply L L L optimization layers, and append one label readout layer.
Optimization layers. The central mechanism is that the attention operator naturally emulates the empirical squared-loss gradient through its bilinear inner-product structure, as established in Lemma B.1.
Here is the key idea. For current coefficients v v v , let r i = ψ ( X i ) T v − Y i r_i = \psi(X_i)^{\mathsf{T}}v - Y_i r i = ψ ( X i ) T v − Y i denote the residual. The desired gradient update is
v ⟼ v − η N ∑ i = 1 N r i ψ ( X i ) . (40) v \longmapsto v - \frac{\eta}{N}\sum_{i=1}^{N} r_i\psi(X_i). \tag*{(40)} v ⟼ v − N η i = 1 ∑ N r i ψ ( X i ) . (40)
In an attention block, the query state h N + 1 h_{N+1} h N + 1 updates itself by taking a weighted sum of value vectors extracted from the context states h i h_i h i , where the weights are determined by the inner products ⟨ Q T h N + 1 , K T h i ⟩ \langle Q^{\mathsf{T}}h_{N+1}, K^{\mathsf{T}}h_i\rangle ⟨ Q T h N + 1 , K T h i ⟩ . Thus, by placing the current coefficient vector v v v in h N + 1 h_{N+1} h N + 1 as query and the context ( ψ ( X i ) , Y i ) (\psi(X_i),Y_i) ( ψ ( X i ) , Y i ) in h i h_i h i as key, the inner product evaluates the residual r i r_i r i directly. Specifically, for parameters A , τ > 0 A,\tau> 0 A , τ > 0 , the two-head projections are chosen as
Q ± T h N + 1 = [ v ; 1 ] ∈ R P + 1 , K ± T h i = [ ± τ ψ ( X i ) ; ∓ τ Y i − A ] ∈ R P + 1 , Q_{\pm}^{\mathsf{T}}h_{N+1} = [v;1] \in\mathbb{R}^{P+1}, \qquad K_{\pm}^{\mathsf{T}}h_i = [\pm\tau\psi(X_i);\mp\tau Y_i-A] \in\mathbb{R}^{P+1}, Q ± T h N + 1 = [ v ; 1 ] ∈ R P + 1 , K ± T h i = [ ± τ ψ ( X i ) ; ∓ τ Y i − A ] ∈ R P + 1 ,
V ± T h i = ∓ η e A 2 τ N [ 0 P ; 0 ; ψ ( X i ) ; 0 ; 0 ] . (41) V_{\pm}^{\mathsf{T}}h_i = \mp\frac{\eta e^A}{2\tau N}[0_P;0;\psi(X_i);0;0]. \tag*{(41)} V ± T h i = ∓ 2 τ N η e A [ 0 P ; 0 ; ψ ( X i ) ; 0 ; 0 ] . (41)
Appending the constant 1 to Q ± T h N + 1 Q_{\pm}^{\mathsf{T}}h_{N+1} Q ± T h N + 1 allows the inner product with K ± T h i K_{\pm}^{\mathsf{T}}h_i K ± T h i to compute the affine residual ⟨ Q ± T h N + 1 , K ± T h i ⟩ = − A ± τ r i \langle Q_{\pm}^{\mathsf{T}}h_{N+1},K_{\pm}^{\mathsf{T}}h_i\rangle= -A \pm\tau r_i ⟨ Q ± T h N + 1 , K ± T h i ⟩ = − A ± τ r i , while the linear map V ± T V_{\pm}^{\mathsf{T}} V ± T places the feature vector ψ ( X i ) \psi(X_i) ψ ( X i ) into the coordinates corresponding to v v v with opposite signs across the two heads.
To see how the two heads combine, note that the zero anchor h 0 h_0 h 0 contributes 1 to each softmax denominator. Taking A A A large drives both denominators toward 1, while the factor e A e^A e A in the value vectors compensates for e − A e^{-A} e − A in the demonstration weights. The combined coefficient vector update to v v v is then close to
v − η N ∑ i = 1 N e τ r i − e − τ r i 2 τ ψ ( X i ) ⟶ v − η N ∑ i = 1 N r i ψ ( X i ) as τ ↓ 0. (42) v-\frac{\eta}{N}\sum_{i=1}^{N}\frac{e^{\tau r_i}-e^{-\tau r_i}}{2\tau}\psi(X_i) \longrightarrow v-\frac{\eta}{N}\sum_{i=1}^{N}r_i\psi(X_i)\quad\text{as }\tau\downarrow0. \tag*{(42)} v − N η i = 1 ∑ N 2 τ e τ r i − e − τ r i ψ ( X i ) ⟶ v − N η i = 1 ∑ N r i ψ ( X i ) as τ ↓ 0. (42)
The subsequent MLP block applies soft-thresholding at level η λ \eta\lambda η λ and clips the coefficients to [ − R , R ] P [-R,R]^P [ − R , R ] P , completing the proximal-gradient step as in Lemma B.2 . Note that these coordinatewise operations are piecewise linear and can be represented exactly by the MLP with ReLU activations and width 4 P + 1 4P+1 4 P + 1 . Both blocks preserve the demonstration tokens, so every optimization layer uses the same observations.
Label readout layer. Now the final layer keeps v ( L ) v^{(L)} v ( L ) in the coefficient coordinates. Its two attention heads approximate the inner product ψ ( X N + 1 ) T v ( L ) \psi(X_{N+1})^{\mathsf{T}}v^{(L)} ψ ( X N + 1 ) T v ( L ) and outputs y ^ T F \widehat{y}_{\mathrm{TF}} y TF . Setting the MLP’s weights to zero makes its residual map the identity. The transformer thus has L L L optimization layers and one readout layer to yield y ^ T F \widehat{y}_{\mathrm{TF}} y TF , as detailed in Lemma B.3 .
Optimization bound. Finally, these components are stacked across layers to solve in-context Lasso up to any prescribed optimization tolerance. Specifically, with step size η = ( 1 + K 2 ) − 1 \eta=(1+K^2)^{-1} η = ( 1 + K 2 ) − 1 , the standard proximal-gradient convergence rate [7 ] gives an objective gap of at most γ / 2 \gamma/2 γ /2 after L = O ( K 2 R 2 P / γ ) L=O(K^2R^2P/\gamma) L = O ( K 2 R 2 P / γ ) iterations. Because the exact proximal update is nonexpansive, the iterate error after L L L layers is bounded by L L L times the per-layer approximation error. Choosing the per-layer attention error sufficiently small ensures that the accumulated discrepancy contributes at most γ / 2 \gamma/2 γ /2 to the objective, hence the eq. (38) , with detailed proofs given in Appendix § 8 .§ 2 .
Step II: Statistical Rate of Lasso on Signature Features
The following lemma shows that the approximate in-context Lasso solution produced by our constructed transformer accurately recovers the underlying sparse coefficients, even under dependent path observations.
Lemma 4.2 (Lasso oracle inequality for dependent data). For any task w ∈ W w \in\mathcal{W} w ∈ W , suppose Assumptions 1 to 4 hold. With probability at least 1 − C ( P N ) − 4 1-C(PN)^{-4} 1 − C ( P N ) − 4 under P w \mathbb{P}_w P w , the following statement holds. Let λ > 0 \lambda> 0 λ > 0 satisfy λ ≥ C B 2 + α ( ϵ + σ log ( P N ) / N ) \lambda\ge C\sqrt{B^2+\alpha\left(\epsilon+\sigma\sqrt{\log(PN)/N}\right)} λ ≥ C B 2 + α ( ϵ + σ log ( P N ) / N ) and let γ ≥ 0 \gamma\ge0 γ ≥ 0 . If v ∈ R p v \in\mathbb{R}^p v ∈ R p satisfies J λ ( v ) ≤ J λ ( β w ∗ ) + γ J_\lambda(v) \le J_\lambda(\beta_w^*)+\gamma J λ ( v ) ≤ J λ ( β w ∗ ) + γ , then
∥ v − β w ∗ ∥ 2 ≤ C ( s λ α + γ λ ) . (43) \lVert v-\beta_w^*\rVert_2 \le C\left(\frac{\sqrt{s}\lambda}{\alpha}+\frac{\gamma}{\lambda}\right). \tag*{(43)} ∥ v − β w ∗ ∥ 2 ≤ C ( α s λ + λ γ ) . (43)
The lemma converts the objective gap guarantee of Lemma 4.1 into an ℓ 2 \ell_2 ℓ 2 error bound relative to the target sparse signature coefficients β w ∗ \beta_w^* β w ∗ .
We emphasize that this bound applies to any γ \gamma γ -suboptimal solution of the Lasso objective, and the numerical optimization tolerance adds only a penalty of order γ / λ \gamma/\lambda γ / λ .
In contrast to prior analyses of exact Lasso estimators for time series use L q L^q L q functional dependence measures to quantify decaying temporal correlations [37 , 2 ] , our result here takes a different approach by directly assuming that the empirical Gram matrix of the concentrates around its expectation on the sparsity cone, as stated in eq. (3.13).
The Error-bound Analysis
We now finish the proof of Theorem 3.2 , by combining the transformer construction in Lemma 4.1 with the Lasso bound in Lemma 4.2 and the error decomposition in eq. (35) .
Let us first set the regularization parameter λ \lambda λ and optimization tolerance γ \gamma γ as
λ : = C B 2 + α ( ϵ + σ log ( P N ) N ) , γ : = c 1 ϵ T F λ B + λ , (44) \lambda:= C\sqrt{B^2+\alpha\left(\epsilon+\sigma\sqrt{\frac{\log(PN)}{N}}\right)}, \qquad\gamma:= \frac{c_1\epsilon_{\mathrm{TF}}\lambda}{B+\lambda}, \tag*{(44)} λ := C B 2 + α ( ϵ + σ N log ( P N ) ) , γ := B + λ c 1 ϵ TF λ , (44)
for a sufficiently large constant C > 0 C>0 C > 0 and sufficiently small constant c 1 > 0 c_1>0 c 1 > 0 . Fix a task w w w , then Lemma 4.2 yields an event E \mathcal{E} E with P w ( E c ) ≤ C ( P N ) − 4 \mathbb{P}_w(\mathcal{E}^c)\le C(PN)^{-4} P w ( E c ) ≤ C ( P N ) − 4 on which the oracle bound eq. (43) holds.
Truncation and optimization bounds. Since ∣ f w ( X i ) ∣ ≤ R ∥ ψ ( X i ) ∥ 2 + ϵ \lvert f_w(X_i)\rvert\le R\lVert\psi(X_i)\rVert_2+\epsilon ∣ f w ( X i )∣ ≤ R ∥ ψ ( X i ) ∥ 2 + ϵ , Assumption 1 and the sub-Gaussian noise condition imply sup i ≤ N E w ∣ Y i ∣ 4 ≤ C ( R 4 B 4 + ϵ 4 + σ 4 ) \sup_{i\le N}\mathbb{E}_w\lvert Y_i\rvert^4\le C(R^4B^4+\epsilon^4+\sigma^4) sup i ≤ N E w ∣ Y i ∣ 4 ≤ C ( R 4 B 4 + ϵ 4 + σ 4 ) . For a truncation radius K > 0 K>0 K > 0 , define the truncation event
E K : = { max i ≤ N + 1 ∥ ψ ( X i ) ∥ 2 ≤ K , max i ≤ N ∣ Y i ∣ ≤ K } , \mathcal{E}_K := \left\{\max_{i\le N+1}\lVert\psi(X_i)\rVert_2\le K,\quad\max_{i\le N}\lvert Y_i\rvert\le K\right\}, E K := { i ≤ N + 1 max ∥ ψ ( X i ) ∥ 2 ≤ K , i ≤ N max ∣ Y i ∣ ≤ K } ,
which satisfies P w ( E K c ) = O ( K − 4 ) \mathbb{P}_w(\mathcal{E}_K^c)=O(K^{-4}) P w ( E K c ) = O ( K − 4 ) by Markov’s inequality. Let T F θ \mathrm{TF}_\theta TF θ be the transformer from Lemma 4.1 with truncation radius K K K and optimization tolerance γ \gamma γ , and write β ^ : = v ( L ) \widehat{\beta}:=v^{(L)} β := v ( L ) for its extracted coefficient vector.
For every prompt, the bounds ∥ β ^ ∥ ∞ ≤ R \|\hat{\beta}\|_{\infty} \le R ∥ β ^ ∥ ∞ ≤ R and ∣ y ^ T F ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 |\hat{y}_{\mathrm{TF}}| \le R\sqrt{P}\|\psi(X_{N+1})\|_2 ∣ y ^ TF ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 from Lemma 4.1 imply
( y ^ T F − f w ( X N + 1 ) ) 2 ≤ 2 R 2 ( P + 1 ) 2 ∥ ψ ( X N + 1 ) ∥ 2 2 + 2 ϵ 2 = : U p r e d , \left(\hat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2 \le2R^2\left(\sqrt{P}+1\right)^2\|\psi(X_{N+1})\|_2^2+2\epsilon^2=:U_{\mathrm{pred}}, ( y ^ TF − f w ( X N + 1 ) ) 2 ≤ 2 R 2 ( P + 1 ) 2 ∥ ψ ( X N + 1 ) ∥ 2 2 + 2 ϵ 2 =: U pred ,
J λ ( β ^ ) − min ∥ u ∥ ∞ ≤ R J λ ( u ) ≤ 1 N ∑ i = 1 N ( R 2 P ∥ ψ ( X i ) ∥ 2 2 + Y i 2 ) + λ R P = : U o b j , (45) J_\lambda(\hat{\beta})-\min_{\|u\|_\infty\le R}J_\lambda(u)\le\frac{1}{N}\sum_{i=1}^{N}\left(R^2P\|\psi(X_i)\|_2^2+Y_i^2\right)+\lambda RP=:U_{\mathrm{obj}}, \tag*{(45)} J λ ( β ^ ) − ∥ u ∥ ∞ ≤ R min J λ ( u ) ≤ N 1 i = 1 ∑ N ( R 2 P ∥ ψ ( X i ) ∥ 2 2 + Y i 2 ) + λ R P =: U obj , (45)
( y ^ T F − ψ ( X N + 1 ) T β ^ ) 2 ≤ 4 R 2 P ∥ ψ ( X N + 1 ) ∥ 2 2 = : U r e a d . \left(\hat{y}_{\mathrm{TF}}-\psi(X_{N+1})^{\mathsf{T}}\hat{\beta}\right)^2\le4R^2P\|\psi(X_{N+1})\|_2^2=:U_{\mathrm{read}}. ( y ^ TF − ψ ( X N + 1 ) T β ^ ) 2 ≤ 4 R 2 P ∥ ψ ( X N + 1 ) ∥ 2 2 =: U read .
By Assumption 1 , each U ∈ { U p r e d , U o b j , U r e a d } U\in\{U_{\mathrm{pred}},U_{\mathrm{obj}},U_{\mathrm{read}}\} U ∈ { U pred , U obj , U read } has a uniformly bounded second moment. Therefore E w [ U 1 E K c ] ≤ ( E w U 2 ) 1 / 2 P w ( E K c ) 1 / 2 = O ( K − 2 ) \mathbb{E}_w[U\mathbf{1}_{\mathcal{E}_K^c}]\le(\mathbb{E}_wU^2)^{1/2}\mathbb{P}_w(\mathcal{E}_K^c)^{1/2}=O(K^{-2}) E w [ U 1 E K c ] ≤ ( E w U 2 ) 1/2 P w ( E K c ) 1/2 = O ( K − 2 ) uniformly over tasks. Now let us choose K 2 = O ( ϵ T F − 2 ) K^2=O(\epsilon_{\mathrm{TF}}^{-2}) K 2 = O ( ϵ TF − 2 ) large enough so that
E w [ U 1 E K c ] ≤ ϵ T F 2 2 , for U ∈ { U p r e d , U o b j , U r e a d } . (46) \mathbb{E}_w[U\mathbf{1}_{\mathcal{E}_K^c}]\le\frac{\epsilon_{\mathrm{TF}}^2}{2},\qquad\text{for }U\in\{U_{\mathrm{pred}},U_{\mathrm{obj}},U_{\mathrm{read}}\}. \tag*{(46)} E w [ U 1 E K c ] ≤ 2 ϵ TF 2 , for U ∈ { U pred , U obj , U read } . (46)
Since γ ≤ ϵ T F / 2 \gamma\le\epsilon_{\mathrm{TF}}/2 γ ≤ ϵ TF /2 , decomposing expectations over E K \mathcal{E}_K E K and E K c \mathcal{E}_K^c E K c establishes the objective-gap and readout bounds of Theorem 3.2 :
E w [ J λ ( β ^ ) − min ∥ u ∥ ∞ ≤ R J λ ( u ) ] ≤ γ + ϵ T F 2 2 ≤ ϵ T F , E w ( y ^ T F − ψ ( X N + 1 ) T β ^ ) 2 ≤ γ 2 + ϵ T F 2 2 ≤ ϵ T F 2 . \mathbb{E}_w\left[J_\lambda(\hat{\beta})-\min_{\|u\|_\infty\le R}J_\lambda(u)\right]\le\gamma+\frac{\epsilon_{\mathrm{TF}}^2}{2}\le\epsilon_{\mathrm{TF}},\qquad
\mathbb{E}_w\left(\hat{y}_{\mathrm{TF}}-\psi(X_{N+1})^{\mathsf{T}}\hat{\beta}\right)^2\le\gamma^2+\frac{\epsilon_{\mathrm{TF}}^2}{2}\le\epsilon_{\mathrm{TF}}^2. E w [ J λ ( β ^ ) − ∥ u ∥ ∞ ≤ R min J λ ( u ) ] ≤ γ + 2 ϵ TF 2 ≤ ϵ TF , E w ( y ^ TF − ψ ( X N + 1 ) T β ^ ) 2 ≤ γ 2 + 2 ϵ TF 2 ≤ ϵ TF 2 .
Prediction error on E ∩ E K \mathcal{E}\cap\mathcal{E}_K E ∩ E K . Since ∥ β w ⋆ ∥ ∞ ≤ ∥ β w ⋆ ∥ 2 ≤ R \|\beta_w^\star\|_\infty\le\|\beta_w^\star\|_2\le R ∥ β w ⋆ ∥ ∞ ≤ ∥ β w ⋆ ∥ 2 ≤ R by Assumption 2 , the objective-gap bound on E K \mathcal{E}_K E K implies J λ ( β ^ ) ≤ J λ ( β w ⋆ ) + γ J_\lambda(\hat{\beta})\le J_\lambda(\beta_w^\star)+\gamma J λ ( β ^ ) ≤ J λ ( β w ⋆ ) + γ . On E ∩ E K \mathcal{E}\cap\mathcal{E}_K E ∩ E K , Lemma 4.2 then gives
∥ β ^ − β w ⋆ ∥ 2 ≤ C ( s λ α + γ λ ) . \|\hat{\beta}-\beta_w^\star\|_2\le C\left(\frac{\sqrt{s}\lambda}{\alpha}+\frac{\gamma}{\lambda}\right). ∥ β ^ − β w ⋆ ∥ 2 ≤ C ( α s λ + λ γ ) .
Decomposing the prediction error as
y ^ T F − f w ( X N + 1 ) = ( y ^ T F − ψ ( X N + 1 ) T β ^ ) ⏟ ( I ) + ψ ( X N + 1 ) T ( β ^ − β w ⋆ ) ⏟ ( I I ) + ( ψ ( X N + 1 ) T β w ⋆ − f w ( X N + 1 ) ) ⏟ ( I I I ) (47) \hat{y}_{\mathrm{TF}}-f_w(X_{N+1})=
\underbrace{\left(\hat{y}_{\mathrm{TF}}-\psi(X_{N+1})^{\mathsf{T}}\hat{\beta}\right)}_{\mathrm{(I)}}
+\underbrace{\psi(X_{N+1})^{\mathsf{T}}\left(\hat{\beta}-\beta_w^\star\right)}_{\mathrm{(II)}}
+\underbrace{\left(\psi(X_{N+1})^{\mathsf{T}}\beta_w^\star-f_w(X_{N+1})\right)}_{\mathrm{(III)}} \tag*{(47)} y ^ TF − f w ( X N + 1 ) = ( I ) ( y ^ TF − ψ ( X N + 1 ) T β ^ ) + ( II ) ψ ( X N + 1 ) T ( β ^ − β w ⋆ ) + ( III ) ( ψ ( X N + 1 ) T β w ⋆ − f w ( X N + 1 ) ) (47)
we have ∣ ( I ) ∣ ≤ γ |\mathrm{(I)}|\le\gamma ∣ ( I ) ∣ ≤ γ , ∣ ( I I ) ∣ ≤ ∥ ψ ( X N + 1 ) ∥ 2 ∥ β ^ − β w ⋆ ∥ 2 |\mathrm{(II)}|\le\|\psi(X_{N+1})\|_2\|\hat{\beta}-\beta_w^\star\|_2 ∣ ( II ) ∣ ≤ ∥ ψ ( X N + 1 ) ∥ 2 ∥ β ^ − β w ⋆ ∥ 2 by Cauchy–Schwarz, and ∣ ( I I I ) ∣ ≤ ϵ |\mathrm{(III)}|\le\epsilon ∣ ( III ) ∣ ≤ ϵ by eq. (19) on E ∩ E K \mathcal{E}\cap\mathcal{E}_K E ∩ E K . Combining these bounds, squaring, and taking expectations using E w ∥ ψ ( X N + 1 ) ∥ 2 2 ≤ B 2 \mathbb{E}_w\|\psi(X_{N+1})\|_2^2\le B^2 E w ∥ ψ ( X N + 1 ) ∥ 2 2 ≤ B 2 (Assumption 1 ) yields
E w [ ( y ^ T F − f w ( X N + 1 ) ) 2 1 E ∩ E K ] ≤ C ϵ 2 + C B 2 s λ 2 α 2 + C γ 2 ( 1 + B 2 λ 2 ) . \mathbb{E}_w\left[\left(\hat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2\mathbf{1}_{\mathcal{E}\cap\mathcal{E}_K}\right]\le C\epsilon^2+\frac{CB^2s\lambda^2}{\alpha^2}+C\gamma^2\left(1+\frac{B^2}{\lambda^2}\right). E w [ ( y ^ TF − f w ( X N + 1 ) ) 2 1 E ∩ E K ] ≤ C ϵ 2 + α 2 C B 2 s λ 2 + C γ 2 ( 1 + λ 2 B 2 ) .
By Assumptions 1 and 3 and eq. (44) ,
s λ 2 ≤ 2 C 2 ( B 2 + α ) ( B 2 2 α ϵ 2 + σ 2 s log ( P N ) N ) . s\lambda^2\le2C^2(B^2+\alpha)\left(\frac{B^2}{2\alpha}\epsilon^2+\frac{\sigma^2s\log(PN)}{N}\right). s λ 2 ≤ 2 C 2 ( B 2 + α ) ( 2 α B 2 ϵ 2 + N σ 2 s log ( P N ) ) .
Since γ 2 ( 1 + B 2 / λ 2 ) ≤ c 1 2 ϵ T F 2 \gamma^2(1+B^2/\lambda^2)\le c_1^2\epsilon_{\mathrm{TF}}^2 γ 2 ( 1 + B 2 / λ 2 ) ≤ c 1 2 ϵ TF 2 , taking c 1 c_1 c 1 sufficiently small yields
E w [ ( y ^ T F − f w ( X N + 1 ) ) 2 1 E ∩ E K ] ≤ C ( ϵ 2 + σ 2 s log ( P N ) N ) + ϵ T F 2 2 . (48) \mathbb{E}_w\left[\left(\hat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2\mathbf{1}_{\mathcal{E}\cap\mathcal{E}_K}\right]\le C\left(\epsilon^2+\frac{\sigma^2s\log(PN)}{N}\right)+\frac{\epsilon_{\mathrm{TF}}^2}{2}. \tag*{(48)} E w [ ( y ^ TF − f w ( X N + 1 ) ) 2 1 E ∩ E K ] ≤ C ( ϵ 2 + N σ 2 s log ( P N ) ) + 2 ϵ TF 2 . (48)
Tail error. On the complement ( E ∩ E K ) c = E c ∪ E K c (\mathcal{E} \cap\mathcal{E}_K)^c = \mathcal{E}^c \cup\mathcal{E}_K^c ( E ∩ E K ) c = E c ∪ E K c , we bound the contribution of each event separately. For E K c \mathcal{E}_K^c E K c , eqs. (45) and (46) give
E w [ ( y ^ T F − f w ( X N + 1 ) ) 2 1 E K c ] ≤ E w [ U p r e d 1 E K c ] ≤ ϵ T F 2 2 . \mathbb{E}_w\left[\left(\widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2\mathbf{1}_{\mathcal{E}_K^c}\right]\leq\mathbb{E}_w\left[U_{\mathrm{pred}}\mathbf{1}_{\mathcal{E}_K^c}\right]\leq\frac{\epsilon_{\mathrm{TF}}^2}{2}. E w [ ( y TF − f w ( X N + 1 ) ) 2 1 E K c ] ≤ E w [ U pred 1 E K c ] ≤ 2 ϵ TF 2 .
Meanwhile, on E c \mathcal{E}^c E c , applying Cauchy–Schwarz to eq. (45) with P w ( E c ) ≤ C ( P N ) − 4 \mathbb{P}_w(\mathcal{E}^c)\leq C(PN)^{-4} P w ( E c ) ≤ C ( P N ) − 4 yields
E w [ ( y ^ T F − f w ( X N + 1 ) ) 2 1 E c ] ≤ 2 R 2 ( P + 1 ) 2 B 2 P w ( E c ) 1 / 2 + 2 ϵ 2 P w ( E c ) ≤ C P N 2 + C ϵ 2 ( P N ) 4 . \mathbb{E}_w\left[\left(\widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2\mathbf{1}_{\mathcal{E}^c}\right]\leq2R^2(\sqrt{P}+1)^2B^2\mathbb{P}_w(\mathcal{E}^c)^{1/2}+2\epsilon^2\mathbb{P}_w(\mathcal{E}^c)\leq\frac{C}{PN^2}+\frac{C\epsilon^2}{(PN)^4}. E w [ ( y TF − f w ( X N + 1 ) ) 2 1 E c ] ≤ 2 R 2 ( P + 1 ) 2 B 2 P w ( E c ) 1/2 + 2 ϵ 2 P w ( E c ) ≤ P N 2 C + ( P N ) 4 C ϵ 2 .
Now, summing eq. (48) with both tail bounds proves eq. (24) :
E w ( y ^ T F − f w ( X N + 1 ) ) 2 ≤ C ( ϵ 2 + σ 2 S log ( P N ) N + 1 P N 2 ) + ϵ T F 2 . \mathbb{E}_w\left(\widehat{y}_{\mathrm{TF}}-f_w(X_{N+1})\right)^2\leq C\left(\epsilon^2+\frac{\sigma^2S\log(PN)}{N}+\frac{1}{PN^2}\right)+\epsilon_{\mathrm{TF}}^2. E w ( y TF − f w ( X N + 1 ) ) 2 ≤ C ( ϵ 2 + N σ 2 S log ( P N ) + P N 2 1 ) + ϵ TF 2 .
Transformer configuration. Equation (44) gives γ − 1 = O ( ϵ T F − 1 ) \gamma^{-1}=\mathcal{O}(\epsilon_{\mathrm{TF}}^{-1}) γ − 1 = O ( ϵ TF − 1 ) . Combined with K 2 = O ( ϵ T F − 2 ) K^2=\mathcal{O}(\epsilon_{\mathrm{TF}}^{-2}) K 2 = O ( ϵ TF − 2 ) , taking the configuration in Lemma 4.1 yields a total number of layers of
L + 1 = 1 + ⌈ ( 1 + K 2 ) R 2 P γ ⌉ = O ( ϵ T F − 3 ) . L+1=1+\left\lceil\frac{(1+K^2)R^2P}{\gamma}\right\rceil=\mathcal{O}(\epsilon_{\mathrm{TF}}^{-3}). L + 1 = 1 + ⌈ γ ( 1 + K 2 ) R 2 P ⌉ = O ( ϵ TF − 3 ) .
And each layer contains two softmax attention heads with head dimension P + 1 P+1 P + 1 , followed by an MLP block of width 4 P + 1 4P+1 4 P + 1 .
Experiments
The goal of our experiments is to demonstrate the effectiveness of the signature transform as a path representation for ICL with nonlinear path-dependent functionals. We will first examine sparse recovery of signature features with transformers, then evaluate signature-based ICL on three experiments: regression on controlled differential equations, optimal execution, and options with path-dependent payoff using market data.
We will compare three path-embedding methods: TF-Raw-Flat applies a learnable map directly to the vectorized raw path observations; TF-Raw-Seq processes the raw path through a sequence encoder to capture sequential structure; and TF-Sig directly embeds the truncated signature features (omitting the constant zeroth-order term). Within each experiment, the resulting path embeddings are then fed into a transformer, which is trained separately, to perform in-context prediction. All results are aggregated over three independent runs.
In-Context Sparse Recovery of Signature Features
We first test whether TF-Sig can recover the active signature coordinates of an unknown sparse linear functional in context.
Let Z Z Z be a standard five-dimensional Brownian motion over the time interval [ 0 , 1 ] [0,1] [ 0 , 1 ] , and define each input path X X X as the piecewise linear interpolation of 17 uniform observations of Z Z Z at t j = j / 16 t_j=j/16 t j = j /16 (j = 0 , … , 16 j=0,\ldots,16 j = 0 , … , 16 ). We compute the normalized signature up to level three to get ψ ( X ) ∈ R 155 \psi(X)\in\mathbb{R}^{155} ψ ( X ) ∈ R 155 . For each task, the ground-truth coefficient β ⋆ ∈ R 155 \beta^\star\in\mathbb{R}^{155} β ⋆ ∈ R 155 has 16 uniformly sampled active coordinates, with independent random signs and magnitudes drawn uniformly from [ 0.7 , 1.3 ] / 4 [0.7, 1.3]/4 [ 0.7 , 1.3 ] /4 . The label is given by Y = ψ ( X ) ⊤ β ⋆ Y = \psi(X)^\top\beta^\star Y = ψ ( X ) ⊤ β ⋆ .
The path encoder E S i g E_{\mathrm{Sig}} E Sig then maps ψ ( X ) \psi(X) ψ ( X ) into R 1152 \mathbb{R}^{1152} R 1152 via a linear projection followed by LayerNorm. Given learnable role embeddings r 0 , r c , r β ∈ R 1152 r_0, r_c, r_\beta\in\mathbb{R}^{1152} r 0 , r c , r β ∈ R 1152 , we construct the prompt sequence
z 0 = r 0 , z i = W i n [ E S i g ( X i ) ; Y i ] + r c , i = 1 , … , N , z N + 1 = r β . (49) z_0 = r_0,\qquad z_i = W_{\mathrm{in}}[E_{\mathrm{Sig}}(X_i);Y_i] + r_c,\qquad i = 1,\ldots,N,\qquad z_{N+1} = r_\beta. \tag*{(49)} z 0 = r 0 , z i = W in [ E Sig ( X i ) ; Y i ] + r c , i = 1 , … , N , z N + 1 = r β . (49)
Here z N + 1 z_{N+1} z N + 1 is a virtual readout token. A 12-layer, eight-head causal transformer then processes ( z 0 , … , z N + 1 ) (z_0,\ldots,z_{N+1}) ( z 0 , … , z N + 1 ) and a linear head maps the terminal state of z N + 1 z_{N+1} z N + 1 directly to the coefficient estimate β ^ ∈ R 155 \hat{\beta} \in\mathbb{R}^{155} β ^ ∈ R 155 .
We train T F TF T F -Sig for 10 6 10^6 1 0 6 steps across context lengths N ∈ { 32 , 64 , 128 } N \in\{32, 64, 128\} N ∈ { 32 , 64 , 128 } by minimizing the prediction MSE together with an explicit coefficient loss 0.1 ∥ β ^ − β ⋆ ∥ 2 2 0.1\lVert\hat{\beta} - \beta^\star\rVert_2^2 0.1 ∥ β ^ − β ⋆ ∥ 2 2 , thereby providing direct supervision on β ⋆ \beta^\star β ⋆ during training. As a baseline, we compare against L a s s o Lasso L a sso -Sig fit directly on ψ ( X ) \psi(X) ψ ( X ) , tuning its ℓ 1 \ell_1 ℓ 1 penalty via cross-validation.
Results. As shown in Table 1 , increasing the context length from N = 32 N = 32 N = 32 to N = 128 N = 128 N = 128 raises T F TF T F -Sig’s support recovery F1 from 0.404 to 0.988. Moreover, support recovery generalizes smoothly to unseen context lengths, reaching 0.999 at N = 256 N = 256 N = 256 and 1.000 at $N = 512. Because the ground-truth functional is strictly linear in ψ ( X ) \psi(X) ψ ( X ) , L a s s o Lasso L a sso -Sig is well-specified and recovers the exact support on every test task from N = 128 N = 128 N = 128 onward.
Table 1. Support recovery F1 scores, where the estimated support is defined by ∣ β ^ j ∣ > 0.05 |\hat{\beta}_j| > 0.05 ∣ β ^ j ∣ > 0.05 . Contexts N ∈ { 256 , 512 } N \in\{256, 512\} N ∈ { 256 , 512 } extrapolate beyond T F TF T F -Sig’s maximum training length (N = 128 N = 128 N = 128 ).
Overall, these results confirm that a transformer with signature features can effectively simulate in-context Lasso for sparse feature recovery.
Robustness of the Signature to Path Observation Grids
Task setup. We construct this example to evaluate ICL on nonlinear path-dependent functions that admit an exact signature representation.
Let Z Z Z be a stationary five-dimensional OU process
d Z t = − 1 2 Z t d t + L d W t , ( L L ⊤ ) r s = 0.6 ∣ r − s ∣ , 1 ≤ r , s ≤ 5. (50) \mathrm{d}Z_t = -\frac{1}{2}Z_t\,\mathrm{d}t + L\,\mathrm{d}W_t,\qquad(LL^\top)_{rs} = 0.6^{|r-s|},\qquad1 \le r,s \le5. \tag*{(50)} d Z t = − 2 1 Z t d t + L d W t , ( L L ⊤ ) r s = 0. 6 ∣ r − s ∣ , 1 ≤ r , s ≤ 5. (50)
where Z 0 ∼ N ( 0 5 , L L ⊤ ) Z_0 \sim\mathcal{N}(0_5, LL^\top) Z 0 ∼ N ( 0 5 , L L ⊤ ) . For j = 1 , … , N + 1 j = 1,\ldots,N+1 j = 1 , … , N + 1 , define the observed path on the uniform grid by
X j ( t ℓ ) = Z j − 1 + t ℓ − Z j − 1 2 ( 1 − e − 1 / 2 ) , t ℓ = ℓ 32 , ℓ = 0 , … , 32 , X_j(t_\ell) = \frac{Z_{j-1+t_\ell} - Z_{j-1}}{\sqrt{2(1-e^{-1/2})}},\qquad t_\ell= \frac{\ell}{32},\qquad\ell= 0,\ldots,32, X j ( t ℓ ) = 2 ( 1 − e − 1/2 ) Z j − 1 + t ℓ − Z j − 1 , t ℓ = 32 ℓ , ℓ = 0 , … , 32 ,
and interpolate linearly between grid points. A task parameter θ ∼ N ( 0 , I 3 ) \theta\sim\mathcal{N}(0,I_3) θ ∼ N ( 0 , I 3 ) then determines the controlled differential equation driven by X X X :
d u t = ∑ i = 1 5 A i ( θ ) u t d X ( i ) ( t ) , u 0 = ( 0 , 0 , 0 , 0 , 1 ) ⊤ , 0 ≤ t ≤ 1. (51) \mathrm{d}u_t = \sum_{i=1}^{5} A_i(\theta)u_t\,\mathrm{d}X^{(i)}(t),\qquad u_0 = (0,0,0,0,1)^\top,\qquad0 \le t \le1. \tag*{(51)} d u t = i = 1 ∑ 5 A i ( θ ) u t d X ( i ) ( t ) , u 0 = ( 0 , 0 , 0 , 0 , 1 ) ⊤ , 0 ≤ t ≤ 1. (51)
Here A i ( θ ) ∈ R 5 × 5 A_i(\theta) \in\mathbb{R}^{5 \times5} A i ( θ ) ∈ R 5 × 5 is supported on its first superdiagonal:
[ A i ( θ ) ] r , r + 1 = ( C i θ ) r , r = 1 , … , 4 , [A_i(\theta)]_{r,r+1} = (C_i\theta)_r,\qquad r = 1,\ldots,4, [ A i ( θ ) ] r , r + 1 = ( C i θ ) r , r = 1 , … , 4 ,
with all other entries equal to zero, and C 1 , … , C 5 ∈ R 4 × 3 C_1,\ldots,C_5 \in\mathbb{R}^{4 \times3} C 1 , … , C 5 ∈ R 4 × 3 fixed matrices. The observed label is given by Y = tanh ( u 1 ( 1 ) ) + ξ Y = \tanh(u_1^{(1)}) + \xi Y = tanh ( u 1 ( 1 ) ) + ξ , where u 1 ( 1 ) u_1^{(1)} u 1 ( 1 ) denotes the first coordinate of u 1 u_1 u 1 and ξ ∼ N ( 0 , 0.1 2 ) \xi\sim\mathcal{N}(0,0.1^2) ξ ∼ N ( 0 , 0. 1 2 ) is independent Gaussian noise. Because the matrices A i ( θ ) A_i(\theta) A i ( θ ) are supported solely on the first superdiagonal, a product of these matrices has a nonzero ( 1 , 5 ) (1,5) ( 1 , 5 ) entry if and only if it consists of exactly four factors. The signature expansion for linear controlled differential equations [50 Section 4] therefore reduces to the fourth signature level:
u 1 ( 1 ) = ∑ i 1 , … , i 4 = 1 5 [ A i 4 ( θ ) ⋯ A i 1 ( θ ) ] 1 , 5 [ Sig ( 4 ) ( X ) ] i 1 , … , i 4 . u_1^{(1)} = \sum_{i_1,\ldots,i_4=1}^{5} [A_{i_4}(\theta)\cdots A_{i_1}(\theta)]_{1,5}[\operatorname{Sig}^{(4)}(X)]_{i_1,\ldots,i_4}. u 1 ( 1 ) = i 1 , … , i 4 = 1 ∑ 5 [ A i 4 ( θ ) ⋯ A i 1 ( θ ) ] 1 , 5 [ Sig ( 4 ) ( X ) ] i 1 , … , i 4 .
Consequently, the fourth-order truncated signature retains all path information required to determine the label.
Path and prompt encoding. TF-Raw-Flat , TF-Raw-Seq , and TF-Sig have different path encoders, E F l a t E_{\mathrm{Flat}} E Flat , E S e q E_{\mathrm{Seq}} E Seq , E S i g E_{\mathrm{Sig}} E Sig , respectively, with embedding dimension 128. TF-Raw-Flat linearly projects the 33 × 5 = 165 33 \times5 = 165 33 × 5 = 165 flattened path coordinates to E F l a t ( X ) E_{\mathrm{Flat}}(X) E Flat ( X ) . TF-Raw-Seq encodes each path’s 32 points with a two-layer gated recurrent unit (GRU), then linearly projects its final hidden state to E S e q ( X ) E_{\mathrm{Seq}}(X) E Seq ( X ) . TF-Sig computes E S i g ( X ) E_{\mathrm{Sig}}(X) E Sig ( X ) by linearly projecting the normalized fourth-order truncated signature ψ ( X ) ∈ R 780 \psi(X) \in\mathbb{R}^{780} ψ ( X ) ∈ R 780 . Given a learnable affine label encoder ϕ y \phi_y ϕ y , fixed sinusoidal embeddings p j p_j p j indexed by example [62 ] , and learnable path/label type embeddings r x , r y r_x,r_y r x , r y , the input tokens are defined as
z 2 j − 2 = E ( X j ) + p j + r x , 1 ≤ j ≤ 33 , z 2 j − 1 = ϕ y ( y j ) + p j + r y , 1 ≤ j ≤ 32. (52) z_{2j-2} = E(X_j) + p_j + r_x,\quad1 \leq j \leq33,\qquad z_{2j-1} = \phi_y(y_j) + p_j + r_y,\quad1 \leq j \leq32. \tag*{(52)} z 2 j − 2 = E ( X j ) + p j + r x , 1 ≤ j ≤ 33 , z 2 j − 1 = ϕ y ( y j ) + p j + r y , 1 ≤ j ≤ 32. (52)
The prompt ( z 0 , … , z 64 ) ∈ R 65 × 128 (z_0,\ldots,z_{64}) \in\mathbb{R}^{65 \times128} ( z 0 , … , z 64 ) ∈ R 65 × 128 is then fed into a four-layer global causal transformer with 8 attention heads. During training, a shared linear readout head predicts each label Y j Y_j Y j from the preceding j − 1 j-1 j − 1 demonstrations, and the model is optimized by averaging the prediction losses across all positions.
Results. At test time, we predict the query label Y 33 Y_{33} Y 33 conditioned on all N = 32 N = 32 N = 32 demonstrations and report the mean squared error (MSE) and R 2 R^2 R 2 against the ground-truth targets. Beyond the 33-point uniform grid used in training, at test time we vary both the number and the placement of observation times for the demonstration and query paths to assess the ICL robustness. As shown in Table 2 , signature-based ICL is robust with respect to changes in the path observation grids. On the in-distribution (ID) training grid, TF-Sig attains an R 2 R^2 R 2 of 0.85, substantially outperforming TF-Raw-Seq (0.64) and TF-Raw-Flat (0.30).
Table 2. MSE across different observation grids. Interval denotes the mean spacing between observations. Because TF-Raw-Flat requires a fixed input of 33 grid points for each path, paths with 9 or 17 observations are linearly interpolated onto the 33-point training grid (ID).
Across all evaluated uniform and nonuniform test grids, TF-Sig consistently achieves the lowest MSE. Although coarser discretizations and irregular sampling increase the error of both TF-Raw-Seq and TF-Sig , TF-Sig maintains a clear advantage across every regime.
Optimal Execution: Adaptation to Unseen Market Environments
Task setup. We consider a financial optimal-execution task with unknown transient price impact, using kernel families adapted from Meng et al. [ [55 ] . Given a trading-rate schedule u = ( u t ) t ∈ [ 0 , T ] u = (u_t)_{t\in[0,T]} u = ( u t ) t ∈ [ 0 , T ] , let Q t = ∫ 0 t u s d s Q_t = \int_0^t u_s\,\mathrm{d}s Q t = ∫ 0 t u s d s denote the cumulative traded volume, and define the augmented state path X = ( t , Q t , u t ) t ∈ [ 0 , T ] \mathbf{X} = (t,Q_t,u_t)_{t\in[0,T]} X = ( t , Q t , u t ) t ∈ [ 0 , T ] . A latent task parameter θ = ( λ , δ , η ) \theta= (\lambda,\delta,\eta) θ = ( λ , δ , η ) governs the transient price impact I θ , u ( t ) I_{\theta,u}(t) I θ , u ( t ) and the resulting per-unit execution cost f θ ( X ) f_\theta(\mathbf{X}) f θ ( X ) :
I θ , u ( t ) = λ ∫ 0 t G η ( t − s ) sgn ( u s ) ∣ u s ∣ δ d s , f θ ( X ) = 1 ∣ Q T ∣ ∫ 0 T u t I θ , u ( t ) d t , X = ( ( t , Q t , u t ) ) t ∈ [ 0 , T ] . (53) \begin{aligned}
I_{\theta,u}(t) &= \lambda\int_0^t G_\eta(t-s)\operatorname{sgn}(u_s)|u_s|^\delta\,\mathrm{d}s,\\
f_\theta(\mathbf{X}) &= \frac{1}{|Q_T|}\int_0^T u_t I_{\theta,u}(t)\,\mathrm{d}t,\qquad\mathbf{X} = ((t,Q_t,u_t))_{t\in[0,T]}. \tag*{(53)}
\end{aligned} I θ , u ( t ) f θ ( X ) = λ ∫ 0 t G η ( t − s ) sgn ( u s ) ∣ u s ∣ δ d s , = ∣ Q T ∣ 1 ∫ 0 T u t I θ , u ( t ) d t , X = (( t , Q t , u t ) ) t ∈ [ 0 , T ] . (53)
Within each prompt, the impact parameter θ \theta θ (and hence the impact operator) is fixed, while the execution schedules u u u are generated by transforming Gaussian process draws into positive trading-rate profiles. Each demonstration label is given by Y = f θ ( X ) + ξ Y = f_\theta(\mathbf{X}) + \xi Y = f θ ( X ) + ξ , where ξ \xi ξ is an independent Gaussian noise.
The models are trained with N ∈ { 1 , 2 , 4 , 8 , 16 } N \in\{1,2,4,8,16\} N ∈ { 1 , 2 , 4 , 8 , 16 } on the normalized exponential kernel G η ( r ) = η e − η r 1 − e − η G_\eta(r) = \frac{\eta e^{-\eta r}}{1-e^{-\eta}} G η ( r ) = 1 − e − η η e − η r . At test time, they are evaluated on in-distribution exponential kernels as well as two unseen normalized power-law families: the non-singular kernel G η ( r ) = ( 1 + r ) − η ∫ 0 1 ( 1 + s ) − η d s G_\eta(r) = \frac{(1+r)^{-\eta}}{\int_0^1(1+s)^{-\eta}\,\mathrm{d}s} G η ( r ) = ∫ 0 1 ( 1 + s ) − η d s ( 1 + r ) − η and the singular kernel G η ( r ) = ( 1 − η ) r − η G_\eta(r) = (1-\eta)r^{-\eta} G η ( r ) = ( 1 − η ) r − η for 0 < η < 1 0<\eta<1 0 < η < 1 .
Path and prompt encoding. Each execution path X \mathbf{X} X is discretized as x k = ( t k , Q t k , u t k ) ∈ R 3 x_k=(t_k,Q_{t_k},u_{t_k})\in\mathbb{R}^3 x k = ( t k , Q t k , u t k ) ∈ R 3 (k = 0 , … , 100 k=0,\ldots,100 k = 0 , … , 100 ) and mapped into R 64 \mathbb{R}^{64} R 64 via one of three path encoders. Specifically, TF-Raw-Flat applies LayerNorm followed by a linear projection to the 303 flattened coordinates to produce E F l a t ( X ) E_{\mathrm{Flat}}(\mathbf{X}) E Flat ( X ) , whereas TF-Raw-Seq passes the 101-step sequence through a two-layer local causal transformer and extracts the terminal state as E S e q ( X ) E_{\mathrm{Seq}}(\mathbf{X}) E Seq ( X ) . For TF-Sig , we first lift ( x k ) k = 0 100 (x_k)_{k=0}^{100} ( x k ) k = 0 100 to the lead–lag path LeadLag ( X ) = ( L j ) j = 0 200 \operatorname{LeadLag}(\mathbf{X})=(L_j)_{j=0}^{200} LeadLag ( X ) = ( L j ) j = 0 200 [Gyurkó et al., [36 ] ]:
L 0 = ( x 0 , x 0 ) , L 2 k − 1 = ( x k , x k − 1 ) , L 2 k = ( x k , x k ) , k = 1 , … , 100. (54) L_0=(x_0,x_0),\qquad L_{2k-1}=(x_k,x_{k-1}),\qquad L_{2k}=(x_k,x_k),\qquad k=1,\ldots,100. \tag*{(54)} L 0 = ( x 0 , x 0 ) , L 2 k − 1 = ( x k , x k − 1 ) , L 2 k = ( x k , x k ) , k = 1 , … , 100. (54)
From this fixed lead–lag lifting, we compute the normalized signature features ψ ( X ) ∈ R 258 \psi(\mathbf{X})\in\mathbb{R}^{258} ψ ( X ) ∈ R 258 up to level three and pass them through a GELU MLP to obtain E S i g ( X ) E_{\mathrm{Sig}}(\mathbf{X}) E Sig ( X ) . For the prompt format, we concatenate each path embedding with its scalar label (using 0 for the query), apply a shared linear projection W i n : R 65 → R 64 W_{\mathrm{in}}:\mathbb{R}^{65}\to\mathbb{R}^{64} W in : R 65 → R 64 , and add learnable beginning-of-sequence, context, and query role embeddings r 0 , r c , r q ∈ R 64 r_0,r_c,r_q\in\mathbb{R}^{64} r 0 , r c , r q ∈ R 64 .
z 0 = r 0 , z i = W i n [ E ( X i ) ; y i ] + r c , i = 1 , … , N , z N + 1 = W i n [ E ( X N + 1 ) ; 0 ] + r q . (55) z_0=r_0,\qquad z_i=W_{\mathrm{in}}[E(X_i);y_i]+r_c,\quad i=1,\ldots,N,\qquad z_{N+1}=W_{\mathrm{in}}[E(X_{N+1});0]+r_q. \tag*{(55)} z 0 = r 0 , z i = W in [ E ( X i ) ; y i ] + r c , i = 1 , … , N , z N + 1 = W in [ E ( X N + 1 ) ; 0 ] + r q . (55)
The resulting sequence ( z 0 , … , z N + 1 ) ∈ R ( N + 2 ) × 64 (z_0, \ldots, z_{N+1}) \in\mathbb{R}^{(N+2)\times64} ( z 0 , … , z N + 1 ) ∈ R ( N + 2 ) × 64 is fed into a two-layer transformer with 4 attention heads.
As a training-free baseline, Lasso-Sig fits a Lasso regression to the same signature features in each prompt, where the ℓ 1 \ell_1 ℓ 1 -penalty is selected via cross-validation over demonstration labels.
Results. The results are reported in Table 3 and Table 4 . On the in-distribution exponential kernels (Table 3 ), TF-Sig achieves the highest R 2 R^2 R 2 at every context length and extrapolates smoothly to N = 32 N = 32 N = 32 . Under OOD shift to the unseen non-singular and singular power-law kernels, TF-Sig attains R 2 R^2 R 2 values of 0.963 and 0.990 at N = 32 N = 32 N = 32 , outperforming TF-Raw-Seq in every paired run while requiring 39.8% fewer parameters.
Table 3 : In-distribution (ID) test R 2 R^2 R 2 on exponential kernels. The N = 32 N = 32 N = 32 column evaluates context-length extrapolation beyond the maximum training length (N = 16 N = 16 N = 16 ).
Table 3.
Table 4 : Out-of-distribution (OOD) test R 2 R^2 R 2 on unseen power-law kernels.
Table 4.
Note that the training-free baseline Lasso-Sig performs substantially worse than TF-Sig with the same signature features, indicating that the transformer provides essential expressivity when the signature truncation level is insufficient to fully linearize the target functional, while leveraging cross-task priors from pre-training that go beyond single-task Lasso fitting.
Options with Path-Dependent Payoffs
Task setup. We evaluate ICL on Asian and variance option payoffs [44 , 14 , 43 ] , a classic family of path-dependent derivatives previously studied through the signature [58 ] .
Each path X = ( τ t , x t ) t = 0 31 X = (\tau_t, x_t)_{t=0}^{31} X = ( τ t , x t ) t = 0 31 comprises 32 observations over a five-minute window, where τ t = t / 31 \tau_t = t/31 τ t = t /31 and x t = 10 4 log ( S t / S 0 ) x_t = 10^4\log(S_t/S_0) x t = 1 0 4 log ( S t / S 0 ) denotes the cumulative log return. For X X X , we compute the realized average and variance:
A ( X ) = 1 32 ∑ t = 0 31 exp ( x t / 10 4 ) , V ( X ) = 1 31 ∑ t = 1 31 ( x t − x t − 1 ) 2 . (56) A(\mathbf{X}) = \frac{1}{32} \sum_{t=0}^{31} \exp(x_t/10^4), \qquad V(\mathbf{X}) = \frac{1}{31} \sum_{t=1}^{31}(x_t-x_{t-1})^2. \tag*{(56)} A ( X ) = 32 1 t = 0 ∑ 31 exp ( x t /1 0 4 ) , V ( X ) = 31 1 t = 1 ∑ 31 ( x t − x t − 1 ) 2 . (56)
Each task is specified by a latent contract ( g , ω , K ) (g,\omega,K) ( g , ω , K ) consisting of a payoff type g ∈ { A , V } g \in\{A,V\} g ∈ { A , V } , an option side ω ∈ { + 1 , − 1 } \omega\in\{+1,-1\} ω ∈ { + 1 , − 1 } (call or put) and a strike K K K , yielding the terminal payoff
f ( X ) = c g [ ω ( g ( X ) − K ) ] + , c A = 10 4 , c V = 1. (57) f(\mathbf{X}) = c_g[\omega(g(\mathbf{X})-K)]_+, \qquad c_A = 10^4,\quad c_V = 1. \tag*{(57)} f ( X ) = c g [ ω ( g ( X ) − K ) ] + , c A = 1 0 4 , c V = 1. (57)
The contract is fixed within each prompt but remains unobserved; because an identical price trajectory yields distinct payoffs under different contracts, the model must infer the underlying payoff structure from the context demonstrations.
Price paths are constructed from transaction records in Binance Public Data [9 ] . The training split comprises 4,000 paths from Bitcoin (BTC), Ether (ETH), BNB, Solana (SOL), XRP, and Cardano (ADA) traded against USDT in 2023, whereas validation and testing use 2,000 and 4,000 paths, respectively, drawn from two disjoint pairs of unseen assets in 2024 and 2025. Training prompts sample strikes from a continuous range. Within every prompt, the demonstration and query paths are distinct, and we use contexts of at most N = 16 N = 16 N = 16 demonstrations for training.
Path and prompt encoding. TF-Raw-Flat and TF-Raw-Seq adapt the flattened-coordinate and two-layer local causal transformer encoders of § 5.3 to map each 32-step path X \mathbf{X} X into R 128 \mathbb{R}^{128} R 128 . For TF-Sig , we construct a partial lead–lag path that duplicates only the price channel [36 ] :
L 0 = ( τ 0 , x 0 , x 0 ) , L 2 k − 1 = ( τ k , x k , x k − 1 ) , L 2 k = ( τ k , x k , x k ) , k = 1 , … , 31. (58) L_0 = (\tau_0,x_0,x_0), \quad L_{2k-1} = (\tau_k,x_k,x_{k-1}), \quad L_{2k} = (\tau_k,x_k,x_k), \quad k = 1,\ldots,31. \tag*{(58)} L 0 = ( τ 0 , x 0 , x 0 ) , L 2 k − 1 = ( τ k , x k , x k − 1 ) , L 2 k = ( τ k , x k , x k ) , k = 1 , … , 31. (58)
From the resulting 63-point trajectory LeadLag ( X ) = ( L j ) j = 0 62 \operatorname{LeadLag}(\mathbf{X}) = (L_j)_{j=0}^{62} LeadLag ( X ) = ( L j ) j = 0 62 in R 3 \mathbb{R}^3 R 3 , we extract the sixth-order truncated signature ψ ( X ) ∈ R 1092 \psi(\mathbf{X}) \in\mathbb{R}^{1092} ψ ( X ) ∈ R 1092 and apply a learnable linear projection followed by LayerNorm to obtain E S i g ( X ) ∈ R 128 E_{\mathrm{Sig}}(\mathbf{X}) \in\mathbb{R}^{128} E Sig ( X ) ∈ R 128 . Finally, the prompt sequence ( z 0 , … , z N + 1 ) ∈ R ( N + 2 ) × 128 (z_0,\ldots,z_{N+1}) \in\mathbb{R}^{(N+2)\times128} ( z 0 , … , z N + 1 ) ∈ R ( N + 2 ) × 128 , ordered as in eq. (55) , is processed by a two-layer transformer with eight attention heads.
Results. As reported in Table 5 and Table 6 , TF-Sig achieves the lowest MSE across all context lengths. At N = 16 N = 16 N = 16 , it reaches an MSE of 0.033—a 70.2% reduction relative to the strongest raw-data baseline—while requiring 33.4% fewer parameters than TF-Raw-Seq . At the extrapolated context length N = 32 N = 32 N = 32 , TF-Sig further lowers the MSE to 0.023 (77.6% below the best raw baseline), whereas Lasso-Sig attains only 0.467 on the exact same signature features, highlighting the role of the transformer’s nonlinear in-context processing.
Table 5. Test MSE, averaged over contracts on held-out 2025 assets and unseen strikes.
Table 6. Test MSE in different payoff families.
Overall, signature features enable accurate in-context learning of nonlinear, path-dependent financial payoffs with a compact transformer.
Decomposing the performance by payoff family (Table 6 ) reveals that the gain is primarily driven by variance options: at N = 32 N = 32 N = 32 , T F TF T F -S i g Sig S i g achieves an MSE of 0.040 versus 0.201 and 0.203 for the raw baselines, whereas all three transformer models perform comparably on Asian options. This gap admits a direct explanation through the signature representation. In fact, the second-level signature of the lead-lag path L = LeadLag ( X ) L = \operatorname{LeadLag}(X) L = LeadLag ( X ) satisfies the exact discrete quadratic-variation identity [19 ] :
1 31 [ Sig 2 , 3 ( L ) − Sig 3 , 2 ( L ) ] = 1 31 ∑ k = 1 31 ( Δ x k ) 2 = V ( X ) . (59) \frac{1}{31}\left[\operatorname{Sig}^{2,3}(L)-\operatorname{Sig}^{3,2}(L)\right] = \frac{1}{31}\sum_{k=1}^{31}(\Delta x_k)^2 = V(\mathbf{X}). \tag*{(59)} 31 1 [ Sig 2 , 3 ( L ) − Sig 3 , 2 ( L ) ] = 31 1 k = 1 ∑ 31 ( Δ x k ) 2 = V ( X ) . (59)
Consequently, the realized variance V ( X ) V(\mathbf{X}) V ( X ) is recovered exactly as a linear combination of two second-level signature coordinates, substantially enhancing the transformer’s ICL capability.
Conclusion
We integrate path signatures with transformers to enable universal in-context learning of path-dependent functionals through explicit, interpretable path features. Using the signature transform as a fixed path embedding, our theoretical construction emulates in-context signature Lasso and establishes finite-sample prediction guarantees under mild conditions, allowing dependence among demonstrations and the query. Experiments demonstrate that signature-based transformers match or outperform vanilla transformer baselines with substantially fewer trainable parameters, exhibiting strong expressivity for path quantities, robustness across observation grids, and effective adaptation to unseen market regimes. Together, these results establish a principled foundation for path-dependent universal ICL that combines interpretable features with flexible in-context adaptation.
Signature Approximation and Statistical Analysis
Signature Approximation over a Function Class
Proof of Lemma 3.1. For a single function, this is the signature approximation theorem [47 Theorem 3.1] : every continuous functional on K \mathcal{K} K is approximated uniformly by linear functionals of a finite truncation.
For any ϵ > 0 \epsilon> 0 ϵ > 0 , by total boundedness, F \mathcal{F} F admits a finite ϵ / 2 \epsilon/2 ϵ /2 -net f 1 , … , f N f_1,\ldots,f_N f 1 , … , f N in the supremum norm. For each f j f_j f j , the fixed-function result provides a truncation level M j M_j M j and coefficients β j \beta_j β j that approximate f j f_j f j with error at most ϵ / 2 \epsilon/2 ϵ /2 . Set M : = max 1 ≤ j ≤ N M j M := \max_{1 \leq j \leq N} M_j M := max 1 ≤ j ≤ N M j . For each j j j , append zero coefficients for the signature coordinates at levels M j + 1 , … , M M_j+1,\ldots,M M j + 1 , … , M , so that β j ∈ R P M \beta_j \in\mathbb{R}^{P_M} β j ∈ R P M . This leaves the approximation unchanged and allows every f j f_j f j to be approximated using the same truncation level M M M . For any f ∈ F f \in\mathcal{F} f ∈ F , choose j j j with ∥ f − f j ∥ ∞ ≤ ϵ / 2 \lVert f-f_j\rVert_\infty\leq\epsilon/2 ∥ f − f j ∥ ∞ ≤ ϵ /2 and set β f : = β j \beta_f := \beta_j β f := β j . By the triangle inequality,
sup x ∈ K ∣ f ( x ) − β f T Sig M ( x ~ ) ∣ ≤ ∥ f − f j ∥ ∞ + sup x ∈ K ∣ f j ( x ) − β j T Sig M ( x ~ ) ∣ ≤ ϵ . \sup_{x \in\mathcal{K}} \left|f(x)-\beta_f^{\mathsf{T}}\operatorname{Sig}_M(\widetilde{x})\right|
\leq\lVert f-f_j\rVert_\infty+
\sup_{x \in\mathcal{K}}\left|f_j(x)-\beta_j^{\mathsf{T}}\operatorname{Sig}_M(\widetilde{x})\right|
\leq\epsilon. x ∈ K sup f ( x ) − β f T Sig M ( x ) ≤ ∥ f − f j ∥ ∞ + x ∈ K sup f j ( x ) − β j T Sig M ( x ) ≤ ϵ .
The same truncation level M M M therefore works for any f ∈ F f \in\mathcal{F} f ∈ F .
Technical Lemmas
This section collects the technical lemmas used to verify the Gram concentration condition and establish the Lasso oracle inequality.
Using a standard covering argument [6 ] , the following lemma reduces uniform quadratic deviations over the Lasso cone to deviations along finitely many sparse directions.
Lemma A.1 (Quadratic deviations on the Lasso cone). There is a finite set N ⊂ R P \mathcal{N} \subset\mathbb{R}^P N ⊂ R P of unit vectors, with ∣ N ∣ ≤ ( 9 P ) 2 s |\mathcal{N}| \leq(9P)^{2s} ∣ N ∣ ≤ ( 9 P ) 2 s , such that for every symmetric A ∈ R P × P A \in\mathbb{R}^{P \times P} A ∈ R P × P and every S ⊆ { 1 , … , P } S \subseteq\{1,\ldots,P\} S ⊆ { 1 , … , P } with ∣ S ∣ ≤ s |S| \leq s ∣ S ∣ ≤ s ,
sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v T A v ∣ ≤ 72 max u ∈ N ∣ u T A u ∣ . (60) \sup_{\substack{v \in C(S),\ \lVert v\rVert_2 \leq1}} |v^{\mathsf{T}}Av|
\leq72\max_{u \in\mathcal{N}} |u^{\mathsf{T}}Au|. \tag*{(60)} v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup ∣ v T A v ∣ ≤ 72 u ∈ N max ∣ u T A u ∣. (60) Here C ( S ) C(S) C ( S ) is the cone defined in eq. (20) .
Proof of Lemma A.1. For an index set J ⊆ { 1 , … , P } J \subseteq\{1,\ldots,P\} J ⊆ { 1 , … , P } , write v J v_J v J for the subvector of a vector v v v indexed by J J J and A J J A_{JJ} A J J for the corresponding principal submatrix of A A A . Let k = min { 2 s , P } k=\min\{2s,P\} k = min { 2 s , P } . In each k k k -dimensional coordinate subspace, take a 1 / 4 1/4 1/4 -net of the unit sphere, and let N \mathcal{N} N be the union of these nets, so that
∣ N ∣ ≤ ( P k ) 9 k ≤ ( 9 P ) 2 s . |\mathcal{N}| \leq\binom{P}{k}9^k \leq(9P)^{2s}. ∣ N ∣ ≤ ( k P ) 9 k ≤ ( 9 P ) 2 s .
For any ∣ J ∣ = k |J|=k ∣ J ∣ = k , define w ∈ R P w \in\mathbb{R}^P w ∈ R P as the unit vector supported on J J J with ∣ w T A w ∣ = ∥ A J J ∥ o p |w^{\mathsf{T}}Aw|=\lVert A_{JJ}\rVert_{\mathrm{op}} ∣ w T A w ∣ = ∥ A J J ∥ op . By definition, we can choose u ∈ N u \in\mathcal{N} u ∈ N supported on J J J satisfying ∥ w − u ∥ 2 ≤ 1 / 4 \lVert w-u\rVert_2 \leq1/4 ∥ w − u ∥ 2 ≤ 1/4 . Then
∣ w T A w − u T A u ∣ ≤ 2 ∥ A J J ∥ o p ∥ w − u ∥ 2 ≤ 1 2 ∥ A J J ∥ o p . |w^{\mathsf{T}}Aw-u^{\mathsf{T}}Au|
\leq2\lVert A_{JJ}\rVert_{\mathrm{op}}\lVert w-u\rVert_2
\leq\frac{1}{2}\lVert A_{JJ}\rVert_{\mathrm{op}}. ∣ w T A w − u T A u ∣ ≤ 2 ∥ A J J ∥ op ∥ w − u ∥ 2 ≤ 2 1 ∥ A J J ∥ op .
Since ∣ w T A w ∣ = ∥ A J J ∥ o p |w^{\mathsf{T}}Aw|=\lVert A_{JJ}\rVert_{\mathrm{op}} ∣ w T A w ∣ = ∥ A J J ∥ op , it follows that
∥ A J J ∥ o p ≤ 2 max u ∈ N ∣ u T A u ∣ . \lVert A_{JJ}\rVert_{\mathrm{op}}
\leq2\max_{u \in\mathcal{N}} |u^{\mathsf{T}}Au|. ∥ A J J ∥ op ≤ 2 u ∈ N max ∣ u T A u ∣.
Note that the same bound also holds for ∣ J ∣ < k |J|<k ∣ J ∣ < k by trivially enlarging J J J to a set of size k k k . Now fix v ∈ C ( S ) v \in C(S) v ∈ C ( S ) , sort its coordinates by decreasing magnitude, and split them into consecutive blocks J 1 , J 2 , … J_1,J_2,\ldots J 1 , J 2 , … of size s s s , the last of which may be smaller. For j ≥ 2 j \ge2 j ≥ 2 , we have ∥ v J j ∥ 2 ≤ ∥ v J j − 1 ∥ 1 / s \|v_{J_j}\|_2 \le\|v_{J_{j-1}}\|_1/\sqrt{s} ∥ v J j ∥ 2 ≤ ∥ v J j − 1 ∥ 1 / s , while ∥ v ∥ 1 ≤ 5 s ∥ v ∥ 2 \|v\|_1 \le5\sqrt{s}\|v\|_2 ∥ v ∥ 1 ≤ 5 s ∥ v ∥ 2 by the definition of C ( S ) C(S) C ( S ) . Hence ∑ j ∥ v J j ∥ 2 ≤ 6 ∥ v ∥ 2 \sum_j\|v_{J_j}\|_2 \le6\|v\|_2 ∑ j ∥ v J j ∥ 2 ≤ 6∥ v ∥ 2 . For any two blocks J j J_j J j and J ℓ J_\ell J ℓ , the union J = J j ∪ J ℓ J=J_j\cup J_\ell J = J j ∪ J ℓ has at most k k k indices, therefore
∣ v J j T A J j J ℓ v J ℓ ∣ ≤ ∥ A J J ∥ o p ⋅ ∥ v J j ∥ 2 ∥ v J ℓ ∥ 2 ≤ 2 max u ∈ N ∣ u T A u ∣ ⋅ ∥ v J j ∥ 2 ∥ v J ℓ ∥ 2 . |v_{J_j}^{\mathsf T}A_{J_jJ_\ell}v_{J_\ell}| \le\|A_{JJ}\|_{\mathrm{op}}\cdot\|v_{J_j}\|_2\|v_{J_\ell}\|_2 \le2\max_{u\in\mathcal{N}}|u^{\mathsf T}Au|\cdot\|v_{J_j}\|_2\|v_{J_\ell}\|_2. ∣ v J j T A J j J ℓ v J ℓ ∣ ≤ ∥ A J J ∥ op ⋅ ∥ v J j ∥ 2 ∥ v J ℓ ∥ 2 ≤ 2 u ∈ N max ∣ u T A u ∣ ⋅ ∥ v J j ∥ 2 ∥ v J ℓ ∥ 2 .
Summing over all pairs of blocks, we obtain
∣ v T A v ∣ ≤ ∑ j , ℓ ∣ v J j T A J j J ℓ v J ℓ ∣ ≤ 2 max u ∈ N ∣ u T A u ∣ ( ∑ j ∥ v J j ∥ 2 ) 2 ≤ 72 max u ∈ N ∣ u T A u ∣ ∥ v ∥ 2 2 . |v^{\mathsf T}Av| \le\sum_{j,\ell}|v_{J_j}^{\mathsf T}A_{J_jJ_\ell}v_{J_\ell}| \le2\max_{u\in\mathcal{N}}|u^{\mathsf T}Au|\left(\sum_j\|v_{J_j}\|_2\right)^2 \le72\max_{u\in\mathcal{N}}|u^{\mathsf T}Au|\|v\|_2^2. ∣ v T A v ∣ ≤ j , ℓ ∑ ∣ v J j T A J j J ℓ v J ℓ ∣ ≤ 2 u ∈ N max ∣ u T A u ∣ ( j ∑ ∥ v J j ∥ 2 ) 2 ≤ 72 u ∈ N max ∣ u T A u ∣∥ v ∥ 2 2 .
To control deviations along these sparse directions under dependent path observations, we require a uniform concentration bound over a finite family of functions. The following lemma combines a standard blocking and coupling argument for β \beta β -mixing sequences Barrera and Gobet, [5 ] with Bernstein’s inequality applied to independent block copies. The next two lemmas are stated on an arbitrary probability space, with probability P \mathbb{P} P and expectation E \mathbb{E} E .
Lemma A.2 (Bernstein inequality for mixing paths). Let ( U i ) i ≥ 1 (U_i)_{i\ge1} ( U i ) i ≥ 1 be a sequence of random variables in a standard Borel space. For measurable functions g 1 , … , g J g_1,\ldots,g_J g 1 , … , g J , assume ∣ g j ( U i ) ∣ ≤ A |g_j(U_i)|\le A ∣ g j ( U i ) ∣ ≤ A almost surely and E [ g j ( U i ) 2 ] ≤ B 4 \mathbb{E}[g_j(U_i)^2]\le B^4 E [ g j ( U i ) 2 ] ≤ B 4 for any i , j i,j i , j , where A , B > 0 A,B>0 A , B > 0 . Writing F n U = σ ( U 1 , … , U n ) \mathcal{F}_n^U=\sigma(U_1,\ldots,U_n) F n U = σ ( U 1 , … , U n ) , define, for k ≥ 1 k\ge1 k ≥ 1 ,
β U ( k ) : = sup n ≥ 1 E [ ∥ L ( ( U j ) j ≥ n + k ∣ F n U ) − L ( ( U j ) j ≥ n + k ) ∥ T V ] . (61) \beta_U(k):=\sup_{n\ge1}\mathbb{E}\left[\left\|\mathcal{L}((U_j)_{j\ge n+k}\mid\mathcal{F}_n^U)-\mathcal{L}((U_j)_{j\ge n+k})\right\|_{\mathrm{TV}}\right]. \tag*{(61)} β U ( k ) := n ≥ 1 sup E [ L (( U j ) j ≥ n + k ∣ F n U ) − L (( U j ) j ≥ n + k ) TV ] . (61) Here L \mathcal{L} L denotes law. For integers 1 ≤ q ≤ N 1\le q\le N 1 ≤ q ≤ N , put m = ⌊ N / q ⌋ m=\lfloor N/q\rfloor m = ⌊ N / q ⌋ . Then, for any u > 0 u>0 u > 0 ,
P ( max 1 ≤ j ≤ J ∣ 1 N ∑ i = 1 N ( g j ( U i ) − E g j ( U i ) ) ∣ > u ) ≤ 2 J exp ( − m u 2 2 B 4 + 4 A u / 3 ) + ( N − q ) β U ( q ) . (62) \mathbb{P}\left(\max_{1\le j\le J}\left|\frac{1}{N}\sum_{i=1}^{N}(g_j(U_i)-\mathbb{E}g_j(U_i))\right|>u\right)\le2J\exp\left(-\frac{mu^2}{2B^4+4Au/3}\right)+(N-q)\beta_U(q). \tag*{(62)} P ( 1 ≤ j ≤ J max N 1 i = 1 ∑ N ( g j ( U i ) − E g j ( U i )) > u ) ≤ 2 J exp ( − 2 B 4 + 4 A u /3 m u 2 ) + ( N − q ) β U ( q ) . (62)
Proof of Lemma A.2. Partition the indices into q q q classes I r = { r , r + q , … } ∩ { 1 , … , N } I_r=\{r,r+q,\ldots\}\cap\{1,\ldots,N\} I r = { r , r + q , … } ∩ { 1 , … , N } , r = 1 , … , q r=1,\ldots,q r = 1 , … , q , each of size at least m m m . By the coupling lemma of Barrera and Gobet [ [5 ] , there are copies U i ∗ U_i^* U i ∗ with L ( U i ∗ ) = L ( U i ) \mathcal{L}(U_i^*)=\mathcal{L}(U_i) L ( U i ∗ ) = L ( U i ) that are independent within each class. In addition, the coupling satisfies U r ∗ = U r U_r^*=U_r U r ∗ = U r for 1 ≤ r ≤ q 1\le r\le q 1 ≤ r ≤ q . And for q < i ≤ N q<i\le N q < i ≤ N , P ( U i ∗ ≠ U i ) ≤ β U ( q ) \mathbb{P}(U_i^*\ne U_i)\le\beta_U(q) P ( U i ∗ = U i ) ≤ β U ( q ) . Therefore,
P ( ∃ i ≤ N : U i ∗ ≠ U i ) ≤ ( N − q ) β U ( q ) . (63) \mathbb{P}(\exists i\le N:U_i^*\ne U_i)\le(N-q)\beta_U(q). \tag*{(63)} P ( ∃ i ≤ N : U i ∗ = U i ) ≤ ( N − q ) β U ( q ) . (63)
Let D j , r = ∣ I r ∣ − 1 ∑ i ∈ I r ( g j ( U i ∗ ) − E g j ( U i ) ) D_{j,r}=|I_r|^{-1}\sum_{i\in I_r}(g_j(U_i^*)-\mathbb{E}g_j(U_i)) D j , r = ∣ I r ∣ − 1 ∑ i ∈ I r ( g j ( U i ∗ ) − E g j ( U i )) . Within each class the summands are independent, so by Bernstein’s inequality Wainwright, [64 ] ,
E e t D j , r ≤ exp ( t 2 B 4 2 m ( 1 − 2 A ∣ t ∣ / ( 3 m ) ) ) , ∣ t ∣ < 3 m 2 A . \mathbb{E}e^{tD_{j,r}}\le\exp\left(\frac{t^2B^4}{2m(1-2A|t|/(3m))}\right),\qquad|t|<\frac{3m}{2A}. E e t D j , r ≤ exp ( 2 m ( 1 − 2 A ∣ t ∣/ ( 3 m )) t 2 B 4 ) , ∣ t ∣ < 2 A 3 m .
By Jensen’s inequality, the same bound holds for the weighted average ∑ r ( ∣ I r ∣ / N ) D j , r \sum_r(|I_r|/N)D_{j,r} ∑ r ( ∣ I r ∣/ N ) D j , r , which equals the original centered mean on the event { U i ∗ = U i , ∀ i } \{U_i^*=U_i,\ \forall i\} { U i ∗ = U i , ∀ i } . We conclude the proof by applying Chernoff’s bound Wainwright, [64 ] to both tails, taking a union bound over j j j , and adding the coupling failure probability in eq. (A.4). ▫
We now combine Lemmas A.1 and A.2 to bound Gram deviations on the Lasso cone for unit-time segments of a geometrically ergodic Markov process, allowing a nonstationary start. This bound is used below to verify Assumption 4 for the diffusion examples.
Lemma A.3 (Gram concentration under geometric mixing). Let Z Z Z be a continuous time-homogeneous Markov process with transition kernel P t P_t P t and invariant probability measure π \pi π . Suppose that, for a measurable function V ≥ 1 V \ge1 V ≥ 1 and constants c , C > 0 , c, C > 0, c , C > 0 ,
∥ P t ( z , ⋅ ) − π ∥ T V ≤ C V ( z ) e − c t , sup t ≥ 0 E V ( Z t ) ≤ C . \lVert P_t(z,\cdot)-\pi\rVert_{\mathrm{TV}} \le CV(z)e^{-ct}, \qquad\sup_{t \ge0}\mathbb{E}V(Z_t) \le C. ∥ P t ( z , ⋅ ) − π ∥ TV ≤ C V ( z ) e − c t , t ≥ 0 sup E V ( Z t ) ≤ C . For X i = ( Z i − 1 + t ) 0 ≤ t ≤ 1 X_i=(Z_{i-1+t})_{0\le t\le1} X i = ( Z i − 1 + t ) 0 ≤ t ≤ 1 , assume that, for some ρ ≥ 0 \rho\ge0 ρ ≥ 0 and any q ≥ 2 , q \ge2, q ≥ 2 ,
sup i ( E ∥ ψ ( X i ) ∥ 2 q ) 1 / q ≤ C q ρ . \sup_i \left(\mathbb{E}\lVert\psi(X_i)\rVert_2^q\right)^{1/q} \le Cq^\rho. i sup ( E ∥ ψ ( X i ) ∥ 2 q ) 1/ q ≤ C q ρ . For any S ⊆ { 1 , … , P } S \subseteq\{1,\ldots,P\} S ⊆ { 1 , … , P } satisfying ∣ S ∣ ≤ s |S| \le s ∣ S ∣ ≤ s , with probability at least 1 − δ , 1-\delta, 1 − δ ,
sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v T ( G N − E [ G N ] ) v ∣ ≤ C ( s log ( P / δ ) log ( N / δ ) N + s log ( P / δ ) [ log ( N / δ ) ] 2 ρ + 1 N ) . (64) \sup_{\substack{v\in C(S),\ \lVert v\rVert_2\le1}} \left|v^\mathsf{T}(G_N-\mathbb{E}[G_N])v\right|
\le C\left(\sqrt{\frac{s\log(P/\delta)\log(N/\delta)}{N}}+\frac{s\log(P/\delta)[\log(N/\delta)]^{2\rho+1}}{N}\right). \tag*{(64)} v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v T ( G N − E [ G N ]) v ≤ C ( N s log ( P / δ ) log ( N / δ ) + N s log ( P / δ ) [ log ( N / δ ) ] 2 ρ + 1 ) . (64) The constant depends only on ρ \rho ρ and the constants in the hypotheses.
Proof. The observations ( X j ) j ≥ n + k (X_j)_{j\ge n+k} ( X j ) j ≥ n + k depend on the process from time n + k − 1 n+k-1 n + k − 1 onward. By the Markov property, conditional on X 1 , … , X n X_1,\ldots,X_n X 1 , … , X n , the state Z n + k − 1 Z_{n+k-1} Z n + k − 1 has distribution P k − 1 ( Z n , ⋅ ) P_{k-1}(Z_n,\cdot) P k − 1 ( Z n , ⋅ ) . Let μ n , k \mu_{n,k} μ n , k denote its marginal distribution and thus μ n , k ( ⋅ ) = E [ P k − 1 ( Z n , ⋅ ) ] \mu_{n,k}(\cdot)=\mathbb{E}[P_{k-1}(Z_n,\cdot)] μ n , k ( ⋅ ) = E [ P k − 1 ( Z n , ⋅ )] . Therefore ∥ μ n , k − π ∥ T V ≤ E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ T V \lVert\mu_{n,k}-\pi\rVert_{\mathrm{TV}}\le\mathbb{E}\lVert P_{k-1}(Z_n,\cdot)-\pi\rVert_{\mathrm{TV}} ∥ μ n , k − π ∥ TV ≤ E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ TV . The conditional and marginal laws of ( X j ) j ≥ n + k (X_j)_{j\ge n+k} ( X j ) j ≥ n + k are obtained from these two state distributions through the same Markov kernel. By the data-processing inequality,
β X ( k ) ≤ sup n E ∥ P k − 1 ( Z n , ⋅ ) − μ n , k ∥ T V ≤ sup n ( E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ T V + ∥ μ n , k − π ∥ T V ) \begin{aligned}
\beta_X(k)\le\sup_n\mathbb{E}\lVert P_{k-1}(Z_n,\cdot)-\mu_{n,k}\rVert_{\mathrm{TV}} \\
&\le\sup_n\left(\mathbb{E}\lVert P_{k-1}(Z_n,\cdot)-\pi\rVert_{\mathrm{TV}}+\lVert\mu_{n,k}-\pi\rVert_{\mathrm{TV}}\right)
\end{aligned} β X ( k ) ≤ n sup E ∥ P k − 1 ( Z n , ⋅ ) − μ n , k ∥ TV ≤ n sup ( E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ TV + ∥ μ n , k − π ∥ TV )
≤ 2 sup n E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ T V ≤ C e − c ( k − 1 ) sup n E V ( Z n ) ≤ C e − c k . \begin{aligned}
\le2\sup_n\mathbb{E}\lVert P_{k-1}(Z_n,\cdot)-\pi\rVert_{\mathrm{TV}} \\
&\le Ce^{-c(k-1)}\sup_n\mathbb{E}V(Z_n)\le Ce^{-ck}.
\end{aligned} ≤ 2 n sup E ∥ P k − 1 ( Z n , ⋅ ) − π ∥ TV ≤ C e − c ( k − 1 ) n sup E V ( Z n ) ≤ C e − c k .
Let N \mathcal{N} N be the net in Lemma A.1 and set A = C [ log ( 2 N / δ ) ] 2 ρ A=C[\log(2N/\delta)]^{2\rho} A = C [ log ( 2 N / δ ) ] 2 ρ . By Markov’s inequality with exponent 4 log ( 2 N / δ ) 4\log(2N/\delta) 4 log ( 2 N / δ ) ,
sup i P ( ∥ ψ ( X i ) ∥ 2 2 > A ) ≤ ( δ 2 N ) 4 . \sup_i\mathbb{P}\left(\lVert\psi(X_i)\rVert_2^2>A\right)\le\left(\frac{\delta}{2N}\right)^4. i sup P ( ∥ ψ ( X i ) ∥ 2 2 > A ) ≤ ( 2 N δ ) 4 .
Define g u ( x ) : = min { ( u T ψ ( x ) ) 2 , A } g_u(x):=\min\{(u^\mathsf{T}\psi(x))^2,A\} g u ( x ) := min {( u T ψ ( x ) ) 2 , A } for u ∈ N u\in\mathcal{N} u ∈ N . Since each u u u is a unit vector, ( u T ψ ( X i ) ) 2 ≤ ∥ ψ ( X i ) ∥ 2 2 (u^\mathsf{T}\psi(X_i))^2\le\lVert\psi(X_i)\rVert_2^2 ( u T ψ ( X i ) ) 2 ≤ ∥ ψ ( X i ) ∥ 2 2 . A union bound over i i i shows that max i ≤ N ∥ ψ ( X i ) ∥ 2 2 ≤ A \max_{i\le N}\lVert\psi(X_i)\rVert_2^2\le A max i ≤ N ∥ ψ ( X i ) ∥ 2 2 ≤ A with probability at least 1 − δ / 4 1-\delta/4 1 − δ /4 . On this event, truncation leaves all observed values unchanged: g u ( X i ) = ( u T ψ ( X i ) ) 2 g_u(X_i)=(u^\mathsf{T}\psi(X_i))^2 g u ( X i ) = ( u T ψ ( X i ) ) 2 simultaneously for all i ≤ N i\le N i ≤ N and u ∈ N u\in\mathcal{N} u ∈ N . The fourth-moment bound gives
E g u ( X i ) 2 ≤ E ∥ ψ ( X i ) ∥ 2 4 ≤ C . \mathbb{E}g_u(X_i)^2\le\mathbb{E}\lVert\psi(X_i)\rVert_2^4\le C. E g u ( X i ) 2 ≤ E ∥ ψ ( X i ) ∥ 2 4 ≤ C .
In addition,
0 ≤ E ( u T ψ ( X i ) ) 2 − E g u ( X i ) ≤ E [ ∥ ψ ( X i ) ∥ 2 2 1 { ∥ ψ ( X i ) ∥ 2 2 > A } ] ≤ ( E ∥ ψ ( X i ) ∥ 2 4 ) 1 / 2 P ( ∥ ψ ( X i ) ∥ 2 2 > A ) 1 / 2 ≤ C δ 2 N 2 . \begin{aligned}
0\le{}&\mathbb{E}(u^\mathsf{T}\psi(X_i))^2-\mathbb{E}g_u(X_i)\\
\le{}&\mathbb{E}\left[\lVert\psi(X_i)\rVert_2^2\mathbf{1}_{\{\lVert\psi(X_i)\rVert_2^2>A\}}\right]\\
\le{}&\left(\mathbb{E}\lVert\psi(X_i)\rVert_2^4\right)^{1/2}\mathbb{P}\left(\lVert\psi(X_i)\rVert_2^2>A\right)^{1/2}
\le C\frac{\delta^2}{N^2}.
\end{aligned} 0 ≤ ≤ ≤ E ( u T ψ ( X i ) ) 2 − E g u ( X i ) E [ ∥ ψ ( X i ) ∥ 2 2 1 {∥ ψ ( X i ) ∥ 2 2 > A } ] ( E ∥ ψ ( X i ) ∥ 2 4 ) 1/2 P ( ∥ ψ ( X i ) ∥ 2 2 > A ) 1/2 ≤ C N 2 δ 2 .
Apply Lemma A.2 with q = min { N , ⌈ C log ( 2 N / δ ) ⌉ } q = \min\{N, \lceil C\log(2N/\delta)\rceil\} q = min { N , ⌈ C log ( 2 N / δ )⌉} and m = ⌊ N / q ⌋ m = \lfloor N/q\rfloor m = ⌊ N / q ⌋ . Geometric mixing makes the coupling error at most δ / 4 \delta/4 δ /4 . Also notice that log ( ∣ N ∣ / δ ) ≤ C log ( P / δ ) \log(|\mathcal{N}|/\delta) \le C\log(P/\delta) log ( ∣ N ∣/ δ ) ≤ C log ( P / δ ) . Therefore with probability at least 1 − δ / 2 1-\delta/2 1 − δ /2 ,
max u ∈ V ∣ 1 N ∑ i = 1 N ( G u ( X i ) − E G u ( X i ) ) ∣ ≤ C ( s log ( P / δ ) m + A s log ( P / δ ) m ) . \max_{u\in\mathcal{V}}\left|\frac{1}{N}\sum_{i=1}^{N}\left(\mathcal{G}_u(X_i)-\mathbb{E}\mathcal{G}_u(X_i)\right)\right|\le C\left(\sqrt{\frac{s\log(P/\delta)}{m}}+\frac{As\log(P/\delta)}{m}\right). u ∈ V max N 1 i = 1 ∑ N ( G u ( X i ) − E G u ( X i ) ) ≤ C ( m s log ( P / δ ) + m A s log ( P / δ ) ) .
We conclude the proof by noticing m − 1 ≤ C log ( 2 N / δ ) / N m^{-1}\le C\log(2N/\delta)/N m − 1 ≤ C log ( 2 N / δ ) / N , and applying Lemma A.1 . □
The Lasso oracle inequality also requires a bound on the noise score to set the penalty in Lemma 4.2 . The following lemma uses a standard exponential supermartingale argument [39 Section 4.1, Eq. (4.3] to control this score in terms of the empirical Gram diagonal.
Lemma A.4 (Martingale noise score). Fix a task w w w and suppose eq. (23) holds. For any D > 0 D>0 D > 0 and 0 < δ 0 < 1 0<\delta_0<1 0 < δ 0 < 1 ,
P w ( ∥ 1 N ∑ i = 1 N ψ ( X i ) ξ i ∥ ∞ > σ 2 D log ( 2 P / δ 0 ) N , max j ( G N ) j j ≤ D ) ≤ δ 0 . (65) \mathbb{P}_w\left(\left\|\frac{1}{N}\sum_{i=1}^{N}\psi(X_i)\xi_i\right\|_\infty>\sigma\sqrt{\frac{2D\log(2P/\delta_0)}{N}},\ \max_j(G_N)_{jj}\le D\right)\le\delta_0. \tag*{(65)} P w ( N 1 i = 1 ∑ N ψ ( X i ) ξ i ∞ > σ N 2 D log ( 2 P / δ 0 ) , j max ( G N ) j j ≤ D ) ≤ δ 0 . (65)
Proof of Lemma A.4 . Fix j ≤ P j\le P j ≤ P and t ∈ R t\in\mathbb{R} t ∈ R . Define M k : = exp ( t ∑ i = 1 k ψ j ( X i ) ξ i − σ 2 t 2 2 ∑ i = 1 k ψ j ( X i ) 2 ) M_k:=\exp\left(t\sum_{i=1}^{k}\psi_j(X_i)\xi_i-\frac{\sigma^2t^2}{2}\sum_{i=1}^{k}\psi_j(X_i)^2\right) M k := exp ( t ∑ i = 1 k ψ j ( X i ) ξ i − 2 σ 2 t 2 ∑ i = 1 k ψ j ( X i ) 2 ) . Let G k : = σ ( X 1 , … , X k , ξ 1 , … , ξ k − 1 ) \mathcal{G}_k:=\sigma(X_1,\ldots,X_k,\xi_1,\ldots,\xi_{k-1}) G k := σ ( X 1 , … , X k , ξ 1 , … , ξ k − 1 ) . Since M k − 1 M_{k-1} M k − 1 and ψ j ( X k ) \psi_j(X_k) ψ j ( X k ) are G k \mathcal{G}_k G k -measurable, eq. (23) gives
E w [ M k ∣ G k ] = M k − 1 E w [ e t ψ j ( X k ) ξ k − σ 2 t 2 2 ψ j ( X k ) 2 ∣ G k ] ≤ M k − 1 . \mathbb{E}_w[M_k\mid\mathcal{G}_k]=M_{k-1}\mathbb{E}_w\left[\left.e^{t\psi_j(X_k)\xi_k-\frac{\sigma^2t^2}{2}\psi_j(X_k)^2}\right|\mathcal{G}_k\right]\le M_{k-1}. E w [ M k ∣ G k ] = M k − 1 E w [ e t ψ j ( X k ) ξ k − 2 σ 2 t 2 ψ j ( X k ) 2 G k ] ≤ M k − 1 .
Taking expectations and applying the tower property yields E w M k ≤ E w M k − 1 ≤ E w M 0 = 1 \mathbb{E}_wM_k\le\mathbb{E}_wM_{k-1}\le\mathbb{E}_wM_0=1 E w M k ≤ E w M k − 1 ≤ E w M 0 = 1 . For u , t > 0 u,t>0 u , t > 0 and σ > 0 \sigma>0 σ > 0 , since ( G N ) j j = 1 N ∑ i = 1 N ψ j ( X i ) 2 (G_N)_{jj}=\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)^2 ( G N ) j j = N 1 ∑ i = 1 N ψ j ( X i ) 2 , Markov’s inequality give
P w ( 1 N ∑ i = 1 N ψ j ( X i ) ξ i > u , ( G N ) j j ≤ D ) ≤ P w ( M N > e N t u − σ 2 t 2 N D / 2 ) ≤ e − N t u + σ 2 t 2 N D / 2 E w M N ≤ e − N t u + σ 2 t 2 N D / 2 . \mathbb{P}_w\left(\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)\xi_i>u,\ (G_N)_{jj}\le D\right)
\le\mathbb{P}_w\left(M_N>e^{Ntu-\sigma^2t^2ND/2}\right)
\le e^{-Ntu+\sigma^2t^2ND/2}\mathbb{E}_wM_N
\le e^{-Ntu+\sigma^2t^2ND/2}. P w ( N 1 i = 1 ∑ N ψ j ( X i ) ξ i > u , ( G N ) j j ≤ D ) ≤ P w ( M N > e N t u − σ 2 t 2 N D /2 ) ≤ e − N t u + σ 2 t 2 N D /2 E w M N ≤ e − N t u + σ 2 t 2 N D /2 .
Choosing t = u / ( σ 2 D ) t=u/(\sigma^2D) t = u / ( σ 2 D ) gives the upper bound e − N u 2 / ( 2 σ 2 D ) e^{-Nu^2/(2\sigma^2D)} e − N u 2 / ( 2 σ 2 D ) . Applying the same argument to the negative of each coordinate and taking a union bound over j = 1 , … , P j=1,\ldots,P j = 1 , … , P yields
P w ( ∥ 1 N ∑ i = 1 N ψ ( X i ) ξ i ∥ ∞ > u , max j ( G N ) j j ≤ D ) ≤ 2 P e − N u 2 / ( 2 σ 2 D ) . \mathbb{P}_w\left(\left\|\frac{1}{N}\sum_{i=1}^{N}\psi(X_i)\xi_i\right\|_\infty>u,\ \max_j(G_N)_{jj}\le D\right)\le2Pe^{-Nu^2/(2\sigma^2D)}. P w ( N 1 i = 1 ∑ N ψ ( X i ) ξ i ∞ > u , j max ( G N ) j j ≤ D ) ≤ 2 P e − N u 2 / ( 2 σ 2 D ) .
We complete the proof by taking u = σ 2 D log ( 2 P / δ 0 ) / N u=\sigma\sqrt{2D\log(2P/\delta_0)/N} u = σ 2 D log ( 2 P / δ 0 ) / N . □
Lasso for Path Dependent Data
Proof of Lemma 4.2 . Fix a task w w w . We first bound the diagonal entries of G N G_N G N . On the event in eq. (3.13), the concentration assumption states that
∣ v ⊤ ( G N − E w [ G N ] ) v ∣ ≤ α , v ∈ C ( S ) , ∥ v ∥ 2 = 1. (66) \left|v^\top(G_N-\mathbb{E}_w[G_N])v\right|\le\alpha,\qquad v\in\mathcal{C}(S),\quad\|v\|_2=1. \tag*{(66)} v ⊤ ( G N − E w [ G N ]) v ≤ α , v ∈ C ( S ) , ∥ v ∥ 2 = 1. (66)
Choosing k ∈ S k \in S k ∈ S and v = e k v = e_k v = e k implies ∣ ( G N − E w [ G N ] ) k k ∣ ≤ α \lvert(G_N-\mathbb{E}_w[G_N])_{kk}\rvert\le\alpha ∣( G N − E w [ G N ] ) k k ∣ ≤ α . For any j ≠ k j \ne k j = k , the two unit vectors ( e k + e j ) / 2 (e_k+e_j)/\sqrt{2} ( e k + e j ) / 2 and ( e k − e j ) / 2 (e_k-e_j)/\sqrt{2} ( e k − e j ) / 2 also belong to C ( S ) C(S) C ( S ) . Thus expanding the quadratic forms gives
∣ ( G N − E w [ G N ] ) k k + ( G N − E w [ G N ] ) j j 2 ± ( G N − E w [ G N ] ) k j ∣ ≤ α . \left\lvert\frac{(G_N-\mathbb{E}_w[G_N])_{kk}+(G_N-\mathbb{E}_w[G_N])_{jj}}{2} \pm(G_N-\mathbb{E}_w[G_N])_{kj}\right\rvert\le\alpha. 2 ( G N − E w [ G N ] ) k k + ( G N − E w [ G N ] ) j j ± ( G N − E w [ G N ] ) k j ≤ α .
Therefore,
∣ ( G N − E w [ G N ] ) k k + ( G N − E w [ G N ] ) j j ∣ ≤ 2 α , \lvert(G_N-\mathbb{E}_w[G_N])_{kk}+(G_N-\mathbb{E}_w[G_N])_{jj}\rvert\le2\alpha, ∣( G N − E w [ G N ] ) k k + ( G N − E w [ G N ] ) j j ∣ ≤ 2 α ,
∣ ( G N − E w [ G N ] ) j j ∣ ≤ 2 α + ∣ ( G N − E w [ G N ] ) k k ∣ ≤ 3 α . \lvert(G_N-\mathbb{E}_w[G_N])_{jj}\rvert\le2\alpha+\lvert(G_N-\mathbb{E}_w[G_N])_{kk}\rvert\le3\alpha. ∣( G N − E w [ G N ] ) j j ∣ ≤ 2 α + ∣( G N − E w [ G N ] ) k k ∣ ≤ 3 α .
Since ( E w [ G N ] ) j j ≤ B 2 (\mathbb{E}_w[G_N])_{jj} \le B^2 ( E w [ G N ] ) j j ≤ B 2 by Assumption 1, we have max j ( G N ) j j ≤ B 2 + 3 α \max_j(G_N)_{jj} \le B^2+3\alpha max j ( G N ) j j ≤ B 2 + 3 α . Since Y i = f w ( X i ) + ξ i Y_i=f_w(X_i)+\xi_i Y i = f w ( X i ) + ξ i , we have, for any coordinate j j j ,
[ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ] j = 1 N ∑ i = 1 N ψ j ( X i ) ( f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ) + 1 N ∑ i = 1 N ψ j ( X i ) ξ i . (67) \left[N^{-1}\Psi^\top(y-\Psi\beta_w^\star)\right]_j
=\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)\left(f_w(X_i)-\psi(X_i)^\top\beta_w^\star\right)
+\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)\xi_i. \tag*{(67)} [ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ] j = N 1 i = 1 ∑ N ψ j ( X i ) ( f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ) + N 1 i = 1 ∑ N ψ j ( X i ) ξ i . (67)
Applying Cauchy–Schwarz and Assumption 2 give
∣ 1 N ∑ i = 1 N ψ j ( X i ) ( f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ) ∣ ≤ ( 1 N ∑ i = 1 N ψ j ( X i ) 2 ) 1 / 2 ( 1 N ∑ i = 1 N ∣ f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ∣ 2 ) 1 / 2 ≤ ϵ ( G N ) j j ≤ ϵ B 2 + 3 α . (68) \begin{aligned}
\left\lvert\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)\left(f_w(X_i)-\psi(X_i)^\top\beta_w^\star\right)\right\rvert
\le\left(\frac{1}{N}\sum_{i=1}^{N}\psi_j(X_i)^2\right)^{1/2}
\left(\frac{1}{N}\sum_{i=1}^{N}\lvert f_w(X_i)-\psi(X_i)^\top\beta_w^\star\rvert^2\right)^{1/2} \\
&\le\epsilon\sqrt{(G_N)_{jj}} \le\epsilon\sqrt{B^2+3\alpha}. \tag*{(68)}
\end{aligned} N 1 i = 1 ∑ N ψ j ( X i ) ( f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ) ≤ ( N 1 i = 1 ∑ N ψ j ( X i ) 2 ) 1/2 ( N 1 i = 1 ∑ N ∣ f w ( X i ) − ψ ( X i ) ⊤ β w ⋆ ∣ 2 ) 1/2 ≤ ϵ ( G N ) j j ≤ ϵ B 2 + 3 α . (68)
The diagonal estimate above allows us to apply Lemma A.4 with D = B 2 + 3 α D=B^2+3\alpha D = B 2 + 3 α and δ 0 = ( P N ) − 4 \delta_0=(PN)^{-4} δ 0 = ( P N ) − 4 . Combining its probability bound with eq. (3.13) and absorbing absolute constants yields
P w ( sup v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 ∣ v ⊤ ( G N − E w [ G N ] ) v ∣ ≤ α , ∥ 1 N ∑ i = 1 N ψ ( X i ) ξ i ∥ ∞ ≤ C σ B 2 + 3 α log ( P N ) N ) ≥ 1 − C ( P N ) − 4 . (69) \mathbb{P}_w\left(\sup_{\substack{v\in C(S),\ \lVert v\rVert_2\le1}}\left\lvert v^\top(G_N-\mathbb{E}_w[G_N])v\right\rvert\le\alpha,\quad
\left\lVert\frac{1}{N}\sum_{i=1}^{N}\psi(X_i)\xi_i\right\rVert_\infty
\le C\sigma\sqrt{B^2+3\alpha}\sqrt{\frac{\log(PN)}{N}}\right)\ge1-C(PN)^{-4}. \tag*{(69)} P w ( v ∈ C ( S ) , ∥ v ∥ 2 ≤ 1 sup v ⊤ ( G N − E w [ G N ]) v ≤ α , N 1 i = 1 ∑ N ψ ( X i ) ξ i ∞ ≤ C σ B 2 + 3 α N log ( P N ) ) ≥ 1 − C ( P N ) − 4 . (69)
This event, together with eqs. (A.7) and (A.8) indicates
∥ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ∥ ∞ ≤ B 2 + 3 α ( ϵ + C σ log ( P N ) N ) ≤ λ 2 . (70) \left\lVert N^{-1}\Psi^\top(y-\Psi\beta_w^\star)\right\rVert_\infty
\le\sqrt{B^2+3\alpha}\left(\epsilon+C\sigma\sqrt{\frac{\log(PN)}{N}}\right)
\le\frac{\lambda}{2}. \tag*{(70)} N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ∞ ≤ B 2 + 3 α ( ϵ + C σ N log ( P N ) ) ≤ 2 λ . (70)
By Assumption 3, the matrix deviation bound also implies the empirical RSC
u ⊤ G N u ≥ u ⊤ E w [ G N ] u − α ∥ u ∥ 2 2 ≥ α ∥ u ∥ 2 2 , u ∈ C ( S ) . (71) u^\top G_Nu\ge u^\top\mathbb{E}_w[G_N]u-\alpha\lVert u\rVert_2^2\ge\alpha\lVert u\rVert_2^2,\qquad u\in C(S). \tag*{(71)} u ⊤ G N u ≥ u ⊤ E w [ G N ] u − α ∥ u ∥ 2 2 ≥ α ∥ u ∥ 2 2 , u ∈ C ( S ) . (71)
Thus eqs. (A.10) and (A.11) both hold on the event in eq. (A.9).
Let Δ = v − β w ⋆ \Delta=v-\beta_w^\star Δ = v − β w ⋆ . The inequality J λ ( v ) ≤ J λ ( β w ⋆ ) + γ J_\lambda(v)\le J_\lambda(\beta_w^\star)+\gamma J λ ( v ) ≤ J λ ( β w ⋆ ) + γ implies
1 2 Δ ⊤ G N Δ ≤ ⟨ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) , Δ ⟩ + λ ( ∥ β w ⋆ ∥ 1 − ∥ β w ⋆ + Δ ∥ 1 ) + γ . \frac{1}{2}\Delta^\top G_N\Delta
\le\langle N^{-1}\Psi^\top(y-\Psi\beta_w^\star),\Delta\rangle
+\lambda(\lVert\beta_w^\star\rVert_1-\lVert\beta_w^\star+\Delta\rVert_1)+\gamma. 2 1 Δ ⊤ G N Δ ≤ ⟨ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) , Δ ⟩ + λ (∥ β w ⋆ ∥ 1 − ∥ β w ⋆ + Δ ∥ 1 ) + γ .
By eq. (A.10) the inner product is bounded by
∣ ⟨ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) , Δ ⟩ ∣ ≤ ∥ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ∥ ∞ ∥ Δ ∥ 1 ≤ λ 2 ∥ Δ ∥ 1 . \left\lvert\left\langle N^{-1}\Psi^\top(y-\Psi\beta_w^\star),\Delta\right\rangle\right\rvert
\le\left\lVert N^{-1}\Psi^\top(y-\Psi\beta_w^\star)\right\rVert_\infty\lVert\Delta\rVert_1
\le\frac{\lambda}{2}\lVert\Delta\rVert_1. ⟨ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) , Δ ⟩ ≤ N − 1 Ψ ⊤ ( y − Ψ β w ⋆ ) ∞ ∥ Δ ∥ 1 ≤ 2 λ ∥ Δ ∥ 1 .
Since ( β w ∗ ) S c = 0 (\beta_w^*)_{S^c}=0 ( β w ∗ ) S c = 0 , we have ∥ β w ∗ ∥ 1 − ∥ β w ∗ + Δ ∥ 1 ≤ ∥ Δ S ∥ 1 − ∥ Δ S c ∥ 1 \|\beta_w^*\|_1-\|\beta_w^*+\Delta\|_1\leq\|\Delta_S\|_1-\|\Delta_{S^c}\|_1 ∥ β w ∗ ∥ 1 − ∥ β w ∗ + Δ ∥ 1 ≤ ∥ Δ S ∥ 1 − ∥ Δ S c ∥ 1 . Therefore,
1 2 Δ ⊤ G N Δ ≤ 3 λ 2 ∥ Δ S ∥ 1 − λ 2 ∥ Δ S c ∥ 1 + γ , \frac{1}{2}\Delta^\top G_N\Delta\leq\frac{3\lambda}{2}\|\Delta_S\|_1-\frac{\lambda}{2}\|\Delta_{S^c}\|_1+\gamma, 2 1 Δ ⊤ G N Δ ≤ 2 3 λ ∥ Δ S ∥ 1 − 2 λ ∥ Δ S c ∥ 1 + γ ,
which is equivalent to the Lasso basic inequality [8 , 57 ] :
Δ ⊤ G N Δ + λ ∥ Δ S c ∥ 1 ≤ 3 λ ∥ Δ S ∥ 1 + 2 γ . (72) \Delta^\top G_N\Delta+\lambda\|\Delta_{S^c}\|_1\leq3\lambda\|\Delta_S\|_1+2\gamma. \tag*{(72)} Δ ⊤ G N Δ + λ ∥ Δ S c ∥ 1 ≤ 3 λ ∥ Δ S ∥ 1 + 2 γ . (72)
If 2 γ ≤ λ ∥ Δ S ∥ 1 2\gamma\leq\lambda\|\Delta_S\|_1 2 γ ≤ λ ∥ Δ S ∥ 1 , then Δ ∈ C ( S ) \Delta\in\mathcal{C}(S) Δ ∈ C ( S ) and by RSC,
α ∥ Δ ∥ 2 2 ≤ 4 λ ∥ Δ S ∥ 1 ≤ 4 λ s ∥ Δ ∥ 2 . \alpha\|\Delta\|_2^2\leq4\lambda\|\Delta_S\|_1\leq4\lambda\sqrt{s}\|\Delta\|_2. α ∥Δ ∥ 2 2 ≤ 4 λ ∥ Δ S ∥ 1 ≤ 4 λ s ∥Δ ∥ 2 .
Otherwise, λ ∥ Δ S ∥ 1 < 2 γ \lambda\|\Delta_S\|_1<2\gamma λ ∥ Δ S ∥ 1 < 2 γ , and eq. (A.12) forces λ ∥ Δ S c ∥ 1 < 8 γ \lambda\|\Delta_{S^c}\|_1<8\gamma λ ∥ Δ S c ∥ 1 < 8 γ and hence ∥ Δ ∥ 2 ≤ ∥ Δ ∥ 1 < 10 γ / λ \|\Delta\|_2\leq\|\Delta\|_1<10\gamma/\lambda ∥Δ ∥ 2 ≤ ∥Δ ∥ 1 < 10 γ / λ . Combining both cases proves eq. (43) .
Verifying Bounded Moments and Concentration Assumptions
We now verify Assumptions 1 and 4 for the stochastic processes introduced in § 3.4 . For dissipative diffusions and the CIR process, we establish signature moment bounds and geometric mixing to invoke Lemma A.3. For the fractional OU process, we instead exploit Gaussian concentration and control dependence across path segments via covariance decay.
Throughout this subsection, we fix a task w w w , and all probabilistic quantities and L q L^q L q norms are taken under P w \mathbb{P}_w P w .
Diffusion with geometric mixing
Proof of Proposition 3.3. Since b b b and σ \boldsymbol{\sigma} σ are globally Lipschitz, eq. (26) has a unique strong solution.
Signature moments. For g ∈ C 2 ( R d ) g\in C^2(\mathbb{R}^d) g ∈ C 2 ( R d ) , the diffusion generator is L g = ⟨ b , ∇ g ⟩ + 1 2 tr ( σ σ ⊤ ∇ 2 g ) \mathcal{L}g=\langle b,\nabla g\rangle+\frac{1}{2}\operatorname{tr}(\boldsymbol{\sigma}\boldsymbol{\sigma}^{\top}\nabla^2g) L g = ⟨ b , ∇ g ⟩ + 2 1 tr ( σ σ ⊤ ∇ 2 g ) . We fix 0 < a < m / c ˉ 0<a<m/\bar{c} 0 < a < m / c ˉ and set V ( z ) = e a ∥ z ∥ 2 2 V(z)=e^{a\|z\|_2^2} V ( z ) = e a ∥ z ∥ 2 2 . By eq. (27) ,
L V ( z ) V ( z ) ≤ a ( 2 γ + d c ˉ ) − 2 a ( m − a c ˉ ) ∥ z ∥ 2 2 . \frac{\mathcal{L}V(z)}{V(z)}\leq a(2\gamma+d\bar{c})-2a(m-a\bar{c})\|z\|_2^2. V ( z ) L V ( z ) ≤ a ( 2 γ + d c ˉ ) − 2 a ( m − a c ˉ ) ∥ z ∥ 2 2 .
Thus L V ≤ − c V + C \mathcal{L}V\leq-cV+C L V ≤ − c V + C for some constants c , C > 0 c,C>0 c , C > 0 . Applying Itô’s formula to e c t V ( Z t ) e^{ct}V(Z_t) e c t V ( Z t ) , we obtain
E w V ( Z t ) ≤ e − c t V ( z 0 ) + C ∫ 0 t e − c ( t − s ) d s ≤ V ( z 0 ) + C / c . (73) \mathbb{E}_wV(Z_t)\leq e^{-ct}V(z_0)+C\int_0^t e^{-c(t-s)}\,ds\leq V(z_0)+C/c. \tag*{(73)} E w V ( Z t ) ≤ e − c t V ( z 0 ) + C ∫ 0 t e − c ( t − s ) d s ≤ V ( z 0 ) + C / c . (73)
Since b b b has linear growth, applying Grönwall’s inequality to the integral form of eq. (26) yields
sup 0 ≤ t ≤ 1 ∥ Z i − 1 + t ∥ 2 2 ≤ C ( 1 + ∥ Z i − 1 ∥ 2 2 + sup 0 ≤ t ≤ 1 ∥ ∫ i − 1 i − 1 + t σ ( Z u ) d W u ∥ 2 2 ) . (74) \sup_{0\leq t\leq1}\|Z_{i-1+t}\|_2^2\leq C\left(1+\|Z_{i-1}\|_2^2+\sup_{0\leq t\leq1}\left\|\int_{i-1}^{i-1+t}\boldsymbol{\sigma}(Z_u)\,dW_u\right\|_2^2\right). \tag*{(74)} 0 ≤ t ≤ 1 sup ∥ Z i − 1 + t ∥ 2 2 ≤ C ( 1 + ∥ Z i − 1 ∥ 2 2 + 0 ≤ t ≤ 1 sup ∫ i − 1 i − 1 + t σ ( Z u ) d W u 2 2 ) . (74)
To control the stochastic integral in eq. (A.14), we use the Burkholder–Davis–Gundy inequality: for any continuous local martingale M \mathcal{M} M starting at zero,
∥ sup 0 ≤ t ≤ 1 ∣ M t ∣ ∥ L q ≤ C q ∥ [ M ] 1 1 / 2 ∥ L q , q ≥ 2. (75) \left\|\sup_{0\leq t\leq1}|\mathcal{M}_t|\right\|_{L^q}\leq C\sqrt{q}\left\|[\mathcal{M}]_1^{1/2}\right\|_{L^q},\qquad q\geq2. \tag*{(75)} 0 ≤ t ≤ 1 sup ∣ M t ∣ L q ≤ C q [ M ] 1 1/2 L q , q ≥ 2. (75)
with M \mathcal{M} M its quadratic variation [13 ] . Here ∥ ⋅ ∥ L q \|\cdot\|_{L^q} ∥ ⋅ ∥ L q denotes the L q ( P w ) L^q(\mathbb{P}_w) L q ( P w ) norm. Each coordinate of the stochastic integral in eq. (A.14) has quadratic variation at most c ˉ \bar{c} c ˉ on a unit interval, so its supremum has L q L^q L q norm at most C q C\sqrt{q} C q . Likewise, ∥ ∥ Z i − 1 ∥ 2 ∥ L q ≤ C q \|\|Z_{i-1}\|_2\|_{L^q} \le C\sqrt{q} ∥∥ Z i − 1 ∥ 2 ∥ L q ≤ C q uniformly in i i i , by the exponential moment bound eq. (A.13). Inserting these bounds into eq. (A.14), we get
sup i ∥ sup 0 ≤ t ≤ 1 ∥ Z i − 1 + t ∥ 2 ∥ L q ≤ C q , q ≥ 2. (76) \sup_i \left\|\sup_{0\le t\le1}\|Z_{i-1+t}\|_2\right\|_{L^q} \le C\sqrt{q}, \qquad q\ge2. \tag*{(76)} i sup 0 ≤ t ≤ 1 sup ∥ Z i − 1 + t ∥ 2 L q ≤ C q , q ≥ 2. (76)
For indices a j ∈ { 0 , … , d } a_j\in\{0,\ldots,d\} a j ∈ { 0 , … , d } , let S i a 1 ⋯ a k ( t ) S_i^{a_1\cdots a_k}(t) S i a 1 ⋯ a k ( t ) denote the corresponding signature coordinate of X ~ i ( u ) = ( u , Z i − 1 + u ) \widetilde{X}_i(u)=(u,Z_{i-1+u}) X i ( u ) = ( u , Z i − 1 + u ) over [ 0 , t ] [0,t] [ 0 , t ] , where the index 0 denotes the augmented time coordinate, and set S i ∅ ( t ) = 1 S_i^\varnothing(t)=1 S i ∅ ( t ) = 1 . Following the recursive argument in Guo et al. [ [33 ] and Horvath et al. [ [38 ] , we prove by induction on k k k that
sup i ∥ sup 0 ≤ t ≤ 1 ∣ S i a 1 ⋯ a k ( t ) ∣ ∥ L q ≤ C k q k / 2 , q ≥ 2 , \sup_i\left\|\sup_{0\le t\le1}|S_i^{a_1\cdots a_k}(t)|\right\|_{L^q}\le C_kq^{k/2}, \qquad q\ge2, i sup 0 ≤ t ≤ 1 sup ∣ S i a 1 ⋯ a k ( t ) ∣ L q ≤ C k q k /2 , q ≥ 2 ,
with C k C_k C k independent of i i i and q q q . The cases k = 0 , 1 k=0,1 k = 0 , 1 follow from S i ∅ ( t ) = 1 S_i^\varnothing(t)=1 S i ∅ ( t ) = 1 , S i 0 ( t ) = t S_i^0(t)=t S i 0 ( t ) = t , and eq. (A.16). For k ≥ 2 k\ge2 k ≥ 2 , assume the bound holds at lower levels. If a k = 0 a_k=0 a k = 0 , the last integration is in time, and the bound improves to C k q ( k − 1 ) / 2 C_kq^{(k-1)/2} C k q ( k − 1 ) /2 . For a k ≥ 1 a_k\ge1 a k ≥ 1 , write b a k b_{a_k} b a k for the corresponding drift coordinate and σ a k , ⋅ \sigma_{a_k,\cdot} σ a k , ⋅ for the corresponding diffusion row. In Itô form, the Stratonovich iterated integral reads
S i a 1 ⋯ a k ( t ) = ∫ 0 t S i a 1 ⋯ a k − 1 ( u ) b a k ( Z i − 1 + u ) d u + ∫ 0 t S i a 1 ⋯ a k − 1 ( u ) σ a k , ⋅ ( Z i − 1 + u ) d W i − 1 + u + 1 2 ∫ 0 t S i a 1 ⋯ a k − 2 ( u ) d [ X ~ i a k − 1 , X ~ i a k ] u . (77) \begin{aligned}
S_i^{a_1\cdots a_k}(t)
={}&\int_0^t S_i^{a_1\cdots a_{k-1}}(u)b_{a_k}(Z_{i-1+u})\,du\\
&+\int_0^t S_i^{a_1\cdots a_{k-1}}(u)\sigma_{a_k,\cdot}(Z_{i-1+u})\,dW_{i-1+u}\\
&+\frac{1}{2}\int_0^t S_i^{a_1\cdots a_{k-2}}(u)\,d[\widetilde{X}_i^{a_{k-1}},\widetilde{X}_i^{a_k}]_u. \tag*{(77)}
\end{aligned} S i a 1 ⋯ a k ( t ) = ∫ 0 t S i a 1 ⋯ a k − 1 ( u ) b a k ( Z i − 1 + u ) d u + ∫ 0 t S i a 1 ⋯ a k − 1 ( u ) σ a k , ⋅ ( Z i − 1 + u ) d W i − 1 + u + 2 1 ∫ 0 t S i a 1 ⋯ a k − 2 ( u ) d [ X i a k − 1 , X i a k ] u . (77)
Here [ ⋅ , ⋅ ] [\cdot,\cdot] [ ⋅ , ⋅ ] denotes quadratic covariation. We bound the L q L^q L q norm of the supremum over 0 ≤ t ≤ 1 0\le t\le1 0 ≤ t ≤ 1 of each term on the right-hand side. For the drift term, Hölder’s inequality and the linear growth of b b b bound the L q L^q L q norm by
C ∥ sup 0 ≤ u ≤ 1 ∣ S i a 1 ⋯ a k − 1 ( u ) ∣ ∥ L 2 q ( 1 + ∥ sup 0 ≤ u ≤ 1 ∥ Z i − 1 + u ∥ 2 ∥ L 2 q ) ≤ C k q ( k − 1 ) / 2 ⋅ q = C k q k / 2 . C\left\|\sup_{0\le u\le1}|S_i^{a_1\cdots a_{k-1}}(u)|\right\|_{L^{2q}}\left(1+\left\|\sup_{0\le u\le1}\|Z_{i-1+u}\|_2\right\|_{L^{2q}}\right)\le C_kq^{(k-1)/2}\cdot\sqrt{q}=C_kq^{k/2}. C 0 ≤ u ≤ 1 sup ∣ S i a 1 ⋯ a k − 1 ( u ) ∣ L 2 q ( 1 + 0 ≤ u ≤ 1 sup ∥ Z i − 1 + u ∥ 2 L 2 q ) ≤ C k q ( k − 1 ) /2 ⋅ q = C k q k /2 .
The martingale term is handled by the BDG inequality eq. (A.15), which bounds its L q L^q L q norm by
C q ∥ ( ∫ 0 1 ∣ S i a 1 ⋯ a k − 1 ( u ) ∣ 2 d u ) 1 / 2 ∥ L q ≤ C k q k / 2 . C\sqrt{q}\left\|\left(\int_0^1|S_i^{a_1\cdots a_{k-1}}(u)|^2\,du\right)^{1/2}\right\|_{L^q}\le C_kq^{k/2}. C q ( ∫ 0 1 ∣ S i a 1 ⋯ a k − 1 ( u ) ∣ 2 d u ) 1/2 L q ≤ C k q k /2 .
For the last term, note that it vanishes if a k − 1 = 0 a_{k-1}=0 a k − 1 = 0 ; otherwise, d [ X ~ i a k − 1 , X ~ i a k ] u = ( σ σ ⊤ ) a k − 1 , a k ( Z i − 1 + u ) d u d[\widetilde{X}_i^{a_{k-1}},\widetilde{X}_i^{a_k}]_u=(\sigma\sigma^\top)_{a_{k-1},a_k}(Z_{i-1+u})\,du d [ X i a k − 1 , X i a k ] u = ( σ σ ⊤ ) a k − 1 , a k ( Z i − 1 + u ) d u , with coefficient bounded by c ˉ \bar{c} c ˉ . Hence its L q L^q L q norm is bounded by
C ∥ ∫ 0 1 ∣ S i a 1 ⋯ a k − 2 ( u ) ∣ d u ∥ L q ≤ C k q ( k − 2 ) / 2 . C\left\|\int_0^1|S_i^{a_1\cdots a_{k-2}}(u)|\,du\right\|_{L^q}\le C_kq^{(k-2)/2}. C ∫ 0 1 ∣ S i a 1 ⋯ a k − 2 ( u ) ∣ d u L q ≤ C k q ( k − 2 ) /2 .
Summing the three bounds completes the induction.
Each coordinate of ψ ( X i ) \psi(\mathbf{X}_i) ψ ( X i ) is one of S i a 1 ⋯ a k ( 1 ) S_i^{a_1\cdots a_k}(1) S i a 1 ⋯ a k ( 1 ) for 0 ≤ k ≤ M 0\le k\le M 0 ≤ k ≤ M . Therefore,
sup i ( E w ∥ ψ ( X i ) ∥ 2 q ) 1 / q ≤ C M q M / 2 , q ≥ 2. (78) \sup_i\left(\mathbb{E}_w\|\psi(\mathbf{X}_i)\|_2^q\right)^{1/q}\le C_Mq^{M/2}, \qquad q\ge2. \tag*{(78)} i sup ( E w ∥ ψ ( X i ) ∥ 2 q ) 1/ q ≤ C M q M /2 , q ≥ 2. (78)
Taking q = 4 q=4 q = 4 proves the fourth-moment bound.
Gram concentration. Let P t ( z , ⋅ ) P_t(z,\cdot) P t ( z , ⋅ ) denote the transition kernel of the diffusion process Z Z Z in eq. (26) . By the Lipschitz assumptions and the uniform ellipticity bounds in eq. (27) , P t ( z , ⋅ ) P_t(z,\cdot) P t ( z , ⋅ ) admits a positive, continuous density p t ( z , z ′ ) p_t(z,z') p t ( z , z ′ ) for t > 0 t>0 t > 0 [56 ] . Define K = { z : V ( z ) ≤ r } K=\{z:V(z)\le r\} K = { z : V ( z ) ≤ r } . Since K K K is compact, we have c K : = min z , z ′ ∈ K p 1 ( z , z ′ ) > 0 c_K:=\min_{z,z'\in K}p_1(z,z')>0 c K := min z , z ′ ∈ K p 1 ( z , z ′ ) > 0 . The minorization bound below follows from the definition of c K c_K c K , and the drift bound from eq. (A.13) with initial state z z z :
P 1 ( z , A ) ≥ c K Leb ( A ∩ K ) , z ∈ K , P_1(z,A)\ge c_K\operatorname{Leb}(A\cap K),\qquad z\in K, P 1 ( z , A ) ≥ c K Leb ( A ∩ K ) , z ∈ K ,
∫ V ( z ′ ) P 1 ( z , d z ′ ) ≤ e − c V ( z ) + C , z ∈ R d , \int V(z')P_1(z,\mathrm{d}z')\le e^{-c}V(z)+C,\qquad z\in\mathbb{R}^d, ∫ V ( z ′ ) P 1 ( z , d z ′ ) ≤ e − c V ( z ) + C , z ∈ R d ,
for any Borel set A A A , where Leb denotes Lebesgue measure. For r > 2 C 1 − e − c r>\frac{2C}{1-e^{-c}} r > 1 − e − c 2 C , it follows from the geometric Harris theorem [53 ] that there is a unique invariant probability measure π \pi π , and that ∥ P t ( z , ⋅ ) − π ∥ T V ≤ C V ( z ) e − c t \lVert P_t(z,\cdot)-\pi\rVert_{\mathrm{TV}}\le CV(z)e^{-ct} ∥ P t ( z , ⋅ ) − π ∥ TV ≤ C V ( z ) e − c t for t ≥ 0 t\ge0 t ≥ 0 .
With these moment and transition bounds, Lemma A.3 applies with ρ = M / 2 \rho=M/2 ρ = M /2 and proves eq. (28) . Setting δ = ( P N ) − 4 \delta=(PN)^{-4} δ = ( P N ) − 4 , we obtain eq. (3.13) whenever N ≥ C S [ log P ] M + 2 N\ge C_S[\log P]^{M+2} N ≥ C S [ log P ] M + 2 .
Proof of Proposition 3.4. The CIR process has a unique strong solution [41 ] .
Signature moments. For g ∈ C 2 ( [ 0 , ∞ ) ) g\in C^2([0,\infty)) g ∈ C 2 ([ 0 , ∞ )) , the generator is L g ( z ) = κ ( μ − z ) g ′ ( z ) + 1 2 ν 2 z g ′ ′ ( z ) \mathcal{L}g(z)=\kappa(\mu-z)g'(z)+\frac{1}{2}\nu^2zg''(z) L g ( z ) = κ ( μ − z ) g ′ ( z ) + 2 1 ν 2 z g ′′ ( z ) . For V ( z ) = e a z V(z)=e^{az} V ( z ) = e a z with 0 < a < 2 κ / ν 2 0<a<2\kappa/\nu^2 0 < a < 2 κ / ν 2 ,
L V ( z ) V ( z ) = a κ μ − a ( κ − a ν 2 2 ) z , \frac{\mathcal{L}V(z)}{V(z)}=a\kappa\mu-a\left(\kappa-\frac{a\nu^2}{2}\right)z, V ( z ) L V ( z ) = aκ μ − a ( κ − 2 a ν 2 ) z ,
so L V ≤ − c V + C \mathcal{L}V\le-cV+C L V ≤ − c V + C for some constants c , C > 0 c,C>0 c , C > 0 . As in the diffusion case, Itô’s formula shows that sup t E w e a Z t < ∞ \sup_t\mathbb{E}_w e^{aZ_t}<\infty sup t E w e a Z t < ∞ , hence sup t ∥ Z t ∥ L q ≤ C q \sup_t\lVert Z_t\rVert_{L^q}\le C_q sup t ∥ Z t ∥ L q ≤ C q for q ≥ 1 q\ge1 q ≥ 1 . Similar to eq. (A.14) and by Burkholder–Davis–Gundy inequality, we obtain
∥ sup 0 ≤ t ≤ 1 Z i − 1 + t ∥ L q ≤ C q + C q ( ∫ i − 1 i ∥ Z u ∥ L q / 2 2 d u ) 1 / 2 ≤ C q , q ≥ 2. \left\lVert\sup_{0\le t\le1}Z_{i-1+t}\right\rVert_{L^q}\le Cq+C\sqrt{q}\left(\int_{i-1}^{i}\lVert Z_u\rVert_{L^{q/2}}^2\,\mathrm{d}u\right)^{1/2}\le Cq,\qquad q\ge2. 0 ≤ t ≤ 1 sup Z i − 1 + t L q ≤ C q + C q ( ∫ i − 1 i ∥ Z u ∥ L q /2 2 d u ) 1/2 ≤ C q , q ≥ 2.
For a one-dimensional path x x x , the Stratonovich signature has a simple bound ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M \lVert\psi(x)\rVert_2\le C_M(1+\lVert x\rVert_\infty)^M ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M . Consequently,
sup i ( E w ∥ ψ ( X i ) ∥ 2 q ) 1 / q ≤ C M ( 1 + sup i ∥ sup 0 ≤ t ≤ 1 Z i − 1 + t ∥ L M q ) M ≤ C M q M , q ≥ 2. (79) \sup_i\left(\mathbb{E}_w\lVert\psi(X_i)\rVert_2^q\right)^{1/q}\le C_M\left(1+\sup_i\left\lVert\sup_{0\le t\le1}Z_{i-1+t}\right\rVert_{L^{Mq}}\right)^M\le C_Mq^M,\qquad q\ge2. \tag*{(79)} i sup ( E w ∥ ψ ( X i ) ∥ 2 q ) 1/ q ≤ C M ( 1 + i sup 0 ≤ t ≤ 1 sup Z i − 1 + t L M q ) M ≤ C M q M , q ≥ 2. (79)
Taking q = 4 q=4 q = 4 proves the fourth-moment bound.
Gram concentration. The CIR transition law satisfies ∥ P t ( z , ⋅ ) − π ∥ T V ≤ C ( 1 + z ) e − c t \lVert P_t(z,\cdot)-\pi\rVert_{\mathrm{TV}}\le C(1+z)e^{-ct} ∥ P t ( z , ⋅ ) − π ∥ TV ≤ C ( 1 + z ) e − c t , where π \pi π is the gamma distribution [41 ] . Since sup t E w Z t < ∞ \sup_t\mathbb{E}_wZ_t<\infty sup t E w Z t < ∞ , Lemma A.3 applies with V ( z ) = 1 + z V(z)=1+z V ( z ) = 1 + z and ρ = M \rho=M ρ = M , which proves eq. (31) . With δ = ( P N ) − 4 \delta=(PN)^{-4} δ = ( P N ) − 4 , eq. (3.13) follows for N ≥ C S [ log P ] 2 M + 2 N\ge C_S[\log P]^{2M+2} N ≥ C S [ log P ] 2 M + 2 .
Fractional OU process
Proof of Proposition 3.5. Let Z ˉ \bar{Z} Z ˉ be the stationary fractional OU process driven by a two-sided extension of the same fractional Brownian motion. By Cheridito et al. [ [18 ] ,
Z t = Z ˉ t + e − κ t ( z 0 − Z ˉ 0 ) . (80) Z_t = \bar{Z}_t + e^{-\kappa t}(z_0-\bar{Z}_0). \tag*{(80)} Z t = Z ˉ t + e − κ t ( z 0 − Z ˉ 0 ) . (80)
Signature moments. By Gaussian concentration for the supremum of Z ˉ \bar{Z} Z ˉ [46 ] and eq. (A.20), we have sup i P w ( ∥ X i ∥ ∞ > u ) ≤ C e − c u 2 \sup_i \mathbb{P}_w(\lVert X_i\rVert_\infty> u) \le Ce^{-cu^2} sup i P w (∥ X i ∥ ∞ > u ) ≤ C e − c u 2 for u ≥ C u \ge C u ≥ C . Indeed, ∥ X i ∥ ∞ ≤ ∥ Z ˉ i − 1 + ⋅ ∥ ∞ + ∣ z 0 ∣ + ∣ Z ˉ 0 ∣ \lVert X_i\rVert_\infty\le\lVert\bar{Z}_{i-1+\cdot}\rVert_\infty+ \lvert z_0\rvert+ \lvert\bar{Z}_0\rvert ∥ X i ∥ ∞ ≤ ∥ Z ˉ i − 1 +⋅ ∥ ∞ + ∣ z 0 ∣ + ∣ Z ˉ 0 ∣ , and stationarity yields a uniform tail bound uniform in i i i . For a scalar path, recall that signature coordinates can be expressed using products of increments and time integrals, hence ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M \lVert\psi(x)\rVert_2 \le C_M(1+\lVert x\rVert_\infty)^M ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M , and the fourth-moment bound follows from the Gaussian tail bound. The same representation also gives a local Lipschitz bound: for ∥ x ∥ ∞ , ∥ y ∥ ∞ ≤ A \lVert x\rVert_\infty,\lVert y\rVert_\infty\le A ∥ x ∥ ∞ , ∥ y ∥ ∞ ≤ A ,
∥ ψ ( x ) − ψ ( y ) ∥ 2 ≤ C M ( 1 + A ) M − 1 ∥ x − y ∥ ∞ . (81) \lVert\psi(x)-\psi(y)\rVert_2 \le C_M(1+A)^{M-1}\lVert x-y\rVert_\infty. \tag*{(81)} ∥ ψ ( x ) − ψ ( y ) ∥ 2 ≤ C M ( 1 + A ) M − 1 ∥ x − y ∥ ∞ . (81)
Gram concentration. By Cheridito et al. [ [18 ] , the stationary covariance R H ( h ) : = Cov ( Z ˉ 0 , Z ˉ h ) R_H(h):=\operatorname{Cov}(\bar{Z}_0,\bar{Z}_h) R H ( h ) := Cov ( Z ˉ 0 , Z ˉ h ) , h ≥ 0 h\ge0 h ≥ 0 , satisfies
∣ R H ( h ) ∣ ≤ C ( 1 + h ) 2 H − 2 . (82) \lvert R_H(h)\rvert\le C(1+h)^{2H-2}. \tag*{(82)} ∣ R H ( h )∣ ≤ C ( 1 + h ) 2 H − 2 . (82)
And for H = 1 / 2 H=1/2 H = 1/2 , the covariance can be explicitly computed: R 1 / 2 ( h ) = ν 2 2 κ e − κ h R_{1/2}(h)=\frac{\nu^2}{2\kappa}e^{-\kappa h} R 1/2 ( h ) = 2 κ ν 2 e − κh . We will verify the condition by applying Gaussian concentration to the N N N sampled unit-time paths X i ( t ) = Z i − 1 + t X_i(t)=Z_{i-1+t} X i ( t ) = Z i − 1 + t , viewed jointly as a Gaussian process ( X 1 , … , X N ) ∈ C ( [ 0 , 1 ] ) N (X_1,\ldots,X_N)\in C([0,1])^N ( X 1 , … , X N ) ∈ C ([ 0 , 1 ] ) N .
We first bound the variances of linear functionals on this product space. Let a i j : = sup s , t ∈ [ 0 , 1 ] ∣ Cov ( Z ˉ i − 1 + s , Z ˉ j − 1 + t ) ∣ a_{ij}:=\sup_{s,t\in[0,1]}\lvert\operatorname{Cov}(\bar{Z}_{i-1+s},\bar{Z}_{j-1+t})\rvert a ij := sup s , t ∈ [ 0 , 1 ] ∣ Cov ( Z ˉ i − 1 + s , Z ˉ j − 1 + t )∣ . Then we have
max i ∑ j = 1 N a i j ≤ C N max ( 2 H , 1 ) − 1 . \max_i\sum_{j=1}^{N}a_{ij}\le CN^{\max(2H,1)-1}. i max j = 1 ∑ N a ij ≤ C N m a x ( 2 H , 1 ) − 1 .
Consider the path space C ( [ 0 , 1 ] ) N C([0,1])^N C ([ 0 , 1 ] ) N equipped with the norm ∥ x ∥ : = ( ∑ i = 1 N ∥ x i ∥ ∞ 2 ) 1 / 2 \lVert x\rVert:=\left(\sum_{i=1}^{N}\lVert x_i\rVert_\infty^2\right)^{1/2} ∥ x ∥ := ( ∑ i = 1 N ∥ x i ∥ ∞ 2 ) 1/2 for x = ( x 1 , … , x N ) x=(x_1,\ldots,x_N) x = ( x 1 , … , x N ) . By the Riesz representation theorem, any continuous linear functional in this space can be written in the form of L μ ( x ) = ∑ i = 1 N ∫ 0 1 x i ( t ) d μ i ( t ) L_\mu(x)=\sum_{i=1}^{N}\int_0^1x_i(t)\,\mathrm{d}\mu_i(t) L μ ( x ) = ∑ i = 1 N ∫ 0 1 x i ( t ) d μ i ( t ) for some finite signed measures μ i \mu_i μ i on [ 0 , 1 ] [0,1] [ 0 , 1 ] . Writing m i : = ∣ μ i ∣ ( [ 0 , 1 ] ) m_i:=\lvert\mu_i\rvert([0,1]) m i := ∣ μ i ∣ ([ 0 , 1 ]) for their total variations, we have ∥ L μ ∥ o p 2 = ∑ i = 1 N m i 2 \lVert L_\mu\rVert_{\mathrm{op}}^2=\sum_{i=1}^{N}m_i^2 ∥ L μ ∥ op 2 = ∑ i = 1 N m i 2 , and
Var ( ∑ i = 1 N ∫ 0 1 Z ˉ i − 1 + t d μ i ( t ) ) = ∑ i , j = 1 N ∫ 0 1 ∫ 0 1 Cov ( Z ˉ i − 1 + s , Z ˉ j − 1 + t ) d μ i ( s ) d μ j ( t ) ≤ ∑ i = 1 N m i 2 ∑ j = 1 N a i j ≤ C N max ( 2 H , 1 ) − 1 ∑ i = 1 N m i 2 . (83) \begin{aligned}
\operatorname{Var}\left(\sum_{i=1}^{N}\int_0^1\bar{Z}_{i-1+t}\,\mathrm{d}\mu_i(t)\right)
&=\sum_{i,j=1}^{N}\int_0^1\int_0^1\operatorname{Cov}(\bar{Z}_{i-1+s},\bar{Z}_{j-1+t})\,\mathrm{d}\mu_i(s)\,\mathrm{d}\mu_j(t)\\
&\le\sum_{i=1}^{N}m_i^2\sum_{j=1}^{N}a_{ij}\\
&\le CN^{\max(2H,1)-1}\sum_{i=1}^{N}m_i^2. \tag*{(83)}
\end{aligned} Var ( i = 1 ∑ N ∫ 0 1 Z ˉ i − 1 + t d μ i ( t ) ) = i , j = 1 ∑ N ∫ 0 1 ∫ 0 1 Cov ( Z ˉ i − 1 + s , Z ˉ j − 1 + t ) d μ i ( s ) d μ j ( t ) ≤ i = 1 ∑ N m i 2 j = 1 ∑ N a ij ≤ C N m a x ( 2 H , 1 ) − 1 i = 1 ∑ N m i 2 . (83)
By eq. (A.20), L μ ( X 1 , … , X N ) = L μ ( X ‾ 1 , … , X ‾ N ) + c μ ( z 0 − Z ‾ 0 ) L_\mu(X_1,\ldots,X_N)=L_\mu(\overline{X}_1,\ldots,\overline{X}_N)+c_\mu(z_0-\overline{Z}_0) L μ ( X 1 , … , X N ) = L μ ( X 1 , … , X N ) + c μ ( z 0 − Z 0 ) , where c μ : = ∑ i = 1 N ∫ 0 1 e − κ ( i − 1 + t ) d μ i ( t ) c_\mu:=\sum_{i=1}^{N}\int_0^1 e^{-\kappa(i-1+t)}\,\mathrm{d}\mu_i(t) c μ := ∑ i = 1 N ∫ 0 1 e − κ ( i − 1 + t ) d μ i ( t ) is deterministic. Since z 0 z_0 z 0 is fixed, the correction term c μ ( z 0 − Z ‾ 0 ) c_\mu(z_0-\overline{Z}_0) c μ ( z 0 − Z 0 ) has variance c μ 2 Var ( Z ‾ 0 ) c_\mu^2\operatorname{Var}(\overline{Z}_0) c μ 2 Var ( Z 0 ) , and
∣ c μ ∣ 2 ≤ ( ∑ i = 1 N e − κ ( i − 1 ) m i ) 2 ≤ ( ∑ i = 1 N e − 2 κ ( i − 1 ) ) ∑ i = 1 N m i 2 ≤ C ∑ i = 1 N m i 2 . (84) |c_\mu|^2\leq\left(\sum_{i=1}^{N}e^{-\kappa(i-1)}m_i\right)^2\leq\left(\sum_{i=1}^{N}e^{-2\kappa(i-1)}\right)\sum_{i=1}^{N}m_i^2\leq C\sum_{i=1}^{N}m_i^2. \tag*{(84)} ∣ c μ ∣ 2 ≤ ( i = 1 ∑ N e − κ ( i − 1 ) m i ) 2 ≤ ( i = 1 ∑ N e − 2 κ ( i − 1 ) ) i = 1 ∑ N m i 2 ≤ C i = 1 ∑ N m i 2 . (84)
Putting eqs. (A.23) and (A.24) together, we get
Var ( L μ ( X 1 , … , X N ) ) ≤ 2 Var ( ∑ i = 1 N ∫ 0 1 Z ‾ i − 1 + t d μ i ( t ) ) + 2 c μ 2 Var ( Z ‾ 0 ) ≤ C N max ( 2 H , 1 ) − 1 ∑ i = 1 N m i 2 = C N max ( 2 H , 1 ) − 1 ∥ L μ ∥ o p 2 . (85) \begin{aligned}
\operatorname{Var}\left(L_\mu(X_1,\ldots,X_N)\right)\leq2\operatorname{Var}\left(\sum_{i=1}^{N}\int_0^1\overline{Z}_{i-1+t}\,\mathrm{d}\mu_i(t)\right)+2c_\mu^2\operatorname{Var}(\overline{Z}_0) \\
&\leq CN^{\max(2H,1)-1}\sum_{i=1}^{N}m_i^2 \\
&=CN^{\max(2H,1)-1}\lVert L_\mu\rVert_{\mathrm{op}}^2. \tag*{(85)}
\end{aligned} Var ( L μ ( X 1 , … , X N ) ) ≤ 2 Var ( i = 1 ∑ N ∫ 0 1 Z i − 1 + t d μ i ( t ) ) + 2 c μ 2 Var ( Z 0 ) ≤ C N m a x ( 2 H , 1 ) − 1 i = 1 ∑ N m i 2 = C N m a x ( 2 H , 1 ) − 1 ∥ L μ ∥ op 2 . (85)
Let N \mathcal{N} N be the finite set of unit vectors from Lemma A.1, which reduces the supremum on the Lasso cone to a maximum over N \mathcal{N} N . For u ∈ N u\in\mathcal{N} u ∈ N , define F u ( x ) = 1 N ∑ i = 1 N ( u ⊤ ψ ( x i ) ) 2 F_u(x)=\frac{1}{N}\sum_{i=1}^{N}(u^\top\psi(x_i))^2 F u ( x ) = N 1 ∑ i = 1 N ( u ⊤ ψ ( x i ) ) 2 . Then
F u ( X 1 , … , X N ) − E w F u ( X 1 , … , X N ) = u ⊤ ( G N − E w [ G N ] ) u . F_u(X_1,\ldots,X_N)-\mathbb{E}_wF_u(X_1,\ldots,X_N)=u^\top(G_N-\mathbb{E}_w[G_N])u. F u ( X 1 , … , X N ) − E w F u ( X 1 , … , X N ) = u ⊤ ( G N − E w [ G N ]) u .
Combining eq. (A.21) with ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M \lVert\psi(x)\rVert_2\leq C_M(1+\lVert x\rVert_\infty)^M ∥ ψ ( x ) ∥ 2 ≤ C M ( 1 + ∥ x ∥ ∞ ) M , we obtain
∣ F u ( x ) − F u ( y ) ∣ ≤ C M ( 1 + A ) 2 M − 1 N ∑ i = 1 N ∥ x i − y i ∥ ∞ ≤ C M ( 1 + A ) 2 M − 1 N ∥ x − y ∥ . |F_u(x)-F_u(y)|\leq\frac{C_M(1+A)^{2M-1}}{N}\sum_{i=1}^{N}\lVert x_i-y_i\rVert_\infty
\leq\frac{C_M(1+A)^{2M-1}}{\sqrt{N}}\lVert x-y\rVert. ∣ F u ( x ) − F u ( y ) ∣ ≤ N C M ( 1 + A ) 2 M − 1 i = 1 ∑ N ∥ x i − y i ∥ ∞ ≤ N C M ( 1 + A ) 2 M − 1 ∥ x − y ∥ .
Using sup i P w ( ∥ X i ∥ ∞ > u ) ≤ C e − c u 2 \sup_i\mathbb{P}_w(\lVert X_i\rVert_\infty>u)\leq Ce^{-cu^2} sup i P w (∥ X i ∥ ∞ > u ) ≤ C e − c u 2 , a union bound allows us to choose A = C log ( 2 N / δ ) A=C\sqrt{\log(2N/\delta)} A = C log ( 2 N / δ ) such that
P w ( max i ∥ X i ∥ ∞ > A ) ≤ C N e − c A 2 ≤ δ 2 4 N 2 . \mathbb{P}_w\left(\max_i\lVert X_i\rVert_\infty>A\right)\leq CNe^{-cA^2}\leq\frac{\delta^2}{4N^2}. P w ( i max ∥ X i ∥ ∞ > A ) ≤ C N e − c A 2 ≤ 4 N 2 δ 2 .
Clipping each path to [ − A , A ] [-A,A] [ − A , A ] extends the Lipschitz bound to the whole path space and leaves F u ( x ) F_u(x) F u ( x ) unchanged whenever max i ∥ x i ∥ ∞ ≤ A \max_i\lVert x_i\rVert_\infty\leq A max i ∥ x i ∥ ∞ ≤ A .
Define the coordinate-wise clipping x A ( t ) : = max { − A , min { x ( t ) , A } } x^A(t):=\max\{-A,\min\{x(t),A\}\} x A ( t ) := max { − A , min { x ( t ) , A }} , and F ~ u ( x ) : = F u ( x A ) \widetilde{F}_u(x):=F_u(x^A) F u ( x ) := F u ( x A ) . Consequently, F ~ u \widetilde{F}_u F u is C M ( 1 + A ) 2 M − 1 / N C_M(1+A)^{2M-1}/\sqrt{N} C M ( 1 + A ) 2 M − 1 / N -Lipschitz on C ( [ 0 , 1 ] ) N C([0,1])^N C ([ 0 , 1 ] ) N and satisfies 0 ≤ F ~ u ( x ) ≤ C M ( 1 + A ) 2 M 0\leq\widetilde{F}_u(x)\leq C_M(1+A)^{2M} 0 ≤ F u ( x ) ≤ C M ( 1 + A ) 2 M . By the Gaussian concentration [Ledoux, [46 ] ] and the variance bound eq. (A.25), we see
P w ( ∣ F ~ u − E w F ~ u ∣ > t ) ≤ 2 exp ( − c N 2 − max ( 2 H , 1 ) t 2 ( 1 + A ) 4 M − 2 ) . (86) \mathbb{P}_w\left(\left|\widetilde{F}_u-\mathbb{E}_w\widetilde{F}_u\right|>t\right)\leq2\exp\left(-\frac{cN^{2-\max(2H,1)}t^2}{(1+A)^{4M-2}}\right). \tag*{(86)} P w ( F u − E w F u > t ) ≤ 2 exp ( − ( 1 + A ) 4 M − 2 c N 2 − m a x ( 2 H , 1 ) t 2 ) . (86)
Since F ~ u = F u \widetilde{F}_u=F_u F u = F u on the event { max i ∥ X i ∥ ∞ ≤ A } \{\max_i\lVert X_i\rVert_\infty\leq A\} { max i ∥ X i ∥ ∞ ≤ A } and E w F u 2 ≤ B 4 \mathbb{E}_wF_u^2\leq B^4 E w F u 2 ≤ B 4 , we see by Cauchy–Schwarz inequality that the truncation bias satisfies ∣ E w F u − E w F ~ u ∣ ≤ C ( B 2 δ / N + ( 1 + A ) 2 M δ 2 / N 2 ) |\mathbb{E}_wF_u-\mathbb{E}_w\widetilde{F}_u|\leq C(B^2\delta/N+(1+A)^{2M}\delta^2/N^2) ∣ E w F u − E w F u ∣ ≤ C ( B 2 δ / N + ( 1 + A ) 2 M δ 2 / N 2 ) . Now a union bound over u ∈ N u\in\mathcal{N} u ∈ N in eq. (A.26), followed by Lemma A.1, yields eq. (33) . Finally, with δ = ( P N ) − 4 \delta=(PN)^{-4} δ = ( P N ) − 4 and a sufficiently large constant in eq. (34) , we obtain eq. (3.13).
Construction of the Transformer
This section constructs the masked softmax transformer of Lemma 4.1 by assembling three modular building blocks. First, Lemma B.1 shows that two masked softmax attention heads can approximate a gradient step on the empirical squared loss. Second, Lemma B.2 constructs an MLP block that executes the proximal update via soft-thresholding and clipping. Third, Lemma B.3 designs a dedicated readout attention layer that extracts the scalar query prediction from the final coefficient iterate. Finally, these components are stacked across layers to solve in-context Lasso up to any prescribed optimization tolerance.
Masked Softmax Attention Realization of Proximal Gradient
We now present the first and the core transformer construction: a masked softmax attention that approximates in-context proximal gradient.
To start, let X 1 , … , X N + 1 ∈ X X_1,\ldots,X_{N+1}\in\mathcal{X} X 1 , … , X N + 1 ∈ X be paths with observed labels Y 1 , … , Y N ∈ R Y_1,\ldots,Y_N\in\mathbb{R} Y 1 , … , Y N ∈ R for the first N N N paths. Their signature features are ψ ( X i ) = Sig M ( X ~ i ) ∈ R P \psi(X_i)=\operatorname{Sig}_M(\widetilde{X}_i)\in\mathbb{R}^P ψ ( X i ) = Sig M ( X i ) ∈ R P . For λ > 0 \lambda>0 λ > 0 , define the Lasso objective
J λ ( u ) : = 1 2 N ∑ i = 1 N ( ψ ( X i ) ⊤ u − Y i ) 2 + λ ∥ u ∥ 1 . (87) J_\lambda(u):=\frac{1}{2N}\sum_{i=1}^{N}\left(\psi(X_i)^\top u-Y_i\right)^2+\lambda\lVert u\rVert_1. \tag*{(87)} J λ ( u ) := 2 N 1 i = 1 ∑ N ( ψ ( X i ) ⊤ u − Y i ) 2 + λ ∥ u ∥ 1 . (87)
We write a token embedding as h = [ x ; y ; v ; b d ; b q ] h=[x;y;v;b_d;b_q] h = [ x ; y ; v ; b d ; b q ] , where x ∈ R P x\in\mathbb{R}^P x ∈ R P is its feature vector and b d b_d b d and b q b_q b q indicate demonstration and query tokens, respectively. We encode the path-label pairs and the query, together with a zero anchor, as
h 0 = [ 0 P ; 0 ; 0 P ; 0 ; 0 ] , h i = [ ψ ( X i ) ; Y i ; 0 P ; 1 ; 0 ] , 1 ≤ i ≤ N , h N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] . (88) \begin{aligned}
h_0&=[0_P;0;0_P;0;0],\\
h_i&=[\psi(X_i);Y_i;0_P;1;0],\qquad1\le i\le N,\\
h_{N+1}&=[\psi(X_{N+1});0;v;0;1]. \tag*{(88)}
\end{aligned} h 0 h i h N + 1 = [ 0 P ; 0 ; 0 P ; 0 ; 0 ] , = [ ψ ( X i ) ; Y i ; 0 P ; 1 ; 0 ] , 1 ≤ i ≤ N , = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] . (88)
The coefficient vector v v v is initially zero and stores the successive coefficient estimates.
Lemma B.1 (Gradient step by attention). Fix a truncation radius K > 0 K>0 K > 0 and let η , R , γ > 0 \eta,R,\gamma>0 η , R , γ > 0 . There is a two-head masked softmax attention block Attn θ ( ⋅ ) \operatorname{Attn}_{\theta}(\cdot) Attn θ ( ⋅ ) (def. 2.1) with head dimension P + 1 P+1 P + 1 satisfying the following property. Let H = [ h 0 , … , h N + 1 ] ⊤ H=[h_0,\ldots,h_{N+1}]^\top H = [ h 0 , … , h N + 1 ] ⊤ be a prompt of the form eq. (B.2) such that
max 1 ≤ i ≤ N + 1 ∥ ψ ( X i ) ∥ 2 ∨ max 1 ≤ i ≤ N ∣ Y i ∣ ≤ K , ∥ v ∥ ∞ ≤ R . \max_{1\le i\le N+1}\lVert\psi(X_i)\rVert_2\vee\max_{1\le i\le N}|Y_i|\le K,\qquad\lVert v\rVert_\infty\le R. 1 ≤ i ≤ N + 1 max ∥ ψ ( X i ) ∥ 2 ∨ 1 ≤ i ≤ N max ∣ Y i ∣ ≤ K , ∥ v ∥ ∞ ≤ R . Then Attn θ ( ⋅ ) \operatorname{Attn}_{\theta}(\cdot) Attn θ ( ⋅ ) leaves the first N + 1 N+1 N + 1 tokens unchanged and maps h N + 1 h_{N+1} h N + 1 to h ~ N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ~ ; 0 ; 1 ] \widetilde{h}_{N+1}=[\psi(X_{N+1});0;\widetilde{v};0;1] h N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] , where v ~ \widetilde{v} v is within γ \gamma γ of one gradient step on the squared loss:
∥ v ~ − [ v − η N ∑ i = 1 N ( v ⊤ ψ ( X i ) − Y i ) ψ ( X i ) ] ∥ 2 ≤ γ . (89) \left\lVert\widetilde{v}-\left[v-\frac{\eta}{N}\sum_{i=1}^{N}\left(v^\top\psi(X_i)-Y_i\right)\psi(X_i)\right]\right\rVert_2\le\gamma. \tag*{(89)} v − [ v − N η i = 1 ∑ N ( v ⊤ ψ ( X i ) − Y i ) ψ ( X i ) ] 2 ≤ γ . (89)
Proof. Let us take a generic token as h = [ x ; y ; v ; b d ; b q ] h=[x;y;v;b_d;b_q] h = [ x ; y ; v ; b d ; b q ] and refer to the two heads as the positive and negative heads, indexing their parameters by + + + and − - − . The heads share a query, and have opposite keys and values: for τ , A > 0 \tau,A>0 τ , A > 0 , set
Q ± ⊤ h = [ v ; b q ] , K ± ⊤ h = [ ± τ x ; ∓ τ y − A b d − 2 A b q ] , Q_{\pm}^{\top}h=[v;b_q],\qquad K_{\pm}^{\top}h=[\pm\tau x;\mp\tau y-Ab_d-2Ab_q], Q ± ⊤ h = [ v ; b q ] , K ± ⊤ h = [ ± τ x ; ∓ τ y − A b d − 2 A b q ] ,
V ± ⊤ h = ± η e A 2 τ N [ 0 P ; 0 ; x ; 0 ; 0 ] . (90) V_{\pm}^{\top}h=\pm\frac{\eta e^A}{2\tau N}[0_P;0;x;0;0]. \tag*{(90)} V ± ⊤ h = ± 2 τ N η e A [ 0 P ; 0 ; x ; 0 ; 0 ] . (90)
Since the values are supported on the coefficient coordinates, every token keeps all its other coordinates due to residual connection. At the anchor and demonstration tokens, v = 0 P v = 0_P v = 0 P and b q = 0 b_q = 0 b q = 0 , so the query vector [ v ; b q ] [v;b_q] [ v ; b q ] vanishes and thus all attention scores are zero. Consequently, both heads place uniform weights on the visible tokens, and their opposite values cancel. These tokens are therefore unchanged.
For the last token h N + 1 h_{N+1} h N + 1 , the query vector is [ v ; 1 ] [v;1] [ v ; 1 ] . Write r i = v ⊤ ψ ( X i ) − Y i r_i = v^\top\psi(X_i) - Y_i r i = v ⊤ ψ ( X i ) − Y i for the residual of demonstration i i i , and z = v ⊤ ψ ( X N + 1 ) z = v^\top\psi(X_{N+1}) z = v ⊤ ψ ( X N + 1 ) . By eq. (B.4), each head assigns to token h s h_s h s the score
⟨ [ v ; 1 ] , K ± ⊤ h s ⟩ = { 0 , s = 0 (anchor) , − A ± τ r s , 1 ≤ s ≤ N (demonstrations) , − 2 A ± τ z , s = N + 1 (itself) . \left\langle[v;1],K_{\pm}^{\top}h_s\right\rangle=
\begin{cases}
0, & s=0\ \text{(anchor)},\\
-A\pm\tau r_s, & 1\le s\le N\ \text{(demonstrations)},\\
-2A\pm\tau z, & s=N+1\ \text{(itself)}.
\end{cases} ⟨ [ v ; 1 ] , K ± ⊤ h s ⟩ = ⎩ ⎨ ⎧ 0 , − A ± τ r s , − 2 A ± τ z , s = 0 (anchor) , 1 ≤ s ≤ N (demonstrations) , s = N + 1 (itself) .
By eq. (3) , the positive head therefore adds to the coefficient vector of h N + 1 h_{N+1} h N + 1
− η e A 2 τ N ⋅ ∑ i = 1 N e − A + τ r i ψ ( X i ) + e − 2 A + τ z ψ ( X N + 1 ) 1 + ∑ i = 1 N e − A + τ r i + e − 2 A + τ z . -\frac{\eta e^A}{2\tau N}\cdot
\frac{\sum_{i=1}^{N}e^{-A+\tau r_i}\psi(X_i)+e^{-2A+\tau z}\psi(X_{N+1})}
{1+\sum_{i=1}^{N}e^{-A+\tau r_i}+e^{-2A+\tau z}}. − 2 τ N η e A ⋅ 1 + ∑ i = 1 N e − A + τ r i + e − 2 A + τ z ∑ i = 1 N e − A + τ r i ψ ( X i ) + e − 2 A + τ z ψ ( X N + 1 ) .
The negative head contributes the same expression with τ \tau τ replaced by − τ -\tau − τ . Adding both contributions to the input v v v , we obtain
v ~ = v − η 2 τ N ∑ i = 1 N e τ r i ψ ( X i ) + e − A + τ z ψ ( X N + 1 ) 1 + e − A ∑ i = 1 N e τ r i + e − 2 A + τ z + η 2 τ N ∑ i = 1 N e − τ r i ψ ( X i ) + e − A − τ z ψ ( X N + 1 ) 1 + e − A ∑ i = 1 N e − τ r i + e − 2 A − τ z . (91) \widetilde v=v-\frac{\eta}{2\tau N}
\frac{\sum_{i=1}^{N}e^{\tau r_i}\psi(X_i)+e^{-A+\tau z}\psi(X_{N+1})}
{1+e^{-A}\sum_{i=1}^{N}e^{\tau r_i}+e^{-2A+\tau z}}
+\frac{\eta}{2\tau N}
\frac{\sum_{i=1}^{N}e^{-\tau r_i}\psi(X_i)+e^{-A-\tau z}\psi(X_{N+1})}
{1+e^{-A}\sum_{i=1}^{N}e^{-\tau r_i}+e^{-2A-\tau z}}. \tag*{(91)} v = v − 2 τ N η 1 + e − A ∑ i = 1 N e τ r i + e − 2 A + τ z ∑ i = 1 N e τ r i ψ ( X i ) + e − A + τ z ψ ( X N + 1 ) + 2 τ N η 1 + e − A ∑ i = 1 N e − τ r i + e − 2 A − τ z ∑ i = 1 N e − τ r i ψ ( X i ) + e − A − τ z ψ ( X N + 1 ) . (91)
It remains to show that this update is close to the gradient step with suitable parameters A A A , τ \tau τ . Since ∥ ψ ( X i ) ∥ 2 ≤ K \|\psi(X_i)\|_2\le K ∥ ψ ( X i ) ∥ 2 ≤ K , ∣ z ∣ ≤ K R P |z|\le KR\sqrt{P} ∣ z ∣ ≤ K R P , and ∣ r i ∣ ≤ K ( R P + 1 ) |r_i|\le K(R\sqrt{P}+1) ∣ r i ∣ ≤ K ( R P + 1 ) , the denominators in eq. (B.5) are close to one, and the terms involving ψ ( X N + 1 ) \psi(X_{N+1}) ψ ( X N + 1 ) are small: for 0 < τ ≤ 1 0<\tau\le1 0 < τ ≤ 1 and A > 0 A>0 A > 0 ,
0 ≤ 1 − 1 1 + e − A ∑ i = 1 N e ± τ r i + e − 2 A ± τ z ≤ C e − A , 0\le1-\frac{1}{1+e^{-A}\sum_{i=1}^{N}e^{\pm\tau r_i}+e^{-2A\pm\tau z}}\le Ce^{-A}, 0 ≤ 1 − 1 + e − A ∑ i = 1 N e ± τ r i + e − 2 A ± τ z 1 ≤ C e − A ,
e − A ± τ z ∥ ψ ( X N + 1 ) ∥ 2 ≤ C e − A , e^{-A\pm\tau z}\|\psi(X_{N+1})\|_2\le Ce^{-A}, e − A ± τ z ∥ ψ ( X N + 1 ) ∥ 2 ≤ C e − A ,
where C C C denotes a constant depending only on N N N , P P P , K K K , R R R , η \eta η . Moreover, for the terms involving ψ ( X i ) \psi(X_i) ψ ( X i ) , the symmetric difference quotient is close to r i r_i r i :
∣ e τ r i − e − τ r i 2 τ − r i ∣ ≤ τ 2 ∣ r i ∣ 3 6 e τ ∣ r i ∣ ≤ C τ 2 . \left|\frac{e^{\tau r_i}-e^{-\tau r_i}}{2\tau}-r_i\right|
\le\frac{\tau^2|r_i|^3}{6}e^{\tau|r_i|}
\le C\tau^2. 2 τ e τ r i − e − τ r i − r i ≤ 6 τ 2 ∣ r i ∣ 3 e τ ∣ r i ∣ ≤ C τ 2 .
Inserting these estimates into eq. (B.5), we find that
∥ v ~ − [ v − η N ∑ i = 1 N r i ψ ( X i ) ] ∥ 2 ≤ C ( τ 2 + e − A τ ) . \left\|\widetilde v-\left[v-\frac{\eta}{N}\sum_{i=1}^{N}r_i\psi(X_i)\right]\right\|_2
\le C\left(\tau^2+\frac{e^{-A}}{\tau}\right). v − [ v − N η i = 1 ∑ N r i ψ ( X i ) ] 2 ≤ C ( τ 2 + τ e − A ) .
uniformly over the prompts and coefficient vectors in the lemma. By first fixing τ ∈ ( 0 , 1 ] \tau\in(0,1] τ ∈ ( 0 , 1 ] with C τ 2 ≤ γ / 2 C\tau^2\le\gamma/2 C τ 2 ≤ γ /2 , and then taking A > 0 A>0 A > 0 with C e − A / τ ≤ γ / 2 Ce^{-A}/\tau\le\gamma/2 C e − A / τ ≤ γ /2 , we obtain eq. (B.3).
Lemma B.2 (Soft-thresholding by MLP). Fix t , R > 0 t, R > 0 t , R > 0 . There is an MLP block MLP θ ( ⋅ ) \operatorname{MLP}_{\theta}(\cdot) MLP θ ( ⋅ ) (def. 2.2) with hidden width 4 P + 1 4P + 1 4 P + 1 satisfying the following property. For any prompt H H H of the form eq. (B.2), the block leaves h 0 , … , h N h_0,\ldots,h_N h 0 , … , h N unchanged and maps the last token h N + 1 h_{N+1} h N + 1 to h ~ N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ~ ; 0 ; 1 ] \widetilde{h}_{N+1} = [\psi(X_{N+1});0;\widetilde{v};0;1] h N + 1 = [ ψ ( X N + 1 ) ; 0 ; v ; 0 ; 1 ] , where
v ~ = proj [ − R , R ] P S t ( v ) , [ S t ( v ) ] j : = sign ( v j ) ( ∣ v j ∣ − t ) + . (92) \widetilde{v} = \operatorname{proj}_{[-R,R]^P} S_t(v), \qquad[S_t(v)]_j := \operatorname{sign}(v_j)(|v_j|-t)_+. \tag*{(92)} v = proj [ − R , R ] P S t ( v ) , [ S t ( v ) ] j := sign ( v j ) ( ∣ v j ∣ − t ) + . (92) Moreover, the map v ↦ v ~ v \mapsto\widetilde{v} v ↦ v is 1 1 1 -Lipschitz in ∥ ⋅ ∥ 2 \lVert\cdot\rVert_2 ∥ ⋅ ∥ 2 .
Proof. Write a token as h = [ x ; y ; v ; b d ; b q ] ∈ R 2 P + 3 h = [x;y;v;b_d;b_q] \in\mathbb{R}^{2P+3} h = [ x ; y ; v ; b d ; b q ] ∈ R 2 P + 3 . Let E ∈ R ( 2 P + 3 ) × P E \in\mathbb{R}^{(2P+3)\times P} E ∈ R ( 2 P + 3 ) × P be the matrix with E ⊤ h = v E^\top h = v E ⊤ h = v , and let e q ∈ R 2 P + 3 e_q \in\mathbb{R}^{2P+3} e q ∈ R 2 P + 3 be the standard basis vector with e q ⊤ h = b q e_q^\top h = b_q e q ⊤ h = b q . We define W 1 , W 2 ∈ R ( 2 P + 3 ) × ( 4 P + 1 ) W_1,W_2 \in\mathbb{R}^{(2P+3)\times(4P+1)} W 1 , W 2 ∈ R ( 2 P + 3 ) × ( 4 P + 1 ) by
W 1 = [ E + t e q 1 P ⊤ , E − t e q 1 P ⊤ , e q , E − ( t + R ) e q 1 P ⊤ , − E − ( t + R ) e q 1 P ⊤ ] , W_1 = \left[ E + t e_q 1_P^\top,\ E - t e_q 1_P^\top,\ e_q,\ E - (t+R)e_q1_P^\top,\ -E - (t+R)e_q1_P^\top\right], W 1 = [ E + t e q 1 P ⊤ , E − t e q 1 P ⊤ , e q , E − ( t + R ) e q 1 P ⊤ , − E − ( t + R ) e q 1 P ⊤ ] , W 2 = E [ − I P , I P , t 1 P , − I P , I P ] . W_2 = E\left[-I_P,\ I_P,\ t1_P,\ -I_P,\ I_P\right]. W 2 = E [ − I P , I P , t 1 P , − I P , I P ] . Then, for any token h h h , we have
W 1 ⊤ h = [ v + t b q 1 P ; v − t b q 1 P ; b q ; v − ( t + R ) b q 1 P ; − v − ( t + R ) b q 1 P ] . W_1^\top h = \left[v + tb_q1_P;\ v - tb_q1_P;\ b_q;\ v - (t+R)b_q1_P;\ -v - (t+R)b_q1_P\right]. W 1 ⊤ h = [ v + t b q 1 P ; v − t b q 1 P ; b q ; v − ( t + R ) b q 1 P ; − v − ( t + R ) b q 1 P ] . By def. 2.2, the MLP block maps h h h to h + W 2 ReLU ( W 1 ⊤ h ) h + W_2\operatorname{ReLU}(W_1^\top h) h + W 2 ReLU ( W 1 ⊤ h ) . Since the columns of W 2 W_2 W 2 lie in the column space of E E E , only the coefficient coordinates are updated, with v v v mapped to
v ~ = v − ReLU ( v + t b q 1 P ) + ReLU ( v − t b q 1 P ) + t ReLU ( b q ) 1 P − ReLU ( v − ( t + R ) b q 1 P ) + ReLU ( − v − ( t + R ) b q 1 P ) . (93) \begin{aligned}
\widetilde{v} ={}& v - \operatorname{ReLU}(v + tb_q1_P) + \operatorname{ReLU}(v - tb_q1_P) + t\operatorname{ReLU}(b_q)1_P \\
&- \operatorname{ReLU}(v - (t+R)b_q1_P) + \operatorname{ReLU}(-v - (t+R)b_q1_P). \tag*{(93)}
\end{aligned} v = v − ReLU ( v + t b q 1 P ) + ReLU ( v − t b q 1 P ) + t ReLU ( b q ) 1 P − ReLU ( v − ( t + R ) b q 1 P ) + ReLU ( − v − ( t + R ) b q 1 P ) . (93) For the anchor and demonstration tokens, we have b q = 0 b_q = 0 b q = 0 and v = 0 P v = 0_P v = 0 P ; consequently, all ReLU activations vanish and these tokens remain unchanged.
At the last token h N + 1 h_{N+1} h N + 1 , we have b q = 1 b_q = 1 b q = 1 . The first line in eq. (B.7) then reduces to S t ( v ) S_t(v) S t ( v ) via the scalar identity
a − ( a + t ) + + ( a − t ) + + t = sign ( a ) ( ∣ a ∣ − t ) + . a - (a+t)_+ + (a-t)_+ + t = \operatorname{sign}(a)(|a|-t)_+. a − ( a + t ) + + ( a − t ) + + t = sign ( a ) ( ∣ a ∣ − t ) + . The second line subsequently clips this output to [ − R , R ] P [-R,R]^P [ − R , R ] P : for each coordinate j j j , its two terms vanish when ∣ v j ∣ ≤ t + R |v_j| \le t+R ∣ v j ∣ ≤ t + R , and otherwise saturate the soft-thresholded value at sign ( v j ) R \operatorname{sign}(v_j)R sign ( v j ) R . This proves eq. (B.6). Finally, the map v ↦ v ~ v \mapsto\widetilde{v} v ↦ v in eq. (B.6) acts coordinatewise, and each coordinate map a ↦ proj [ − R , R ] ( sign ( a ) ( ∣ a ∣ − t ) + ) a \mapsto\operatorname{proj}_{[-R,R]}(\operatorname{sign}(a)(|a|-t)_+) a ↦ proj [ − R , R ] ( sign ( a ) ( ∣ a ∣ − t ) + ) is continuous and piecewise linear with slopes in [ 0 , 1 ] [0,1] [ 0 , 1 ] , hence 1 1 1 -Lipschitz. Therefore the map v ↦ v ~ v \mapsto\widetilde{v} v ↦ v is 1 1 1 -Lipschitz with respect to ∥ ⋅ ∥ 2 \lVert\cdot\rVert_2 ∥ ⋅ ∥ 2 .
Lemma B.3 (Label readout). Fix a truncation radius K > 0 K > 0 K > 0 and let R , γ > 0 R,\gamma> 0 R , γ > 0 . There is a two-head masked softmax attention block Attn θ ( ⋅ ) \operatorname{Attn}_{\theta}(\cdot) Attn θ ( ⋅ ) (def. 2.1) with head dimension P + 1 P+1 P + 1 satisfying the following property. Let H H H be a prompt of the form eq. (B.2) such that
∥ ψ ( X N + 1 ) ∥ 2 ≤ K , ∥ v ∥ ∞ ≤ R . \lVert\psi(X_{N+1})\rVert_2 \le K,\qquad\lVert v\rVert_\infty\le R. ∥ ψ ( X N + 1 ) ∥ 2 ≤ K , ∥ v ∥ ∞ ≤ R . Then the block leaves h 0 , … , h N h_0,\ldots,h_N h 0 , … , h N unchanged and maps the last token h N + 1 h_{N+1} h N + 1 to h ~ N + 1 = [ ψ ( X N + 1 ) ; y ^ q ; v ; 0 ; 1 ] \widetilde{h}_{N+1} = [\psi(X_{N+1});\widehat{y}_q;v;0;1] h N + 1 = [ ψ ( X N + 1 ) ; y q ; v ; 0 ; 1 ] , where
∣ y ^ q − ψ ( X N + 1 ) ⊤ v ∣ ≤ γ . (94) |\widehat{y}_q-\psi(X_{N+1})^\top v| \le\gamma. \tag*{(94)} ∣ y q − ψ ( X N + 1 ) ⊤ v ∣ ≤ γ . (94) For any query path X N + 1 X_{N+1} X N + 1 and coefficient vector v v v , the same block also satisfies ∣ y ^ q ∣ ≤ ∣ ψ ( X N + 1 ) ⊤ v ∣ |\widehat{y}_q| \le|\psi(X_{N+1})^\top v| ∣ y q ∣ ≤ ∣ ψ ( X N + 1 ) ⊤ v ∣ .
Proof. Write a generic token as h = [ x ; y ; v ; b d ; b q ] h=[x;y;v;b_d;b_q] h = [ x ; y ; v ; b d ; b q ] . As in the proof of Lemma B.1, we use a positive and a negative head, and the upper sign in ± \pm ± refers to the positive head. For parameters τ , A > 0 \tau,A>0 τ , A > 0 , unrelated to those in Lemma B.1, set
Q ± ⊤ h = [ x ; b q ] , K ± ⊤ h = [ ± τ v ; − A b d ] , Q_\pm^\top h=[x;b_q],\qquad K_\pm^\top h=[\pm\tau v;-Ab_d], Q ± ⊤ h = [ x ; b q ] , K ± ⊤ h = [ ± τ v ; − A b d ] ,
V ± ⊤ h = ± 2 τ [ 0 P ; b q ; 0 P ; 0 ; 0 ] . (95) V_\pm^\top h=\pm\frac{2}{\tau}[0_P;b_q;0_P;0;0]. \tag*{(95)} V ± ⊤ h = ± τ 2 [ 0 P ; b q ; 0 P ; 0 ; 0 ] . (95)
The values are supported on the label coordinate and vanish at every token except h N + 1 h_{N+1} h N + 1 , the only token with b q = 1 b_q=1 b q = 1 . By the causal mask, each of h 0 , … , h N h_0,\ldots,h_N h 0 , … , h N attends only to tokens within h 0 , … , h N h_0,\ldots,h_N h 0 , … , h N , all of which have zero value projections, leaving h 0 , … , h N h_0,\ldots,h_N h 0 , … , h N unchanged.
For the last token h N + 1 h_{N+1} h N + 1 , the query vector of both heads is [ ψ ( X N + 1 ) ; 1 ] [\psi(X_{N+1});1] [ ψ ( X N + 1 ) ; 1 ] . Write z = ψ ( X N + 1 ) ⊤ v z=\psi(X_{N+1)^\top v} z = ψ ( X N + 1 ) ⊤ v . By eq. (B.9), each head assigns to token h s h_s h s the score
⟨ [ ψ ( X N + 1 ) ; 1 ] , K ± ⊤ h s ⟩ = { 0 , s = 0 (anchor) , − A , 1 ≤ s ≤ N (demonstrations) , ± τ z , s = N + 1 (self) . \left\langle[\psi(X_{N+1});1],K_\pm^\top h_s\right\rangle=
\begin{cases}
0, & s=0\text{ (anchor)},\\
-A, & 1\le s\le N\text{ (demonstrations)},\\
\pm\tau z, & s=N+1\text{ (self)}.
\end{cases} ⟨ [ ψ ( X N + 1 ) ; 1 ] , K ± ⊤ h s ⟩ = ⎩ ⎨ ⎧ 0 , − A , ± τ z , s = 0 (anchor) , 1 ≤ s ≤ N (demonstrations) , s = N + 1 (self) .
Only h N + 1 h_{N+1} h N + 1 has a nonzero value with V ± ⊤ h N + 1 = ± 2 τ [ 0 P ; 1 ; 0 P ; 0 ; 0 ] V_\pm^\top h_{N+1}=\pm\frac{2}{\tau}[0_P;1;0_P;0;0] V ± ⊤ h N + 1 = ± τ 2 [ 0 P ; 1 ; 0 P ; 0 ; 0 ] , and its label coordinate is initially zero. Summing the outputs of the two heads in eq. (3) , we obtain the new label
y ^ q = 2 τ [ e τ z 1 + N e − A + e τ z − e − τ z 1 + N e − A + e − τ z ] . \widehat y_q=\frac{2}{\tau}\left[\frac{e^{\tau z}}{1+Ne^{-A}+e^{\tau z}}-\frac{e^{-\tau z}}{1+Ne^{-A}+e^{-\tau z}}\right]. y q = τ 2 [ 1 + N e − A + e τ z e τ z − 1 + N e − A + e − τ z e − τ z ] .
Equivalently, y ^ q = 2 τ [ ϕ ( τ z ) − ϕ ( − τ z ) ] \widehat y_q=\frac{2}{\tau}[\phi(\tau z)-\phi(-\tau z)] y q = τ 2 [ ϕ ( τ z ) − ϕ ( − τ z )] , where ϕ ( a ) = e a / ( 1 + N e − A + e a ) \phi(a)=e^a/(1+Ne^{-A}+e^a) ϕ ( a ) = e a / ( 1 + N e − A + e a ) . Since 0 < ϕ ′ ( a ) = ϕ ( a ) ( 1 − ϕ ( a ) ) ≤ 1 / 4 0<\phi'(a)=\phi(a)(1-\phi(a))\le1/4 0 < ϕ ′ ( a ) = ϕ ( a ) ( 1 − ϕ ( a )) ≤ 1/4 for all a ∈ R a\in\mathbb{R} a ∈ R , the mean value theorem implies that
∣ y ^ q ∣ ≤ 2 τ ⋅ 1 4 ∣ 2 τ z ∣ = ∣ z ∣ = ∣ ψ ( X N + 1 ) ⊤ v ∣ . |\widehat y_q|\le\frac{2}{\tau}\cdot\frac{1}{4}|2\tau z|=|z|=|\psi(X_{N+1})^\top v|. ∣ y q ∣ ≤ τ 2 ⋅ 4 1 ∣2 τ z ∣ = ∣ z ∣ = ∣ ψ ( X N + 1 ) ⊤ v ∣.
To establish eq. (B.8), we compare ϕ \phi ϕ with its limit ϕ ∞ ( a ) = e a / ( 1 + e a ) \phi_\infty(a)=e^a/(1+e^a) ϕ ∞ ( a ) = e a / ( 1 + e a ) as A → ∞ A\to\infty A → ∞ . For any a ∈ R a\in\mathbb{R} a ∈ R ,
0 ≤ ϕ ∞ ( a ) − ϕ ( a ) = N e − A e a ( 1 + e a ) ( 1 + N e − A + e a ) ≤ N e − A . 0\le\phi_\infty(a)-\phi(a)=\frac{Ne^{-A}e^a}{(1+e^a)(1+Ne^{-A}+e^a)}\le Ne^{-A}. 0 ≤ ϕ ∞ ( a ) − ϕ ( a ) = ( 1 + e a ) ( 1 + N e − A + e a ) N e − A e a ≤ N e − A .
Since ϕ ∞ ( a ) − ϕ ∞ ( − a ) = tanh ( a / 2 ) \phi_\infty(a)-\phi_\infty(-a)=\tanh(a/2) ϕ ∞ ( a ) − ϕ ∞ ( − a ) = tanh ( a /2 ) , it follows that
∣ y ^ q − 2 τ tanh ( τ z 2 ) ∣ ≤ 4 N e − A τ . \left|\widehat y_q-\frac{2}{\tau}\tanh\left(\frac{\tau z}{2}\right)\right|\le\frac{4Ne^{-A}}{\tau}. y q − τ 2 tanh ( 2 τ z ) ≤ τ 4 N e − A .
Moreover, since ∣ tanh x − x ∣ ≤ ∣ x ∣ 3 / 3 |\tanh x-x|\le|x|^3/3 ∣ tanh x − x ∣ ≤ ∣ x ∣ 3 /3 for all x ∈ R x\in\mathbb{R} x ∈ R , and ∣ z ∣ ≤ ∥ ψ ( X N + 1 ) ∥ 2 ∥ v ∥ 2 ≤ K R P |z|\le\|\psi(X_{N+1})\|_2\|v\|_2\le KR\sqrt{P} ∣ z ∣ ≤ ∥ ψ ( X N + 1 ) ∥ 2 ∥ v ∥ 2 ≤ K R P by assumptions, we obtain
∣ y ^ q − z ∣ ≤ 4 N e − A τ + τ 2 ( K R P ) 3 12 . |\widehat y_q-z|\le\frac{4Ne^{-A}}{\tau}+\frac{\tau^2(KR\sqrt{P})^3}{12}. ∣ y q − z ∣ ≤ τ 4 N e − A + 12 τ 2 ( K R P ) 3 .
First choosing τ > 0 \tau>0 τ > 0 such that τ 2 ( K R P ) 3 ≤ 6 γ \tau^2(KR\sqrt{P})^3\le6\gamma τ 2 ( K R P ) 3 ≤ 6 γ , and then choosing A > 0 A>0 A > 0 such that 4 N e − A ≤ τ γ / 2 4Ne^{-A}\le\tau\gamma/2 4 N e − A ≤ τ γ /2 , yields eq. (B.8).
Transformers Solve In-Context Lasso
Proof of Lemma 4.1 . Set η = ( 1 + K 2 ) − 1 \eta= (1 + K^2)^{-1} η = ( 1 + K 2 ) − 1 . The empirical gram matrix G N = N − 1 ∑ i ψ ( X i ) ψ ( X i ) ⊤ G_N = N^{-1}\sum_i \psi(X_i)\psi(X_i)^\top G N = N − 1 ∑ i ψ ( X i ) ψ ( X i ) ⊤ satisfies 0 ⪯ G N ⪯ K 2 I P 0 \preceq G_N \preceq K^2 I_P 0 ⪯ G N ⪯ K 2 I P . Starting from u ( 0 ) = 0 P u^{(0)} = 0_P u ( 0 ) = 0 P , let us consider the exact proximal-gradient iterates
u ( ℓ + 1 ) = proj [ − R , R ] P S η λ ( u ( ℓ ) − η N ∑ i = 1 N ( ψ ( X i ) ⊤ u ( ℓ ) − Y i ) ψ ( X i ) ) . u^{(\ell+1)} = \operatorname{proj}_{[-R,R]^P} S_{\eta\lambda}\left(u^{(\ell)} - \frac{\eta}{N}\sum_{i=1}^{N}(\psi(X_i)^\top u^{(\ell)} - Y_i)\psi(X_i)\right). u ( ℓ + 1 ) = proj [ − R , R ] P S η λ ( u ( ℓ ) − N η i = 1 ∑ N ( ψ ( X i ) ⊤ u ( ℓ ) − Y i ) ψ ( X i ) ) .
Then, applying the standard proximal-gradient convergence rate [7 Theorem 10.21] yields
J λ ( u ( L ) ) − min u ∈ [ − R , R ] P J λ ( u ) ≤ R 2 P 2 η L ≤ γ 2 , (96) J_\lambda(u^{(L)}) - \min_{u\in[-R,R]^P}J_\lambda(u) \le\frac{R^2P}{2\eta L} \le\frac{\gamma}{2}, \tag*{(96)} J λ ( u ( L ) ) − u ∈ [ − R , R ] P min J λ ( u ) ≤ 2 η L R 2 P ≤ 2 γ , (96)
where the last inequality follows by taking L = ⌈ R 2 P / ( η γ ) ⌉ L = \lceil R^2P/(\eta\gamma)\rceil L = ⌈ R 2 P / ( η γ )⌉ .
Now, define the gradient map and the proximal clipping map
G ( u ) : = u − η N ∑ i = 1 N ( ψ ( X i ) ⊤ u − Y i ) ψ ( X i ) , prox ( u ) : = proj [ − R , R ] P S η λ ( u ) , G(u) := u - \frac{\eta}{N}\sum_{i=1}^{N}(\psi(X_i)^\top u - Y_i)\psi(X_i), \qquad\operatorname{prox}(u) := \operatorname{proj}_{[-R,R]^P}S_{\eta\lambda}(u), G ( u ) := u − N η i = 1 ∑ N ( ψ ( X i ) ⊤ u − Y i ) ψ ( X i ) , prox ( u ) := proj [ − R , R ] P S η λ ( u ) ,
so that the proximal-gradient iterates satisfy u ( ℓ + 1 ) = prox ( G ( u ( ℓ ) ) ) u^{(\ell+1)} = \operatorname{prox}(G(u^{(\ell)})) u ( ℓ + 1 ) = prox ( G ( u ( ℓ ) )) . Since 0 ⪯ G N ⪯ η − 1 I P 0 \preceq G_N \preceq\eta^{-1}I_P 0 ⪯ G N ⪯ η − 1 I P , we have ∥ I P − η G N ∥ o p ≤ 1 \lVert I_P - \eta G_N\rVert_{\mathrm{op}} \le1 ∥ I P − η G N ∥ op ≤ 1 . This shows that both maps are nonexpansive: for all u , u ′ ∈ R P u,u' \in\mathbb{R}^P u , u ′ ∈ R P ,
∥ G ( u ) − G ( u ′ ) ∥ 2 = ∥ ( I P − η G N ) ( u − u ′ ) ∥ 2 ≤ ∥ u − u ′ ∥ 2 , ∥ prox ( u ) − prox ( u ′ ) ∥ 2 ≤ ∥ u − u ′ ∥ 2 . \lVert G(u) - G(u')\rVert_2 = \lVert(I_P - \eta G_N)(u-u')\rVert_2 \le\lVert u-u'\rVert_2,\qquad\lVert\operatorname{prox}(u)-\operatorname{prox}(u')\rVert_2 \le\lVert u-u'\rVert_2. ∥ G ( u ) − G ( u ′ ) ∥ 2 = ∥( I P − η G N ) ( u − u ′ ) ∥ 2 ≤ ∥ u − u ′ ∥ 2 , ∥ prox ( u ) − prox ( u ′ ) ∥ 2 ≤ ∥ u − u ′ ∥ 2 .
Fix γ 0 > 0 \gamma_0 > 0 γ 0 > 0 (to be specified later). Then each transformer layer composes the attention block of Lemma B.1 (with one-step error γ 0 \gamma_0 γ 0 ) and the MLP block of Lemma B.2 (with threshold t = η λ t = \eta\lambda t = η λ ). For ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 , let v ( ℓ ) v^{(\ell)} v ( ℓ ) denote the coefficient vector of h N + 1 h_{N+1} h N + 1 after ℓ \ell ℓ layers, initialized at v ( 0 ) = 0 P v^{(0)} = 0_P v ( 0 ) = 0 P , and let v ~ ( ℓ + 1 ) \widetilde v^{(\ell+1)} v ( ℓ + 1 ) denote this vector immediately after the attention block of layer ℓ + 1 \ell+1 ℓ + 1 , so that v ( ℓ + 1 ) = prox ( v ~ ( ℓ + 1 ) ) v^{(\ell+1)} = \operatorname{prox}(\widetilde v^{(\ell+1)}) v ( ℓ + 1 ) = prox ( v ( ℓ + 1 ) ) . By Lemma B.2 , we have ∥ v ( ℓ ) ∥ ∞ ≤ R \lVert v^{(\ell)}\rVert_\infty\le R ∥ v ( ℓ ) ∥ ∞ ≤ R for all ℓ ≥ 0 \ell\ge0 ℓ ≥ 0 . Thus, the conditions in Lemma B.1 hold at every layer, yielding
∥ v ~ ( ℓ + 1 ) − G ( v ( ℓ ) ) ∥ 2 ≤ γ 0 for all ℓ ≥ 0. \lVert\widetilde v^{(\ell+1)} - G(v^{(\ell)})\rVert_2 \le\gamma_0 \qquad\text{for all }\ell\ge0. ∥ v ( ℓ + 1 ) − G ( v ( ℓ ) ) ∥ 2 ≤ γ 0 for all ℓ ≥ 0.
On [ − R , R ] P [-R,R]^P [ − R , R ] P , the gradient of the squared-loss term in J λ J_\lambda J λ has Euclidean norm at most K 2 ( R P + 1 ) K^2(R\sqrt{P}+1) K 2 ( R P + 1 ) , and ∥ u − v ∥ 1 ≤ P ∥ u − v ∥ 2 \lVert u-v\rVert_1 \le\sqrt{P}\lVert u-v\rVert_2 ∥ u − v ∥ 1 ≤ P ∥ u − v ∥ 2 . Hence
∣ J λ ( u ) − J λ ( v ) ∣ ≤ [ K 2 ( R P + 1 ) + λ P ] ∥ u − v ∥ 2 , u , v ∈ [ − R , R ] P . (97) |J_\lambda(u)-J_\lambda(v)| \le[K^2(R\sqrt{P}+1)+\lambda\sqrt{P}]\lVert u-v\rVert_2,\qquad u,v\in[-R,R]^P. \tag*{(97)} ∣ J λ ( u ) − J λ ( v ) ∣ ≤ [ K 2 ( R P + 1 ) + λ P ] ∥ u − v ∥ 2 , u , v ∈ [ − R , R ] P . (97)
We take γ 0 = γ / { 2 L [ K 2 ( R P + 1 ) + λ P ] } \gamma_0 = \gamma/\{2L[K^2(R\sqrt{P}+1)+\lambda\sqrt{P}]\} γ 0 = γ / { 2 L [ K 2 ( R P + 1 ) + λ P ]} . Since v ( ℓ + 1 ) − u ( ℓ + 1 ) = prox ( v ~ ( ℓ + 1 ) ) − prox ( G ( u ( ℓ ) ) ) v^{(\ell+1)}-u^{(\ell+1)} = \operatorname{prox}(\widetilde v^{(\ell+1)})-\operatorname{prox}(G(u^{(\ell)})) v ( ℓ + 1 ) − u ( ℓ + 1 ) = prox ( v ( ℓ + 1 ) ) − prox ( G ( u ( ℓ ) )) , the two Lipschitz bounds and the triangle inequality show that, for ℓ = 0 , … , L − 1 \ell= 0,\ldots,L-1 ℓ = 0 , … , L − 1 ,
∥ v ( ℓ + 1 ) − u ( ℓ + 1 ) ∥ 2 ≤ ∥ v ( ℓ ) − u ( ℓ ) ∥ 2 + γ 2 L [ K 2 ( R P + 1 ) + λ P ] . (98) \lVert v^{(\ell+1)}-u^{(\ell+1)}\rVert_2 \le\lVert v^{(\ell)}-u^{(\ell)}\rVert_2 + \frac{\gamma}{2L[K^2(R\sqrt{P}+1)+\lambda\sqrt{P}]}. \tag*{(98)} ∥ v ( ℓ + 1 ) − u ( ℓ + 1 ) ∥ 2 ≤ ∥ v ( ℓ ) − u ( ℓ ) ∥ 2 + 2 L [ K 2 ( R P + 1 ) + λ P ] γ . (98)
Starting from v ( 0 ) = u ( 0 ) = 0 P v^{(0)} = u^{(0)} = 0_P v ( 0 ) = u ( 0 ) = 0 P , iterating eq. (B.12) and using eq. (B.11) gives
∣ J λ ( v ( L ) ) − J λ ( u ( L ) ) ∣ ≤ γ / 2. |J_\lambda(v^{(L)})-J_\lambda(u^{(L)})| \le\gamma/2. ∣ J λ ( v ( L ) ) − J λ ( u ( L ) ) ∣ ≤ γ /2.
Combining this estimate with eq. (B.10) gives the required objective gap of at most γ \gamma γ for v = v ( L ) v = v^{(L)} v = v ( L ) . Finally, append a ( L + 1 ) (L+1) ( L + 1 ) -th layer consisting of the attention block from Lemma B.3 (with readout error γ \gamma γ ) and a zero MLP block (W 1 , W 2 = 0 W_1, W_2 = 0 W 1 , W 2 = 0 ), which acts as the identity. The block writes y ^ q \hat{y}_{\mathrm{q}} y ^ q into the label coordinate of the final token, so y ^ T F = y ^ q \hat{y}_{\mathrm{TF}} = \hat{y}_{\mathrm{q}} y ^ TF = y ^ q by eq. (14) . This establishes eq. (38) . Moreover, for any input prompt, the clipping step ensures ∥ v ( L ) ∥ ∞ ≤ R \lVert v^{(L)} \rVert_{\infty} \le R ∥ v ( L ) ∥ ∞ ≤ R , and Lemma B.3 combined with the Cauchy–Schwarz inequality yields
∣ y ^ T F ∣ ≤ ∣ ψ ( X N + 1 ) T v ( L ) ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 , \lvert\hat{y}_{\mathrm{TF}} \rvert\le\lvert\psi(X_{N+1})^{\mathsf{T}}v^{(L)} \rvert\le R\sqrt{P}\lVert\psi(X_{N+1})\rVert_2, ∣ y ^ TF ∣ ≤ ∣ ψ ( X N + 1 ) T v ( L ) ∣ ≤ R P ∥ ψ ( X N + 1 ) ∥ 2 ,
establishing the global bounds in Lemma 4.1 .