[Paper Review] Transformer on a Diet
This paper proposes three lightweight Transformer architectures—dilated Transformer, dilated Transformer with memory, and cascade Transformer—that reduce computational complexity by preserving only essential long- and short-range dependencies. The lightest variant reduces parameters by 70% while achieving competitive perplexity on language modeling benchmarks, demonstrating efficient inference without sacrificing performance.
Transformer has been widely used thanks to its ability to capture sequence information in an efficient way. However, recent developments, such as BERT and GPT-2, deliver only heavy architectures with a focus on effectiveness. In this paper, we explore three carefully-designed light Transformer architectures to figure out whether the Transformer with less computations could produce competitive results. Experimental results on language model benchmark datasets hint that such trade-off is promising, and the light Transformer reduces 70% parameters at best, while obtains competitive perplexity compared to standard Transformer. The source code is publicly available.
Motivation & Objective
- To design efficient Transformer architectures that reduce computational cost while maintaining competitive performance on sequence modeling tasks.
- To explore whether pruning redundant connections in standard Transformers can preserve long-range and local dependencies effectively.
- To enable practical deployment of Transformers in resource-constrained environments by minimizing model size and inference cost.
- To evaluate the trade-off between model efficiency, parameter count, and performance on standard language modeling benchmarks.
Proposed method
- Introduce dilated connections in self-attention layers using exponential dilation factors to extend effective receptive field while reducing computation from O(n²) to O(nk).
- Enhance long-range modeling by caching outputs from previous dilated layers, enabling richer context retention in dilated Transformer with memory.
- Apply cascade connections that aggregate features from multiple previous layers to intensify local context modeling in the cascade Transformer.
- Use shared hyperparameters across models (e.g., hidden size 2000, 16 heads, dropout 0.4/0.2) and train with SGD and truncated backpropagation for consistency.
- Design architectures that maintain residual connections and layer normalization for stability, while reducing the number of attention computation paths.
- Evaluate all models on PTB and WT-2 datasets using perplexity as the primary metric, comparing parameter count and inference efficiency.
Experimental results
Research questions
- RQ1Can a reduced-connection Transformer architecture maintain competitive performance on language modeling tasks?
- RQ2To what extent can computational complexity be reduced from O(n²) to O(n) without significant performance drop?
- RQ3Which architectural design—dilated, memory-augmented, or cascade—best preserves long-range and local dependencies in a lightweight form?
- RQ4How does parameter reduction correlate with perplexity degradation across different light Transformer variants?
Key findings
- The cascade Transformer achieves perplexity very close to the full Transformer, indicating that local context modeling is crucial for language modeling.
- The dilated Transformer with memory achieves a 70% reduction in parameters compared to the standard Transformer, with only moderate performance degradation.
- All light Transformer variants significantly reduce computation cost, with complexity scaling linearly as O(nk) instead of O(n²).
- The lightest architecture (dilated Transformer) reduces model size by 70% while maintaining competitive perplexity, making it highly suitable for deployment in constrained environments.
- The results suggest a viable trade-off between model efficiency and performance, enabling deployment of large-scale language models in edge or low-resource settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.