TL;DR
When splitting transformer models across edge devices and the cloud, compressing intermediate representations is vital to save bandwidth. However, this paper reveals a counterintuitive phenomenon: unlike convolutional networks, deeper layers in transformers become progressively harder to compress. By combining rate-distortion theory with the theory of usable information, the authors explain this behavior and demonstrate that early split points yield massive compression gains (up to 98.8%) with zero loss in model performance.
What Problem Does This Paper Address?
Large language models (LLMs) and Vision Transformers (ViTs) are notoriously resource-intensive, making it difficult to run inference entirely on resource-constrained edge or IoT devices. A popular workaround is split inference (or collaborative intelligence), where the edge device executes the first few layers of a model and transmits the intermediate features to a powerful cloud server to finish the computation.
To make this practical, these intermediate features must be heavily compressed to minimize transmission latency and bandwidth. In traditional Convolutional Neural Networks (CNNs), features become more abstract and easier to compress as you go deeper into the network. However, in transformers, the opposite happens: deeper representations require more bits to compress for the same target accuracy. This paper investigates the theoretical and practical reasons behind this mystery.
Methods
The authors formalize the split inference pipeline by introducing a quantization and learned compression bottleneck between two distributed transformer modules.
To evaluate how different compression complexities affect performance, they implement three distinct learning-based entropy models:
- Deep Factorized Density Model: A relatively simple multi-layer perceptron (MLP) that acts as a standalone hyper-prior to model data distribution.
- Fourier Basis Density Model: A model that uses a learned Fourier series to approximate the probability density function (PDF) using fewer parameters.
- Direct Access Auto-regressive Model: A highly complex transformer-based entropy model that can directly look at previously coded elements.
To explain the compression degradation in deeper layers, the authors extend the theory of usable information ($V$-entropy). This framework accounts for the fact that practical compression codecs have limited modeling power and computational constraints, creating a "$V$-entropy gap" between theoretical information limits and actual achieved bitrates.
Datasets
The authors evaluate their distributed compression framework across multiple models and modalities using the following datasets:
- OpenWebText: Used for training and evaluating next-token prediction on GPT-2 Small and Pythia-160M language models.
- LAMBADA: Used to test the language models' zero-shot context comprehension and word prediction accuracy under lossy compression.
- ImageNet-1k: Used to evaluate image classification performance on a Vision Transformer (ViT B/16) and a ResNet-34 architecture for comparison.
Key Insights and Ideas
- Dilation of the Feature Space: Why do transformers get harder to compress deeper down? The authors discover that as data flows through a transformer, the feature space undergoes "dilation"—meaning its covariance determinant strictly increases. In contrast, a ResNet's feature space contracts with depth. This expansion makes the distribution inherently more complex and harder for an entropy model to predict.
- The Complexity Paradox: Counterintuitively, more complex entropy models (like the auto-regressive or Fourier models) perform worse than the simplest deep factorized model. The authors prove mathematically that the high complexity of deeper transformer representations degrades the generalization bound of the entropy models, causing complex codecs to overfit and underperform.
- Usable Information vs. Shannon Entropy: While the classical Data Processing Inequality states that information cannot increase down a processing chain, practical codecs are bound by a specific "predictive family." The usable information actually decreases (and required bitrate increases) because the data structure becomes too intricate for the codec to efficiently parse.
Key Results
- 98.8% Compression at Early Layers: Compressing intermediate features at an early split point (Layer 3 of GPT-2) allowed the authors to reduce the representation from 12,288 bits/token to just 150 bits/token with absolutely no penalty to the model's output perplexity.
- Deeper Means Higher Bitrates: Moving the split point from Layer 3 to Layer 9 significantly degraded the rate-distortion performance. Deeper layers required a substantially higher bitrate to maintain acceptable perplexity and accuracy.
- Simpler Codecs Win: At Layer 6, the simplest deep factorized model outperformed the Fourier basis and direct access models, saving 88.87% and 19.89% BD-rate, respectively.
- Empirical Proof of Dilation: Measurements across GPT-2, Pythia, and ViT confirmed that both the covariance determinant and Rademacher complexity increase with depth in transformers, while they decrease or flatten in CNNs like ResNet.
Limitations and Future Work
While the paper provides an elegant explanation for transformer feature dilation, it focuses primarily on standard decoder-only language models and basic ViTs split into two sections. Future work is needed to see how these insights apply to multi-device pipelining or encoder-decoder architectures (like T5).
Additionally, because current learned codecs assume a continuous distribution before quantization, they inherently struggle with dilated feature spaces. The authors suggest that future research should focus on designing alternative codecs with better inductive biases—specifically those that avoid continuous distribution assumptions—to natively counteract feature space dilation without adding harmful model complexity.
Summary updated