Skip to content

Research

Research
May 2026PKBoost AI Labs · Preprint

Investigating Trajectory-Conditioned Semantics and Dynamic Computational Pathways in GPT-2-Small

Pushp Kharat, Atul Saxena

In plain terms

The intuitive story is that attention heads rewire themselves depending on context. We tested it and it is not what happens. Heads have fixed behaviour; the flexibility comes from which combination of them gets recruited, communicating through the shared residual stream.

//Abstract

A mechanistic-interpretability study of how GPT-2-small routes and represents semantic concepts. It tests two hypotheses: that semantic behaviour depends on the activation trajectory rather than the current state alone, and that meaning emerges from context-sensitive interactions between attention heads. Uses activation patching, pathway perturbation and directional decomposition across six semantic categories.

//What it found

  • Individual attention heads do not dynamically rewire across contexts — their behaviour is fixed.
  • Direct head-to-head pathways carry little causal significance; the residual stream does the routing.
  • Roughly 27.3% of semantic divergence between convergent prompt trajectories cannot be predicted from single-position residual-stream similarity.
  • Proposes a "combinatorial recruitment" model: fixed-behaviour heads communicating through a shared residual stream.

//Methods

  • Activation patching
  • Pathway perturbation
  • Directional decomposition
  • Probing classifiers
  • Ablations

//Keywords

  • mechanistic interpretability
  • transformers
  • GPT-2
  • representation learning
  • attention heads
  • residual stream