Sentinel: Decoding Context Utilization via Attention Probing for Efficient LLM Context Compression

Yong Zhang, Heng Li, Yanwen Huang, Ning Cheng, Yang Guo +4 more
5/29/2025
cs.CLcs.AI
rag

No confident code implementation found for this paper.

Abstract

Retrieval-augmented generation (RAG) often suffers from long and noisy retrieved contexts. Existing context compression methods typically rely on heuristic relevance estimation or supervised compression models rather than on how LLMs utilize retrieved context during inference.

Show full abstract

We propose Sentinel, a lightweight sentence-level compression framework that decodes inference-time contextual utilization behaviors from head-wise attention patterns of frozen LLMs. To ground supervision in retrieval-dependent answering behavior, Sentinel trains a lightweight probe using QA examples where the model succeeds only when retrieved context is available. Sentinel performs compression using only a single non-autoregressive forward pass without dedicated compression training or autoregressive scoring. Empirically, we find that effective contextual utilization signals remain accessible even in compact proxy models. On LongBench, Sentinel with a 0.5B proxy model achieves up to 5$\times$ compression while attaining question-answering performance competitive with compression methods built on 7B-scale models. Despite being trained only on English QA data, Sentinel also generalizes effectively to Chinese and out-of-domain settings.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2025sentinel,
  title  = {Sentinel: Decoding Context Utilization via Attention Probing for Efficient LLM Context Compression},
  author = {Yong Zhang and Heng Li and Yanwen Huang and Ning Cheng and Yang Guo and Yun Zhu and Yanmeng Wang and Shaojun Wang and Jing Xiao},
  year   = {2025},
  eprint = {2505.23277},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.23277v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.23277.svg)](https://codeofpaper.com/paper/2505.23277)

Discussion