LessWrong (30+ Karma)

“Causal Graphs of GPT-2-Small’s Residual Stream” by David Udell


Listen Later

Thanks to the many people I've chatted with this about over the past many months. And special thanks to Cunningham et al., Marks et al., Joseph Bloom, Trenton Bricken, Adrià Garriga-Alonso, and Johnny Lin, for crucial research artefacts and/or feedback.

Codebase: sparse_circuit_discovery

TL; DR: The residual stream in GPT-2-small, expanded with sparse autoencoders and systematically ablated, looks like the working memory of a forward pass. A few high-magnitude features causally propagate themselves through the model during inference, and these features are interpretable. We can see where in the forward pass, due to which transformer layer, those propagating features are written in and/or scrubbed out.

Introduction

What is GPT-2-small thinking about during an arbitrary forward pass?

I've been trying to isolate legible model circuits using sparse autoencoders. I was inspired by the following example, from the end of Cunningham et al. (2023):

This directed graph is a legible circuit spread across [...]

---

Outline:

(00:54) Introduction

(01:46) Related Work

(02:15) Methodology

(03:52) Causal Graphs Key

(05:15) Results

(05:19) Parentheses Example

(06:05) Figure 1

(06:34) Figure 2

(07:12) Figure 3

(08:00) Figure 4

(09:08) Validation of Graph Interpretations

(09:18) Fig. 1 - Parentheticals

(10:19) Fig. 2 - C-words

(11:06) Fig. 3 - C-words

(11:33) Fig. 4 - Acronyms

(12:11) Other Validation

(12:59) Discussion

(13:02) The Residual Stream Is Working Memory...

(13:41) ...And It Is Easily Interpretable.

(14:19) Conclusion

The original text contained 7 footnotes which were omitted from this narration.

The original text contained 3 images which were described by AI.

---

First published:

July 9th, 2024

Source:

https://www.lesswrong.com/posts/uNGAjA8wCNDZHJxu8/causal-graphs-of-gpt-2-small-s-residual-stream

---

Narrated by TYPE III AUDIO.

...more
View all episodesView all episodes
Download on the App Store

LessWrong (30+ Karma)By LessWrong


More shows like LessWrong (30+ Karma)

View all
Making Sense with Sam Harris by Sam Harris

Making Sense with Sam Harris

26,433 Listeners

Conversations with Tyler by Mercatus Center at George Mason University

Conversations with Tyler

2,387 Listeners

The Peter Attia Drive by Peter Attia, MD

The Peter Attia Drive

7,897 Listeners

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas by Sean Carroll | Wondery

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas

4,131 Listeners

ManifoldOne by Steve Hsu

ManifoldOne

87 Listeners

Your Undivided Attention by Tristan Harris and Aza Raskin, The Center for Humane Technology

Your Undivided Attention

1,460 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

9,043 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

87 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

389 Listeners

Hard Fork by The New York Times

Hard Fork

5,434 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

15,176 Listeners

Moonshots with Peter Diamandis by PHD Ventures

Moonshots with Peter Diamandis

475 Listeners

No Priors: Artificial Intelligence | Technology | Startups by Conviction

No Priors: Artificial Intelligence | Technology | Startups

121 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

75 Listeners

BG2Pod with Brad Gerstner and Bill Gurley by BG2Pod

BG2Pod with Brad Gerstner and Bill Gurley

458 Listeners