Introduction
Modern Large Language Models (LLMs) based on the Transformer architecture are often treated as monolithic "black boxes." While they exhibit remarkable emergent behaviors in reasoning and knowledge retrieval, it remains unclear which specific architectural components—self-attention or Multi-Layer Perceptrons (MLPs)—are responsible for these capabilities. This research investigates whether the structure of the Transformer provides an inherent inductive bias that is more critical than the learned weights of its attention mechanism.
By systematically freezing specific components at initialization, the authors reveal a distinct "division of labor": attention mechanisms are primarily responsible for in-context reasoning and retrieval, while MLPs serve as the model's primary knowledge store for memorization.
Methodology: Disentangling the Transformer
To isolate the roles of different layers, the researchers developed a spectrum of model variants based on the Llama architecture. These variants differ in which weights are trained versus those frozen at random initialization:
- Frozen-QK: The Query ($W^Q$) and Key ($W^K$) matrices are frozen at random initialization. Only the Value ($W^V$) matrix and the MLP blocks are trained. This tests if the model can still perform complex attention-based tasks using random projections.
- Frozen-MLP: The weights of the MLP blocks are frozen at initialization, while the attention mechanism is fully trained.
- MixiT (Mixing Transformer): A novel architecture where the entire attention sub-layer is replaced by a fixed, random, input-independent mixing matrix. This removes the model's ability to adapt its attention patterns based on token content.
- Standard Transformer: The fully trainable baseline used for comparison.
To ensure deep models did not suffer from representation collapse (where signals become identical across layers), the authors introduced a principled initialization for MixiT backed by a Covariance Stochastic Differential Equation (SDE) proof, ensuring stable signal propagation.
Key Insights: The Division of Labor
1. Inductive Bias for Induction Heads
Surprisingly, the Frozen-QK variant can still form "induction heads"—specialized circuits that look back at previous tokens to predict the next one. This suggests that the Transformer’s mathematical structure is naturally biased toward these circuits, even without optimized query/key weights. This explains why Frozen-QK performs remarkably well on tasks requiring in-context reasoning.
2. Attention Retrieves, MLP Memorizes
The study found a clear functional split. MixiT (static attention) fails at tasks requiring dynamic retrieval or multi-hop reasoning but excels at memorization and sentiment analysis. Conversely, freezing the MLPs (Frozen-MLP) causes a massive drop in memorization capacity. Specifically, the standard Transformer stores approximately 2.98 bits per parameter, while Frozen-MLP drops to just 1.13 bits, confirming the MLP's role as the primary "knowledge store."
Performance and Efficiency Results
Retrieval and Reasoning
On retrieval-heavy tasks like "Needle in a Haystack," the importance of trainable attention becomes clear as complexity increases. As shown in the performance data, Frozen-QK maintains high accuracy for moderate complexity but eventually degrades, while MixiT collapses much earlier.
Language Modeling and Efficiency
In real-world NLP benchmarks, the results were equally surprising:
- Language Modeling: Frozen-QK achieved a log perplexity of 3.07 on Wikitext-103, remarkably close to the standard Transformer's 2.78, despite having random query/key projections.
- Training Speed: Frozen-QK provided a 23.9% speedup in training throughput. MixiT was even faster (32% speedup) because it eliminates the need for a KV cache during inference.
Conclusion and Future Work
This research demonstrates that the Transformer architecture possesses a powerful inductive bias that allows it to function even with partially random components. The findings suggest that we may be over-parameterizing certain parts of the model while under-utilizing others.
Future work will explore hybrid training schedules—where layers are gradually unfrozen—and investigate how these simplified, more efficient architectures scale to multi-billion parameter models. Additionally, models with fixed components may offer new pathways for AI safety and interpretability, as their internal mechanisms are more constrained and easier to audit.
Summary updated