TL;DR
This paper introduces trainable representation pooling, a method to sparsify Transformer models by learning to discard non-informative tokens during the encoding process. By using a novel "Successive Halving Top-k" operator, the authors reduce the quadratic complexity of attention to sublinear, achieving up to a 4.5x speedup in inference and 13x better efficiency in the decoder while maintaining state-of-the-art performance on long-document summarization.
What Problem Does This Paper Address?
The "original sin" of the Transformer architecture is its quadratic memory and time complexity relative to the input sequence length ($O(n^2)$). As we try to process longer documents—like scientific papers or legal contracts—the computational cost becomes prohibitive.
While many "efficient Transformers" (like Longformer or BigBird) address this by limiting attention connectivity (e.g., only looking at nearby tokens), they generally still process every single token at every layer. The authors argue that not all tokens are equally useful for a given task. By identifying and removing "non-informative" representations early in the model, we can significantly lighten the computational load for both the encoder and, crucially, the decoder's cross-attention mechanism.
Methods
The core innovation is the Successive Halving Top-k operator. Standard "hard" top-k selection (picking the $k$ highest scores) is non-differentiable, meaning you can't use backpropagation to train the scoring function.
The authors solve this with a "tournament-style" soft selection:
- Scoring: Each token representation is assigned a score via a simple linear layer.
- Tournament: Tokens are compared in pairs. Instead of just picking the winner, the model creates a new representation using a convex combination (a weighted average) of the two, where the weights are determined by a "peaked softmax" of their scores.
- Halving: This process repeats until only the desired $k$ representations remain. This allows gradients to flow back through the scores, making the selection process trainable.
The authors propose two architectural "flavors":
- Transpooler: A single pooling layer is placed after the encoder, reducing the number of tokens passed to the decoder.
- Pyramidion: Pooling is applied gradually after every layer, creating a "pyramid" structure that reduces memory consumption exponentially as the data moves deeper into the network.
Datasets
The models were evaluated on two challenging long-document summarization tasks:
- arXiv: Scientific papers with an average length of ~6,000 words.
- PubMed: Biomedical papers with an average length of ~3,000 words.
These datasets were chosen specifically because their length exceeds the "break-even point" (around 4,000 tokens) where attention calculations begin to dominate the total computational cost.
Key Insights and Ideas
-
Discarding vs. Limiting: Unlike previous sparse models that just limit who a token can talk to, this method completely removes tokens from the computation. This is illustrated in the difference between "Blockwise" and "Pooling" approaches: Toy illustration showing how pooling removes disregarded representations (white dots) from further processing.
-
The Decoder Bottleneck: In many sequence-to-sequence tasks, the decoder's cross-attention is a major bottleneck because it must attend to the entire input for every generated token. By pooling the encoder output down to a smaller set of $k$ representations, the decoder becomes vastly more efficient.
- The "Length Exploiting Hypothesis": The authors suggest that for specific domains (like science), consuming longer inputs provides a stronger training signal. This might allow smaller models trained from scratch to outperform massive, pre-trained models that are limited to shorter contexts (like 512 or 1024 tokens).
Key Results
The DeepPyramidion model achieved impressive results compared to much larger, pre-trained baselines:
- Speed: It was 1.8x faster during training and 4.5x faster during inference than a blockwise baseline.
- Efficiency: The decoder's cross-attention saw a 16x reduction in complexity.
- Performance: On the arXiv dataset, DeepPyramidion (124M parameters) achieved a ROUGE-2 score of 19.99, outperforming models like BigBird-PEGASUS (568M parameters) and performing comparably to SOTA models like PoolingFormer.
- Scaling: As shown in Figure 4, the pooling approach scales much better with network depth than vanilla or blockwise Transformers, which eventually run out of memory.
Limitations and Future Work
- Short Sequences: The authors acknowledge that this method is unlikely to improve processing time for short sequences (e.g., sentence-level translation), as the overhead of the scoring mechanism outweighs the savings.
- Interpretability: Because pooling operates in the latent space (creating weighted averages of tokens), it is difficult to map the "selected" representations back to specific words in the original text.
- Positional Encodings: The current pooling mechanism is not easily compatible with Relative Positional Encodings, a common feature in modern Transformers.
- Language Modeling: Extending this trainable pooling to pure language modeling (where the Markov assumption applies) remains an open research challenge.
Summary updated