arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.05167cs.CL
收藏

NoLiMa:超越字面匹配的长上下文评估

NoLiMa: Long-Context Evaluation Beyond Literal Matching

LMU(莱茵-穆尔大学);Center for Information and Language Processing(信息与语言处理中心);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心);Adobe(Adobe公司)

Ali Modarressi, Hanieh Deilamsalehy, Franck Dernoncourt, Trung Bui, Ryan A. Rossi, Seunghyun Yoon, Hinrich Schütze

AI总结:

NoLiMa基准通过最小化词汇重叠,评估长上下文LLMs在无字面匹配下的检索能力,发现性能随长度显著下降。

摘要:

近期的大语言模型(LLMs)支持从128K到1M token的长上下文。评估这些能力的一种流行方法是“大海捞针”(NIAH)测试,该测试涉及从“干草堆”(长的不相关上下文)中检索“针”(相关信息)。此方法的扩展包括增加干扰项、事实链和上下文内推理。然而,在这些基准测试中,模型可以利用针与干草堆之间现有的字面匹配来简化任务。为解决此问题,我们引入了NoLiMa,一个通过精心设计的针集扩展NIAH的基准,其中问题和针具有最小的词汇重叠,要求模型推断潜在关联以在干草堆中定位针。我们评估了13个声称支持至少128K token上下文的流行LLMs。虽然它们在短上下文(<1K)中表现良好,但随着上下文长度的增加,性能显著下降。例如,在32K时,11个模型降至其强短长度基线的50%以下。即使是表现最佳的例外之一GPT-4o,也经历了从近乎完美的99.3%基线降至69.7%的下降。我们的分析表明,这些下降源于在缺少字面匹配时,注意力机制在较长上下文中面临更大难度,使得检索相关信息更加困难。即使增强了推理能力或使用思维链(CoT)提示的模型也难以在长上下文中保持性能。我们公开发布了数据集和评估代码,网址为https://github.com/adobe-research/NoLiMa。

英文摘要:

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 13 popular LLMs that claim to support contexts of at least 128K tokens. While they perform well in short contexts (<1K), performance degrades significantly as context length increases. At 32K, for instance, 11 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. Even models enhanced with reasoning capabilities or CoT prompting struggle to maintain performance in long contexts. We publicly release the dataset and evaluation code at https://github.com/adobe-research/NoLiMa.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑