{"id":"c0d5c11f-578a-492a-9cb8-a1fedb44f8ae","arxiv_id":"2608.07261","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":2,"one_line_summary":"Two-hop reasoning fails when the second hop is out-of-distribution because upper layers of a transformer are trained to map already-formed representations to outputs rather than reason over them, and a looped architecture that aligns representations with inputs substantially recovers the ability.","lead":"This paper trains small transformers on symbolic two-hop questions and finds that they handle the second hop well only when that hop matches the training data. It traces the failure to how the networks use internal representations of the middle entity, then shows a looped architecture that fixes most of the problem.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek-v4-flash","headline":"The load-bearing gap is not just the layer-5 anchor: §4.3's linearity divergence does not prove upper layers 'only map,' and no causal check confirms that bridge representations are well-formed in the failing Test-IO/OO examples before upper layers are blamed.","rationale":"The reader's verdict of CONDITIONAL is reasonable: the paper provides convergent evidence from logit lens, entity patching, linear probing, attention masking, and two training interventions, and the proposed recurrent-style fix is a genuine empirical contribution. However, the central mechanistic claim is load-bearing and has a soft spot not fully captured by the reader's phrasing. The reader focuses on the lack of a perturbation test around the layer-5 anchor, but the deeper issue is that the linearity divergence in §4.3 is interpreted causally. High linearity of the single-hop input-output map from layer 5 to the final layer can reflect the fact that the answer is already linearly decodable at the probed position, not that upper layers have learned a purely linear function. The two-hop linearity drop is likewise expected whenever the answer must be aggregated from another position, and it does not by itself identify where the OOD failure begins. The paper's own §4.2 patching experiment is performed on Train-II, so it does not establish that bridge representations are well-formed on the failing Test-IO/OO splits. The representation-based training result in §5.1 is strong evidence for the diagnosis, but it changes the training objective and therefore shows what upper layers could do, not what the standard model actually fails to do. A concrete causal check on the failing examples, varying the anchor layer and patching a known-good bridge representation, would settle whether the explanation is complete. If that check fails, the paper's 'complete explanation' overclaims and should be revised; if it passes, the core story survives. Since the manuscript already deserves conditional acceptance with revisions, the stress-test does not move the verdict.","tokens_in":24201,"tokens_out":9893,"duration_ms":103649,"concrete_test":"Run the following on the exact failing Test-IO/OO examples: first, use logit lens at the r1 position to verify that e2 is the top token by layer 5; second, patch h5(r1) from the same bridge entity drawn from a Train-II context into the failing two-hop query, leaving all other components unchanged, and measure final accuracy. If accuracy stays near zero, the failure is not caused by upper layers refusing to map OOD bridge representations, because the patched representation is the supposed anchor input. If accuracy rises substantially, the layer-5 anchor is causally sufficient. Re-run the same patch for anchor layers 4, 6, and 7; if the result is not stable across neighboring layers, the chosen 'bridge layer' is a probe artifact rather than the mechanism.","verdict_should_be":"UNCHANGED","load_bearing_attack":"In §4.3, the claim that upper layers are trained to perform 'linear mapping rather than reasoning' rests on fitting W in h^L ≈ W h^ℓ and observing high cosine similarity for single-hop facts but low similarity for two-hop facts at layer 5. This is a decodability result, not a causal characterization of the learned computation. In a causal transformer, at the r2 position of a single-hop fact (e2,r2,e3), the embedding of e3 has not yet been input; a high linear fit can simply mean that the answer direction is already linearly readable in the residual stream after lower layers perform the lookup, even if the upper layers implement nonlinear operations. Conversely, in two-hop queries the answer must be assembled from information at the r1 position, so low linearity at r2 is expected even in a model that would succeed once trained to reason over representational OOD facts. The same issue affects the attention-masking control: showing that upper layers attend from r2 to r1 is consistent with the mismatch story, but it does not show that the h5(r1) representation is the correct bridge representation in the failing Test-IO/OO examples. The entity-patching experiment in §4.2 is run on Train-II, so it measures representation consistency on successful cases, not the quality of the bridge representation on failing splits. The representation-based training intervention (§5.1) is the strongest support for the diagnosis, but it directly trains upper layers on (h5(e2),h5(r2))→e3 for OOD facts; it demonstrates sufficiency of an adapted upper stack, not that the standard model's failure is located at layer 5. Thus the central explanation is plausible but not established: the bottleneck could be upstream, in the formation or readability of the bridge representation in OOD first-hop contexts, or in attention routing, rather than in the mapping-versus-reasoning dichotomy.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek-v4-flash","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.","tokens_in":24515,"tokens_out":17447,"duration_ms":157296,"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":[{"comment":"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.","section":"§4.3, Fig. 6"},{"comment":"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.","section":"§4.1–§4.2, Fig. 5"},{"comment":"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.","section":"Appendix A, Table 4"}],"minor_comments":[{"comment":"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.","section":"§5.3 and Appendix B, Table 5"},{"comment":"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.","section":"Table 1"},{"comment":"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.","section":"§5.1 vs. Appendix F"},{"comment":"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.","section":"Appendix E, Fig. 13"},{"comment":"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.","section":"Throughout"},{"comment":"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.","section":"§4.3"}],"recommendation":"major_revision","confidential_remarks":"The manuscript is within the standard scope for the venue, and the phenomenon it documents is real and well controlled. My main editorial caution concerns the gap between the headline claim of a 'complete explanation' for LLM two-hop failures and the evidence base, which consists of a single scratch-trained 8-layer transformer plus two smaller extension setups; the paper would be substantially more durable if the causal claims were matched by the contrast experiments suggested in my major comments (linearity analysis on the looped and representation-trained models, anchor-layer sensitivity, and bridge-quality checks on the failing splits). The dataset-count inconsistency in Table 4 and the garbled Figure 13 also suggest that the final version needs careful proofreading. Overall, I see a solid, fixable paper, and my recommendation of major revision is driven by the load-bearing evidence gaps rather than by any fundamental flaw."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"Short version: this is a solid mechanistic study with a plausible central explanation and an intervention that works, but the 'complete explanation' claim outruns the evidence. The split design is clean, the controlled symbolic setting is appropriate, and the convergent probes (entity patching, linearity, attention masking) all point in the same direction. The looped architecture result is the most useful single contribution: sharing bottom and top weights recovers most of the failing Test-IO/Test-OO accuracy without extra supervision. That is a real finding worth building on.\n\nWhat is new: prior work documented the compositionality gap; this paper gives a layer-level account—upper layers learn to map already-formed representations to outputs on atomic facts, so they do not reason over OOD bridge representations—and a mechanism-grounded fix. The representation-consistency result for the successful splits is also well executed.\n\nSoft spots, in proportion. The layer-5 anchor is selected via logit lens on the same model; the stress-test note is right that this is not a causal identification. The patching experiment runs on Train-II, where the model already succeeds, so it shows association between representation alignment and generalization, not that misalignment at layer 5 causes the OOD failure. The linearity divergence in Section 4.3 is a decodability result: high linear fit on single-hop facts can also mean the answer direction is already linearly readable after lower layers do the lookup, even if upper layers are doing nonlinear work. So the mapping-versus-reasoning dichotomy is plausible but not established. The attention-masking result is consistent with the story but not decisive—any two-hop mechanism needs the upper layers to look at the bridge position. The representation-based training in Section 5.1 is the strongest support, but it shows sufficiency of an adapted upper stack, not that the standard failure is located at layer 5. The bottleneck could be upstream, in the readability of the bridge representation in OOD first-hop contexts, or in attention routing. The real-data Table 2 has no standard-training baseline, so part of the gain might come from the dense-subgraph construction rather than the loop. Results are single-seed, and no code or data are shipped.\n\nThese are addressable, not fatal. The central phenomenon—asymmetric two-hop generalization—is robust, and the looped fix is genuinely interesting. The paper deserves a serious referee. I would engage, asking for an anchor-layer perturbation test, a standard baseline on the real-data looped experiments, multiple seeds, and code.","headline":"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.","tokens_in":25090,"tokens_out":2745,"would_cite":true,"duration_ms":27288,"reading_group":"yes","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek-v4-flash","headline":"Two-hop reasoning fails when upper layers learn to map facts instead of reasoning over them.","keywords":["two-hop reasoning","mechanistic interpretability","implicit reasoning","representation alignment","looped transformer","out-of-distribution generalization","logit lens","training-inference mismatch"],"falsifier":"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.","tokens_in":24015,"feed_emoji":"🧠","tokens_out":9705,"duration_ms":78027,"temperature":0.7,"pith_summary":"This paper asks why a transformer can store two atomic facts perfectly yet fail to combine them into a two-hop answer. In a controlled symbolic environment, the authors find a sharp asymmetry: generalization succeeds when the second hop is in-distribution and fails when it is out-of-distribution, even though the model demonstrably knows the out-of-distribution fact. They trace the failure to a layer-wise division of labor — lower layers build a consistent internal representation of the bridge entity, but upper layers were trained on atomic facts only to map an already-formed representation to the output, not to reason over an intermediate one. The claimed consequence is that the failure is a training-inference mismatch rather than missing knowledge, and that aligning representations with lower-layer inputs, for example by sharing weights between the bottom and top layers in a looped architecture, restores out-of-distribution two-hop generalization.","feed_headline":"Why knowing both hops is not enough: upper layers map, not reason","feed_subtitle":"A controlled study traces two-hop failures to a layer mismatch and fixes it with weight-sharing loops.","key_machinery":"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.","core_discovery":"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.","pith_inferences":["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."],"forward_implications":["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."],"supporting_citations":[{"why":"Supplies the symbolic data-construction pipeline, the Train-II/atomic-fact ratio threshold, and the grokking-style training regime the experiments are built on.","marker":"Wang et al. (2024)"},{"why":"Provides the cross-distribution II/IO/OI/OO split methodology and the claim that in-distribution atomic facts sharing a target enable aggregation of OOD representations.","marker":"Ye et al. (2025)"},{"why":"The logit lens method used to trace the progressive reasoning process and to select layer 5 as the bridge anchor.","marker":"nostalgebraist (2020)"},{"why":"The attention-blocking technique reproduced in Appendix E to show upper layers do not rely on the e2 position for atomic facts.","marker":"Geva et al. (2023)"},{"why":"Motivates the linear-probing setup (MSE and cosine similarity) that characterizes upper layers as linear mappers.","marker":"Khandelwal and Pavlick (2025)"},{"why":"Establishes the looped-transformer concept that the proposed shared-parameter architecture extends.","marker":"Yang et al. (2023)"},{"why":"Supports the use of looped transformers as a mechanism for reusing computation across passes.","marker":"Fan et al. (2024)"},{"why":"Documents the sparse-graph obstacle in real multi-hop datasets, motivating the dense-subgraph extraction from Wikidata5M.","marker":"Abramov et al. (2025)"},{"why":"Baseline for the Appendix L comparison, showing what explicit chain-of-thought supervision achieves on the same splits.","marker":"Yao et al. (2025)"}],"fun_headline_variants":["Upper layers map, lower layers build: the two-hop failure split","Looped transformer weights fix out-of-distribution two-hop queries","Bridge representations decide two-hop generalization in transformers","Layer mismatch explains why LLMs fail on simple two-hop tasks","Recurrent-style training improves out-of-distribution two-hop reasoning"],"cache_read_input_tokens":3200,"weakest_assumption_plain":"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.","fun_headline_variants_meta":{"raw":{"variants":["Upper layers map, lower layers build: the two-hop failure split","Looped transformer weights fix out-of-distribution two-hop queries","Bridge representations decide two-hop generalization in transformers","Layer mismatch explains why LLMs fail on simple two-hop tasks","Recurrent-style training improves out-of-distribution two-hop reasoning"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000195,"raw_usage":{"total_tokens":1369,"prompt_tokens":967,"completion_tokens":402,"prompt_tokens_details":{"cached_tokens":384},"prompt_cache_hit_tokens":384,"prompt_cache_miss_tokens":583,"completion_tokens_details":{"reasoning_tokens":319}},"tokens_in":583,"tokens_out":402,"duration_ms":4704,"temperature":1.0,"reasoning_tokens":319,"cache_read_input_tokens":384,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-10T11:31:20.854198+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"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.","supporting_citations":[],"review_version":1}