Propagation of Chaos in Contextual Flow Maps
Shi Chen, Zhengjiang Lin, Kaizhao Liu, Philippe Rigollet
NeurIPS 2026
Abstract. We develop a quantitative statistical theory of transformers in the long-context regime by adopting the abstraction of contextual flow maps (CFMs): dynamical systems that evolve a distinguished token in the presence of a contextual measure across a stack of attention blocks. Within this framework, the finite-context model approximates an idealized infinite-context system in which the contextual measure is replaced by its underlying population, so that the context length becomes a statistical resource. Exploiting the McKean--Vlasov structure of the dynamics and the classical machinery of propagation of chaos, we establish a forward bound controlling the deviation between the finite- and infinite-context CFMs uniformly along depth, and a backward bound controlling the deviation between the corresponding training trajectories uniformly across iterations of online gradient descent. Both bounds achieve the optimal Wasserstein rate for general CFMs and parametric rate for a restricted class of CFMs that includes transformers as a special case. The analysis rests on a new Eulerian adjoint formulation of the loss gradient and stability estimates for the resulting forward--adjoint system, both of which may be of independent interest.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:47 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
(a) Summary
This paper studies finite-context transformers through contextual flow maps, comparing an empirical context of length n with an infinite-context population measure. It proves a forward propagation-of-chaos bound uniform over network depth and claims a backward bound controlling the discrepancy between finite- and infinite-context online-gradient trajectories. Both achieve an Wasserstein rate. The main technical contribution is an Eulerian adjoint formulation and associated stability estimates for the loss gradient.
(b) Strengths
The paper addresses a meaningful statistical question for long-context transformer models. The contextual-map and McKean–Vlasov formulation is well motivated, and the forward result follows a convincing combination of Wasserstein stability and empirical-measure concentration. Reviewers 1q4Y and qsUz particularly value the Eulerian adjoint formulation and the forward–adjoint stability framework, which may be useful beyond this paper. The exposition is generally clear, and all reviewers give favorable overall recommendations.
(c) Weaknesses
-
The main concern is the proof of the adjoint well-posedness and stability results underlying Theorems 4.2 and 2.2. As identified by qsUz, the exponential weight used in the fixed-point argument of Propositions B.2 and B.3 appears to have the wrong direction: after applying the stated norm, the relevant integral can increase rather than yield the claimed contraction. Reviewer 1q4Y also notes an incorrect displayed derivative in Proposition B.2. These issues appear potentially repairable, but the current proof does not establish the backward propagation result.
-
The derivation of the adjoint formula assumes a density and leaves the empirical-measure case to an unspecified approximation. Since empirical, atomic contexts are the main application, the required differentiability and limiting argument should be stated rigorously.
-
The probability interpretation of Theorem 2.2 is also unclear. The proof applies McDiarmid’s inequality for a fixed iteration k, giving constants uniform in k, but not evidently a single high-probability event holding simultaneously for all iterations. The manuscript currently describes the result as uniform across all iterations. The sampling and conditional-independence assumptions across OGD steps also require clarification.
-
Finally, the claim of dimension-free verification for “standard transformers” is too broad. The result assumes a dimension-independent Frobenius bound on the full parameter tuple and verifies simplified single-head attention and smooth MLP blocks, rather than full multi-head residual architectures with normalization. The continuous-depth connection to discrete transformer blocks should also be explained more carefully.
(d) Required clarifications
- Provide a corrected fixed-point and stability proof for Propositions B.2–B.3, including the appropriate exponential weight and the correct spatial derivatives. Explain explicitly whether Theorems 4.2 and 2.2 remain unchanged.
- Give a rigorous adjoint derivation for general probability measures, especially empirical measures, or specify the approximation topology and convergence argument.
- Clarify whether Theorem 2.2 is a fixed-k bound with constants independent of k, or a simultaneous-in-k statement on one event. State the precise independence assumptions across OGD iterations.
- Narrow or justify the transformer-scope and dimension-free claims, particularly the Frobenius-norm assumption and the relation between continuous-depth flows and finite residual blocks.
Additional simulations would be helpful but are not essential for rebuttal. If the adjoint stability proof can be repaired without changing the main rates, the paper would remain a strong candidate for acceptance.
Final justification
The rebuttal addressed the main technical concerns. The authors repaired the adjoint fixed-point argument, provided a weak-form derivation applicable to empirical measures, clarified the sampling assumptions, and corrected Theorem 2.2 to a fixed-iteration high-probability statement. Although this correction narrows the original claim, the forward propagation result, adjoint formulation, and backward stability framework remain substantive contributions. The remaining concerns primarily concern exposition, architectural scope, and the absence of simulations rather than correctness. I therefore maintain the accept recommendation.
Read meta-review
Meta-review
(a) Summary
This paper studies finite-context transformers through contextual flow maps, comparing an empirical context of length n with an infinite-context population measure. It proves a forward propagation-of-chaos bound uniform over network depth and claims a backward bound controlling the discrepancy between finite- and infinite-context online-gradient trajectories. Both achieve an Wasserstein rate. The main technical contribution is an Eulerian adjoint formulation and associated stability estimates for the loss gradient.
(b) Strengths
The paper addresses a meaningful statistical question for long-context transformer models. The contextual-map and McKean–Vlasov formulation is well motivated, and the forward result follows a convincing combination of Wasserstein stability and empirical-measure concentration. Reviewers 1q4Y and qsUz particularly value the Eulerian adjoint formulation and the forward–adjoint stability framework, which may be useful beyond this paper. The exposition is generally clear, and all reviewers give favorable overall recommendations.
(c) Weaknesses
-
The main concern is the proof of the adjoint well-posedness and stability results underlying Theorems 4.2 and 2.2. As identified by qsUz, the exponential weight used in the fixed-point argument of Propositions B.2 and B.3 appears to have the wrong direction: after applying the stated norm, the relevant integral can increase rather than yield the claimed contraction. Reviewer 1q4Y also notes an incorrect displayed derivative in Proposition B.2. These issues appear potentially repairable, but the current proof does not establish the backward propagation result.
-
The derivation of the adjoint formula assumes a density and leaves the empirical-measure case to an unspecified approximation. Since empirical, atomic contexts are the main application, the required differentiability and limiting argument should be stated rigorously.
-
The probability interpretation of Theorem 2.2 is also unclear. The proof applies McDiarmid’s inequality for a fixed iteration k, giving constants uniform in k, but not evidently a single high-probability event holding simultaneously for all iterations. The manuscript currently describes the result as uniform across all iterations. The sampling and conditional-independence assumptions across OGD steps also require clarification.
-
Finally, the claim of dimension-free verification for “standard transformers” is too broad. The result assumes a dimension-independent Frobenius bound on the full parameter tuple and verifies simplified single-head attention and smooth MLP blocks, rather than full multi-head residual architectures with normalization. The continuous-depth connection to discrete transformer blocks should also be explained more carefully.
(d) Required clarifications
- Provide a corrected fixed-point and stability proof for Propositions B.2–B.3, including the appropriate exponential weight and the correct spatial derivatives. Explain explicitly whether Theorems 4.2 and 2.2 remain unchanged.
- Give a rigorous adjoint derivation for general probability measures, especially empirical measures, or specify the approximation topology and convergence argument.
- Clarify whether Theorem 2.2 is a fixed-k bound with constants independent of k, or a simultaneous-in-k statement on one event. State the precise independence assumptions across OGD iterations.
- Narrow or justify the transformer-scope and dimension-free claims, particularly the Frobenius-norm assumption and the relation between continuous-depth flows and finite residual blocks.
Additional simulations would be helpful but are not essential for rebuttal. If the adjoint stability proof can be repaired without changing the main rates, the paper would remain a strong candidate for acceptance.
Final justification
The rebuttal addressed the main technical concerns. The authors repaired the adjoint fixed-point argument, provided a weak-form derivation applicable to empirical measures, clarified the sampling assumptions, and corrected Theorem 2.2 to a fixed-iteration high-probability statement. Although this correction narrows the original claim, the forward propagation result, adjoint formulation, and backward stability framework remain substantive contributions. The remaining concerns primarily concern exposition, architectural scope, and the absence of simulations rather than correctness. I therefore maintain the accept recommendation.
1 comment
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The work derives both forward and backward propagation of chaos results by bounding the deviation between trajectories for a PDE system that both evolves the data and parameters. The system is a generalized model for the dynamics in transformer inference and the regularity assumptions are verified for MLP and Transformer blocks. The forward propagation is established using standard stability arguments while the backward propagation is established using a new adjoint formulation leveraging regularity conditions.
Strengths and weaknesses
Strengths
The work is timely and technically sound, studying transformer dynamics of high importance given that they are the main architecture in use now. The adjoint formulation is interesting and mapping the regularity assumptions to real architectural components is appreciated. Establishing forward and backward propagation of chaos is a well needed technical result.
Weaknesses
The clarity of the work can be significantly improved:
- The assumptions are mentioned only after the main results. Discussing assumptions first and relating them to transformers and then present the main result, is needed to improve the flow of the manuscript.
- The PDE that is the object of study is directly introduced in the intro without giving guidance how this relate to an the actual transformer architecture. It should be mentioned directly how the PDE is motivated in the first place i.e. residual connections.
- Currently in the main result section there is little reference to section 4 which contains the main proof details. It would be helpful to refer to that section directly to ensure the reader that intuition is provided behind the main result. Currently it only mentioned at the end of the main results.
- As the main results rely mostly on standard applications of Gronwall's lemma verifying the fact that the regularity assumptions hold for transformers could be more of interest to the reader. Expanding this section in the main text with details from the appendix could improve the intuition behind why the regularity assumptions are natural ones.
The significance of the work can be improved:
- The work provides no simulations for their found result this limits the broader impact of the result. This makes it hard for a general audience to appreciate the results.
- A direct actionable simulation could be the rate bound depending on d and n, this would motivate also the technical conjecture in the discussion where the rate is mentioned to be generally optimal but could be suboptimal for specific cases.
- The discussion of the implications of the results remains highly technical in the conclusion. It would be good to discuss what future works now can do leveraging the PDE. For instance, which emergent phenomena may be good to study in this setting an example could be attention sinks.
The work appears to be technically solid and well motivated. However, the significance and clarity should be improved for accept. Therefore, I give the work a borderline accept.
Questions
- Could the authors provide simulations verifying the rate from Theorem 2.1, varying both and ?
- Could the authors expand the conclusion to discuss implications for specific emergent phenomena such as attention sinks?
- Could the authors move the assumptions before the main results and add motivation connecting the PDE to residual connections in the introduction?
Limitations
yes
Final justification
Overall solid paper, exposition could still be improved as I disagree with the authors on the requirements for a theory paper. Therefore I keep my score of borderline accept.
Formatting concerns
no
5 comments
We thank the reviewer for these constructive comments. Please find our detailed responses below.
Q: The PDE that is the object of study is directly introduced in the intro without giving guidance how this relate to an the actual transformer architecture. It should be mentioned directly how the PDE is motivated in the first place i.e. residual connections.
A: Please refer to A stack of transformer blocks are treated as a continuous-depth ODE in our response to common issues.
Q: Currently in the main result section there is little reference to section 4 which contains the main proof details. It would be helpful to refer to that section directly to ensure the reader that intuition is provided behind the main result. Currently it only mentioned at the end of the main results.
A: Thank you for your valuable feedback. We will revised accordingly.
Q: Regarding the assumptions and verifying them for Transformers.
A: Because our general assumptions consist of standard regularity conditions, presenting them before the main results would distract readers from the core message of the paper. Regarding the technical conjecture in the discussion where the rate is mentioned to be generally optimal but could be suboptimal for specific cases, we have actually proved that Transformers can achieve parametric rate and added them to the revised manuscript. We refer to Additional Results on Parametric Rate for Transformers in the response to common issues for a more detailed explanation. Notably, we provide a comparison of the structured assumptions with the standard regularity assumptions in Section 5.
Q: Could the authors provide simulations verifying the rate from Theorem 2.1?
A: We appreciate the suggestion. Because this work focuses primarily on establishing the theoretical framework and formal convergence guarantees, and we have additionally proved the Transformers satisfies the parametric rate as stated above, we believe the rigorous mathematical derivations provided are self-contained. Given the significant computational resources required for empirical validation at scale, we leave comprehensive numerical verifications for future work.
Q: Could the authors expand the conclusion to discuss implications for specific emergent phenomena such as attention sinks?
A: We agree that investigating the link between our theoretical framework and emergent phenomena like attention sinks is a highly interesting direction. However, as our current scope is focused on the fundamental convergence properties of the model, we believe a proper treatment of specific emergent phenomena such as attention sinks would require a separate, dedicated study. We will briefly mention this as a compelling avenue for future work in the revised conclusion.
Remaining concerns
I thank the authors for their response. However, my concerns mostly remain. My main concern is the accessibility and relevance of the work to a broader audience.
-
Can the authors please detail how they will describe the connection to transformer blocks in the introduction of the revised manuscript?
-
Please provide a description of how the connection of other sections to Section 4 will be improved.
-
A simulation does not require to be large scale a toy example is sufficient. I think this would strongly improve the manuscript.
-
My point was not specific to attention sinks. The work should articulate what this formal derivation now makes possible that was not possible before, i.e., what new questions or results downstream become possible. Without this, the significance of the contribution is difficult to assess.
Addressing these points thoroughly would substantially strengthen the manuscript.
Response to remaining concerns (part 1)
Q1: Can the authors please detail how they will describe the connection to transformer blocks in the introduction of the revised manuscript?
A1: The intended connection is that, after introducing the standard residual scaling , a stack of transformer blocks can be formally viewed as an Euler discretization of a continuous-depth contextual flow. More precisely, a residual network can be written as
which can be seen as one-step Euler approximation of
as . This interpretation is standard and has already been explained in many of the works cited in our paper and the response. Since reproducing this established discussion would be redundant and is not central to our contribution, we prefer to provide the clarification here and retain only the relevant references in the manuscript.
Q2: Please provide a description of how the connection of other sections to Section 4 will be improved.
A2: In the revision, we will add direct cross-references where each main theorem is stated. Before Theorem 2.1, we will point to Section 4.1 and explain that Theorem 4.1 controls the entire contextual flow by the initial Wasserstein discrepancy . Combining this deterministic stability estimate with the empirical Wasserstein law of large numbers and concentration yields the forward propagation-of-chaos bound. Before Theorem 2.2, we will point to Section 4.2 and explain that the adjoint representation together with stability of the forward-adjoint system, yields Lipschitz stability of the loss gradient. This produces a one-step recursion for the discrepancy between the population and empirical OGD trajectories. Iterating this recursion gives the finite-time result without strong regularization, while sufficiently strong ridge regularization makes the recursion contractive and yields the uniform-in-iteration result.
Q3: A simulation does not require to be large scale a toy example is sufficient. I think this would strongly improve the manuscript.
A3: We respectfully disagree, however, that a toy simulation would materially strengthen this primarily theoretical paper. This is a theory paper whose primary contribution is a general, rigorous analysis of finite-context approximation, rather than an empirical claim requiring experimental validation. Although a toy experiment could illustrate one particular choice of velocity field, data distribution, and parameter regime, it would provide only limited additional evidence for the general theory.
More importantly, the rate in (2.5) is generally sharp. Indeed, at , its Wasserstein component reduces to , for which the classical Wasserstein law of large numbers has the optimal rate when . Given this theoretical sharpness result and the focus of the paper, we prefer not to add a toy numerical example and instead keep the presentation focused on the general analysis.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper abstracts transformers as contextual flow maps: continuous-depth dynamical systems that evolve a distinguished token in the presence of a contextual probability measure , coupled through a shared velocity field . The finite-context model, initialized with an empirical context , is compared to an infinite-context population system. The main results are a forward propagation-of-chaos bound, a backward / OGD stability bound, an Eulerian adjoint formula for the loss gradient, and a verification that simplified self-attention and MLP blocks satisfy the abstract assumptions with constants claimed independent of and .
Strengths and weaknesses
Strengths:
The paper asks a genuine statistical question for long-context transformer abstractions: how the output and training trajectory degrade when a population context is replaced by an empirical context, with treated as the statistical resource. The forward theorem follows a sound route — -stability of the flow followed by empirical-measure convergence — and the bound is uniform in depth , including output time.
The Eulerian adjoint formulation is a useful synthesis of neural-ODE adjoints and McKean–Vlasov/control-style sensitivities: a covector for the distinguished token and a scalar test field for the contextual measure. The paper correctly identifies -regularity of as the property that allows the gradient formula to interact stably with empirical measures.
The exposition is mostly clear for a theory paper. The assumptions are collected, the theorem dependencies are mostly explicit, and proof sketches accompany the appendices.
Weaknesses:
- Аixed-point proof of Proposition B.2, and the same problem appears again in Proposition B.3. The weighted norm uses the factor
\begin{equation} e^{\alpha(1-s)}, \end{equation}
so implies
\begin{equation} |\nabla \psi_s|\le e^{-\alpha(1-s)}||\psi||_X. \end{equation}
For the terminal-value representation \begin{equation} u(s,z)=-\int_s^1 f(\tau,\Psi_{\tau}(z);\psi)d\tau, \end{equation}
the -linear contribution, after applying the stated weight, is controlled by
\begin{equation} e^{\alpha(1-s)}\int_s^1 e^{-\alpha(1-\tau)}d\tau = \frac{e^{\alpha(1-s)}-1}{\alpha}. \end{equation}
The supremum over is , which increases with , rather than being . Thus the claimed contraction does not follow.
This affects the proof of Theorem 4.2 and therefore the backward propagation-of-chaos theorem, Theorem 2.2. The issue appears repairable: reversing the exponential weight can restore the contraction for existence/uniqueness, while the uniform bound should be obtained separately by a direct backward Grönwall argument. But as submitted, the proof does not establish the claimed adjoint stability result.
- The adjoint derivation and regularity argument need to be made rigorous.
The Eulerian adjoint derivation is carried out assuming that has a density, with the general measure case left to approximation. This is not enough for the main application, since the finite-context measures are empirical and hence singular. The final gradient formula is meaningful for empirical measures, where the integrals become finite sums, but the derivation should justify the identity directly for general probability measures or specify the approximation topology and convergence argument.
There is also a local proof issue in the regularity analysis of . After differentiating the characteristic formula, the displayed expression for appears to reproduce the undifferentiated source term , using where one needs the spatial derivative
\begin{equation} \nabla_z \frac{\delta V}{\delta\mu} = \nabla\nabla_\mu V. \end{equation}
This is probably a typo rather than a conceptual failure, but the regularity of is central to the Wasserstein stability of the loss gradient, so the proof should explicitly derive the bounds for , , and the Lipschitz constant of , including where A4 is used.
- The OGD result needs more precise probability and sampling statements.
Theorem 2.2 states a bound for every with a probability lower bound independent of . The proof, however, fixes and applies McDiarmid to the samples used up to that iteration. This gives a fixed- high-probability bound with constants independent of , not a single event on which
\begin{equation} \sup_k ||\theta_k-\widehat\theta_k||_{L^\infty}\le Cn^{-1/d} \end{equation}
holds. This distinction matters because the per- failure probability does not decay with , so a union bound cannot upgrade the result to a simultaneous-in- statement.
The sampling assumptions should also be stated explicitly. The text says the OGD stream need not be independent, while the concentration proof treats the empirical draws across iterations as independent. This is likely reconcilable by conditioning on a fixed/adversarial population stream and assuming that the empirical contexts are conditionally independent given that stream, but the theorem should say so.
There is also a notation error in the bounded-differences step: replacing one empirical atom gives \begin{equation} W_1(\widehat\mu_0^\ell,\widehat\mu_0^{\ell,\prime})\le 2R/n, \end{equation} not \begin{equation} W_1(\widehat\mu_0^\ell,\mu_0^\ell)\le 2R/n. \end{equation} The latter empirical-to-population distance is generally of order , not .
- The transformer verification overstates both the assumptions and the scope.
The appendix claims dimension-free constants for standard transformer architectures, but the self-attention verification assumes a dimension-free Euclidean/Frobenius bound on the full parameter tuple . This is much stronger than a dimension-free operator-norm bound: for dense matrices, can exceed by a factor of order . Thus the dimension-free stability claim depends on a strong parameter-scaling assumption that should be made explicit.
The architectural scope should also be narrowed. The appendix verifies simplified single-head attention and smooth MLP blocks. It does not fully cover multi-head attention, residual connections, LayerNorm, attention biases, attention scaling conventions, or nonsmooth activations such as ReLU. In addition, the context dynamics in the model are independent of the distinguished token, whereas in bidirectional encoder architectures a distinguished token such as [CLS] can feed back into the context-token updates. The paper should therefore avoid saying that the assumptions are verified for standard transformers in full generality.
Questions
- Can Proposition B.2 and Proposition B.3 be repaired? In particular, can the adjoint well-posedness and stability be proved with a corrected weighted norm and a separate backward Grönwall estimate for the bound?
- Can the adjoint identity be derived for general probability measures, especially empirical measures, rather than only by a density-based calculation plus an unspecified approximation?
- Is Theorem 2.2(ii) intended as a fixed- high-probability bound with constants independent of , or as a simultaneous bound over all ? If the latter, the current McDiarmid argument is insufficient.
- What precise independence assumptions are made on the empirical samples z^{(k,i) across OGD iterations? Are the probabilities conditional on the population stream?
- Can the transformer verification be narrowed or strengthened, especially regarding the Frobenius parameter bound, multi-head attention, residual/normalization layers, attention scaling, and distinguished-token/context-token coupling?
Limitations
The checklist mainly points to Grönwall/regularization issues, but several stronger assumptions should be surfaced: compact support; the uniform Frobenius parameter bound; smoothness assumptions excluding ReLU unless separate analysis is provided; continuous-depth idealization rather than discrete blocks; single-head attention; conditional independence of empirical contexts; fixed- versus simultaneous- probability; and the potential looseness of for smoother transformer-specific functionals.
Formatting concerns
Did not notice any formation issues
3 comments
We thank the reviewer for these constructive comments. Please find our detailed responses below.
Q: Can Proposition B.2 and Proposition B.3 be repaired?
A: For Proposition B.2: define the Banach space
with norm
for some be chosen in the rest of the proof, the proofs for Proposition B.2 then remain the same. In particular, the integral is thus controlled by
Choosing , the map leaves the ball invariant. The proof for Proposition B.3 keeps unchanged after establishing Proposition B.2 under this norm.
Q: Can the adjoint identity be derived for general probability measures, especially empirical measures, rather than only by a density-based calculation plus an unspecified approximation?
A: Yes, we have revised the proof accordingly using the weak formulation. We refer to On the proof of adjoint equation in our response to common issues for further details.
Q: Is Theorem 2.2(ii) intended as a fixed-high probability bound with constants independent of , or as a simultaneous bound over all ?
A: The theorem is intended as a simultaneous bound over all . Please refer to On the precise statement of Theorem 2.2 in our response to common issues for more details.
Q: What precise independence assumptions are made on the empirical samples across OGD iterations? Are the probabilities conditional on the population stream?
A: Please refer to Clarification of independence assumptions across OGD in our response to common issues.
Q: Can the transformer verification be narrowed or strengthened, especially regarding the Frobenius parameter bound, multi-head attention, residual/normalization layers, attention scaling, and distinguished-token/context-token coupling?
A: Yes, the Frobenius norm bound can indeed be replaced by the operator norm; please refer to our response On the dimension-free constants for a detailed explanation. Furthermore, our current verification straightforwardly generalizes to multi-head attention, and we will include this in a remark in the revised manuscript. Additionally, as noted in Line 257, post-layer normalization corresponds to a Riemannian setting. Exploring alternative attention scaling mechanisms and coupling strategies represents very promising directions, which we look forward to investigating in future work.
Thank you for providing further clarification. My main concerns are satified. I appreciate the authors' efforts and will incorporate this rebuttal into my final evaluation
Correction to Theorem 2.2
Dear Reviewer qsUz,
After a further proof check, we found that Theorem 2.2 of our initial response were stated too strong. It should be stated for fixed . We included the corrected statements in On the precise statement of Theorem 2.2 of Response to common issues. Also, we remark that this is a sharp statement in general: one does not expect the probability
to be independent of the choice of . We will correct this issue in the paper. Thank you again for your careful reading of our paper.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors analyse transformers from the perspective of dynamical systems and contextual maps. Specifically, given an input token and a contextual measure , the transformer is viewed as a dynamical system characterised by \begin{align*} \dot x _s = \mathcal{V} (x_s, \mu_s; \theta (s)), \ \ s \in [0,1] \end{align*} where is the output produced from the token-context pair , denotes the parameters at layers , and is obtained through the continuity equation \begin{align*} \partial _s \mu _s + \nabla \cdot (\mu_s \mathcal{V}(\cdot, \mu _s; \theta (s))) = 0, \ \ s \in [0,1]. \end{align*} Here, is the empirical measure associated with tokens , \begin{align*} \mu _0 (\cdot) = \frac{1}{n} \sum _{i=1} ^n \delta _{z^{(i)}} (\cdot). \end{align*} The idea is that the above dynamical system gives an approximation to the infinite-context system, in which one would replace the empirical measure by , the underlying population measure. The main question of the paper is how accurate this approximation is, both at inference and training (forward vs. backward pass).
Because of the McKean-Vlasov structure of the dynamical systems model, the authors argue that a propagation of chaos approach is suitable for quantifying accuracy and in particular the dependence on the context length . The main contributions are:
- quantitative deviation bounds for the approximation, that hold uniformly along the depth of the network (Theorem 2.1, forward propagation);
- an extension of uniform-in-time propagation-of-chaos results, for the online gradient descent (OGD) setting, from Guilin, Nectoux and Stos '26, which studies two-layer feedforward networks (Theorem 2.2, backward propagation);
- an Eulerian adjoint formulation of the loss gradient (Theorem 3.1);
- new stability estimates (Theorems 4.1 and 4.2) for contextual flows as loss gradients, that hold uniformly in depth and along parameter paths.
The adjoint formulation of Theorem 3.1, combined with the new stability estimates of Theorems 4.1 and 4.2, make up the heart of the approach used in the paper.
Strengths and weaknesses
The paper addresses an interesting and important question around transformers, when taking the perspective of contextual maps: how does the restriction to a finite context affect the performance, and how accurate is the corresponding approximation of the infinite-context limit? Adopting the contextual-map formulation, introduced by Furuya, de Hoop and Peyr'{e} (ICLR 2024), the authors focus on the associated statistical questions.
The -context setting considered in the paper seems to be a useful way to approach developing a useful theory for transformers. The mathematical framework used---propagation of chaos for McKean-Vlasov dynamics---is a staple within the probability community for analysing interacting particle systems, and provides a set of well-developed tools. The paper is easy to follow and the authors have provided a good overview of the literature, including distinguishing three different (mathematical) ways of viewing transformers: as a sequence-to-sequence map, a measure-to-mesaure map, and as a contextual map (with adequate references for each). The motivation for choosing the contextual-map framework, as well as the lack of rigorous statistical analysis, is sound and thus sets up the mathematical results in a nice way.
For the mathematics, they appear mostly sound. The forward propagation result Theorem 2.1 relies on Lipschitz stability in and concentration of the empirical measure, which seems accurate under the assumptions used. The adjoint formulation in Section 3 and the new stability estimates in Section 4 are valuable contributions with potential for becoming useful outside of this particular paper. I am also partial to the particle-system interpretation that underlies the contextual-map formulation and for this type of particle system the authors have identified what seems to be the correct tools to use.
Some potential issues with the analysis:
-
The description of Theorem 2.2, the way I interpret it, suggests control over the training trajectories uniformly over all steps in the OGD iterations, for the regularised setting. However, the actual result is a high-probability bound on being smaller than . That is, a bound in which the right-hand side is independent of , which is not the same as a bound that holds for all simultaneously. For example, the argument used for proving the theorem (Appendix C) uses a result by McDiarmid applied to a fixed .
-
For Theorem 3.,1, the adjoint formulation, the proof in Appendix B uses differentiability with respect to of the measure-valued solution (see second paragraph in B.1). However it is not clear to me that Theorem A.1, which is invoked, provides the Fr'{e}chet differentiability used in the derivations. Moreover, whereas the derivation assumes a density, the case of an atomic measure is the main application. The authors state that this is covered by approximation, which is true, but given the level of the submission (and, the intended audience) this could be expanded upon slightly.
-
In Proposition B.2, the formula for on the top of p. 18 seems to be the same as (B.7), the expression for itself. The intended bound may still be true but the calculation does not seem correct as it stands.
-
There are several assumptions (see for example Section 5) that are rather strong: for example, compact support for input, and a uniformly bounded parameter path. Moreover, in a practical setting, For self-attention, there is an assumption of uniformly bounded Frobenius norms, This gives rise to the dimension-free constant , but in the realistic setting such bounds on the norm may grow with dimension. This should be discussed in the paper.
-
A stack of transformer blocks are treated as a continuous-depth ODE. I am unsure how this is connect to the more standard formulation of a finite-depth residual transformer layer.
Questions
Some questions related to the maths and the issue brought up above:
-
Is Theorem 2.2 intended to hold for all at the same time, i.e., on a common high-probability event, or only point wise for fixed number of steps ?
-
Can you provide a rigorous statement for the differentiability used in Theorem 3.1? Preferably not simply relying on Lipschitz stability and a formal Lagrange agreement,
-
In Proposition B.2, what is the correct formula for ?
-
How should I interpret the dimension-free constants appearing in the Assumptions?
-
What are the, if any, independence assumptions ised for the OGD iterations?
Limitations
Yes
Final justification
Given the clarifications and correction of results during the review process, I believe the paper should be accepted. There are still things that could be improved, as pointed out be the reviewers, and in my opinion that is what keeps it from a strong accept. I like the paper, and the general approach, and appreciate the authors efforts to address the concerns raised in the different reviews.
Formatting concerns
None
2 comments
We thank the reviewer for these constructive comments. Please find our detailed responses below.
Q: Is Theorem 2.2 intended to hold for all at the same time, i.e., on a common high-probability event, or only point wise for fixed number of steps?
A: Thanks for pointing this out. Please refer to On the precise statement of Theorem 2.2 in our response to common issues.
Q: Can you provide a rigorous statement for the differentiability used in Theorem 3.1?
A: Yes. Please refer to On the proof of adjoint equation for further details.
Q: In Proposition B.2, what is the correct formula for ?
A: Thanks for pointing out this issue. The correct formula is
We will also revise the corresponding arguments.
Q: How should I interpret the dimension-free constants appearing in the Assumptions?
A: Please refer to On the dimension-free constants in our response to common issues.
Q: What are the, if any, independence assumptions used for the OGD iterations?
A: Please refer to Clarification of independence assumptions across OGD in our response to common issues.
Q: A stack of transformer blocks are treated as a continuous-depth ODE.
A: Please refer to A stack of transformer blocks are treated as a continuous-depth ODE in our response to common issues.
Thank you for providing further clarification and addressing my questions. I appreciate the authors' efforts and will take these changes and clarifications into consideration for my final evaluation.
Comments on the paper
3 comments
Responses to Common issues
We thank the AC and the reviewers for these constructive comments. Please find our detailed responses to the common issues below.
On the precise statement of Theorem 2.2.
The theorem is intended for the trajectory. Take Theorem 2.2 (i) for example, we have rewritten it as: For and , we let . Then, for any ,
with probability at least . Similarly, for Theorem 2.2 (ii), there exists depending on , such that if and , then for any ,
with probability at least . Also for Theorem 2.2 (ii), we have that for any
with probability at least . Indeed, we have also revised the application of the McDiarmid inequality to the supremum function as follows: Replacing one sample by an independent copy produces a new initial measure and new empirical OGD trajectories . We have the bound that for any ,
For , since the perturbed trajectories agree before step , applying Theorem B4 to the single OGD step gives
Thus, for any ,
Because in Theorem 2.2 (ii), iterating gives the McDiarmid coefficient
and the previous proof strategy follows.
On the proof of adjoint equation.
We have revised the derivation using the weak formulation, and added a proof for the differentiability involved. Specifically, for every , define the weak measure variation by
Thus is a compactly supported distribution of order one, , and because . The testwise differentiability of the right hand side can be proved using the differentiability of the flow map and we briefly described as follows: Let be the characteristic map associated with :
The derivative of in at must satisfies the following equation
whose existence, uniqueness, and regularity, follow directly from similar arguments in Proposition B.2 and Proposition B.3. Applying a standard Gronwall argument to
we can prove the uniform convergence and that . Thus,
which proved the differentiability. As we use the weak formulation, the remaining parts of the derivation only requires the above testwise differentiability, so the desired conclusion follows. More specifically, for a smooth multiplier and an absolutely continuous multiplier , define the token and measure constraint terms by
and $$ We then define the augmented Lagrangian $$ and the rest proofs remain the same. A more detailed proof that contains all the details is added to the revised manuscript.
Clarification of independence assumptions across OGD.
We assume that conditional on the population stream , the samples are independent for all and . We will revised the corresponding statement in our paper.
A stack of transformer blocks are treated as a continuous-depth ODE.
A residual network can be written as
which can be seen as one-step Euler approximation of
For applications to general residual networks, we refer to [1,2,3]. For Transformers, we also refer to [4] for a more detailed explanation.
[1] Weinan E. A proposal on machine learning via dynamical systems. Communications in Mathematics and Statistics, 5:1 – 11, 2017
[2] Eldad Haber and Lars Ruthotto. Stable architectures for deep neural networks. Inverse problems, 34(1):014004, 2018.
[3] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In NeurIPS, 2018.
[4] Borjan Geshkovski, Cyril Letrouit, Yury Polyanskiy, and Philippe Rigollet. A mathematical perspective on transformers. Bulletin of the American Mathematical Society, 62(3):427–479, 2025.
On the dimension-free constants.
The dimension-free constants were obtained under the assumption of the boundedness of . What we really computed are the explicit formulas using and for those parameters used in Assumption A. For transformer, although we didn't write in the proofs, one can actually compute those explicit formulas using the operator norms of matrices together with to obtain a dimension-free dependency also. Since our abstract contextual flow framework does not require to be expressed in terms of matrix norms, we adopted the standard -norm of to present our main results cleanly. The norm may itself depend on the ambient dimension, but such dependence is model- and training-specific and therefore lies outside the scope of our theory. We will add a remark that for Transformers, under the boundedness of the operator norms of , one can also get dimension-free parameters .
Additional Results on Parametric Rate for Transformers.
Regarding the technical conjecture in the discussion where the rate is mentioned to be generally optimal but could be suboptimal for specific cases, we have proved that for with the structures in the following Assumption B, we can obtain the parametric rate for in Theorem 2.1 and for (or when ) in Theorem 2.2, which is better than the current -rate in Theorem 2.1 and Theorem 2.2 for general abstract contextual flows.
Assumption B. The vector field has the form
where for some , , and . Also, there exists an , such that for all and ,
and
Here, denotes the Jacobian and the Hessian of with respect to . Also, for all ,
Specifically, Transformers satisfies these assumptions. Also, note that these assumptions imply the more generic Assumptions A. We will include these results in the paper, and compare this structured assumptions with the generic regularity assumptions in Section 5.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Dear Area Chair,
Thank you for the overall positive assessment and for considering our submission promising. We have posted a public correction and summarize the corrected status below.
1. Propositions B.2-B.3 and stability of the adjoint.
We fixed the norm used in proving Propositions B.2-B.3 in our response to reviewer qsUz. More precisely, the fixed-point argument is repaired with the terminal-time weight eα(s−1) in the corrected norm. We also correct the spatial derivative of the source term. These corrections preserve Theorem 4.2 and its Wasserstein stability rate.
2. Fréchet differentiability and empirical measures.
We revised our proof for the adjoint system using the weak form of the contextual flow. We included the arguments in On the proof of adjoint equation in Response to common issues. No density approximation or additional regularity assumption is needed. Theorem 3.1 remains unchanged.
3. Correct probability statement for Theorem 2.2.
Theorem 2.2 is stated for fixed k. We included the corrected statements in On the precise statement of Theorem 2.2 of Response to common issues. Also, we remark that this is also a sharp statement in general: one does not expect the probability
to be independent of the choice of K∈N.
4. Transformer scope and exposition.
We will state explicitly the parameter-norm scaling behind the dimension-independent constants. Please see our response to reiewer qsUz, as well as the sections On the dimension-free constants and A stack of transformer blocks are treated as a continuous-depth ODE in Response to common issues.
Thank you again for the careful assessment.