[Paper Review] Foundation Transformers
This paper introduces Magneto, a Foundation Transformer variant that unifies architecture and training stability across language, vision, speech, and multimodal tasks. By proposing Sub-LayerNorm and a theoretically grounded initialization strategy, Magneto achieves superior performance and enhanced training stability compared to de facto Transformer variants like BERT, GPT, ViT, and BEiT-3.
A big convergence of model architectures across language, vision, speech, and multimodal is emerging. However, under the same name "Transformers", the above areas use different implementations for better performance, e.g., Post-LayerNorm for BERT, and Pre-LayerNorm for GPT and vision Transformers. We call for the development of Foundation Transformer for true general-purpose modeling, which serves as a go-to architecture for various tasks and modalities with guaranteed training stability. In this work, we introduce a Transformer variant, named Magneto, to fulfill the goal. Specifically, we propose Sub-LayerNorm for good expressivity, and the initialization strategy theoretically derived from DeepNet for stable scaling up. Extensive experiments demonstrate its superior performance and better stability than the de facto Transformer variants designed for various applications, including language modeling (i.e., BERT, and GPT), machine translation, vision pretraining (i.e., BEiT), speech recognition, and multimodal pretraining (i.e., BEiT-3).
Motivation & Objective
- Address the lack of a unified, general-purpose Transformer architecture across diverse modalities and tasks.
- Overcome training instability in large-scale Transformer models, especially during scaling.
- Develop a single backbone architecture that performs well across language, vision, speech, and multimodal applications without task-specific tuning.
- Ensure training stability through theoretically derived initialization and architectural innovations.
- Enable larger learning rates and more robust optimization across diverse downstream tasks.
Proposed method
- Propose Sub-LayerNorm (Sub-LN), which adds an extra LayerNorm before both input and output projections in each sublayer (self-attention and feed-forward networks).
- Introduce a novel initialization scheme derived from DeepNet (Wang et al., 2022a), with modulated gain values based on model depth and architecture type.
- Apply the initialization to all linear projections in the Transformer blocks, with different gain factors for query/key projections versus feed-forward and output projections.
- Use the same architecture and initialization across all modalities—language, vision, speech, and multimodal—without architectural re-tuning.
- Train models end-to-end with standard optimization procedures, leveraging the stability from Sub-LN and initialization to allow higher learning rates.
- Evaluate the method across diverse tasks: masked language modeling (BERT), causal language modeling (GPT), machine translation, masked image modeling (BEiT), speech recognition (T-T), and vision-language pretraining (BEiT-3).
Experimental results
Research questions
- RQ1Can a single Transformer architecture achieve state-of-the-art performance across language, vision, speech, and multimodal tasks without architectural specialization?
- RQ2Does Sub-LayerNorm improve expressivity and optimization stability compared to Post-LN and Pre-LN variants?
- RQ3Can a theoretically grounded initialization strategy ensure stable training during scale-up, especially for deeper models?
- RQ4Does the proposed Foundation Transformer allow higher learning rates without divergence, improving training efficiency?
- RQ5Can the unified architecture outperform modality-specific variants in multimodal pretraining, such as in vision-language tasks?
Key findings
- Magneto outperforms the Pre-LN baseline by 0.4% and 0.6% on ImageNet validation for 12-layer and 24-layer models, respectively, and surpasses ViT across ImageNet variants.
- On ADE20k semantic segmentation, Magneto achieves 52.2% mIoU (12-layer) and 54.6% mIoU (24-layer), outperforming vanilla ViT by 0.8% and 1.0% respectively.
- In speech recognition (LibriSpeech 960h), Magneto reduces WER by over 6% compared to the Pre-LN baseline in both 18L and 36L settings.
- On vision-language tasks, Magneto improves VQA accuracy by 0.5% on the test-standard split and NLVR2 accuracy by 0.8% on the test set compared to Pre-LN.
- Magneto allows a maximum learning rate of 3e-3 for 36L models, while the Pre-LN baseline is limited to 1.5e-3, demonstrating superior optimization stability.
- The model maintains consistent performance gains across all evaluated modalities, confirming its role as a true general-purpose foundation architecture.
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.