EPISODE · May 28, 2025 · 14 MIN
How Transformers Learn Causal Structure with Gradient Descent
from Best AI papers explained · host Enoch H. Kang
This research investigates how transformers learn causal structure through gradient descent, focusing on their ability to perform in-context learning. The authors introduce a novel task involving random sequences with latent causal relationships and analyze a simplified two-layer transformer architecture. They demonstrate theoretically that gradient descent on the first attention layer recovers this hidden causal graph by computing a measure of mutual information between tokens. This learned causal structure then facilitates in-context estimation of transition probabilities, and the model is proven to generalize well even to out-of-distribution data. Experiments on various causal graphs support the theoretical findings.
What this episode covers
This research investigates how transformers learn causal structure through gradient descent, focusing on their ability to perform in-context learning. The authors introduce a novel task involving random sequences with latent causal relationships and analyze a simplified two-layer transformer architecture. They demonstrate theoretically that gradient descent on the first attention layer recovers this hidden causal graph by computing a measure of mutual information between tokens. This learned causal structure then facilitates in-context estimation of transition probabilities, and the model is proven to generalize well even to out-of-distribution data. Experiments on various causal graphs support the theoretical findings.
NOW PLAYING
How Transformers Learn Causal Structure with Gradient Descent
No transcript for this episode yet
Similar Episodes
Mar 31, 2026 ·54m
Mar 27, 2026 ·14m
Mar 24, 2026 ·42m
Mar 20, 2026 ·42m
Mar 17, 2026 ·41m
Mar 13, 2026 ·44m