You Do Not Fully Utilize Transformer's Representation Capacity

Gleb Gerasimov, Yaroslav Aksenov, Nikita Balagansky, Viacheslav Sinii, Daniil Gavrilov · OpenReview

Abstract

In contrast to RNNs, which compress previous tokens into a single hidden state, Transformers can attend to all previous tokens directly. However, standard Transformers only use representations from the immediately preceding layer. In this paper, we show that this design choice causes representation collapse and leads to suboptimal performance. To address this issue, we introduce Layer-Integrated Memory (LIMe), a simple yet powerful approach that preserves the model's overall memory footprint while expanding its representational capacity by allowing access to hidden states from earlier layers. Through extensive experiments across various architectures and different lookup mechanisms, we demonstrate consistent performance improvements on a wide range of tasks. Moreover, our analysis of the learned representation dynamics and our exploration of depthwise circuits reveal how LIMe integrates information across layers, pointing to promising directions for future research.

Introduction: The Representational Bottleneck

In a standard Transformer decoder, information flows through a single "residual stream." Each layer receives a vector from the layer immediately below it, processes it, and passes it to the layer above. This creates a representational bottleneck: every layer must compress all previously learned features into that single vector.

As models get deeper, this leads to representation collapse. Subtle distinctions between tokens (e.g., the difference between "is" and "was" in a long sentence) get "squeezed out" by finite numerical precision and limited hidden-state capacity. We argue that current architectures do not fully utilize the Transformer's capacity because they force the model to blur information as it moves up the stack.

Layer-Integrated Memory (LIMe)

We propose Layer-Integrated Memory (LIMe) to address this bottleneck. Instead of the standard Multi-Head Attention (MHA) where Queries, Keys, and Values ($Q, K, V$) are all derived from the current layer's input, LIMe changes how $K$ and $V$ are handled:

  1. KV Buffering: The model maintains a buffer of the Key and Value tensors produced by every previous layer. This reuses the KV buffers already allocated for inference, adding almost no extra memory footprint.
  2. Inter-Layer Routing: Each attention head at every layer has a trainable "router" that learns to dynamically mix the buffered KV representations from all earlier layers.
  3. Integrated Attention: The current layer’s Queries attend to this "integrated" mixture of past representations rather than just the current layer's Keys and Values.

This allows a head in deep layers to directly "reach back" and grab specific features from early layers that might have been lost in the standard residual stream.

Visualizing Representation Collapse

One of the most striking findings is the difference in how tokens are represented in deep layers. In standard LLaMa-style architectures, similar tokens (like "is," "are," "was," "were") eventually collapse into indistinguishable clusters. In contrast, LIMe maintains high separability and diversity in its internal representations.

t-SNE visualizations showing that LIMe preserves token separability in deep layers (15-16) while standard LLaMa representations collapse.

Our analysis shows that LIMe maintains significantly higher Renyi entropy in its "Value" states. By analyzing learned routing weights, we found that final layers frequently reach back to the very first layers to revisit shallow, morphological features that the residual stream would otherwise discard.

Key Results and Efficiency

LIMe demonstrates significant gains in both training efficiency and downstream task performance:

  • Faster Convergence: LIMe converges 15.3% faster in terms of FLOPs and achieves lower perplexity than 1B-parameter baselines.
  • Reasoning Power: On complex tasks like the 6-operand Arithmetic Expression Task (AET), LIMe achieved 71.6% accuracy, compared to the LLaMa baseline's 41.3%.
  • Depth Efficiency: A 64-layer LIMe model outperforms a 128-layer standard LLaMa model, suggesting that improving information flow is more effective than simply increasing depth.
Training loss vs. FLOPs demonstrating that LIMe GQA achieves lower loss and faster convergence than the LLaMa GQA baseline.

Conclusion and Limitations

LIMe opens the door for "latent-space reasoning," where models perform complex internal computations across layers rather than just token-by-token. While highly efficient on single GPUs, future work must address potential communication overhead in pipeline-parallel setups where layers need access to KV states from many previous stages. Nonetheless, LIMe provides a scalable path toward fully utilizing the representational capacity of the Transformer architecture.

Summary updated

BibTeX
@misc{gerasimov2025you,
  author = {Gleb Gerasimov and Yaroslav Aksenov and Nikita Balagansky and Viacheslav Sinii and Daniil Gavrilov},
  title = {{You Do Not Fully Utilize Transformer's Representation Capacity}},
  year = {2025},
  eprint = {2502.09245},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.09245},
}
Figure