2025-02-13 · 专家 · 自然语言处理 · 机器学习

NoLiMa: Long-Context Evaluation Beyond Literal Matching

该论文提出了一种名为NOLIMA的新基准,用于评估大型语言模型在处理长上下文时的推理能力,通过减少问题和相关信息之间的直接匹配,挑战模型利用潜在关联推理能力而非表面匹配。

更新于 2025-02-13。作者:Ali Modarressi、Hanieh Deilamsalehy、Franck Dernoncourt、Trung Bui、Ryan A. Rossi、Seunghyun Yoon、Hinrich Schütze。

中文摘要

最近的大型语言模型(LLMs)支持从128K到1M个标记的长上下文。评估这些能力的流行方法之一是“大海捞针”(NIAH)测试,该方法涉及从“干草堆”(长无关上下文)中检索“针”(相关信息)。这种方法的扩展包括增加干扰项、事实链和上下文推理。然而,在这些基准测试中,模型可以利用针和干草堆之间现有的字面匹配来简化任务。为了解决这个问题,我们引入了NoLiMa,这是一个扩展NIAH的基准,它包含一个精心设计的针集合,其中问题和针之间的词汇重叠最小,要求模型推断潜在的关联,以便在干草堆中定位针。我们评估了12个流行的LLMs,这些LLMs声称支持至少128K个标记的上下文。虽然它们在短上下文(<1K)中的表现良好,但随着上下文长度的增加,性能显著下降。例如,在32K时,有10个模型的性能低于其强大的短长度基线50%。即使是表现优异的例外之一GPT-4o,其基线从几乎完美的99.3%下降到69.7%。我们的分析表明,这些下降是由于在较长的上下文中,当没有字面匹配时,注意力机制面临的难度增加,这使得检索相关信息变得更加困难。

英文摘要

Recent large language models (LLMs) support long contexts ranging from 128K to 1M tokens. A popular method for evaluating these capabilities is the needle-in-a-haystack (NIAH) test, which involves retrieving a "needle" (relevant information) from a "haystack" (long irrelevant context). Extensions of this approach include increasing distractors, fact chaining, and in-context reasoning. However, in these benchmarks, models can exploit existing literal matches between the needle and haystack to simplify the task. To address this, we introduce NoLiMa, a benchmark extending NIAH with a carefully designed needle set, where questions and needles have minimal lexical overlap, requiring models to infer latent associations to locate the needle within the haystack. We evaluate 12 popular LLMs that claim to support contexts of at least 128K tokens. While they perform well in short contexts (&lt;1K), performance degrades significantly as context length increases. At 32K, for instance, 10 models drop below 50% of their strong short-length baselines. Even GPT-4o, one of the top-performing exceptions, experiences a reduction from an almost-perfect baseline of 99.3% to 69.7%. Our analysis suggests these declines stem from the increased difficulty the attention mechanism faces in longer contexts when literal matches are absent, making it harder to retrieve relevant information.

解读

一句话总结

该论文提出了一种名为NOLIMA的新基准,用于评估大型语言模型在处理长上下文时的推理能力,通过减少问题和相关信息之间的直接匹配,挑战模型利用潜在关联推理能力而非表面匹配。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源