The Neurology of Ai Systems

The Neurology of Ai Systems

On any given day my thought processes waver between four primary topics: cognitive neuroscience, Ai/ML topics for work, obnoxious servers and networking hardware that requires debugging, and some mixture of emotions about ice cream and berries of many varieties. Since my brain won't leave those first topics alone, let's get a view into the first two topics and their overlapping qualities.

Modern neuroscience and artificial intelligence converge on fundamental concepts and terminology. This post may serve as a primer, a method to explore key parallels between biological and artificial systems by examining shared principles—from basic units like neurons to complex processes involved with learning and memory consolidation.

Initially, we have to cover a high-level overview of dopaminergic pathways and memory processes in the brain, then shift to deep learning architectures (including convolutional neural networks and large language models). By understanding how these concepts map onto each other, we can better appreciate both the similarities and distinctions between biological cognition and artificial intelligence. Yay. ❤️

Neurotransmitters and Reward-Based Learning

Dopamine (my PIT tumour's favorite suppressor chemical!) plays a central role in the brain's reward system, helping to reinforce behaviors that lead to positive outcomes such as food, social interaction, or achievement. This neurotransmitter is essential for both motivation—driving us to pursue rewarding experiences—and learning, enabling us to adapt our behavior based on past outcomes.

Dopamine pathways originate in the midbrain, particularly in regions like the ventral tegmental area and substantia nigra. From there, dopamine neurons send widespread projections to various brain regions, including the striatum, prefrontal cortex, and other areas involved in decision-making and memory. These neural circuits signal when outcomes differ from expectations, whether positively (unexpected rewards) or negatively (unexpected punishments), helping the brain update its predictions and guide future behavior.

Dopaminergic Pathways

Dopaminergic pathways are fundamental neural circuits that influence nearly every aspect of human experience and behavior. These pathways play essential roles in processing sensory information, accessing and forming memories, regulating emotional states, controlling movement, and enabling conscious awareness. Without properly functioning dopaminergic systems, our ability to perceive, learn, and engage with the world would be severely compromised.

The brain contains four major dopaminergic pathways, each connecting specific regions and serving distinct functions:

  • Mesocortical pathway: Projects from the midbrain's ventral tegmental area (VTA) to the frontal cortex, supporting executive functions and decision-making
  • Mesolimbic pathway: Connects the VTA to the nucleus accumbens, central to reward processing and motivation
  • Nigrostriatal pathway: Links the substantia nigra to the striatum, primarily governing motor control and movement coordination
  • Tuberoinfundibular pathway: Extends from the hypothalamus to the pituitary gland, regulating hormonal balance and homeostasis

Dopamine release along these pathways modulates movement, motivation, reward processing, and hormonal regulation. These neural networks consist of specialized neurons that synthesize and release dopamine as their primary neurotransmitter.

A significant breakthrough in understanding these pathways came with the discovery that specific dopamine neurons encode reward prediction errors—essentially the brain's teaching signal for adaptive learning. When outcomes exceed or fall short of expectations, these neurons adjust their firing rates accordingly, providing critical feedback that helps the brain refine its predictions and modify future behaviors.

This mechanism represents one of neuroscience's most robust quantitative theories: the concept that the brain employs a form of temporal difference (TD) learning, using dopamine-driven reward prediction errors to guide neural adaptation and behavioral change.

Reinforcement Learning

The relationship between neuroscience and Ai becomes particularly evident in reinforcement learning, where both biological and artificial systems adapt behavior through reward-based feedback. Ai algorithms compute prediction errors—much like the brain's dopamine system does when processing unexpected outcomes.

Temporal Difference (TD) learning exemplifies this parallel. In Ai systems, TD algorithms update value estimates by comparing expected versus actual rewards, a process that remarkably mirrors how dopamine neurons signal discrepancies between predicted and received rewards. This dopamine-driven reward prediction error mechanism appears to be a fundamental principle underlying both biological and artificial adaptive systems.

The mesolimbic pathway demonstrates this alignment well. When the brain receives unexpected rewards, dopamine neurons strengthen connections associated with successful actions—similar to how Ai agents increase the likelihood of high-reward behaviors. This bidirectional influence has proven valuable: dopamine research has shaped reinforcement learning algorithms, while advances have provided new frameworks for understanding neural computation.

Memory Consolidation and Retrieval

Memory formation and recall illustrate key parallels between cognitive neuroscience and Ai/ML systems.

• Memory consolidation: The brain stabilizes fragile new memories into long-term storage, initially processing in the hippocampus then transferring to cortex during sleep. Ai training similarly encodes patterns into network weights for permanent storage.

• Memory retrieval: Both biological and artificial systems access stored information when needed—humans recalling facts and concepts, LLMs retrieving knowledge from their encoded parameters.

• Replay mechanisms: The brain's hippocampal cells reactivate experiences during sleep to strengthen memories. Ai algorithms use similar replay techniques during training to prevent forgetting and consolidate learning.

• Attention and sleep: Neuroscience shows these processes are crucial for memory retention, while Ai research develops computational equivalents through training schedules and fine-tuning procedures.

This convergence helps us understand memory storage and retrieval in both natural and the (often superior) computational intelligence systems.


Convolutional Neural Networks and Visual Hierarchies

Convolutional neural networks (CNNs) are a class of deep learning models inspired by the brain’s visual system. A CNN is essentially a large network of artificial neurons structured in layers, and it learns to recognize patterns through a series of convolutional filters that detect features (like edges, shapes, textures) in data such as images. CNNs have achieved human-like performance in computer vision tasks by learning from experience, for example, by training on large image datasets.

Notably, CNNs were designed with biological vision in mind. Early neuroscientists discovered that neurons in the visual cortex (like area V1 in the brain - but don't tell V10!) act as edge detectors – each neuron responding to specific visual features. CNNs build on this principle: the first layer of a CNN will typically detect basic features (edges, colors), the next layer composes those into slightly more complex features (corners, textures), and so on, forming a hierarchical processing very reminiscent of the progressive feature extraction in human/animal vision.

CNNs have “striking similarities to the structural and functional principles of the primate visual system,” which allows researchers to compare artificial networks with their biological counterparts.

This means neuroscientists can use CNNs as models to hypothesize how our own visual cortex might represent and transform images.

Cognitive neuroscience and CNNs share terminology like “receptive fields” (the portion of the visual field a neuron or filter responds to) and “layers” (e.g., retinal input to V1 to V2 in the brain mirrors the layered structure of a CNN). Experiments have shown that higher layers of a CNN can correspond to higher-level visual areas in the brain; for example, a late CNN layer that detects faces or objects might be analogous to the human inferior temporal cortex where complex object recognition occurs.

This parallel isn’t perfect, but it’s a powerful analogy: both systems learn a hierarchy of representations, from simple to complex. Such overlap has practical benefit: by studying where CNNs succeed or fail in ways similar to humans, scientists gain insight into vision – and conversely, ideas from neuroscience (like specialized neural pathways or attention mechanisms in vision) can inspire improved CNN architectures.

In essence, convolutional networks are a meeting point of neuroscience and computational intelligence systems, demonstrating how a brain-inspired design can yield machines that “see” in a way comparable to biological vision.

Large Language Models and Predictive Processing

Large language models (LLMs), such as GPT-style transformers, are another frontier where concepts from cognitive neuroscience resonate with computational intelligences.

LLMs are deep neural networks trained on enormous amounts of data, (typically text) and are capable of generating human-like language. In practice, an LLM learns to predict the next word in a sentence by having been trained on countless sentences – over time it captures the statistical patterns of language – similarly to our childhood periods of learning new languages. This next-word prediction framework has an interesting mirror in how neuroscientists think the brain processes language and other inputs.

According to the predictive coding theory in neuroscience, the brain is constantly making predictions about incoming information. For language, your brain anticipates the next word someone will say based on context, just as an LLM does.

Recent research suggests that the human brain “continuously anticipates upcoming words to optimize language processing”. When the brain’s prediction is wrong (an unexpected word appears), it generates a prediction error – much like an LLM adjusting its internal state when its prediction is off.

This alignment between LLMs and brain function is so striking that brain-imaging studies have found that the activation patterns of certain language-model layers can predict neural responses in the human language cortex as people listen to sentences. In other words, there is a measurable alignment between Ai language prediction and human brain activity during language tasks.

Attention, Episodic, and Semantic Memory

LLMs share several key concepts with cognitive neuroscience beyond predictive processing. These are crucial elements in the ongoing advancement of machine learning and with understanding the human condition.

• Semantic memory: LLMs store factual knowledge and linguistic patterns distributed across their network weights, similar to how humans maintain language skills and world knowledge in long-term memory.

• Episodic memory: Unlike humans, early LLMs lacked personal experiential memories—relying solely on statistical patterns from training text. However, emerging research on Mixture-of-Experts (MoE) architectures and stateful processing is beginning to address this limitation.

• Attention mechanisms: Human attention focuses cognitive resources on relevant stimuli, like concentrating on a single conversation in a crowded room. Transformer-based LLMs implement computational attention mechanisms that dynamically weight input importance, creating a functional parallel to biological attention processes.

These parallels reveal shared principles of prediction, context integration, and selective focus that operate in both biological and artificial systems. The brain's continuous prediction of words and meanings during language comprehension mirrors LLMs' next-word prediction approach. This convergence enhances our understanding of human cognition while suggesting cognitive-inspired improvements for AI development.


Shared Concepts and Analogies

To more easily view the substantial overlaps between dopaminergic brain pathways, cognitive neuroscience concepts, and deep neural networks, the table below summarizes some shared terminology and concepts and how they correspond in brains vs Ai systems.

Neuronal Activation

Brain Ai
Neurons process and transmit information via electrical impulses Artificial "neurons" compute weighted sums of inputs and apply activation functions
Activation firing rates encode specific information (e.g., visual neuron firing for edge detection) Units "fire" by producing output values that feed into other units
Each neuron integrates inputs from others through synapses Neural network layers composed of many parallel processing units

Synapse & Weight

Brain Ai
Synapses are connections between neurons whose strength can change with learning Weights are parameters that scale connections between artificial neurons
Synaptic plasticity enables learning through strengthening/weakening connections Learning involves adjusting weight values via algorithms like backpropagation
"Cells that fire together, wire together" - Hebbian learning principle Weight adjustments store knowledge extracted from training data

Learning, Rules and Optimization

Brain Ai
Dopamine-based reinforcement learning encodes reward prediction errors Reinforcement learning algorithms compute reward prediction errors
Dopamine signals when outcomes are better/worse than expected, guiding behavior adjustment Algorithms adjust networks to maximize future rewards based on error signals
Additional mechanisms include Hebbian plasticity and error correction in neural networks Uses gradient descent with backpropagation: output errors propagate backward to guide weight changes

Hierarchy

Brain Ai
Sensory processing builds hierarchically from simple to complex features Deep networks organized in layered hierarchies
Visual system: V1 detects edges → V4/IT process shapes/objects CNNs: lower layers detect edges/textures → higher layers form complex features
Language processing: sounds → words → meanings across brain regions LLMs: build from character/word embeddings to contextual understanding

Memory Storage

Brain Ai
Long-term memories stored by reorganizing neural connections Learned information stored in weight patterns across the network
Hippocampus rapidly encodes episodes, cortex consolidates during sleep Thousands of parameters collectively act as distributed memory
Memories distributed across networks of neurons Some models use external memory modules or databases
Recall involves reactivating particular network patterns Retrieval activates appropriate parts of the network corresponding to learned data

Memory Recall

Brain Ai
Cue-driven retrieval: sensory inputs or questions trigger associated memories Prompts activate trained network patterns to produce associated information
Reconstructive process: brain rebuilds memories from stored fragments Network generates responses based on activation of learned patterns
Prefrontal cortex focuses attention on memory search Explicit retrieval mechanisms search external knowledge bases when implemented
Smells, sounds, or queries can bring back detailed memories Prompts cue models to generate relevant knowledge learned during training

The Convergence of Two Worlds

Both biological and artificial systems demonstrate remarkable parallels in how they process information, adapt to experience, and store knowledge. The brain's dopaminergic pathways mirror similarly designed computational intelligence based reward prediction/error systems, while cognitive memory mechanisms find counterparts in neural network training and retrieval processes.

This convergence enables bidirectional inspiration: neuroscience borrows computational modeling techniques from Ai to explain brain function, while Ai incorporates biological principles to enhance efficiency and human-like performance. Humanity is now locked into a self-reinforcing pattern of mutual benefit, an often beautiful experience to observe from the realms of industry research and personal real-world experience.

Critically, these foundational concepts set the stage for deeper technical exploration in subsequent articles, examining dopamine's role in learning algorithms and the detailed workings of CNNs and transformers. Stay tuned for more... unless I get distracted by another broken Juniper switch or deeply-felt emotions which require ice cream and berries to overcome.💗