Data Distribution Matters: A Data-Centric Perspective on Context Compression for Large Language Model
Kangtao Lv, Jiwei Tang, Langming Liu, Haibin Chen, Weidong Zhang, Shilei Liu, Yongwei Wang, Yujin Yuan, Wenbo Su, Bo Zheng
TL;DR
This paper argues that data distribution, not just model architecture, dictates the effectiveness of context compression for long-context LLMs. It introduces an autoencoder framework trained from scratch across multiple data distributions to separately probe input entropy and intrinsic data gaps between encoder and decoder. Key findings show encoder-derived entropy harms compression, decoder priors bias complexity assessments, and that alignment with the decoder’s intrinsic data distribution is the most impactful factor, often outweighing pure model scaling. The work provides practical guidelines—prioritize decoder-aligned data and allocate more compute to the decoder—to achieve better, more data-efficient compression in real-world long-context tasks. Overall, it shifts context compression research toward data distribution awareness, with implications for RAG, ICL, and large-scale code or math domains.
Abstract
The deployment of Large Language Models (LLMs) in long-context scenarios is hindered by computational inefficiency and significant information redundancy. Although recent advancements have widely adopted context compression to address these challenges, existing research only focus on model-side improvements, the impact of the data distribution itself on context compression remains largely unexplored. To bridge this gap, we are the first to adopt a data-centric perspective to systematically investigate how data distribution impacts compression quality, including two dimensions: input data and intrinsic data (i.e., the model's internal pretrained knowledge). We evaluate the semantic integrity of compressed representations using an autoencoder-based framework to systematically investigate it. Our experimental results reveal that: (1) encoder-measured input entropy negatively correlates with compression quality, while decoder-measured entropy shows no significant relationship under a frozen-decoder setting; and (2) the gap between intrinsic data of the encoder and decoder significantly diminishes compression gains, which is hard to mitigate. Based on these findings, we further present practical guidelines to optimize compression gains.
