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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Biran, Eden, Gottesman, Daniela, Yang, Sohee, Geva, Mor, Globerson, Amir
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913543952007168
author Biran, Eden
Gottesman, Daniela
Yang, Sohee
Geva, Mor
Globerson, Amir
author_facet Biran, Eden
Gottesman, Daniela
Yang, Sohee
Geva, Mor
Globerson, Amir
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_12775
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queries
Biran, Eden
Gottesman, Daniela
Yang, Sohee
Geva, Mor
Globerson, Amir
Computation and Language
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.
title Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queries
topic Computation and Language
url https://arxiv.org/abs/2406.12775