AIFeed

I don’t expect superposition in transformer MLP neurons

Summary

I currently believe that in a typical (well trained and under-parametrized) transformer model, there is something like superposition-type compression in the residual stream, but not in the MLP neurons. By "superposition-type compression", I mean some way of storing extra features using the fact that you can have almost orthogonal directions embedded in . [1] I've included the caveats "well trained and under-parametrized [2] " because I'm talking about networks that are at or close to full capacity. If the network is big enough (or just doesn't learn that many circuits for training reasons) then there is no need for compression, and therefore no need for superposition. [3] Why I believe this: [4] Having superposition everywhere causes too much noise from interference. There is much more need for compression in the residual stream. Compensating using some error correction is probably not worth it. The number of alive MLP subcomponents found by VPD is less than the number of MLP neurons.…

Original text(via Alignment Forum)

I currently believe that in a typical (well trained and under-parametrized) transformer model, there is something like superposition-type compression in the residual stream, but not in the MLP neurons.

By "superposition-type compression", I mean some way of storing extra features using the fact that you can have almost orthogonal directions embedded in .[1]

I've included the caveats "well trained and under-parametrized[2]" because I'm talking about networks that are at or close to full capacity. If the network is big enough (or just doesn't learn that many circuits for training reasons) then there is no need for compression, and therefore no need for superposition.[3]

Why I believe this:[4]

  • Having superposition everywhere causes too much noise from interference.
  • There is much more need for compression in the residual stream.
  • Compensating using some error correction is probably not worth it.
  • The number of alive MLP subcomponents found by VPD is less than the number of MLP neurons.

I also believe that superposition as a concept is not that useful in practice. See the last two sections for more on this:

  • But how can LLMs store more facts than they have neurons without superposition?
  • Beyond superposition

1. Having superposition everywhere causes too much noise from interference

I did some work on toy models of computation in superposition, under the assumption that there is superposition in every layer. In the infinite limit, it's possible to compute features (up to log factors). But in practice with finite width, this is very hard to pull off without the network being overwhelmed with noise.

But by limiting superposition to only the residual stream and not the MLP[5], the network gets away from this regime, where the noise gets really bad.

Think of it like this. There is a weight matrix connecting two adjacent activation sites[6], one of them is the MLP hidden layer, and one of them is the residual stream just before or after that MLP. Also assume the idealized superposition picture, where there is some set of canonical features for each activation site that are encoded using linear embeddings. But we can't just embed the features, we also need to embed the weights between them.

If feature is embedded using vector in the first activation site, and feature is embedded using vector in the second activation site, then a connection weight between them is embedded as [7] in the weight matrix between the sites.

If both activation sites use an overcomplete (and therefore non-orthogonal) basis, then you'll also end up with interference in the weights between features (weight superposition). But as long as one of the adjacent activation sites has orthogonal embeddings, the embedded weights between them will also be orthogonally embedded (no weight superposition).

Avoiding weight superposition avoids a large source of noise.

2. There is much more need for compression in the residual stream

If the network can have superposition in either the MLP hidden layers or the residual stream, having it in the residual stream is clearly much more useful.

  • All information has to pass through the residual stream, whereas the MLP neurons can be much more limited in what information they have to interact with.
  • MLP hidden layers are typically wider than the residual stream, which further reduces their need for superposition.

3. Compensating using some error correction is probably not worth it

Can we have more superposition if the network has error correction? The answer is "yes, but..."

I do think many networks have some error correction.[8] If there is any superposition, there will be noise and therefore some need for error correction, and I do believe there is some superposition. But having superposition in both the residual stream and MLP would cause much more noise, and then I don't think the trade-off is worth it.

Error correction only works on discrete features. Error correction operates by removing the noise from a feature. But in order to do this you need to be able to distinguish noise from signal. If the feature is discrete (only a finite set of allowed values) you can use e.g. step functions built from ReLUs to move the feature to its nearest allowed value. But if it's a continuous feature, then you can't know what part is noise and what part is signal.

Ok, so maybe add some redundancy to help with error correction? But adding redundancy is the opposite of compression. So if you're okay with less compression, why not just remove the source of the noise by removing superposition?

Error correction takes up compute capacity. If we were to add superposition to the MLP, this would create a lot of additional noise, and we would need a lot of additional error correction to deal with this. This error correction needs to be implemented by other MLP neurons, neurons that are now unavailable for other tasks.

In the infinite width limit (as long as you stick to discrete features) you can implement more virtual neurons than neurons, even after taking into account the neurons you need to dedicate to error correction. In realistic networks however, I don't think the gains are worth the cost.

4. The number of alive MLP subcomponents found by VPD is less than the number of MLP neurons

VPD (adVersarial Parameter Decomposition) is a method that decomposes every matrix in a neural network into rank-one subcomponents. Alive subcomponents are components that are used on at least one forward pass. The number of alive subcomponents can be both larger and smaller than the rank of the matrix.[9]

I haven't seen any decomposition of a language model transformer that finds more alive subcomponents in any MLP matrix than that MLP has neurons.[10]

What would change my mind?

If I change my mind, I expect this will be because someone (possibly me[11]) completely mech-interps the shit out of some model, such that we know that we know all features and how they inter-operate, and shows me that this network has more superposition than I expected. This might sound very out of reach of the current state-of-the-art mech-interp, but note that it does not have to be a very big network.

The above is not an exhaustive answer to "what would change my mind?". There are lots of things that could possibly make me update incrementally in either direction.

But how can LLMs store more facts than they have neurons without superposition?

Facts are not features, they are relationships between features.[12] We don't need one neuron or one "virtual neuron" per fact.

One of my ongoing projects is to figure out how facts are encoded in toy MLPs. This is not solved, but the indication so far is that it looks very different from the superposition picture. Storing facts by embedding individual "fact features" along almost-orthogonal directions in MLPs is actually a pretty terrible way to do things.

Let's assume that you have a number of facts . Each fact maps a specific input sequence to a label. You want to find weights for a neural network with one hidden MLP layer of dimension to predict the right label for each fact. Embedding each fact in separate almost-orthogonal directions of the hidden layer is not an efficient solution for this. Try it yourself if you disagree.

I think Dugan et al. have some clues on how fact encoding might work. (For more thoughts on this, see Possibility 2 in my recent quick take.)

Beyond superposition

I feel personally mostly finished with the concept of superposition.

The naive version of superposition assumes uncorrelated features, which is obviously not true. There is so much more going on with feature geometries, etc. Attempting to point to structures I can't name since no-one has figured them out yet

I think using the concept of superposition as a supporting lens can have some use. The feature geometry lens says that feature non-orthogonality is functional (e.g. days of the week embeddings probably lie in a circle for some functional or correlational reason). The superposition lens adds that sometimes things end up non-orthogonal not for functional reasons but for compression reasons, which is a complementary hypothesis that I think is worth having in mind.

But I don't expect using superposition as a primary/central lens to be very fruitful. There is just too much else going on, in any interesting network.

Knowing if any given layer has superposition-like compression isn't much help in interpreting it. Non-superposition does not guarantee mono-semanticity.

I don't have a nice simple feature embedding hypothesis ready to replace superposition or mono-semanticity. I expect it's just more complicated than that.

I'm very interested in trying to understand feature embedding better. My current plan for this is to look at completely understood toy models[13], and just see how they encode information in their various intermediate layers. I hope that if I look at enough of those encodings, I'll notice some commonalities.

Acknowledgment

Thanks to @philh and Claude for proofreading. Thanks to @Lucius Bushnaq for comments on draft, and helping me clarify some explanations.

Post inspired by conversation at a recent Princint workshop.

  • ^I'm using the word "compression" very loosely. Superposition lets the network represent a larger range of features; but that does not mean more total information, in the information-theoretical sense. Superposition is a way of storing more than variables, as long as they are sparsely activated and limited range, in a format that's more suited for storing exactly full-range scalars/floats. In some sense superposition reduces the storage capacity, since the set of valid embeddings only covers a subset of .
  • ^By under-parametrized I mean the network isn't big enough to get perfect or close to perfect loss on the training data. All LLMs are under-parametrized in this sense.
  • ^If there is no need for compression pushing for superposition, then we trivially should not expect superposition (it's all costs and no benefits, for the model). So that's not an interesting case.
  • ^I tried to write a complete account of why I believe what I believe, but it's hard, since this is an opinion that emerged gradually after thinking about and researching superposition for about 1.5 years. I think this post captures around 80% of why I believe what I believe.
  • ^Or vice-versa (superposition in the MLP but not in the residual stream), but that would be much less useful. See next section.
  • ^Claude told me that "activation site" is probably the most common term for what I want to say, and defines it as:Activation site: a fixed point in the model’s forward pass where an intermediate activation vector is produced. You can read it, probe it, or patch it there.

Claude told me that "activation site" is probably the most common term for what I want to say, and defines it as:

Activation site: a fixed point in the model’s forward pass where an intermediate activation vector is produced. You can read it, probe it, or patch it there.
  • ^I think the main evidence for error correction in transformers is this line of research (by Francisco Ferreira da Silva and Stefan Heimersheim) including some follow-up results that are not published yet.
  • ^For a proper explanation of VPD, you can read the paper. I'm not able to generate an explanation that's both short and good.
  • ^Me and others have found more alive components than neurons in toy models, so I don't think this is due to VPD being unable to find circuits in superposition.[13]
  • ^One of my current research projects is exactly this. I'm attempting to take a small network and completely understand it, such that I have all the features, and among other things, will be able to see exactly how they are co-embedded. However, the reason I'm doing this is not to test my superposition claims, but to learn more generally about internal representation in models. The fact that this research might falsify the claims in this post is more incidental.
  • ^Paris is possibly a feature and The Eiffel Tower is possibly a feature but The Eiffel Tower is in Paris is not going to be a feature.
  • ^This project obviously requires the step of completely understanding toy models. I'm working on that. But if you happen to have one or more already completely understood models, please give them to me!
  • ^One example is Param Luhadiya running VPD on the ping-pong model, which is hand-coded to have superposition. Another example is me and @Lucius Bushnaq running VPD on trained sequence memorization toy models. In these decompositions we found that the components are aligned with the input features (input tokens) or output features (output tokens), and not anything in the hidden/MLP neurons. This meant that if there were more input features than neurons (which was often the case) we'd get more components than neurons. However, in this case, I don't interpret this as any evidence of how many MLP features there were.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Alignment Forum
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗