Papers › Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queries

Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queries

18 Jun 2024arXiv:2406.12775archive 2025-07-28

Eden Biran, Daniela Gottesman, Sohee Yang, Mor Geva, Amir Globerson

Large language models (LLMs) can solve complex multi-step problems, but little is known about how these computations are implemented internally. Motivated by this, we study how LLMs answer multi-hop queries such as "The spouse of the performer of Imagine is". These queries require two information extraction steps: a latent one for resolving the first hop ("the performer of Imagine") into the bridge entity (John Lennon), and another for resolving the second hop ("the spouse of John Lennon") into the target entity (Yoko Ono). Understanding how the latent step is computed internally is key to understanding the overall computation. By carefully analyzing the internal computations of transformer-based LLMs, we discover that the bridge entity is resolved in the early layers of the model. Then, only after this resolution, the two-hop query is solved in the later layers. Because the second hop commences in later layers, there could be cases where these layers no longer encode the necessary knowledge for correctly predicting the answer. Motivated by this, we propose a novel "back-patching" analysis method whereby a hidden representation from a later layer is patched back to an earlier layer. We find that in up to 66% of previously incorrect cases there exists a back-patch that results in the correct generation of the answer, showing that the later layers indeed sometimes lack the needed functionality. Overall, our methods and findings open further opportunities for understanding and improving latent reasoning in transformer-based LLMs.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.12775")

Code

Syntology Ran 10 of 12 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 10 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

edenbiran/HoppingTooLate officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 10 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran
2unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from edenbiran/HoppingTooLate. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

create_target_prompt edenbiran/HoppingTooLate/src/patch_activations.py official repository ran MIT (permissive) · 0bad694c005e385c · report
find_layers_by_classification edenbiran/HoppingTooLate/src/classify_results.py official repository ran MIT (permissive) · 3820700493cb2dd1 · report
get_entities_per_type edenbiran/HoppingTooLate/src/create_dataset.py official repository ran MIT (permissive) · e3649917ac1cd8d7 · report
get_entity_counts edenbiran/HoppingTooLate/src/analyze_results.py official repository ran MIT (permissive) · c932a81e28f8b5ec · report
get_layer_names edenbiran/HoppingTooLate/src/utils.py official repository ran MIT (permissive) · cdc175a60f83d924 · report
get_one_hop edenbiran/HoppingTooLate/src/create_dataset.py official repository ran fingerprinted MIT (permissive) · 97485dbb4fcb5def · report
get_popular_entities_per_type edenbiran/HoppingTooLate/src/create_dataset.py official repository ran MIT (permissive) · 4fd83ad38d7e72b8 · report
get_stage_layers edenbiran/HoppingTooLate/src/analyze_results.py official repository ran MIT (permissive) · e12cea8b6661a026 · report
get_sublayer_counts edenbiran/HoppingTooLate/src/analyze_results.py official repository ran MIT (permissive) · 9ca91681e0ed00b8 · report
load_tokenizer edenbiran/HoppingTooLate/src/utils.py official repository ran MIT (permissive) · 8164e26307c3a60b · report
find_tokens edenbiran/HoppingTooLate/src/patched_generation.py official repository unverified MIT (permissive) · 5c1337c4e1ef4149 · report
load_model edenbiran/HoppingTooLate/src/utils.py official repository unverified MIT (permissive) · 9d02aac80c0eae1a · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

FAVOR+Performer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections