InfoFlow: A Framework for Multi-Layer Transformer Analysis
Penghao Yu, Haotian Jiang, Zeyu Bao, Qianxiao Li
NeurIPS 2026
TL;DR. Approximation rate for multi layer Transformers
Abstract. While the approximation properties of single-layer Transformer architectures have been studied in recent works, a rigorous theoretical understanding of the multi-layer setting remains limited. In this work, we first establish a depth separation that multi-layer Transformers possess fundamentally different approximation capabilities from single-layer ones on certain retrieval tasks: any single-layer Transformer requires least parameters to achieve precision , where grows linearly with sequence length , whereas a two-layer Transformer with a single head per layer achieves the same approximation precision with at most parameters. We further identify two structural mechanisms underlying multi-layer approximation. Specifically, softmax attention can only efficiently retrieve the token attaining the maximum attention score, incurring exponential-in-length parameter cost for -th largest retrieval with . Moreover, the parameter cost of decoding coupled information scales with the size of the retrieved token set. Motivated by these findings, we propose InfoFlow, a framework for multi-layer Transformers approximating retrieval-type targets. The framework tracks an information set of accessible input positions at each token and layer, assigning an explicit approximation rate to each mode of information propagation. This abstraction recovers known approximation bounds, remains consistent with experimental observations on trained networks, and yields concrete predictions in settings where direct theoretical analysis is currently intractable. Our results provide a principled framework for reasoning about the approximation efficiency of multi-layer Transformers on retrieval-type targets.
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:49 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper is a borderline accept. I am rejecting it for now, with the potential of recommending acceptance. I recommend that the authors address the reviewers’ concerns. Some reviewers also request additional experiments. This is a common issue for theoretical papers submitted to predominantly empirical venues such as this one. I encourage the authors to identify the minimal set of experiments needed to adequately address the reviewers’ concerns.
Final justification
The paper addresses an important theoretical question and provides an interesting depth-separation result together with the intuitive InfoFlow framework. The authors clarified the intended scope of the framework and added useful ablations and experiments on a more realistic question-answering task, which address the reviewers’ main concerns.
Read meta-review
Meta-review
This paper is a borderline accept. I am rejecting it for now, with the potential of recommending acceptance. I recommend that the authors address the reviewers’ concerns. Some reviewers also request additional experiments. This is a common issue for theoretical papers submitted to predominantly empirical venues such as this one. I encourage the authors to identify the minimal set of experiments needed to adequately address the reviewers’ concerns.
Final justification
The paper addresses an important theoretical question and provides an interesting depth-separation result together with the intuitive InfoFlow framework. The authors clarified the intended scope of the framework and added useful ablations and experiments on a more realistic question-answering task, which address the reviewers’ main concerns.
1 comment
- Rating
- 4/6
- Confidence
- 2/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
This paper studies the approximation properties of multi-layer Transformers and proposes a framework called InfoFlow. Instead of tracking exact hidden representations, InfoFlow tracks which input positions are accessible to each token at each layer. The paper uses this framework to reason about how information propagates through multi-layer Transformers, and studies several synthetic retrieval/comparison tasks to illustrate depth separation, head-count requirements, and approximation hardness.
Strengths and weaknesses
Strengths
The paper addresses an interesting and important question: how multi-layer Transformers differ from single-layer Transformers in terms of approximation capability.
I like the high-level idea of viewing multi-layer Transformers through information propagation. The InfoFlow abstraction is intuitive: each layer allows tokens to retrieve or aggregate information from other positions, and the framework tries to track which input positions become accessible over depth.
The paper also gives a concrete explanation for why depth can help. In particular, the two-layer construction decomposes a global pairwise comparison into two stages, which provides a useful way to think about the advantage of multi-layer architectures. The experimental sections on intrinsic dimension and higher-order retrieval tasks are also helpful for illustrating the framework’s predictions.
Weaknesses
My main concern is that the paper’s conclusions may be too broad relative to the evidence provided. The depth separation result in Theorem 1 is based on a specifically constructed target function. It shows that there exists a task where a two-layer Transformer is much more efficient than a single-layer Transformer, but it does not show that two-layer Transformers are universally or generally more approximation-efficient than single-layer Transformers.
Similarly, many of the main examples and conclusions are based on carefully designed synthetic functions, such as pairwise retrieval targets and the triangle-center task. These examples are useful for theory, but it is unclear how representative they are of broader Transformer behavior or realistic sequence modeling tasks.
I also think the paper should be more careful in distinguishing between what is rigorously proved for specific constructed functions and what is a broader conceptual claim about multi-layer Transformers. Some parts of the discussion seem to suggest a more general theory than the results actually establish.
The InfoFlow framework is intuitive, but it is still an abstraction. It is not fully clear how well it captures the richer behavior of real trained Transformers with residual streams, MLPs, multiple heads, and learned representations beyond these synthetic retrieval-style tasks.
Overall
Overall, I find the paper interesting and potentially useful as a theoretical perspective on multi-layer Transformer approximation. However, I think the current evidence mainly supports claims about specific constructed tasks, rather than broad conclusions about multi-layer Transformers in general. I would like to see the scope of the claims narrowed, or additional evidence showing that InfoFlow applies more broadly.
Questions
see weakness
Limitations
see weakness
Final justification
thanks for authors address my concerns
Formatting concerns
no
1 comment
Rebuttal
We thank the reviewer's valuable suggestions.
W1: My main concern is that the paper’s conclusions may be too broad relative to the evidence provided. The depth separation result in Theorem 1 is based on a specifically constructed target function. It shows that there exists a task where a two-layer transformer is much more efficient than a single-layer transformer, but it does not show that two-layer transformers are universally or generally more approximation-efficient than single-layer transformers.
Response: Theorem 1 is not intended to claim that two-layer transformers are strictly more approximation-efficient for every target. It is intended to indicate that two-layer transformers can be more efficient than single-layer transformer in some retrieval-type tasks.
The InfoFlow prediction is to further characterize on which set of tasks do single-layer and multi-layer transformers have fundamental difference in approximation efficiency. It predicts that single-layer transformer can only approximate efficiently tasks with number of comparison, while multi-layer can approximate cases with number of comparison efficiently. It has no intention to show that two-layer transformer are generally more efficient than single-layer transformers.
W2: Similarly, many of the main examples and conclusions are based on carefully designed synthetic functions, such as pairwise retrieval targets and the triangle-center task. These examples are useful for theory, but it is unclear how representative they are of broader transformer behavior or realistic sequence modeling tasks.
Response: The intended scope of InfoFlow is retrieval-type targets whose size of active index set doesn't grow with sequence length . The synthetic pairwise-retrieval and triangle-center targets are designed to isolate retrieval mechanisms and comparison structures. The pairwise retrieval or higher order (e.g. triple) retrieval mechanisms are the fundamental property of retrieval-type targets, so they are representative in the scope of retrieval-type task.
Retrieval-type task is a large family, with many practical language tasks involving the retrieval of a small number of relevant passages or facts from a longer context. Furthermore, Yu et al [2] show that, for fixed input dimension and sequence length, the generalized -retrieval family is dense in the space of continuous sequence-to-vector functions. Since this family is a subset of retrieval-type targets, retrieval-type targets are also dense in this function space. This establishes their expressiveness.
W3: I also think the paper should be more careful in distinguishing between what is rigorously proved for specific constructed functions and what is a broader conceptual claim about multi-layer transformers. Some parts of the discussion seem to suggest a more general theory than the results actually establish.
Response: At the theorem level, Theorems 1–3 and their stated approximation bounds are rigorous. The active index set, Trees of Comparison, and the Number, Dimension, and Order of Comparison are precise mathematical definitions. The corresponding Number-of-Comparison estimates for the synthetic targets, including the -retrieval, intrinsic-dimension, and triangle-center tasks, are rigorous consequences of those definitions.
InfoFlow's mechanisms and its predictions are modeling assumptions that are not proven. They are supported by theorems and experiments in the following way:
- The three information-propagation mechanisms are supported by Theorem 2.
- The parameter cost order is supported by Theorem 3.
- The principle that a model must have Number of Comparison at least that of the target is supported the definition of tree of comparison.
- The prediction that intrinsic dimension exists in two-layer transformer is supported by the intrinsic dimension experiment.
- The prediction that targets with order of comparison greater than 2 are hard to learn is supported by the triangle center experiment.
In the revision we will separate theorem-level statements from framework-level statements more explicitly.
W4: The InfoFlow framework is intuitive, but it is still an abstraction. It is not fully clear how well it captures the richer behavior of real trained transformers with residual streams, MLPs, multiple heads, and learned representations beyond these synthetic retrieval-style tasks.
Response: We will clarify that InfoFlow is intended for retrieval-type targets whose size of active index set doesn't grow with the sequence length , rather than as a complete theory of arbitrary transformer computations. Within this scope, InfoFlow already explicitly accounts for residual information preservation, MLP-based encoding and decoding, multiple heads and learned representations through its information sets and parameter-cost laws. On tasks outside the retrieval type, the same architectural components may behave differently, and the resulting behavior may not be accurately captured by this abstraction.
The synthetic experiments are intended to verify how InfoFlow is able to capture transformer's performance on pairwise retrieval or higher order retrieval, which are the essential properties of the retrieval-type tasks within our scope. These components of real trained transformers, such as residuals and MLPs, are also present in the model used for synthetic experiments.
To further verify the InfoFlow prediction in real-world scenario, we do experiments on the question-answering language tasks in bAbI [1]. Each question is annotated with the facts required to answer it, so the arity, defined as the number of supporting facts that must be combined, is specified by the dataset: Tasks 1, 2, and 3 have arities 1, 2, and 3, respectively. Arity can be understood as the number of positions to be retrieved in the retrieval-type task setting.
We treat each fact as one input token, so the sequence length is the number of candidate facts that the model must search. We vary by inserting answer-preserving distractor facts while holding the entity pool fixed, so that the arity remains independent of . We train the transformer from scratch, with heads, embedding width , and depth , and report the best training accuracy across three seeds.
Results. Single-layer transformer solves only the arity-1 task and fails the arity-2 and 3 tasks, which is consistent with the depth separation in Theorem 1 because tasks with arity more than 2 may require pairwise retrieval. The two-layer transformer solves both the arity-1 and arity-2 tasks, further verifying the depth separation indicated by Theorem 1 that two-layer transformers can approximate pairwise retrieval.
For the arity-3 task, which may require triple retrieval and therefore with order of comparison greater than 2, the performance of the two-layer transformer degrades as increases. This is consistent with InfoFlow's prediction in Section 6.2, which says targets with higher order of comparison can't be approximated by multi-layer transformers efficiently. Increasing the depth delays this degradation, consistent with the InfoFlow's parameter cost exponent in Proposition 2 with on the denominator.
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 0.48 | 0.51 | 0.67 | 0.49 |
| 3 | 0.45 | 0.44 | 0.53 | 0.48 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 0.99 | 1.00 |
| 3 | 0.99 | 0.96 | 0.71 | 0.59 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 1.00 | 1.00 |
| 3 | 1.00 | 0.99 | 0.98 | 0.97 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 1.00 | 1.00 |
| 3 | 1.00 | 0.99 | 0.95 | 0.99 |
We will also include these experiments in the revision to further demonstrate that InfoFlow predictions extend qualitatively to real world tasks.
[1] Weston, J., Bordes, A., Chopra, S., Rush, A.M., Van Merriënboer, B., Joulin, A. and Mikolov, T., 2015. Towards ai-complete question answering: A set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698.
[2] Penghao Yu, Haotian Jiang, Zeyu Bao, Ruoxi Yu, and Qianxiao Li. The Effect of Attention Head Count on Transformer Approximation. The Fourteenth International Conference on Learning Representations, 2026.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper studies approximation properties of multi-layer Transformers. The authors show a depth separation result, where a two-layer Transformer can approximate some retrieval-style targets much more efficiently than a single-layer Transformer. To explain this, the paper proposes InfoFlow, a framework that tracks which input positions are accessible to each token across layers. The framework is based on several information propagation modes, such as max-position retrieval, global aggregation, and position-specific aggregation. The authors use InfoFlow to predict approximation behavior in synthetic tasks, and provide experiments supporting its predictions on intrinsic-dimension and triangle-center tasks.
Strengths and weaknesses
Strengths:
- The paper studies an important theoretical direction. Understanding why depth helps Transformers is a useful question.
- The depth separation example is potentially interesting. It gives one concrete case where two layers are more efficient than one layer.
- The InfoFlow framework gives a simple way to think about information movement across layers. This may be useful as a high-level abstraction.
Weaknesses:
- The main validation is limited to synthetic tasks. It is therefore unclear whether InfoFlow explains practical Transformer behavior beyond the toy settings used in the paper.
- Some claims feel overstated. The paper often suggests broad usefulness for multi-layer Transformer analysis, but the evidence only supports a much narrower setting. -The relation to prior work could be sharper. The paper discusses approximation theory, Transformer circuits, and information propagation, but I was not always sure what new theoretical machinery InfoFlow adds beyond a useful abstraction. It would help if the authors clearly stated which predictions or bounds cannot be obtained from existing frameworks.
- The definitions around number, dimension, and order of comparison are heavy. More simple examples and clearer intuition are needed for readability.
Questions
- Could the authors clarify which parts of InfoFlow are rigorous consequences of the theorems, and which parts are modeling assumptions? It would be great if the paper more clearly separates theorem-level claims from heuristic framework choices.
- Could the authors provide more simple examples for the number, dimension, and order of comparison? These definitions are important, but currently they are hard to follow. A few step-by-step examples would improve clarity.
- How sensitive are the experimental results to training setup, width, depth, and optimization choices? A small ablation over training seeds, width, or number of layers would help show whether the observed phase transitions are really from InfoFlow, not from optimization difficulty.
- Can the authors test InfoFlow on a less synthetic task or a more realistic Transformer setting? Even a small controlled task closer to real sequence modeling would help support the claim that the framework is useful beyond toy retrieval tasks.
Limitations
Yes.
Formatting concerns
No formatting concerns.
2 comments
Rebuttal
We thank the reviewer's valuable suggestions.
W2: Some claims feel overstated...
Response: The intended scope of InfoFlow is for retrieval-type tasks, whose active index set size doesn't grow with . Within this scope, InfoFlow provides tractable predictions when direct approximation analysis is nearly infeasible. We will state this more clearly in the revision.
Regarding the relation to prior work, Theorem 1 gives a rigorous depth-separation bound that cannot be obtained from existing approximation results.
Beyond this theorem-level result, InfoFlow introduces a quick estimation on how approximation efficiency in terms of total parameter count depends on hyperparameter such as depth, head count, embedding dimension, and sequence length. This parameter count estimation cannot be obtained from prior works.
Predictions such as the intrinsic head-count threshold in tow-layer transformers, and the inefficiency of transformers on the triangle-center task are not provided by existing frameworks, and they are supported by experiments. We will sharpen these distinctions in the revision.
Q1: Could the authors clarify which parts of InfoFlow are rigorous consequences of the theorems...
Response: The theorem-level components which are mathematically rigorous are Theorems 1--3 and their stated approximation bounds. The definitions of the active index set, Trees of Comparison, and the Number, Dimension, and Order of Comparison are mathematically precise. The corresponding estimation of Number of Comparison for the synthetic targets, including the -retrieval, intrinsic dimension task in Section 6.1 and the triangle-center tasks, are rigorous consequences of these definitions.
InfoFlow's mechanisms and its predictions are modeling assumptions that are not proven. They are supported by theorems and experiments in the following way:
- The three information-propagation mechanisms are supported by Theorem 2.
- The parameter cost order is supported by Theorem 3.
- The principle that a model must have Number of Comparison at least that of the target is supported the definition of tree of comparison.
- The prediction that intrinsic dimension exists in two-layer transformer is supported by the intrinsic dimension experiment.
- The prediction that targets with order of comparison greater than 2 are hard to learn is supported by the triangle center experiment.
We will separate these two levels of claims more explicitly in the revision.
Q2: Could the authors provide more simple examples for the number, dimension, and order of comparison...
Response: In the paper, we have an intuitive example in Appendix D, Page 33, with Figure 2 describing the two comparison trees for the target , with chosen to be . Both trees have leaves , and one tree have , the other have . It illustrates how the index sets are passed to the root of each tree.
To demonstrate number of comparison for general , we further provide a step-by-step example. Consider the target . To achieve this target, we construct two trees, one for each minimum. The leaves of each tree are indexed by all unordered pairs with , including pairs with . Thus, each tree has leaves. In the first tree, each internal node compares the two candidate pairs using the score and retains the pair with the larger score, equivalently the pair obtaining smaller value of . By repeating this comparison, we get a pair attaining the first minimum at the root of this tree. The second tree uses the score and the root returns a pair attaining the second minimum. Since every leaf contains at most two positions, this construction shows that the Dimension of Comparison is at most , namely . Since each tree has leaves, it also shows that the Order of Comparison is at most if provided . Finally, the two trees perform a total of pairwise comparisons by computing with the number of leaves, giving an upper bound on the Number of Comparison.
Q3: How sensitive are the experimental results to training setup, width, depth, and optimization choices...
Response: For the intrinsic-dimension experiment, the table below reports the mean and standard deviation of the best validation NMSE over 16 seeds using transformers with FFN hidden layer size , whose FFN-width varies from the transformer used in Section 6.1 in the paper. The phase transition is stable for smaller . For larger , the results become more seed-sensitive because some runs remain on an optimization plateau and attain a higher best validation NMSE. Empirically, increasing the batch size reduces this effect. The training NMSE follows the same trend as the validation NMSE, with little evidence of overfitting. We fix the depth at two layers because this experiment specifically tests InfoFlow's head-count prediction on two-layer transformer.
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 |
For the triangle-center target, we additionally evaluate transformers with layers and embedding dimension across four seeds. The table below reports the mean and standard deviation of the best validation NMSE across different seeds. The variation across seeds is small relative to the degradation with sequence length.
Together with the width and seed ablations above, these results indicate that the observed trends are from intrinsic property of transformers, rather than solely depending on particular initialization, model width, or the use of two layers. We will add these ablations in the revision.
| 3 | 7.88e-4 ± 9.52e-4 | 6.73e-4 ± 8.05e-4 |
| 6 | 4.42e-3 ± 3.40e-4 | 4.02e-3 ± 1.96e-4 |
| 8 | 2.13e-2 ± 1.72e-3 | 1.64e-2 ± 1.12e-3 |
| 16 | 6.73e-1 ± 4.04e-2 | 6.96e-1 ± 4.87e-2 |
| 32 | 9.61e-1 ± 1.57e-3 | 9.61e-1 ± 1.72e-3 |
| 64 | 9.83e-1 ± 6.24e-4 | 9.84e-1 ± 5.02e-4 |
Q4: Can the authors test InfoFlow on a less synthetic task or a more realistic transformer setting...
Response: The synthetic experiments are intended to verify how InfoFlow is able to capture transformer's performance on pairwise retrieval or higher order retrieval, which are the essential properties of the retrieval-type tasks within our scope.
To further verify the InfoFlow prediction in real-world scenario, we do experiments on the question-answering language tasks in bAbI [1]. Each question is annotated with the facts required to answer it, so the arity, defined as the number of supporting facts that must be combined, is specified by the dataset: Tasks 1, 2, and 3 have arities 1, 2, and 3, respectively. Arity can be understood as the number of positions to be retrieved in the retrieval-type task setting.
We treat each fact as one input token, so the sequence length is the number of candidate facts that the model must search. We vary by inserting answer-preserving distractor facts while holding the entity pool fixed, so that the arity remains independent of . We train the transformer from scratch, with heads, embedding width , and depth , and report the best training accuracy across three seeds.
Results: Single-layer transformer solves only the arity-1 task and fails the arity-2 and 3 tasks, which is consistent with the depth separation in Theorem 1 because tasks with arity more than 2 may require pairwise retrieval. The two-layer transformer solves both the arity-1 and arity-2 tasks, further verifying the depth separation indicated by Theorem 1 that two-layer transformers can approximate pairwise retrieval.
For the arity-3 task, which may require triple retrieval and therefore with order of comparison greater than 2, the performance of the two-layer transformer degrades as increases. This is consistent with InfoFlow's prediction in Section 6.2, which says targets with higher order of comparison can't be approximated by multi-layer transformers efficiently. Increasing the depth delays this degradation, consistent with the InfoFlow's parameter cost exponent in Proposition 2 with on the denominator.
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 0.48 | 0.51 | 0.67 | 0.49 |
| 3 | 0.45 | 0.44 | 0.53 | 0.48 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 0.99 | 1.00 |
| 3 | 0.99 | 0.96 | 0.71 | 0.59 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 1.00 | 1.00 |
| 3 | 1.00 | 0.99 | 0.98 | 0.97 |
Depth
| Arity / | 20 | 40 | 80 | 128 |
|---|---|---|---|---|
| 1 | 1.00 | 1.00 | 1.00 | 1.00 |
| 2 | 1.00 | 1.00 | 1.00 | 1.00 |
| 3 | 1.00 | 0.99 | 0.95 | 0.99 |
We will include these experiments in the revision to further demonstrate that InfoFlow predictions extend qualitatively to real world tasks.
[1] Weston, J., Bordes, A., Chopra, S., Rush, A.M., Van Merriënboer, B., Joulin, A. and Mikolov, T., 2015. Towards ai-complete question answering: A set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698.
Acknowledging author response - maintaining score
I would like to thank the authors for their thorough response. The clarifications provided, particularly the new experiments applying InfoFlow to the more realistic bAbI question-answering tasks and validating the theoretical depth separation predictions, have successfully addressed my main concerns. I am satisfied with the proposed revisions and will keep my positive score for this submission.
- Rating
- 4/6
- Confidence
- 2/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
This work provides an analysis of the representation capacity of non-causal transformers with a continuous domain. There is a provable separation between single and multi-layer transformers in this setting, and an analysis of the information propagation through attention leads to a suggested framework for tracking information through a transformer. Experimental results support some suggestions provided by the framework.
Strengths and weaknesses
The proposed InfoFlow model is novel and provides explanatory power on a specific family of tasks. While motivation is provided for the assumptions in the model, more justification would be appreciated (see questions). The experimental validation is weak, which is important as the InfoFlow model relies on assumptions for which it is unclear to what degree they hold. The proofs are involved and at times difficult to parse due to formatting errors.
Questions
- Can you provide further justification for Section 5.2. In particular, the justification (and associated Theorem 3/6) seem to rely on the feed-forward network not having a residual layer, despite the attention layer having a residual layer. Is this the reason for not including a residual layer in the feed-forward network?
- The InfoFlow model seems to rely on a specific type of problem, with the transfomer model restricted to a specific series of operations. Are there instances in which the InfoFlow model gives incorrect predictions because of this?
- I realize the focus of the paper is theoretical, but the experiments seem rather small, and especially so triangle-center target for which the claimed prediction applies to -layer networks for any , but the experiments only use 2-layer networks. Why is this the case? Are the transformers used in the experiments of the same architecture as the theoretical model (no residual layer in the feed-forward network, using tanh activations)?
- Could you clarify the Defintion 2? In particular, on line 267, can you help me understand what is meant by "For constant each "?
- In line 569, what is ? Is the quantity bounded in the expression immediately following this equal to 0?
Limitations
Yes
Final justification
I still have some concerns about the experimental evaluation, but will maintain my positive rating. With the current scale of experiments, it is difficult to be convinced that training is not possible, since it could be a function of not using appropriate hyperparameters (model size, training time, etc.)
Formatting concerns
None
3 comments
Rebuttal
We thank the reviewer's valuable suggestions.
Q1: Can you provide further justification for Section 5.2. In particular, the justification (and associated Theorem 3/6) seem to rely on the feed-forward network not having a residual layer, despite the attention layer having a residual layer. Is this the reason for not including a residual layer in the feed-forward network?
Response: We omit residual connections in the feed-forward blocks only to simplify the notation and proof, this does not affect the parameter-cost result in Theorem 3/6. It can be proven that a two-layer feed-forward network can -approximate the identity function with parameters with bounded parameters, or parameters without the bounded condition. Therefore the presence of the residual doesn't essentially change the approximation rate in theorem 3/6.
We keep the residual connection in the attention layer because it is essential to the InfoFlow update rule: it preserves the information already present at the current token position. We will clarify this distinction in the revision.
Q2: The InfoFlow model seems to rely on a specific type of problem, with the transformer model restricted to a specific series of operations. Are there instances in which the InfoFlow model gives incorrect predictions because of this?
Response: The scope of InfoFlow is on retrieval-type targets, where the size of the active index set doesn't grow with . So there are counterexamples outside of the scope.
For example, for a single-layer one-head transformer learning , uniform attention computes exactly with a parameter count independent of , while applying InfoFlow's will require global information aggregation, leading to a cost. This target is excluded by our retrieval assumption because its active index set has size , which grows with sequence length.
In retrieval style tasks, we haven't found counterexamples to the InfoFlow predictions. We will clarify the intended scope and include this example as limitation in the revision.
Q3: I realize the focus of the paper is theoretical, but the experiments seem rather small, and especially so triangle-center target for which the claimed prediction applies to L-layer networks for any , but the experiments only use 2-layer networks. Why is this the case? Are the transformers used in the experiments of the same architecture as the theoretical model (no residual layer in the feed-forward network, using tanh activations)?
Response: We choose no residual layer in the feed-forward network and Tanh activation because they simplifies the notations without altering the theoretical approximation ability. The experiments in the paper used standard transformer blocks with GELU activations, residual connections around both attention and FFN layers, and LayerNorm, which are more commonly used in practice. There is no essential difference in approximation ability between them. We initially focused on two layers because this is the minimal multi-layer setting, not because the prediction is restricted to .
To verify the prediction at greater depth and under the theoretical architecture, we additionally trained 4-head transformers with 3 and 4 layers, embedding dimension , with Tanh activations and no FFN residual connection as according to the theoretical setting. Each configurations are run across 4 seeds, the mean and standard deviation of the best validation NMSE is reported below. These experiments show the same rapid degradation with as in the two-layer experiments. We will add these results and clarify the experimental architecture in the revision.
| 3 | 7.88e-4 ± 9.52e-4 | 6.73e-4 ± 8.05e-4 |
| 6 | 4.42e-3 ± 3.40e-4 | 4.02e-3 ± 1.96e-4 |
| 8 | 2.13e-2 ± 1.72e-3 | 1.64e-2 ± 1.12e-3 |
| 16 | 6.73e-1 ± 4.04e-2 | 6.96e-1 ± 4.87e-2 |
| 32 | 9.61e-1 ± 1.57e-3 | 9.61e-1 ± 1.72e-3 |
| 64 | 9.83e-1 ± 6.24e-4 | 9.84e-1 ± 5.02e-4 |
Q4: Could you clarify the Defintion 2? In particular, on line 267, can you help me understand what is meant by "For constant each "?
Response: This is a typo, the intended statement is that there exists a constant independent of such that the required comparison trees exist for every . More clearly, Definition 2 can be rewritten as follows.
For with , define the Dimension of Comparison as the smallest for which there exist a constant and an exponent with such that, for every , there exist Trees of Comparison . Each tree has dimension at most and size , and they satisfy for .
Fixing , the Order of Comparison is defined as the smallest exponent for which the above construction is possible. Thus, measures the maximal tuple size required in each Tree of Comparison, while measures how the number of candidate tuples to be compared grows with . We will correct this in the revision.
Q5: In line 569, what is ? Is the quantity bounded in the expression immediately following this equal to 0?
Response: The quantity , defined in Equation (9) in Line 455, is the approximation error . Thus, implies for .
The expression in line 569 has a typo: the second should be , and the intended inequality is . Indeed, . We will correct this typo in the revision.
Thank you for the clarifications! Some additional comments below.
-
Wouldn't the presence of a residual layer mean the FFN would only need to approximate the zero function (as the residual layer itself would provide the identity)? Wouldn't this change the approximation rate to be constant?
-
As a proposal for a heuristic this is sufficient, although it would certainly be stronger if a better characterization of scope/accuracy could be shown.
-
The additional experiments are appreciated, but the overall small scale of the experiments is still concerning, as well as the potentially confounding variables (here, the changing embedding dimension).
Question: Wouldn't the presence of a residual layer mean the FFN would only need to approximate the zero function (as the residual layer itself would provide the identity)? Wouldn't this change the approximation rate to be constant?
Response: Here we further clarify this argument with more details to avoid confusion. The FFN itself is not approximating the zero function nor the identity function, the approximation of identity aims to show that we can add at most more parameters to the FFN in the paper to eliminate the influence of the residual in the FFN layer. The details are as follows.
Originally, we are using to approximate some function to -accuracy, we denote this as . Now if we change the structure to add a residual layer for the FFN layer, then we are -approximating with . This means we need to approximate , which is non-zero in general.
We construct to show that requires at most more parameters than , such that approximates to order
Suppose is in the form of . According to the approximation of identity, there exists such that , and has at most parameters. Write in the form of .
Let , , , , and let , it can be verified that . Then . And has at most more parameters than .
Similarly, if -approximates , there exists with at most more parameters than to approximate to accuracy.
In either direction, it is adding an to the total parameter count of the transformer. As is a small overhead compared with the parameter count when the transformer is inefficient, it then indicates that having a residual connection in the FFN layer doesn't change the approximation efficiency essentially.
Question: The additional experiments are appreciated, but the overall small scale of the experiments is still concerning, as well as the potentially confounding variables (here, the changing embedding dimension).
Response: For the triangle center task, InfoFlow predicts that transformers with fixed size cannot approximate this task efficiently. According to Proposition 2, changing embedding dimension may also affect the approximation efficiency. We use a larger embedding dimension for the layer transformer in the experiment because this is a larger transformer in both depth and embedding dimension than the 3-layer transformer. This is also to verify that the inefficiency of approximation is not due to inadequate embedding dimension, but rather the intrinsic property of the task.
The -layer transformer with has parameters, which is already large for this type of target. We've further conducted experiments on even larger transformer with depth , embedding dimension , and number of heads per layer (The per-head embedding dimension is ). This transformer has more than parameters, which is comparably large for this kind of target. Due to limited time, each configuration is trained across 2 seeds for . The mean and standard deviation of the best validation NMSE is reported below.
This experiment shows the same rapid degradation with as in the two-layer case, further indicating that this degradation is not due to the scale of the transformer. Furthermore, the training NMSE when is greater than for both runs, indicating the approximation inefficiency of this task even for large transformer.
| 6 | 4.93e-3 2.11e-4 |
| 16 | 7.11e-1 5.48e-2 |
| 64 | 9.84e-1 7.65e-4 |
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response: We thank the Area Chair for the meta-review and for highlighting the key issues to be addressed in the rebuttal.
We have addressed each reviewer’s specific concerns in the responses below. A quite common concern is the intended scope of InfoFlow. The intended scope of InfoFlow is for retrieval-type tasks, whose active index set size doesn't grow with sequence length, as noted in the remark at the end of Section 5.1. We've addressed this in details in the responses to the specific questions, and we'll state this intended scope more clearly in the revision.
We've also performed the following experiments to address the reviewers' concerns:
We will incorporate the experiments, together with the clarifications and corrections into the revision.