Signatures of human-like processing in Transformer forward passes

Jennifer Hu, Michael A. Lepori, Michael Franke

TL;DR

This paper explores whether the internal workings of Transformer models, specifically their layer-by-layer processing, mirror human cognitive processes. By analyzing model dynamics and comparing them to human behavioral data across various tasks, they found evidence of "two-stage processing" in models, similar to human decision-making under conflict. Crucially, these dynamic model measures offer better predictions of human processing than static model outputs alone, suggesting AI models can serve as explicit models of human cognition.

What Problem Does This Paper Address?

Traditionally, AI models are used to study human cognition by comparing their final outputs (e.g., predictions) to human behavior. However, this "black box" approach overlooks the internal computational processes. Recent advances in AI interpretability allow us to peek inside these models. This paper asks a fundamental question: do the internal processing dynamics of Transformer models, as they compute their outputs layer by layer, resemble how humans process information in real-time? This is important because understanding these internal similarities could unlock new ways to use AI as a tool for cognitive science, moving beyond just predicting outcomes to understanding the underlying mechanisms.

Methods

The authors employ a novel approach that bridges AI interpretability and cognitive science. They analyze the "layer-time dynamics" of Transformer models' forward passes. This involves examining how the model's internal representations and predictions change across each layer.

Key techniques include:

  • Mechanistic Interpretability: Analyzing the internal computations of Transformer models.
  • "Change of Mind" (COM) and "Time to Decision" (TTD) Measures: Novel metrics designed to capture "two-stage processing" in models. COM quantifies how much a model initially favors an incorrect but intuitive answer before settling on the correct one, while TTD marks when the model consistently prefers the correct answer.
  • Dynamic vs. Static Measures: Comparing the predictive power of measures derived from the entire layer-wise computation (dynamic) versus measures derived only from the final layer's output (static).
  • Regression Analysis: Using statistical models (linear mixed-effects models) to assess how well model-derived measures predict human behavioral data.
  • Bayes Factors: Used to determine if dynamic model measures significantly improve predictions over static measures.

Datasets

The study utilizes a variety of existing datasets and tasks to evaluate cognitive processing patterns:

  • Capitals (recall and recognition): Tasks involving recalling or recognizing capital cities, with specific "competitor" items designed to elicit conflict (e.g., a populous incorrect answer competing with the correct one). Human data was collected via Prolific.
  • Animal categories: Categorizing animals, using stimuli from Kieslich et al. (2020), with atypical exemplars designed to create conflict. Human data was collected via mousetracking.
  • Gender bias: Adapting stimuli from Lepori et al. (2025) to create contextual cues that might induce decision conflict.
  • Syllogisms: Judging the logical validity of arguments, using stimuli from Lampinen et al. (2024), with items designed to create conflict between logical validity and prior beliefs.
  • Object recognition: Evaluating out-of-distribution object recognition using datasets from Geirhos et al. (2021).

The paper also evaluates 20 open-source Transformer models (18 language models and 2 vision models) across these domains.

Key Insights and Ideas

  • AI Models Exhibit "Two-Stage Processing": The study found that Transformer models, particularly on items designed to create conflict (like a salient intuitive but incorrect answer), exhibit a pattern of initially favoring the incorrect answer before switching to the correct one. This mirrors human "dual-process" theories of cognition.
  • Dynamics Matter More Than Just Output: Measures derived from the entire layer-wise computation (dynamic measures) of a model are more predictive of human processing behavior than measures derived solely from the model's final output probabilities (static measures). This suggests that how a model arrives at an answer is crucial for understanding its cognitive similarity to humans.
  • Model Size Isn't Everything: Contrary to a common assumption, larger models don't always show more human-like processing patterns. Mid-sized models, in particular, exhibited stronger signs of this two-stage processing.
  • A New Paradigm for Cognitive Modeling: The findings propose a shift in how AI models are used in cognitive science: not just as black boxes predicting behavior, but as explicit models whose internal dynamics can be directly compared to human cognitive processes.

Key Results

  • Competitor Interference: Models showed significantly higher COM (change of mind) and TTD (time to decision) scores on items designed to elicit competitor interference, indicating they exhibit two-stage processing in these conflict-inducing scenarios.
  • Predictive Power of Dynamics: Dynamic model measures (like COM, TTD, and others related to confidence and uncertainty across layers) significantly improved the prediction of human processing measures (accuracy, response time, etc.) compared to static, final-layer measures. This improvement was consistently observed across text and vision domains.
  • Model Size Effects: The relationship between model size and human-like processing was complex. For instance, mid-sized models showed the strongest COM, and the largest models didn't always yield the best predictions.
  • Domain Generalization: The findings held across various domains, including text (capitals, syllogisms, gender bias) and vision (object recognition), suggesting the observed phenomena are not domain-specific.

Limitations and Future Work

  • Correlation vs. Causation: While dynamic measures predict human behavior, establishing direct causal links requires further investigation.
  • Model Architectures: The study primarily focused on Transformers. Future work could explore other architectures.
  • Human Data Granularity: The paper acknowledges that human data is often aggregated. More fine-grained human processing data could lead to even deeper comparisons.
  • Future Directions: The authors suggest exploring how architectural modifications or training regimens affect model processing dynamics and their alignment with human cognition. They also propose using model processing dynamics to generate new hypotheses about human processing difficulty and to develop more efficient AI inference techniques ("early exiting"). The question of whether a forward pass represents an individual's processing or an aggregate is also posed for future research.

Summary updated

Abstract

A dominant way of using AI models to study human cognition is to evaluate whether human-derived measures are predicted by a model's output: that is, the end-product of a forward pass. However, mechanistic interpretability has begun to reveal the models' internal processes, raising the question of whether models use human-like processing strategies. We investigate the relationship between real-time processing in humans and layer-time dynamics of computation in Transformers, testing 20 open-source models in 6 domains. We find that, in the cases where we would expect decision conflict in humans, models appear to initially favor a competing incorrect answer over the correct answer. We also find that dynamic measures improve prediction of human processing measures relative to static measures. Moreover, larger models do not always show more human-like processing patterns. Our work suggests a new way of using AI models as explicit models of human processing.
BibTeX
@inproceedings{hu2025signatures,
  author = {Jennifer Hu and Michael A. Lepori and Michael Franke},
  title = {{Signatures of human-like processing in Transformer forward passes}},
  booktitle = {CogInterp @ NeurIPS},
  year = {2025},
  doi = {10.48550/arxiv.2504.14107},
}
Figure