Subjective Depth and Timescale Transformers: Learning Where and When to Compute

Frederico Wieser, Martin Benfeghoul, Haitham Bou Ammar, Jun Wang, Zafeirios Fountas · Submission to ICLR 2026 · Withdrawn

TL;DR

Standard Transformer architectures waste substantial compute by treating every token with the same computational depth. This paper introduces Subjective Depth Transformers (SDT) and Subjective Timescale Transformers (STT), two architectures that borrow principles from predictive coding and neuroscience—specifically Bayesian surprise—to dynamically route tokens through Transformer blocks. By calculating whether a token’s representation changes unexpectedly or matches a predicted update, these models skip computation for predictable tokens, cutting self-attention compute by 75% and KV-cache demands by 50% in conditional layers.

What Problem Does This Paper Address?

In standard autoregressive Transformers, every token passes through every layer, incurring uniform computational cost despite language having highly variable informational density. While conditional compute approaches like Mixture-of-Depths (MoD) use heuristic routing functions to dynamically select a top-$K$ subset of tokens to process, their routing decisions often lack theoretical grounding.

The authors tackle two related challenges:

  1. Finding a principled inductive bias for routing: Instead of arbitrary learned scores, how can a model decide where (across depth) and when (across time) to compute?
  2. Preserving hardware efficiency: Conditional execution often fragments tensor shapes, breaking the static computation graphs preferred by accelerators (e.g., GPUs/TPUs).

Methods

Inspired by cognitive science and predictive coding models (like Variational Predictive Routing), the authors frame token routing as hypothesis testing via Bayesian surprise—approximated as the Mean Squared Error (MSE) between hidden states (derived assuming shared isotropic Gaussian distributions):

  • Expected Change ($CE$): Computation is triggered if a learned prediction explains the state update better than a static assumption ($D_{st} > D_{ch}$).
  • Unexpected Change ($CU$): Computation is triggered if the surprise under a static assumption is unusually large relative to its recent moving average.

The authors propose two architectures:

  1. Subjective Depth Transformers (SDT):
  2. Uses alternating Decision Layers and Dynamic Layers.
  3. A lightweight PriorFFN predicts the full block's output (spatial prior).
  4. A router uses the surprise between the predicted residual and true residual to select top-$K$ tokens to run through the dynamic layer's Transformer block, while unselected tokens bypass it.
  5. Subjective Timescale Transformers (STT):
  6. Moves the prediction into the temporal domain within a single unified layer.
  7. A lightweight Transition Network (TPN) predicts token $t$'s residual from token $t-1$'s processed state.
  8. Both fixed-capacity (top-$K$) and variable-capacity (threshold-based) routing are supported.
  9. Causal Routing for Inference: Because top-$K$ selection over a sequence is inherently non-causal, a lightweight Causal Router (CR) is trained via cross-entropy to mimic routing choices autoregressively during inference.

Datasets

The authors evaluate in a transfer-learning regime, adapting a pre-trained Qwen2.5-0.5B model:

  • Training Corpus: A mixed fine-tuning corpus drawn from standard open datasets: WikiText-103, CNN/DailyMail, US-PD Books, Cosmopedia, SciQ, CodeParrot, and TinyStories (tokenized into 1,024-token contexts).
  • Evaluation Benchmarks: Standard zero- and few-shot commonsense and reasoning benchmarks: MMLU (5-shot), ARC-Challenge (25-shot), HellaSwag (10-shot), WinoGrande (5-shot), and TruthfulQA (0-shot). No new benchmarks were introduced.

Key Insights and Ideas

  • Temporal prediction beats spatial prediction: STT's temporal prior ($x_{t-1} \to \Delta x_t$) achieved substantially lower prediction error than SDT's spatial prior ($x_t \to \Delta x_t$). The preceding token’s representation is a much richer signal for predicting state updates.
  • Bootstrapping mirrors predictive coding: Over training, gating decisions shifted dynamically: early on, novelty-driven unexpected change ($CU$) dominated routing; as the predictive priors matured, prediction-driven expected change ($CE$) took over.
  • Emergence of hierarchical timescales: In the variable-capacity STT, the model learned to process significantly fewer tokens in deeper layers. This mirrors biological hierarchies where earlier layers handle rapid, low-level changes, and deeper layers operate on abstract, slower-evolving representations.
  • Context matters for causal routers: SDT's causal router struggled to predict top-$K$ masks using only single-token states, while STT’s causal router—which conditions on concatenated adjacent states $[x_t^{(l-1)} \parallel x_{t-1}^{(l-1)}]$—learned the routing policy effectively.

Key Results

Experiments evaluated Qwen2.5-0.5B with conditional layers applied every other layer at capacity $\gamma = 0.5$:

  • Compute & Memory Reductions:
  • Fixed-capacity models halved computation in active skipping layers, resulting in an overall 37.5% reduction in self-attention compute and a ~25% reduction in KV-cache size.
  • Dynamic-capacity STT achieved a 35.94% reduction in self-attention FLOPs.
  • Downstream Accuracy:
  • Surprise-based models matched or surpassed the heuristic MoD baseline across multiple tasks. On TruthfulQA, STT reached 48.2% vs. MoD's 43.5%. On ARC-Challenge, dynamic STT scored 27.2% vs. MoD's 24.3%.
  • As expected under a parameter adaptation regime without full-scale pre-training, all conditional compute variants lagged behind the dense baseline (e.g., 43.7% on ARC-C, 55.9% on MMLU).

Limitations and Future Work

  • Transfer-Learning Regime: Models were fine-tuned rather than trained from scratch, preventing the conditional models from fully recovering the performance of the dense baseline.
  • Scale and Hyperparameters: Evaluated on only a single model scale (0.5B parameters) and predominantly a single capacity setting ($\gamma = 0.5$).
  • Lack of Multi-Seed Runs: Results currently lack statistical significance testing across multiple random seeds.
  • Future Directions: Scaling to larger models, pre-training from scratch, investigating layer-normalized cosine similarity instead of MSE for surprise, and exploring explicit depth-wise capacity schedules.

Summary updated

BibTeX
@misc{wieser2025subjective,
  author = {Frederico Wieser and Martin Benfeghoul and Haitham Bou Ammar and Jun Wang and Zafeirios Fountas},
  title = {{Subjective Depth and Timescale Transformers: Learning Where and When to Compute}},
  year = {2025},
  eprint = {2511.21408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.21408},
}
Figure