Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

AI Sherpa

AI Sherpa artwork

The United Theory of Focus

Nov 5, 202534 minAudioEpisode 21
ShareXLinkedInFacebookWhatsAppEmail

AI Sherpa is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to A.I. Sherpa at cbbsherpa.substack.com/subscribe

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

SPEAKER_01Welcome to the Deep Dive. Today we are really getting into a topic that feels both incredibly old and suddenly extremely new. We're talking about attention. You know, there's that classic quote from William James, the psychologist, everyone knows what attention is.

SPEAKER_02Right. But then you talk to anyone actually working on it now, neuroscientists, AI people. And well, the feeling is more like no one really knows what attention is. It's just such a massive term.

SPEAKER_01It covers so much ground, doesn't it? From just, you know, basic alertness, keeping your eyes open, all the way to that intense focus you need for, say, solving a really tough problem.

SPEAKER_03Exactly. So it gets messy. Okay, so our mission today is to try and slice through some of that confusion. We want to find the core idea that links all these different fields together. We've pulled together some fascinating material sources that lay out the actual

SPEAKER_01math behind attention in AI. Others that trace the history, like the huge shift with the transformer paper. And we've also got material looking at the sheer breadth of biological attention

SPEAKER_02from a psychology perspective, plus a really neat, cutting-edge fMRI study looking at how our brains handle a difficult visual search.

SPEAKER_01So quite a range.

SPEAKER_02Definitely. And the thread, the central idea that connects, you know, your brainstem to a supercomputer crunching data. It's this concept of attention as the flexible control of limited computational resources.

SPEAKER_01Limited resources. That's the key.

SPEAKER_02That's the absolute key. Every system, biological or silicon, has boggle likes. You only have so much energy or memory or processing power. Attention is basically the strategy the system uses to manage those limits.

SPEAKER_01It decides what gets priority.

SPEAKER_02Precisely. which information gets access to those scarce resources.

SPEAKER_01Right. It's scarcity management fundamentally. So what we're going to unpack for you today is, well, how things like query, key and value vectors ended up powering modern AI. We'll look at why your brain's attention systems act kind of like a spotlight, zooming in. And what happens neurally when you do something really hard, like trying to find one specific blue circle hidden among like 120 other shapes? What does that tell us about focus?

SPEAKER_02Okay, sounds like a plan. Let's start with where the idea first really took shape in the brain sciences, psychology, and neuroscience.

SPEAKER_01So defining attention as resource control in biology. We're talking about real physical limits, right? Like metabolic energy, how fast neurons can fire, how much you can hold in working memory.

SPEAKER_02Absolutely. The brain is just bombarded with sensory input constantly. If it tried to process every single bit of that at full throttle all the time, well, it just wouldn't work. It would overload instantly.

SPEAKER_01So it has to triage. Like you said, it has to pick and choose.

SPEAKER_02Exactly. And our sources tend to break biological attention down into these broad categories. The most fundamental sort of the base layer is arousal, alertness and vigilance.

SPEAKER_01OK, so this is the general on switch, the overall level of engagement.

SPEAKER_02Pretty much. Think of it as the system's overall readiness. It's deeply tied to your sleep wake cycle and the circuits controlling it are way down in the brainstem. Very old, evolutionarily speaking.

SPEAKER_01And this general state isn't just on or off. It's modulated chemically, right, by neuromodulators. Can we talk about those?

SPEAKER_02Oh, absolutely. It's like a chemical orchestra, as you put it. A key player is norepinephrine. It comes from a tiny spot in the brainstem called the locus coruleus. Its main job is general alertness. And it projects really broadly, almost like spraying the whole cortex, getting it ready.

SPEAKER_01OK, so that's the wake up and pay attention signal.

SPEAKER_02In a sense, yeah. Then you've got acetylcholine, which is really important for orienting, for shifting your focus towards something important that pops up. And then there's dopamine, especially active in the prefrontal cortex, which is more involved in the why. The executive control, the decision making about where and why we should allocate these attentional resources.

SPEAKER_01It's interesting how the anatomy fits the function there. These brainstem systems like norepinephrine, they spray everywhere, which makes sense for a general wake-up call.

SPEAKER_02Exactly. It's a global signal. Very different from, say, selecting one specific visual input. That requires more targeted mechanisms.

SPEAKER_01Right. And crucially, for this general alertness, more isn't always better, is it?

SPEAKER_02Not at all. The sources bring up the classic Yerk-Dogson curve. It shows this relationship between your arousal level and how well you perform on a task, especially a difficult one.

SPEAKER_01Ah, yes. The inverted U shape.

SPEAKER_02That's the one. Performance is poor if you're barely awake. You know, low arousal.

SPEAKER_01Yeah.

SPEAKER_02Then it climbs up as you become more alert, hits a peak.

SPEAKER_01And then it actually drops off again if you get too aroused.

SPEAKER_02Exactly. Too much arousal, maybe extreme stress or too much caffeine, whatever. And your performance tanks again. Your mental resources get kind of hijacked by irrelevant stuff like anxiety, racing thoughts, maybe just sensory overload.

SPEAKER_00So being hyper alert isn't optimal for complex thinking.

SPEAKER_02Not usually. No. It shows that even this basic generalized attention system has its limits and needs to be in the right zone. You need that sweet spot.

SPEAKER_01Okay, so that's the baseline readiness. Let's move into sensory attention. This is where we get more specific, deploying focus to particular inputs. And this is where the spotlight metaphor really comes in, right? Especially for vision.

SPEAKER_02Yes. Vision dominates primate sensory input, so it's the most studied area. And sensory attention itself breaks down further. First, there's spatial attention focusing on where something is.

SPEAKER_01And that happens in two main ways, overt and covert.

SPEAKER_02Right. Overt attention is the obvious one moving your eyes. Those rapid eye movements are called saccades. Your favea, the center of your retina, has the highest resolution. So deciding where to point your favea is deciding where to deploy your best visual processing resources. And researchers can track those eye movements during tasks like making a sandwich

SPEAKER_01or something to figure out what you're thinking step by step.

SPEAKER_02Exactly. Saccades could be driven bottom up like a sudden flash of light grabbing your attention or top down like when you're deliberately searching for your keys.

SPEAKER_01But then there's the really interesting one, covert attention. Mentally focusing somewhere without actually looking there.

SPEAKER_02Yes. You keep your eyes fixed straight ahead, but you mentally shine the spotlight on a location off to the side. And it works. If you cue someone to pay attention to a spot, they're faster and more accurate at detecting something that appears there, even if their eyes haven't moved.

SPEAKER_01So the mental allocation of resources makes a real difference. How does the brain do that? What's going on neurally?

SPEAKER_02It's fascinating. The premotor theory of attention suggests that the same brain circuits that plan eye movements are also involved in controlling this covert spotlight. Take the frontal eye field, the FEF. It's in the frontal lobe, helps control voluntary saccades. If you stimulate the FEF electrically, but at a level too low to actually trigger an eye movement,

SPEAKER_01You still get the effects of covert attention, like better performance at that mentally attended location.

SPEAKER_02Exactly. It's like the brain starts preparing the saccade and that preparation is the deployment of covert attention, even if the final move your eyes command doesn't happen.

SPEAKER_01Wow. So what does this mental spotlight actually do to the neurons processing information from that attended location? Is it just turning up the volume?

SPEAKER_02It's a bit more sophisticated than just volume. Yes, the firing rates of neurons representing that stimulus do increase, maybe by 20 or 30 percent, but maybe even more importantly, the variability of their firing goes down.

SPEAKER_01Variability? You mean how consistent their response is from moment to moment, measured by the Fano factor rate?

SPEAKER_02Precisely. Attention makes the neuron's responses more reliable, less noisy. It reduces that trial-to-trial jitter. It also decreases noise correlations between neurons.

SPEAKER_01Okay, why is reducing that variability, that noise, so important? Maybe more than just boosting the firing rate.

SPEAKER_02Well, think of it like this. Increasing the firing rate is like shouting louder. Decreasing the variability is like speaking more clearly, with less static on the line. By reducing the noise, you dramatically increase the signal-to-noise ratio. That makes it much easier for the next brain area down the line to reliably figure out what message that neuron is sending.

SPEAKER_01Makes sense. Clearer signal, better communication. And this often involves synchronizing neurons, doesn't it? Like in the gamma frequency band.

SPEAKER_02Yes. Increased synchronization in the gamma band around 30 to 70 hertz is often seen with attention. It helps bind together the neurons representing the attended object so they can have a stronger coordinated impact downstream. And structures like the pulvinar in the thalamus are thought to help manage the

SPEAKER_01synchronization, sort of gating the information flow based on what's currently being attended.

SPEAKER_02Exactly. The pulvinar seems to act like a central hub, coordinating communication across different cortical areas to prioritize the attended information.

SPEAKER_01Okay, so that's focusing on where? What about focusing on what? Like a specific feature? That's feature attention.

SPEAKER_02Right. Here, you're cued to pay attention to a characteristic, say, the color red or lines tilted at a 45-degree angle.

SPEAKER_01And this helps you detect that feature better, even if it's faint. Right.

SPEAKER_02Yes, exactly. Classic experiments show you're much better at spotting faint striped patterns, called gratings, if you're told beforehand which orientation to look for. Your visual system kind of pre-tunes itself. And a key difference here compared to spatial attention is that feature attention

SPEAKER_01is spatially global, isn't it?

SPEAKER_02That's a crucial distinction. If you attend to red, neurons that respond to red get modulated across your entire visual field, no matter where the red thing might be. Spatial attention is pinned to a specific location, a spot on your retina. Feature attention affects all neurons tuned to that feature, everywhere. And there's a model for how this works neurally, the feature similarity gain model, FSGM. Yes. The FSGM describes this quite elegantly. It suggests that attention works multiplicatively. It scales a neuron's response based on how much that neuron

prefers the attended feature.

SPEAKER_01So if I'm looking for blue neurons that like blue fire more strongly, but what about neurons that like say yellow? Does the FSGM say they get turned down? Is it enhancement and suppression?

SPEAKER_02Precisely. It's an active contrast enhancement. Neurons tuned to the attended feature get a boost. Neurons tuned to very different or opposite features actually get the responses actively suppressed. It sharpens the representation, making the attended feature really pop out nearly while pushing down the distractors.

SPEAKER_01Okay, that makes sense. Which leads us nicely into object attention, focusing on a whole object, not just a location or a feature.

SPEAKER_02Right. In simple scenes, your brain might automatically group features into objects pre-attentively. But in cluttered, complex scenes, you often need attention, maybe even serial processing, moving your focus around to bind features together and segregate out coherent objects.

SPEAKER_01And once you've locked onto an object, attention seems to stick to it.

SPEAKER_02Yes. Research shows it's cheaper, faster, and less effortful to shift your attention within the boundaries of an object you're already attending to. compared to shifting the same distance to a point outside that object. The object itself becomes the unit of attentional selection.

SPEAKER_01Fascinating. Okay, finally, let's zoom out to the highest level, attention linked with higher cognition and executive control.

SPEAKER_02This is where the prefrontal cortex really comes into play. It's about coordinating everything, linking what you're seeing now with your goals, your memories, your knowledge. Attention, in this sense, is kind of the output of this executive control system.

SPEAKER_01And it heavily interacts with memory.

SPEAKER_02Absolutely critical interaction. Attention is the gatekeeper for encoding memories. If your attention is divided when you're trying to learn something, well, you probably won't remember it consciously later. The resources needed to consolidate that memory just weren't fully allocated.

SPEAKER_01The classic multitasking is bad for learning finding.

SPEAKER_02Pretty much. But it goes deeper. Even implicit learning, picking up on statistical patterns without realizing it, is shaped by attention. Studies show that if you only attend to, say, red shapes, you only learn the statistical regularities associated with those red shapes, even if there are equally strong patterns among ignored blue shapes happening at the same time. Your brain actively filters out the patterns and the stuff you're not paying attention to. Yes. And one more thing about dynamics. Attention can fight against biological processes like adaptation.

SPEAKER_01Adaptation. That's when neurons reduce their firing if they see the same thing over and over, so that changes stand out more.

SPEAKER_02Exactly. It's a useful bottom-up mechanism. But if your task requires you to keep monitoring that repeated stimulus, top-down attention can step in and actually counteract the adaptation, keeping the neurons' response high. It shows flexible, goal-directed control overriding an automatic process.

SPEAKER_01It's really amazing how these intricate biological systems, the brain regions, the chemicals, the synchronized waves, all ultimately serve this one core principle of managing limited resources.

SPEAKER_02It is. And what's equally amazing is that engineers facing similar resource limits in computers essentially arrived at a mathematical solution that tackles the same fundamental problem.

SPEAKER_01And that solution revolves around query, key, and value QKV.

SPEAKER_02That's the heart of it. QKV provides the formal, mathematical definition of attention in deep learning. At its core, it's calculating a weighted sum of information where the weights are determined by how similar things are. Okay, let's try an analogy first because query, key, value sounds a bit abstract. Sure. Imagine you're in a library and you have huge stack of index cards. That's all your available information, your potential values. Now, you have a specific question you want answered. That's your query. To find the relevant cards,

you look at the title or keyword written on the tot of each card.

SPEAKER_02Those are the keys. You compare your query to all the keys. The cards whose keys are the best match for your query get pulled out. The actual information written on those selected cards is the value.

SPEAKER_01Ah, I see. So the final answer, the output, is basically a blend of the information, the values, from the most relevant cards, weighted by how well their keys matched my query.

SPEAKER_02Exactly. It's like a very sophisticated soft search and retrieval mechanism. Formally, you compute an output vector, let's call it OJ Day, the answer to your J3, by taking a weighted sum of all the possible value vectors, gb...

SPEAKER_01Time awaits, the scaling factors for each value come from comparing the query jailer to each key jailer, using some similarity function, vjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj This whole operation for all queries at once can be written down very neatly using matrices. That's the equation you see in the papers, the one that actually runs in the code. Right, the matrix form. OJD WVV times text softmax WKTWUQ looks a bit intimidating.

SPEAKER_02It does, but let's focus on that crucial piece, the softmax function.

SPEAKER_01Okay, what's special about softmax here?

SPEAKER_02Softmax is the resource manager. It takes all the raw similarity scores between a query and all the keys and it normalizes them. It squashes them so that they all add up to one.

SPEAKER_01Ah, so it forces the model to distribute a fixed amount of attention weight across all the possible values.

SPEAKER_02Exactly. It represents that limited resource. You have a total attention budget of one for each query, and Softmax decides how to spread that budget across the different pieces of information based on relevance. You can't just pay maximum attention to everything.

SPEAKER_01Got it. Okay, so that's the basic QKV mechanism. Now, what are the main types of attention used in AI models? Let's start with the big one, self-attention. Self-attention.

SPEAKER_02Self-attention is arguably the most impactful variant. What makes itself is that the queries, keys, and values all come from the same source. They're all derived from the input itself. Let's call it $6. So QCOVX, essentially.

SPEAKER_01So the input is attending to itself. Why is that useful? It allows the model to understand the internal relationships within the input data.

SPEAKER_02If the input is a sentence, like the dog chased the ball down the riverbank, self-attention lets the model figure out, when processing the word bank, whether it relates more to river, meaning the edge of the water, or if it were a different sentence, maybe to money, meaning a financial institution, it captures context.

SPEAKER_01Right. It sees how all the parts of the input relate to each other all at once, which is different from older models that went word by word.

SPEAKER_02Massively different. Okay. The other main type is attention with a learnable query, sometimes called a QAC.

SPEAKER_01Learnable query. How does that work?

SPEAKER_02Here, the keys and values still come from the input, KVX usually. But the query, Q, is not derived from the current input. Instead, it's a separate set of vectors that the model learns during training. These learned queries are fixed. They don't change with each new input.

SPEAKER_01OK. So what's the point of a fixed query? What's it asking? Think of it like the model learning some general questions to ask of any input.

SPEAKER_02If you're training on thousands of different images, a learned query might evolve to ask something like, where are the important edges in this image? Or what's the dominant texture? It's looking for common, high-level features that appear across many examples in the data set.

SPEAKER_01I see. So it's less about the internal structure of this specific input and more about extracting some consistent, predefined types of information from any input you give it.

SPEAKER_02Exactly. And because the query size is fixed, the output size is also fixed, which can be useful. You see this used in things like graph neural networks or sometimes in vision for feature extraction.

SPEAKER_01Makes sense. Now, to make these attention mechanisms more powerful, especially in the big transformer models, they introduced multi-head attention. What's that about? Multi-head attention is actually a pretty straightforward idea, but very effective. Instead of having just one attention calculation, you run multiple attention heads in parallel. Multiple QKV calculations happening at the same time.

SPEAKER_02Yes. And critically, each head gets its own set of learned weight matrices, WWK, WVD. So head one learns one way to relate queries, keys, and values. Head two learns a different way. Head three another, and so on.

SPEAKER_01Ah, so they can specialize. Like one head focuses on grammar, another on semantics, maybe another on how far apart words are.

SPEAKER_02Precisely. It allows the model to simultaneously attend to different kinds of relationships or different aspects of the input space. It adds diversity. Each head computes its output, and then you just concatenate all the head outputs together and usually run them through one final linear layer to mix the information.

SPEAKER_01Gives the model more perspectives on the input. Clever.

SPEAKER_02Very much so. Now, this mathematical framework also gives these attention mechanisms some really important properties, especially when you start applying them to things like images or other data where spatial arrangement matters. We're talking about invariance and equivariance.

SPEAKER_01Okay, those sound technical. Let's nail down the definitions.

SPEAKER_02Right. An operation, let's call it a dollary, is equivariant if changing the input in some way results in the same change being applied to the output. So if you permute the input $6, the output seller gets permuted in exactly the same way. Like shifting an object in an image shifts the calculated output related to that

SPEAKER_01object by the same amount.

SPEAKER_02Exactly. The output moves with the input. Now, an operation is invariant if changing the input leaves the output completely unchanged. Producing the input $6 gives you the exact same output

SPEAKER_01Okay, I can see why these matter for images. If I'm doing image segmentation, drawing outlines around objects, and I rotate the input picture, I definitely want the output outlines to rotate too. That's equivariance.

SPEAKER_02Correct. You need equivariance for tasks where the output spatial structure must match the inputs, like segmentation or detection.

SPEAKER_01But if I'm doing image classification, just labeling the whole image as cat or dog, then rotating the input image shouldn't change the final label. The label should stay cat. That's invariance.

SPEAKER_02Exactly. Classification needs invariance. And the really neat thing, the mathematical beauty of it, is that the two main types of attention we discussed map directly onto these properties.

SPEAKER_01Oh, how so?

SPEAKER_02There's a theorem that shows self-attention, A-U-C, or Q-K-V-X, is inherently spatially permutation equivariant.

SPEAKER_01Wow, okay. That's powerful for pizza-level tasks.

SPEAKER_02It is. And attention with a learnable query is inherently spatially permutation invariant.

SPEAKER_01That's elegant. The structure of the attention mechanism itself gives you the property you need.

SPEAKER_02Precisely. And this was a big deal for applying transformer-like ideas to vision. Because traditional convolutional neural networks, CNNs, are only really equivariant to translations, shifting, not generally to rotations or other permutations. Attention offered a new way to handle spatial structure.

SPEAKER_01Got it. Which brings us squarely to that landmark 2017 paper, Attention is All You Need. Quite a title.

SPEAKER_02Huh. Yes. Apparently a nod to the Beatles. All you need is love. And the name Transformer itself. Well, one of the authors, Jacob Ouskarite, just kind of liked the word and had a hunch that attention without needing recurrence would be enough.

SPEAKER_01And that hunch was the absolute core of the breakthrough, wasn't it? Getting rid of recurrence.

SPEAKER_02Yes, that was the game changer. Before the transformer, sequence modeling essential for language heavily relied on recurrent neural networks, or RNNs, things like LSTMs, long short-term memory networks, which were great innovations back in the 90s.

SPEAKER_01LSTMs solved the vanishing gradient problem that plagued earlier RNNs, but they still had a fundamental bottleneck.

SPEAKER_02Sequential processing. They had to process input step by step. Word 1, then word 2 based on word 1's output, then word 3 based on word 2's, and so on. You couldn't really speed it up dramatically by throwing more computers at it, because each step depended on the previous one.

SPEAKER_01No parallelization.

SPEAKER_02Exactly. The transformer, by using self-attention to look at the entire input sequence all at once, completely ditched that sequential recurrence. And that unlocked massive parallelizability. Meaning you could train these models way, way faster on modern hardware like GPUs. Orders of magnitude faster. That's the key historical context. The paper didn't just introduce a new architecture. It demonstrated state-of-the-art results on tasks like machine translation while training in a fraction of the time, like 3.5 days on eight GPUs compared to models that took huge

efforts before.

SPEAKER_02That speed up is what really kicked off the current AI explosion. But if you throw out recurrence, you lose the model's built-in sense of word order, right?

SPEAKER_01How did they put that back in?

SPEAKER_02Good question. They needed to explicitly add information about the position of each word or token in the sequence. They did this with positional encoding.

SPEAKER_01How did that work? They created fixed vectors based on sine and cosine functions of different

SPEAKER_02frequencies, dependent on the token's position, like sine for even dimensions, cosine for odd. These positional vectors were simply added to the regular word embeddings at the bottom of the model.

SPEAKER_01Why sine and cosine seems a bit arbitrary. The authors argued this choice might allow the model to generalize better, to potentially handle sequences longer than the ones it saw during training, because sine and cosine waves have predictable patterns that can extend outwards. Interesting. And the legacy of this paper, it's hard to overstate, isn't it?

SPEAKER_02Absolute zaggering. Cited, what, over 173,000 times by now? It directly led to all the major models we hear about today, encoder-only models like BERT, which revolutionized natural language understanding in 2018. And crucially, the decoder-only models like OpenAI's GPT series starting also in 2018, which really triggered the whole large language model phenomenon.

SPEAKER_01And the transformer architecture itself is now everywhere, not just text, but vision, speech, even robotics.

SPEAKER_02It really is the foundational building block of modern AI. Okay, so we've seen the biological complexity and the mathematical framework of the artificial systems. Now, let's try to connect them more directly. How do these concepts map onto each other? And how does attention play out in real-world data like that fMRI study?

SPEAKER_01Well, the analogies seem clearest in vision, maybe. AI vision systems often use two flavors of spatial attention that seem to mirror the overt-convert distinction in biology.

SPEAKER_02Right. You have what's called hard attention. This is where the AI model chooses just one small patch or region of the input image to process in detail, often sequentially, moving its focus around. It's very efficient resource-wise, but it's usually non-differentiable, making it tricky to train with standard methods. It feels a lot like biological overt spatial attention moving the fovea.

SPEAKER_01Like a secade in the machine. And the alternative is soft attention.

SPEAKER_02Yes. Soft attention is the more common type, the one based directly on that QKV softmax mechanism we discussed. It computes a weighted average over the entire input representation. It's fully differentiable, easy to train, and it dynamically reweights information across the whole scene simultaneously. This maps really nicely onto biological covert spatial attention, that mental spotlight modulating activity everywhere at once.

SPEAKER_01Okay, those map quite well. But what about self-attention, the QKV variant? Does that have a strong biological parallel?

SPEAKER_02That's where the analogy starts to fray a bit, I think. While self-attention is incredibly powerful for computation, it doesn't map quite as neatly onto how we typically think about biological attention. Biological attention, especially top-down control, seems heavily reliant on recurrent feedback loops, signals coming back down from higher brain areas based on the current task or goal. Self-attention in its pure form is often more about creating a rich, context-aware encoding of the input in one feed-forward pass.

SPEAKER_02Sometimes it just learns something similar to a convolution. So biology uses task goals and maybe prediction errors to dynamically guide focus

SPEAKER_01backwards through the system, whereas standard transformers largely got rid of that recurrence for the sake of parallel speed.

SPEAKER_02That seems to be a key difference, yes. They traded some biological plausibility for that huge gain in processing speed.

SPEAKER_01but where the models do align well is feature attention.

SPEAKER_02Yes, I think so. When AI models implement feature attention, often in convolutional neural networks, they typically do it by dynamically rescaling entire feature maps. This creates a spatially global modulation based on the feature being attended. and that aligns perfectly with the biological finding that feature attention is spatially global, affecting neurons tuned to that feature across the whole visual field, just like the feature similarity gain model describes. Both use multiplicative scaling, too.

SPEAKER_01Okay, interesting. So let's bring this down to earth with that case study mentioned in the sources, the fMRI study using conjunctive visual search or CVS.

SPEAKER_02Right. This is a great example of putting attention under pressure. CVS isn't like finding a single red dot among blue dots. That's easy. A feature search. Conjunctive search means looking for a target defined by a combination of features.

SPEAKER_01Like the example given, find the blue circle in a field containing blue squares and red circles.

SPEAKER_02Exactly. You can't just look for blue or just look for a circle. You have to check items, binding the color and shape together, likely one by one or in small groups. It's slow, effortful, serial search that really taxes attentional resources.

SPEAKER_01And the study design sounds like they made it deliberately hard. 120 distractors, low contrast, and the screen blurred as soon as the person responded.

SPEAKER_02Yeah. That last part is clever. It stops the person from continuing to search after they've found the target, ensuring the fMRI signal captures the demanding search period itself, not just the verification afterwards.

SPEAKER_01So what did they find? Which brain areas lit up during this difficult task?

SPEAKER_02They found a really robust network activation. Starting in the back, in the occipital lobe, the visual processing hub, the strongest activation was in the cuneus. That's primary visual cortex, V1, handling basic stuff like line orientation and motion. But they also saw activity in other occipital areas like the lingual gyrus and middle occipital gyrus, confirming that the task engaged the whole visual hierarchy, both the what's pathway, ventral stream, and the where pathway, dorsal stream.

SPEAKER_01Okay, visual areas working hard. Makes sense. What about higher up?

SPEAKER_02In the frontal lobe, the executive control region, they saw clear activation in the middle frontal gyrus. This area includes the dorsolateral prefrontal cortex, and importantly, the frontal eye fields, the FEF we talked about earlier, involved in planning eye movements and covert attention.

SPEAKER_01So the control systems for directing the search were active?

SPEAKER_02Definitely.

SPEAKER_01Oh.

SPEAKER_02And perhaps most revealingly, they found significant activation deep inside the brain, in the insula.

SPEAKER_01The insula. What's its role here? The insula is often linked to interoception awareness of internal body states, but also crucially to detecting salient events and maintaining task-level control

SPEAKER_02and focal attention, especially when things get difficult or require sustained effort. Its activation here likely reflects the high vigilance and focused effort needed to sift through those 120 distractors. It's the brain region saying, okay, this is hard, stay focused.

SPEAKER_01Wow. And they also saw activity in the cerebellum.

SPEAKER_02Yes, in the posterior lobe, an area called the declive. The cerebellum is traditionally linked to motor control, but it's increasingly implicated in cognitive functions, too. Here, the activity might relate to coordinating the complex visual search, perhaps forming or executing the optimal search strategy.

SPEAKER_01So that's what turned on. Did anything turn off?

SPEAKER_02Yes, and predictably so. They observed deactivation, a negative correlation with the task in core areas of the default mode network, the DMN.

SPEAKER_01Ah, the DMN. The network that's usually active when our minds are wandering, thinking about ourselves or the past or future, right?

SPEAKER_02Exactly. Areas like the medial prefrontal cortex, the posterior cingulate cortex, and the precuneus when quiet during the demanding CVS task. This suppression of the DMN makes sense. You need to shut down internal chatter and mind-wandering to dedicate resources to the difficult external task.

SPEAKER_01It highlights the resource conflict. Okay, so this CVS task seems really effective at engaging the brain's attention networks.

SPEAKER_02Highly effective. The researchers pointed out its value for things like clinical fMRI. If you need to map out critical brain areas near the visual cortex before surgery, using a demanding task like this gives a much stronger, more reliable activation signal compared to just passively showing someone flashing checkerboards.

SPEAKER_01A practical application of understanding attention. OK, so thinking forward, how else might AI learn from biology's attention mechanisms beyond the basic QKV?

SPEAKER_02Well, the sources suggest a few avenues. One is incorporating more architectural insights. For example, we know in humans attention seems to modulate auditory information earlier in the processing stream than visual information. Maybe AI models should have attention mechanisms act at different depths depending on the data type.

SPEAKER_00Interesting.

SPEAKER_02Also, there's that finding that sometimes removing self-attention from the very first layers of a vision transformer actually helps performance and makes the model's internal states look more like human fMRI data. It suggests maybe the brain uses cheaper fixed filters for low-level stuff and saves the expensive flexible attention for later, higher-level integration.

SPEAKER_01Maybe AI shouldn't use the most powerful tool everywhere. What about dynamics?

SPEAKER_02Right. Biology has adaptation neurons getting tired of the same input. AI models typically don't. Incorporating adaptation and then the attentional counterman to adaptation for relevant stimuli could make AI more sensitive to change and less swamped by redundancy.

SPEAKER_01Making change pop out, essentially.

SPEAKER_02Exactly. And then there's the deployment strategy. We could train AI not just to perform well, but to deploy its attention intelligently, perhaps by learning from human data, like eye tracking scan paths from experts performing a task or having humans explicitly label where attention should go.

SPEAKER_01Teaching the AI how to look, not just what to find.

SPEAKER_02Yes. And finally, maybe incorporating more biological motivations, things like the expected value of control.

SPEAKER_01Expected value of control. It's the idea linked to brain areas like the dorsal anterior cingulate cortex that

SPEAKER_02we allocate cognitive control, including attention, based on whether the expected benefits outweigh the effort costs. It's a cost-benefit analysis for thinking.

SPEAKER_01And related to that is curiosity.

SPEAKER_02Exactly. Things that are novel, surprising, or confusing naturally capture our attention because they might be highly informative. Building computational versions of curiosity or expected value could help AI systems guide their own focus towards the most important or uncertain parts of their environment rather than just passively processing whatever comes next. Hashtag Outray Outro.

SPEAKER_01So we started with that seeming contradiction, William James saying everyone knows what attention is and the modern reality being much fuzzier. Yeah, but I think this deep dive really highlights the unifying thread, doesn't it? This core idea of attention as the brain's and now AI's way of flexibly managing

SPEAKER_02inherently limited resources.

SPEAKER_01Absolutely. We traced it from basic arousal controlled by neuromodulators through that neural spotlight in the cortex involving the FEF, maybe the pulvinar, gamma wave sharpening the signal.

SPEAKER_02All the way to the mathematics of query, key and value vectors, softmax normalization, and the transformer architecture that basically eats the AI world now. And we saw those resource limits in action with that tough conjunctive visual

SPEAKER_01search task, forcing the brain to engage specialized control circuits in the insula and frontal lobes while actively suppressing the wandering mind of the default mode network.

SPEAKER_02And it makes you think. Biological attention isn't perfect, right? We get distracted. Switching tasks takes effort. Our focus wanders.

SPEAKER_01True. They feel like bugs sometimes.

SPEAKER_02But maybe some of those bugs are actually features. That distractibility keeps us aware of our surroundings. The switching cost prevents us from constantly flitting between things. They evolve for a reason, perhaps related to survival or efficient exploration.

SPEAKER_01That's a really interesting point. So as we build more general artificial intelligence, should the goal be to create systems with perfect, unwavering, limitless attention? Or should we maybe be thinking about building in some of those biological costs and limitations?

SPEAKER_02Could making AI pay for attention, making it manage its own cognitive effort, actually lead to systems that are better at self-regulating, prioritizing, and maybe even surviving in complex environments more like we do?

SPEAKER_01Something to definitely chew on? And perhaps for you, the listener, think about it right now. Where is your attention? What internal or external factors are guiding that limited resource as you process this very information? What did you filter out just now to focus on this? What's the expected value of continuing to listen versus checking your phone? A question for the brain's control circuits. That really is a deep dive for another time. Thank you for joining us for the deep dive.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. AI Gets a Body

    Sep 3, 20267 minAudio

    A.I. Sherpa is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to A.I. Sherpa at cbbsherpa.substack.com/subscribe

    Credit the people on this episode

  2. The Most Advanced Robot Vision, 8/20/26

    Aug 21, 20269 minAudio

    Get full access to A.I. Sherpa at cbbsherpa.substack.com/subscribe

    Credit the people on this episode

  3. AI & Neuroinclusive Work

    Aug 13, 202610 minAudio

    A.I. Sherpa is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to A.I. Sherpa at cbbsherpa.substack.com/subscribe

    Credit the people on this episode

  4. The 2026 Baseline Agentic Workflows

    Jul 23, 20267 minAudio

    The Clearing Collective publishes A.I. Sherpa. It is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to A.I. Sherpa at...

    Credit the people on this episode

  5. Alpha Fold 3: Components and Complexes

    Jul 4, 20265 minAudio

    A.I. Sherpa is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber. Get full access to A.I. Sherpa at cbbsherpa.substack.com/subscribe

    Credit the people on this episode