NeurIPS 2026QuestionsPapersAreasAboutMarkdown

RCSTAT: A Statistical Framework of Relative Contextualization in Transformers

Debabrata Mahapatra, Shubham Agarwal, Apoorv Saxena, Subrata Mitra

NeurIPS page · Open on the map

Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: relative contextualization, attention mechanisms, model interpretability, key-value cache eviction, statistical framework, RCStat

Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention; Long Context › Long-context mechanisms › KV cache eviction

Summary

RCStat introduces a statistical framework to quantify contextual influence in transformer attention, enabling reliable span-level attribution and efficient key-value cache eviction without retraining.

Explained to a 5-year-old

We want to know which words matter in a computer program that writes sentences. The program uses a special way to look at words, but it's hard to tell which words are really important. The researchers created a new method that measures how much one group of words helps another group to make the program say something. This helps the program explain why it chose certain words and also lets it forget unimportant words to save memory. The method works on many language tasks and makes the program better at understanding and using less memory.

Explained to a 5-year-old, longer

Computers can write sentences like people do. To write well, they need to know which words are important. Right now, they look at words using a method that mixes up importance with how the computer normalizes things. This makes it hard to tell which words really drive the meaning. The researchers invented a way to measure how one group of words influences another group. This measurement is called relative contextualization. It works like a statistic that can be calculated quickly while the computer is running. No extra training is needed, so the computer can use it right away. They used this idea for two tasks: explaining which parts of a sentence matter and for removing unimportant memory to save space. For explaining, the method points out the exact parts of the text that cause the computer to generate a word. For memory, it decides which unimportant pieces can be forgotten, keeping the important ones. The method was tested on many language tasks and made the computer better at understanding and using less memory. It also helped the computer make fewer mistakes when it explained its choices. Overall, the new idea makes language computers smarter and more efficient.

For a technical reader

The paper presents a statistical method to measure how tokens influence each other in transformer attention, avoiding the bias of softmax normalization. It defines a random variable for relative contextualization and provides bounds that can be computed during inference, requiring no model retraining. These bounds are used for two practical tasks: generating faithful explanations of model predictions and adaptively pruning key-value cache entries to reduce memory usage while preserving performance. Experiments on question-answering, summarization, and attribution benchmarks show consistent improvements in generation quality, cache eviction error, and attribution accuracy.

Problem

Current methods infer token importance from attention distributions, but these conflate contextual relevance with softmax normalization, obscuring relative influence across tokens and heads.

Method

The approach defines a random variable for relative contextualization that measures how strongly one subset of tokens contributes to another under the model’s scoring, derives efficient bounds on expected influence estimable at inference, and applies adaptive thresholds for attribution and cache eviction.

Results

The approach improves generation quality by 15-40%, reduces KV eviction error by up to 36%, and raises attribution accuracy by 2-16% across the evaluated benchmarks.

Contributions

It provides a statistical framework for quantifying contextual influence in attention, derives inference-time bounds, and demonstrates its utility for reliable span-level attribution and efficient key-value caching.

Practical relevance

It offers a practical tool for improving model interpretability and efficiency in production language models.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction