The math and neuroscience behind modern AI, built for clinicians — from vectors and gradients to neurons, neural networks, attention, and LLMs.
Who it's for: Neurologists, neurosurgeons, and clinically-minded physicians who want to truly understand how AI works
The math and neuroscience behind modern AI, built for clinicians. From vectors and gradients to the biological and artificial neuron, neural networks, attention, and large language models — then memory itself: how brains and machines store, recall, and forget, and what that means for clinical AI. Rigorous but accessible; no prior machine-learning background required.
10 lessons · $299 · lifetime access · certificate of completion
Takeaway: Memory is the frontier on both sides of the bridge. In the brain and in the machine, a memory is a distributed pattern held in the strengths between units — not a place. The clinical taxonomy you already use — working, episodic, semantic, procedural — maps cleanly onto a model's context window, retrieval store, weights, and learned skills. Understand both, and you can judge whether a clinical AI is safe to remember with.
Takeaway: Four ideas, and you have the whole toolkit. A vector is a pattern written as numbers. A matrix is the sheet of connections that turns one pattern into another — and the weights are the memory. The dot product scores how similar two patterns are, which is what attention and search both run on. And the gradient is the direction that reduces error, stepped over and over until the network learns. Pattern, transformation, similarity, tuning — keep those four words, and every diagram from here on is readable.
Takeaway: The artificial neuron is your neuron, abstracted: dendrites become inputs, synaptic strengths become weights, the soma's summation becomes Σ, and the axon's threshold becomes an activation function. The decision to fire is a weighted sum passed through that nonlinearity — and the nonlinearity is what makes depth worth anything. Learning, on both sides, is the adjustment of weights: Hebb's rule in tissue, the gradient step in silicon — the same instinct, strengthen what works, pointed two ways.
Takeaway: A neural network is layers stacked together, and each layer is just a matrix multiply with an activation on top. The forward pass sends a pattern through those layers to a prediction. The loss scores how wrong that prediction is, in one number. Backpropagation sends the error backward so every weight learns its share of the blame, and the gradient step nudges each weight a little way downhill. Forward, loss, backward, step — repeat that loop, and a random network becomes one that has learned. It is the gradient from Lesson 2 and the neuron from Lesson 3, finally working in concert.
Takeaway: Three ideas, and you can read any model in the news. A plain MLP can't handle a sentence, so we turn words into embeddings — vectors that sit close when their meanings are close. Self-attention then lets each word ask the others 'which of you matters to me?', and the answer is the dot product from Lesson 2, softened into a spotlight that blends in the relevant words. Stack that attention into layers, train the stack to predict the next word, and you have a transformer. Meaning, focus, prediction — and underneath it all, the same similarity score we built three lessons ago.
Takeaway: Memory, computed, is this. The brain recalls by content, not by address — give it a fragment and it rebuilds the whole. A Hopfield network does the same with one rule: store memories as valleys in an energy landscape, then let a noisy cue roll downhill into the nearest one. That descent is pattern completion, the mechanism behind cued recall and the smell that brings back an afternoon. And when you store too many memories, or memories too alike, their valleys merge — which is interference, the same word, the same phenomenon, in the patient and in the machine.
Takeaway: Memory is split on purpose. The hippocampus is the fast learner — one-shot, sparse, separated — catching each episode as it happens. The neocortex is the slow learner — incremental, overlapping — distilling structure across a lifetime. Between them runs replay: the hippocampus rehearsing experiences, much of it in sleep, to slowly train the cortex, which is systems consolidation. The dentate gyrus separates so storage doesn't interfere; CA3 completes so a fragment can recover the whole. And the reason for all of it is the failure on that last slide — one network can't both learn fast and remember. Two systems can. The machines are still catching up.
Takeaway: A network forgets catastrophically because its memory lives in shared weights, and training on something new moves the very weights that held the old. Two cures answer it. Experience replay interleaves old examples with new — the same trick the hippocampus runs during sleep. Elastic weight consolidation measures which weights matter and anchors them, the way a consolidated synapse resists change. Stay plastic enough to learn, stable enough to remember — that balance is the whole game, in silicon and in cortex alike.
Takeaway: A language model's memory is three stores, and you already know all three. The context window is working memory — fast, limited, and wiped between sessions, like the phone number you hold just long enough to dial. The trained weights are semantic long-term memory — vast, durable, and frozen after training. And retrieval is the episodic store, fetching specific facts by dot-product similarity and dropping them into the window. An agent needs all three at once. And each fails its own way: context forgets, weights go stale, and the wrong retrieval becomes confabulation — fluent, confident, and wrong. Knowing which store an answer came from is how you know how far to lean on it.
Takeaway: A clinical AI is a memory system wearing a stethoscope. Its context is working memory, its weights are semantic memory, its retrieved chart is episodic memory, and its audit trail is what makes all three accountable. When it fails, it fails into syndromes you already know — amnesia, confabulation, interference. So put one question to every tool you're handed: how does it remember, and how does it forget? Safe memory is right context, sound knowledge, correct retrieval, and an audit trail — and you are exactly the right person to demand all four.