Graph ML & Graph Neural Networks
The boundary. The algorithms-track lesson Graphs covers traversal, connectivity, shortest paths and Union-Find: algorithms that compute an exact answer on a graph you hold. This lesson is about learning on graphs: predicting a label for a node, whether an edge exists, or a property of a whole graph, from structure plus attributes, and operating such a model under production constraints. The central question of the lesson is not "how does a GNN work" but "does a GNN beat a gradient-boosted model fed with graph features, and is the difference worth the serving cost?"
Neighbouring lessons own these topics, and this one links to them instead of repeating them:
- Embedding mechanics (negatives, InfoNCE, similarity measures, re-embedding on model change): Embeddings & Representation Learning. The recommender funnel and two-tower retrieval: Ranking & Recommendation System Architecture and Modern Recommender Architectures.
- The fraud system around a graph signal (labels, decision policy, latency budget): Case Study: Real-Time Payment Fraud Detection (Stripe / PayPal-style). Unsupervised outlier scoring: Anomaly Detection for Tabular Data & Time Series.
- The tabular learner we compare against: LightGBM. Metrics: Model Evaluation Metrics. Online feature computation: ML Data Pipelines & Feature Stores.
- Neural-network basics assumed here: Neural Networks & Backpropagation. Retrieval over vectors: Vector Databases and Hybrid Search; RAG: RAG Architecture End to End.
- Related lessons in the same track: Entity Resolution & Record Linkage (matching records, which produces a graph) and Data Labeling, Active Learning & Weak Supervision (where fraud labels come from); and Adversarial ML & Model Security (attacks such as adding edges to evade a graph model). Privacy and fairness of graph data: Responsible ML: Interpretability, Fairness & Privacy.
Graph-ML interviews follow a pattern: "what is the graph, what is the task, what would you try first, how do you split, how do you serve it?" The honest senior answer is "start with graph features in a GBM, measure what a GNN adds on a time-aware split, then decide whether the gain pays for neighborhood fetches at serving time". Every number marked verified below was produced by a script run for this lesson on a synthetic graph (scripts listed in the worked example); synthetic results show mechanisms, not production performance.