Layer by Layer: Uncovering Hidden Representations in Language Models
Abstract
From extracting features to generating text, the outputs of large language models (LLMs) typically rely on their final layers, following the conventional wisdom that earlier layers capture only low-level cues. However, our analysis shows that intermediate layers can encode even richer representations, often improving performance on a wide range of downstream tasks. To explain and quantify these hidden-layer properties, we propose a unified framework of representation quality metrics based on information theory, geometry, and invariance to input perturbations. Our framework highlights how each model layer balances information compression and signal preservation, revealing why mid-depth embeddings can exceed the last layer’s performance. Through extensive experiments on 32 text-embedding tasks across various architectures (transformers, state-space models) and domains (language, vision), we demonstrate that intermediate layers consistently provide stronger features, challenging the standard view on final-layer embeddings and opening new directions on using mid-layer representations for more robust and accurate representations.
Cite
Text
Skean et al. "Layer by Layer: Uncovering Hidden Representations in Language Models." Proceedings of the 42nd International Conference on Machine Learning, 2025.Markdown
[Skean et al. "Layer by Layer: Uncovering Hidden Representations in Language Models." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/skean2025icml-layer/)BibTeX
@inproceedings{skean2025icml-layer,
title = {{Layer by Layer: Uncovering Hidden Representations in Language Models}},
author = {Skean, Oscar and Arefin, Md Rifat and Zhao, Dan and Patel, Niket Nikul and Naghiyev, Jalal and Lecun, Yann and Shwartz-Ziv, Ravid},
booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
year = {2025},
pages = {55854-55875},
volume = {267},
url = {https://mlanthology.org/icml/2025/skean2025icml-layer/}
}