Note Wisdom
Listener-style notes from Stanford CS221's first lecture: what AI is (perceive, reason, act, learn under compute and information limits), why the course went tensor-native this year, a three-threaded history of the field, and a numpy-to-einops tutorial — plus where the arguments feel thin.
Institution: Stanford
Original Course: Stanford CS221 | Autumn 2025 | Lecture 1: Course Overview and AI Foundations
Instructor Bio: This lecture is delivered by Percy Liang, Associate Professor of Computer Science at Stanford University and core faculty of the Stanford Institute for Human-Centered Artificial Intelligence (HAI). Percy Liang leads the Stanford Natural Language Processing Group and the Center for Research on Foundation Models (CRFM). His research spans the theoretical foundations and practical systems of artificial intelligence, including machine learning, natural language processing, AI alignment, and rigorous model evaluation. He received his PhD in Computer Science from the University of California, Berkeley and his BA in Mathematics from Harvard University. His work has been recognized with the NSF CAREER Award, Google Faculty Research Award, and multiple best paper awards at top-tier AI conferences. He has taught CS 221 at Stanford for over a decade, shaping foundational AI education for thousands of students.
Course Description: As the inaugural session of CS 221: Artificial Intelligence: Principles and Techniques, this lecture lays out the course structure, learning objectives, logistics, and grading policies. It establishes the unifying framework of AI as the study of intelligent agents that perceive, reason, and act in the world. The lecture surveys the major subfields of AI — including machine learning, search, planning, and reasoning — and explains how they fit together into a cohesive discipline. It also introduces core definitions, historical context, and the foundational principles that underpin modern AI systems.
These are my own notes from watching the first session, cleaned up and reorganized — not a transcript, and definitely not an official record. If you missed it, the hour moves in three big blocks that don't obviously belong together: a definition of the field, twenty minutes of history told as three parallel storylines, and then a hands-on numpy tutorial that runs all the way to the end. The instructor's implicit bet is that you can't judge where the field is going without knowing which of its old arguments never actually got settled, and that AI foundations are best learned by writing code rather than reading equations.
He opens by admitting he barely has to motivate the subject anymore. Fourteen years ago he did; now the audience uses assistants daily, some have ridden in self-driving cars, game-playing agents beat humans, language models beat elite competitors at math and programming, and biology has been visibly changed by it. The interesting question isn't whether AI matters but what it is.
The breakdown is quick: the "artificial" half just means it runs on a computer or a robot. The "intelligence" half has been argued about for millennia, and he deliberately steers away from defining it by reference to humans, looking instead for general principles — intelligence as something like a fundamental property of the universe rather than a human trait. What follows is a four-part checklist: an intelligent agent perceives the world, reasons with what it has, acts in the world, and learns from experience.
The worked example is a self-driving car. Perception is swallowing the sensor stream — cameras, lidar, whatever's on the roof — and turning it into something usable. Reasoning is deciding whether that pedestrian is about to step off the curb and what the surrounding cars are likely to do, and forming a plan. Acting is the actual throttle, brake, and steering decision. Learning is the requirement that next time you do better; an agent that repeats the same mistake isn't intelligent in any useful sense.
Each box then gets populated with course content. Perception covers images and video, speech and audio generally, and text. Reasoning is where most of the term lives: uniform cost search for finding shortest paths when the world is deterministic, value iteration and Markov decision processes for acting sensibly when it isn't, minimax for adversarial settings like chess where you assume a worst-case opponent, and Bayesian networks for probabilistic reasoning over an uncertain world. Acting is the part where you prove anything at all — emitting text, images, speech, or physically moving a robot; without output that touches the world, he argues, there's no way to tell whether intelligence is present. Learning is treated as a general principle of updating beliefs from experience, which shows up as different algorithms in different settings: gradient descent, Q-learning in the reinforcement learning section, expectation maximization when they get to Bayesian networks.
Then the constraint that makes all of it hard: everything above has to happen with limited resources, and there are two kinds. Computation — time, memory, communication — and a car that needs a decision in a split second can't spend an hour thinking. And information: an agent never sees the whole situation, can't see around corners, and has a finite history to learn from. Those limits keep the agent from being optimal, and the whole game is doing something sensible anyway. That gap between what's optimal and what's achievable is the reason the field needs clever algorithms at all (6:39).
The last move in this section is the one I'd flag for you. He shifts from what an agent does to what it's trying to do, and splits that into two questions. The first is the developer's: any agent, explicitly or not, encodes values, goals, or a utility function, and the alignment problem is whether the agent's values actually match the developer's. The example is a chatbot whose maker wants it informative, non-hallucinating, and willing to refuse harmful requests — and whether that succeeds is, as he puts it, another question entirely. The second is society's, which is broader and messier: privacy, copyright and intellectual property in generative systems, jobs, inequality, geopolitics. Then a genuinely good line of questioning — who is the "we" in "what do we want"? Not him, presumably. The US population? Everyone alive? Different people want incompatible things, with or without AI, and unintended consequences show up regardless of intentions. He says he'll return to this at the end of the term and that it's a socio-technical problem, not a purely technical one (10:11).
The course is called principles and techniques, and the emphasis, he says, is on the durable parts. Stochastic gradient descent has been around since the 1950s and is still everywhere; the specific applications change, and our standards for what counts as intelligent shift, but the foundations mostly don't. The organizing philosophy is learning by doing — homework means building and coding things until they work, because at this point AI is an empirical, engineering-shaped field with, by his own admission, less theory than might be ideal.
Two changes matter for this year. The first is that the course is going "tensor native": homework and lectures in numpy and PyTorch. The justification is nicer than it first sounds — tensors aren't just a deep learning thing, since value iteration and Bayesian network inference are also computations you can express as tensors, which makes them a more universal object than the course's framing usually suggests. The second is a trade he defends explicitly: constraint satisfaction problems got cut, and in their place goes a deeper treatment of societal impact, on the grounds that AI now has an outsized effect on daily life and sits squarely inside public discourse.
Then a bit of housekeeping that's more interesting than it sounds. The slides are a program. What he's presenting is an executable lecture — a codebase, rendered for viewing, that produces the lecture content when run. It lives in a GitHub repo, and the advantages he claims are structural: you can see where you are in the flow at any moment, you can step through real code in later lectures, and code has a precision that neither English nor mathematics reliably achieves. His jab at math is that you can write plenty of symbols without anyone agreeing on what they mean, whereas code that executes has well-defined semantics. And if you're building a real system, you'll be writing code anyway, so you might as well start on day one (17:02).
Roughly a third of the lecture is history, and it's structured as three overlapping stories instead of one timeline. He starts one step earlier, with Turing.
In 1950 Turing asked whether machines can think — but the sharper question, given that computers barely existed, was how you could possibly tell. It was closer to philosophy than engineering. The imitation game sets a machine and a human against each other, both trying to convince an interrogator that they're the human. He acknowledges the enormous literature on why this test is flawed, then sets the flaws aside: the significance is that it converted a philosophical question into an objective measurement. That instinct — benchmark it, measure it, let the number drive progress — is, in his telling, the engine of the whole field, and it starts with Turing. Notably, Turing didn't prescribe a solution; people at the time were considering both learning-based and logic-based routes, and he left it open. That's presented as the normal condition of research: you can define a north star without knowing the path (20:01).
1956, Dartmouth: McCarthy — then at MIT, later the founder of Stanford's AI lab — convened the leading thinkers of the day for a two-month workshop aimed at a significant advance. By his account they didn't solve much, but they did coin "artificial intelligence," which stuck. The 1950s were a period of high optimism. Arthur Samuel built a checkers program using rudimentary machine learning that played at a strong amateur level, which is more impressive when you remember how little computing existed. Newell and Simon built a theorem prover that operated in Russell and Whitehead's Principia Mathematica and found a proof more elegant than the human one; they wrote it up and submitted it, and it was rejected — the reviewers apparently didn't notice the third author was the program itself (21:51).
The comeuppance is a story he half-disowns. The folklore has it that researchers translating between English and Russian at the height of the Cold War ran a sentence about a willing spirit and weak flesh through a round trip and got back a remark about good vodka and rotten meat. He says outright that it's probably not a real example, but it's a good one. What is documented is a 1966 report concluding machine translation was going nowhere, funding being withdrawn, and the first AI winter — money dried up and people stopped using the word AI (23:04).
His diagnosis of what went wrong has two parts. There wasn't enough compute, and everything was framed as search, so the search space grew exponentially and outran the hardware; the theory that would have explained that difficulty, NP-completeness, didn't arrive until the 1970s. And there wasn't enough knowledge in the systems. Chess is one thing; the actual world contains an enormous number of words, objects, and concepts, and without them in the system you don't have intelligence. A lot of intelligence, he says flatly, is just knowledge. The consolation prize was the infrastructure built along the way — Lisp, garbage collection, time-sharing — all invented because people were reaching for something harder.
The 1970s and 80s were the knowledge fix: expert systems, where you sit a domain expert down and have them write out the rules of their field. Systems were built to diagnose blood infections and to configure customer orders, and this was the first time AI had genuine industrial applications solving real problems. Knowledge helped twice over — it filled the information gap, and by constraining the search it helped the computation gap too. What broke it was that hand-written rules handle real-world uncertainty badly, and the rule bases grew too complicated to build or maintain, collapsing into something like spaghetti code. Hype plus underdelivery is a reliable way to lose your funding, and the second AI winter arrived around the end of the 1980s, with a recession helping it along.
Back to the 1940s and McCulloch and Pitts — a logician and a neuroscientist — who developed the theory of artificial neural networks as a pure theory paper with no learning rule, exploring what a mathematical neuron could compute. The first thing you'd recognize as a learning algorithm comes from Hebb in 1949, the co-firing rule, which he describes as ad hoc; the perceptron algorithm was more principled, and there was adaline for linear regression. Then, in 1969, Minsky and Papert's Perceptrons showed these linear models couldn't represent very sophisticated functions, and the book is widely credited with killing off — or at least cooling — neural network research. There's a nice irony in that Minsky had worked on neural nets for his own PhD before moving to the symbolic camp.
The 1970s were dead. The 1980s brought convnets and the popularization of backpropagation by Rumelhart, Hinton, and Williams in 1986, though he notes it had been invented and reinvented repeatedly. By the end of the decade there were modest real successes, like recognizing handwritten digits for the US Postal Service. Through the 2000s, though, neural nets were hard to train and unpopular. The turn starts with Hinton's 2006 paper on training deep networks, then speech in 2009, AlexNet in vision, seq2seq in translation, new optimizers, and the attention mechanism. AlphaGo is his emblem of the era: deep learning combined with reinforcement learning solved something people thought was a decade out. The transformer arrives in 2017 and, he says, sets up much of what they'll cover later (29:44).
The third thread is the one he's most eager to rehabilitate: much of what the class will cover isn't really about AI at all. Linear regression comes from Gauss around 1801, when least squares had to be solved by hand. Linear classification shows up in 1936. Stochastic gradient descent and uniform cost search are both from the 1950s, the latter out of the algorithms community. Markov decision processes come from control theory. None of those people were trying to solve AI in McCarthy's sense; they were building mathematical tools the AI community later leaned on.
From the 1980s through the 2000s, statistical machine learning was the mainstream — Bayesian networks, support vector machines, variational inference, conditional random fields, topic models — and neural nets were a small fraction of the community, partly because they lacked nice mathematical properties and partly because they were hard to train. His retrospective is even-handed: the statistical habits of mind, especially thinking carefully about optimization, stayed useful, but the architectures became deep-learning shaped.
The last five years are already history in his telling. Foundation models start with pre-trained language models like ELMo, BERT, and T5 — take a large body of raw text, train a model to predict the next word, and you get representations that transfer to all sorts of downstream tasks. The idea isn't new, he points out; it's at least twenty years old. What was new was executing it inside the modern deep learning stack, which produced genuinely surprising results. Then scaling: OpenAI, Google, Meta, DeepSeek. Reasoning models get their own mention — hard questions require thinking, which is close to trivially true, so these models emit thought tokens before committing to an answer, and that produced another round of gains and models that take gold at the IMO and IOI.
The closing theme is industrialization. AI used to be a cute niche where daydreamers tried things and most of them failed. Now GPT-4 reportedly carries 1.8 trillion parameters and cost around $100 million to train, xAI has assembled a cluster of 200,000 H100 GPUs, and hundreds of billions are being invested. At the same time, openness has fallen: the GPT-4 technical report declines to describe how the model was trained, citing the competitive landscape and safety implications, which is a sharp change from five or six years earlier when companies published openly. AI now shapes business and policy. But, he insists, the open research problems around intelligence remain — we haven't solved AI, we've simply made enough progress for it to matter (35:43).
His synthesis is that these camps fought bitterly and were also secretly continuous. Minsky and Papert pushed symbolic AI and tried to kill neural nets; statistical ML people in the 2000s treated neural nets as dead. Yet the first neural network paper was about implementing logical operations, and Go — a game defined purely in symbols — turned out to be solvable by deep learning, which he calls kind of weird. Deep learning's first decade was about perception; it has now turned toward reasoning, which was symbolic AI's original goal. His metaphor is a melting pot: symbolic AI had the vision of what an intelligent agent should be, neural AI supplied the architectures, statistical AI supplied the rigor and the vocabulary of optimization, generalization, and train/test splits. The course will draw on all three.
The final third is a numpy tutorial, and he frames it as worth your time even if you never work in AI, since tensors show up across science and engineering. His phrase for them is the "atoms of modern machine learning" — data, parameters, gradients, activations, and intermediate computations all become tensors.
The mechanics go quickly. A scalar is a rank-zero tensor whose shape is an empty list; a vector is rank one; a matrix is rank two; a rank-three tensor has three dimensions, and you slice into it step by step to pull out individual values. You almost never type the entries, so you use constructors — zeros, ones, random draws from a Gaussian, identity, or a diagonal matrix built from a vector — and you read and write tensors to disk when you're loading datasets or saving trained parameters.
Then the shapes that actually recur. A single data point is a vector of dimension d, and you batch them into an n-by-d matrix where each row is an example. Language adds a sequence axis: n examples, each a sequence of length L with a d-dimensional vector at each position, giving you n-by-L-by-d. Vision adds height, width, and channels: n-by-h-by-w-by-c. A layer's weights map an input dimension to an output dimension, so that's a d_in-by-d_out matrix. A whole model's parameters are just a bundle of such tensors — he pulls up DeepSeek v3 on Hugging Face, 670 billion parameters, and points at individual layer matrices with dimensions like 7168 by 16384 (44:36).
Two practical warnings I'd write on your hand. Slicing and transposing give you views, not copies — different objects pointing at the same underlying storage — so mutating one silently changes the other; he advises simply not mutating unless you must. And triu / tril, which zero out everything below or above the diagonal, are filed away for later as the masking primitives you'll need for causal attention in transformers.
Matrix multiplication is the bread and butter, and the batching trick is the point: a 2-by-4-by-6 tensor times a 6-by-3 weight gets broadcast across the first dimension, applying the same multiplication to every slice. When a student asks whether the first dimension is special, the answer is no — numpy only sees a rank-three tensor, and "batch" is meaning we impose. Another student asks what you can multiply a rank-four image tensor by; the general answer is a scalar, a vector, or a matrix, each broadcast up, but he defers the clean explanation to einops.
That question about efficiency gets a proper answer. The same result can cost wildly different amounts, and the rule for tensor code is to express your computation in as few tensor operations as possible. Timing a Python triple loop against a numpy matmul shows the loop losing badly: Python is interpreted and unoptimized, numpy is written in C and heavily tuned, and on GPUs the gap gets wider still. Once everything is tensors, you can also hand them to tooling that spreads them across multiple GPUs; sequential code has no such option. The honest trade-off he names is readability — you end up doing gymnastics on shapes — but when you're scaling up, speed usually wins (54:05).
Einops is the fix for the readability problem. It's a tensor library where dimensions carry names, inspired by but not identical to Einstein summation, and its centerpiece is a generalized form of matrix multiplication that handles the bookkeeping for you. You hand it two tensors and a string: name each tensor's axes, then name the output's axes, and any label that appears on the left but not on the right gets summed out — exactly like the shared index in ordinary matrix multiplication. The batched example that was confusing with transpose(-2, -1) becomes something like "batch seq1 hidden, batch seq2 hidden → batch seq1 seq2," which is, by his estimate, a hundred times easier to read. He also recommends annotating what each dimension means whenever you define a tensor, because a rank-four or rank-five tensor is otherwise impossible to keep straight, and an ellipsis handles the case where you don't know how many batch dimensions there'll be.
A few seams I noticed, all specific. The four-ingredient taxonomy is tidy but overlaps in practice: value iteration gets filed under reasoning while Q-learning lands under learning, even though both are algorithms for the same Markov decision process framework, and he never says how to classify methods that do two things at once. It's a teaching scaffold rather than a real partition, which is fine, but it'll blur by mid-term.
The reasoning claim bothered me more. He presents reasoning models as progress toward symbolic AI's original goal, but "the model emits tokens before answering" doesn't come with any account of what would distinguish genuine reasoning from plausible-looking intermediate text. Coming right after twenty minutes of history in which measurement repeatedly substituted for understanding, that step felt thinner than the rest of the argument.
Smaller things. The GPT-4 parameter count and training cost were offered with a hedge — "supposedly" — so treat them as reported figures, not established ones; he was appropriately careful, and I'd keep that qualifier if you repeat them. His own translation anecdote is flagged as probably apocryphal, and I'd have preferred one documented failure instead, since the real story of why machine translation stalled is more interesting than the joke. And the societal section raises the question of who "we" is, then leaves it hanging — deliberately, with a promise to return at the end of the course, so it's a deferred answer rather than a dodge.
If you're catching up before the next session, the history block is the part worth a second pass — the rest of the course keeps gesturing back at it, and the tensor material, dense as it is, will get reinforced by the homework anyway.
Content Disclaimer:
This article is for general reference only and does not constitute professional R&D guidance, production process advice or quality certification. All material performance data has specific test premises; readers should verify parameters against actual equipment and working conditions.
All contents below are exclusive to the paid Word file, NOT available on this web page

