Lecture 18 truncates the chain rule with an N-gram Markov assumption, estimates probabilities from corpus counts, and contrasts greedy, categorical, and temperature sampling. The real bottlenecks are zero probability for unseen contexts and a fixed window.
Lecture 19 builds a minimal next-token model from two embedding matrices, dot-product similarity, softmax, and cross-entropy. Shared vector parameters replace the isolated count cells of an N-gram table.
Lecture 21 formulates stochastic sequential decisions as an MDP with known dynamics, defines value and Q-values through Bellman backups, and solves for an optimal policy with value or policy iteration.
Lecture 22 keeps the MDP structure but removes known transitions and rewards. TD learning updates value from one sample, and Q-learning uses an off-policy target to learn optimal action values directly.
Lecture 23 replaces a huge Q-table with Qθ(s,a): first derive a gradient update for linear features from squared TD error, then add replay data and a fixed target network to form DQN.
Spring 2026 Lecture 24 is MCTS, not Fall 2026 LLM post-training. It allocates simulations through selection, expansion, rollout, backup, and UCB, then connects policy/value heads and self-play to AlphaZero.
Lectures 1–12 form one decision pipeline: define states, moves, and objectives, then use heuristics, losses, regularization, and backpropagation to control an otherwise intractable search space.
Stage II uses HW8 and HW11 to test whether representation, computation graphs, training, transfer, and generation actually connect, rather than treating CNNs and Transformers as diagrams to memorize.
Stage III connects value, policy, bootstrapping, function approximation, and MCTS into AlphaZero: a network supplies priors and estimates, search improves decisions, and self-play creates the next training set.
Cognee is a data-to-memory pipeline: a relational store preserves sources and provenance, a vector store finds semantically similar content, and a graph store represents entity relationships, exposed through remember, recall, improve, and forget.
Week 1 has no algorithms. The live introduction explains what the course teaches: which week covers each component of an LLM, which language algorithms outside LLMs are also taught, and why language is hard. PA0 sets up the Python and Jupyter environment the later assignments use.
Week 10 treats web pages and human relationships as graphs. Link analysis teaches anchor text and PageRank: the long-run probability that someone clicking links at random is on a page is that page's score. Social networks covers centrality, the clustering coefficient, small worlds and weak ties. The final live lecture returns to LLMs with preference alignment, interpretability and machine translation.
Week 2 teaches three things: cutting text into tokens with BPE, computing the edit distance between two strings with dynamic programming, and estimating the next word's probability with n-grams, evaluated by perplexity. Each can be done on paper, and this post works one example of each.
Week 3 teaches logistic regression: turn a document into a feature vector, pass the weighted sum through a sigmoid to get a probability, measure the error with cross-entropy, and fix the weights with gradient descent. This post works the slides' movie-review example through a prediction, a loss and one weight update, and explains why evaluation looks at precision and recall.
Week 4 teaches search: turn the query and the documents into vectors, weight them with tf-idf, rank by cosine similarity, speed it up with an inverted index, evaluate with precision, recall and MAP, and finally connect to dense retrieval and RAG. This post works the slides' four-document example in full.
Week 5 teaches embeddings: the meaning of a word can be represented by the words that tend to appear around it. It builds vectors from co-occurrence counts and compares them by cosine, then trains dense vectors of a few hundred dimensions with word2vec, and finally separates static vectors from ones that change with context. The same week's live lecture on computational social science has no public material.
Week 6 has two halves. The pre-recorded material teaches neural networks: how one unit computes, why hidden layers are needed, the softmax, classification and language modeling with word vectors, and backpropagation. The live lecture introduces large language models: what they are, the three architectures, why so many tasks can be recast as continuing text, how to sample, how pretraining works, and how a model becomes an assistant.
Week 7 opens up the Transformer: how attention lets each token draw on the tokens before it, what parts make up a block, and how the input and output ends are attached. PA6a has you write causal self-attention, train a small model and compute perplexity. The same week's live speech lecture introduces the speech recognition task and word error rate.