Skip to content

GNN Applications

Graph Neural Networks (GNNs) have evolved from academic research into widespread industrial applications. This note surveys representative works applying GNNs to molecular science, recommender systems, knowledge graphs, traffic prediction, graph generation, and point cloud processing, showcasing the powerful generality of graph learning.

Learning path: GNN fundamentals (GCN/GraphSAGE/GAT) → Message passing paradigm → Domain-specific graph construction → Representative models → Industrial practice


Molecular Property Prediction and Drug Discovery

Molecular Graph Representation

Molecules inherently possess graph structure: atoms are nodes and chemical bonds are edges. Node features in molecular graphs typically include atom type, charge, hybridization state, etc.; edge features include bond type (single/double/triple/aromatic), bond length, etc.

Element Graph representation Example features
Atom Node Atomic number, charge, chirality, number of hydrogens
Chemical bond Edge Bond type, conjugation, ring membership
Molecule Graph Molecular weight, LogP, TPSA

MPNN (Message Passing Neural Network)

Gilmer et al. (2017) proposed the MPNN framework, unifying various GNNs under the message passing paradigm:

Message phase:

\[ \mathbf{m}_v^{(t+1)} = \sum_{u \in \mathcal{N}(v)} M_t(\mathbf{h}_v^{(t)}, \mathbf{h}_u^{(t)}, \mathbf{e}_{vu}) \]

Update phase:

\[ \mathbf{h}_v^{(t+1)} = U_t(\mathbf{h}_v^{(t)}, \mathbf{m}_v^{(t+1)}) \]

Readout phase (graph-level prediction):

\[ \hat{y} = R\left(\{\mathbf{h}_v^{(T)} \mid v \in G\}\right) \]

where \(M_t\) is the message function, \(U_t\) is the update function, and \(R\) is the readout function (e.g., sum pooling + MLP).

SchNet

SchNet (Schutt et al., 2017) is designed specifically for 3D molecules, directly processing atomic spatial coordinates:

  • Uses radial basis functions (RBF) of interatomic distances as edge features
  • Continuous-filter convolution: The filter is a continuous function of interatomic distance
  • Satisfies rotational and translational invariance
  • Widely used in molecular dynamics simulations and energy prediction

Applications in Drug Discovery

Task Input Output Representative methods
Molecular property prediction Molecular graph Solubility, toxicity, etc. MPNN, AttentiveFP
Virtual screening Drug-target pairs Binding affinity GraphDTA
Molecular generation Prior distribution Novel molecular structures JT-VAE, GraphAF
Drug-drug interaction Drug pair graph Interaction type MHCADDI

Recommender Systems

PinSage

PinSage (Ying et al., 2018) is an industrial-scale GNN recommender system developed by Pinterest, operating on graphs with billions of nodes:

Core techniques:

  • Random walk sampling: Uses Personalized PageRank to rank neighbors by importance, selecting the most relevant ones
  • Producer-consumer architecture: CPU handles neighbor sampling and computation graph construction; GPU executes GNN forward/backward passes
  • Curriculum learning: Uses random negative samples in early training, then switches to hard negatives (nodes that are close in embedding space but are not positive samples)
  • MapReduce inference: Offline batch generation of all node embeddings

LightGCN

LightGCN (He et al., 2020) achieves excellent results in recommendation through a minimalist design:

\[ \mathbf{e}_u^{(l+1)} = \sum_{i \in \mathcal{N}(u)} \frac{1}{\sqrt{|\mathcal{N}(u)|}\sqrt{|\mathcal{N}(i)|}} \mathbf{e}_i^{(l)} \]

Key simplifications:

  • Removes feature transformation matrices: No \(W^{(l)}\) is used
  • Removes nonlinear activation functions: No \(\sigma(\cdot)\) is used
  • Weighted sum of multi-layer embeddings: The final embedding is a weighted average across layers
\[ \mathbf{e}_u = \sum_{l=0}^{L} \alpha_l \; \mathbf{e}_u^{(l)} \]
Method Core idea Graph type Advantage
PinSage GraphSAGE + random walk Bipartite graph Industrial-scale scalability
LightGCN Simplified GCN User-item bipartite graph Simple, efficient, SOTA
NGCF GCN + collaborative signal User-item bipartite graph Explicitly models high-order interactions
SR-GNN GNN + session graph Graph built from session sequences Captures intra-session item relationships

Knowledge Graph Reasoning

R-GCN (Relational GCN)

Edges in knowledge graphs have multiple types (relations), which standard GCN cannot handle. R-GCN (Schlichtkrull et al., 2018) learns a different transformation matrix for each relation type:

\[ \mathbf{h}_v^{(l+1)} = \sigma\left(\sum_{r \in \mathcal{R}} \sum_{u \in \mathcal{N}_r(v)} \frac{1}{c_{v,r}} W_r^{(l)} \mathbf{h}_u^{(l)} + W_0^{(l)} \mathbf{h}_v^{(l)}\right) \]

where \(\mathcal{R}\) is the set of relation types, \(\mathcal{N}_r(v)\) is the set of neighbors of node \(v\) under relation \(r\), and \(c_{v,r}\) is a normalization constant.

Parameter explosion problem: When there are many relation types, the number of parameters becomes enormous. Solutions:

  • Basis decomposition: \(W_r = \sum_{b=1}^{B} a_{rb} V_b\), a linear combination of a small number of basis matrices
  • Block diagonal decomposition: Constrains \(W_r\) to be block diagonal

Typical Tasks

Task Description Evaluation metrics
Link prediction Predict missing triples \((h, r, t)\) MRR, Hits@K
Entity classification Predict the type of an entity Accuracy, F1
Relation prediction Predict the relation type between two entities Accuracy

Traffic Prediction

STGCN (Spatio-Temporal Graph Convolutional Network)

STGCN (Yu et al., 2018) is a pioneering work applying GNNs to traffic prediction, jointly modeling spatial dependencies and temporal dependencies:

Spatial dimension: Road networks are natural graph structures (intersections as nodes, roads as edges); graph convolution captures spatial correlations.

Temporal dimension: Uses 1D causal convolutions (rather than RNNs) to capture temporal dependencies, avoiding the efficiency issues of recurrent computation.

Architecture: ST-Conv Block = Temporal convolution → Spatial graph convolution → Temporal convolution

\[ \text{ST-Conv}(\mathbf{X}) = \Gamma_1 * \left(\Theta * \left(\Gamma_0 * \mathbf{X}\right)\right) \]

where \(\Gamma\) denotes temporal convolution, \(\Theta\) denotes graph convolution, and \(*\) denotes the convolution operation.

Traffic prediction method Spatial modeling Temporal modeling Characteristics
STGCN ChebNet graph convolution 1D causal convolution Efficient, parallel computation
DCRNN Diffusion convolution GRU Captures directed diffusion processes
Graph WaveNet Adaptive adjacency matrix Dilated causal convolution No predefined graph structure needed
ASTGCN Attention graph convolution Attention-based temporal Dynamic spatio-temporal attention

Graph Generation

GraphRNN

GraphRNN (You et al., 2018) formulates graph generation as a sequence generation problem:

  1. Graph-level RNN: Generates nodes sequentially, outputting a state for each new node
  2. Edge-level RNN: For each new node, generates edges connecting it to existing nodes

The advantage is autoregressive generation of graph structure, capable of modeling complex graph distributions.

DiGress

DiGress (Vignac et al., 2023) is a graph generation model based on discrete diffusion:

  • Defines a discrete noise process over node types and edge types
  • The forward process gradually "corrupts" the graph into a random graph
  • The reverse process learns to denoise, recovering the target graph from the random graph
  • Uses a Graph Transformer as the denoising network
Method Generation paradigm Advantage Limitation
GraphRNN Autoregressive Flexible, handles arbitrary graph sizes Order-dependent generation, slow
GraphVAE VAE One-shot generation Limited to fixed graph sizes
DiGress Discrete diffusion High quality, order-independent Computationally intensive
GDSS Continuous diffusion (SDE) Handles continuous attributes Requires continuous relaxation

Point Cloud Processing

From Point Clouds to Graphs

Point clouds are collections of discrete points in 3D space, widely used in autonomous driving, robotics, and AR/VR. Common methods for converting point clouds to graphs:

  • k-nearest neighbor graph (k-NN Graph): Each point connects to its \(k\) nearest neighbors
  • Radius graph: Connects point pairs within distance \(r\)
  • Delaunay triangulation: Constructs a graph based on triangulation

DGCNN (Dynamic Graph CNN)

DGCNN (Wang et al., 2019) dynamically constructs a k-NN graph in feature space (not just coordinate space):

  • Rebuilds the graph at each layer based on current features (dynamic graph)
  • EdgeConv operation: Defines edge features as the difference between center point and neighbor
\[ \mathbf{h}_v^{(l)} = \max_{u \in \mathcal{N}(v)} \text{MLP}\left(\mathbf{h}_v^{(l-1)} \| (\mathbf{h}_u^{(l-1)} - \mathbf{h}_v^{(l-1)})\right) \]

PointNet++ and Its Relationship to Graphs

PointNet++ (Qi et al., 2017), while not an explicit GNN, follows a hierarchical sample-group-aggregate paradigm that closely parallels GraphSAGE:

Operation PointNet++ GraphSAGE analogy
Sampling Farthest Point Sampling (FPS) Target node selection
Grouping Ball query / k-NN Neighbor sampling
Aggregation PointNet (max pooling) Aggregation function (Pool)
Method Graph construction Core innovation Application scenario
PointNet No graph structure (independent points) Permutation-invariant set function Classification, segmentation baseline
PointNet++ Hierarchical local regions Multi-scale grouping Non-uniform point clouds
DGCNN Dynamic k-NN in feature space Dynamic graph + EdgeConv Shape classification, segmentation
Point Transformer k-NN graph + attention Vector attention Large-scale point cloud segmentation

Summary and Outlook

GNN applications have permeated nearly every domain involving relational data. The core paradigm is: identify graph structure in the problem → design appropriate message passing mechanisms → optimize for the downstream task.

Trend Description
Pre-trained GNNs Pre-training on large-scale unlabeled graph data, transferring to downstream tasks
GNN + LLM Combining large language models to process textual attributes on graphs
Equivariant GNNs Preserving geometric symmetries (rotational/translational equivariance) for molecules and physics
Scalability More efficient sampling and training strategies supporting graphs with tens of billions of edges
Heterogeneous graphs Processing real-world graphs with multiple node and edge types

Graphs are everywhere. Mastering the core ideas and application paradigms of GNNs is an essential part of understanding modern AI systems.


评论 #