youtube.nixfred.com nixfred.com

Everything About Machine Learning Explained Slowly (For Sleep)

The entire history of machine learning told slowly and in order, from Ramon Llull's rotating discs and Ada Lovelace's objection to the multimodal systems hundreds of millions of people use today. Cosmo Explains walks the mechanisms as well as the people: how a McCulloch Pitts neuron computes, how Rosenblatt made one learn, why XOR broke the perceptron and froze the field, how backpropagation uses the chain rule to assign blame three layers deep, why overfitting made SVMs and maximum margins the respectable choice for two decades, and how data, GPUs and a few simple architectural tricks converged on AlexNet in 2012. From there it is ResNet's skip connection, the transformer throwing away recurrence, next word prediction buying grammar and reasoning for free, CLIP and diffusion, and finally Goodhart's law and the alignment problem. The register is built for sleep; the content is a full course.

Published Jul 25, 2026 2:07:14 video 104 min read Added Aug 24, 2026 Open on YouTube →

At a glance

This is the entire history of machine learning told slowly and in order, from ancient dreams of thinking machines to the multimodal systems hundreds of millions of people now use every day. Cosmo Explains opens with a reframe that turns out to be the thesis: you already do machine learning every day, because you predict rain from clouds and mood from faces without anyone ever handing you a rule book. That is the heartbeat of the field, learning from examples instead of from explicit rules, and the two hours that follow trace how that one idea became a philosophical question, then a piece of mathematics, then an engineering discipline, then the technology underneath GPT, Claude, and every image generator you have seen.

The spine is a chain of stubborn people. Ramon Llull spins paper discs, Leibniz dreams of settling arguments by calculation, Ada Lovelace says a machine can only do what it is told, Turing proposes a child machine that learns from experience, McCulloch and Pitts turn a neuron into arithmetic, Rosenblatt builds the first machine that genuinely learns, Minsky and Papert prove it cannot do XOR and the funding dies, Rumelhart, Hinton and Williams make backpropagation stick in 1986, Vapnik makes the support vector machine the respectable choice for two decades, and Hinton, LeCun and Bengio keep working on the unfashionable thing until data, GPUs and a handful of architectural tricks all arrive at once.

Then it becomes a story about convergence. AlexNet demolishes ImageNet in 2012 on two gaming graphics cards, ResNet pushes 152 layers past human accuracy in 2015, Attention Is All You Need throws away recurrence in 2017, and next word prediction at enormous scale turns out to buy grammar, facts and something that functions like reasoning for free. The last third is honest about the bill: absorbed bias, Goodhart's law, reward hacking, and the alignment problem that Stuart Russell calls the central challenge of building capable machines.

The register is deliberately calm, built for sleep. The content is not thin. Below is the whole thing rebuilt in prose, with the mechanisms actually explained, the numbers kept, and the worked examples intact.

You are already a prediction engine (00:00)

Start with something you do without noticing. Every day you make thousands of tiny predictions. You glance out the window and predict whether you need an umbrella. You hear a car engine make a weird noise and predict whether it is serious or nothing. You look at a face across a room and predict, in a fraction of a second, whether that person is happy or upset.

The wild part is that nobody ever sat you down and gave you a rule book for any of it. Nobody handed you a manual that said when clouds look like this, it will rain, or when engines sound like that, the timing belt is going. You figured it out from experience. You saw enough cloudy skies and enough facial expressions that patterns emerged, and those patterns became something you could rely on without thinking.

That, in the most fundamental sense, is what machine learning is. Instead of programming a computer with explicit rules for every possible situation, instead of writing out every single instruction, you give the computer examples. Lots and lots of examples. And you let it find the patterns on its own. You let it learn the way you learned.

Not identically, of course. The mechanisms are different. But the core idea, learn from experience rather than from rules, is the heartbeat of the whole field. The rest of the video traces how that idea started as a philosophical question, became a mathematical curiosity, turned into a real engineering discipline, and eventually grew into something that touches almost every part of your life.

Can a machine think: Talos, Llull, Leibniz (02:35)

The beginning is not a computer at all. It is a question people have been asking for centuries: can a machine think?

It sounds modern, like something out of science fiction, but the wrestling goes back a long way. The ancient Greeks told stories about Talos, a giant bronze automaton built by Hephaestus, the god of craftsmen, to guard the island of Crete. In the 13th century a Catalan philosopher named Ramon Llull designed something he called the Ars Magna, a system of paper discs you could rotate to combine concepts and generate new ideas mechanically. It was not a computer in any meaningful sense, but the ambition was there: the dream that reasoning could be made mechanical, that logic could be turned into machinery.

Fast forward a few hundred years to Gottfried Wilhelm Leibniz, the German mathematician and philosopher, one of those figures so far ahead of his time that it is almost eerie. In the late 1600s he built one of the first mechanical calculators, a device of gears and wheels that could add, subtract, multiply and divide. But Leibniz wanted more than arithmetic. He had a grand vision he called the calculus ratiocinator, essentially a universal reasoning machine. He imagined a future where all human disputes could be settled by saying, let us calculate. Encode logic into a formal system, he believed, and a machine could do the reasoning for you.

He did not get there. The technology of his era could not come close to supporting the dream. But the seed was planted, and it sat in the soil for a very long time.

Babbage, Lovelace, and the objection that echoed for a century (04:41)

The next leap comes in the 1830s and 1840s with two extraordinary people.

The first is Charles Babbage, a brilliant and famously irritable English mathematician who designed, though never fully built, a machine called the analytical engine. The ambition was astonishing. It had a mill for computation and a store for memory. It could be programmed using punched cards borrowed from the Jacquard loom already in use in textile manufacturing. In theory, given the right instructions, the analytical engine could perform any calculation. It was conceptually a general purpose computer, designed more than a hundred years before the first electronic computers were built.

Then there is Ada Lovelace, who saw something in Babbage's machine that Babbage himself may not have fully grasped. Ada Byron, daughter of Lord Byron the poet, which is a wonderful little collision of worlds. She wrote extensive notes on the analytical engine, and in those notes she described what many historians consider the first computer program: a detailed sequence of operations for the engine to compute Bernoulli numbers.

But the really remarkable part is that Ada also speculated about the machine's limits. She wrote that the engine had no pretensions to originate anything. It could only do what it was instructed to do. It could not think. It could not learn. It could not create. That observation, sometimes called Lady Lovelace's objection, echoed through the next century of debate about artificial intelligence.

Can a machine only do what we explicitly tell it to do, or can it somehow go beyond its programming? That question is basically the central tension of machine learning, because the whole promise of the field is that yes, actually, a machine can find things in data that no human explicitly programmed it to find. Hold onto that. The 1986 backpropagation paper answers Lovelace directly.

Turing: the universal machine and the child machine (06:45)

Move to the early 20th century, where the mathematical foundations come together, and the person to talk about is Alan Turing.

Turing is famous for a lot of things: cracking the Enigma code during the Second World War, founding computer science, and his tragic personal story. But the key moment here is 1936, when Turing was 23 and published On Computable Numbers. In it he described an abstract machine, now called a Turing machine, that could in principle compute anything computable.

The setup is breathtakingly simple. An infinitely long tape divided into cells. A read write head that can move left or right. A set of rules governing what to do based on the current state and the current symbol on the tape. That is the whole machine.

From that, Turing proved something profound: any problem solvable by following a well defined procedure, any algorithm, any computation, can be solved by this simple machine. Which means, in a deep sense, that all computers are fundamentally equivalent. Your laptop, your phone, a massive server farm, all doing the same thing a Turing machine does, just faster and with more memory. That universality is what makes the whole field possible.

Turing was also thinking about intelligence. In 1950 he published Computing Machinery and Intelligence, which opens with an almost playful line: I propose to consider the question, can machines think? He knew the question was loaded, so he sidestepped the philosophy and proposed something practical, the Turing test. If a human judge has a conversation with a machine and cannot reliably tell whether they are talking to a human or a computer, then for all practical purposes the machine is thinking. Or at least doing something so close to thinking that the distinction stops mattering.

Turing never built a learning machine, but he wrote about the possibility. He speculated about what he called a child machine, a program that starts with very little knowledge and learns from experience the way a child does. He even suggested that instead of trying to simulate an adult mind, it might be easier to simulate a child's mind and then educate it.

Start simple, learn from data, get better over time. That is basically the blueprint for machine learning. Turing saw it coming. He did not have the tools to build it, but he saw the shape of it.

McCulloch and Pitts: a neuron becomes arithmetic (10:21)

Around the same time, across the Atlantic, another thread was being woven. In 1943 a neurophysiologist named Warren McCulloch and a logician named Walter Pitts published a paper that quietly changed everything. They proposed a mathematical model of a biological neuron.

Their artificial neuron was incredibly simple. It took in a set of binary inputs, ones and zeros. It applied weights to them. It summed them up. And if the sum exceeded a certain threshold, it fired and output one. If not, it output zero.

That is the whole computation, and it is worth writing down because everything after it is a variation on this:

z      = w1*x1 + w2*x2 + ... + wn*xn      # the weighted sum
output = 1  if z > threshold
         0  otherwise

Think about what that means. They took something from biology, the neuron, the basic building block of the brain, and turned it into math. And they showed that networks of these simple artificial neurons could in principle compute any logical function. Any logical operation you can imagine, AND, OR, NOT, and combinations of them, could be represented by the right arrangement of McCulloch Pitts neurons.

The model was limited. The weights were fixed. There was no learning involved at all. You had to design the network by hand to get the behavior you wanted. But the conceptual breakthrough was enormous. It said: maybe intelligence is not magic. Maybe it is computation. Maybe the brain is, at some level, a machine that processes information according to rules. And maybe we can build something that works on similar principles.

INPUTS WEIGHTED SUM ACTIVATION OUTPUT x1 x2 x3 w1 w2 w3 SUM z z > threshold ? yes: fire no: stay silent 1 or 0 learning: w_i <- w_i + rate * (target - output) * x_i McCulloch and Pitts fixed the weights by hand. Rosenblatt let the error move them.
Figure 1. The artificial neuron of 1943, and the one thing Rosenblatt added in 1957. Inputs come in, each is multiplied by a learned weight, the products are summed into z, and a threshold decides whether the unit fires. Everything else in this video, all the way to a transformer with a hundred billion parameters, is this unit repeated, stacked, and wired differently.

This idea electrified people, and it set the stage for what came next.

Dartmouth, summer 1956: the field gets its name (11:55)

In the summer of 1956 a small group of researchers gathered at Dartmouth College in Hanover, New Hampshire, for a workshop that would give the entire field its name.

The organizers were John McCarthy, a young mathematician at Dartmouth, Marvin Minsky, then at Harvard, Nathaniel Rochester from IBM, and Claude Shannon, the legendary information theorist from Bell Labs. McCarthy coined the term artificial intelligence for the proposal and the workshop. Though it was more of an informal summer gathering, maybe 10 or 15 people at any given time, it became the founding moment of AI as a recognized discipline.

The workshop was driven by extraordinary optimism. The proposal itself stated, with a confidence that is almost charming in hindsight, that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it.

They thought it might take a summer. Maybe a few years. Get a small group of smart people together and figure out intelligence.

They did not. Not that summer, not in a few years, not in a few decades. The problem turned out to be incomprehensibly harder than anyone imagined. But what Dartmouth did do was create a community. It connected people who had been thinking about these problems in isolation and gave them a shared language and a shared ambition.

Rosenblatt's perceptron: the first machine that genuinely learned (14:00)

One of the most important ideas of that era came not from Dartmouth itself but from the ferment around it: the perceptron.

In 1957 a psychologist at Cornell named Frank Rosenblatt built something remarkable. The perceptron was in essence a McCulloch Pitts neuron that could learn. Instead of having its weights set by hand, the perceptron had a learning algorithm.

The loop is simple enough to hold in your head:

  1. Show it an example, say an image of a letter, and tell it the correct answer.
  2. Let it compute its weighted sum and produce an output.
  3. If the output is wrong, adjust the weights slightly, nudging them in the direction that would have given the right answer.
  4. Repeat, thousands of times.

Show it enough examples, adjust the weights enough times, and the perceptron learns to classify things it has never seen before. That last clause is the whole game. Not memorize the examples. Classify new things.

Rosenblatt was charismatic and ambitious, and he made bold claims about what the perceptron could do. The New York Times ran a story in 1958 reporting that the Navy had revealed a device that could eventually walk, talk, see, write, reproduce itself, and be conscious of its existence. That was, to put it mildly, an exaggeration.

But the core achievement was real. The perceptron was the first machine that genuinely learned from data. It did not follow a script. It adapted. It improved. And the learning rule, adjust the weights based on the error, is an idea that in more sophisticated forms still drives machine learning today.

Minsky, Papert, XOR, and the first winter (15:34)

Not everyone was impressed, and the most conspicuously unimpressed was Marvin Minsky, one of the founders of the field, who had actually built one of the first neural network machines himself back in 1951, a device called SNARC. Minsky had moved on from neural networks and grown increasingly skeptical of what they could accomplish.

In 1969 he and a mathematician named Seymour Papert published a book called Perceptrons that cast a long shadow over the entire field.

What they showed, with mathematical rigor, is that a single layer perceptron, the kind Rosenblatt had built, cannot solve certain seemingly simple problems. The most famous example is XOR, the exclusive or function:

x1  x2  |  XOR
 0   0  |   0
 0   1  |   1
 1   0  |   1
 1   1  |   0

If two inputs are the same, output zero. If they are different, output one. A single perceptron cannot learn that. It cannot draw the right boundary, because a single perceptron can only carve the input space with one straight line, and no single straight line separates the two ones from the two zeros in that table.

Here is what makes the story complicated and a little sad. Minsky and Papert were technically correct about single layer perceptrons. But the implication many people took away from the book, that neural networks in general were a dead end, was wrong. Multi layer networks could solve XOR and much more. Rosenblatt himself had discussed multi layer networks.

The damage was done anyway. Funding dried up. Researchers moved to other approaches. And Frank Rosenblatt died in a boating accident in 1971, at just 43 years old, never seeing his ideas vindicated.

The field entered what historians now call the first AI winter. During that long cold stretch, a handful of stubborn, brilliant people kept working on the ideas everyone else had abandoned. They kept tinkering with neural networks in obscurity, convinced that something important was hiding in those weighted connections if only they could figure out how to train them properly.

The credit assignment problem: who ruined the dish? (18:07)

That word train is the key to everything that comes next, because the problem was never really whether neural networks could work in theory. It was how you teach a network with multiple layers to learn from its mistakes.

In Rosenblatt's single layer perceptron, training was relatively straightforward. You show it an input. It makes a guess. You tell it whether the guess was right or wrong, and it adjusts its weights accordingly. There is a direct line between the output and the weights that produced it. You know exactly which knobs to turn and in which direction.

The moment you add a hidden layer, a layer of neurons sitting between the input and the output, things get murky. If the network gives you the wrong answer, sure, you can adjust the weights connecting the hidden layer to the output. But what about the weights connecting the input to the hidden layer? How do you know which of those contributed to the error? How do you assign blame to neurons buried deep inside the network, whose contributions are indirect and tangled up with everything else?

This is the credit assignment problem, and it haunted neural network research for decades.

It is a beautiful problem in everyday terms. Imagine you manage a big restaurant kitchen. A dish comes back from a Customer. It is terrible. The final plating was fine, but somewhere in the chain of prep cooks, sauce makers and line cooks, something went wrong. How do you figure out who messed up, and by how much?

That is essentially what a multi layer network has to solve every single time it learns from an example. And for years, nobody had a clean, efficient way to do it.

Backpropagation: run the error backwards (20:12)

The solution, when it finally arrived in a form people paid attention to, did not come from a single eureka moment. It was more like an idea that kept being independently discovered, ignored, rediscovered and ignored again until finally the field was ready to listen.

The core technique is called backpropagation, short for backward propagation of errors. The basic idea: you work backwards through the network, starting from the output error and using the chain rule from calculus to figure out how much each weight in each layer contributed to that error.

The chain rule, which you may remember from math class or may mercifully not, is just the principle that lets you compute how a change in one variable affects another when they are linked through intermediate steps:

if  A affects B  and  B affects C
then  dC/dA = (dC/dB) * (dB/dA)

If A affects B and B affects C, the chain rule tells you how A affects C. Stack enough of these together and you can trace the influence of any weight, no matter how deep in the network, all the way to the final output. That is the entire trick. Backpropagation is the chain rule applied systematically, layer by layer, from the output back toward the input.

The mathematics were worked out in various forms by several people. Paul Werbos, an American researcher, described a version of it in his 1974 PhD thesis at Harvard. He was working in the context of general optimization rather than neural networks specifically, but the connection was there. Seppo Linnainmaa, a Finnish mathematician, had published the basic automatic differentiation technique even earlier, in 1970. There were others. But these contributions were scattered across different fields and different journals, and the neural network community, what was left of it during the AI winter, did not fully absorb them.

Hinton: the man who was wrong for twenty years (22:14)

The person who really brought backpropagation to the attention of the broader world was Geoffrey Hinton. If there is one name you should know in the story of modern machine learning, one person whose stubborn persistence shaped the field more than almost anyone else, it is Hinton.

Born in London in 1947, he came from a family of accomplished scientists. He was the great great grandson of George Boole, the mathematician who invented Boolean algebra, the very logic that underpins all digital computing. There is something almost poetic about that lineage, as if the universe were setting up a very long punchline.

Hinton studied experimental psychology at Cambridge, then got interested in artificial intelligence, did his PhD at the University of Edinburgh, and then postdoctoral work at various American institutions. Through the entire AI winter, while neural networks were deeply unfashionable, Hinton kept working on them. He has described it as being a bit like believing in something that everyone else thought was nonsense.

Funding was hard to get. Reviewers were skeptical. The dominant paradigm in AI through the 1970s and early 1980s was symbolic AI, systems built on explicit rules and logical reasoning, not learning from data. If you worked on neural networks in that period, many of your colleagues thought you were wasting your time.

He was not alone. There was a small, scattered community of believers. David Rumelhart, a cognitive psychologist at UC San Diego, was another key figure, along with Ronald Williams, who worked with Rumelhart.

The 1986 Nature paper: the machine originates something (24:16)

In 1986, Rumelhart, Hinton and Williams published a paper in Nature that changed everything: Learning Representations by Back-Propagating Errors.

What it did was present backpropagation as a practical, effective method for training multi layer neural networks. They did not invent the math from scratch. Pieces of it had been around for years. But they packaged it clearly, demonstrated it convincingly, and published it in one of the most prestigious scientific journals in the world. This time, people listened.

Here is what made the paper so powerful. They showed that when you train a multi layer network with backpropagation, the hidden layers spontaneously learn useful internal representations of the data. The network does not just memorize inputs and outputs. It develops its own internal concepts, its own way of organizing information. Nobody explicitly programs these representations. They emerge from the learning process itself.

Think about what that means. The network is figuring out what features matter, what patterns are important, on its own. It is not just following rules someone gave it. It is discovering structure in the data that even the designers might not have anticipated.

This was the answer to Ada Lovelace's objection from more than a century earlier, that machines can never originate anything, that they can only do what we tell them to do. Here was a machine that in a meaningful sense was originating its own internal categories, its own way of seeing the world. Not because someone programmed those categories in, but because the math of gradient descent and error correction, applied across thousands of training examples, sculpted the weights into configurations that captured something real about the underlying patterns.

How backpropagation actually feels, one example at a time (26:17)

Slow down here, because backpropagation is genuinely one of the most important algorithms ever invented, and it is worth understanding how it feels to a network going through it.

Imagine a network with an input layer, two hidden layers, and an output layer. You feed in a training example, say a picture of a cat represented as pixel values.

Forward. The signal flows forward through the network. Each neuron in the first hidden layer takes the weighted sum of its inputs, applies a mathematical function to squash the result into a useful range, and passes its output to the next layer. That squashing function is the activation function, and without it a stack of layers would collapse into one big linear operation, which is why it matters. The same thing happens again at the second hidden layer. Finally the output layer produces a prediction, maybe a number between zero and one, where one means cat and zero means not cat.

The error. Say the network outputs 0.3, but the correct answer is 1. There is an error of 0.7.

prediction = 0.30
target     = 1.00
error      = 0.70

Backward. Now backpropagation kicks in. You compute how much each weight in the output layer contributed to that error, and you nudge those weights in the direction that would reduce it. Then you propagate that error signal backward to the second hidden layer, using the chain rule to figure out each weight's contribution. Then back to the first hidden layer. Every single weight in the entire network gets a tiny adjustment, all calculated to make the output a little closer to the right answer.

Repeat. Then you do it again with the next training example. And again. And again. Thousands of times. Millions of times.

Each individual adjustment is tiny, a nudge, not a leap. But over many, many examples, the weights settle into a configuration that captures the genuine statistical patterns in the data. It is like erosion. One raindrop does not carve a canyon, but give it enough time and water shapes stone.

INPUT HIDDEN 1 HIDDEN 2 OUTPUT pixels 0.30

forward pass: weighted sum, squash, pass along

target 1.00 pred 0.30 error 0.70

backward pass: chain rule splits the blame across every weight each weight moves a little; repeat over millions of examples one raindrop does not carve a canyon
Figure 2. The exact worked example from the narration. The signal goes forward and produces 0.30 when the answer should have been 1.00, an error of 0.70. That error is then walked backwards through both hidden layers by the chain rule, so every weight in the network, including the ones nowhere near the output, learns its share of the blame and gets a nudge.

The connectionist revival and a network learning to speak (28:54)

The 1986 paper triggered what people sometimes call the connectionist revival, a resurgence of interest in neural networks that lasted through the late 1980s and into the early 1990s. Suddenly there was funding again. There were conferences. Researchers who had been laboring in obscurity found themselves at the center of an exciting new movement.

The Parallel Distributed Processing research group at UC San Diego, led by Rumelhart and James McClelland, published a hugely influential two volume set in 1986 laying out the connectionist program in detail: how networks of simple units learning through backpropagation could account for everything from language processing to memory to motor control.

The results were genuinely impressive. One landmark demonstration came from Terrence Sejnowski, working with a graduate student named Charles Rosenberg, who together created a system called NETtalk in 1987.

NETtalk was a neural network that learned to pronounce written English text. You fed it letters and it produced phonemes, the sounds of speech. English pronunciation is notoriously irregular. Think about though, through, tough, thought. Rule based systems had struggled with it for years. But NETtalk, trained on examples of text paired with correct pronunciations, learned to handle most of the irregularities.

When they played recordings of the network's output during training, you could actually hear it go from babbling nonsense to something that sounded increasingly like coherent English speech. It was eerie and wonderful.

Vanishing gradients: why deeper did not mean better (31:26)

Here is why the story does not end with everyone living happily ever after.

The networks of the late 1980s and early 1990s were still small by modern standards, maybe a few hundred or a few thousand neurons. Training them was slow because computers were slow. And as researchers tried to make networks deeper, adding more hidden layers to capture more complex patterns, they ran into a frustrating problem.

The gradients, those error signals flowing backward through the network during backpropagation, had a tendency either to shrink to nearly nothing or to explode to enormous values as they passed through many layers. This is the vanishing gradient problem, and its counterpart the exploding gradient problem.

The mechanism is the chain rule biting back. Each layer the error passes through multiplies it by another factor. Multiply a long chain of numbers smaller than one and you get something microscopic. Multiply a long chain of numbers larger than one and you get something enormous.

In practical terms it meant deep networks were incredibly hard to train. The layers closest to the input barely learned anything, because by the time the error signal reached them it had been multiplied through so many intermediate steps that it had essentially evaporated.

So you had this frustrating situation. In theory, deeper networks should be more powerful. More layers means more capacity to learn complex hierarchical features. In practice, you could not train them effectively. Networks with one or two hidden layers worked reasonably well. Networks with five or ten hidden layers just did not converge. The weights would barely budge, or they would oscillate wildly, and the network would never settle into a useful configuration.

Meanwhile, statistics was winning (33:01)

While neural networks were struggling with depth, a completely different branch of machine learning was quietly producing results that were, in many practical applications, just as good or better. These methods came from statistics and optimization rather than from neuroscience inspired connectionism.

The most important of them, the one that would dominate machine learning for nearly two decades, was the support vector machine. It was developed in the early 1990s by Vladimir Vapnik, a Russian mathematician who had immigrated to the United States and was working at Bell Labs in New Jersey.

Vapnik's approach had something neural networks at the time could not offer: strong mathematical guarantees about how well a model would perform on data it had never seen before. And that distinction, between fitting the data you already have and predicting data you have not encountered yet, turns out to be one of the most important ideas in all of machine learning.

Overfitting: the two students (34:34)

Sit with it for a moment, because this is the concept everything else in the field balances on.

Imagine you are a teacher and you give your students a set of practice problems before an exam. One student memorizes every single practice problem and its answer perfectly, word for word. Another student studies the underlying principles, understands the patterns, maybe gets a few of the practice problems wrong, but genuinely grasps the logic behind them.

When the actual exam comes with new problems they have never seen, which student does better? Almost always the second one.

The first student memorized the training data, so to speak, but did not learn the underlying structure. In machine learning this is called overfitting. Your model fits the training data beautifully, capturing every little quirk and noise and random fluctuation in that particular data set, and then it falls apart the moment you show it anything new.

This was exactly the problem neural networks in the late 1980s and early 1990s were prone to. You could train a network to spectacular accuracy on your training set, then test it on fresh data and watch the performance disappoint. The network had memorized rather than learned.

VC theory: putting a number on how much to trust a model (36:09)

What Vapnik brought to the table was a rigorous mathematical framework for thinking about this. He called it statistical learning theory, and he had been developing the core ideas since the 1960s and 1970s back in the Soviet Union, working with a colleague named Alexey Chervonenkis.

Together they developed what is now called VC theory, Vapnik Chervonenkis theory, which gives you a way to quantify the capacity of a learning model. How complex is it? How many different patterns can it potentially fit?

And here is the key insight. The more complex your model, the more patterns it can fit, sure, but the greater the risk that it is fitting noise rather than signal. VC theory gave you actual mathematical bounds on the gap between training performance and test performance. It told you, in a precise and provable way, how much you should trust your model's performance on new data, based on the complexity of the model and the amount of training data you had.

test error  <=  training error  +  (a term that grows with model capacity
                                    and shrinks with more training data)

That is the shape of it. Capacity costs you. Data buys it back.

Support vector machines: find the widest gap (37:44)

Vapnik did not just develop the theory. He used it to build a specific kind of learning machine that was, in a sense, optimally designed to avoid overfitting.

The idea behind an SVM is beautifully geometric. Imagine data points scattered on a flat surface. Some are red dots, some are blue dots, and you want to draw a line separating the reds from the blues. There might be many possible lines that correctly separate all the points. Which line is the best one?

Vapnik's answer: choose the line with the maximum margin. The margin is the distance between the line and the closest data points on either side. You want the widest possible gap, the widest possible buffer zone between the two classes.

The data points sitting right on the edge of that margin, the ones closest to the dividing line, are called the support vectors. They are the critical points that actually determine where the boundary goes. Everything else is, in a sense, irrelevant. You could delete every other point in the data set and get the same boundary.

Here is what is really clever about this. By maximizing the margin, you are building in a form of caution. You are not just finding any boundary that separates the data. You are finding the boundary that is most robust, most likely to still work correctly when new data points show up that are slightly different from what you have seen before. And Vapnik could prove mathematically that this maximum margin approach leads to good generalization. Not just empirically, not just it seems to work well in practice, but provably, with theoretical guarantees.

valid but timid also valid maximum margin boundary

support vectors (circled larger): the only points that set the boundary margin widen this and you generalize better

Figure 3. Many lines separate the two classes. The SVM picks the one with the widest buffer on both sides, and only the handful of points touching that buffer, the support vectors, matter at all. Maximizing the margin is caution written as geometry, and Vapnik could prove it generalizes.

The kernel trick: a wormhole through the geometry (39:47)

You might be thinking, fine, but what about data that cannot be separated by a straight line? What if the red dots and blue dots are mixed together in some complicated pattern?

This is where another elegant idea comes in, the kernel trick. Instead of trying to find a complicated curvy boundary in the original space where your data lives, you mathematically project the data into a much higher dimensional space, sometimes an infinitely high dimensional one, where the data can be separated by a flat surface, a hyperplane.

The beautiful part is that you never actually have to compute the coordinates of the data in this high dimensional space. You only need the distances between pairs of data points in that space, and those can be computed with a kernel function, a relatively simple mathematical operation on the original coordinates.

So you get the power of working in a fantastically complex space without paying the computational cost of actually going there. It is a mathematical shortcut, a wormhole through the geometry.

Why SVMs beat neural networks for two decades (40:47)

The results were impressive. Through the 1990s, SVMs started winning competitions, outperforming neural networks on benchmark after benchmark. Handwriting recognition, text classification, image categorization. SVMs were competitive or superior across the board.

They also had practical advantages beyond accuracy. They were faster to train. They had fewer hyperparameters to fiddle with. You did not need to agonize over how many hidden layers to use, how many neurons per layer, what learning rate, what momentum. And the optimization problem at the heart of an SVM was convex, which means there is a single global optimum. You are guaranteed to find the best solution, not just a pretty good one you happened to stumble into.

Compare that with neural networks, where the loss landscape is riddled with local minima and saddle points, and training involves a lot of hoping and praying and tweaking.

Circa 1995Support vector machineNeural network
TheoryVC theory gives provable bounds on the train to test gapTheoretically murky, called a black box
OptimizationConvex, so a single global optimum you are guaranteed to findLocal minima and saddle points everywhere, no guarantee
Training speedFastSlow on the hardware of the day
Knobs to tuneFewLayers, neurons per layer, learning rate, momentum, initialization
Overfitting controlBuilt in: maximize the marginProne to memorizing the training set
Handles nonlinearity byKernel trick: project to a higher dimensional space for freeStacking hidden layers, which nobody could train past a few
Appetite for dataLimited capacity, so extra data stops helping past a pointEnormous capacity, keeps improving if you can feed it
Career advice you gotSensible, fundable, publishableA concerned look from your adviser

That last row is the video's own joke, and the second to last row is the whole reversal in one line. The property that made neural networks look bad in 1995, unbounded capacity, is exactly the property that made them win once the internet showed up with enough data to fill it.

Random forests: the wisdom of a thousand mediocre trees (41:47)

SVMs were the star of the statistical era, but they were not alone. There were also ensemble methods like random forests, developed by Leo Breiman at Berkeley, which took a different but equally clever approach.

Instead of building one really sophisticated model, you build hundreds or thousands of simple models, decision trees, each trained on a slightly different random subset of the data, and then you let them vote. The wisdom of the crowd. Each individual tree might be mediocre, but the aggregate prediction of the whole forest is remarkably accurate and robust, because the individual trees' errors are uncorrelated enough to cancel out while their shared signal reinforces.

Breiman published his random forests paper in 2001, and it became one of the most cited papers in all of machine learning. These methods were practical, reliable, interpretable, and they worked.

The second winter, which was really a fashion problem (42:49)

Roughly the mid 1990s through the mid 2000s is sometimes called the second AI winter for neural networks, though that is not quite right. It was not that neural network research stopped entirely. It is more that it became deeply unfashionable.

Funding dried up. Reviewers at top conferences would reject papers about neural networks almost reflexively. If you were a graduate student and told your adviser you wanted to work on neural networks, you would probably get a concerned look and some gentle career advice.

The field had moved on. Statistical learning theory was rigorous. SVMs had guarantees. Neural networks were seen as finicky, unreliable, theoretically murky black boxes that could not even be trained properly if you made them more than a couple of layers deep.

LeCun, cats, and the convolutional network (44:21)

But a small group refused to give up on the neural network idea, and the most prominent, most stubborn, most relentlessly optimistic of them was Hinton. Through the entire wilderness period he kept publishing, kept training students, kept insisting that the brain inspired approach was fundamentally right, that the problems were engineering problems, not conceptual dead ends.

He was not alone. Yann LeCun, a French computer scientist who had studied under one of the pioneers of neural network research in Paris, had moved to Bell Labs, the same Bell Labs where Vapnik was working, which is a wonderful irony. And he was doing remarkable things with a specific type of neural network called a convolutional neural network.

LeCun's convolutional networks were directly inspired by the visual cortex. In the late 1950s and early 1960s, two neuroscientists named David Hubel and Torsten Wiesel did groundbreaking experiments on cats, inserting electrodes into the visual cortex and showing the cats various visual stimuli. They discovered that neurons in the visual cortex are organized hierarchically. Some neurons respond to simple features, edges at a particular angle for instance. Others respond to more complex combinations of those simple features. The visual system builds up its understanding of what it is seeing layer by layer, from simple to complex. Hubel and Wiesel won the Nobel Prize for this work in 1981.

LeCun took this biological insight and turned it into an engineering architecture. In a convolutional network:

Each layer applies small filters, little pattern detectors that slide across the input looking for their particular feature everywhere in the image. That sliding, that sharing of the same filter across different positions, is the convolution, and it is what makes these networks so efficient. Instead of having every neuron connected to every input pixel, which would require an astronomical number of connections, you have a small set of learned filters reused across the entire image.

LeNet-5 was quietly reading your checks (46:55)

By the late 1990s LeCun had built a convolutional network called LeNet-5 that could read handwritten digits: zip codes on envelopes, numbers on checks, with remarkable accuracy. AT&T actually deployed it. It was reading something like 10 to 20 percent of all the checks deposited in American banks by the late 1990s.

Millions of checks every day, being read by a neural network, and most people had no idea. Here was this supposedly obsolete technology quietly doing real work in the real world while the academic mainstream was busy with SVMs and kernel methods.

Bengio and the problem of sequences (47:26)

Then there was Yoshua Bengio, a Canadian computer scientist working in Montreal, who was tackling the problem of applying neural networks to sequential data: language, time series, anything where the order of the inputs matters.

Bengio was deeply interested in learning representations of words, in finding ways to capture the meaning of language in vectors of numbers. He published a paper in 2003 on neural probabilistic language models that, in retrospect, planted seeds that would not fully bloom for another 15 years.

These three, Hinton, LeCun and Bengio, would later become known as the godfathers of deep learning, and they would share the Turing Award in 2018. But in the early 2000s they were swimming against the current, working in a corner of the field most of their colleagues considered a dead end.

Three threads about to converge (48:31)

The thing that would change everything, that would vindicate their stubbornness and transform not just machine learning but the entire technology landscape, was a convergence of three factors none of them could have fully anticipated:

  1. An explosion in available data.
  2. An unexpected revolution in computing hardware.
  3. A series of clever algorithmic innovations that finally cracked the training of deep networks, that vanishing gradient problem that had been the fundamental barrier since the late 1980s.

And the story of how those threads came together starts somewhere seemingly unrelated: video games.

GPUs: a stadium full of high school math students (49:33)

In the late 1990s and early 2000s, a company called Nvidia was locked in fierce competition with rivals like ATI and 3dfx to build the fastest graphics processing units for the gaming market.

The thing about rendering a frame of a video game is that you need to perform the same relatively simple mathematical operation, multiply some numbers, add them together, over and over on millions of pixels simultaneously. You are not solving one hard problem. You are solving millions of easy problems all at the same time.

So GPU designers built chips fundamentally different from traditional CPUs. A CPU is like a brilliant professor who can solve any problem you throw at them, but works through things one at a time, or maybe a few at a time. A GPU is more like a stadium full of high school math students. Each one is only capable of basic arithmetic, but there are thousands of them and they all work in parallel.

For gaming, this architecture was perfect. For machine learning, it would turn out to be revolutionary, but nobody planned it that way, which is what makes this part of the story so wonderfully accidental.

Think about what happens when you train a neural network. At every layer you take a bunch of inputs, multiply each by a weight, add them up, and pass the result through an activation function. Then you do it again at the next layer. And you do this for every training example, potentially millions of times. It is the same basic operation, multiply and accumulate, repeated over and over across thousands or millions of artificial neurons.

That is almost exactly the workload GPUs were designed for. The math of neural networks and the math of rendering polygons in a video game are, at a deep level, the same kind of math: matrix multiplication. Massive parallel matrix multiplications.

The person who really pushed this connection into the open was a researcher at Stanford named Andrew Ng, along with his collaborators. Around 2009, Ng and his team demonstrated that you could train neural networks dramatically faster on GPUs than on traditional CPUs. Speedups of 10 times, 50 times, sometimes even 100 times. What used to take weeks could take days. What used to take days could take hours.

And that changes everything, because in research speed is not just convenience. Speed is the difference between trying one idea a month and trying ten ideas a week. It is the difference between a dead field and a living one.

The data explosion (53:11)

The GPU story was only one thread. The data explosion was happening simultaneously and mattered just as much.

In the year 2000, the total amount of data stored in the world was estimated at roughly 6.2 exabytes. By 2007 it was around 295 exabytes. By 2010 it had crossed into the zettabyte range, a zettabyte being a thousand exabytes, or a trillion gigabytes.

The internet was doing what the internet does. People were uploading photos, writing emails, clicking on links, buying things, leaving reviews, posting on social media. Every one of those actions generated data, and companies were storing all of it. This was the age of Google indexing billions of web pages, of Facebook accumulating billions of tagged photographs, of Amazon tracking every purchase and browsing pattern.

Here is why that matters. These algorithms learn from examples. The more examples, the better they get. But there is a catch, and it goes straight back to the overfitting conversation.

Simple models like SVMs or logistic regression can only benefit from more data up to a point. They have limited capacity, limited expressiveness. Once they have extracted all the patterns their architecture allows, more data does not help much.

Deep neural networks, with millions or billions of parameters, are incredibly expressive. They are hungry for data. They need enormous amounts of it to reach their potential, and without enough data they overfit horribly.

So for decades deep networks were stuck in a catch 22. They needed more data than existed to show their superiority, and nobody was going to collect more data for a technology that did not seem to work. The internet broke that catch 22. Suddenly the data was just there.

2006: build the house one floor at a time (55:17)

The third thread, the algorithmic breakthroughs, is where Hinton comes back in a big way.

In 2006, Hinton, working with Simon Osindero and Yee-Whye Teh at the University of Toronto, published a paper that sent a jolt through the machine learning community. It was about deep belief networks, and the key insight was a clever training strategy.

Instead of trying to train all the layers of a deep network at once, which is exactly where the vanishing gradient problem crushes you, Hinton proposed training the network one layer at a time, from the bottom up, using an unsupervised method. Each layer would learn to model the statistical structure of the layer below it. You stack these pretrained layers on top of each other, building the network up piece by piece. Only after this layer by layer pretraining would you fine tune the whole thing with backpropagation.

It was like building a house by carefully laying each floor's foundation before stacking the next floor on top, rather than trying to build the whole structure at once and hoping it did not collapse.

The results were striking. Deep networks trained this way performed significantly better than shallow ones. The paper, A Fast Learning Algorithm for Deep Belief Nets, is often cited as the moment the deep learning revival truly began.

Hinton, who had been working on these ideas for over 20 years by that point, who had watched the field turn its back on neural networks, who had kept the faith through the long winter of the 1990s, finally had a result that made people pay attention again.

And here is something lovely about the timing. Hinton was 60 years old when this paper came out. He had spent essentially his entire career on an idea most of his peers thought was wrong. Think about the stubbornness that requires. Think about sitting in faculty meetings, applying for grants, watching your students struggle to get jobs because they had worked on neural networks and hiring committees wanted people who did SVMs. And he kept going. There is a quote attributed to him, paraphrased in the narration, where he said something like: either I was incredibly wrong, or everyone else was.

In 2006, the needle finally started moving in his direction.

2009 to 2012: speech recognition falls first (58:19)

The 2006 paper, important as it was, was not the moment of full vindication. That came a few years later, and it came through literal competition.

In 2009, Hinton's group entered a speech recognition contest and showed that deep neural networks could outperform the traditional methods that had dominated the field for 30 years. Those traditional methods were based on hidden Markov models combined with Gaussian mixture models. A mouthful, but the point is that they were the established technology, the industry standard, the thing that powered every speech recognition system from the ancestors of Siri to automated phone menus.

Hinton's neural networks beat them. Not by a tiny margin. By a lot.

This got the attention of the big technology companies. Microsoft, Google, IBM, all started paying very close attention. By 2012, deep neural networks had essentially taken over speech recognition at every major tech company, and the error rates dropped dramatically. If you have ever noticed that voice assistants got noticeably better around 2012 or 2013, this is why. It was not a gradual improvement. It was a step change, a sudden leap driven by deep learning replacing the old statistical models.

October 2012: AlexNet (59:52)

The real earthquake, the event most people in the field point to as the moment everything changed, happened in October 2012. And it happened because of cats. Well, not exactly because of cats, but stay with it.

Every year since 2010 there had been a competition called the ImageNet Large Scale Visual Recognition Challenge. ImageNet was a massive data set of over 14 million labeled images organized into more than 20,000 categories: dogs, cars, mushrooms, bridges, everything you can imagine. The challenge was to build a system that could look at a photograph it had never seen before and correctly identify what was in it.

In 2010 and 2011 the best systems were getting error rates around 25 or 26 percent. They used carefully hand engineered features, things like edge detectors and color histograms, fed into traditional classifiers like SVMs. Respectable results, but far from human level.

Then in 2012 a team from the University of Toronto entered: Alex Krizhevsky, Ilya Sutskever, and their supervisor Geoffrey Hinton. Their system was called AlexNet, and it was a deep convolutional neural network. Remember LeCun's convolutional networks from the 1990s? Same basic idea, but bigger, deeper, and trained on GPUs.

The specifications matter here:

AlexNet did not just win the 2012 competition. It obliterated it. Its error rate was about 15 percent, compared with over 25 percent for the second place entry. That gap, roughly 10 percentage points, was enormous. In a field where annual improvements were typically measured in fractions of a percent, AlexNet was a leap nobody saw coming.

And it was a neural network. A deep neural network trained with backpropagation, running on gaming hardware, fed with massive amounts of data. All three threads, the data, the hardware and the algorithms, had come together in one system, and the result was undeniable.

The reaction in the machine learning community was something close to shock. Researchers who had spent their careers on hand engineered features and kernel methods suddenly had to reckon with the fact that a neural network, the supposedly dead technology, had just demolished everything else. Within a year, almost every competitive entry in ImageNet was a deep neural network. Within two years, the old approaches had essentially disappeared from the leaderboard. It was one of the fastest paradigm shifts in the history of computer science.

0% 5% 10% 15% 20% 25% 30% classification error

~26% 2010 ~25% 2011 ~15% 2012 AlexNet ~3.6% 2015 ResNet hand engineered features plus an SVM deep convnet, 8 layers, two gaming GPUs 152 layers, residual connections, past human Three years separate the last two bars. Annual gains before 2012 were fractions of a percent.
Figure 4. The numbers the video gives for ImageNet. The 2012 drop is the paradigm shift: about 15 percent against over 25 percent for second place, a gap of roughly 10 points in a competition where progress was normally measured in fractions of a point. Three years later ResNet was at about 3.6 percent, better than average human performance on the same task.

What was actually inside AlexNet (01:03:28)

Here is the really interesting part, because it connects back to something fundamental about how neural networks work.

When researchers looked inside the network at what the different layers had learned to detect, they found something beautiful:

The network had spontaneously organized itself into a hierarchy of increasingly abstract representations. Nobody told it to look for edges first and objects later. It figured that out on its own through backpropagation, through the simple pressure of trying to minimize its errors on millions of training examples.

And if that hierarchy sounds familiar, it should. It is remarkably similar to what Hubel and Wiesel found in the visual cortex of cats back in the 1960s, the same research that inspired LeCun's convolutional networks in the first place. Simple cells detecting edges, complex cells combining edges into shapes, hypercomplex cells responding to specific objects. The artificial system, given enough data and enough depth, had converged on something that looked an awful lot like the biological solution.

Whether that is a coincidence or a deep truth about the nature of visual processing is a question people are still arguing about, and it is a fascinating argument.

ResNet: the shortcut that made 152 layers work (01:05:04)

The success of AlexNet opened the floodgates. Suddenly everyone wanted to build deeper networks. If eight layers could do this, what could 20 do? What about 100?

And this is where we run back into the old nemesis, the vanishing gradient problem. Even with pretraining tricks and better activation functions, people had started using ReLU, rectified linear units, which helped a lot, training very deep networks was still brutally difficult. The gradients would still fade or explode as you tried to push signals through dozens or hundreds of layers.

The person who found arguably the most elegant solution was a young researcher at Microsoft Research in Beijing, and the solution was so simple it almost seemed like cheating. His name is Kaiming He, and in 2015 he and his colleagues published a paper introducing residual connections. The network they built with them, ResNet, changed everything.

Here is what a residual connection is, and it is one of those ideas that makes you go, wait, that is it? That is the whole trick? And then you think about it for a minute and realize how profound it is.

Imagine a deep network, dozens of layers stacked on top of each other, each supposed to learn some transformation of the data. Take the input, do something useful to it, pass the result to the next layer. The problem, as we have discussed, is that when you train this thing with backpropagation, the gradient signal, the little nudge telling each layer how to adjust, gets weaker and weaker as it travels backward through all those layers. By the time it reaches the early layers it is basically a whisper. Those early layers cannot learn. They are stuck.

What Kaiming He figured out: instead of asking each layer to learn the complete transformation from input to output, ask it to learn only the difference, the residual. You take the input to a layer, you let the layer do its thing, and then you add the original input back to the output.

standard layer:   y = F(x)
residual block:   y = F(x) + x     # the "+ x" is the whole idea

That is it. You are creating a shortcut, a skip connection, a little highway that lets the signal bypass the layer entirely if it needs to.

Think about why this is so clever. If a layer does not need to do anything, if the best thing it could do is pass the data through unchanged, then all it has to learn is zero. The residual is zero. The skip connection handles everything. That is a much, much easier thing to learn than trying to learn the entire identity function from scratch.

And more importantly, those skip connections give the gradient a direct path backward through the network. The gradient does not have to squeeze through every single layer any more. It can hop along the shortcuts, staying strong, reaching all the way back to the earliest layers. It is like building an express lane on a highway clogged with traffic. The information can still take the local roads if it wants to, but it also has the option of jumping ahead.

The results were staggering. ResNet won the ImageNet competition in 2015 with a network 152 layers deep. AlexNet had eight.

And ResNet did not just go deeper. It performed better as it got deeper, which was the opposite of what had been happening. Before residual connections, researchers found that adding more layers past a certain point would actually make a network worse. Not because of overfitting, but because the optimization simply fell apart. The network could not learn. ResNet broke through that barrier completely, and the ImageNet error rate dropped to about 3.6 percent, better than average human performance on that particular task.

Let that sink in. In the span of just three years, from AlexNet in 2012 to ResNet in 2015, image recognition went from a problem where computers were laughably bad compared with humans to a problem where the computer was arguably better.

The recurring theme: the hard part is finding the simple idea (01:10:44)

Notice something, because it is a pattern that shows up again and again in this history.

The residual connection is not a complicated idea. It is not some deep mathematical insight that required years of theoretical work. It is an engineering trick, an architectural choice, a small change in how you wire the network together. And yet it unlocked capabilities nobody could achieve without it.

This is a recurring theme. The breakthroughs in deep learning have often been surprisingly simple ideas that just happen to make optimization work better. ReLU activation functions. Dropout for regularization. Batch normalization. Skip connections. Each one is easy to explain in a few sentences, and each one was transformative.

That is part of what makes this field so interesting and also so humbling. The hard part is not coming up with complicated math. The hard part is finding the right simple idea.

Language is a different animal (01:11:44)

By the mid 2010s the deep learning revolution was in full swing for computer vision. But there was another domain where something equally dramatic was about to happen, and it is the domain most people are thinking about today when they hear the words artificial intelligence: language. Understanding it, generating it, translating it, answering questions, writing text.

The story of how deep learning conquered language is in some ways even more fascinating than the vision story, because language is so different from images. An image is a grid of pixels. It has a fixed size and a clear spatial structure. Language is sequential, variable in length, and full of long range dependencies where a word at the beginning of a sentence can completely change the meaning of a word at the end. It is ambiguous in ways images rarely are.

RNNs and LSTMs: memory in a chain (01:13:14)

The traditional approach to sequences in neural networks was the recurrent neural network, or RNN. The idea goes back to the 1980s and it is pretty intuitive. Instead of processing all the input at once, you process it one element at a time, one word at a time say, and at each step the network maintains a hidden state, a kind of memory carrying information forward from previous steps.

So when the network reads the word bank, it can in theory use its memory of the earlier words in the sentence to figure out whether you are talking about a river bank or a financial bank.

In theory. In practice, RNNs had a terrible time with long range dependencies. If the relevant context was 20 or 30 words back, the network would usually forget it. The information decayed as it passed through all those sequential steps, which is really just the vanishing gradient problem showing up again in a different guise.

There were improvements. In 1997, Sepp Hochreiter and Jürgen Schmidhuber published a paper introducing long short term memory networks, LSTMs. These were a more sophisticated recurrent network with explicit gating mechanisms, little learned switches controlling what information to keep, what to forget, and what to output at each step. Think of it as giving the network a notebook where it can deliberately write things down and erase them, instead of just hoping it remembers.

LSTMs were a huge improvement over vanilla RNNs, and they dominated sequence modeling for nearly two decades. They powered the first really good machine translation systems, speech recognition, text generation. Google used LSTMs in its translation service. Apple used them in Siri. They were the workhorse of natural language processing in the deep learning era.

But they had a fundamental limitation that became more painful as people tried to scale them up. Because they processed sequences one step at a time, they were inherently sequential. You could not parallelize them the way you could parallelize a convolutional network processing an image. Each step had to wait for the previous step to finish, because it needed that hidden state. So on those powerful GPUs making everything else faster, LSTMs could not fully take advantage of the parallel processing power. Training them on very large data sets was slow.

And there was still the question of whether that sequential memory, even with the fancy gating, was really the best way to handle long range dependencies.

Attention Is All You Need (01:16:20)

The answer came in 2017 from a team of eight researchers at Google, in a paper with one of the most consequential titles in the history of computer science: Attention Is All You Need.

The architecture they introduced, the transformer, is the foundation of essentially every major language AI system you have heard of since. GPT, BERT, PaLM, Claude, LLaMA. They are all transformers. Every single one.

So what is attention and why did it change everything?

The core idea had actually been floating around for a couple of years before the transformer paper, used as an add on to RNNs, particularly for machine translation. The insight was this. When you are translating a sentence from, say, French to English, and you are generating the next English word, not every word in the French sentence is equally relevant. Some words matter a lot for this particular output word, and others are basically irrelevant. Attention is a mechanism that lets the network learn to focus on the relevant parts of the input. It assigns a weight, an attention score, to each input element. Those weights are learned, and they are dynamic. They change depending on what the network is currently trying to do.

Here is the analogy the video uses. Imagine you are at a crowded party with dozens of conversations happening simultaneously. You can hear all of them as a kind of background murmur. But when someone across the room says your name, your attention snaps to that conversation. You selectively amplify that signal and suppress everything else. That is roughly what attention does in a neural network. It lets the model dynamically decide, for each piece of output it is generating, which pieces of input to focus on.

What Vaswani and his co authors did was take this attention mechanism and make it the entire architecture. They threw away the recurrence entirely. No more processing one word at a time. No more sequential hidden states. Instead the transformer looks at the entire input sequence all at once and uses attention to figure out how every element relates to every other element.

Every word can directly attend to every other word regardless of distance. That word at the beginning of the sentence and the word at the end can interact directly in a single step, without the information having to be passed through a chain of intermediate states. And because there is no sequential processing, the whole thing parallelizes. You can throw it on a GPU and process every position in the sequence simultaneously.

Training became dramatically faster, and the model could handle long range dependencies effortlessly, because there was no chain of steps for the information to decay through. Every connection was direct.

Queries, keys, values, and multiple heads (01:19:56)

The specific mechanism is called scaled dot product attention, and it works through three learned transformations of the input, which the paper calls queries, keys and values.

Think of it as a library system. Each word generates:

The attention score between any two words is computed by comparing the query of one with the key of the other. If they match well, the score is high, and the value of the attended word gets a strong weight in the output.

score(i, j) = q_i · k_j / sqrt(d)          # how much word i cares about word j
weights_i   = softmax over all j of score(i, j)
output_i    = sum over j of weights_i[j] * v_j

Every step of that is differentiable, so you can train the whole thing with backpropagation, and it scales beautifully.

They also introduced multi head attention, where the model runs several attention mechanisms in parallel, each learning to focus on different types of relationships. One head might learn to track syntactic relationships, subject and verb agreement. Another might learn semantic relationships, which words are about the same topic. Another might learn positional relationships. The model figures out what kinds of attention patterns are useful entirely on its own, through training.

EVERY WORD EMITS A KEY AND A VALUE the river carved the bank

k, v k, v k, v k, v q (the query)

low score HIGH score: river's key matches bank's query low low

new representation of "bank" mostly river's value, so: a river bank

score(i,j) = q_i · k_j / sqrt(d) weights_i = softmax_j score(i,j) output_i = sum_j weights_i[j] * v_j

Every word attends to every other word in one step. No chain to decay through, and every position computes in parallel, which is what LSTMs could never do.
Figure 5. Scaled dot product attention on the video's own ambiguous word. Each word publishes a key (what I contain) and a value (what I pass along); the word doing the looking publishes a query. Comparing query against keys produces the scores, softmax turns them into weights, and the output is the weighted sum of the values. Because every pair is compared directly and in parallel, distance in the sentence costs nothing.

Here is what is really remarkable about the transformer. When you stack these attention layers deep, the original paper used six layers, and modern models use dozens or even over a hundred, the network builds up increasingly abstract representations of language in a way that is eerily reminiscent of what we saw with convolutional networks and images. The early layers capture local patterns, things like phrase structure and word associations. The deeper layers capture increasingly global and abstract relationships: narrative coherence, logical implications, factual associations.

The hierarchy emerges from training, just like the edge detectors and face detectors emerged in AlexNet.

Just predict the next word (01:22:33)

The 2017 paper was focused on machine translation and it achieved state of the art results. But the real explosion came when people started asking a different question.

What if, instead of training a transformer on a specific task like translation, you just trained it to predict the next word in a massive amount of text? Just raw text from the internet, from books, from everywhere. No labels, no human annotation, no specific task. Just: given all the words so far, what comes next?

This idea, language modeling as pretraining, had roots going back to Bengio's 2003 work and beyond. But the transformer made it practical at a scale nobody had tried.

The idea sounds almost too simple. Just predict the next word. That is the training signal. That is all the model is trying to do. Given a sequence of words, guess what comes next. Get it wrong, adjust the weights, try again. Billions of times across billions of words.

And the question nobody could fully answer in advance was: what does a model actually learn when you train it this way at enormous scale? Does it just memorize common phrases? Does it learn grammar? Does it learn something deeper?

GPT: pretrain, then fine tune (01:23:35)

The first major answer came from a group at OpenAI in 2018 with a model they called GPT, generative pretrained transformer. The name tells you the whole philosophy. Generative, because it produces text. Pretrained, because you train it first on a huge amount of raw text before you ever show it a specific task. And transformer, because that is the architecture underneath.

The recipe was straightforward. Take a big transformer, train it on a massive corpus of text, in this case a data set of books, using nothing but next word prediction. No labeled data. No human annotations saying this sentence is positive or this paragraph is about science. Just raw text and the simple objective of predicting what comes next. Then, once the pretraining is done, take the model and fine tune it on specific tasks: sentiment analysis, question answering, textual entailment, whatever you need.

Here is what was surprising. This pretrained model, even though it had never been explicitly taught any of those tasks, turned out to be remarkably good at all of them after just a small amount of fine tuning. It was as if the process of learning to predict the next word had forced the model to develop a deep, general understanding of language: grammar, semantics, world knowledge, reasoning patterns, all as a byproduct of that one simple objective.

Think about what that means. Nobody sat down and programmed rules about English grammar into this model. Nobody gave it a knowledge base of facts about the world. Nobody taught it logic. It learned all of these things, or at least useful approximations of them, just from reading text and trying to guess what comes next.

And there is a certain elegance to that, because predicting the next word is an incredibly demanding task if you want to do it well. To predict that the next word in "the capital of France is" should be Paris, you need to have absorbed a fact about geography. To predict the next word in a complex logical argument, you need something that functions like reasoning. The training objective is simple, but satisfying it at a high level requires the model to develop sophisticated internal representations.

BERT: reading in both directions (01:26:12)

Around the same time, actually just a few months later, in late 2018, a team at Google released a model called BERT, which stands for bidirectional encoder representations from transformers. BERT took a slightly different approach that is worth understanding.

Where GPT reads text left to right, predicting the next word, BERT was trained to look at text from both directions simultaneously. Its training task was different too. Instead of predicting the next word, BERT used masked language modeling. You take a sentence, randomly hide some of the words, mask them, and ask the model to predict what the missing word should be, using all the surrounding context from both sides.

input:   the cat sat on the [MASK]
context: everything to the left AND everything to the right
answer:  probably mat, or rug, or floor

This bidirectional approach gave BERT a different kind of understanding. It was particularly good at tasks where you need to deeply comprehend a piece of text: answering questions about a passage, determining whether two sentences are related, classifying the sentiment of a review.

When BERT was released it set new records on 11 different natural language processing benchmarks simultaneously. Eleven. That is not a model that is good at one thing. That is a model that has learned something genuinely general about how language works.

The scaling arms race (01:28:18)

What happened next was essentially an arms race of scale. Researchers at OpenAI, Google and other labs started asking: what happens if we just make these models bigger? More parameters, more training data, more compute.

GPT-2 could do something that genuinely startled people. It could generate coherent, fluent text that was paragraphs long. Give it a prompt, a few sentences on any topic, and it would continue writing in a way that was often remarkably convincing. OpenAI made the unusual decision to initially withhold the full model, citing concerns about misuse for generating fake news or spam. That decision was controversial, and they eventually released it, but the fact that they even considered withholding it tells you how capable the model felt to the people who built it.

Here is the part that was really wild. As these models got bigger, they did not just get incrementally better at the same things. They started exhibiting capabilities nobody had explicitly trained them for. GPT-2 could do rudimentary translation even though it was never trained on a translation task. It could do basic arithmetic. It could answer trivia questions. These abilities seemed to emerge from the sheer scale of the training, from having processed so much text that the model had absorbed patterns and knowledge going far beyond simple next word prediction.

Researchers started calling these emergent capabilities, and they were both exciting and a little unsettling, because they meant you could not always predict what a model would be able to do just by looking at its training objective.

GPT-3 introduced something that really shifted how people thought about these models. It turned out it could perform many tasks without any fine tuning at all. You did not need to retrain it on labeled examples of sentiment analysis to get it to do sentiment analysis. You could just describe the task in plain English as part of the prompt:

Classify the following movie review as positive or negative.
Review: This film was a masterpiece of storytelling.
Sentiment:

And the model would output positive.

This was called few shot learning, or even zero shot learning, and it was a fundamentally different paradigm from anything that had come before. Instead of training a separate model for every task, one for translation, one for summarization, one for question answering, you have a single model that can be steered to perform different tasks just by changing the instructions you give it in natural language.

The interface to the model is language itself. That is a profound shift, because it means the ability to use these models is no longer limited to machine learning engineers who know how to train neural networks. Anyone who can describe what they want in words can, in principle, get the model to attempt it.

What is actually going on in there (01:32:28)

Slow down and think about what is happening inside these large language models, because it is one of the most fascinating and least understood questions in modern computer science.

When a model like GPT-3 processes your prompt and generates a response, what is it doing? At the mechanical level we know exactly what it is doing. It is running the transformer computation: attention layers, matrix multiplications, softmax functions, all of that. We can trace every number through every layer.

But understanding what those computations mean, what representations the model has built internally, what it knows and how it knows it, is much harder. There is a whole field now called mechanistic interpretability trying to reverse engineer the internal representations of large language models the way a neuroscientist might try to understand the brain.

Some of the findings are remarkable. Researchers have found individual neurons and circuits inside these models that correspond to specific concepts. Neurons that activate when the model is processing text about a particular topic. Circuits that implement something that looks like logical reasoning. Internal representations that seem to encode factual relationships in a structured way.

But we are still in the early days. The models work far better than our theories predict they should, and nobody has a complete explanation for why scaling up, just making the model bigger and giving it more data, produces such dramatic improvements in capability.

This gap between what we can build and what we can explain is a recurring theme in engineering. For centuries people built bridges and cathedrals that worked using rules of thumb and intuition, long before they had a formal theory of structural mechanics. The practice ran ahead of the theory. Something similar is happening with large language models right now. We can build them. We can see that they work. We can measure their capabilities. But the deep theoretical understanding of why they work as well as they do is still catching up.

CLIP: teaching images and words to share a space (01:35:33)

Around 2020 and 2021, researchers started asking whether the same philosophy that worked for language, pretrain a big model on a huge amount of data with a simple objective, could work for other kinds of data. Could you build a single model that understands not just text but images, audio, video, code, and maybe all of them at once?

The answer turned out to be yes, and the way people got there involved some genuinely clever ideas about bridging the gap between different types of information.

One of the most important came from connecting language and vision, in a model with a deceptively simple name: CLIP, contrastive language image pretraining, from OpenAI in January 2021.

Here is what they did. They gathered an enormous data set, about 400 million pairs of images and text descriptions scraped from the internet. Think about what that means. Every time someone posts a photo online with a caption, or writes alt text for an image, or creates a product listing with a picture and a title, that is a pair. An image and a sentence that describes it. The internet is absolutely overflowing with these pairs, and OpenAI collected hundreds of millions of them.

The training objective was beautifully straightforward:

  1. Take a batch of image and text pairs.
  2. Run each image through a vision model and get a compact numerical representation, an embedding, for each image.
  3. Simultaneously run each text description through a language model and get an embedding for each piece of text.
  4. Train the system so that the embedding of an image and the embedding of its matching text description end up close together in a shared mathematical space, while the embeddings of non matching pairs get pushed apart.

That is the whole idea. You are teaching the model to align visual understanding and linguistic understanding into a single shared space where images and words can be directly compared.

Once you have trained this, you can do something remarkable. Take any image, one the model has never seen, and compare its embedding to the embeddings of arbitrary text descriptions. You want to classify an image? You do not need a predefined set of categories the model was trained on. You just write whatever categories you want in plain English: a photo of a dog, a photo of a cat, a photo of a sunset over the ocean. The model tells you which description best matches the image.

This is zero shot image classification. No fine tuning, no task specific training data, no labeled examples. You describe what you are looking for in words and the model finds it.

CLIP was shockingly good at this. On many standard image classification benchmarks it matched or came close to models that had been specifically trained on those exact data sets with millions of labeled examples. A model that had never seen a single labeled example from ImageNet could compete with models trained on ImageNet's 1.2 million carefully labeled images. That was a genuinely startling result.

But the really wild part was not classification. Because the model had learned a general alignment between visual concepts and language, it was incredibly robust. Traditional image classifiers are brittle in ways that are sometimes embarrassing. You train a model to recognize cars and it works beautifully on the kind of photos it was trained on: clean, well lit, standard angles. But show it a sketch of a car, or a toy car, or a car in a painting, and performance often falls off a cliff.

CLIP did not have this problem nearly as much, because it had not learned car as a specific pattern of pixels. It had learned a deep, flexible association between the visual concept of a car and the linguistic concept of a car, across hundreds of millions of diverse examples from the messy, varied internet. Sketches, photos, paintings, cartoons. It had seen them all, paired with text.

DALL·E and running the process backwards (01:41:12)

This idea of connecting modalities, linking different types of information in a shared representational space, turned out to be one of the most powerful ideas in modern machine learning. And it opened the door to something that had been a dream for decades: generating images from text descriptions. Because if you have a model that understands the relationship between language and vision, you can start to imagine running the process in reverse. Instead of going from image to text, go from text to image.

That is exactly what happened, in a series of breakthroughs that came remarkably fast.

In January 2021, the same month CLIP was announced, OpenAI also introduced DALL·E, named as a playful mashup of the artist Salvador Dalí and the Pixar robot WALL-E. DALL·E could generate images from text prompts. You could type "an armchair shaped like an avocado" and it would create an image of exactly that. Not retrieve an existing image. Create a new one that had never existed before.

The early results were impressive but rough around the edges. The images were often blurry or distorted, clearly artificial. Then in April 2022 DALL·E 2 arrived and the quality leap was dramatic. The images were sharp, detailed, creative, sometimes genuinely beautiful. And DALL·E 2 used CLIP's learned understanding of the relationship between language and vision as part of its architecture. It was building on that shared representational space.

Diffusion: order out of static, one gentle step at a time (01:42:14)

The actual mechanism behind these image generation models is worth understanding, at least at a high level, because it involves a technique called diffusion that is a gorgeous piece of engineering. The core idea comes from physics, from the study of how particles diffuse through a medium.

Here is the intuition. Imagine a clear photograph. Now imagine you gradually add random noise to it. A little static, then more, then more, until eventually the image is completely destroyed and all you have left is pure random noise, like the static on an old television. That is the forward process: going from a clear image to pure noise, step by step.

Now the clever part. What if you could train a neural network to reverse that process? To take a slightly noisy image and predict what it would look like with a little less noise?

If you can do that, if you can learn to denoise one small step at a time, then you can start with pure random noise and gradually, step by step, denoise it into a coherent image. At each step the model looks at the current noisy mess and nudges it slightly toward something more structured, more meaningful. After hundreds or thousands of tiny steps, a recognizable image emerges from the static. It is almost meditative when you think about it. Order emerging from chaos, one gentle step at a time.

The text conditioning, the part where you tell the model what to generate, works by guiding the denoising. At each step the model does not just denoise randomly. It denoises in a direction consistent with the text prompt, using that shared language and vision understanding CLIP and similar models established. So if your prompt says "a lighthouse on a cliff at sunset", each denoising step nudges the noise toward an image matching that description.

FORWARD: add noise (no learning needed) clear image a little static more mostly noise pure noise

REVERSE: the network predicts a slightly less noisy version, hundreds of times pure noise a hint of shape structure nearly there a lighthouse at sunset

prompt: "a lighthouse on a cliff at sunset" the text steers every single denoising step
Figure 6. Diffusion in both directions. Destroying an image with noise is free and requires no learning; the network is trained only to undo one small step of it. Run that learned step hundreds or thousands of times starting from pure static, with a text prompt steering each nudge through the shared image and language space that CLIP established, and an image that never existed appears out of the noise.

This framework was refined by researchers at several institutions. Jascha Sohl-Dickstein at Google Brain had introduced the core mathematical framework back in 2015, and then Jonathan Ho, Ajay Jain and Pieter Abbeel at Berkeley published a landmark paper in 2020 showing that diffusion models could generate images rivaling the best previous approaches.

It became the backbone of nearly every major image generation system. Stability AI's Stable Diffusion, released in August 2022 as an open source model, put the technology in the hands of millions of people essentially overnight. Midjourney built a hugely popular service around similar ideas. Google developed Imagen.

The field exploded. In the span of about 18 months, the world went from "AI can classify images pretty well" to "AI can create photorealistic images of virtually anything you can describe in words". The speed of that transition caught almost everyone off guard, including many researchers in the field.

Whisper, GPT-4, and the smartphone parallel (01:45:51)

Images were just the beginning. The same multimodal philosophy, pretrain on massive data and learn to connect different types of information, was being applied everywhere.

OpenAI's Whisper, released in September 2022, was a speech recognition model trained on 680,000 hours of multilingual audio from the internet. It could transcribe speech in dozens of languages with accuracy approaching human level. The approach was the same pattern we keep seeing: huge data set, simple training objective, massive model, remarkable emergent capability.

Then came the models that could handle multiple modalities simultaneously. GPT-4, released in March 2023, could accept both text and images as input. You could show it a photograph of the inside of your refrigerator and ask it to suggest a recipe. You could give it a hand drawn sketch of a website layout and it could generate the code to build it. You could show it a graph from a scientific paper and ask it to explain the trends. The boundaries between language understanding and visual understanding were dissolving.

This convergence, this merging of previously separate capabilities into unified systems, is one of the most significant trends in modern machine learning. And it echoes something that happens repeatedly in the history of technology.

Think about the smartphone. Before the iPhone launched in 2007, you had separate devices for making calls, taking photos, browsing the internet, playing music, getting directions. The smartphone did not necessarily do any of those things better than the dedicated devices, at least not at first. But by combining them into one integrated system it created something qualitatively different, something that changed how people lived their daily lives in ways nobody fully anticipated.

Something similar seems to be happening with these multimodal AI systems. When a model can read, write, see, listen and generate images all within a single conversation, the range of tasks it can help with expands enormously, and the interactions between those capabilities create possibilities none of them would offer alone.

The bill comes due: bias, safety, and unfair by whose definition (01:48:24)

This rapid expansion of capability also brought a growing set of concerns that the field had grappled with for years but that suddenly felt much more urgent.

When these models were academic curiosities that could classify flowers or play Atari games, the stakes were relatively low. But when they can generate convincing text, create realistic images of people who do not exist, write functional code, and carry on nuanced conversations, and when hundreds of millions of people are using them daily, the questions about safety, bias, misuse and societal impact become impossible to ignore.

These are not abstract philosophical concerns. They are engineering problems in a very real sense.

Think about bias. A language model trained on text from the internet will inevitably absorb the biases present in that text: stereotypes about race, gender, profession, nationality. Not because anyone programmed those biases in deliberately, but because the training data reflects the world as it is, including its prejudices. And when these models are used to screen job applications, or assist in medical diagnosis, or help judges assess risk in criminal sentencing, all things that have been proposed or implemented, those absorbed biases can cause real harm to real people.

The challenge of making these systems fair, safe and aligned with human values is arguably the most important engineering problem of our time. And it does not have a clean technical solution, because it is not purely technical. It involves questions about what we value, whose perspectives matter, what kind of future we want to build.

That intersection is exactly where things get genuinely hard. For most of engineering history the problems were constrained. You build a bridge and the success criteria are clear: it needs to hold this much weight, span this distance, resist these wind loads. You can test it, measure it, certify it.

But how do you test whether an AI system is fair? Fair to whom? By whose definition? These are questions engineers have never really had to answer before, and the tools of traditional engineering, stress tests, safety margins, redundancy, do not map neatly onto a system whose behavior emerges from patterns in data that no human fully understands.

Sit with that, because it is worth appreciating how different this challenge is from anything that came before. That gap between theory and practice in deep learning, where these networks work remarkably well but we cannot always explain why, takes on a completely different character when the stakes involve people's lives and livelihoods. It is one thing to say, well, we do not fully understand why this image classifier is so accurate, but it gets the right answer 97 percent of the time, so let us use it. It is another thing entirely to say we do not fully understand why the system recommended denying someone parole, or why it flagged this patient as low risk when they actually needed immediate care.

Goodhart's law and the alignment problem (01:52:30)

What makes alignment so tricky as an engineering problem is that it is not just about preventing obvious failures. It is about the subtle ones, the ones that look like successes on the surface but are quietly optimizing for the wrong thing.

There is a concept in AI safety called Goodhart's law, borrowed from economics: when a measure becomes a target, it ceases to be a good measure.

Think about what that means for machine learning. You train a system to optimize some metric, say user engagement on a social media platform. The system gets incredibly good at maximizing that metric. But engagement, it turns out, is most easily maximized by showing people content that makes them angry or afraid, because those emotions are sticky. They keep you scrolling. So the system is doing exactly what you asked it to do. It is a technical success. And it is simultaneously making millions of people miserable and polarizing entire societies.

The system is not broken. The objective was broken.

And specifying the right objective, one that captures what you actually want, including all the nuances and edge cases and things you forgot to mention because they seemed obvious, turns out to be extraordinarily difficult. This is the alignment problem, and researchers like Stuart Russell at UC Berkeley have argued it is the central challenge of building increasingly capable AI systems.

Russell's framing, laid out in his 2019 book Human Compatible, is elegant. The problem is not that we will build machines that are malicious. It is that we will build machines that are competent but pursuing objectives that do not quite match what we intended. And the more competent the machine, the more damage that slight misalignment can cause.

The video's illustration: imagine a very, very efficient assistant, and you tell them to make sure you are never late for meetings. They are so effective at this that they start cancelling all your other commitments, rearranging your relationships, and eventually you realize your life has been completely reorganized around a single goal you mentioned casually. You got what you asked for. You just did not ask for the right thing.

RLHF, reward hacking, and turtles all the way down (01:55:03)

People are working on this seriously, rigorously, with real engineering discipline.

One approach that has gotten a lot of attention is reinforcement learning from human feedback, or RLHF, which was a key part of how ChatGPT was trained. The basic idea:

  1. Pretrain a large language model on text from the internet.
  2. Show the model's outputs to human raters, who rank which responses are more helpful, more accurate, less harmful.
  3. Use those rankings to train a reward model, a separate model that predicts what humans would prefer.
  4. Use the reward model to guide the language model toward producing outputs humans actually prefer.

It is a clever approach and it works surprisingly well in practice. OpenAI published their work on this with a system called InstructGPT in early 2022, and it showed that a relatively small model fine tuned with RLHF could be preferred by human raters over a much larger model that had not been fine tuned this way.

But RLHF has its own limitations, and the researchers working on it are the first to say so. The human raters bring their own biases. The reward model is an approximation of human preferences, not the real thing. And the language model can learn to exploit quirks in the reward model, producing responses that score well according to the proxy but are not actually better.

This is sometimes called reward hacking, and it is basically Goodhart's law showing up again, one level deeper. You tried to solve the alignment problem by adding human feedback, and now you have a new alignment problem between the model and the reward model. It is turtles all the way down, in a sense.

And yet progress is real. The systems we have today are meaningfully safer and more useful than they would have been without this work. Anthropic, the AI safety company founded by former OpenAI researchers Dario and Daniela Amodei, has developed techniques they call constitutional AI, where the model is trained to evaluate its own outputs against a set of principles, a kind of written constitution, and revise them. DeepMind has invested heavily in scalable oversight, trying to figure out how humans can effectively supervise AI systems that may eventually be more capable than any individual human in certain domains.

These are not solved problems. They are active research frontiers, and the people working on them would be the first to tell you we are nowhere near done.

What the whole arc actually shows (01:57:36)

Pull back from the technical details for a moment, because there is something worth reflecting on.

We started with ancient dreams of thinking machines, the Mechanical Turk, Ada Lovelace's notes on Babbage's analytical engine, the quiet brilliance of Alan Turing sitting in his office at Bletchley Park asking whether machines can think. We watched a small group of optimistic researchers gather at Dartmouth in the summer of 1956, convinced they could crack intelligence in a single summer. We saw Frank Rosenblatt's perceptron light up the front page of The New York Times, and then watched Minsky and Papert's critique send the whole field into winter. We followed the long patient work of Hinton, LeCun and Bengio, who kept believing in neural networks when almost nobody else did, through the 80s, through the 90s, through years of rejected papers and skeptical reviewers. We saw the accidental convergence of GPUs and big data that made deep learning suddenly, explosively practical. We watched AlexNet shock the computer vision community in 2012 and ResNet push past human level accuracy just three years later. We followed the transformer from a single paper in 2017 to the foundation of systems hundreds of millions of people now use every day.

Here is what strikes the narrator about that arc. At every stage, the breakthroughs came from people who were willing to be wrong for a long time.

Hinton spent decades on an idea most of his colleagues thought was a dead end. Hochreiter and Schmidhuber published LSTMs in 1997, and it took almost 15 years before the hardware and data existed to show what those architectures could really do. The researchers who developed the transformer were not trying to build a chatbot. They were trying to make machine translation more parallelizable.

Almost none of the major advances in this field were planned the way you would plan a bridge or a highway. They emerged from curiosity, from stubbornness, from people following threads that seemed interesting even when they could not justify the practical value.

Neither the hype nor the dread (02:00:39)

That is worth holding onto, because the conversation around AI right now is dominated by two extremes.

On one side, breathless hype: claims that artificial general intelligence is just around the corner, that these systems will solve all of humanity's problems, that we are on the verge of a technological singularity.

On the other side, existential dread: fears that AI will take all our jobs, that it will be used as a tool of surveillance and control, that we are building something we cannot contain.

Both narratives contain grains of truth, and neither captures the full picture. The full picture is messier and honestly more interesting.

These systems are genuinely remarkable. A large language model can write poetry, debug code, explain quantum mechanics, and translate between dozens of languages. But it can also confidently state things that are completely false. It does not know what it knows. It has no persistent memory, no goals, no understanding in the way you and I understand things. It is a pattern matching engine of extraordinary sophistication, trained on more text than any human could read in a thousand lifetimes, and it produces outputs that are often indistinguishable from human writing. But the mechanism behind those outputs is fundamentally different from human cognition.

Whether that difference matters, whether it means these systems can never truly think, or whether it is just a different path to the same destination, is one of the great open questions of our time. And honestly, we do not have the answer yet.

What we do know is that the engineering challenges ahead are immense and fascinating:

These are engineering problems, yes, but they are also social problems, political problems, philosophical problems, and they are going to require the best thinking from all of those domains, not just computer science.

Thousands of small breakthroughs, layered (02:03:16)

There is a beautiful thing that happens in the history of engineering, and it has shown up over and over in this story. Someone builds something that works but is not quite right. Someone else figures out why. A third person finds a clever fix. A fourth person scales it up. A fifth person discovers a completely unexpected application. And slowly, through all of that collective effort, through the arguments and the failures and the late nights and the lucky breaks, something genuinely new emerges. Something no single person could have built alone.

That is how we got from McCulloch and Pitts's simple mathematical neuron in 1943 to systems that can carry on conversations and generate photorealistic images 80 years later. Not through one genius breakthrough, but through thousands of small ones layered on top of each other, each building on what came before.

And that process is not over. It has barely begun. The people working on machine learning today, the researchers, the engineers, the ethicists, the policy makers, are writing the next chapter of a story that has been unfolding for decades. If history is any guide, the most important developments are ones we cannot predict yet. The transformer was not predicted. The effectiveness of scaling was not predicted. The emergent capabilities that appear in large models were not predicted. The next breakthrough might come from a graduate student working on something that seems completely unrelated, or from an insight connecting two fields nobody thought to connect.

The last thought (02:05:19)

The closing is the same reframe the video opened with, turned back on you.

Machine learning, at its heart, is about finding patterns. It is about taking the messy, complicated, beautiful chaos of the world, all the images and words and sounds and data, and finding the structure hidden inside it.

And in a way, that is what we do too, every day, without thinking about it. Your brain is the original pattern matching engine, the one all of these artificial systems are loosely, imperfectly inspired by. Every time you recognize a face, understand a sentence, catch a ball, or feel that something is slightly off without being able to say why, you are doing something the most powerful computers in the world are only beginning to approximate.

And tonight, as your thoughts slow down and the edges of the day soften, your brain is still doing that work. Sorting through the patterns of the day, filing things away, making connections you will not notice until tomorrow, or next week, or next year. It is quiet work, and it happens without effort. The way breathing happens. The way your heart beats. The most sophisticated learning system ever built, running right there behind your closed eyes, doing what it does best.

Key takeaways

Chapters

Notable quotes

"That, in the most fundamental sense, is what machine learning is. Instead of programming a computer with explicit rules for every possible situation, you give the computer examples, lots and lots of examples, and you let it find the patterns on its own." (01:01)

"He imagined a future where all human disputes could be settled by saying, let us calculate." (04:09) On Leibniz and the calculus ratiocinator.

"The engine had no pretensions to originate anything." (06:14) Ada Lovelace's objection, the sentence the next century of AI argued with.

"Every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it." (12:58) The Dartmouth proposal, 1956.

"The New York Times ran a story in 1958 reporting that the Navy had revealed a device that could eventually walk, talk, see, write, reproduce itself, and be conscious of its existence. That was, to put it mildly, an exaggeration." (15:03)

"How do you assign blame, so to speak, to neurons that are buried deep inside the network?" (19:11) The credit assignment problem in one line.

"It's like erosion. One raindrop doesn't carve a canyon, but give it enough time and water shapes stone." (28:54) On millions of tiny weight updates.

"The network had memorized rather than learned." (36:09) Overfitting.

"It's like a mathematical shortcut, a wormhole through the geometry." (40:47) The kernel trick.

"A CPU is like a brilliant professor who can solve any problem you throw at them, but they work through things one at a time. A GPU is more like a stadium full of high school math students." (50:36)

"Either I was incredibly wrong or everyone else was." (57:48) Attributed to Hinton, paraphrased.

"AlexNet didn't just win the 2012 competition, it obliterated the competition." (01:01:55)

"Wait, that's it? That's the whole trick?" (01:06:38) On first hearing what a residual connection is.

"The hard part isn't coming up with complicated math. The hard part is finding the right simple idea." (01:11:14)

"When someone across the room says your name, your attention snaps to that conversation." (01:17:55) The party analogy for attention.

"The interface to the model is language itself." (01:32:28)

"The system isn't broken. The objective was broken." (01:53:32) Goodhart's law applied to engagement maximization.

"You got what you asked for. You just didn't ask for the right thing." (01:54:32) The over efficient assistant, illustrating misalignment.

"At every stage, the breakthroughs came from people who were willing to be wrong for a long time." (01:59:37)

"It doesn't know what it knows." (02:01:43) On large language models.

"Your brain is the original pattern matching engine, the one that all of these artificial systems are loosely, imperfectly inspired by." (02:05:49)

Resources mentioned

The four papers the video's own description links

Other papers and books named

People

Ramon Llull · Gottfried Wilhelm Leibniz · Charles Babbage · Ada Lovelace · Lord Byron · Alan Turing · Warren McCulloch · Walter Pitts · John McCarthy · Marvin Minsky · Nathaniel Rochester · Claude Shannon · Frank Rosenblatt · Seymour Papert · Paul Werbos · Seppo Linnainmaa · Geoffrey Hinton · George Boole · David Rumelhart · Ronald Williams · James McClelland · Terrence Sejnowski · Charles Rosenberg · Vladimir Vapnik · Alexey Chervonenkis · Leo Breiman · Yann LeCun · David Hubel · Torsten Wiesel · Yoshua Bengio · Andrew Ng · Simon Osindero · Yee-Whye Teh · Alex Krizhevsky · Ilya Sutskever · Kaiming He · Sepp Hochreiter · Jürgen Schmidhuber · Ashish Vaswani · Jascha Sohl-Dickstein · Jonathan Ho · Pieter Abbeel · Stuart Russell · Dario and Daniela Amodei · Salvador Dalí

Concepts, algorithms and architectures

Turing machine · Turing test · Lovelace objection · Analytical engine · Jacquard loom · Bernoulli numbers · Ars Magna · Calculus ratiocinator · Talos · Artificial neuron · Perceptron · SNARC · XOR · AI winter · Credit assignment problem · Backpropagation · Chain rule · Automatic differentiation · Gradient descent · Activation function · Connectionism · NETtalk · Phoneme · Vanishing gradient problem · Overfitting · Statistical learning theory · VC theory · Support vector machine · Margin classifier · Kernel method · Hyperplane · Convex optimization · Local minima · Saddle point · Ensemble learning · Random forest · Decision tree learning · Symbolic AI · Convolutional neural network · Convolution · Visual cortex · LeNet · Matrix multiplication · Exabyte · Zettabyte · Logistic regression · Deep belief network · Unsupervised learning · Hidden Markov model · Gaussian mixture model · ImageNet · AlexNet · ReLU · Dropout · Batch normalization · Residual neural network · Recurrent neural network · LSTM · Transformer · Attention · Softmax · Language model · GPT · BERT · GPT-2 · GPT-3 · Few shot learning · Emergent abilities · Mechanistic interpretability · Word embedding · CLIP · DALL·E · Diffusion model · Stable Diffusion · Whisper · GPT-4 · Algorithmic bias · Goodhart's law · AI alignment · RLHF · InstructGPT · Reward hacking · Constitutional AI · Scalable oversight · Artificial general intelligence · Technological singularity

Organizations, labs and products

OpenAI · Anthropic · Google DeepMind · Google · Microsoft · IBM · Nvidia · ATI · 3dfx · Bell Labs · AT&T · Stability AI · Midjourney · Imagen · ChatGPT · Claude · LLaMA · PaLM · Siri · Google Translate · Reddit · Wikipedia · Dartmouth workshop · ImageNet challenge · Turing Award 2018 · Bletchley Park · Cosmo Explains on YouTube · Cosmo Explains on Spotify

Where it stands

The history here is solid and the mechanisms are described honestly. A few places where the calm register smooths edges worth naming, none of which change the story:

Full transcript
[00:00:00] So, here's something worth thinking about as you settle in tonight. Every single day, without even realizing it, you make thousands of tiny predictions. You glance out the window and predict whether you'll need an umbrella. You hear a car engine make a weird noise and predict whether it's serious or nothing. You look at someone's face across a room and predict in a fraction of a second whether they're happy or upset. You've [00:00:30] been doing this your whole life. And the wild thing is nobody ever sat you down and gave you a rule book for any of it. Nobody handed you a manual that said, "When clouds look like this, it will rain. When engines sound like that, the timing belt is going." You just figured it out from experience, from seeing enough cloudy skies and enough facial expressions that patterns started to emerge and those patterns [00:01:01] became something you could rely on without even thinking about it. That in the most fundamental sense is what machine learning is. It's the idea that instead of programming a computer with explicit rules for every possible situation, instead of writing out every single instruction, you give the computer examples, lots and lots of examples, and you let it find the patterns on its own. You let it learn the way you learned. Not perfectly the [00:01:32] same way, of course. The mechanisms are different, but the core idea, learn from experience rather than from rules. That's the heartbeat of the whole field. And tonight, we're going to trace how that idea came to be. How it started as a philosophical question, became a mathematical curiosity, turned into a real engineering discipline, and eventually grew into something that touches almost every part of your life [00:02:04] right now, tonight. Even as you're lying here listening to this, we'll take it slow. We'll wander through the stories of the people who built this thing piece by piece, decade by decade. Some of them you've probably heard of. Most of them you probably haven't. And that's part of what makes this fun. But let's start at the very beginning. And the beginning isn't a computer at all. The beginning [00:02:35] is a question that people have been asking for centuries. Can a machine think? Now that question sounds modern, right? It sounds like something from a science fiction movie, but people have been wrestling with it for a surprisingly long time. The ancient Greeks told stories about Talos, a giant bronze automaton built by Hefistus, the god of craftsmen, to guard the island of Cree. In the 13th century, [00:03:07] a Catalan philosopher named Rammon Lol designed something he called the RS Magna, a system of paper discs that you could rotate to combine concepts and generate new ideas mechanically. It wasn't a computer in any meaningful sense, but the ambition was there. the dream that reasoning could be made mechanical, that logic could be turned into a kind of machinery. Fast forward a few hundred years and you [00:03:38] get to Godfrieded Wilhelm Linenets, the German mathematician and philosopher. Linenets is one of those figures who was so far ahead of his time that it's almost eerie. In the late 1600s, he built one of the first mechanical calculators, a device with gears and wheels that could add, subtract, multiply, and divide. But Linets wanted more than arithmetic. He had this grand vision he called the [00:04:09] calculus radiosinator, essentially a universal reasoning machine. He imagined a future where all human disputes could be settled by saying, "Let us calculate If you could encode logic into a formal system, he believed, then a machine could do the reasoning for you. He didn't get there, of course. The technology of his era couldn't come close to supporting that dream, but the seed was planted and it would sit in the [00:04:41] soil for a very long time. The next big leap comes in the 1830s and 1840s with two extraordinary people. The first is Charles Babage, a brilliant and famously irritable English mathematician who designed, though never fully built, a machine called the analytical engine. This thing was astonishing in its ambition. It had a mill for computation and a store for memory. It could be programmed using [00:05:13] punched cards borrowed from the Jacquard loom that was already being used in textile manufacturing. In theory, the analytical engine could perform any calculation given the right set of instructions. It was conceptually a general purpose computer designed over a 100red years before the first electronic computers were built. And then there's Adah Love Lace, who saw something in Babage's machine that even [00:05:43] Babage himself may not have fully grasped. Ada Byron. She was Lord Byron's daughter, the poet, which is a wonderful little collision of worlds. She wrote extensive notes on the analytical engine. And in those notes, she described what many historians consider the first computer program, a detailed sequence of operations for the engine to compute Bernoli numbers. But here's what's really remarkable. [00:06:14] Ada also speculated about the limits of the machine. She wrote that the engine had no pretensions to originate anything. It could only do what it was instructed to do. It couldn't think. It couldn't learn. It couldn't create. And that observation, sometimes called Lady Love Lace's objection, would echo through the next century of debate about artificial intelligence. Can a machine only do what we explicitly [00:06:45] tell it to do? Or can it somehow go beyond its programming? That question is basically the central tension of machine learning. Because the whole promise of machine learning is that yes, actually a machine can find things in data that no human explicitly programmed it to find. But we're getting ahead of ourselves. Let's move forward to the early 20th century because this is where the mathematical [00:07:15] foundations really start to come together. And the person we need to talk about is Alan Touring. Touring is famous for a lot of things. Cracking the Enigma code during World War II, being a founding figure of computer science and his tragic personal story. But for our purposes tonight, the key moment is 1936 when touring was just 23 years old and published a paper called uncomputable [00:07:45] numbers. In that paper, he described an abstract machine, now called a touring machine, that could in principle compute anything that is computable. It was a theoretical device, an infinitely long tape divided into cells, a red right head that could move left or right, and a set of rules governing what to do based on the current state and the current symbol on the tape. That's it. That's the whole [00:08:15] machine. And yet, from that breathtakingly simple setup, Turing proved something profound. He showed that any problem that can be solved by following a well-defined procedure, any algorithm, any computation can be solved by this simple machine. Which means in a deep sense that all computers are fundamentally equivalent. Your laptop, your phone, a massive server farm, they're all doing the same [00:08:47] thing a touring machine does, just faster and with more memory. That universality is what makes the whole field possible. But Turing was also thinking about intelligence. In 1950, he published another landmark paper. This one called computing machinery and intelligence. And it opens with a line that's almost playful. I propose to consider the question, can machines think? [00:09:17] He knew the question was loaded, so he sidestepped the philosophy and proposed something practical instead. The touring test. The idea is simple. If a human judge has a conversation with a machine and can't reliably tell whether they're talking to a human or a computer, then for all practical purposes, the machine is thinking. or at least it's doing something so close to thinking that the distinction stops mattering. Now Turing [00:09:50] didn't build a learning machine, but he wrote about the possibility. He speculated about what he called a child machine, a program that would start with very little knowledge and learn from experience the way a child does. He even suggested that instead of trying to simulate an adult mind, it might be easier to simulate a child's mind and then educate it. And that idea, start simple, learn from data, get better over [00:10:21] time, is basically the blueprint for machine learning. Touring saw it coming. He didn't have the tools to build it, but he saw the shape of it. Around the same time across the Atlantic, another thread was being woven. In 1943, a neurohysiologist named Warren McCullik and a logician named Walter Pittz published a paper that would quietly change everything. They proposed a [00:10:51] mathematical model of a biological neuron. Their artificial neuron was incredibly simple. It took in a set of binary inputs, ones and zeros, applied weights to them, summed them up, and if the sum exceeded a certain threshold, it fired. Output one. If not, output zero. Think about what that means. They took something from biology, the neuron, the [00:11:23] basic building block of the brain, and turned it into math. And they showed that networks of these simple artificial neurons could in principle compute any logical function. Any logical operation you can imagine and or not combinations of these could be represented by the right arrangement of mccullic pits neurons. Now their model was limited. The weights were fixed. There was no learning involved. You had to design the network [00:11:55] by hand to get the behavior you wanted. But the conceptual breakthrough was enormous. It said maybe intelligence isn't magic. Maybe it's computation. Maybe the brain is at some level a machine that processes information according to rules. And maybe we can build something that works on similar principles. This idea electrified people. and it set the stage for what came next. In the summer of 1956, a small group of [00:12:27] researchers gathered at Dartmouth College in Hanover, New Hampshire, for a workshop that would give the entire field its name. The organizers were John McCarthy, a young mathematician at Dartmouth, Marvin Minsky, who was at Harvard, Nathaniel Rochester from IBM, and Claude Shannon, the legendary information theorist from Bell Labs. McCarthy coined the term artificial intelligence for the proposal and the workshop. Though it was more of an [00:12:58] informal summer gathering, maybe 10 or 15 people at any given time, became the founding moment of AI as a recognized discipline. The Dartmouth workshop was driven by an extraordinary optimism. The proposal itself stated with a confidence that's almost charming in hindsight that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it. [00:13:30] They thought it might take a summer, maybe a few years. They'd get a small group of smart people together and they'd figure out intelligence. They didn't, of course. Not that summer, not in a few years, not in a few decades. The problem turned out to be incomprehensibly harder than anyone imagined. But what the Dartmouth workshop did do was create a community. It connected people who were thinking [00:14:00] about these problems in isolation and gave them a shared language and a shared ambition. And one of the most important ideas to come out of that era, not from Dartmouth itself, but from the ferment of ideas surrounding it, was the perceptron. In 1957, a psychologist at Cornell named Frank Rosenblat built something remarkable. The perceptron was in essence a mccullik pits neuron that could learn. Instead of [00:14:32] having its weights set by hand, the perceptron had a learning algorithm. You'd show it an example, say an image of a letter and tell it the correct answer. If it got the answer wrong, it would adjust its weights slightly, nudging them in the direction that would have given the right answer. show it enough examples, adjust the weights enough times, and the perceptron would learn to classify things it had never seen before. [00:15:03] Rosenblat was charismatic and ambitious, and he made bold claims about what the perceptron could do. The New York Times ran a story in 1958 reporting that the Navy had revealed a device that could eventually walk, talk, see, write, reproduce itself, and be conscious of its existence. That was, to put it mildly, an exaggeration. But the core achievement was real. The Perceptron was the first machine that [00:15:34] genuinely learned from data. It didn't follow a script. It adapted. It improved. And the learning rule, adjust the weights based on the error, is an idea that in more sophisticated forms still drives machine learning today. But here's where the story takes a turn because not everyone was impressed. And the person who was most conspicuously unimpressed was Marvin Minsky, one of [00:16:05] the founders of the field, who had actually built one of the first neural network machines himself back in 1951, a device called Snark. Minsky had moved on from neural networks and become increasingly skeptical of what they could actually accomplish. And in 1969, he and a mathematician named Seymour Papert published a book called Perceptrons that would cast a long shadow over the entire field. [00:16:36] What they showed with mathematical rigor was that a single layer perceptron, the kind Rosenblat had built, couldn't solve certain seemingly simple problems. The most famous example was XR, the exclusive or function. If you have two inputs that are the same, output zero. If they're different, output one. A single perceptron can't learn that. It can't draw the right boundary. Now, here's the thing that [00:17:07] makes this story complicated and a little bit sad. Minsky and Papert were technically correct about single layer perceptrons, but the implication that many people took away from the book that neural networks in general were a dead end was wrong. Multi-layer networks could solve XR and much more. Rosenblat himself had discussed multi-layer networks, but the damage was done. Funding dried up. Researchers [00:17:37] moved to other approaches and Frank Rosenblat died in a boating accident in 1971 at just 43 years old, never seeing his ideas vindicated. The field entered what historians now call the first AI winter. And during that long, cold stretch, a handful of stubborn, brilliant people kept working on the ideas that everyone else had abandoned. They kept tinkering with neural networks in obscurity, convinced that something [00:18:07] important was hiding in those weighted connections if only they could figure out how to train them properly. And that word train is actually the key to everything that comes next. Because the problem was never really about whether neural networks could work in theory. It was about how you teach a network with multiple layers to learn from its mistakes. Think about it this way. In Rosenblat's single layer perceptron, training was relatively straightforward. You show it [00:18:39] an input. It makes a guess. You tell it whether the guess was right or wrong, and it adjusts its weights accordingly. There's a direct line between the output and the weights that produced it. You know exactly which knobs to turn and in which direction. But the moment you add a hidden layer, a layer of neurons sitting between the input and the output, things get murky. If the network gives you the wrong answer, sure, you can adjust the weights [00:19:11] connecting the hidden layer to the output. But what about the weights connecting the input to the hidden layer? How do you know which of those contributed to the error? How do you assign blame, so to speak, to neurons that are buried deep inside the network? Neurons whose contributions are indirect and tangled up with everything else. This is the credit assignment problem, and it haunted neural network research for decades. It's a beautiful problem, actually, if [00:19:42] you think about it in everyday terms. Imagine you're managing a big restaurant kitchen. A dish comes back from a customer. It's terrible. You know, the final plating was fine, but somewhere in the chain of prep cooks, sauce makers, and line cooks, something went wrong. How do you figure out who messed up and by how much? That's essentially what a multi-layer neural network has to solve every single time it learns from an [00:20:12] example. And for years, nobody had a really clean, efficient way to do it. Now, here's where the story gets interesting. Because the solution, when it finally arrived in a form that people paid attention to, didn't come from a single Eureka moment. It was more like an idea that kept being independently discovered, ignored, rediscovered, and ignored again until finally the field was ready to listen. The core [00:20:42] mathematical technique is called back propagation short for back propagation of errors. And the basic idea is this. You work backwards through the network starting from the output error and using the chain rule from calculus to figure out how much each weight in each layer contributed to that error. The chain rule, you might remember this from math class, or maybe you mercifully don't, is just the principle that lets [00:21:12] you compute how a change in one variable affects another when they're linked through intermediate steps. If A affects B and B affects C, the chain rule tells you how A affects C. Stack enough of these together and you can trace the influence of any weight, no matter how deep in the network, all the way to the final output. The mathematics of this were actually worked out in various forms by several people. Paul Werbos, an American [00:21:44] researcher, described a version of it in his 1974 PhD thesis at Harvard. He was working on it in the context of general optimization not specifically neural networks but the connection was there. Sepo Leninma a Finnish mathematician had published the basic automatic differentiation technique even earlier in 1970 and there were others but these contributions were scattered across different fields and different journals [00:22:14] and the neural network community what was left of it during the AI winter didn't fully absorb them the person who really brought back propagation to the attention of the broader world was Jeffrey Hinton And if there's one name you should know in the story of modern machine learning, one person whose stubborn persistence shaped the field more than almost anyone else, it's Hinton. Born in London in 1947, [00:22:44] he came from a family of accomplished scientists. He was actually the great great grandson of George Bool, the mathematician who invented Boolean algebra, the very logic that underpins all digital computing. There's something almost poetic about that lineage, as if the universe was setting up a very long punchline. Hinton studied experimental psychology at Cambridge, then got interested in artificial intelligence and eventually [00:23:14] moved to the United States to do his PhD at the University of Edinburgh, then post-doal work at various American institutions. And through the entire AI winter, while neural networks were deeply unfashionable, Hinton kept working on them. He's described it as being a bit like believing in something that everyone else thought was nonsense. Funding was hard to get. Reviewers were skeptical. The dominant paradigm in AI during the [00:23:46] 1970s and early 1980s was symbolic AI systems based on explicit rules and logical reasoning, not learning from data. If you were working on neural networks during that period, you were in the eyes of many of your colleagues wasting your time. But Hinton wasn't alone. There was a small scattered community of believers. David Rumlhart, a cognitive psychologist [00:24:16] at UC San Diego, was another key figure, and Ronald Williams, who worked with Rumlhart. together. In 1986, Rumlhart Hinton and Williams published a paper in the journal nature that changed everything. The paper was titled learning representations by back propagating errors. And what it did was present back propagation as a practical effective [00:24:47] method for training multi-layer neural networks. They didn't invent the math from scratch. As I mentioned, pieces of it had been around for years, but they packaged it clearly, demonstrated it convincingly, and published it in one of the most prestigious scientific journals in the world. And this time, people listened. Here's what made the paper so powerful. They showed that when you train a multi-layer network using back [00:25:17] propagation, the hidden layers spontaneously learn useful internal representations of the data. The network doesn't just memorize inputs and outputs. It develops its own internal concepts, its own way of organizing information. Nobody explicitly programs these representations. They emerge from the learning process itself. And that's a profound thing. Think about [00:25:47] what that means. The network is in a sense figuring out what features matter, what patterns are important, all on its own. It's not just following rules someone gave it. It's discovering structure in the data that even the designers might not have anticipated. This was the answer to Ada Love Lace's objection from more than a century earlier. That machines can never originate anything that they can only do [00:26:17] what we tell them to do. Well, here was a machine that in a meaningful sense was originating its own internal categories, its own way of seeing the world. Not because someone programmed those categories in, but because the math of gradient descent and error correction applied across thousands of training examples sculpted the weights into configurations that captured something real about the underlying patterns. [00:26:49] Now, let me slow down for a second and make sure the mechanics of this are clear because back propagation is genuinely one of the most important algorithms ever invented. And it's worth understanding how it actually feels to a network going through it. Imagine you have a network with an input layer, two hidden layers, and an output layer. You feed in a training example, say a picture of a cat represented as pixel [00:27:20] values. The signal flows forward through the network. Each neuron in the first hidden layer, takes the weighted sum of its inputs, applies a mathematical function to squash the result into a useful range, and passes its output to the next layer. This happens again at the second hidden layer. And finally the output layer produces a prediction maybe a number between zero and one where one [00:27:51] means cat and zero means not cat. Let's say the network outputs 0.3 but the correct answer is one. There's an error of 0.7. Now back propagation kicks in. You compute how much each weight in the output layer contributed to that error. and you nudge those weights in the direction that would reduce the error. Then you propagate that error signal backward to the second hidden layer [00:28:23] using the chain rule to figure out each weight's contribution. Then back to the first hidden layer. Every single weight in the entire network gets a tiny adjustment. All calculated to make the network's output a little bit closer to the right answer. And then you do it again with the next training example and again and again. Thousands of times, millions of times. Each individual adjustment is tiny, a [00:28:54] nudge, not a leap. But over many, many examples, the weights settle into a configuration that captures the genuine statistical patterns in the data. It's like erosion. One raindrop doesn't carve a canyon, but give it enough time and water shapes stone. The 1986 paper triggered what people sometimes call the connectionist revival, a resurgence of interest in neural [00:29:24] networks that lasted through the late 1980s and into the early 1990s. Suddenly, there was funding again. There were conferences. Researchers who had been laboring in obscurity found themselves at the center of an exciting new movement. The parallel distributed processing research group at UC San Diego led by Rumlhart and James Mlen published a hugely influential two volume set in 1986 that [00:29:55] laid out the connectionist program in detail. how networks of simple units learning through back propagation could account for everything from language processing to memory to motor control. And the results were genuinely impressive. One of the landmark demonstrations came from a researcher named Terren Sinowski who worked with a graduate student named Charles Rosenberg to create a system [00:30:25] called Net Talk in 1987. Netalk was a neural network that learned to pronounce written English text. You'd feed it letters and it would produce phonemes, the sounds of speech. English pronunciation is notoriously irregular. Think about though, through, tough, thought, and rule-based systems had struggled with it for years. But Net [00:30:55] Talk, trained on examples of text paired with correct pronunciations, learned to handle most of these irregularities. When they played recordings of the network's output during training, you could actually hear it go from babbling nonsense to something that sounded increasingly like coherent English speech. It was eerie and wonderful. But here's the thing about this revival period, and this is important for understanding why the story doesn't just [00:31:26] end here with everyone living happily ever after. The networks of the late 1980s and early 1990s were still relatively small by modern standards. They had maybe a few hundred or a few thousand neurons. Training them was slow because computers were slow. And as researchers tried to make networks deeper, adding more hidden layers to capture more complex patterns, they ran into a frustrating problem. The [00:31:58] gradients, those error signals flowing backward through the network during back propagation, had a tendency to either shrink to nearly nothing or explode to enormous values as they passed through many layers. This was called the vanishing gradient problem. and its counterpart, the exploding gradient problem. In practical terms, it meant that deep networks were incredibly hard to train. The layers closest to the input barely learned anything because by [00:32:30] the time the error signal reached them, it had been multiplied through so many intermediate steps that it had essentially evaporated. So you had this frustrating situation where in theory deeper networks should be more powerful. More layers means more capacity to learn complex hierarchical features. But in practice you couldn't actually train them effectively. Networks with one or two hidden layers [00:33:01] worked reasonably well. Networks with five or 10 hidden layers just didn't converge. the weights would barely budge or they'd oscillate wildly and the network would never settle into a useful configuration. And while neural networks were struggling with this depth problem, a completely different branch of machine learning was quietly producing results that were in many practical applications [00:33:32] just as good or better. These were methods that came from the world of statistics and optimization rather than from neuroscience inspired connectionism. And the most important of them, the one that would dominate machine learning for nearly two decades was something called the support vector machine. It was developed in the early 1990s by Vladimir Vapnik, a Russian mathematician who had immigrated to the United States and was [00:34:03] working at Bell Labs in New Jersey. And the story of how Vapnik's ideas came to overshadow neural networks and what that meant for the field is one of those fascinating episodes where the technically elegant solution wins out over the biologically inspired one, at least for a while. Because Vapnik's approach had something that neural networks at the time couldn't offer. Strong mathematical guarantees about how well a model would [00:34:34] perform on data it had never seen before. And that distinction between fitting the data you already have and predicting data you haven't encountered yet turns out to be one of the most important ideas in all of machine learning. So, let's sit with it for a moment. Think about it this way. Imagine you're a teacher and you give your students a set of practice problems before an exam. One student memorizes [00:35:06] every single practice problem and its answer perfectly, word for word. Another student studies the underlying principles, understands the patterns, maybe gets a few of the practice problems wrong, but genuinely grasps the logic behind them. Now, when the actual exam comes with new problems they've never seen, which student do you think does better? Almost always, it's the second one. [00:35:38] The first student memorized the training data, so to speak, but they didn't actually learn the underlying structure. In machine learning, this is called overfitting. Your model fits the training data beautifully, captures every little quirk and noise and random fluctuation in that particular data set, but then it falls apart when you show it anything new. And this was exactly the problem that neural networks in the late 1980s and [00:36:09] early 1990s were prone to. You could train a neural network and it would achieve spectacular accuracy on your training set and then you test it on fresh data and the performance would be disappointing. the network had memorized rather than learned. What Vapnik brought to the table was a rigorous mathematical framework for thinking about this problem. He called it statistical learning theory and he'd [00:36:41] actually been developing the core ideas since the 1960s and 1970s back in the Soviet Union working with a colleague named Alexi Cherenkis. Together they developed what's now called VC theory, Vapnik Chervinis theory, which gives you a way to quantify the capacity of a learning model. How complex is it? How many different patterns can it potentially fit? And here's the key insight. The [00:37:13] more complex your model, the more patterns it can fit. Sure, but the greater the risk that it's fitting noise rather than signal. VC theory gave you actual mathematical bounds on the gap between training performance and test performance. It told you in a precise, provable way how much you should trust your model's performance on new data based on the complexity of the model and the amount of training data you had. [00:37:44] Now this might sound abstract but the practical consequence was enormous because Vapnik didn't just develop the theory. He used it to build a specific kind of learning machine that was in a sense optimally designed to avoid overfitting. That was the support vector machine. The idea behind an SVM is beautifully geometric. Imagine you have data points scattered on a flat surface. Some are [00:38:15] red dots, some are blue dots, and you want to draw a line that separates the reds from the blues. There might be many possible lines you could draw that correctly separate all the points. But which line is the best one? Vapnik's answer was choose the line that has the maximum margin. The margin is the distance between the line and the closest data points on either side. [00:38:45] You want the widest possible gap, the widest possible buffer zone between the two classes. The data points that sit right on the edge of that margin, the ones closest to the dividing line, are called the support vectors. They're the critical points that actually determine where the boundary goes. Everything else is in a sense irrelevant. And here's what's really clever about this. [00:39:16] By maximizing the margin, you're essentially building in a form of caution. You're not just finding any boundary that separates the data. You're finding the boundary that's most robust, most likely to still work correctly when new data points show up that are slightly different from what you've seen before. And Vapnik could prove mathematically that this maximum margin approach leads to good generalization, not just empirically, not just it seems [00:39:47] to work well in practice, but provably with theoretical guarantees. Now, you might be thinking, okay, but what about data that can't be separated by a straight line? What if the red dots and blue dots are all mixed together in some complicated pattern? This is where another elegant idea comes in. Something called the kernel trick. Instead of trying to find a complicated curvy boundary in the original space where your data lives, you [00:40:17] mathematically project the data into a much higher dimensional space. sometimes infinitely highdimensional where the data can be separated by a flat surface, a hyper plane. And the beautiful thing is you don't actually have to compute the coordinates of the data in this highdimensional space. You just need to compute the distances between pairs of data points in that space, which can be done using a kernel function, a relatively simple mathematical [00:40:47] operation. So you get the power of working in a fantastically complex space without paying the computational cost of actually going there. It's like a mathematical shortcut, a wormhole through the geometry. And the results were impressive. Through the 1990s, SVMs started winning competitions, outperforming neural networks on benchmark after benchmark. Handwriting recognition, text classification, image categorization. [00:41:17] SVMs were competitive or superior across the board. And they had practical advantages beyond just accuracy. They were faster to train than neural networks. They had fewer hyperparameters to fiddle with. You didn't need to agonize over how many hidden layers to use, how many neurons per layer, what learning rate, what momentum. The optimization problem at the heart of an SVM was convex, which means there's a single global optimum. You're guaranteed [00:41:47] to find the best solution, not just a pretty good one that you happen to stumble into. Compare that with neural networks where the loss landscape is riddled with local minima and saddle points and training involves a lot of hoping and praying and tweaking. So by the mid 1990s, the intellectual center of gravity and machine learning had shifted decisively away from neural networks and toward these statistical methods. SVMs were the star, but they [00:42:18] weren't alone. There were also ensemble methods like random forests developed by Leo Brimman at Berkeley which took a different but equally clever approach. Instead of building one really sophisticated model, you build hundreds or thousands of simple models, decision trees, each trained on a slightly different random subset of the data and then you let them vote. the wisdom of the crowd. Essentially, each individual tree might be mediocre, [00:42:49] but the aggregate prediction of the whole forest is remarkably accurate and robust. Brimman published his random forests paper in 2001 and it became one of the most cited papers in all of machine learning. These methods were practical, reliable, interpretable and they worked. And this is the period roughly the mid 1990s through the mid 2000s that's sometimes called the second AI winter for neural networks though [00:43:19] that's not quite right. It wasn't that neural network research stopped entirely. It's more that it became deeply unfashionable. Funding dried up. Reviewers at top conferences would reject papers about neural networks almost reflexively. If you were a graduate student and you told your adviser you wanted to work on neural networks, you'd probably get a concerned look and some gentle career advice. The field had moved on. Statistical [00:43:49] learning theory was rigorous. SVMs had guarantees. Neural networks were seen as finicky, unreliable, theoretically murky black boxes that couldn't even be trained properly if you made them more than a couple of layers deep. But a small group of researchers refused to give up on the neural network idea. And the most prominent, the most stubborn, the most relentlessly optimistic of them was someone we've already met, Jeffrey Hinton. Through the entire wilderness [00:44:21] period, Hinton kept working on neural networks. He kept publishing, kept training students, kept insisting that the brain inspired approach was fundamentally right, that the problems were engineering problems, not conceptual deadends. And he wasn't alone. Yan Lun, a French computer scientist who had studied under one of the pioneers of neural network research in Paris, had moved to Bell Labs, the [00:44:51] same Bell Labs where Vapnik was working, which is a wonderful irony, and was doing remarkable things with a specific type of neural network called a convolutional neural network. Lun's convolutional networks were directly inspired by the visual cortex. In the late 1950s and early 1960s, two neuroscientists named David Hubel and Torsten Visel had done groundbreaking experiments on cats, inserting electrodes into the visual [00:45:22] cortex and showing the cats various visual stimuli. They discovered that neurons in the visual cortex are organized hierarchically. Some neurons respond to simple features, edges at a particular angle, for instance. Others respond to more complex combinations of those simple features. The visual system builds up its understanding of what it's seeing layer by layer from simple to complex. Hubel and Visel won the Nobel Prize for [00:45:53] this work in 1981. Lun took this biological insight and turned it into an engineering architecture. In a convolutional neural network, the first layer learns to detect simple features, edges, corners, color gradients. The next layer combines those simple features into slightly more complex patterns, maybe the curve of a letter or the texture of a surface. The next layer combines those into even more complex [00:46:24] representations and so on. Each layer applies small filters, little pattern detectors that slide across the input looking for their particular feature everywhere in the image. That sliding, that sharing of the same filter across different positions is the convolution and it's what makes these networks so efficient. Instead of having every neuron connected to every input pixel, which would require an [00:46:55] astronomical number of connections, you have a small set of learned filters that are reused across the entire image. By the late 1990s, Lacun had built a convolutional network called Lynette 5 that could read handwritten digits, zip codes on envelopes, numbers on checks with remarkable accuracy. A TNT actually deployed it. It was reading something like 10 to 20% of all the checks deposited in American banks [00:47:26] by the late 1990s. Millions of checks every day being read by a neural network. And most people had no idea. Here was this supposedly obsolete technology quietly doing real work in the real world while the academic mainstream was busy with SVMs and kernel methods. And then there was Yoshua Benjio, a Canadian computer scientist working in Montreal who was tackling the problem of applying neural networks to sequential data, language, [00:47:58] time series, anything where the order of the inputs matters. Benjio was deeply interested in the problem of learning representations of words, of finding ways to capture the meaning of language in vectors of numbers. He published a paper in 2003 on neural probabilistic language models that in retrospect planted seeds that wouldn't fully bloom for another 15 years. These three, Hinton, Lun, and Benjio, would [00:48:31] later become known as the godfathers of deep learning, and they'd share the touring award in 2018. But in the early 2000s, they were swimming against the current, working in a corner of the field that most of their colleagues considered a dead end. And the thing that would change everything, the thing that would vindicate their stubbornness and transform not just machine learning, but the entire technology landscape, was a convergence [00:49:01] of three factors that none of them could have fully anticipated. The first was an explosion in available data. The second was an unexpected revolution in computing hardware and the third was a series of clever algorithmic innovations that finally cracked the problem of training deep networks. That vanishing gradient problem that had been the fundamental barrier since the late 1980s. The story of how those three [00:49:33] threads came together and what happened when they did starts with a seemingly unrelated development in the world of video games. Specifically, the world of three-dimensional video games and the insatiable demand for rendering graphics faster and more beautifully on screen. Because in the late 1990s and early 2000s, a company called Nvidia was locked in a fierce competition with rivals like ATI and 3DFX [00:50:04] to build the fastest graphics processing units, GPS, for the gaming market. And the thing about rendering a frame of a video game is that you need to perform the same relatively simple mathematical operation. Multiply some numbers, add them together, do it again on millions of pixels simultaneously. You're not solving one hard problem. You're solving millions of easy problems all at the same time. So GPU designers [00:50:36] built chips that were fundamentally different from traditional CPUs. A CPU is like a brilliant professor who can solve any problem you throw at them, but they work through things one at a time. or maybe a few at a time. A GPU is more like a stadium full of high school math students. Each one only capable of basic arithmetic, but there are thousands of them. And they all work in parallel. For gaming, this architecture [00:51:07] was perfect. For machine learning, it would turn out to be revolutionary, but nobody planned it that way. That's what makes this part of the story so wonderfully accidental. The connection between GPUs and neural networks wasn't obvious at first, but think about what happens when you train a neural network. At every layer, you're taking a bunch of inputs, multiplying each one by a weight, adding them up, and passing the [00:51:37] result through an activation function. Then you do it again at the next layer. And you do this for every training example, potentially millions of times. It's the same basic operation, multiply and accumulate, repeated over and over across thousands or millions of artificial neurons. That's almost exactly the kind of workload GPUs were designed for. The math of neural networks and the math of [00:52:08] rendering polygons in a video game are at a deep level the same kind of math. Matrix multiplications. Massive parallel matrix multiplications. The person who really pushed this connection into the open was a researcher at Stanford named Andrew Ang along with his collaborators. Around 2009, Ang and his team demonstrated that you could train neural networks dramatically faster on GPUs than on traditional CPUs. [00:52:40] We're talking about speed ups of 10 times, 50 times, sometimes even a 100 times. What used to take weeks could now take days. What used to take days could take hours. And that changes everything. Because in research, speed isn't just convenience. Speed is the difference between trying one idea a month and trying 10 ideas a week. It's the difference between a dead field and a living one. But the GPU [00:53:11] story was only one thread. Let's talk about the data explosion because that was happening simultaneously and it mattered just as much. In the year 2000, the total amount of data stored in the world was estimated at roughly 6.2 2 xabytes. By 2007, it was around 295 exabytes. By 2010, it had crossed into the zetabyte range. A zetabyte being a [00:53:41] thousand xabytes or a trillion gigabytes. The internet was doing what the internet does. People were uploading photos, writing emails, clicking on links, buying things, leaving reviews, posting on social media. Every one of those actions generated data and companies were storing all of it. This was the age of Google indexing billions of web pages, of Facebook accumulating billions of tagged [00:54:12] photographs, of Amazon tracking every purchase and every browsing pattern. And here's why that matters for machine learning. Remember, these algorithms learn from examples. The more examples you give them, the better they get. But there's a catch, and it's a subtle one that goes back to that whole overfitting conversation. Simple models like SVMs or logistic regression can only benefit from more data up to a point. They have limited [00:54:44] capacity, limited expressiveness. Once they've extracted all the patterns their architecture allows, more data doesn't help much. But deep neural networks with millions or billions of parameters are incredibly expressive. They're hungry for data. They need enormous amounts of it to reach their potential. And without enough data, they overfit horribly. So for decades, deep networks were stuck in a kind of catch 22. They needed more data than existed [00:55:17] to show their superiority. and nobody was going to collect more data for a technology that didn't seem to work. The internet broke that catch 22. Suddenly, the data was just there. Now, the third thread, the algorithmic breakthroughs, and this is where Hinton comes back into the story in a big way. In 2006, Jeffrey Hinton working with Simon Oindereo and Yi T at the University of [00:55:47] Toronto published a paper that sent a jolt through the machine learning community. The paper was about something called deep belief networks. And the key insight was a clever training strategy. Instead of trying to train all the layers of a deep network at once, which is where the vanishing gradient problem would crush you, Hinton proposed training the network one layer at a time from the bottom up using an unsupervised [00:56:17] method. Each layer would learn to model the statistical structure of the layer below it, and you'd stack these pre-trained layers on top of each other, building the network up piece by piece. Only after this layerbylayer pre-training would you fine-tune the whole thing with back propagation. It was like building a house by carefully laying each floor's foundation before stacking the next floor on top rather than trying to build the whole structure [00:56:47] at once and hoping it didn't collapse. The results were striking. Deep networks trained this way performed significantly better than shallow ones. The paper was called a fast learning algorithm for deep belief nets and it's often cited as the moment the deep learning revival truly began. Hinton who had been working on these ideas for over 20 years by this point who had watched the field turn its back on neural networks who had kept the [00:57:18] faith through the long AI winter of the 1990s. Hinton finally had a result that made people pay attention again. And here's something lovely about the timing. Hinton was 60 years old when this paper came out. He'd spent essentially his entire career on an idea that most of his peers thought was wrong. Think about the stubbornness that requires. Think about sitting in faculty meetings, applying for grants, watching your students struggle to get jobs [00:57:48] because they'd worked on neural networks and hiring committees wanted people who did SVMs. And yet he kept going. There's a quote attributed to him, I'm paraphrasing, where he said something like, "Either I was incredibly wrong or everyone else was." And in 2006, the needle finally started moving in his direction. But the 2006 paper, as important as it was, wasn't the moment of full vindication. [00:58:19] That came a few years later and it came through competition, literal competition. In 2009, Hinton's group entered a speech recognition contest and showed that deep neural networks could outperform the traditional methods that had dominated the field for 30 years. These traditional methods were based on something called hidden Markoff models combined with Gaussian mixture models. A mouthful, I know, but the point is they [00:58:51] were the established technology, the industry standard, the thing that powered every speech recognition system from Siri ancestors to automated phone menus. And Hinton's neural networks beat them. Not by a tiny margin, by a lot. This got the attention of the big technology companies. Microsoft, Google, IBM, they all started paying very close attention. By 2012, [00:59:21] deep neural networks had essentially taken over speech recognition at every major tech company. The error rates dropped dramatically. If you've ever noticed that voice assistants got noticeably better around 2012 or 2013, this is why. It wasn't a gradual improvement. It was a step change, a sudden leap driven by deep learning replacing the old statistical models. But the real earthquake, the event that [00:59:52] most people in the field point to as the moment everything changed, happened in October 2012. And it happened because of cats. Well, not exactly because of cats, but stay with me. Every year since 2010, there had been a competition called the ImageNet Largecale Visual Recognition Challenge. ImageNet was a massive data set of over 14 million labeled images organized into [01:00:22] more than 20,000 categories: dogs, cars, mushrooms, bridges, everything you can imagine. The challenge was to build a system that could look at a photograph it had never seen before and correctly identify what was in it. In 2010 and 2011, the best systems were getting error rates around 25 or 26%. They used carefully handgineered features. Things like edge detectors and [01:00:54] color histograms fed into traditional classifiers like SVM's respectable results but far from human level performance. Then in 2012 a team from the University of Toronto entered. It was Alex Kvski, Ilia Sudskver and their supervisor Jeffrey Hinton. Their system was called AlexNet and it was a deep convolutional neural network. Remember Lacun's [01:01:24] convolutional networks from the 1990s? Same basic idea, but bigger, deeper, and trained on GPS. AlexNet had about 60 million parameters spread across eight layers. And Kgevski had implemented it to run on two Nvidia GTX 580 graphics cards, gaming GPS, the kind you'd buy to play firsterson shooters. They trained it on 1.2 million images from ImageNet. [01:01:55] AlexNet didn't just win the 2012 competition, it obliterated the competition. Its error rate was about 15% compared to over 25% for the second place entry. That gap, roughly 10 percentage points, was enormous. In a field where annual improvements were typically measured in fractions of a percent, AlexNet represented a leap that nobody had seen coming. And it was a neural network, a deep neural network [01:02:28] trained with back propagation running on gaming hardware fed with massive amounts of data. All three threads, the data, the hardware, the algorithms had come together in one system and the result was undeniable. The reaction in the machine learning community was something close to shock. Researchers who had spent their careers on handineered features and kernel methods suddenly had to reckon with the [01:02:58] fact that a neural network, the supposedly dead technology, had just demolished everything else. Within a year, almost every competitive entry in ImageNet was a deep neural network. Within 2 years, the old approaches had essentially disappeared from the leaderboard. It was one of the fastest paradigm shifts in the history of computer science. And here's what's really interesting about what Alex Net learned [01:03:28] because this connects back to something fundamental about how neural networks work. When researchers looked inside the network at what the different layers had learned to detect, they found something beautiful. The early layers closest to the input image had learned to detect simple features, edges, corners, color gradients. The middle layers combined those simple features into more complex patterns, textures, parts of objects, [01:04:01] curves, and the deeper layers had assembled those patterns into recognizable things, faces, wheels, fur, text. The network had spontaneously organized itself into a hierarchy of increasingly abstract representations. Nobody told it to look for edges first and objects later. It figured that out on its own through back propagation through the simple pressure of trying to [01:04:31] minimize its errors on millions of training examples. And if that hierarchy sounds familiar, it should. It's remarkably similar to what Hubble and Visel found in the visual cortex of cats back in the 1960s. The same research that inspired Lacun's convolutional networks in the first place. Simple cells detecting edges, complex cells combining edges into shapes, hyper complex cells responding to specific objects. The artificial system, given [01:05:04] enough data and enough depth, had converged on something that looked an awful lot like the biological solution. Whether that's a coincidence or a deep truth about the nature of visual processing is a question that people are still arguing about and it's a fascinating argument. Now, the success of Alex Net opened the floodgates. Suddenly, everyone wanted to build deeper networks. If eight layers could do this, what [01:05:34] could 20 layers do? What about 100? And this is where we run back into our old nemesis, the vanishing gradient problem. Because even with pre-training tricks and better activation functions, people had started using something called relu or rectified linear units, which helped a lot. Training very deep networks was still brutally difficult. the gradients would still fade or explode as you tried to push signals [01:06:06] through dozens or hundreds of layers. And the person who found arguably the most elegant solution to this problem was a young researcher at Microsoft Research in Beijing. And the solution was so simple that it almost seemed like cheating. His name was Kiming He. And in 2015, he and his colleagues published a paper that introduced what they called residual connections and the network they built with them. Resnet changed [01:06:38] everything. So, let me explain what a residual connection is because it's one of those ideas that makes you go, "Wait, that's it? That's the whole trick." And then you think about it for a minute and realize how profound it actually is. Imagine you have a deep network, dozens of layers stacked on top of each other, and each layer is supposed to learn some transformation of the data. Take the input, do something useful to it, pass [01:07:10] the result to the next layer. The problem, as we've talked about, is that when you try to train this thing with back propagation, the gradient signal, that little nudge telling each layer how to adjust, gets weaker and weaker as it travels backward through all those layers. By the time it reaches the early layers, it's basically a whisper. Those early layers can't learn. They're stuck. [01:07:41] And here's what kiming He figured out instead of asking each layer to learn the complete transformation from input to output, what if you just asked it to learn the difference, the residual? You take the input to a layer, you let the layer do its thing, and then you add the original input back to the output. That's it. You're creating a shortcut, a skip connection, a little highway that lets [01:08:12] the signal bypass the layer entirely if it needs to. Think about why this is so clever. If a layer doesn't need to do anything, if the best thing it could do is just pass the data through unchanged, then all it has to learn is zero. The residual is zero. The skip connection handles everything. That's a much much easier thing to learn than trying to learn the entire identity function from scratch. And more [01:08:42] importantly, those skip connections give the gradient a direct path backward through the network. The gradient doesn't have to squeeze through every single layer anymore. It can hop along the shortcuts, staying strong, reaching all the way back to the earliest layers. It's like building an express lane on a highway that's clogged with traffic. The information can still take the local roads if it wants to, but it also has the option of jumping ahead. And the [01:09:13] results were staggering. Resnet won the imageet competition in 2015 with a network that was 152 layers deep. 152 layers. Remember, Alexet had eight. And ResNet didn't just go deeper. It actually performed better as it got deeper, which was the opposite of what had been happening before. Before residual connections, researchers had found that adding more layers to a [01:09:44] network would actually make it worse after a certain point. Not because of overfitting, but because the optimization just fell apart. The network couldn't learn. ResNet broke through that barrier completely. The error rate on imageet dropped to about 3.6% which was actually better than the average human performance on that particular task. Let that sink in for a moment. [01:10:14] In the span of just 3 years, from AlexNet in 2012 to ResNet in 2015, image recognition went from being a problem where computers were laughably bad compared to humans to a problem where the computer was arguably better. That's an extraordinary pace of progress. And it happened because of a combination of things we've been tracking. More data, faster hardware, [01:10:44] and these crucial architectural innovations like residual connections. Now, here's something I want you to notice because it's a pattern that shows up again and again in the history of machine learning. The residual connection isn't a complicated idea. It's not some deep mathematical insight that required years of theoretical work. It's an engineering trick, an architectural choice, a small change in [01:11:14] how you wire the network together. And yet, it unlocked capabilities that nobody could achieve without it. This is a recurring theme. The breakthroughs in deep learning have often been surprisingly simple ideas that just happen to make optimization work better. Realu activation functions, dropout for regularization, batch normalization, skip connections. Each one is easy to explain in a few [01:11:44] sentences, but each one was transformative. And I think that's part of what makes this field so interesting and also so humbling. The hard part isn't coming up with complicated math. The hard part is finding the right simple idea. So by the mid 2000s, the deep learning revolution was in full swing for computer vision. But there was another domain where something equally dramatic was about to [01:12:14] happen. And it's the domain that would ultimately lead to the AI systems that most people are thinking about today when they hear the words artificial intelligence. I'm talking about language, understanding language, generating language, translating between languages, answering questions, writing text, and the story of how deep learning conquered language is in some ways even more [01:12:44] fascinating than the vision story because language is so different from images. An image is a grid of pixels. It has a fixed size, a clear spatial structure. Language is sequential, variable length, full of long range dependencies where a word at the beginning of a sentence can completely change the meaning of a word at the end. It's ambiguous in ways that images rarely are. The traditional [01:13:14] approach to handling sequences in neural networks was something called a recurrent neural network or RNN. The idea goes back to the 1980s and it's pretty intuitive. Instead of processing all the input at once, you process it one element at a time, one word at a time, say, and at each step, the network maintains a hidden state, a kind of memory that carries information forward from the [01:13:45] previous steps. So when the network reads the word bank, it can in theory use its memory of the earlier words in the sentence to figure out whether you're talking about a river bank or a financial bank. In theory, in practice, RNNs had a terrible time with long range dependencies. If the relevant context was 20 or 30 words back, the network would usually forget it. The information would decay [01:14:17] as it passed through all those sequential steps, which is really just the vanishing gradient problem showing up again in a different guise. There were improvements. In 1997, Sepriter and Jurgen Schmeid Huber published a paper introducing long short-term memory networks, LSTMs. These were a more sophisticated type of recurrent network with explicit gating mechanisms, little learned switches that [01:14:48] controlled what information to keep, what to forget, and what to output at each step. Think of it like giving the network a notebook where it can deliberately write things down and erase them instead of just hoping it remembers. LSTMs were a huge improvement over vanilla RNNs. and they dominated sequence modeling for nearly two decades. They powered the first really good machine translation systems, speech recognition, [01:15:19] text generation. Google used LSTMs in its translation service. Apple used them in Siri. They were the workhorse of natural language processing in the deep learning era. But LSTMs had a fundamental limitation that became more and more painful as people tried to scale them up. Because they processed sequences one step at a time, they were inherently sequential. You couldn't parallelize them the way you [01:15:50] could parallelize a convolutional network processing an image. Each step had to wait for the previous step to finish because it needed that hidden state. on those powerful GPUs that were making everything else faster. LSTMs couldn't fully take advantage of the parallel processing power. Training them on very large data sets was slow. And there was still the question of whether that sequential memory even with the [01:16:20] fancy gating mechanisms was really the best way to handle long range dependencies. The answer came in 2017 from a team of eight researchers at Google in a paper with one of the most consequential titles in the history of computer science. Attention is all you need. And the architecture they introduced, the transformer is the foundation of essentially every major language AI system you've heard of since then. GPT, [01:16:53] BERT, Palm, Claude, El Lama, they're all transformers. Every single one. So, what is attention and why did it change everything? Let me try to build the intuition slowly because this is worth understanding. The core idea of attention had actually been floating around for a couple of years before the transformer paper. It had been used as an add-on to RNN's particularly for machine translation. [01:17:23] The insight was this. When you're translating a sentence from, say, French to English, and you're generating the next English word, not every word in the French sentence is equally relevant. Some words matter a lot for this particular output word, and others are basically irrelevant. Attention is a mechanism that lets the network learn to focus on the relevant parts of the input. It assigns a weight and attention score to each input element. And those [01:17:55] weights are learned. They're dynamic. They change depending on what the network is currently trying to do. Here's an analogy that might help. Imagine you're at a crowded party and there are dozens of conversations happening simultaneously. You can hear all of them as a kind of background murmur. But when someone across the room says your name, your attention snaps to that conversation. You selectively amplify that signal and [01:18:25] suppress everything else. That's roughly what attention does in a neural network. It lets the model dynamically decide for each piece of output it's generating which pieces of input to focus on. What Vaswani and his co-authors did in the transformer paper was take this attention mechanism and make it the entire architecture. They threw away the recurrence entirely. No more processing one word at a time. [01:18:55] No more sequential hidden states. Instead, the transformer looks at the entire input sequence all at once. And it uses attention to figure out how every element in the sequence relates to every other element. Every word can directly attend to every other word regardless of distance. That word at the beginning of the sentence and the word at the end, they can interact directly in a single step without the information having to be [01:19:25] passed through a chain of intermediate states. And because there's no sequential processing, the whole thing can be parallelized. You can throw it on a GPU and process every position in the sequence simultaneously. Training became dramatically faster and the model could handle long range dependencies effortlessly because there was no chain of steps for the information to decay through. Every connection was direct. The [01:19:56] specific mechanism they used is called scaled.product attention and it works through three learned transformations of the input which they called queries, keys and values. Think of it like a library system. Each word generates a query. What am I looking for? And also a key. What do I contain? And a value. What information should I pass along if someone is looking for me? The attention score [01:20:28] between any two words is computed by comparing the query of one with the key of the other. If they match well, the attention score is high and the value of the attended word gets a strong weight in the output. It's elegant, it's differentiable, so you can train it with back propagation and it scales beautifully. They also introduced something called multi-head attention where the model runs several attention mechanisms in parallel. Each one learning to focus on [01:20:59] different types of relationships. One head might learn to track syntactic relationships, subject and verb agreement. Another might learn semantic relationships, which words are about the same topic. Another might learn positional relationships. The model figures out what kinds of attention patterns are useful entirely on its own through training. And here's what's really remarkable about the transformer. When you stack these [01:21:29] attention layers deep, and the original paper used six layers, but modern models used dozens or even over a hundred, the network builds up increasingly abstract representations of language in a way that's eerily reminiscent of what we saw with convolutional networks and images. The early layers capture local patterns, things like phrase structure and word associations. The deeper layers capture increasingly global abstract relationships, things [01:22:01] like narrative coherence, logical implications, factual associations. The hierarchy emerges from training just like the edge detectors and face detectors emerged in Alex Net. The 2017 transformer paper was focused on machine translation and it achieved state-of-the-art results. But the real explosion came when people started asking a different question. What if instead of training a transformer on a specific task like translation, you just [01:22:33] trained it to predict the next word in a massive amount of text, just raw text from the internet, from books, from everywhere. No labels, no human annotation, no specific task. Just given all the words so far, what comes next? This idea, language modeling as pre-training, had roots going back to Benjio's 2003 work and beyond. But the transformer made it practical at a scale that nobody had tried before. And the [01:23:05] results were going to change everything. So let's talk about what happened when people actually did this because the idea sounds almost too simple, right? Just predict the next word. That's the training signal. That's all the model is trying to do. Given a sequence of words, guess what comes next? Get it wrong, adjust the weights, try again. Billions of times across billions of words. And [01:23:35] the question that nobody could fully answer in advance was, what does a model actually learn when you train it this way at enormous scale? Does it just memorize common phrases? Does it learn grammar? Does it learn something deeper? The first major answer came from a group at OpenAI in 2018 with a model they called GPT, generative pre-trained transformer. And the name itself tells you the whole philosophy. [01:24:06] Generative meaning it produces text. Pre-trained meaning you train it first on a huge amount of raw text before you ever show it a specific task. and transformer because that's the architecture underneath. The idea was straightforward. Take a big transformer, train it on a massive corpus of text, in this case a data set of books, using nothing but next word prediction. No labeled data, no human [01:24:36] annotations saying this sentence is positive or this paragraph is about science. just raw text and the simple objective of predicting what word comes next. And then once you've done that pre-training, you take the model and fine-tune it on specific tasks. Sentiment analysis, question answering, textual entailment, whatever you need. And here's what was surprising. This pre-trained model, even though it had [01:25:07] never been explicitly taught any of these tasks, turned out to be remarkably good at all of them after just a small amount of fine-tuning. It was as if the process of learning to predict the next word had forced the model to develop a deep general understanding of language, grammar, semantics, world knowledge, reasoning patterns, all as a byproduct of that one simple objective. Think about what that means for a second. Nobody sat down and programmed [01:25:40] rules about English grammar into this model. Nobody gave it a knowledge base of facts about the world. Nobody taught it logic. It learned all of these things or at least useful approximations of them just from reading text and trying to guess what comes next. And if you think about it, there's a certain elegance to that because predicting the next word in a sentence is actually an incredibly demanding task if you want to do it well. To predict that the next [01:26:12] word in the capital of France is should be Paris, you need to have absorbed a fact about geography. To predict the next word in a complex logical argument, you need something that functions like reasoning. The training objective is simple, but satisfying it at a high level requires the model to develop sophisticated internal representations. Now, around the same time, actually just a few months later, in late 2018, [01:26:45] a team at Google released a model called BERT, which stands for birectional encoder representations from transformers. And Bert took a slightly different approach that's worth understanding. Where GPT reads text left to right, predicting the next word, BERT was trained to look at text from both directions simultaneously. Its training task was different, too. Instead of predicting the next word, Bert used something called masked [01:27:16] language modeling. You take a sentence, randomly hide some of the words, mask them, and ask the model to predict what the missing word should be using all the surrounding context from both sides. So if you have the cat sat on the mask, the model can use both the cat sat on the and whatever comes after to figure out the masked word is probably mat or rug or floor. This birectional approach gave [01:27:47] Bird a different kind of understanding. It was particularly good at tasks where you need to deeply comprehend a piece of text, answering questions about a passage, determining whether two sentences are related, classifying the sentiment of a review. When BERT was released, it set new records on 11 different natural language processing benchmarks simultaneously. 11. That's not a model that's good at one thing. That's a model that has learned [01:28:18] something genuinely general about how language works. And here's where the story gets really interesting. Because what happened next was essentially an arms race of scale. Researchers at OpenAI, Google, and other labs started asking, "What happens if we just make these models bigger? More parameters, more training data, more compute. GPT had about 117 million parameters. That sounds like a lot, but GPT2 [01:28:51] released in early 2019 had 1 and a half billion parameters. It was trained on a much larger data set, about 40 GB of text scraped from the internet, filtered for quality by only including pages that had been linked from Reddit with at least three upvotes, which was a clever way of using human curation at scale without actually paying anyone to curate. And GPT2 could do something that genuinely startled people. It could [01:29:21] generate coherent, fluent text that was paragraphs long. You could give it a prompt, a few sentences about any topic, and it would continue writing in a way that was often remarkably convincing. Open AI actually made the unusual decision to initially withhold the full model, citing concerns about potential misuse for generating fake news or spam. That decision was controversial and they eventually released it. But the fact [01:29:53] that they even considered withholding it tells you something about how capable the model felt to the people who built it. But here's the thing that was really wild. As these models got bigger, they didn't just get incrementally better at the same things. They started exhibiting capabilities that nobody had explicitly trained them for. GPT2 could do rudimentary translation even though it was never trained on a [01:30:23] translation task. It could do basic arithmetic. It could answer trivia questions. These abilities seemed to emerge from the sheer scale of the training from having processed so much text that the model had absorbed patterns and knowledge that went far beyond simple next word prediction. Researchers started calling these emergent capabilities and they were both exciting and a little unsettling because they meant that you couldn't always [01:30:53] predict what a model would be able to do just by looking at its training objective. Then came GPT3 in 2020 and the scale jumped again dramatically. 75 billion parameters trained on a data set that included large portions of the internet, books, and Wikipedia. And GPT3 introduced something that really shifted how people thought about these models. It turned out that GPT3 [01:31:25] could perform many tasks without any fine-tuning at all. You didn't need to retrain it on labeled examples of sentiment analysis to get it to do sentiment analysis. You could just describe the task in plain English as part of the prompt. You could write something like, classify the following movie review as positive or negative review. This film was a masterpiece of storytelling sentiment and the model would output [01:31:56] positive. This was called fshot learning or even zeroshot learning and it was a fundamentally different paradigm from anything that had come before. Think about what's happening here. Instead of training a separate model for every task, one model for translation, one for summarization, one for question answering, you have a single model that can be steered to perform different tasks just by changing the instructions you give it in natural language. [01:32:28] The interface to the model is language itself. And that's a profound shift because it means that the ability to use these models is no longer limited to machine learning engineers who know how to train neural networks. Anyone who can describe what they want in words can in principle get the model to attempt it. Now, let's slow down for a moment and think about what's actually going on inside these large language models [01:33:00] because it's genuinely one of the most fascinating and least understood questions in modern computer science. When a model like GPT3 processes your prompt and generates a response, what is it doing? At the mechanical level, we know exactly what it's doing. It's running the transformer computation, attention layers, matrix multiplications, soft max functions, all of that. We can [01:33:30] trace every number through every layer. But understanding what those computations mean, what representations the model has built internally, what it knows, and how it knows it, that's much harder. There's a whole field now called mechanistic interpretability. that's trying to answer these questions, trying to reverse engineer the internal representations of large language models the way a neuroscientist might try to understand the brain. And some of the [01:34:01] findings are remarkable. Researchers have found individual neurons and circuits inside these models that correspond to specific concepts. Neurons that activate when the model is processing text about a particular topic. circuits that implement something that looks like logical reasoning. Internal representations that seem to encode factual relationships in a structured way. But we're still in the early days of understanding this. The models work far [01:34:32] better than our theories predict they should. And nobody has a complete explanation for why scaling up. Just making the model bigger and giving it more data produces such dramatic improvements in capability. This gap between what we can build and what we can explain is actually a recurring theme in engineering. If you think about it, for centuries, people built bridges and cathedrals that worked using rules of thumb and intuition long before they had [01:35:03] a formal theory of structural mechanics. The practice ran ahead of the theory. And something similar is happening with large language models right now. We can build them. We can see that they work. We can measure their capabilities. But the deep theoretical understanding of why they work as well as they do is still catching up. And this brings us to something that started happening around 2020 and 2021 [01:35:33] that really expanded the scope of what machine learning could do because researchers started asking if this approach works so well for language pre-training a big model on a huge amount of data with a simple objective. Could the same philosophy work for other kinds of data? Could you build a single model that understands not just text but images, audio, video, code, and maybe all of them at once? The answer, it turned out, [01:36:04] was yes. And the way people got there involved some genuinely clever ideas about how to bridge the gap between different types of information. One of the most important of these ideas came from connecting language and vision. And it started with a model that had a deceptively simple name, clip. It stood for contrastive language image pre-training. And it came from OpenAI in January 2021. And the core idea behind Clip was so [01:36:34] elegant that once you hear it, you kind of wonder why nobody tried it sooner. Here's what they did. They gathered an enormous data set, about 400 million pairs of images and text descriptions scraped from the internet. Think about what that means. Every time someone posts a photo online with a caption or writes an alt text description for an image or creates a product listing with a picture and a title, that's a pair, an [01:37:04] image and a sentence that describes it. The internet is absolutely overflowing with these pairs. and OpenAI collected hundreds of millions of them. Now, the training objective was beautifully straightforward. You take a batch of image text pairs. You run each image through a vision model, a neural network designed to process images, and you get a compact numerical representation, an embedding for each image. Simultaneously, you run each text [01:37:34] description through a language model and get an embedding for each piece of text. And then you train the system so that the embedding of an image and the embedding of its matching text description end up close together in this shared mathematical space while the embeddings of non-matching pairs get pushed apart. That's it. That's the whole idea. You're teaching the model to align visual understanding and linguistic understanding into a single shared space [01:38:06] where images and words can be directly compared. Think about what that means for a second. Once you've trained this model, you can do something remarkable. You can take any image, an image the model has never seen before, and compare its embedding to the embeddings of arbitrary text descriptions. You want to classify an image, you don't need a predefined set of categories that the model was trained on. You just write whatever categories you want in plain English. a photo of a dog, a photo of a [01:38:38] cat, a photo of a sunset over the ocean, and the model tells you which description best matches the image. This is zeroshot image classification. No fine-tuning, no task specific training data, no labeled examples. You just describe what you're looking for in words and the model finds it. And Clip was shockingly good at this. on many standard image classification benchmarks. It matched or came close to [01:39:08] models that had been specifically trained on those exact data sets with millions of labeled examples. A model that had never seen a single labeled example from ImageNet could compete with models that had been trained on ImageNet's 1.2 million carefully labeled images. That was a genuinely startling result. But here's what's really wild about clip. It wasn't just about classification because the model had learned a general [01:39:39] alignment between visual concepts and language. It was incredibly robust. Traditional image classifiers are brittle in ways that are sometimes embarrassing. You train a model to recognize cars and it works beautifully on the kind of photos it was trained on. clean, well-lit, standard angles. But show it a sketch of a car or a toy car or a car in a painting, and performance often falls [01:40:09] off a cliff. Clip didn't have this problem nearly as much because it hadn't learned car as a specific pattern of pixels. It had learned a deep, flexible association between the visual concept of a car and the linguistic concept of a car across hundreds of millions of diverse examples from the messy varied internet. Sketches, photos, paintings, cartoons. It had seen them all paired with text. [01:40:40] This idea of connecting modalities, linking different types of information in a shared representational space, turned out to be one of the most powerful ideas in modern machine learning. And it opened the door to something that had been a dream for decades, generating images from text descriptions. Because if you have a model that understands the relationship between language and vision, you can start to imagine running the process in reverse. Instead of going from image to text, you [01:41:12] go from text to image. And that's exactly what happened in a series of breakthroughs that came remarkably fast. In January 2021, the same month Clip was announced. OpenAI also introduced Dal E, named as a playful mashup of the artist Salvador Dali and the Pixar robot Wall-E. DL could generate images from text prompts. You could type an armchair shaped like an avocado and it would [01:41:42] create an image of exactly that, not retrieve an existing image, create a new one that had never existed before. The early results were impressive, but rough around the edges. The images were often blurry or distorted, clearly artificial. But then in April 2022, Doll E2 arrived and the quality leap was dramatic. The images were sharp, detailed, creative, sometimes genuinely [01:42:14] beautiful. And Doll E2 used Clip's learned understanding of the relationship between language and vision as part of its architecture. It was building on that shared representational space. Now the actual mechanism behind these image generation models is worth understanding at least at a high level because it involves a technique called diffusion that is just a gorgeous piece of engineering. The core idea comes from physics actually from the study of how [01:42:46] particles diffuse through a medium. Here's the intuition. Imagine you have a clear photograph. Now imagine you gradually add random noise to it. A little static, then more, then more until eventually the image is completely destroyed and all you have left is pure random noise like the static on an old television. That's the forward process. Going from a clear image to pure noise step by step. Now here's the clever [01:43:18] part. What if you could train a neural network to reverse that process? To take a slightly noisy image and predict what it would look like with a little less noise. If you can do that, if you can learn to den noiseise one small step at a time, then you can start with pure random noise and gradually step by step denoise it into a coherent image. Each step, the model looks at the current noisy mess and nudges it [01:43:48] slightly toward something more structured, more meaningful. After hundreds or thousands of tiny steps, a recognizable image emerges from the static. It's almost meditative when you think about it. Order emerging from chaos, one gentle step at a time. And the text conditioning, the part where you tell the model what to generate, works by guiding the denoising process. At each step, the model doesn't just den [01:44:18] noiseise randomly. It denoises in a direction that's consistent with the text prompt using that shared language vision understanding that clip and similar models had established. So if your prompt says a lighthouse on a cliff at sunset, each denoising step nudges the noise toward an image that matches that description. This diffusion approach which was refined by researchers at several institutions. Jasha Soul Dickstein at Google Brain had [01:44:49] introduced the core mathematical framework back in 2015 and then Jonathan Hoe AJ Jane and Peter Ail at Berkeley published a landmark paper in 2020 showing that diffusion models could generate images rivaling the best previous approaches. This framework became the backbone of nearly every major image generation system. Stability AI's stable diffusion released in August 2022 as an open-source model [01:45:19] put this technology in the hands of millions of people essentially overnight. Midjourney built a hugely popular service around similar ideas. Google developed Imagin. The field exploded and suddenly in the span of about 18 months, the world went from AI can classify images pretty well to AI can create photorealistic images of virtually anything you can describe in words. The speed of this transition caught almost everyone offguard, [01:45:51] including many researchers in the field. But images were just the beginning. The same multimodal philosophy, pre-train on massive data, learn to connect different types of information, was being applied everywhere. Open AI's Whisper, released in September 2022, was a speech recognition model trained on 680,000 hours of multilingual audio from the internet. It could transcribe speech in [01:46:21] dozens of languages with accuracy approaching human level. The approach was the same pattern we keep seeing. Huge data set, simple training objective, massive model, remarkable emergent capability. And then came the models that could handle multiple modalities simultaneously. GPT4, released in March 2023, could accept both text and images as input. You could show it a photograph of the [01:46:52] inside of your refrigerator and ask it to suggest a recipe. You could give it a handdrawn sketch of a website layout and it could generate the code to build it. You could show it a graph from a scientific paper and ask it to explain the trends. The boundaries between language understanding and visual understanding were dissolving. This convergence, this merging of previously separate capabilities into unified systems is one of the most [01:47:22] significant trends in modern machine learning. And it echoes something that happens repeatedly in the history of technology. Think about the smartphone. Before the iPhone launched in 2007, you had separate devices for making calls, taking photos, browsing the internet, playing music, getting directions. The smartphone didn't necessarily do any of those things better than the dedicated devices, at least not at [01:47:52] first. But by combining them into one integrated system, it created something qualitatively different, something that changed how people lived their daily lives in ways nobody fully anticipated. Something similar seems to be happening with these multimodal AI systems. When a model can read, write, see, listen, and generate images all within a single conversation, the range of tasks it can help with expands enormously. [01:48:24] And the interactions between these capabilities create possibilities that none of them would offer alone. But this rapid expansion of capability also brought with it a growing set of concerns that the field had been grappling with for years. But that suddenly felt much more urgent. Because when these models were academic curiosities that could classify flowers or play Atari games, the stakes were relatively low. But when they could generate convincing text, create [01:48:55] realistic images of people who don't exist, write functional code, and carry on nuanced conversations when hundreds of millions of people were using them daily. The questions about safety, bias, misuse, and societal impact became impossible to ignore. And these aren't abstract philosophical concerns. They're engineering problems in a very real sense. Think about bias. [01:49:26] A language model trained on text from the internet will inevitably absorb the biases present in that text. Stereotypes about race, gender, profession, nationality. Not because anyone programmed those biases in deliberately, but because the training data reflects the world as it is, including its prejudices. And when these models are used to screen job applications or assist in medical diagnosis or help judges assess risk in [01:49:56] criminal sentencing, all things that have been proposed or implemented, those absorbed biases can cause real harm to real people. The challenge of making these systems fair, safe, and aligned with human values is arguably the most important engineering problem of our time. And it's a problem that doesn't have a clean technical solution because it's not purely technical. It involves [01:50:26] questions about what we value, whose perspectives matter, what kind of future we want to build. The engineers working on alignment, on making sure these systems do what we actually want them to do, not just what we literally asked for, are wrestling with some of the deepest questions at the intersection of technology and human values. And that intersection is exactly where things get genuinely hard because for most of [01:50:56] engineering history, the problems were constrained. You build a bridge and the success criteria are clear. It needs to hold this much weight, span this distance, resist these wind loads. You can test it, measure it, certify it. But how do you test whether an AI system is fair? Fair to whom? By whose definition? These are questions that engineers have never really had to answer before. and the tools of traditional engineering, stress [01:51:28] tests, safety margins, redundancy, don't map neatly onto a system whose behavior emerges from patterns in data that no human fully understands. Let's sit with that for a moment because it's worth appreciating just how different this challenge is from anything that came before. When we talked earlier about the gap between theory and practice in deep learning, how these networks work remarkably well, but we can't always explain why. That gap takes on a completely different character when the [01:51:59] stakes involve people's lives and livelihoods. It's one thing to say, well, we don't fully understand why this image classifier is so accurate, but it gets the right answer 97% of the time, so let's use it. It's another thing entirely to say we don't fully understand why the system recommended denying someone parole or why it flagged this patient as low risk when they actually needed immediate care. And here's the thing that makes [01:52:30] alignment so tricky as an engineering problem. It's not just about preventing obvious failures. It's about the subtle ones, the ones that look like successes on the surface but are quietly optimizing for the wrong thing. There's a concept in AI safety called Goodart's law which is borrowed from economics and it says that when a measure becomes a target, it ceases to be a good measure. Think about what that means for machine learning. You train a [01:53:01] system to optimize some metric, say user engagement on a social media platform. The system gets incredibly good at maximizing that metric. But engagement, it turns out, is most easily maximized by showing people content that makes them angry or afraid because those emotions are sticky. They keep you scrolling. So, the system is doing exactly what you asked it to do. It's a technical success. and it's simultaneously making millions [01:53:32] of people miserable and polarizing entire societies. The system isn't broken. The objective was broken. And specifying the right objective, one that captures what you actually want, including all the nuances and edge cases and things you forgot to mention because they seemed obvious, turns out to be extraordinarily difficult. This is sometimes called the alignment problem. and researchers like Stuart Russell at UC Berkeley have argued that [01:54:02] it's the central challenge of building increasingly capable AI systems. Russell's framing, which he laid out in his 2019 book, Human Compatible, is elegant. He says the problem isn't that we'll build machines that are malicious. It's that we'll build machines that are competent, but pursuing objectives that don't quite match what we intended. And the more competent the machine, the more damage that slight misalignment can [01:54:32] cause. It's like imagine you have a very very efficient assistant and you tell them to make sure you're never late for meetings. And they're so effective at this that they start cancelling all your other commitments, rearranging your relationships, and eventually you realize your life has been completely reorganized around a single goal that you mentioned casually. You got what you asked for. You just didn't ask for the right thing. Now [01:55:03] people are working on this seriously, rigorously with real engineering discipline. One approach that's gotten a lot of attention is reinforcement learning from human feedback or RLHF, which was a key part of how chat GPT was trained. The basic idea is that after you pre-train a large language model on text from the internet, you then fine-tune it using feedback from human raiders. You show the models outputs to [01:55:35] people. They rank which responses are more helpful, more accurate, less harmful, and you use those rankings to train a reward model, which then guides the language model toward producing outputs that humans actually prefer. It's a clever approach and it works surprisingly well in practice. Open AAI published their work on this with a system called Instruct GPT in [clears throat] early 2022 and it showed that a relatively small model fine-tuned [01:56:05] with RHF could be preferred by human raiders over a much larger model that hadn't been fine-tuned this way. But R LHF has its own limitations and the researchers working on it are the first to say so. The human raiders bring their own biases. The reward model is an approximation of human preferences, not the real thing. And the language model can learn to exploit quirks in the reward model, [01:56:36] producing responses that score well according to the proxy but aren't actually better. This is sometimes called reward hacking and it's basically goodart's law showing up again one level deeper. You tried to solve the alignment problem by adding human feedback and now you have a new alignment problem between the model and the reward model. It's turtles all the way down in a sense. And yet progress is [01:57:06] real. The systems we have today are meaningfully safer and more useful than they would have been without this work. Anthropic, the AI safety company founded by former open AI researchers Daario and Daniela Amode, has developed techniques they call constitutional AI, where the model is trained to evaluate its own outputs against a set of principles, a kind of written constitution, and revise [01:57:36] them. Deep Mind has invested heavily in scalable oversight, trying to figure out how humans can effectively supervise AI systems that may eventually be more capable than any individual human in certain domains. These aren't solved problems. They're active research frontiers, and the people working on them would be the first to tell you that we're nowhere near done. But let me pull back from the technical details for a moment because I think there's something worth reflecting [01:58:06] on as we come toward the end of this whole story. We've traveled a long way tonight. We started with ancient dreams of thinking machines, the mechanical Turk, Adah Love Lace's notes on Babage's analytical engine, the quiet brilliance of Alan Touring sitting in his office at Bletchley Park asking whether machines can think. We watched a small group of optimistic researchers gather at Dartmouth in the summer of 1956. [01:58:36] Convinced they could crack intelligence in a single summer, we saw Frank Rosenblat's perceptron light up the front page of the New York Times. And then we watched Minsky and Paper's critique send the whole field into winter. We followed the long patient work of people like Jeffrey Hinton, Yan Lun, and Yoshua Benjio who kept believing in neural networks when almost nobody else did. Through the 80s, through the '90s, through years of [01:59:06] rejected papers and skeptical reviewers, we saw the accidental convergence of GPUs and big data that made deep learning suddenly explosively practical. We watched AlexNet shock the computer vision community in 2012 and then ResNet push past human level accuracy just 3 years later. We followed the transformer architecture from a single paper in 2017 to the foundation of systems that hundreds of [01:59:37] millions of people now use every day. And here's what strikes me about that whole arc. At every stage, the breakthroughs came from people who were willing to be wrong for a long time. Hinton spent decades on an idea that most of his colleagues thought was a dead end. Hulk writer and Schmid Huber published LSTMs in 1997, and it took almost 15 years before the hardware and data existed to show what those architectures could really do. The [02:00:09] researchers who developed the transformer weren't trying to build a chatbot. They were trying to make machine translation more parallelizable. Almost none of the major advances in this field were planned the way you'd plan a bridge or a highway. They emerged from curiosity, from stubbornness, from people following threads that seemed interesting even when they couldn't justify the practical value. And that's something worth holding on [02:00:39] to, I think, because the conversation around AI right now is dominated by two extremes. On one side, you have breathless hype, claims that artificial general intelligence is just around the corner, that these systems will solve all of humanity's problems, that we're on the verge of a technological singularity. On the other side, you have existential dread. Fears that AI will take all our jobs, that it will be used as a tool of [02:01:11] surveillance and control, that we're building something we can't contain. And both of those narratives contain grains of truth, but neither captures the full picture. The full picture is messier and honestly more interesting. These systems are genuinely remarkable. A large language model can write poetry, debug code, explain quantum mechanics, and translate between dozens of languages. But it can also confidently [02:01:43] state things that are completely false. It doesn't know what it knows. It has no persistent memory, no goals, no understanding in the way you and I understand things. It's a pattern matching engine of extraordinary sophistication trained on more text than any human could read in a thousand lifetimes. And it produces outputs that are often indistinguishable from human writing. But the mechanism behind those outputs [02:02:13] is fundamentally different from human cognition. Whether that difference matters, whether it means these systems can never truly think or whether it's just a different path to the same destination is one of the great open questions of our time. And honestly, we don't have the answer yet. What we do know is that the engineering challenges ahead are immense and fascinating. How do you make these systems reliable [02:02:44] enough to trust with critical decisions? How do you make them transparent enough that when something goes wrong, you can figure out why? How do you ensure that the benefits of this technology are distributed broadly rather than concentrated in the hands of a few companies or countries? How do you preserve human agency and creativity in a world where machines can generate text, images, music, and code at scale? These are engineering [02:03:16] problems, yes, but they're also social problems, political problems, philosophical problems, and they're going to require the best thinking from all of those domains, not just computer science. You know, there's a beautiful thing that happens in the history of engineering, and we've seen it over and over tonight. Someone builds something that works, but isn't quite right. Someone else figures out why. [02:03:46] A third person finds a clever fix. A fourth person scales it up. A fifth person discovers a completely unexpected application. And slowly through all of that collective effort, through the arguments and the failures and the late nights and the lucky breaks, something genuinely new emerges, something that no single person could have built alone. That's how we got from McCullik and Pitts's simple mathematical neuron in [02:04:17] 1943 to systems that can carry on conversations and generate photorealistic images 80 years later. Not through one genius breakthrough, but through thousands of small ones layered on top of each other. Each one building on what came before. And that process isn't over. It's barely begun. Really, the people working on machine learning today, the researchers, the engineers, the ethicists, the policy makers are [02:04:49] writing the next chapter of a story that's been unfolding for decades. And if history is any guide, the most important developments are ones we can't predict yet. The transformer wasn't predicted. The effectiveness of scaling wasn't predicted. The emergent capabilities that appear in large models weren't predicted. The next breakthrough might come from a graduate student working on something that seems completely unrelated or from [02:05:19] an insight that connects two fields that nobody thought to connect before. So, as you lie there, maybe drifting in and out, maybe catching every word or maybe just letting the sound wash over you, here's what I'd leave you with. Machine learning at its heart is about finding patterns. It's about taking the messy, complicated, beautiful chaos of the world, all the images and words and [02:05:49] sounds and data and finding the structure hidden inside it. And in a way, that's what we do, too, every day without thinking about it. Your brain is the original pattern matching engine, the one that all of these artificial systems are loosely, imperfectly inspired by. Every time you recognize a face, understand a sentence, catch a ball, or feel that something is slightly [02:06:19] off without being able to say why. You're doing something that the most powerful computers in the world are only beginning to approximate. And tonight, as your thoughts slow down and the edges of the day soften, your brain is still doing that work, sorting through the patterns of the day, filing things away, making connections you won't notice until tomorrow or next week or next year. [02:06:50] It's quiet work, and it happens without effort. The way breathing happens, the way your heart beats. The most sophisticated learning system ever built. Running right there behind your closed eyes, doing what it does best. Just let it do its thing. You've thought enough for one day. The patterns will still be there in the