[Paper Review] Does Representation Matter? Exploring Intermediate Layers in Large Language Models
This paper investigates intermediate layer representations in large language models (LLMs), demonstrating that they often outperform final-layer representations in downstream tasks. By adapting metrics like prompt entropy, curvature, and augmentation-invariance, the authors reveal that intermediate layers in Transformers exhibit richer, more informative features, including a surprising bimodal entropy pattern not seen in State Space Models (SSMs), highlighting architectural differences in representation learning.
Understanding what defines a good representation in large language models (LLMs) is fundamental to both theoretical understanding and practical applications. In this paper, we investigate the quality of intermediate representations in various LLM architectures, including Transformers and State Space Models (SSMs). We find that intermediate layers often yield more informative representations for downstream tasks than the final layers. To measure the representation quality, we adapt and apply a suite of metrics - such as prompt entropy, curvature, and augmentation-invariance - originally proposed in other contexts. Our empirical study reveals significant architectural differences, how representations evolve throughout training, and how factors like input randomness and prompt length affect each layer. Notably, we observe a bimodal pattern in the entropy of some intermediate layers and consider potential explanations tied to training data. Overall, our results illuminate the internal mechanics of LLMs and guide strategies for architectural optimization and training.
Motivation & Objective
- To understand what defines a 'good' representation in large language models, particularly across intermediate layers.
- To evaluate whether intermediate representations are more informative than final-layer representations for downstream tasks.
- To investigate architectural differences between Transformers and State Space Models (SSMs) in terms of representation dynamics.
- To analyze the impact of input factors—such as randomness, prompt length, and repetition—on representation quality across layers.
- To identify and explore unexpected phenomena, such as bimodal entropy distributions, in intermediate layers.
Proposed method
- Adapted and applied a suite of representation quality metrics—including prompt entropy, curvature, InfoNCE, LiDAR, and DiME—to evaluate intermediate layer representations in LLMs.
- Used matrix-based entropy (linked to RankMe) to quantify the diversity and compression of representations across layers.
- Evaluated models across multiple architectures: Transformers (e.g., LLM2Vec 8B, Pythia 410M) and SSMs (e.g., Mamba 130M) at various training checkpoints.
- Perturbed inputs with controlled variations: token repetition, random token injection, and variable prompt lengths to study robustness and sensitivity.
- Trained and analyzed models on diverse datasets, including WikiText and AI-Medical-Chatbot, to assess generalization and behavior under extreme inputs.
- Conducted ablation studies to isolate causes of bimodal entropy, ruling out prompt length, semantic complexity, and training data overlap as primary drivers.

Experimental results
Research questions
- RQ1Do intermediate layers in LLMs provide better representations for downstream tasks than final layers?
- RQ2How do representation quality metrics like entropy, curvature, and augmentation-invariance vary across different model architectures?
- RQ3What effect do extreme input conditions—such as repetition, randomness, and long prompts—have on intermediate layer representations?
- RQ4Why do certain intermediate layers in Transformers exhibit a bimodal distribution in prompt entropy, and is this behavior absent in SSMs?
- RQ5How does representation quality evolve during training, and which layers contribute most to performance gains?
Key findings
- Intermediate layers consistently outperform final layers in downstream MTEB tasks: LLM2Vec 8B achieved 66.8% average performance on the best layer versus 64.7% on the last layer.
- Pythia 410M showed a 3.5% improvement in average performance when using the best intermediate layer (53.3%) over the final layer (49.8%).
- Mamba 130M, a State Space Model, achieved 50.9% average performance on the best layer versus 46.9% on the final layer, indicating intermediate layers are also critical in SSMs.
- A bimodal entropy distribution was observed in intermediate layers of Transformer models (e.g., on the AI-Medical-Chatbot dataset), but not in SSMs, suggesting a unique architectural trait of Transformers.
- Increased input randomness significantly raised entropy in initial layers, indicating higher sensitivity to input noise in early representations.
- Prompt length caused unnormalized entropy to grow with token count, while normalized entropy showed sublinear growth, suggesting diminishing returns in diversity per additional token.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.