Posts

Comments

Comment by Ali Shehper (ali-shehper) on Sparse Autoencoders Work on Attention Layer Outputs · 2024-05-17T14:14:45.892Z · LW · GW

I see. Thanks for the clarification!

Comment by Ali Shehper (ali-shehper) on Sparse Autoencoders Work on Attention Layer Outputs · 2024-05-17T03:48:38.205Z · LW · GW

This could also be the reason behind the issue mentioned in footnote 5. 

Comment by Ali Shehper (ali-shehper) on Sparse Autoencoders Work on Attention Layer Outputs · 2024-05-17T03:20:28.003Z · LW · GW

Since the feature activation is just the dot product (plus encoder bias) of the concatenated z vector and the corresponding column of the encoder matrix, we can rewrite this as the sum of n_heads dot products, allowing us to look at the direct contribution from each head.

 

Nice work. But I have one comment.

The feature activation is the output of ReLU applied to this dot product plus the encoder bias, and ReLU is a non-linear function. So it is not clear that we can find the contribution of each head to the feature activation. 

Comment by Ali Shehper (ali-shehper) on Sparse autoencoders find composed features in small toy models · 2024-03-25T03:29:11.547Z · LW · GW

Hi Evan, thank you for the explanation, and sorry for the late reply. 

I think that the inability to learn the original basis is tied to the properties of the SAE training dataset (and won't be solved by supplementing SAEs with additional terms in its loss function). I think it's because we could have generated the same dataset with a different choice of basis (though I haven't tried formalizing the argument nor run any experiments).

I also want to say that perhaps not being able to learn the original basis is not so bad after all. As long as we can represent the full number of orthogonal feature directions (4 in your example), we are okay. (Though this is a point I need to think more about in the case of large language models.) 

If I understood Demian Till's post right, his examples involved some of the features not being learned at all. In your example, it would be equivalent to saying that an SAE could learn only 3 feature directions and not the 4th. But your SAE could learn all four directions. 

Comment by Ali Shehper (ali-shehper) on Sparse autoencoders find composed features in small toy models · 2024-03-18T22:53:43.471Z · LW · GW

Hey guys, great post and great work!

I have a comment, though. For concreteness, let me focus on the case of (x_2, y_1) composition of features. This corresponds to feature vectors of the form A[0, 1, 1, 0] in the case of correlated feature amplitudes and [0, a, b, 0] in the case of uncorrelated feature amplitudes. Note that the plane spanned by x_2 and y_1 admits an infinite family of orthogonal bases; one of which, for example, is [0, 1, 1, 0] and [0, 1, -1, 0].  When we train a Toy Model of Superposition, we plot the projection of our choice of feature basis as done by Anthropic and also by you guys. However, the training dataset for the SAE (that you trained afterward) contains no information about the original (arbitrarily chosen by us) basis. SAEs could learn to decompose vectors from the dataset in terms of *any* of the infinite family of bases. 

This is exactly what some of your SAEs seem to be doing.  They are still learning four antipodal directions (which are just not the same as the four antipodal directions corresponding to your original chosen basis). This, to me, seems like a success of the SAE. 

We should not expect the SAE to learn anything about the original choice of basis at all. This choice of basis is not part of the SAE training data. If we want to be sure of this, we can plot the training data of the SAE on the plane (in terms of a scatter plot) and see that it is independent of any choice of bases.