NoLiMa: Long-Context Evaluation Beyond Literal Matching

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

arXiv:2502.05167 · 2026-07-27 공개 · arXiv · PDF

llm-evaluation long-context attention-mechanism context-length needle-in-a-haystack reasoning-capabilities latent-association cot-prompting

Abstract

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.

한국어 요약

한 줄 요약

NoLiMa는 LLM의 장문 맥락 처리 능력을 평가하기 위해 표면적 일치를 최소화한 새로운 벤치마크로, 기존 모델들이 긴 맥락에서 성능이 급격히 저하됨을 보여준다.

핵심 기여도

핵심 아이디어

기존 NIAH 벤치마크는 핀과 맥락 간 표면적 일치를 통해 모델이 쉽게 정답을 유추할 수 있는 문제가 있었다. NoLiMa는 질문과 핀 간 키워드가 현실적 지식 또는 상식적 연관성을 통해 연결되도록 설계하여, 모델이 표면적 일치에 의존하지 않고 잠재적 연관성을 추론해야 하는 환경을 구축했다. 이는 LLM의 어텐션 메커니즘이 긴 맥락에서 표면적 단서가 없을 경우 정보를 추출하는 능력을 정확히 평가할 수 있게 한다.

기술적 접근법

주요 결과

의의 및 한계

NoLiMa는 LLM의 장문 맥락 처리 능력을 표면적 일치에 의존하지 않고, 잠재적 연관성을 추론하는 능력을 평가하는 데 기여한다. 이는 기존 벤치마크가 실제 상황에서의 복잡한 추론 능력을 제대로 평가하지 못하는 문제를 해결한다. 그러나 NoLiMa는 핀과 질문 간의 연관성이 현실 지식에 의존하므로, 특정 도메인 지식이 부족한 모델은 성능 저하가 클 수 있다. 또한, 표면적 일치가 없는 상황에서 어텐션 메커니즘이 정보를 효과적으로 추출하지 못하는 한계를 드러내며, 이는 LLM의 구조적 개선이 필요함을 시사한다.

실용적 활용

NoLiMa는 검색 엔진, RAG 시스템, 다중 문서 QA 시스템 등에서 실제 유의미한 정보를 추출하는 능력을 평가하는 데 활용 가능하다. 특히, 쿼리와 문서 간 단어 격차가 있는 경우, LLM이 표면적 일치에 의존하지 않고 의미적 연관성을 파악하는 능력을 측정할 수 있어, 시스템의 신뢰도를 높이는 데 기여할 수 있다.