Hopping Too Late:探索大语言模型在多跳查询上的局限性
Hopping Too Late: Exploring the Limitations of Large Language Models on Multi-Hop Queries
AI总结:
研究基于transformer的LLMs在多跳查询中因第二跳在后期层计算导致知识缺失的局限性,提出back-patching方法,发现66%错误案例可通过回溯修补纠正。
摘要:
大语言模型(LLMs)能够解决复杂的多步问题,但对于这些计算在内部是如何实现的,我们知之甚少。受此启发,我们研究了LLMs如何回答诸如“The spouse of the performer of Imagine is”等多跳查询。这些查询需要两个信息提取步骤:一个是潜在步骤,用于将第一跳(“the performer of Imagine”)解析为桥接实体(John Lennon);另一个步骤用于将第二跳(“the spouse of John Lennon”)解析为目标实体(Yoko Ono)。理解该潜在步骤在内部是如何计算的,是理解整体计算的关键。通过仔细分析基于transformer的LLMs的内部计算,我们发现桥接实体在模型的早期层中被解析。随后,在此解析完成后,两跳查询才在后期层中被解决。由于第二跳在后期层才开始,可能会出现这些层不再编码正确预测答案所需知识的情况。受此启发,我们提出了一种新颖的“back-patching”分析方法,即将后期层的隐藏表示回溯修补到早期层。我们发现,在之前错误的案例中,有多达66%的情况存在一种能导致正确生成答案的back-patch,这表明后期层确实有时缺乏所需的功能。总体而言,我们的方法和发现为理解和改进基于transformer的LLMs中的潜在推理开辟了更多机会。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。