ınftyBench: Extending Long Context Evaluation Beyond 100K Tokens

Xinrong Zhang, Yingfa Chen, Shengding Hu, Zihang Xu, Junhao Chen, Moo Khai Hao, Xu Han, Zhen Leng Thai, Shuo Wang, Zhiyuan Liu, Maosong Sun

Abstract

∞BENCH is the first comprehensive benchmark designed to evaluate Large Language Models (LLMs) on massive contexts averaging 200,000 tokens. While many models claim "long-context" support, their reasoning and retrieval capabilities degrade sharply as context length scales. This study evaluates several state-of-the-art models, revealing that even top-tier proprietary models like GPT-4 struggle with complex reasoning tasks at these lengths, while open-source models often fail entirely.

Introduction

In the race for LLM supremacy, "context window" size has become a headline feature. Models like Claude 2 and Kimi-Chat claim to process up to 200K tokens—roughly the length of two average novels. However, evaluation has lagged behind, with most existing benchmarks focusing on contexts around 10K to 20K tokens. A large window does not guarantee understanding; there is a significant gap in verifying if a model can actually reason over a 100K+ token document or if it simply ignores the middle. ∞BENCH was created to fill this gap, providing a standardized, multi-domain, bilingual stress test for the 100K+ token era.

Methodology

The researchers developed ∞BENCH, a suite of 12 tasks spanning five domains: retrieval, code, math, novels, and dialogue. The benchmark consists of 3,946 examples with an average length of ~200K tokens. To ensure the benchmark truly tests long-context capabilities, several novel strategies were employed:

  • Synthetic & Realistic Tasks: Combining simple "needle-in-a-haystack" retrieval tasks with realistic scenarios like debugging large code repositories or summarizing novels.
  • Key Entity Replacement: To prevent models from "cheating" by using knowledge of famous books from their training data, the authors created "fake novels" by programmatically replacing character names and locations.
  • Diverse Reasoning Requirements: Tasks were categorized into "Aggregation" (compiling info scattered throughout the text) and "Filtering" (finding specific info in a sea of noise).
  • Context Recalling: Testing a prompting technique where the model repeats the relevant part of the context before answering to see if explicit attention improves performance.

Results and Analysis

The study compared proprietary models (GPT-4, Claude 2, Kimi-Chat) against open-source alternatives (YaRN-Mistral, Yi, ChatGLM3, and MiniCPM).

Performance of various LLMs across the 12 tasks in ∞BENCH.

The Performance Cliff

Model performance is not linear. As context length increases from 1K to 100K+, accuracy on tasks like Math.Find or Code.Run drops precipitously, even for models technically capable of "holding" that much data.

Scores of GPT-4, YaRN-Mistral, and Kimi-Chat as context length increases across different domains.

Key Findings

  • Retrieval vs. Reasoning: Models are getting quite good at simple retrieval (e.g., finding a 5-digit passkey), but they still largely fail at sequential processing tasks like Math.Calc.
  • Proprietary vs. Open-Source: There is a massive gap. Proprietary models significantly outperformed open-source alternatives, which often exhibited "almost random" performance on the longest contexts.
  • The Power of "Context Recalling": Explicitly asking a model to "locate and repeat" the relevant code before debugging it improved GPT-4's accuracy on Code.Debug from 15.74% to 37.06%.

Conclusion

∞BENCH reveals that while context windows are expanding, the utility of that space for complex reasoning remains limited. GPT-4 remains the current leader but is far from perfect on realistic long-range tasks. Future work must address high evaluation costs, scoring sensitivity, and the push toward the 1M token frontier, focusing on both reasoning depth and computational efficiency.

Summary updated

BibTeX
@inproceedings{zhang2024nftybench,
  author = {Xinrong Zhang and Yingfa Chen and Shengding Hu and Zihang Xu and Junhao Chen and Moo Khai Hao and Xu Han and Zhen Leng Thai and Shuo Wang and Zhiyuan Liu and Maosong Sun},
  title = {{ınftyBench: Extending Long Context Evaluation Beyond 100K Tokens}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.814},
}
Figure