Selecting What Matters: Semantic Compression-Guided Selective Pooling for Long-Context Embeddings
Zifeng Cheng, Jie Zheng, Zhiwei Jiang, Shuwen Wang, Fei Shen, Shiping Ge, Qing Gu
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Beyond Compressing Everything: Contrastive Memory Learning for Selective Context CompressionarXiv · 2026
- Aligning LLMs with Sparse Retrieval via Adaptive Sparse SupervisionarXiv · 2026
- From Long Context to Selective Memory:A Survey of Memory-Centric Compression for Large Language ModelsarXiv · 2026
- Rethinking Retrieval in the Long-Context Era: Training-Free Semantic Trees for Adaptive Context ConstructionarXiv · 2026
- Structured sparse attention for accelerating long-context diffusion language modelsFrontiers in Artificial Intelligence · 2026
- You don't need long contextarXiv · 2026