TL;DR
This paper investigates how to best scale up encoder-decoder protein language models, finding that Mixture-of-Experts (MoE) architectures offer superior compute efficiency compared to traditional dense models. It also reveals a trade-off between training stability and efficiency for asymmetric encoder-decoder designs, providing crucial guidelines for building more powerful and efficient protein AI.
What Problem Does This Paper Address?
Large language models (LLMs) have revolutionized biology, but current protein language models (PLMs) primarily rely on dense, symmetric architectures. As we push for larger models and more data, the computational cost becomes prohibitive. This paper addresses the need for more efficient scaling strategies, specifically exploring sparse (Mixture-of-Experts or MoE) and asymmetric encoder-decoder architectures, which are less understood in the protein domain compared to natural language processing. The goal is to find optimal scaling laws that balance performance with computational cost for protein sequence modeling.
Methods
The researchers conducted a large-scale empirical study involving over 140 model variants. They trained encoder-decoder Transformer models with varying parameter counts (100M to 3.2B) and compute budgets (8B to 64B tokens). Key aspects of their methodology include:
- Unified Scaling Laws: They derived parametric scaling laws for both dense and MoE models, aiming to capture the relationship between model size, compute, and performance.
- MoE Architecture: They implemented MoE layers by replacing standard feed-forward networks (FFNs) with sparsely activated experts. They explored different numbers of experts and activation strategies.
- Asymmetric Architectures: They investigated encoder-decoder configurations where the number of layers in the encoder and decoder were unequal (e.g., 5-of-6 ratios), hypothesizing that encoder-heavy models might be more beneficial for protein tasks.
- Stability Techniques: To address training instabilities, especially with asymmetric models, they employed techniques like QK LayerNorm and Embedding Gradient Shrinking.
- Representation Analysis: They analyzed the learned representations from MoE models using metrics like Average Cosine Similarity (ACS), Isotropy Score, and Intrinsic Dimensionality (ID) to understand potential issues like "representation collapse."
- Downstream Task Evaluation: Models were evaluated on eight diverse biological tasks (classification and regression) using linear probing on encoder embeddings.
Datasets
The primary dataset used for pre-training was UniRef. The paper mentions that this dataset originally comprised 412M protein sequences and was deduplicated and filtered to exclude sequences longer than 1,000 amino acids. The resulting dataset underwent efficient pre-processing and offline packing, yielding a consolidated dataset of 137M rows and 137B sequence tokens. For downstream tasks, the paper refers to standard datasets used in prior work for tasks like Enzyme Catalytic Activity, GB1 Fitness Prediction, Fold Classification, Metal Ion Binding, Solubility Prediction, Stability Prediction, Cloning Classification, and Material Production.
Key Insights and Ideas
- MoE Dominance: MoE models consistently outperform dense models in terms of scaling efficiency, offering a better compute-performance frontier and lower asymptotic loss limits. This suggests MoE is a promising direction for future large-scale protein models.
- Asymmetric Trade-off: Asymmetric encoder-decoder architectures can accelerate convergence, but they introduce significant training stability challenges. This trade-off needs careful management, especially at intermediate scales.
- Representation Collapse in MoE: MoE models exhibit signs of "representation collapse," with embeddings being more clustered and less diverse than in dense models. This might explain their weaker performance on regression and fine-grained classification tasks.
- Routing Weights as a Solution: Incorporating routing weights (from the MoE router) alongside standard embeddings (MoEE) can significantly improve MoE performance on downstream tasks, suggesting these weights encode valuable information.
- Scale Matters for Asymmetry: The performance of asymmetric models is highly dependent on scale. While they can be unstable at smaller scales (e.g., 500M parameters), they can offer benefits at larger scales when properly stabilized.
Key Results
- Unified Scaling Laws: The paper derives and validates scaling laws for both dense and MoE encoder-decoder models, showing MoE models achieve lower loss for equivalent compute.
- MoE Efficiency: MoE models demonstrate faster convergence and better performance-per-compute compared to dense models. For example, a 500M MoE model achieved a lower validation loss than a 500M dense model using half the tokens and training time.
- Asymmetric Performance: While asymmetric models can accelerate convergence (e.g., 5-of-6 configurations), they also introduce stability issues. At the 1B scale with 64B tokens, stabilized asymmetric models showed faster convergence than symmetric ones. However, performance was inconsistent across scales, with the 500M scale showing notably weaker performance for asymmetric variants.
- Downstream Task Performance: MoE models performed comparably or slightly better on binary classification tasks but underperformed dense models on regression and multi-class classification tasks. This gap was partially attributed to representation collapse.
- MoEE Improvement: Augmenting MoE embeddings with routing weights (MoEE) substantially improved performance on regression and classification tasks, mitigating the negative effects of representation collapse.
Limitations and Future Work
- Representation Collapse Mitigation: While MoEE helps, developing training-time solutions to prevent representation collapse in MoE models remains an open challenge.
- Expert Activation Imbalance: Significant expert activation imbalance was observed on downstream tasks, suggesting a need for more robust routing mechanisms that generalize better to out-of-distribution data.
- Asymmetric Architecture Stability: Asymmetric architectures still exhibit inconsistent benefits and optimization challenges. Future work should focus on more principled approaches to stabilize asymmetric training and realize their potential advantages more reliably.
Summary updated