Graph Learning

Stanford CS224W · Machine Learning with Graphs · Autumn 2026

Study guides

Twenty-one lecture pages: a walkthrough of every lecture with every slide drawing redrawn as a figure, interactive figures that recreate the key ideas, a review that ties each session to the earlier ones, a hands-on lab per session, what the 2025–26 research frontier changed, and a bridge back to classic social network analysis.

21
lectures19 sessions + 2 bonus pages
interactive figuresplus 439 redrawn slide figures, 240,485 words
104
self-check questionsplus flashcards and glossaries
0%
your progresssections ticked, stored in this browser
01

Foundations

Message passing, its theory and its encoders

1IntroductionWhy so much of the world's data is a graph, why ordinary deep learning chokes on it, and the three kinds of questions we ask of graphs.Lecture 1 · Tue 9/2228 figures3 interactive5 quiz 2Node EmbeddingsTurn every node into a vector so that "close in the graph" becomes "close in space" — learned from random walks instead of hand-made features.Lecture 2 · Thu 9/2433 figures1 interactive6 quiz 3Graph Neural NetworksReplace the embedding lookup table with a neural network that lets every node repeatedly gather and transform messages from its neighbours.Lecture 3 · Tue 9/2931 figures2 interactive5 quiz 4A General Perspective on GNNsEvery GNN is a few choices in a five-part design space; GCN, GraphSAGE and GAT are just three points in it — and depth is not free.Lecture 4 · Thu 10/120 figures4 interactive5 quiz 5GNN Augmentation & TrainingThe input graph is rarely the best computation graph, and a graph dataset can't be split like a pile of images — here is the full training pipeline done right.Lecture 5 · Tue 10/621 figures2 interactive5 quiz 6Theory of GNNsA message-passing GNN can only tell apart what its neighbourhood aggregation can tell apart; sum aggregation (GIN) reaches the ceiling, and that ceiling is the Weisfeiler–Lehman test.Lecture 6 · Thu 10/817 figures2 interactive5 quiz 7Designing Powerful Graph EncodersMessage passing is stuck at the 1-WL ceiling because constant inputs inherit the graph's symmetries; inject structure (closed loops, eigenvectors, cycle counts) or position (anchor distances) and the ceiling breaks.Lecture 7 · Tue 10/1321 figures2 interactive5 quiz 8Graph TransformersSelf-attention is message passing on a complete graph — so a graph transformer is a transformer that is told about the real graph through its tokens, its positional encodings and its attention scores.Lecture 8 · Thu 10/1523 figures2 interactive5 quiz
02

Typed and relational data

Heterogeneous graphs, knowledge graphs, recommenders, databases

03

Generality and language models

Foundation models, LLMs and agents on graphs

04

Generation and design

Generative models and the design space

05

Bonus pages

From the lecture notes: topics the slides skip

06

How to use these pages

Read in orderEach page opens with "In short" and a picture, then the concept sections. The slide-by-slide walkthrough is collapsed: open it when you want the lecture verbatim. Tick "got it" per section; the roadmap and this index remember your progress.
Predict, then reveal"Check yourself" answers stay hidden until you ask, and every page has a proof workshop with graded hints. Commit to an answer first: being wrong and then corrected is how it sticks.
Review across sessionsThe cumulative review mixes questions, flashcards and proof problems from every session you have reached, with spaced repetition so missed items come back sooner.
Play with the figuresEvery interactive figure has sliders or buttons. They run in the browser with no server; the numbers in the notebook-based ones are measured results from notebooks/cs224w/.
Then open the notebookEvery Lab section links its marimo notebook. Run uv run marimo edit notebooks/cs224w from the repository root.
Frontier and SNA bridgeWritten for a reader who knows classical social network analysis: what each lecture inherits from it, what it changes, and what the 2025–26 conferences did to the lecture's claims. Each bridge links to the units of the SNA course that teach the classic side in full.