cs.CLSep 29, 2026

Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddings

Authors: Zifeng Cheng, Jie Zheng, Zhiwei Jiang, Shuwen Wang, Fei Shen, Shiping Ge, Qing Gu

Organizations: State Key Laboratory for Novel Software Technology, Nanjing University · National University of Singapore · Nanjing University of Posts and Telecommunications

Abstract

Large language models (LLMs) have shown strong potential as training-free text encoders for long-context embeddings. Existing approaches primarily improve information flow under causal attention and typically construct embeddings by uniformly averaging all token representations. However, for long documents, such mean pooling can dilute salient semantic information with abundant redundant or weakly informative content. To this end, we propose SCSP, a training-free framework that leverages semantic compression for informative token selection in long-context embedding. Specifically, SCSP first partitions a document into sentence-aware chunks and appends a semantic compression prompt to each chunk. A prompt-isolated attention mask preserves information flow among document tokens while restricting each prompt to its corresponding local context. We then use the attention patterns elicited by these prompts to estimate token importance, select informative tokens, and aggregate their intermediate-layer representations into the final embedding. Extensive experiments on long-context embedding benchmarks demonstrate that SCSP can be integrated into both zero-shot and fine-tuned models in a plug-and-play manner, consistently improving their performance.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. From Similarity to Structure: Training-free LLM Context Compression with Hybrid Graph Priors

    Apr 25, 2026Yitian Zhou, Chaoning Zhang, Jiaquan Zhang +6Large Language Model CompressionEfficient Long-Context Inference

  2. Beyond Position Bias: Shifting Context Compression from Position-Driven to Semantic-Driven

    May 10, 2026Jiwei Tang, Zhijing Huang, Xinyu Zhang +5Efficient Long-Context InferenceCompact Latent Sensor Tokens