REVIEW 3 major objections 6 minor 14 references
Why Knowing Both Hops Is Not Enough: Understanding Two-Hop Generalization in Language Models
T0 review · 3 major / 6 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Two-hop reasoning fails when upper layers learn to map facts instead of reasoning over them.
desk verdict A well-designed symbolic study with a plausible layer-mismatch story and a looped-weights fix that works, but the 'complete explanation' is stronger than the causal evidence. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the bridge entity representation $\mathcal{R} = h^5_{r_1}$, the hidden state at the first-relation position of layer 5, identified by logit lens as the point where the model has resolved the intermediate entity $e_2$ before starting the second hop. Three instruments carry the argument: entity patching, which swaps $\mathcal{R}$ for a same-entity representation from another context and checks whether the answer survives; a linearity probe, which fits a linear map from intermediate to final-layer states and shows near-perfect linearity for single-hop facts but a nonlinear gap for two-hop queries; and a sliding-window attention mask, which shows upper layers barely attend to the bridge position on atomic facts yet fail catastrophically when blocked from it on two-hop queries. The proposed fix is a looped architecture in which the top four layers share parameters with the bottom four, which the authors show forces entity and relation hidden states to become compatible with input embeddings so the same reasoning circuit works on surface tokens and on intermediate representations.
What would settle it
Repeat the entity-patching and linearity-probe experiments with the anchor shifted to layers 4 and 6: if the patching success rates and the single-hop-versus-two-hop linearity gap do not follow the same pattern at adjacent layers, the layer-5 bridge representation is a correlate rather than the mechanism. A second check is to find any standard (non-looped, non-representation-trained) transformer that reaches above-chance Test-OO accuracy, which would contradict the claim that the upper layers' mapping habit is what blocks second-hop out-of-distribution generalization.
Extended reading notes
Core claim
The paper's central claim is that two-hop generalization in a transformer is governed by where computation happens, not by whether the knowledge is stored. Using logit lens, the authors identify layer 5 as the transition where the bridge entity $e_2$ is resolved at the first-relation position, and they designate the hidden state there as the bridge representation $\mathcal{R}$. Generalization on Test-II and Test-OI tracks the alignment of this representation across contexts: substituting $\mathcal{R}$ with the same entity's representation from another context preserves the answer exactly when the model generalizes. Failure on Test-IO and Test-OO is attributed to a functional mismatch: atomic-fact training teaches the upper layers a near-linear map from a fully formed entity representation to the output space, whereas a two-hop query requires nonlinear aggregation of the bridge representation with the second relation. Linear-probing and attention-masking experiments support the distinction, and both representation-based continual training of the upper layers and a looped architecture that ties the bottom and top four layers' parameters substantially recover the failing splits, with the looped strategy carrying over to a natural-language two-hop dataset.
Load-bearing premise
The explanation rests on the logit-lens identification of layer 5's hidden state at the first-relation position as the bridge representation the upper layers actually consume; the paper never varies that anchor layer to test whether the same patching and linearity results hold elsewhere.
Editorial extensions
If this is right
- The failure on Test-IO and Test-OO is not a knowledge deficit: the model answers single-hop questions about the OOD facts while systematically failing to chain them, so any effective intervention must change how layers use representations, not add facts.
- Continual training of only the upper layers (6–8) on OOD atomic facts presented as hidden states lifts Test-IO/Test-OO accuracy from near zero to substantial levels, confirming that the missing capability is reasoning over intermediate representations.
- A looped architecture with shared lower/upper parameters generalizes across all four splits without extra supervision, and the loop-end and bridge-layer cosine-similarity metrics rise sharply under it, evidence that representation-input alignment is the operating mechanism.
- The looped results transfer to a Llama-style backbone and to a natural-language two-hop dataset extracted from Wikipedia-derived data, so the paper argues the mismatch is an architectural phenomenon rather than an artifact of the symbolic setup.
- Deeper looped models generalize better and faster on the previously failing splits, indicating that the alignment strategy benefits from added capacity.
Reading between the lines
- If the mapping-versus-reasoning diagnosis is right, the same asymmetry should appear in other compositional tasks, such as arithmetic chains or transitive relations, wherever training rewards upper layers for reading off an already-resolved operand; a cross-task replication would test the mechanism's generality.
- The anchor-layer choice is the argument's most exposed point: a perturbation study that patches at layers 4 and 6 and reproduces the same success rates and linearity gap would confirm the mechanism is specific to layer 5 rather than a correlate of it.
- Looped weight-sharing can be read as a soft prior that intermediate representations should resemble input embeddings; a testable extension is whether a regularization loss pulling $h^5_{r_1}$ toward the embedding of $e_2$ achieves comparable gains without tying parameters, isolating the alignment effect from other consequences of sharing.
- The appendix's comparison with explicit chain-of-thought training shows explicit supervision reaches near-perfect Test-OO accuracy while looped training does not; whether multiple loop passes or combining the two closes that residual gap is a question the paper leaves open.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. This paper studies why a from-scratch transformer trained on symbolic atomic facts (e1,r,e2) and in-distribution two-hop compositions fails to generalize to two-hop queries whose second hop is out-of-distribution. In a controlled knowledge-graph environment (2,000 entities, 200 relations, 40,000 atomic facts, ID/OOD split of 95/5, Train-II size proportional to the ID atomic count with the reported ratio φ=7.2), an 8-layer GPT-2-style model reaches near-perfect accuracy on Test-II and Test-OI but stays at chance on Test-IO and Test-OO. The authors propose a mechanistic explanation: successful generalization is driven by context-invariant bridge-entity representations that emerge at layer 5 (supported by logit-lens and entity-patching experiments), while the failures arise from a training-inference mismatch in which the upper layers, trained on atomic facts, learn to linearly map already-resolved representations to outputs rather than to reason nonlinearly over the bridge representation at the r1 position (supported by a linear-probing divergence and an attention-masking control). Two interventions, representation-based continual training of the upper layers and a looped weight-sharing architecture that aligns intermediate representations with lower-layer inputs, recover most of the lost Test-IO/Test-OO accuracy. Extension experiments cover a Llama-style backbone and a Wikidata-derived real-world two-hop dataset.
Significance. If the explanation holds, the paper makes a useful contribution: it converts a puzzling asymmetry (failure on two-hop despite full atomic knowledge) into a concrete claim about layer-wise functional specialization, and it offers a mechanism-grounded remedy with a measurable alignment signature. Strengths to credit include: held-out evaluation splits that were not used to fit the model or the measurements; entity-patching with noise-injection and position-swap controls; the correlation between patching success and Test-II/Test-OI accuracy across training (Figure 5); two independent interventions that both point to missing representation-based reasoning over OOD atomic facts (Section 5.1 and Section 5.2); and the Appendix H ablations that attempt to reproduce the looped-training effect with alternative training strategies. The main risk is that the causal chain from 'upper layers are linear mappers' to 'Test-IO/OO failures' has gaps: the linearity measurement is a decodability result, and the failing splits are never directly probed for bridge-representation quality. The interventions, not the linearity measurement, carry the weight of the diagnosis.
major comments (3)
- [§4.3, Fig. 6] The linear-probing experiment establishes that the transformation h^L_r ≈ W h^ℓ_r is well fit for the r-position of single-hop atomic facts and poorly fit for the r2-position of two-hop queries, but this contrast is a decodability statement rather than a causal characterization of what the upper layers compute. For an atomic fact (e2, r2, e3), the lower layers have already performed the lookup so that the residual stream at r2 is answer-directed; a high linear fit then only says the answer direction is linearly readable, which is equally consistent with the upper layers implementing nonlinear operations. Conversely, for a two-hop query the correct answer is not locatable at r2 from the input by construction, so low linearity at r2 is expected of any successful second-hop computation, including one performed by an OOD-capable model. The reported divergence therefore does not by itself support the statement in §4.3 that 'the upper layers are trained on atomic facts to perform linear mapping, but multi-hop reasoning requires them to execute non-linear information aggregation.' The causal load is carried instead by the Appendix E masking experiment and the Section 5.1/5.2 interventions, which do support the mismatch story. To make Figure 6 load-bearing, the authors should (i) state which two-hop split is used for the two-hop curve (Train-II versus Test-IO/OO), and (ii) measure the same linearity metric on the failing Test-IO/OO splits and on the looped or representation-trained models, where the mismatch is allegedly repaired. The predicted signature is that the linearity divergence at the bridge layer shrinks for OOD second hops after the intervention.
- [§4.1–§4.2, Fig. 5] The entire analysis is anchored on layer 5, which is selected as 'the bridge layer' by logit lens on the very models used for all subsequent measurements, and this anchor choice is never perturbed. Appendix D only varies the training stage; it does not vary the anchor layer in the patching, linearity, or attention-masking analyses. In addition, the entity-patching experiment (Figure 5) is run on Train-II two-hop queries, i.e., on the successful in-distribution cases; it never tests whether h5(r1) is a well-formed, causally required bridge representation in the failing Test-IO/Test-OO examples. Since the paper's central claim is about why Test-IO/OO fail, the bridge-quality measurement on those splits and a sensitivity analysis across anchor layers (e.g., repeating the patching protocol with representations taken from layers 4, 6, or 7) are needed to rule out the possibility that the patching-success and linearity metrics track a correlate rather than the actual reasoning pathway. Without such a check, the statement in §4.1 that h5(r1) 'serves as an anchor for subsequent analysis' is an assumption, not a validated fact.
- [Appendix A, Table 4] The reported dataset counts are arithmetically inconsistent with the construction description. The construction yields 2,000 entities × 20 relations = 40,000 atomic facts, partitioned 95/5 into 38,000 ID and 2,000 OOD facts, but Table 4 lists 38,000 training ID plus 3,000 test ID atomic facts and 2,000 training plus 2,000 test OOD atomic facts, totaling 45,000 atomic facts. In addition, §2 states that the ID/OOD partition uses 'proportion ϕ,' whereas Appendix A defines ϕ=7.2 as the ratio of Train-II facts to ID atomic facts. These numbers must be reconciled and the definition of ϕ made consistent for the experiments to be reproduced exactly, since the claimed training dynamics and the asymmetry pattern depend on the split sizes and on the ϕ=7.2 choice.
minor comments (6)
- [§5.3 and Appendix B, Table 5] Two cross-references are inconsistent: §5.3 says the alignment results explain 'the generalization observed in Section 5.3,' while the accuracy results for the looped model appear in §5.2, and Table 5 in Appendix B also attributes the looped training to 'Section 5.3' rather than §5.2.
- [Table 1] The text in §5.3 claims that looped training produces 'strong alignment with lower-layer inputs' for both e2 and r2, but the Loop-End Alignment value for r2 actually decreases from 0.4121 (standard) to 0.3141 (looped); the alignment claim is only supported by the Bridge-Layer Alignment columns (0.8132 and 0.8487) and should be qualified accordingly.
- [§5.1 vs. Appendix F] Section 5.1 states that the continual training is applied 'only to the upper layers (layer 5 and above),' whereas Appendix F specifies that the representation pairs (h_e2, h_r2) are fed into Layer 6 and that Layers 6–8 are trained; the layer-5-versus-layer-6 discrepancy should be resolved, since layer 5 is the layer whose representations are being consumed.
- [Appendix E, Fig. 13] The rendered axis tick labels in Figure 13 appear as garbled glyph sequences, which obscures the masking-window center values; the figure should be regenerated with readable labels.
- [Throughout] There are several small typos and reference-format issues: §1 contains 'Tset-II' and 'Dirven' instead of 'Test-II' and 'Driven'; several reference entries list 'and 1 others' (Wei et al., Elhage et al., Ye et al., Zhu et al., Zhao et al. 2025a); and the Radford et al. entry lacks a year and venue.
- [§4.3] The claim that 'for Test-II and Test-OI, all their second hops in the form of intermediate representation have appeared during training' is an overstatement, since Train-II (273,600 examples) covers only a subset of the possible ID two-hop chains; the authors should either quantify the coverage of representational-form second hops or soften 'all' to reflect partial coverage.
Circularity Check
No significant circularity: the main claims are supported by held-out evaluations and interventions, not by construction.
full rationale
The paper's central diagnosis—that Test-IO/OO failures arise from a training-inference mismatch in which upper layers learn linear mapping rather than representation-based reasoning—is not defined into existence. The bridge-layer anchor h5(r1) is selected by logit-lens observation on the same model, which is a localization assumption rather than a circular reduction: the paper does not define the bridge representation in terms of the failure it is meant to explain. The linear-probing experiment fits a linear map W on atomic-fact hidden states and reports high cosine similarity for single-hop and low for two-hop; this is an empirical measurement, not a fitted parameter renamed as a prediction. The entity-patching experiments are causal interventions, and the attention-masking experiment probes held-out evaluation queries; these provide independent evidence for the layer-wise story. The representation-based training intervention in §5.1 supervises upper layers on OOD atomic facts in representational form and then shows Test-IO/OO improvement; although this is a constructive test that directly supplies the hypothesized missing capability, it does not leak two-hop supervision, and it is corroborated by the looped-architecture experiment in §5.2, which improves Test-IO/OO without any such representational supervision. No load-bearing self-citation chain or uniqueness-imported-from-authors pattern is present. The weakest point is that layer 5 is chosen as the bridge layer via logit lens on the same models and then used as the anchor for subsequent measurements; varying the anchor layer would strengthen the causal claim, but this is a robustness/correctness concern, not circularity.
Assumptions & free parameters
free parameters (2)
- phi (Train-II ratio) =
7.2
- ID/OOD atomic split proportion =
95% ID / 5% OOD
assumptions (4)
- domain assumption Logit lens projections through the unembedding matrix are a valid way to localize where the model represents entities and relations.
- domain assumption The symbolic training environment is representative of the multi-hop reasoning behavior of larger language models.
- domain assumption Causal patching of hidden states is an appropriate intervention for testing whether a representation is used in downstream computation.
- domain assumption Fitting a linear map h_L approximately W h_l measures whether upper layers compute linear maps, and near-linear maps imply mapping rather than reasoning.
Cite this review
Pith. "Pith review of Why Knowing Both Hops Is Not Enough: Understanding Two-Hop Generalization in Language Models." pith.science (2026). https://pith.science/paper/ZOGCZMTD
@misc{pith2026260807261,
author = {Pith},
title = {Pith review of: Why Knowing Both Hops Is Not Enough: Understanding Two-Hop Generalization in Language Models},
year = {2026},
howpublished = {\url{https://pith.science/paper/ZOGCZMTD}},
note = {Machine review of arXiv:2608.07261}
}
read the original abstract
Large language models (LLMs) can solve complex multi-hop problems yet exhibit puzzling failures on simple two-hop queries: although a model may correctly store each individual hop, it often fails to combine them. To understand the internal mechanisms of this phenomenon, we train transformers from scratch in a controlled symbolic environment. Our experiments reveal a pattern in two-hop generalization: models generalize reliably when the second hop follows the training distribution, but always fail when it deviates. Through mechanistic analysis, we provide a complete explanation for these distinct generalization behaviors: in settings where models generalize successfully, performance is driven by the emergence of consistent intermediate representations for the same entities across contexts, whereas failures on settings where the second hop is out-of-distribution arise from a mismatch across layers: lower layers correctly construct these intermediate representations, but upper layers, while trained on corresponding atomic facts, primarily learn to map them to outputs rather than to reason over them. Driven by this insight, we propose a recurrent-style training strategy, which enables transformers to reuse their reasoning circuitry across input forms and substantially improves generalization on out-of-distribution two-hop queries.
Figures
Figures from the paper (16 more)
Reference graph
Works this paper leans on
-
[1]
For each entity, extract its surrounding at- tribute set, consisting ofe 1,r 1,e 3, andr 2
-
[2]
Collect the intermediate hidden state represen- tations of all entities using ID atomic facts, and compute the mean representation for each entity
-
[3]
Pair all entities and compute the overlap be- tween their corresponding attribute sets, and plot kernel density estimation (KDE) curves for the resulting overlap distributions
-
[4]
Mor Geva, Jasmijn Bastings, Katja Filippova, and Amir Globerson
Extractive structures learned in pretraining enable generalization on finetuned facts.ArXiv, abs/2412.04614. Mor Geva, Jasmijn Bastings, Katja Filippova, and Amir Globerson. 2023. Dissecting recall of factual associa- tions in auto-regressive language models. InProceed- ings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages...
arXiv 2023
-
[5]
Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov
Improve mathematical reasoning in language models by automated process supervision.ArXiv, abs/2406.06592. Kevin Meng, David Bau, Alex Andonian, and Yonatan Belinkov. 2022. Locating and editing factual associa- tions in gpt.Advances in neural information process- ing systems, 35:17359–17372. nostalgebraist. 2020. Interpreting gpt: The logit lens. LessWrong...
arXiv 2022
-
[6]
Unveiling the Mechanisms of Explicit CoT Training: How CoT Enhances Reasoning Generaliza- tion.Preprint, arXiv:2502.04667. Jiaran Ye, Zijun Yao, Zhidian Huang, Liangming Pan, Jinxin Liu, Yushi Bai, Amy Xin, Liu Weichuan, Xi- aoyin Che, Lei Hou, and 1 others. 2025. How does transformer learn implicit reasoning?arXiv preprint arXiv:2505.23653. Zeping Yu and...
arXiv 2025
-
[7]
Back attention: Understanding and enhancing multi-hop reasoning in large language models.ArXiv, abs/2502.10835. Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, and 3 ...
arXiv 2024
-
[11]
For multiple overlap thresholds, calculate the average cosine similarity between the repre- sentations of all entity pairs exceeding each threshold
Show all 14 references
-
[12]
This experiment enables us to investigate how local graph structure influences the formation of entity representations
Plot the average cosine similarity as a function of the overlap threshold. This experiment enables us to investigate how local graph structure influences the formation of entity representations. The results are shown in Fig- ure 11. The following provides a detailed analysis o...
-
[13]
For this experiment, we directly use the model after 3,500,000 optimization steps of standard training
Standard training:We first train the model normally until it achieves high generalization performance on Test-II and Test-OI, as only when the model generalizes well on these benchmarks do the intermediate representa- tions of the same entity become consistent and stable, whic...
-
[14]
Multi-round training with representation- based reasoning:The following procedure is repeated for multiple rounds. In each round, we first perform standard training to maintain the model’s generalization performance and prevent the additional representation-based reasoning tra...
2025
-
[2023]
InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics (V olume 1: Long Papers), pages 16124–16170, Toronto, Canada
Analyzing transformers in embedding space. InProceedings of the 61st Annual Meeting of the Association for Computational Linguistics (V olume 1: Long Papers), pages 16124–16170, Toronto, Canada. Association for Computational Linguistics. Yuntian Deng, Yejin Choi, and Stuart Sh...
2024 arXiv
-
[2024]
Lukas Berglund, Asa Cooper Stickland, Mikita Balesni, Max Kaufmann, Meg Tong, Tomasz Korbak, Daniel Kokotajlo, and Owain Evans
Lessons from studying two-hop latent rea- soning. Lukas Berglund, Asa Cooper Stickland, Mikita Balesni, Max Kaufmann, Meg Tong, Tomasz Korbak, Daniel Kokotajlo, and Owain Evans. 2023. Taken out of context: On measuring situational awareness in llms. arXiv preprint arXiv:2309.0...
2023 arXiv
-
[2025]
In Proceedings of the 42nd International Conference on Machine Learning, volume 267 ofProceedings of Machine Learning Research, pages 231–245
Grokking in the wild: Data augmentation for real-world multi-hop reasoning with transformers. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 ofProceedings of Machine Learning Research, pages 231–245. PMLR. Daniel Balcells, Benjamin Lerner, ...
2024 arXiv
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.