BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystack

Yuri Kuratov, A. Bulatov, Petr Anokhin, I. Rodkin, Dmitry Sorokin, Artyom Y. Sorokin, M. Burtsev

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

long-context retrieval-augmented-generation llm-benchmark context-extension token-length deduction induction recurrent-memory-transformer

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.

한국어 요약

한 줄 요약

BABILong 벤치마크는 LLM이 긴 문서 내 분산된 사실을 추론하는 능력을 평가하며, 최대 5000만 토큰 처리 가능 모델을 제시한다.

핵심 기여도

핵심 아이디어

BABILong은 기존 "needle-in-a-haystack" 방식의 단순성과 한계를 극복하기 위해 설계되었다. PG19 코퍼스를 기반으로 자연스러운 긴 문서를 생성하고, 사실 체인, 귀납, 연역, 카운팅, 리스트/세트 처리 등 20개의 추론 태스크를 포함하여, 모델이 실제 세계의 복잡한 추론 상황을 다루는 능력을 평가한다. 이는 단일 사실 검색이 아닌, 여러 분산된 정보를 종합하여 추론해야 하는 상황을 반영한다. BABILong은 문맥 길이를 자유롭게 조정할 수 있도록 설계되어, 향후 긴 문맥 처리 능력을 가진 새로운 모델의 평가를 지원한다.

기술적 접근법

주요 결과

의의 및 한계

BABILong은 기존 벤치마크가 긴 문맥을 충분히 평가하지 못하는 문제를 해결하며, 다양한 추론 태스크를 통해 모델의 실제 활용 가능성과 한계를 명확히 평가할 수 있다. 특히, RMT와 ARMT는 긴 문맥 처리에서 뛰어난 성능을 보여주며, 향후 연구의 방향성을 제시한다. 그러나 일부 모델은 긴 문맥에서도 성능이 급격히 저하되며, 이는 모델 아키텍처와 학습 전략의 개선이 필요함을 시사한다. 또한, BABILong은 인간 라벨링이 어려운 긴 문서를 합성하는 방식을 채택하여, 실제 세계 데이터와의 차이가 있을 수 있다.

실용적 활용

BABILong은 긴 문맥을 처리해야 하는 의료, 법률, 금융 분야의 문서 분석, 대규모 데이터 요약, 복잡한 질문 응답 시스템 개발에 유용하게 활용될 수 있다. 특히, Recurrent Memory Transformer와 같은 모델은 대규모 텍스트 처리가 필요한 산업에서 실용적 가치가 높다.