Evaluating Language Model Context Windows: A "Working Memory" Test and Inference-time Correction
Amanda Dsouza, Christopher Glaze, Changho Shin, Frederic Sala

TL;DR
This paper introduces SWiM, a new benchmark for evaluating long context language models, revealing performance degradation in middle-of-context information, and proposes medoid voting as an effective correction method.
Contribution
The paper presents SWiM, a novel evaluation framework for long context models, and introduces medoid voting, a simple inference-time correction technique to improve accuracy.
Findings
Performance drops when information is in the middle of the context.
Medoid voting improves accuracy by up to 24%.
Even strong models like GPT-4 are affected by the lost-in-the-middle effect.
Abstract
Large language models are prominently used in real-world applications, often tasked with reasoning over large volumes of documents. An exciting development in this space is models boasting extended context capabilities, with some accommodating over 2 million tokens. Such long context model capabilities remain uncertain in production systems, motivating the need to benchmark their performance on real world use cases. We address this challenge by proposing SWiM, an evaluation framework that addresses the limitations of standard tests. Testing the framework on eight long context models, we find that even strong models such as GPT-4 and Claude 3 Opus degrade in performance when information is present in the middle of the context window (lost-in-the-middle effect). Next, in addition to our benchmark, we propose medoid voting, a simple, but effective training-free approach that helps…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques
MethodsAttention Is All You Need · Linear Layer · Multi-Head Attention · Softmax · Residual Connection · Byte Pair Encoding · Layer Normalization · Label Smoothing · Adam · Dropout
