Burst-Robust Pooling for Soft Context Compression Across Model Scale

Large language models get expensive as their inputs grow, so a common trick is to compress a long document before the model reads it. An encoder model reads the document. Then each window of, say, 4 to 128 consecutive token vectors is squashed into a single "soft token", and the decoder answers questions from these much shorter sequences. The current simple winner just averages each window. Averaging has a known weakness that vision and retrieval researchers documented long ago. When a few vectors in a window repeat the same uninformative content (filler, boilerplate, near-duplicate phrasing), they dominate the average and drown out the one rare vector that carries the answer. This effect is called "burstiness."

We propose replacing the average with generalized max pooling, a closed-form reweighting that gives each distinct piece of content equal influence regardless of how often it repeats. We then ask a question no one has answered: does the right pooling operator change as the model grows from under 1B to 32B parameters and the compression ratio grows from 4x to 128x? The deliverable is a scaling map, not just a new operator. It records where averaging is sufficient, where burst-robust pooling helps, and whether the gap opens or closes with scale.

Core Claim

Simple Context Compression: Mean-Pooling and Multi-Ratio Training motivates this work. It showed that non-overlapping mean-pooling of bidirectionally encoded hidden states beats learned compression tokens across Qwen3-0.6B to 8B, Llama 3.2-1B and Gemma 2-2B, and that larger encoders compress better. It tested only the mean, only up to 8B, and only on 1,024-token contexts, and it names "semantic-aware pooling" as future work.

Our claim is conditional and falsifiable. At high compression ratios and on contexts where redundant distractors outnumber the answer-bearing content, similarity-equalized pooling will retain more answerable information than mean pooling. This advantage is tied to how redundant the window's contents are, which we can measure, rather than to raw sparsity. The open empirical question is the scale trend. Bidirectional contextualization in larger encoders may already spread the rare signal across every vector in the window, which would make the operator irrelevant at 32B. Alternatively, more diffuse representations at scale may make averaging blur more. We do not know which, and the experiment is designed so either answer is informative.

The Operator

Generalized Max Pooling supplies the method. It was introduced for image descriptors: Murray and Perronnin pool a set of local descriptors so that the pooled vector has equal similarity to every descriptor, which suppresses frequent ones. It lifted CUB-2011 fine-grained accuracy from 6.0% to 24.8% over sum pooling. For a window of $n$ token vectors stacked as the columns of $X \in \mathbb{R}^{D \times n}$, the pooled vector is

$$ \phi = X\alpha, \qquad \alpha = (X^\top X + \lambda I)^{-1}\mathbf{1}, $$

where $\mathbf{1}$ is the all-ones $n$-vector and $\lambda > 0$ is a ridge regularizer. Large $\lambda$ makes $\alpha$ nearly uniform, which recovers sum (hence, after rescaling, mean) pooling. Small $\lambda$ down-weights tokens that are similar to many others. The solve is an $n \times n$ system per window, which is negligible next to an encoder forward pass even at 128x. It adds one scalar hyperparameter (or one learned scalar per compression ratio) and no other parameters. The operator is differentiable, so the encoder can be fine-tuned through it exactly as in the mean-pooling recipe.

We deliberately do not center the proposal on plain channel-wise max pooling. Improved Representation Learning for Question Answer Matching found max beat average over LSTM states for matching short questions to long answers. Combining Distant and Direct Supervision for Neural Relation Extraction used max pooling to pick the valid sentence out of a noisy bag. Both support the dilution story, but on small pre-transformer models. Hard max also has two known costs. Its gradient reaches only one element per channel. It cannot tell whether a feature appeared once or a hundred times, and compressed contexts often need counts and multiplicities. Channel max therefore appears as a baseline, not as the proposal.

Research Program

We reproduce the mean-pooling compressor recipe (bidirectional encoder, multi-ratio distillation from an uncompressed teacher) on the Qwen3 family at 0.6B, 1.7B, 4B and 8B with full fine-tuning. We then extend to 14B and 32B. Full fine-tuning at those sizes is beyond a modest budget, so we use low-rank adapters. To keep the scale curve honest, we also rerun the 4B and 8B points with adapters, so the full/adapter switch is visible rather than confounded with scale.

At every scale and at ratios 4x, 16x, 32x and 128x, we swap only the pooling operator and hold data, steps and tuning budget fixed. The training data follows the original in-domain set (SQuAD, NarrativeQA). We evaluate out of domain on AdversarialQA and TriviaQA as in the original paper, on the six-dataset QA suite (NewsQA, SQuAD, SearchQA, HotpotQA, TriviaQA, Natural Questions) used by Context Compression via Explicit Information Transmission, and on the single- and multi-document QA categories of LongBench. LongBench pushes contexts well past 1,024 tokens, which is where dilution should bite.

The mechanism gets its own controlled test. We build a synthetic probe in which a single answer sentence is embedded among distractors. We vary two knobs independently. Sparsity is the fraction of answer-bearing tokens. Redundancy is how many near-duplicate distractor sentences share a window. The theory predicts that generalized max pooling's advantage over the mean tracks redundancy, not sparsity alone.

A paired counting probe asks how many times an entity occurs. It is the case where max-style pooling should lose and where generalized max pooling, which keeps a weighted sum, should not collapse.

As a secondary analysis, we use the linear-versus-nonlinear dimension measures from GEOMETRIC SIGNATURES OF COMPOSITIONALITY ACROSS A LANGUAGE MODEL'S LIFETIME. That work found linear dimension grows with hidden size while nonlinear intrinsic dimension stays near 10 across scale. We compute both measures on pooled soft tokens under each operator to see whether averaging and equalization discard different kinds of structure as models grow.

Baselines

The naive reference points are the uncompressed teacher, which is the ceiling, and truncation to the same token budget, which is the floor. Every result is reported as F1 relative to the teacher at the same scale, matching the relative-F1 framing of the mean-pooling paper.

The strongest direct competitor is non-overlapping mean pooling with bidirectional encoding and multi-ratio training, from Simple Context Compression: Mean-Pooling and Multi-Ratio Training. That paper showed this baseline beats learned compression tokens, and it is the method our operator replaces one-for-one. It is strong precisely because bidirectional attention may already have moved the rare signal into every vector in the window. The file gives its results only as relative-F1 trends in figures, so there is no reported per-dataset result found on Lacuna for it, and we rerun it ourselves under identical settings.

Beating it means a statistically reliable gain in relative F1, measured over three seeds, at 32x or higher on at least the out-of-domain QA sets and the LongBench QA categories, with no loss at 4x.

The strongest structured competitor is ComprExIT. It selects hidden states from several layers with learned gates and coordinates which token goes to which compression slot with an optimal-transport plan. Its reported result is an average F1 improvement of up to 18.5% over soft compression baselines across the six QA benchmarks, with about 1% added parameters. That figure is relative to other baselines, so we rerun it on our backbones at 0.6B through 8B. Its authors could not go beyond that, and we attempt 14B if compute allows.

DAST: Context-Aware Compression in LLMs via Dynamic Allocation of Soft Tokens gives more soft tokens to chunks the model finds informative. It is the strongest allocation competitor. It reports 46.4 on LongBench with Llama-2-7B, 51.6 with Qwen-2-7B, and 51.9 on MSC at 24x versus Beacon's 32.3. It answers a different question (how many tokens per chunk), so it is orthogonal and could be stacked with our operator. We test it alone and stacked, on a 7B-class backbone, to check whether the two gains add up.

Three pooling ablations isolate the key ingredient, which is equalization. The first is a $\lambda$ sweep, which moves continuously from mean to strongly equalized. The second applies the same per-window weight distribution but randomly permuted across tokens, which preserves weight entropy and destroys the similarity structure. The third is channel max, mean-plus-max concatenation, and a learned log-sum-exp pooling whose temperature interpolates mean and max. All pooling variants receive the same hyperparameter search budget.

Why not just…?

Why not just use a bigger model and keep the mean? The mean-pooling paper already shows compression quality rising with encoder size, so the dilution problem might simply vanish at 32B. This is the most serious threat, and the scale curve settles it directly. If the gap between equalized and mean pooling shrinks monotonically toward zero by 32B on both real benchmarks and the high-redundancy synthetic probe, we will report that averaging is sufficient at scale. That is a useful negative result for practitioners choosing compressors.

Why not just concatenate mean and max, or learn a power-mean exponent? These are cheap and could capture most of the benefit, and the learned log-sum-exp variant in particular subsumes both extremes. We include all of them under equal tuning. What separates them from generalized max pooling is the redundancy probe. Elementwise sharpening such as max or power means does not ask whether two tokens are near-duplicates, while equalization does. If the learned power-mean matches equalized pooling across the redundancy sweep, we drop the claim that similarity structure matters and recommend the simpler operator.

Why not just use ComprExIT's optimal transport or DAST's allocation? Both are reported to beat uniform soft compression. However, both add machinery, learned gates and transport plans in one case and perplexity-scoring passes in the other, and neither was evaluated beyond 7–8B. Our operator is a per-window closed-form solve with at most one scalar per ratio. The fair question is therefore how much of their gain a parameter-free change to the pooling step recovers, and whether the gains stack. The stacked DAST run and the direct ComprExIT comparison measure exactly that.

Why not just evict KV-cache tokens instead of pooling? Eviction is a different trade. SCOPE: Optimizing Key-Value Cache Compression in Long-context Generation shows that dropping tokens hurts multi-step reasoning: StreamingLLM scores 29.48 and H2O 50.88 against SCOPE's 56.21 on LONGGENBENCH-4K. We therefore treat eviction as out of scope for the main claim, which concerns how continuous soft compressors should pool.

Decisive Checks

Three outcomes would decide the proposal. If equalized pooling does not beat the mean on the high-redundancy synthetic probe at 8B, the mechanism is wrong and the idea should be abandoned. If it beats the mean on the probe but its real-benchmark gains are matched by the learned power-mean, the contribution reduces to "sharpen the pool," and we say so. If it beats both, and the advantage at 32x–128x holds or grows from 8B to 32B under the adapter-controlled comparison, then the field's default operator for scalable soft compression is mis-chosen exactly where compression matters most. That result would come with a closed-form fix that costs almost nothing to adopt.