Patrefans
3blue1brown from patreon
3blue1brown patreon

Half draft of the next transformer video

🕑 Added 2024-07-03 11:35:35 +0000 UTC

Comments

Stefano Sorrentino

The way you can describe such abstract concepts in such an intuitive way never ceases to amaze me. Non-linearity and activation functions are perfectly described

sylfae

Modern LLM architectures don't seem to use biases, I wonder why?

Gabriel Bergqvist

👍

Lawrence Chan

1. It's unfortunate from an interpretability perspective, which is what Grant is drawing on here. If it were the case that each neuron was one concept, then we could read off what concepts the network is using or even how the MLP operates by looking at the pattern of neuron activations (see e.g. Bau et al 2020 (https://www.pnas.org/doi/10.1073/pnas.1907375117) and Geva et al 2020 (https://arxiv.org/abs/2012.14913) for examples of this approach). But because we think neural networks represent concepts in superposition, then not only can we not just interpret each neuron by itself, there's _no_ orthogonal transformation that recovers all the features! this poses a serious roadblock if the goal is to say, reverse engineer what algorithm a neural network is implementing. And you're absolutely correct that this is a big part of why neural networks are so efficient -- GPT-3 seems to know way more than ~13k concepts, for example. If we were talking from an old parallel distributed processing (https://en.wikipedia.org/wiki/Parallel_processing_(psychology)) perspective, then we'd say this is a great thing, and exactly what we're going for!

Christian K

Just joined patreon to view this video ;-). At 2:09 the volume at the end of the word goal is somehow a bit to low. At 9:07 there is a little wind noise during the "p"s

Sasha Goldenson

👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻

Gabriel Bergqvist

A related link: https://softwaredoug.com/blog/2022/12/26/surpries-at-hi-dimensions-orthoginality (Thanks "niten" at http://invite.virtualvalley.ai )

Isaac Brooks

Wow... I feel like this snippet does so well to reinforce the idea of what matrix-vector products can do and represent. The way you described the 2 ways to think about a matrix-vector product in the context of this example is great! I think fewer students would be discouraged from linear algebra class in undergrad if they had such a concrete example of how powerful the concepts can be, and this series is incredible for that.

Benjamin Bailey

If you made up the final output distribution I feel like you should have a non zero value for "boxing" given that there should be a fair amount of association between that name and that sport because of the actor and the "Creed" series.

Reginald Carey

Nicely done I got sucked in right away

Mark A Bjerke

Another enjoyable journey even the stuff I don't quite understand.

卢无方 湛

crazy !

Matt Godbolt

Great stuff! A typo: "metalic" in the first set of MLP direction/qiestion examples should be "Metallic". Looking forward to the full version! Thanks!

Michael Kali

Since I can see here only the beginning of the comment, I am posting the rest of the comment as replies: 2) at 10:45, I would add some emphasis animation to the weights when speaking about the linear operations at the beginning of the sentence, followed by empasis animation to the neurons at the end of the sentence when mentioning the non linear operation. Content notes: 1) at 08:00 you give a very good motivation for the bias vector that is added, but then at 12:39 you kind of take a step back and say it is difficult to motivate why is the bias is needed, which I found a bit confusing. 2) When talking about the activation function, consider mentioning that if it wasn't for the non-linear functions such as relu - every MLP, no matter how big it is completely equivalent to just one matrix multiplication to the input vector (because A*(B*(C*(D*v)))=(A*B*C*D)*v=M*v), and so it is intuitive that for anything more sophisticated than a simple matrix multiplication - we must have a non linear function. I found this a very good intuitive explanation for the need of the activation functions. Thanks!

Michael Kali

A great video as always :-) Animation notes: 1) at around 04:18 - the white dashed line jitters. I think that what the renderer does is to take the length of the dashed line, floor it to an integer number of the dash length, and the result is the number of dashes. This flooring operations introduce this discontinuity in the animation (If I got it right). It is somewhat esthetically obnoxious, so I would recommend fixing it. (Though not at a high priority, as those things are always time consuming. perhaps changing the linestyle is a faster patch ><) 2) at 10:45, I would add some emphasis animation to the weights when speaking about the linear operations at the beginning of the sentence, followed by empasis animation to the neurons at the end of the sentence when mentioning the non linear operation. Content notes: 1) at 08:00 you give a very good motivation for the bias vector that is added, but then at 12:39 you kind of take a step back and say it is difficult to motivate why is the bias is needed, which I found a bit confusing. 2) When talking about the activation function, consider mentioning that if it wasn't for the non-linear functions such as relu - every MLP, no matter how big it is completely equivalent to just one matrix multiplication to the input vector (because A*(B*(C*(D*v)))=(A*B*C*D)*v=M*v), and so it is intuitive that for anything more sophisticated than a simple matrix multiplication - we must have a non linear function. I found this a very good intuitive explanation for the need of the activation functions. Thanks!

Steve Chantry-Taylor

So it's like the model having an "Aha" moment when it combines Michael & Jordan and thinks of Basketball

Gabriel Bergqvist

As always, thanks for great videos and materials. I'm teaching AI to students and developers, and I love the effect your videos have on how well my students understand the topics. Kudos and thanks for your great work. I make it clear they should subscribe to your YouTube channel, obviously. Now my feedback, as requested: 1. "However, unfortunately, there’s pretty good evidence that neurons rarely correspond to clean interpretable features." - Why "unfortunately", when that is exactly what makes these MLPs scale at all? 2. I actually like this part of an explanation I got from Claude-3.5-Sonnet: 'The Curse of Dimensionality Becomes a Blessing: In high-dimensional spaces, most randomly chosen vectors tend to be nearly orthogonal to each other. This counterintuitive property is often called the "blessing of dimensionality" in this context.' - IMHO, "most randomly chosen vectors tend to be nearly orthogonal to each other" is the key here.

Jake Ehrlich

You’re in good hands speaking with Neel Nanda about this stuff. His YouTube videos are great…he does swear a lot in them though lol. One thing to note though is that modern LLMs don’t tend to use bias in MLP or attention anymore. It just doesn’t appear to have much of an impact on the final result. I think it’s fine to use bias as part of the explanation for how this might work but probably also worth explaining how it might work without bias if you tweak the weights a bit.

Michael Kokosenski

Awesome stuff, can't wait for it to launch. Some general thoughts: 1. 5:22 you: "when this sequence of vectors", me: "ehh, which vectors? i think they're either the input tokens, or the output from the previous layer, or a combo of both, but not sure" 2. 7:50 nit: "metallic" 3. 4:17 me: "ah, i should really re-read my linear algebra texts..."

Alex Loftus

Excellent! Knowledge localization and interpretability is what I am getting my PhD in. I recommend this article for a good review of current work: https://arxiv.org/pdf/2405.00208 The interpretability channel in the EleutherAI discord is very active, as well as the mechanistic interpretability discord. Neel Nanda, Chris Olah, David Bau, and Jacob Steinhardt are major names in this field.

Tom Lee

Yes! I've been waiting for this video, I love the series. Just imagine... the Youtube algorithm will recommend this video to millions of Michael Jordan fans out there. That should bump up the views more than the very few people that are interested in fluffy blue creatures! :)

Ryland Goldman

There's a typo around 4:23 - you spelled "Michael" as "Micahel" in the dot product

Michel Speiser

Very interesting! I like this reasoning, my main critical comment is that I feel like it dismisses the contextualization done by the transformer beforehand. Assuming that we have the tokens 'Michael' and 'Jordan' initially, it seems to me (based on my understanding of previous videos) that these tokens could mutually contextualize each other in the transformer's attention blocks, probably in the direction of the basketball player. Some words explaining why this does not happen (perhaps the number of attention heads is too small to produce this level of contextualization) would be helpful IMHO


More Creators