# Sejnowski is testing how brains perform transformer-like attention

Markdown copy of https://realalpha.app/s/sejnowski-is-testing-how-brains-perform-transformer-like/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Terry Sejnowski](https://realalpha.app/people/terry-sejnowski/) · Terry Sejnowski is a professor of computational neurobiology at the Salk Institute for Biological Studies.
- Host: [Andrew Huberman](https://realalpha.app/people/andrew-huberman/) · Host, Huberman Lab
- Show: Huberman Lab
- Episode: [How to Improve at Learning Using Neuroscience & AI | Dr. Terry Sejnowski](https://realalpha.app/v/etbfLTHD_VU/), Nov 18, 2024
- Moment: 2:23:23 to 2:28:30 of the episode (5 min), playing on https://realalpha.app/s/sejnowski-is-testing-how-brains-perform-transformer-like/; the episode from there: https://realalpha.app/v/etbfLTHD_VU/?t=8603

## Quote

> “my pioneer proposal is to figure out **how does the brain do self-attention**?”
> — [Terry Sejnowski](https://realalpha.app/people/terry-sejnowski/) at [2:27:04](https://realalpha.app/v/etbfLTHD_VU/?t=8824) · Huberman Lab

## Takeaways

1. Transformers use self-attention to connect words across a sentence.
2. Sejnowski proposes investigating how brains achieve a similar process.
3. He suspects the basal ganglia are part of the mechanism.

## About this segment

Terry Sejnowski describes a proposal to study temporal context and self-attention in AI transformers and brains. He suspects the basal ganglia may help explain how the brain links information across time.

From “How to Improve at Learning Using Neuroscience & AI | Dr. Terry Sejnowski”, Nov 18, 2024. [Watch the full episode](https://realalpha.app/v/etbfLTHD_VU/)

## Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

[2:23:27](https://realalpha.app/v/etbfLTHD_VU/?t=8607) Well, so the NIH has something called the Pioneer Award. And what they're looking for are big ideas that could have a huge impact, right? So I put one in recently. And here's the title is Temporal Context in Brains and Transformers. And in Brains and Transformers? Transformers. Formers. AI. Right. The key to chat GDP is the fact. There's this new architecture, it's a deep learning architecture, feed-forward network, but it's called a transformer.

[2:24:06](https://realalpha.app/v/etbfLTHD_VU/?t=8646) And it has certain parts in it that are unique. There's one called self-attention. And it's a way of doing what is called temporal context. What it does is it connects words that are far apart. You give it a sequence of words and it can tell you the association. like if i use the word this and then you have to figure out in the last sentence what did it refer to well there's three or four nouns it could have referred to but from context you can figure out which one it does and you can learn that association could um could i just play with another example to make sure i understand this correctly um i've seen these word bubble charts like if we were to say piano you'd say keys you'd say music you'd say seat you'd and then you know kind of builds out a word cloud of association and then over here we'd say um i don't know i'm

[2:24:56](https://realalpha.app/v/etbfLTHD_VU/?t=8696) thinking about the salk institute i'd say sunset stonehenge anyone that looks up there's this phenomenon salkhenge this kind of then you start building out a word cloud over there these are disparate things except i've been to a classical music concert at the salk institute symphony twice so they're not completely non-overlapping and so you start getting associations at a distance and eventually they bridge together is this what you're referring to yes i think that that's uh an example but uh it turns out that every word is ambiguous it has like three four meetings and so you have to figure that out from context and and so in other words there are words that live together and and uh that come up often and you can learn that from just by you know predicting the next word in a sentence that's how a transformer is trained you give it a bunch of

[2:25:46](https://realalpha.app/v/etbfLTHD_VU/?t=8746) words and it keeps predicting the next word in a sentence. Like in my email now, it tries to predict the next word. And it's mostly right part of the time. Okay. Well, that's because it's a very primitive version of this algorithm. What happened is if you train it up on enough, not only can it answer the next word, it internally builds up a semantic representation in the same way you described the words that are related to each other, having association It can figure that out, and it has representations inside this very large network with trillions of parameters.

[2:26:23](https://realalpha.app/v/etbfLTHD_VU/?t=8783) Unbelievable how big they were gotten. And those associations now form an internal model of the meaning of the sentence. Literally, this is something that now we've probed these transformers, And so we pretty much are pretty confident. And that means that it's forming an internal model of the outside world, in this case, a bunch of words. And that's how it's able to actually respond to you in a way that is sensible, that makes sense and actually is interesting and so forth.

[2:27:05](https://realalpha.app/v/etbfLTHD_VU/?t=8825) And it's all the self-attention I'm talking about. So in any case, my pioneer proposal is to figure out how does the brain do self-attention? right it's got to do it somehow and i'll give you a little hint basal ganglia it's in the basal ganglia that's my hypothesis well we'll see i mean you know i've i'll be working with experimental people uh i've worked with john reynolds for example who studies uh primate visual cortex and we've that traveling waves there and and there are other people that have looked at in primates and these you know and so now these traveling waves i think are also a part of the the the you know the puzzle pieces of the puzzle that are going to give us a much better view of how the the cortex is organized and how interacts with the basal ganglia. We've already been there, but we still, you know, neuroscientists

[2:28:07](https://realalpha.app/v/etbfLTHD_VU/?t=8887) have studied each one of these parts of the brain independently. And now we have to start thinking about putting the pieces of the puzzle together, right? Trying to get all the things that we know about these areas and see how they work together in a computational way. And that's really where I want to go. I love it. And I do hope they decide to fund your Pioneer Award. I do too.
