Skip to main content
QUICK REVIEW

[论文解读] BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack

Yuri Kuratov, Aydar Bulatov|arXiv (Cornell University)|Jun 14, 2024
Natural Language Processing TechniquesComputer Science被引用 6
一句话总结

BABILong 在包含背景文本的 20 项任务的长上下文推理中对 LLM 进行基准评估,揭示对上下文的利用有限(10-20%),RAG 表现较弱,以及能够处理高达 11 million tokens 的强大循环记忆模型。

ABSTRACT

In recent years, the input context sizes of large language models (LLMs) have increased dramatically. However, existing evaluation methods have not kept pace, failing to comprehensively assess the efficiency of models in handling long contexts. To bridge this gap, we introduce the BABILong benchmark, designed to test language models' ability to reason across facts distributed in extremely long documents. BABILong includes a diverse set of 20 reasoning tasks, including fact chaining, simple induction, deduction, counting, and handling lists/sets. These tasks are challenging on their own, and even more demanding when the required facts are scattered across long natural text. Our evaluations show that popular LLMs effectively utilize only 10-20\% of the context and their performance declines sharply with increased reasoning complexity. Among alternatives to in-context reasoning, Retrieval-Augmented Generation methods achieve a modest 60\% accuracy on single-fact question answering, independent of context length. Among context extension methods, the highest performance is demonstrated by recurrent memory transformers after fine-tuning, enabling the processing of lengths up to 50 million tokens. The BABILong benchmark is extendable to any length to support the evaluation of new upcoming models with increased capabilities, and we provide splits up to 10 million token lengths.

研究动机与目标

  • 评估当前的 LLM 在极长文档中分布事实的推理能力。
  • 评估上下文扩展方法和检索增强生成在长输入上的有效性。
  • 提供一个可扩展的基准,长度高达 1 million tokens(测试至 11 million)以评估更新的模型。

提出的方法

  • 通过将任务句嵌入来自 PG19 的背景文本来扩展基于 bAbI 风格的推理任务,以创建长上下文。
  • 在上下文长度和任务类型(包括事实链、归纳、演绎、计数和列表/集合)上对 24 个模型进行评估。
  • 比较 Retrieval-Augmented Generation (RAG) 与上下文扩展方法(如循环记忆变换器)。
  • 在 BABILong 上对选定模型进行微调,使用从短序列到长序列的课程学习。
  • 使用预定义的长度分割,长度高达 1M tokens,并对某些模型测试至 11M tokens。

实验结果

研究问题

  • RQ1当事实分布在极长文档中时,当前的 LLM 在长上下文推理任务上的表现如何?
  • RQ2模型在多大程度上利用可用上下文,随着上下文长度和推理复杂性的增加,性能如何扩展?
  • RQ3在 BABILong 任务上,RAG 与各种上下文扩展方法在多跳推理方面的比较如何?
  • RQ4较小、经过微调的模型(如 RMT、Mamba)在非常长的输入长度下能否超越更大模型或 RAG?
  • RQ5BABILong 的结果与在不同上下文长度下的其他基准(如 MMLU、RULER)之间的关系是什么?

主要发现

  • 流行的 LLM 实际上只使用大约 10-20% 的输入上下文。
  • 随着推理复杂性和输入长度的增加,性能急剧下降。
  • RAG 方法在单一事实问题上大约达到 60% 的准确率,基本与上下文长度无关。
  • 微调后的循环记忆变换器(RMT)可处理非常长的文本,长达 11 million tokens,在长上下文任务中优于 RAG。
  • Mamba 与 RMT 在所评估的模型中提供了最强的结果,且 RMT 的能力远超训练长度(高达 11M tokens)。
  • 对较长上下文的微调可提升性能,但基础规模的模型通常在没有专用长上下文适配的情况下有限。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。