A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Graph Neural Networks

Research Depth 92 in the knowledge graph I know this Set as goal
28topics build on this
647prerequisites beneath it
See this on the map →
Neural Network FundamentalsGraph Representations: Adjacency List vs. Adjacency Matrix+2 moreConvolutional Neural NetworksRecurrent Neural Networks
graph-neural-network gnn node-classification

Core Idea

Graph neural networks extend deep learning to graph-structured data by propagating information across edges. GNNs learn node representations by iteratively aggregating neighbor information. Variants include GCNs (convolutional), GraphSAGE (sampling), and GATs (attention). Applications span social networks, molecules, knowledge graphs, and recommendations.

Explainer

Standard neural networks assume their input has a fixed, regular structure — images are grids of pixels, text is a sequence of tokens. But many real-world datasets are naturally represented as graphs: social networks (users connected by friendships), molecules (atoms connected by bonds), citation networks (papers connected by references), and knowledge graphs (entities connected by relations). You can't simply flatten a graph into a vector and feed it into a regular neural network because graphs have variable size, no canonical node ordering, and complex connectivity patterns. Graph neural networks (GNNs) solve this by designing neural network operations that respect and exploit graph structure directly.

The fundamental operation in a GNN is neighborhood aggregation (also called message passing). For each node in the graph, the network collects feature information from its neighbors, combines it (through summation, averaging, or a learned function), and uses the result to update the node's own representation. One round of aggregation lets each node "see" its immediate neighbors; stacking multiple layers lets information propagate further — after k layers, each node's representation encodes information from its k-hop neighborhood. If you're familiar with the adjacency matrix representation of graphs, you can think of one GNN layer as multiplying the feature matrix by the (normalized) adjacency matrix and then applying a nonlinear transformation — similar in spirit to a standard neural network layer, but with the adjacency matrix defining which nodes communicate.

The major GNN variants differ in how they aggregate neighbor information. Graph Convolutional Networks (GCNs) use a fixed aggregation scheme based on the normalized adjacency matrix — every neighbor contributes equally, scaled by degree. GraphSAGE samples a fixed number of neighbors and applies a learnable aggregation function (mean, LSTM, or max-pool), making it scalable to large graphs where examining all neighbors is expensive. Graph Attention Networks (GATs) borrow the attention mechanism from transformers: they learn to assign different importance weights to different neighbors, so the network can focus on the most relevant connections. The choice of variant depends on the application — GCNs are simple and effective for many benchmarks, GraphSAGE scales to graphs with millions of nodes, and GATs excel when the importance of neighbors varies.

GNNs can be applied at three levels of granularity. Node-level tasks predict properties of individual nodes (e.g., classifying users in a social network or predicting the function of proteins). Edge-level tasks predict relationships between pairs of nodes (e.g., link prediction in knowledge graphs or recommending connections). Graph-level tasks predict properties of entire graphs (e.g., predicting whether a molecular graph represents a toxic compound), typically by adding a readout or pooling layer that aggregates all node representations into a single graph-level vector. The key insight across all these applications is that GNNs learn representations that capture both the features of individual entities and the structure of their relationships — something that no amount of feature engineering on flat tabular data can easily achieve.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionSine, Cosine, and Tangent RatiosTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesProbability Density FunctionsExpected ValueLinear Regression in Machine LearningNeural Network FundamentalsGraph Neural Networks

Longest path: 93 steps · 647 total prerequisite topics

Prerequisites (4)

Leads To (2)