Marathon: A Race Through the Realm of Long Context with Large Language Models

Lei Zhang, Yunshui Li, Ziqiang Liu, Jiaxi Yang, Junhao Liu, Min Yang

Abstract

With the advancement of large language models (LLMs) and the expansion of their context windows, existing long-context benchmarks fall short in effectively evaluating the models' comprehension and reasoning abilities in extended texts. Moreover, conventional benchmarks relying on F1 metrics often inaccurately score responses: they may undervalue correct answers that differ from the reference responses and overvalue incorrect ones that resemble the reference texts. In response to these limitations, we introduce Marathon, a novel evaluation benchmark that adopts a multiple-choice question format. It is specifically designed to overcome the constraints of previous benchmarks and provide a rapid, precise, and unbiased appraisal of the long-context comprehension skills of large language models. We conducted comprehensive evaluations on the Marathon benchmark with a range of state-of-the-art LLMs and assessed the effectiveness of various optimization strategies tailored for long-context generation. We anticipate that the Marathon benchmark and its associated leaderboard will enable a more precise and equitable evaluation of LLMs' capabilities in understanding and reasoning over extended contexts.

Introduction: The Precision Trap in Long-Context Evaluation

As Large Language Models (LLMs) expand their context windows to accommodate hundreds of thousands of tokens, evaluating their performance has become increasingly difficult. Traditional benchmarks like LongBench or LooGLE typically rely on free-form answers scored by F1 or ROUGE metrics. This approach often falls into a "precision trap": a model might provide a perfectly correct answer using different wording than the reference text, resulting in a low score, or it might hallucinate a similar-looking but incorrect answer and receive a high score.

Furthermore, processing massive contexts is computationally expensive. While researchers have proposed "shortcuts" such as prompt compression and Retrieval-Augmented Generation (RAG), there has lacked a unified, precise method to measure which of these strategies actually enables a model to reason through a "marathon" of text without losing coherence.

The Marathon Benchmark Methodology

To address these challenges, the authors developed Marathon, a benchmark consisting of 1,530 multiple-choice questions (MCQs). Each question features one correct answer and three meticulously crafted distractors. These distractors were generated using GPT-4 to analyze 12,000-token fragments of long documents, ensuring the decoys are contextually relevant and highly misleading to models with weak reasoning capabilities.

Examples of multiple-choice question formats across different task types in the Marathon benchmark.

The benchmark evaluates 10 leading open-source models (ranging from 6B to 70B parameters) alongside GPT-3.5 and GPT-4 using four distinct strategies:

  1. Vanilla: Raw text input (truncated to the model's maximum window).
  2. LongLLMLingua: A prompt compression technique that removes less informative tokens.
  3. OpenAI Embedding RAG: External retrieval to find the most relevant snippets.
  4. Jina Embedding RAG: An alternative retrieval approach using specialized embeddings.

Dataset Composition

Marathon "reforms" existing high-quality long-context datasets into the MCQ format. It draws primarily from LongBench (for tasks like passage retrieval and summarization) and LooGLE (for complex dependency tasks like timeline reordering and computation). The benchmark covers six task types: Comprehension & Reasoning, Multiple Information Retrieval, Timeline Reorder, Computation, Passage Retrieval, and Short Dependency QA, with context lengths spanning from 2K to over 260K characters.

Key Insights and Performance Analysis

The RAG Advantage

Experimental results show that RAG-based methods consistently outperform prompt compression. By pinpointing specific relevant chunks of text, RAG bypasses the "lost in the middle" phenomenon where models tend to ignore information buried in the center of a long prompt. As shown in the performance data, implementing Jina Embedding RAG provided a massive boost for certain models; for example, Tulu2’s accuracy surged by 23.6% compared to its vanilla performance.

Accuracy comparison of various LLMs using different long-context optimization strategies against ChatGPT and GPT-4 baselines.

Reasoning vs. Retrieval

Models generally excel at "finding a needle in a haystack" (Passage Retrieval) but struggle significantly with "connecting the dots" (Timeline Reordering or Computation). Even when a model can access the entire text, it often fails to perform the logical steps required to sequence events chronologically or perform multi-step calculations.

The Instruction-Following Gap

A significant finding is the disconnect between a model's intelligence and its ability to follow formatting instructions. While models like Longchat followed JSON output instructions 92.29% of the time, the powerful Beluga-70B followed them only 22.48% of the time. This highlights a major weakness in open-source alignment for structured data tasks.

Conclusion and Future Work

While Marathon provides a robust framework for evaluation, the authors acknowledge that context length distribution is currently uneven, with most samples clustering around 130K characters. Future work will focus on Multimodal Long Context, testing the ability to reason across video and image sequences. The researchers also aim to expand the evaluation to include more commercial embedding models like those from Voyage or Cohere to further refine RAG strategies.

Summary updated

BibTeX
@inproceedings{zhang2024marathon,
  author = {Lei Zhang and Yunshui Li and Ziqiang Liu and Jiaxi Yang and Junhao Liu and Min Yang},
  title = {{Marathon: A Race Through the Realm of Long Context with Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=6mGE1iz80D},
}
Figure