Contextual Representation Flow Across Depth in State-Space and Transformer Architectures
cs.CL, cs.LG
Submitted: 2025-10-08
Updated: 2026-10-13
License: http://creativecommons.org/licenses/by-sa/4.0/
The gist: State Space Models (SSMs) have emerged as efficient, linear-time alternatives to Transformer-Based Models (TBMs) for long-context processing.
Terminology
Abstract
State Space Models (SSMs) have emerged as efficient, linear-time alternatives to Transformer-Based Models (TBMs) for long-context processing. However, their different mechanisms raise an important question: how does contextual representation flow across depth differ between these model families and their hybrids? We examine this question across twenty-one pretrained models, combining token-wise spectral diversity, layer-wise variation on seven datasets, and answer-location probing on two retrieval tasks. This joint analysis reveals that TBMs retain most of their token diversity at the output, whereas SSMs reach richer intermediate diversity but retain less of it on average, with late-layer compression. Comparisons with reinitialized weights reveal that these profiles depend on pretrained weights, while hybrids combine strong answer-location accessibility with architecture-dependent geometry, showing that high accessibility need not require the steadiest representation flow. Finally, we conduct theoretical case studies connecting these contrasts to mechanism-level differences: query-time token mixing in TBMs, repeated recurrent updates in SSMs, and preserved attention updates in hybrids.
Sources
- The Hidden Attention of Mamba Models
- Longformer: The Long-Document Transformer
- Stuffed Mamba: Oversized States Lead to the Inability to Forget
- Not All Layers of LLMs Are Necessary During Inference
- The Pile: An 800GB Dataset of Diverse Text for Language Modeling
- Gaussian Error Linear Units (GELUs)
- A Comprehensive Survey on Long Context Language Modeling
- Does Representation Matter? Exploring Intermediate Layers in Large Language Models
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering