NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From Attention to Activation: Unraveling the Enigmas of Large Language Models

Prannay Kaul, Chengcheng Ma, Ismail Elezi, Jiankang Deng

Despite the massive success of Large Language Models (LLMs), their internal mechanics remain surprisingly messy. Researchers have recently identified the root causes of two persistent "enigmas" in auto-regressive Transformers: why the first token dominates attention maps, and why massive outlier activations appear in specific hidden channels.

By introducing a modified softmax-1 function and a novel OrthoAdam optimizer, the authors eliminate these anomalies. The result? Models that are significantly easier to quantize to 4-bit precision without losing performance.

The Two Enigmas of LLMs

Two specific issues have long puzzled researchers studying the internal states of LLMs:

  1. Attention Sinks: In auto-regressive models, the very first token (often just a <bos> or "start of sequence" tag) frequently absorbs a massive, disproportionate amount of attention from all subsequent tokens, even when it carries no semantic value.
  2. Outlier Activations: A tiny fraction of feature channels in the hidden states exhibit values orders of magnitude larger than the rest. These outliers make "quantization"—the process of shrinking models to run on cheaper hardware—extremely difficult, as the scale of the entire channel is dictated by a few extreme values.
Visual comparison of attention maps and activation channels between standard models and the proposed models.

The authors sought to understand if these behaviors are strictly necessary for model performance. Finding that they are not, they proposed ways to train "cleaner" models from the ground up.

Proposed Solutions: softmax-1 and OrthoAdam

The paper introduces two primary interventions to address these root causes during training:

  • softmax-1: The authors argue that the standard softmax function forces attention heads to distribute a total score of exactly 1.0 across available tokens. If a head finds nothing relevant to attend to in the context, it must dump that score somewhere. Because of causal masking, the first token is the only one visible to every other token, making it the default "trash can" for unwanted attention. softmax-1 adds a constant 1 to the denominator of the softmax function, effectively allowing the model to "attend to nothing" if no tokens are relevant.
  • OrthoAdam: The authors trace outlier activations back to adaptive optimizers like Adam. Adam tracks gradient moments per-parameter; if a gradient is consistently small, the update step becomes relatively large. This can cause specific weights to explode. OrthoAdam rotates the gradients into a random, fixed orthogonal basis before performing the Adam update, then rotates them back. This spreads the update "energy" across many parameters, preventing any single channel from becoming an outlier.

Key Insights

  • The "No-Op" Hypothesis: First-token dominance isn't a feature; it's a bug caused by the mathematical constraint of softmax. It represents an attention head trying to perform a "no-op" (no operation) because it has found nothing useful in the current context.
  • Causal Privilege: The first token is "privileged" not by its content, but by its position. It is the only key that every query can see, making it the only viable sink for "empty" attention.
  • Basis Dependency: Standard optimizers are "basis-dependent," meaning they treat each coordinate in the weight space independently. By introducing an orthogonal transformation, OrthoAdam makes the optimization process "basis-independent," which naturally suppresses the emergence of coordinate-aligned outliers.

Key Results and Quantization Robustness

The researchers validated their approach by training GPT-2 (60M to 1.4B parameters) and Llama-2 (130M) variants from scratch on the C4 dataset. The proposed methods produced "well-behaved" models with no loss in standard language modeling performance:

  • Attention Distribution: The proportion of attention on the first token dropped massively, from 65% down to 3.3%.
  • Activation Stability: The "kurtosis" (a statistical measure of outliers) in hidden states plummeted from 1657 to 3.1 (where 3.0 represents a clean, normal distribution).

Perhaps the most significant practical takeaway is that outliers are the primary enemy of 4-bit quantization. By preventing outliers during training, the authors achieved near-lossless quantization using basic algorithms that usually fail catastrophically on standard models.

Table showing perplexity (PPL) under FP16 and 4-bit quantization.

Under basic 4-bit weight quantization, the perplexity penalty (a measure of model degradation) dropped from a massive 3565 to just 0.3. Essentially, the "clean" models remained highly functional at 4-bit, while the standard models became entirely unusable.

Limitations and Future Work

While highly effective, these methods must be applied during the pre-training phase. They cannot be used as a post-hoc fix for existing pretrained models like the original Llama 3. Additionally, while the authors describe the computational overhead of OrthoAdam as "tolerable," it does involve additional matrix multiplications during the optimization step, which could impact training wall-clock time at massive scales. Finally, while tested up to 1.4B parameters, the behavior of these methods in "frontier" models (70B+ parameters) remains to be empirically verified, though the mathematical foundations suggest they should scale well.

Summary updated

BibTeX
@inproceedings{kaul2025from,
  author = {Prannay Kaul and Chengcheng Ma and Ismail Elezi and Jiankang Deng},
  title = {{From Attention to Activation: Unraveling the Enigmas of Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=IjduZQK8gM},
}
Figure