Emergence of Episodic Memory in Transformers: Characterizing Changes in Temporal Structure of Attention Scores During Training

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Mistry, Deven Mahesh, Bajaj, Anooshka, Aggarwal, Yash, Maini, Sahaj Singh, Tiganj, Zoran
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912228276436992
author Mistry, Deven Mahesh
Bajaj, Anooshka
Aggarwal, Yash
Maini, Sahaj Singh
Tiganj, Zoran
author_facet Mistry, Deven Mahesh
Bajaj, Anooshka
Aggarwal, Yash
Maini, Sahaj Singh
Tiganj, Zoran
contents We investigate in-context temporal biases in attention heads and transformer outputs. Using cognitive science methodologies, we analyze attention scores and outputs of the GPT-2 models of varying sizes. Across attention heads, we observe effects characteristic of human episodic memory, including temporal contiguity, primacy and recency. Transformer outputs demonstrate a tendency toward in-context serial recall. Importantly, this effect is eliminated after the ablation of the induction heads, which are the driving force behind the contiguity effect. Our findings offer insights into how transformers organize information temporally during in-context learning, shedding light on their similarities and differences with human memory and learning.
format Preprint
id arxiv_https___arxiv_org_abs_2502_06902
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Emergence of Episodic Memory in Transformers: Characterizing Changes in Temporal Structure of Attention Scores During Training
Mistry, Deven Mahesh
Bajaj, Anooshka
Aggarwal, Yash
Maini, Sahaj Singh
Tiganj, Zoran
Machine Learning
Artificial Intelligence
Computation and Language
We investigate in-context temporal biases in attention heads and transformer outputs. Using cognitive science methodologies, we analyze attention scores and outputs of the GPT-2 models of varying sizes. Across attention heads, we observe effects characteristic of human episodic memory, including temporal contiguity, primacy and recency. Transformer outputs demonstrate a tendency toward in-context serial recall. Importantly, this effect is eliminated after the ablation of the induction heads, which are the driving force behind the contiguity effect. Our findings offer insights into how transformers organize information temporally during in-context learning, shedding light on their similarities and differences with human memory and learning.
title Emergence of Episodic Memory in Transformers: Characterizing Changes in Temporal Structure of Attention Scores During Training
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2502.06902