# Exploring OpenAI's Latent Directions: Tests, Observations, and Poking Around

TL;DR: Interactive exploration of new directions in GPT2-SMALL. [Try it yourself](https://neuronpedia.org).

OpenAI recently released their [Sparse Autoencoder](https://github.com/openai/sparse_autoencoder) for GPT2-Small. In this story-driven post, I run experiments and poke around the 325k active directions to see how good they are. The results were super interesting, and I encountered more than a few surprises along the way. Let's get started!

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b8841e74953f622c1b2465c55af2838d3853ac4448e3f046.png)

**Exploration Tools**
---------------------

I uploaded the directions to [Neuronpedia](https://neuronpedia.org) \[[prev LW post](https://www.lesswrong.com/posts/skKYznZyRtN87tHbB/neuronpedia-ai-safety-game)\], which now supports exploring, [searching](https://www.neuronpedia.org/gpt2-small?exclude_layer_0=false&filter=DIRECTIONS&sortIndex=-1&q=I%20will%20not%20be%20buying%20an%20Apple%20Vision%20Pro.), and [browsing](https://neuronpedia.org/gpt2-small) different [layers](https://neuronpedia.org/gpt2-small/6-mlp-oai), directions, and neurons. 

Let's do some experiments with the objective: **What's in these latent directions? Are they any good?**

**Test 1: Find a Specific Concept - Red**
-----------------------------------------

For the first test, we'll look for a specific concept, and then benchmark the directions (and neurons) to look for **monosemanticity** and **meaningfulness**. We want to see directions/neurons that activate on a concept, not just the literal token. For example, a "kitten" direction should also activate for "cat".

For the upcoming Lunar New Year, let's look for the color "red", starting with **directions**.

On the [home page](https://neuronpedia.org), we type "red" into the search field, and hit enter:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/bc9aefd332c81772da8475ad9197c28074e6d881bb936a2a.png)

In the backend, the search query is fed into GPT2-SMALL via TransformerLens. The output is normalized, encoded, and sorted by top activation.

After a few seconds, it shows us [the top 25](https://www.neuronpedia.org/gpt2-small?sourceSet=mlp-oai&selectedLayers=[]&sortIndex=-1&q=red) [](https://www.neuronpedia.org/gpt2-small/?sourceSet=mlp-oai&selectedLayers=[]&sortIndexes=[]&q=red) [directions by activation](https://www.neuronpedia.org/gpt2-small?sourceSet=mlp-oai&selectedLayers=[]&sortIndex=-1&q=red) for our search:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1db8d908d671378c01ed16a23071b47aefbe969a22aeef10.png)

Unfortunately, the top results searching direction results don't look good. Uh-oh.

The top result, [0-MLP-OAI:22631](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/22631), has a top activating token of "red" in the word "C**red**entials", which doesn't mean the color red. [Clicking into it](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/22631), we see that it's just indiscriminately firing on the token "red" - in domains, parts of words, etc. It does fire on the color red about 35% of the time, but that's not good enough.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/63fbcf6b0ced78138dc3c0a4687bd3000acf518cd43dc2b7.png)

So our top direction result is monosemantic for "the literal token 'red'", but it's not meaningful for the color red. And other top results don't have anything to do with "red".

What went wrong?

### **Red-eeming Our Search**

We searched for "red", and the machine literally gave us "red". Like many other problems that we encounter with computers, [PEBKAC](https://en.wikipedia.org/wiki/User_error). In LLM-speak: our prompt sucked.

Let's add more context and try again: ["My favorite color](https://www.neuronpedia.org/gpt2-small?sourceSet=mlp-oai&selectedLayers=[]&sortIndex=-1&q=My%20favorite%20color%20is%20red.) [is](https://www.neuronpedia.org/gpt2-small/?sourceSet=mlp-oai&selectedLayers=[]&sortIndexes=[]&q=My%20favorite%20color%20is%20red.) [red."](https://www.neuronpedia.org/gpt2-small?sourceSet=mlp-oai&selectedLayers=[]&sortIndex=-1&q=My%20favorite%20color%20is%20red.)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/0112d70ec363b888521296c86864bab9c56c9d540adaf1b2.png)

Adding the extra context gave us a promising result - the second direction has a top activation that looks like it's closer to the color red ("Trump's **red**-meat base") instead of a literal token match, and its [GPT explanation](https://github.com/openai/automated-interpretability) is "the color adjective 'red'".

But the other tokens we added for context are also in the results, and they're not what we're looking for. Results 1, 3, and 4 are about "favorite", "color", and "My", which drowns out other good potential results for "red".

Fortunately, we can sort by "red". Click the bordered token "red" under "Sort By Token":

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/8eb03840b64008cf5c3dec496e20707f9b781b010738268c.png)

The [result](https://www.neuronpedia.org/gpt2-small?sourceSet=mlp-oai&selectedLayers=[]&sortIndex=4&q=My%20favorite%20color%20is%20red.) is exactly what we want - a list of directions that most strongly activate on the token "red", in the context "My favorite color is red.". The top activations look promising!

It turns out that the first "Trump's red-meat base" direction, [0-MLP-OAI:16757](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/16757), isn't the best one. While its top activations does have "red jumpsuit", "red-light", it also activates on "**red**iscovered" and "**red**raw".

The second result, [1-MLP-OAI:22004](https://www.neuronpedia.org/gpt2-small/1-mlp-oai/22004), is much better. All of its top activations are the token "red" by itself as a color, like "red fruit", "shimmery red", and "red door".

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/79a88a429e014d9e2f563f9648767632ee4d7ed288be51e0.png)

We have a winner!

### **Red-oubling Our Efforts**

[1-MLP-OAI:22004](https://www.neuronpedia.org/gpt2-small/1-mlp-oai/22004) is a good find for "red", but we're not satisfied yet. Let's see if it understands the color red without the token "red". To do this, let's test if this direction activates on "crimson", a synonym for red.

Let's open the [direction](https://www.neuronpedia.org/gpt2-small/1-mlp-oai/22004). Then, click the "copy" button to the right of its first activation.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/faa487fd763d27177cd990ca01c9cffec2b821d20984d7ab.png)

This copies the activation text into the test field, allowing us to tweak it for new tests:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/96726b6b6b9ad95b1b044b24f6cd1c8bc525c62566545108.png)

We'll change the highlighted word "red" to "crimson", then click "Test":

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/9f333bef03ff937ce7530623d8536d324a3970f30e162393.png)

**It activated!** When replacing the token "red" in our top activating text with "crimson", the token "crimson" was still the top activating token. Even though its activation is much weaker than "red", this is a fantastic result that's unlikely to be random chance - especially considering that this activation text was long had many other colors in it.

We don't always have to copy an existing top activation. It just usually makes sense to copy because the top activation is likely to give you a high activation on modifications, like the word replacement we did here. We can also just type in a test manually. Let's replace the test text with "My favorite color is crimson.":

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/484ab5fe1ee2f13d8dc56d3316df7d9b6baba77c287bc9fc.png)

It still activates, though slightly lower than the copy-paste of the top activation. Neat.

### **Red-oing It, But With Neurons**

We found a monosemantic and meaningful direction for "red". How about neurons?

We'll filter our search results to neurons by clicking Neurons. [Here's the result](https://www.neuronpedia.org/gpt2-small/?sourceSet=neurons&selectedLayers=[]&sortIndexes=[]&q=My%20favorite%20color%20is%20red.).

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/82469491f555cc96c52fae0f9bb10d9461fa88fe1874565e.png)

The results for neurons are, frankly, terrible. We have to scroll halfway down the results to find neurons about colors:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/2e63e25c8c2353fd0f7b03c900b3b5dd82f00c5cb39ea445.png)

And clicking into these, they're mostly general color neurons, with the best candidate being [2:553](https://www.neuronpedia.org/gpt2-small/2/553). We do a test to compare it with our previous [1-MLP-OAI:22004](https://www.neuronpedia.org/gpt2-small/1-mlp-oai/22004):

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/0f4d910c2a3aaae3f7185296b806ecacb74dd79fa93a0a85.png)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/ea6eff495ed0770555f189b03b67351c3f2984386d5d0929.png)

The direction is clearly better - the difference is night and day. (Or red and blue?)

Conclusion of test 1: We successfully found a monosemantic and meaningful direction for the color red. We could not find a monosemantic red in any neurons.

**Test 2: Extract Concepts From Text - The Odyssey**
----------------------------------------------------

In the first test, we looked for one concept and came up with searches to find that concept. In this test, we'll do the opposite - take a snippet of text, and see how well directions and neurons do in identifying the multiple concepts in that text.

Back at the home page, we'll chose a Literary example search query:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/cbe445173aaa431ebffc0a3b7020654ea57aefd078f41599.png)

We got randomized into text snippet about the Odyssey:

> In 'The Odyssey', Homer takes us on an epic journey with Odysseus, whose adventures and trials on his way back to Ithaca after the Trojan War offer timeless insights into the human condition and the quest for home.

Since there are multiple Literary examples it's choosing from, you might have gotten something different. [Click here to follow along on our... Odyssey.](https://www.neuronpedia.org/gpt2-small/?sourceSet=neurons&selectedLayers=[]&sortIndexes=[]&q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.)

### **The Journey Begins**

Like the first test, we want to compare directions and neurons on the criteria of  **monosemantic** and **meaningful**.

But since there are so many tokens in this text, we'll mostly check for a "good enough" **match** by comparing the top activating tokens. For example:  if both the text and a direction have the top activating token "cat", it's a **match**. The more matches, the better.

### **It's All Greek To Me**

Let's start with the search [results for neurons](https://www.neuronpedia.org/gpt2-small/?sourceSet=neurons&selectedLayers=[]&sortIndexes=[]&q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.).

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/2e9e353b1bf7b77024fa6c71d8ec1f03421ffcf585ef9b5d.png)

**Out of the top 25 neuron results, only four matched**. Most didn't have matching or similar activating tokens as the neuron, or were highly polysemantic, like [11:2172](https://www.neuronpedia.org/gpt2-small/11/2172):![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/869e38fea91a2d371d59cc63ac7b53bb7e25d9a908e39ec4.png)

Out of the four matches token matches, most activated on unrelated tokens as well:![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b6d8036e437ed21ab3696cc30b861682b5af1e2a4f1670d8.png)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b2a73087d5e00a64534ae9deb5534c40c363ddb7a5295bc9.png)

*(Note: Thanks to Neuronpedia contributors @mf,* [*@duck_master*](https://www.lesswrong.com/users/duck_master?mention=user)*, @nonnovino, and others for your explanations of these neurons.)*

Overall, the top 25 neurons were bad at matching the concepts or words in our text.

### **Towards** [**Monophemus**](https://en.wikipedia.org/wiki/Polyphemus)

Okay, the neurons were a disaster. How about the directions?

[The directions results](https://www.neuronpedia.org/gpt2-small/?sourceSet=mlp-oai&selectedLayers=[]&sortIndexes=[]&q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) were stellar. All 25 of the top results were monosemantic and matched exactly, with the exception of "insights" vs "insight" in [0-MLP-OAI:19642](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/19642):![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/72e876b03449cdb65ecde892548277da0a2e3d5f911f8e0d.png)

As we saw in the first test, a non-exact but related match is a good sign that this direction isn't just finding the exact token "insight", but looking for the concept. Let's test [0-MLP-OAI:19642](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/19642) with adjective "insightful" and synonym "intuition":

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b28a66ad0daac639754f854b9cf4e1c87b0be773b23bf23f.png)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/5f0fe7ee03c13383655cefc2bcd7919de288b270277869d6.png)

Both activated - nice! To be sure it's not just finding adjectives, let's check "absurd":

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/03421386260abbf6bec0a8e7edded13a51c7414b6382c28d.png)

Absurd doesn't activate - so we'll consider this spot-check passed.

Overall, the top 25 directions were simply really good. They're obviously better than neurons. But that's a low bar - just *how* good are the directions?

I noticed something odd in the top search results - a significant majority of top activations were in layer 0 (22 out of 25). I wanted to see how it did without layer 0, so I clicked the "All Layers" dropdown and selected all layers except layer 0, and reran the search.

### **From Hero... to Zero?**

Surprisingly, [the direction results excluding layer 0](https://www.neuronpedia.org/gpt2-small/?sourceSet=mlp-oai&selectedLayers=[%221-mlp-oai%22,%222-mlp-oai%22,%223-mlp-oai%22,%224-mlp-oai%22,%225-mlp-oai%22,%226-mlp-oai%22,%227-mlp-oai%22,%228-mlp-oai%22,%229-mlp-oai%22,%2210-mlp-oai%22,%2211-mlp-oai%22]&sortIndexes=[]&q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) were noticeably worse. I counted 22 out of 25 matches, which is three fewer than when we included layer 0.

What accounted for the three non-matches?

*   [10-MLP-OAI:0](https://www.neuronpedia.org/gpt2-small/10-mlp-oai/0) and [11-MLP-OAI:1](https://www.neuronpedia.org/gpt2-small/11-mlp-oai/1) are totally unrelated to the text. Since the OpenAI directions were indexed by most frequently activating first, their indexes of 0 and 1 suggest these are highly polysemantic. I tested these directions to confirm:![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/4a7084162b11b40e563487eb3bb09f04776b57e3386344ac.png)
*   [11-MLP-OAI:12199](https://www.neuronpedia.org/gpt2-small/11-mlp-oai/12199) activates on "an $", and most highly on "$". In our text it most highly activated on "an". So this is a half-match.

It looks like these direction non-matches were the result of two rogue directions and one near-hit, which still isn't bad, especially compared against neurons.

But because excluding layer 0 made the results worse, I was now curious if later layers were even worse. So I checked the results for each layer (using the "Filter to Layer" dropdown) for both directions and neurons:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/de471d91a128b2b367b2ea3dd054aea614559bb278f719f9.png)

To see individual layer results, click the number in the table cell below.

|     |   | Layer |   |   |   |   |   |   |   |   |   |   |   |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0   | 1   | 2   | 3   | 4   | 5   | 6   | 7   | 8   | 9   | 10  | 11  |
| Matches | Neurons | [17](https://www.neuronpedia.org/gpt2-small/0/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [14](https://www.neuronpedia.org/gpt2-small/1/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [14](https://www.neuronpedia.org/gpt2-small/2/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [7](https://www.neuronpedia.org/gpt2-small/3/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [8](https://www.neuronpedia.org/gpt2-small/4/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [9](https://www.neuronpedia.org/gpt2-small/5/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [17](https://www.neuronpedia.org/gpt2-small/6/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [14](https://www.neuronpedia.org/gpt2-small/7/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [13](https://www.neuronpedia.org/gpt2-small/8/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [13](https://www.neuronpedia.org/gpt2-small/9/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [3](https://www.neuronpedia.org/gpt2-small/10/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [3](https://www.neuronpedia.org/gpt2-small/11/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) |
| Directions | [25](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [23](https://www.neuronpedia.org/gpt2-small/1-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [22](https://www.neuronpedia.org/gpt2-small/2-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [19](https://www.neuronpedia.org/gpt2-small/3-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [16](https://www.neuronpedia.org/gpt2-small/4-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [15](https://www.neuronpedia.org/gpt2-small/5-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [18](https://www.neuronpedia.org/gpt2-small/6-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [19](https://www.neuronpedia.org/gpt2-small/7-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [12](https://www.neuronpedia.org/gpt2-small/8-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [13](https://www.neuronpedia.org/gpt2-small/9-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [15](https://www.neuronpedia.org/gpt2-small/10-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) | [7](https://www.neuronpedia.org/gpt2-small/11-mlp-oai/?q=In%20%27The%20Odyssey%27%2C%20Homer%20takes%20us%20on%20an%20epic%20journey%20with%20Odysseus%2C%20whose%20adventures%20and%20trials%20on%20his%20way%20back%20to%20Ithaca%20after%20the%20Trojan%20War%20offer%20timeless%20insights%20into%20the%20human%20condition%20and%20the%20quest%20for%20home.) |

This was pretty surprising. Even though directions were better than neurons in every layer, directions got noticeably worse in the later layers - and the layer 11 directions were actually pretty bad. Neuron even seemed to fare decently against directions in the middle layers - from layer 6 to layer 9.

I don't know why directions seem to get worse in later layers, or why top directions are usually in layer zero. I'm hoping someone who is knowledgable about sparse autoencoders can explain.

Conclusion of test 2: We found that directions were consistently and significantly better than neurons at finding individual concepts in a text snippet. However, the performance of directions was worse in later layers.

**Observations and Tidbits**
----------------------------

Here are some highlights and observations from looking through *a lot* of directions and neurons while doing these tests:

*   My favorite direction is the "story synopsis" direction at [7-MLP-OAI:4808](https://www.neuronpedia.org/gpt2-small/7-mlp-oai/4808), which accurately fired on our summary of the Odyssey. In my opinion, this is strong evidence that the directions can go even further than "similar/related/synonym token" matches, and can look for broader "text passage style" matches.
    *   A similar direction I liked is [7-MLP-OAI:1613](https://neuronpedia.org/gpt2-small/7-mlp-oai/1613), except it's more about the setting and scene of a story.
*   Semantically opposite tokens can activate directions more than similar tokens.
    *   In [0-MLP-OAI:16472](https://www.neuronpedia.org/gpt2-small/0-mlp-oai/16472), changing "love" to "hate" makes "hate" the top activating token, albeit with a reduced score. Counterintuitively, changing "love" to "like" eliminates all activations, even though "like" is closer to "love".
    *   [2-MLP-OAI:26593](https://www.neuronpedia.org/gpt2-small/2-mlp-oai/26593), [3-MLP-OAI:25503](https://www.neuronpedia.org/gpt2-small/3-mlp-oai/25503), [4-MLP-OAI:25454](https://www.neuronpedia.org/gpt2-small/4-mlp-oai/25454) behave similarly.
    *   Theory: These directions are actually "intense feelings", instead of "love".
*   Finding directions that are similar to neurons (and to each other):
    *   Directions can have similar activations to a neuron in the same layer, creating a "twin". My guess is these directions are heavily weighted on the twin neuron:
        *   Twins about trains and shipping: [5:1046](https://www.neuronpedia.org/gpt2-small/5/1046) and [5-MLP-OAI:6058](https://www.neuronpedia.org/gpt2-small/5-mlp-oai/6058).
        *   Twins about people going together: [6:681](https://www.neuronpedia.org/gpt2-small/6/681) and [6-MLP-OAI:6681](https://www.neuronpedia.org/gpt2-small/6-mlp-oai/6681).
    *   But I also found "triplets" - and they're across three layers, so I don't have a hypothesis:  [4-MLP-OAI:17688](https://www.neuronpedia.org/gpt2-small/4-mlp-oai/17688), [6-MLP-OAI:20837](https://www.neuronpedia.org/gpt2-small/6-mlp-oai/20837), [9-MLP-OAI:23011](https://www.neuronpedia.org/gpt2-small/9-mlp-oai/23011). All activated on the capital "I" in "Ithaca" and have the exact same #1 top activation text, which is this sad snippet about porpoises going extinct [😔](https://emojipedia.org/pensive-face):![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/30dcbdd9c000d238db67393ed56d7952c1b88e71c339804b.png)
    *   These quintuplets across four layers were weren't as similar to each other as the twins/triplets, but all activate on "The" in movies and tv shows: [9-MLP-OAI:18636](https://www.neuronpedia.org/gpt2-small/9-mlp-oai/18636), [4:127](https://www.neuronpedia.org/gpt2-small/4/127), [4-MLP-OAI:5479](https://www.neuronpedia.org/gpt2-small/4-mlp-oai/5479), [6-MLP-OAI:23676](https://www.neuronpedia.org/gpt2-small/6-mlp-oai/23676), [7-MLP-OAI:21865](https://www.neuronpedia.org/gpt2-small/7-mlp-oai/21865).

### **Questions**

*   When searching directions in all layers, why is it that earlier layers (0 and 1 especially) have higher top activations, drowning out the later laters? For neurons, it seems to be the opposite - that layers 10 and 11 have higher activations.
    *   Is this expected? Is there anything I can do to compensate for this to "normalize" against the other layers?
*   Why do directions perform worse in later layers? Matches for directions steadily decrease from 25 to 7 from layer 0 to 11. For example, [11-MLP-OAI:1013](https://www.neuronpedia.org/gpt2-small/11-mlp-oai/1013) activates on seemingly random tokens, and the top activations also seem random:![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1c66da58df1c7e676e1928ae34a62cdbf590ac7084483a68.png)
*   How can directions across multiple layers seem so similar? (Re: the triplets/quintuplets).
*   Small, older models are not good at predicting tokens. When will this be a limiting factor in finding directions? What I mean is, when will we know the directions are "as good as they can get, considering the limited capabilities of the model itself"?
    *   Example bad GPT2-SMALL completion: "The name of the capital of France is" \[completion\] "French, after the English. It's also sometimes translated as Spanish, and the capital of"

### **Challenges and Puzzles**

These are directions I either couldn't find, or couldn't figure out the pattern in them. Let me know if you have any luck with them.

*   I couldn't find a direction for the general concept of color - one that consistently activates on all colors in all contexts. I wonder I just wasn't clever enough to find it, or if (unsubstantiated hypothesis) it might be a concept that is neither specific nor broad enough for a direction to be created by current SAEs. The closest I found was [2-MLP-OAI:22933](https://www.neuronpedia.org/gpt2-small/2-mlp-oai/22933), but it does not activate on red.
*   [10-MLP-OAI:20144](https://www.neuronpedia.org/gpt2-small/10-mlp-oai/20144) is movie and media titles, but it doesn't activate on activation texts copied from the other "quintuplet movies" directions/neurons. Why not?
*   [6-MLP-OAI:6025](https://www.neuronpedia.org/gpt2-small/6-mlp-oai/6025) activates on "**back to** Ithaca", and the direction's top activation is "return", which makes sense. But it also activates for "re**ind**eer", "re**ald**onaldtrump", "reply", and "reel". Why is there this weird overlap of "words that start with re" and "words that mean back to"?

### **Suggested Improvement**

The directions themselves seem good, as we've saw in the two tests. But I found the activations and associated data ([NeuronRecord files](https://github.com/openai/sparse_autoencoder)) provided by OpenAI to be lacking. They only contain 20 top activations per direction, and often the top 20 tokens are exactly the same, even if the direction is finding more than that literal token.

For example, the "love"/"hate" direction above ([3-MLP-OAI:25503](https://www.neuronpedia.org/gpt2-small/3-mlp-oai/25503)) has 20 top activations that are all "love". Replacing it with "like" results in zero activation, but replacing it with "hate" results in a positive activation. So there's something else going on here other than "love", but someone looking just at the top 20 activations would conclude this is direction is only about "love". In fact, this is exactly what GPT4 thought:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/c0bf1f3e39b81e872d5f7830863c38272bb78f97b6b867a2.png)

A proposed fix is to do top token comparisons when generating NeuronRecords, and count exact duplicates as a "+1" to an existing top activation. But this would eliminate identical top activation tokens that are in different contexts (or same token in different words, which we definitely want to keep.)

A better fix is doing semantic similarity comparisons on the word, phrase, sentence, and whole text when generating NeuronRecords, then set thresholds for each semantic similarity type. When encountering the same top activating token, count that activation text as a +1 of an existing activation text if it's within our similarity thresholds.

Ideally, you'd end up with a diverse set of top activation records that also has counts for how frequently a similar top activation appeared. I plan to build some version of this proposed fix and generate new top activations for these directions, so let me know if you have any feedback on it.

**Try It Yourself**
-------------------

### **Run Your Own Tests and Experiments**

You can play with the new directions and do your own experiments at [neuronpedia.org](https://neuronpedia.org). For inspiration, try clicking one of the example queries or looking for your favorite thing.

If you find an interesting direction/neuron, Star it (top left) and/or comment on it so that others can see it as well. Here's my favorite ["story synopsis" direction](https://www.neuronpedia.org/gpt2-small/7-mlp-oai/4808):![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/7fa91d04648f71b59e535744aab0635047f778e888124cd3.png)

When you star or comment, it appears on your [user page](https://www.neuronpedia.org/user/johnny) (this links to my stars page), the global [Recently Starred/Commented](https://www.neuronpedia.org/stars) page, and the [home page](https://neuronpedia.org) under Recent Activity.

Please let me know what new features would be helpful for you. It'd be really neat to see someone use this in their own research - I'm happy to help however I can.

### **Upload Your Directions and Models**

If you want to add your directions or models so that you and others can search, browse, and poke around them, please [contact me](mailto:johnny@neuronpedia.org?subject=Add%20my%20model%20or%20directions&body=Hey%20Johnny%2C%0A%0AI'd%20like%20to%20add%20my%20model%20or%20directions%20to%20Neuronpedia.%20Here's%20a%20brief%20description%3A%0A%0A%0A%0ALet's%20get%20in%20touch!%0A%0A(Neuronpedia%20is%20free%2C%20I%20will%20not%20be%20charged%20anything%20to%20upload%20my%20directions%20or%20models.) and I'll make it a priority to get them uploaded. A reminder that **Neuronpedia is free** \- you will not get charged a single cent to do this. Maybe you'll even beat OpenAI's directions. 🤔

**Feedback, Requests, and Comments**
------------------------------------

Neuronpedia wants to make interpretability accessible while being useful to the serious researchers. As a bonus, I'd love to make more folks realize how interesting interpretability is. It really is fun for me and likely you as well, if you've read this far!

Leave some feedback, feature requests, and comments below, and tell me how I can improve Neuronpedia for your use case, whether that's research or personal interest. And if you're up to it, help me out with the questions and challenges above.