[Paper Review] LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding
LongBench is the first bilingual, multitask benchmark for long-context understanding, testing English and Chinese across 21 tasks and ~4,750 test instances to evaluate LLMs on long documents, with automated ROUGE-L and F1 metrics. The paper analyzes model performance, context length effects, and retrieval/summarization-based context compression.
Although large language models (LLMs) demonstrate impressive performance for many language tasks, most of them can only handle texts a few thousand tokens long, limiting their applications on longer sequence inputs, such as books, reports, and codebases. Recent works have proposed methods to improve LLMs' long context capabilities by extending context windows and more sophisticated memory mechanisms. However, comprehensive benchmarks tailored for evaluating long context understanding are lacking. In this paper, we introduce LongBench, the first bilingual, multi-task benchmark for long context understanding, enabling a more rigorous evaluation of long context understanding. LongBench comprises 21 datasets across 6 task categories in both English and Chinese, with an average length of 6,711 words (English) and 13,386 characters (Chinese). These tasks cover key long-text application areas including single-doc QA, multi-doc QA, summarization, few-shot learning, synthetic tasks, and code completion. All datasets in LongBench are standardized into a unified format, allowing for effortless automatic evaluation of LLMs. Upon comprehensive evaluation of 8 LLMs on LongBench, we find that: (1) Commercial model (GPT-3.5-Turbo-16k) outperforms other open-sourced models, but still struggles on longer contexts. (2) Scaled position embedding and fine-tuning on longer sequences lead to substantial improvement on long context understanding. (3) Context compression technique such as retrieval brings improvement for model with weak ability on long contexts, but the performance still lags behind models that have strong long context understanding capability. The code and datasets are available at https://github.com/THUDM/LongBench.
Motivation & Objective
- Define a comprehensive bilingual benchmark for long-context understanding across multiple tasks and domains.
- Standardize data into a unified format for automated evaluation.
- Assess how current LLMs perform on long documents and how context length impacts performance.
Proposed method
- Assemble 21 tasks across six categories (single-doc QA, multi-doc QA, summarization, few-shot learning, synthetic tasks, code completion) in English and Chinese.
- Standardize datasets into a unified evaluation format with automatic metrics (ROUGE-L, F1, EM, CLS accuracy).
- Create LongBench-E with more even length distribution to study performance across context lengths.
- Evaluate eight long-context LLMs under zero-shot and few-shot settings, including GPT-3.5-Turbo-16k and various open models.
- Investigate context compression techniques (retrieval-based and summarization-based) and their impact across models.
- Examine memorization vs. true long-context understanding by comparing performance with and without provided context.
Experimental results
Research questions
- RQ1How do current LLMs perform on long-context tasks across multiple languages and domains?
- RQ2What is the impact of increasing context length on model performance in LongBench and LongBench-E?
- RQ3Do retrieval-based or summarization-based context compression methods consistently improve long-context understanding, and for which models?
- RQ4To what extent do models rely on memorization versus genuine long-context understanding on long-document tasks?
Key findings
- Commercial GPT-3.5-Turbo-16k generally outperforms open models but still struggles with very long contexts.
- Scaling positional embeddings and fine-tuning on longer sequences yields substantial gains in long-context understanding for some models.
- Retrieval-based context compression helps weaker-long-context models but does not fully bridge the gap to stronger long-context capabilities.
- Summarization-based compression can aid certain long and very long tasks but shows limited overall benefit across the benchmark.
- LongBench-E reveals that even models trained or fine-tuned on long contexts can show sharp performance drops as context length increases, highlighting genuine long-context challenges.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.