Abstract
The Subformer is a parameter-efficient Transformer variant designed specifically for generative tasks such as machine translation and abstractive summarization. By integrating a novel contextualized embedding projection, termed Self-Attentive Factorized Embeddings (SAFE), with a "Sandwich-style" weight-sharing scheme, the Subformer achieves state-of-the-art performance while utilizing approximately 40% fewer parameters than standard Transformer architectures. Our evaluations across multiple benchmarks demonstrate that the Subformer not only reduces the "parameter tax" of large-scale models but also maintains or improves generation quality and training efficiency.
Introduction
Transformers have become the cornerstone of modern natural language processing. However, their success comes at a significant computational cost, often referred to as a "parameter tax." While weight-sharing techniques have successfully reduced the footprint of encoder-only models—most notably ALBERT for BERT—applying these methods to generative sequence-to-sequence models typically results in a substantial degradation in accuracy.
The Subformer addresses this gap by identifying that naive weight sharing, where all layers are identical, is ill-suited for generation. In generative models, the input and output layers perform fundamentally different mathematical operations compared to the intermediate layers. The Subformer aims to find an optimal balance, slashing parameter counts without sacrificing the model's representational power for high-quality text generation.
Architecture and Methods
The Subformer introduces three primary structural innovations to enhance parameter efficiency:
1. SAFE (Self-Attentive Factorized Embeddings)
In standard Transformers, the embedding matrix can account for up to 25% of the total parameters. The Subformer factorizes this matrix by using a smaller embedding dimension ($d_e$) and then projecting it to the main model dimension ($d_m$). Unlike traditional linear projections, SAFE utilizes a dedicated, lightweight self-attention layer. This adds necessary context to embeddings before they enter the main model, recovering information typically lost during factorization.
2. Sandwich-style Parameter Sharing
The authors propose a "Sandwich" approach to weight sharing. Instead of sharing weights across all layers, the first and last layers of both the encoder and decoder (the "bread") remain independent. Weight sharing is applied only to the middle layers (the "filling"). This preserves the unique functional requirements of the boundary layers while compressing the bulk of the model.
3. Dimension Disentanglement
The architecture separates three key dimensions: the embedding dimension ($d_e$), the model dimension ($d_m$), and the "sandwich" dimension ($d_s$). This disentanglement allows the shared middle layers to be wider and more expressive without increasing the parameter count of the non-shared layers.
Experimental Setup
The Subformer was evaluated across three distinct generative tasks:
- Machine Translation: WMT’14 English-German (EN-DE) and WMT’16 English-Romanian (EN-RO).
- Abstractive Summarization: CNN-DailyMail, assessing performance on long-form document processing.
- Language Modeling: Wikitext-103, a standard benchmark for next-word prediction.
Key Results and Insights
The Subformer consistently outperformed or matched standard Transformer baselines with significantly fewer parameters.
- Translation Performance: On the WMT’14 EN-DE task, Subformer variants showed superior efficiency. For instance, Subformer-Mid achieved a BLEU score of 28.5 with 63M parameters, outperforming the Transformer-base (27.7 BLEU, 61M parameters).
- Language Modeling: On Wikitext-103, the Subformer achieved a 3.6 lower perplexity than the Transformer-XL model while using 37% fewer parameters.
- Training Efficiency: Due to the reduced number of unique weights, the Subformer often converges up to 65% faster in language modeling tasks compared to standard baselines.
Discussion
A critical finding is the importance of the "bread" layers; keeping the input and output layers independent is vital for maintaining generative quality. Furthermore, the SAFE module proves that contextualized projections can make parameter savings nearly "free" in terms of performance cost. However, a trade-off exists: if the sandwich dimension ($d_s$) is significantly larger than the model dimension, inference latency can increase by 10-30% due to higher FLOP counts, despite the lower unique parameter count.
Conclusion
The Subformer demonstrates that strategic weight sharing and contextualized embedding projections can significantly reduce the parameter requirements of generative Transformers. By focusing on the unique roles of different layers, the Subformer achieves a "sweet spot" of efficiency and performance. Future work will explore scaling these techniques to models with hundreds of billions of parameters and combining them with other compression methods like pruning and quantization.
Summary updated