Training GNNs on Citation Datasets
1. Key Concepts of GNNs
Key Concepts of GNNs
Graph Representation Learning
Graph Neural Networks (GNNs) operate on graph-structured data, where entities are represented as nodes and relationships as edges. The core idea is to learn low-dimensional embeddings for nodes, edges, or entire graphs that capture structural and feature-based information. Given a graph G = (V, E), where V is the set of nodes and E the set of edges, GNNs leverage message passing to propagate information across the graph.
Here, hv(k) is the embedding of node v at layer k, σ is a non-linear activation function, W(k) and B(k) are learnable weight matrices, and AGGREGATE is a permutation-invariant function (e.g., sum, mean, or max) over the neighbors 𝒩(v) of node v.
Message Passing Framework
The message passing paradigm consists of three steps: (1) message computation, where each node generates messages for its neighbors; (2) message aggregation, where each node combines received messages; and (3) node update, where each node updates its embedding based on aggregated messages. This framework is iterative, allowing information to propagate across multiple hops.
Here, ϕ, ρ, and ψ are differentiable functions, and eu→v represents edge features.
Graph Convolutional Networks (GCNs)
A widely used GNN variant, GCNs simplify message passing by employing a normalized sum aggregation with symmetric adjacency matrix normalization. The layer-wise propagation rule is:
where à = A + I is the adjacency matrix with self-loops, D̃ is the diagonal degree matrix of Ã, and H(k) is the node feature matrix at layer k.
Attention Mechanisms in GNNs
Graph Attention Networks (GATs) introduce attention weights to dynamically prioritize messages from different neighbors. The attention coefficient αuv between nodes u and v is computed as:
where a is a learnable attention vector, W is a weight matrix, and ∥ denotes concatenation.
Inductive vs. Transductive Learning
GNNs can operate in transductive settings (fixed graph, all nodes observed during training) or inductive settings (generalize to unseen nodes or graphs). Inductive models, such as GraphSAGE, sample neighborhoods and aggregate features dynamically, enabling scalability to large graphs.
Practical Considerations
- Over-smoothing: Deep GNNs may suffer from node embeddings becoming indistinguishable due to excessive message passing.
- Scalability: Sampling techniques (e.g., neighborhood sampling, subgraph sampling) are critical for large-scale graphs.
- Heterophily: Traditional GNNs assume homophily (connected nodes are similar); adaptations are needed for heterophilous graphs.

Message Passing in GNNs
The core operation in graph neural networks (GNNs) is message passing, where node representations are iteratively updated by aggregating information from neighboring nodes. This process enables GNNs to capture both local and global structural patterns in graph-structured data.
Mathematical Formulation
At layer l, the message passing operation for node v can be decomposed into three key steps:
- Message Construction: Each neighbor u ∈ N(v) computes a message:
where φ is a message function (typically an MLP), h are node features, and e are edge features.
- Message Aggregation: Messages from all neighbors are combined:
Common aggregation operators ⊕ include sum, mean, or max pooling.
- Node Update: The target node's representation is updated:
where ψ is an update function (often another MLP).
Practical Considerations for Citation Networks
When applying message passing to citation datasets like Cora or PubMed:
- Directionality: Citation graphs are directed but often treated as undirected to ensure information flow between citing and cited papers.
- Edge Features: Publication years or citation counts can be incorporated via euv.
- Self-loops: Crucial for preserving original node features through skip connections.
Advanced Variants
Several refined message passing schemes have shown improved performance:
where αuv are attention weights (as in GATs) or learnable edge-type parameters (as in R-GCNs). For heterogeneous citation networks with multiple node types (papers, authors, venues), meta-paths can guide message passing routes.
Computational Efficiency
The sparse nature of citation networks enables efficient matrix-based implementations:
where  is the normalized adjacency matrix with self-loops. For large graphs, neighborhood sampling or subgraph batching becomes essential - techniques like GraphSAGE's fixed-size sampling or Cluster-GCN's graph partitioning maintain scalability while preserving the majority of the message passing benefits.

Popular GNN Architectures
Graph Convolutional Networks (GCNs)
The Graph Convolutional Network (GCN) introduced by Kipf and Welling in 2017 is a foundational architecture for semi-supervised node classification. It operates via layer-wise propagation rules that aggregate features from neighboring nodes. The forward propagation rule for a single layer is:
where H(l) represents node embeddings at layer l, W(l) is the trainable weight matrix, σ is a nonlinear activation function, Ã = A + I is the adjacency matrix with self-loops, and D̃ is the diagonal degree matrix of Ã. This symmetric normalization ensures stable gradient propagation during training.
Graph Attention Networks (GATs)
Graph Attention Networks replace the fixed aggregation weights of GCNs with learnable attention mechanisms. Each node computes attention coefficients over its neighbors:
where αij is the attention coefficient between nodes i and j, W is a shared linear transformation, and a is a learnable attention vector. Multi-head attention extends this by concatenating or averaging K independent attention heads.
GraphSAGE
GraphSAGE (Sample and AggregatE) generalizes GCNs to inductive settings by learning aggregator functions that combine features from a node's local neighborhood. The key innovation is its sampling-based approach:
- Neighbor sampling: Fixed-size uniform sampling from each node's k-hop neighborhood
- Aggregator functions: Mean, LSTM, or pooling operators combine sampled features
The update rule for node v at layer k is:
Gated Graph Neural Networks (GGNNs)
GGNNs incorporate gated recurrent units (GRUs) to propagate information across graph edges. The message passing mechanism resembles that of recurrent neural networks:
where Wedge is an edge-type specific weight matrix. This architecture excels in tasks requiring multi-step reasoning over graph structures.
Graph Isomorphism Networks (GINs)
GINs provide theoretical guarantees for distinguishing graph structures by using injective multiset functions. The update rule for node v at layer k is:
where MLP denotes a multi-layer perceptron and ε is a learnable parameter. GINs achieve maximum discriminative power among GNNs in the Weisfeiler-Lehman graph isomorphism test framework.
Practical Considerations for Citation Networks
When applying these architectures to citation datasets like Cora or PubMed:
- GCNs perform well for transductive tasks with fixed graphs
- GATs capture asymmetric citation relationships via attention
- GraphSAGE handles dynamic graphs where new papers may be added
- GINs are preferred when structural similarity detection is crucial
Batch normalization and dropout (applied to node features rather than edges) typically improve performance. For large graphs, sampling-based methods like GraphSAGE or Cluster-GCN become necessary to manage memory constraints.

2. Overview of Citation Datasets (Cora, Citeseer, PubMed)
Overview of Citation Datasets (Cora, Citeseer, PubMed)
Citation datasets are fundamental benchmarks for evaluating graph neural networks (GNNs) in semi-supervised node classification tasks. These datasets model academic papers as nodes and citations as edges, with node features derived from text and labels representing paper topics. Three widely used citation datasets are Cora, Citeseer, and PubMed, each offering distinct characteristics in terms of scale, sparsity, and feature dimensionality.
Cora Dataset
The Cora dataset consists of 2,708 machine learning papers categorized into 7 classes. Each paper is represented as a node, with 5,429 citation links forming directed edges. Node features are binary word vectors indicating the presence of 1,433 unique words from a dictionary. The graph exhibits a power-law degree distribution, with most nodes having few connections while a small number act as hubs. The dataset is typically split into 140 training nodes, 500 validation nodes, and 1,000 test nodes.
This extreme sparsity challenges GNNs to effectively propagate information across the graph while avoiding over-smoothing.
Citeseer Dataset
Citeseer contains 3,312 scientific publications classified into 6 categories, with 4,732 citation edges. The feature vectors span 3,703 dimensions, representing word occurrences from a larger vocabulary than Cora. Notably, Citeseer includes many isolated nodes (no citations) and about 12% of citation links are missing (only present in one direction). The standard split uses 120 nodes for training, 500 for validation, and 1,000 for testing.
PubMed Dataset
PubMed is significantly larger, comprising 19,717 medical research papers on diabetes from the PubMed database, grouped into 3 classes. With 44,338 citation edges, it offers a denser connectivity pattern (sparsity ≈ 0.9998) compared to Cora and Citeseer. Each node is represented by a TF-IDF weighted word vector of 500 dimensions, derived from the paper abstracts. The standard split allocates 60 nodes per class for training (180 total), with 500 validation and 1,000 test nodes.
Comparative Analysis
| Dataset | Nodes | Edges | Features | Classes | Avg. Degree |
|---|---|---|---|---|---|
| Cora | 2,708 | 5,429 | 1,433 | 7 | 2.00 |
| Citeseer | 3,312 | 4,732 | 3,703 | 6 | 1.43 |
| PubMed | 19,717 | 44,338 | 500 | 3 | 2.25 |
The varying properties of these datasets enable comprehensive evaluation of GNN architectures across different scenarios: Cora tests performance on small graphs with high feature dimensionality, Citeseer evaluates robustness to incomplete graph structures, and PubMed assesses scalability to larger networks.
Feature Engineering Considerations
For GNN training, the raw features often undergo preprocessing:
- Normalization: TF-IDF vectors in PubMed are L2-normalized
- Dimensionality Reduction: PCA is sometimes applied to Citeseer's high-dimensional features
- Feature Augmentation: Some approaches concatenate node degrees as additional features
The citation graphs are typically treated as undirected for GNN processing, with adjacency matrices normalized using the symmetric transformation:
where A is the adjacency matrix and D is the degree matrix. This normalization helps stabilize gradient propagation during training.
Dataset Characteristics and Preprocessing
Citation datasets such as Cora, PubMed, and CiteSeer are widely used benchmarks for evaluating Graph Neural Networks (GNNs). These datasets represent academic papers as nodes and citations as edges, forming directed or undirected graphs. Each node contains a feature vector (typically bag-of-words representations of the paper's abstract) and a label indicating its research topic.
Graph Structure and Feature Representation
The adjacency matrix A of a citation graph is sparse, with Aij = 1 if paper i cites paper j. For undirected graphs, A is symmetric. Node features are represented as a matrix X ∈ ℝn×d, where n is the number of nodes and d is the feature dimension. The label vector y ∈ ℤn contains class indices for each paper.
Common Citation Datasets
- Cora: 2,708 machine learning papers with 5,429 citations, 7 classes, and 1,433-dimensional binary word features.
- PubMed: 19,717 biomedical papers with 44,338 citations, 3 classes, and 500-dimensional TF-IDF features.
- CiteSeer: 3,312 computer science papers with 4,732 citations, 6 classes, and 3,703-dimensional word features.
Preprocessing Pipeline
Standard preprocessing steps include:
- Feature Normalization: Scale features to zero mean and unit variance or apply L2 normalization:
- Graph Normalization: Apply symmetric normalization to the adjacency matrix for better spectral properties:
where D is the degree matrix with Dii = ∑jAij.
- Train/Val/Test Splits: Standard splits use 20 nodes per class for training, 500 for validation, and 1,000 for testing, ensuring each split contains all classes.
Handling Class Imbalance
For datasets with uneven class distributions, apply class-weighted loss functions during training:
where w_c = 1/f_c and f_c is the frequency of class c.
Edge Sampling and Subgraph Extraction
For large graphs, use neighborhood sampling or random walk-based subgraph extraction to enable mini-batch training. The GraphSAGE approach samples a fixed-size neighborhood:
where d(u,v) is the shortest path distance between nodes u and v.

Node and Edge Features in Citation Graphs
Citation graphs represent scholarly articles as nodes and citations as directed edges. The feature representation of nodes and edges is critical for graph neural networks (GNNs) to capture semantic and structural patterns. Node features typically encode document content, while edge features may represent citation context or metadata.
Node Feature Engineering
In citation networks like Cora, PubMed, or CiteSeer, node features are commonly derived from:
- Bag-of-Words (BoW): Binary or TF-IDF weighted term vectors constructed from paper abstracts or titles.
- Embeddings: Pre-trained word vectors (e.g., Word2Vec, GloVe) averaged across document tokens.
- Graph-Aware Features: Centrality measures (degree, betweenness) or positional encodings (Laplacian eigenvectors).
where Xi is the feature vector for node i, Ek denotes word embeddings, and σ is a normalization function.
Edge Feature Representation
Edge features in citation graphs often encode:
- Directionality: Binary indicators for forward/backward citations.
- Temporal Context: Time delta between publication dates.
- Citation Importance: Weighted by section (e.g., introduction vs. related work).
For a citation from paper i to j, edge features may be constructed as:
where ⊕ denotes concatenation and Δtij is the publication year difference.
Heterogeneous Feature Integration
Advanced GNN architectures like Graph Attention Networks (GATs) dynamically reweight features during aggregation:
where W is a learnable weight matrix and a is an attention vector. This allows the model to focus on semantically relevant citations.

3. Data Splitting Strategies for Citation Graphs
Data Splitting Strategies for Citation Graphs
Citation graphs, such as Cora, PubMed, and CiteSeer, exhibit unique structural properties that necessitate specialized data splitting strategies. Unlike traditional tabular or image datasets, citation graphs contain interconnected nodes where edges represent citation relationships, introducing dependencies that complicate random splitting.
Challenges in Graph Data Splitting
Randomly splitting nodes into training, validation, and test sets risks data leakage due to message passing between connected nodes. If a test node is connected to a training node, the model may indirectly access test information during training, leading to overoptimistic performance estimates. This violates the fundamental assumption of independent and identically distributed (i.i.d.) data.
Common Splitting Strategies
Transductive Splitting
In transductive learning, all graph nodes are visible during training, but only a subset of labels are available. The standard split for Cora uses:
- 140 nodes (5.2%) for training
- 500 nodes (18.5%) for validation
- 1000 nodes (37.2%) for testing
This approach preserves the full graph structure while masking labels, allowing GNNs to leverage topological information without direct access to test labels.
Inductive Splitting
For inductive scenarios where the test graph may differ from the training graph, researchers employ:
- Time-based splitting: Nodes are split by publication date, simulating real-world chronological constraints
- Community detection: Clusters nodes by modularity before splitting to maintain community structure
Advanced Techniques
The disjoint split method enforces strict separation between splits:
- No edges connect training and test nodes
- 2-hop neighbors of test nodes are excluded from training
- Requires recomputing adjacency matrices for each split
For large-scale graphs, approximate splitting methods use graph partitioning algorithms like METIS to minimize inter-split edges while maintaining balance:
Practical Considerations
When implementing splits in PyTorch Geometric, the RandomNodeSplit transform provides basic functionality, while custom splitters should:
- Preserve class distribution across splits (stratification)
- Account for node degree distribution
- Handle directed/undirected and weighted edges appropriately
from torch_geometric.transforms import RandomNodeSplit
transform = RandomNodeSplit(
num_val=0.1,
num_test=0.2,
key='y'
)
dataset = dataset.transform(transform)
Recent work on distributionally robust splitting introduces adversarial validation techniques to identify and mitigate potential covariate shift between splits, particularly important for graphs evolving over time.

3.2 Loss Functions and Optimization
Training Graph Neural Networks (GNNs) on citation datasets requires carefully designed loss functions and optimization strategies to handle the semi-supervised nature of the task. The primary objective is to minimize prediction errors for node classification while leveraging the graph structure.
Cross-Entropy Loss for Node Classification
For multi-class node classification tasks, the standard loss function is the cross-entropy loss applied to the labeled nodes. Given a set of labeled nodes VL with ground truth labels yi and predicted class probabilities ŷi, the loss is computed as:
where C is the number of classes, and yi,c is a one-hot encoded vector. This formulation penalizes deviations between predicted probabilities and true labels.
Regularization and Graph-Based Loss Terms
To exploit the graph structure, additional regularization terms are often incorporated. A common approach is to enforce smoothness in the learned node representations by minimizing the graph Laplacian regularization term:
where H is the matrix of node embeddings, L is the graph Laplacian, and λ controls the regularization strength. This term encourages connected nodes to have similar embeddings.
Optimization Strategies
Stochastic Gradient Descent (SGD) or its variants (e.g., Adam) are typically used for optimization. However, GNNs pose unique challenges:
- Full-batch vs. mini-batch training: Full-batch training processes the entire graph at once but is memory-intensive. Mini-batch training samples subgraphs but requires careful handling of neighborhood aggregation.
- Learning rate scheduling: Adaptive learning rates (e.g., cosine annealing) help stabilize training, especially for deep GNNs.
- Gradient clipping: Prevents exploding gradients in deep architectures.
Handling Class Imbalance
Citation datasets often exhibit class imbalance. Techniques like weighted cross-entropy or focal loss can be applied:
where γ adjusts the rate at which easy examples are down-weighted.
Advanced Techniques: Contrastive Learning
Recent work incorporates contrastive loss to improve representation learning. For a node vi, positive samples are its neighbors, while negative samples are randomly selected nodes. The contrastive loss is:
where sim(·,·) measures cosine similarity, and τ is a temperature hyperparameter.
3.3 Handling Class Imbalance in Citation Data
Class imbalance is a pervasive issue in citation datasets, where certain paper categories may be significantly underrepresented compared to others. For instance, in the Cora dataset, the "Neural Networks" category might dominate, while "Genetic Algorithms" appears infrequently. This skew biases GNNs toward majority classes, degrading performance on minority classes. Addressing imbalance requires specialized techniques beyond standard cross-entropy loss.
Resampling Strategies
Resampling adjusts the training distribution by either oversampling minority classes or undersampling majority classes. For graph data, these methods must preserve topological structure:
- Node-level oversampling: Duplicates minority-class nodes and their local neighborhoods. The new nodes inherit edges based on a similarity metric:
where h denotes node embeddings and γ controls edge sharpness.
- Graph-aware undersampling: Removes majority-class nodes while maintaining connectivity via betweenness centrality:
Nodes with lowest centrality are pruned first to minimize disruption.
Loss Function Modifications
Reweighting schemes adjust the loss function to emphasize minority classes:
Common weighting strategies include:
- Inverse frequency: wc ∝ 1/nc
- Focal loss: Downweights well-classified examples via wc = (1 - pc)γ
For graph data, wc can incorporate node degree to account for structural importance:
Graph-Specific Approaches
Recent methods exploit graph topology for imbalance mitigation:
- TopoBalance: Generates synthetic minority nodes in sparsely connected regions using graph autoencoders.
- GraphSMOTE: Interpolates node features and constructs edges via k-NN in embedding space.
- ImGAGN: Adversarial generation of minority-class graphs with topology preservation.
These methods typically outperform classical resampling by 5-12% in macro-F1 on benchmarks like Cora and PubMed.
Evaluation Metrics
Accuracy becomes meaningless under imbalance. Preferred metrics include:
- Macro-F1: Unweighted mean of per-class F1 scores
- G-mean: Geometric mean of class-wise recall
- Class-Weighted Accuracy: 1/C ∑c wc · accuracyc
For citation graphs, the macro-F1 is particularly informative as it equally values all research topics regardless of prevalence.

4. Common Evaluation Metrics
4.1 Common Evaluation Metrics
Evaluating graph neural networks (GNNs) on citation datasets requires metrics that capture both node classification accuracy and the structural integrity of predictions. Unlike traditional machine learning tasks, GNNs must account for relational dependencies between nodes, necessitating specialized evaluation approaches.
Node Classification Metrics
For multi-class node classification tasks, standard supervised learning metrics apply, but with adaptations for graph-structured data:
- Accuracy: Measures the fraction of correctly classified nodes. While straightforward, it can be misleading in class-imbalanced datasets.
- F1 Score: The harmonic mean of precision and recall, particularly useful for imbalanced classes. The macro-averaged F1 is commonly reported for multi-class scenarios.
- ROC-AUC: Area under the receiver operating characteristic curve, which evaluates the model's ability to rank positive instances higher than negatives across all thresholds.
Edge Prediction Metrics
When evaluating link prediction or edge classification tasks, different metrics are employed:
- Average Precision (AP): Summarizes the precision-recall curve as a weighted mean of precisions at each threshold.
- Area Under Curve (AUC): Probability that a random positive edge receives a higher score than a random negative edge.
- Hit@k: Fraction of cases where a true edge appears in the top-k predicted edges.
Graph-Level Metrics
For tasks requiring graph-level predictions (e.g., graph classification), additional metrics are used:
- Graph Classification Accuracy: Simple ratio of correctly classified graphs.
- Mean Average Precision (mAP): Extension of AP to multi-class scenarios, averaging across classes.
- Normalized Mutual Information (NMI): Measures the quality of cluster assignments compared to ground truth.
Specialized GNN Metrics
Citation graph analysis often employs domain-specific evaluation approaches:
- Citation Prediction Accuracy: Measures how well the model predicts future citations in temporal citation networks.
- Rank Correlation Metrics: Kendall's τ or Spearman's ρ to evaluate ranking quality in citation recommendation tasks.
- Novelty Detection: Evaluates the model's ability to identify previously uncited but relevant papers.
When benchmarking GNNs on standard citation datasets like Cora, Citeseer, or PubMed, researchers typically report multiple metrics to provide a comprehensive performance assessment. The choice of metrics should align with the specific downstream application, whether it's academic search, recommendation systems, or knowledge graph completion.
Benchmarking Against Baselines
When evaluating Graph Neural Networks (GNNs) on citation datasets such as Cora, PubMed, or CiteSeer, rigorous benchmarking against established baselines is essential to validate performance improvements. Baselines typically include traditional machine learning methods, shallow graph embeddings, and simpler neural architectures.
Traditional Machine Learning Baselines
Classical approaches like logistic regression, support vector machines (SVMs), and random forests operate on hand-engineered features derived from the graph structure. For citation networks, common features include:
- Bag-of-words representations of node attributes
- Graph statistics (degree centrality, PageRank)
- Co-citation or bibliographic coupling measures
These methods serve as important sanity checks since they represent the performance achievable without leveraging graph structure or deep learning.
Shallow Graph Embedding Methods
Shallow embedding techniques like DeepWalk, node2vec, and LINE provide node representations by optimizing objective functions that preserve structural properties:
where f is the embedding function, σ is the sigmoid function, and Pn is the negative sampling distribution. These methods are computationally efficient but lack the ability to incorporate node features or learn task-specific representations.
Simple Neural Architectures
Multi-layer perceptrons (MLPs) applied directly to node features provide a crucial baseline for assessing whether graph structure actually improves performance. The MLP objective is:
where L is the number of layers and xv are the input features of node v. Comparing GNNs against MLPs reveals whether message passing provides meaningful gains over feature-only approaches.
Evaluation Metrics and Protocols
Standard evaluation practices for citation networks include:
- Fixed splits: Using the standard 20/30/50 train/val/test splits from Yang et al.
- Multiple runs: Reporting mean and standard deviation over 10+ random initializations
- Metrics: Accuracy for multi-class classification, often with macro-F1 for imbalanced cases
The table below shows typical baseline performance ranges on Cora:
| Method | Accuracy (%) | Training Time (s) |
|---|---|---|
| MLP | 55.3 ± 0.8 | 2.1 |
| node2vec + LR | 72.5 ± 0.6 | 12.4 |
| GCN | 81.5 ± 0.5 | 8.7 |
Advanced Considerations
For rigorous benchmarking, several subtle factors must be controlled:
- Feature preprocessing: Normalization of input features affects MLP and GNN performance differently
- Hyperparameter tuning: Equal tuning budgets must be allocated to all methods
- Graph perturbations: Testing robustness to noisy or missing edges
The PyTorch Geometric library provides standardized implementations of these baselines, ensuring fair comparisons through shared data loading and evaluation protocols.
Interpreting Model Predictions
Feature Attribution in GNNs
Understanding why a GNN makes specific predictions requires analyzing feature attribution. Unlike traditional models, GNNs propagate information through graph structures, making interpretation non-trivial. Feature attribution methods like GNNExplainer identify influential nodes and edges by optimizing a mask over the input graph:
where M is a learnable mask, G denotes element-wise multiplication, and I measures mutual information between the prediction Y and the masked graph. The L1 penalty encourages sparsity.
Attention Weights Analysis
For GNNs with attention mechanisms (e.g., GAT), the attention coefficients αij reveal how much node i attends to neighbor j. However, these weights alone don’t guarantee interpretability due to:
- Attention saturation: Over-smoothed attention distributions in deep layers.
- Non-linear interactions: Multi-head attention complicates aggregation.
To mitigate this, compute layer-wise relevance propagation (LRP) for attention-based GNNs:
where Ri(l) is the relevance score of node i at layer l.
Subgraph Explanations
Critical substructures often drive predictions. Techniques like PGExplainer train a parametric model to predict edge importance, generating a compact explanatory subgraph. The optimization objective is:
where CE is cross-entropy loss, KL regularizes the edge distribution, and β controls sparsity. This approach scales to large graphs by avoiding per-instance optimization.
Case Study: Citation Network
In Cora or PubMed datasets, interpreting a paper’s classification might reveal:
- Key references (high-attention neighbors) supporting the predicted topic.
- Unexpected edges (e.g., interdisciplinary citations) flagged by attribution methods.
For example, a GNN predicting a paper as "Neural Networks" might highlight citations to foundational works like Hochreiter & Schmidhuber (1997) via high attention weights or GNNExpliner masks.

5. Semi-Supervised Learning with GNNs
Semi-Supervised Learning with GNNs
Semi-supervised learning (SSL) is a critical paradigm for training graph neural networks (GNNs) on citation datasets, where labeled data is often scarce but unlabeled data is abundant. The core idea is to leverage the graph structure to propagate label information from a small set of annotated nodes to unlabeled ones, effectively combining supervised and unsupervised learning signals.
Graph-Based Label Propagation
The foundation of SSL in GNNs lies in the assumption of homophily—that connected nodes are likely to share similar labels. This enables algorithms to exploit the graph's adjacency matrix A to diffuse label information. The basic label propagation objective minimizes:
where yi are the predicted labels, ỹi are the ground-truth labels for labeled nodes ℒ, and μ controls the trade-off between consistency and supervision.
GNNs for Semi-Supervised Node Classification
Modern GNNs like GCN, GAT, and GraphSAGE implement SSL through message passing, where each node's representation is iteratively updated by aggregating features from its neighbors. For a 2-layer GCN, the forward pass is:
with  = D−½AD−½ being the normalized adjacency matrix. The loss combines supervised cross-entropy for labeled nodes and regularization via graph structure:
where L is the graph Laplacian and λ controls smoothness.
Practical Considerations
- Label efficiency: Performance plateaus with ~10-20% labeled data on Cora/Citeseer.
- Over-smoothing: Deep GNNs suffer from indistinguishable node representations.
- Heterophily: Assumptions break when connected nodes differ; methods like Geom-GCN address this.
Advanced Techniques
Recent work improves SSL for GNNs through:
- Self-training: Iteratively adding confident pseudo-labels (e.g., Co-training, M3S).
- Consistency regularization: Enforcing invariant predictions under perturbations (e.g., GraphVAT).
- Meta-learning: Optimizing for few-shot label efficiency (e.g., G-Meta).
For citation graphs, techniques like Planetoid and DGI jointly optimize supervised and self-supervised losses, achieving state-of-the-art with as few as 20 labels per class.

5.2 Scalability and Large-Scale Citation Graphs
Training Graph Neural Networks (GNNs) on large-scale citation graphs introduces computational challenges due to the inherent sparsity and high-dimensional nature of these networks. Traditional full-batch training methods, such as those used in Graph Convolutional Networks (GCNs), suffer from memory bottlenecks when applied to graphs with millions of nodes and edges. The adjacency matrix A ∈ ℝN×N for a graph with N nodes requires O(N²) memory, making it infeasible for large N.
Sampling Techniques for Scalable Training
To address this, several sampling strategies have been developed:
- Neighborhood Sampling: At each layer, only a fixed-size subset of a node's neighbors is sampled. For a k-layer GNN, this reduces the per-batch complexity from O(N) to O(b·dk), where b is the batch size and d is the sampling depth.
- GraphSAINT: A graph sampling-based inductive learning method that samples entire subgraphs for mini-batch training, ensuring unbiased estimation of the full-graph loss.
- Cluster-GCN: Partitions the graph into clusters using graph clustering algorithms (e.g., METIS) and trains on subgraphs induced by these clusters.
Efficient Message Passing with Sparse Operations
Message passing in GNNs can be optimized using sparse matrix operations. The aggregation step for node i in layer l is given by:
where W(l) is the learnable weight matrix and σ is a non-linearity. Sparse tensor libraries (e.g., PyTorch Sparse) exploit the sparsity of A to compute this efficiently.
Distributed Training Strategies
For graphs exceeding single-machine memory, distributed training frameworks like DGL-KE and Pytorch Geometric (PyG) leverage multi-GPU or multi-node setups. Key approaches include:
- Graph Partitioning: The graph is split across workers, with each handling a partition. Halo nodes (mirrors of boundary nodes) are maintained to ensure correct message passing.
- Parameter Server Architectures: Global model parameters are stored centrally, while workers compute gradients on local subgraphs.
Case Study: Training on the MAG240M Dataset
The Microsoft Academic Graph (MAG240M), with 240 million nodes and 1.8 billion edges, exemplifies large-scale challenges. Recent work (Hu et al., 2021) achieved scalability via:
- Historical Embeddings: Caching node embeddings from previous epochs to reduce redundant computation.
- CPU-GPU Hybrid Training: Offloading neighbor sampling to CPU while keeping forward/backward passes on GPU.
Optimizations like these improved throughput by 3× compared to vanilla sampling.
Trade-offs in Sampling Methods
Different sampling techniques introduce bias-variance trade-offs:
- Random Node Sampling: Low computation but high variance due to dropped edges.
- Random Walk Sampling: Preserves local structure but may under-represent distant nodes.
- Layer-Wise Sampling: Balances variance and computation by sampling per-layer neighborhoods.

5.3 Incorporating Node Attributes and Metadata
Node attributes and metadata provide rich contextual information beyond the graph structure, enhancing the representational power of graph neural networks (GNNs). In citation networks like Cora or PubMed, node features often include bag-of-words representations of paper abstracts, author affiliations, or publication years. These attributes can be integrated into GNNs through feature concatenation, attention mechanisms, or specialized aggregation functions.
Feature Concatenation in Message Passing
The most straightforward approach is concatenating node features with aggregated neighbor information during message passing. Given a node v with feature vector h_v and neighbor features {h_u | u ∈ N(v)}, the update rule becomes:
where c_{vu} is a normalization constant (often degree-based) and W^{(l)} is a learnable weight matrix. This preserves the original node information while incorporating neighborhood structure.
Attention-Based Feature Fusion
Graph attention networks (GATs) extend this by computing dynamic attention coefficients between nodes. The attention mechanism α_{vu} can incorporate both topological proximity and feature similarity:
where || denotes concatenation and a is a learnable attention vector. This allows the model to weigh node features differently based on their relevance.
Handling Heterogeneous Metadata
For multi-modal metadata (e.g., text, categorical, and temporal features), separate encoders can be used before fusion:
- Text attributes: Processed via transformer embeddings (e.g., BERT) or LSTMs
- Categorical features: Embedded through learned lookup tables
- Numerical features: Normalized and projected via dense layers
The final node representation combines these modalities through late fusion:
where g_{\theta} is a MLP with parameters θ. This approach is particularly effective for datasets like MAG (Microsoft Academic Graph), where papers have authors, venues, and citation contexts.
Positional Encodings for Structural Metadata
When node ordering or positional information matters (e.g., citation timestamps), sinusoidal positional encodings or learnable position embeddings can be added:
This is crucial for temporal GNNs where the citation order affects paper importance. Recent work like Graph-BERT shows that combining structural and positional encodings improves performance on tasks like citation prediction.
Practical Implementation Considerations
When implementing these techniques:
- Normalize features across modalities to prevent scale imbalances
- Use dropout on feature projections to prevent overfitting
- Employ residual connections when stacking multiple GNN layers to preserve original attributes
- For large graphs, use sampling techniques like GraphSAGE while maintaining attribute consistency
In PyTorch Geometric, this can be implemented by extending the MessagePassing class to handle custom feature concatenation:
class AttributeAwareGCN(MessagePassing):
def __init__(self, in_channels, out_channels):
super().__init__(aggr='add')
self.lin = Linear(in_channels, out_channels)
def forward(self, x, edge_index):
# x: [num_nodes, in_channels]
return self.propagate(edge_index, x=x)
def message(self, x_j):
return x_j
def update(self, aggr_out, x):
# Concatenate node features with aggregated messages
return torch.cat([x, aggr_out], dim=-1)

6. Key Research Papers on GNNs and Citation Data
6.1 Key Research Papers on GNNs and Citation Data
- PDF 1 Billion Citation Dataset and Deep Learning Citation Extraction - TCD — A significant challenge associated with citation parsing is the exis-tence of thousands of different citation styles [34] [25]. In formatting a citation string certain information may be removed or abbreviated depending on theparticular citation style. Table 1.2showsthe same citation formatted in Harvard and ACM styles. In the Harvard style
- Data citation and the citation graph Open Access - MIT Press — The citation graph, or citation network, is a model used to describe how citations link research entities, typically papers, journals, and books (Harzing & Van der Wal, 2008; Tang et al., 2008).It enables a number of important activities such as the following: Exploration of the graph to find publications of interest.. Tracking of authorship of papers: Citing and following citations is one way ...
- Ryan-PG/citation-network-gnn - GitHub — A project using Graph Neural Networks (GNNs) to classify nodes in the Cora citation network. Implements GCN and GraphSAGE models using PyTorch Geometric to classify academic papers based on citation relationships. Includes preprocessing, model training, evaluation, and visualizations. - Ryan-PG/citation-network-gnn
- GitHub - nishanth-cv/ResearchLens: GNNs for Node Classification and ... — Figure 1: ogbn-arxiv dataset training curves showing loss and accuracy over time. Left: Training loss progression from ~4.0 to ~1.4. Right: Training and validation accuracy comparison showing convergence around 60%. The training process demonstrated several key characteristics: Initial rapid loss descent from 4.0 to approximately 2.0 in first ...
- Unbiased evaluation of ranking metrics reveals consistent performance ... — To compare the ranking performance of network-based metrics, we use three citation datasets: the classical American Physical Society citation data, high-energy physics citation data, and the U.S. Patent Office citation data. Each dataset can be represented as a growing directed network where nodes gradually appear with time.
- Resolving Citation Links With Neural Networks - Frontiers — Data Sets. We created training data from three sources: (1) the "Development-Set-Apr8" dataset (henceforth, DSA2016) (Jaidka et al., 2016); (2) a pilot study corpus which was created as a part of the Text Analysis Conference (TAC2014), prior to DSA2016, and (3) the data made available for the shared task conference at BIRNDL2016 (hereafter ...
- Combining Web of Science and Scopus datasets in citation-based ... — Scientific research builds on previous studies and scientifically proven knowledge. Researchers must master the recent developments in the field when designing research to answer new questions. Today, the accessibility of research literature is abundant due to digitized publications, extensive coverage of citation indexes, and several literature databases. The means for conducting systematic ...
- Analysis and Visualization of Citation Networks - ResearchGate — Individual issues that are particularly important in citation network analysis are then scrutinized, namely: field delineation and data sources for citation analysis (Chapter 3); disambiguation of ...
- PDF Graph Neural Networks in Practice - McGill University — chapters, with the output of the GNNs replacing the shallow embeddings. 6.1.4 Pre-training GNNs Pre-training techniques have become standard practice in deep learning [Good-fellow et al., 2016]. In the case of GNNs, one might imagine that pre-training a GNN using one of the neighborhood reconstruction losses from Chapter 3
- Graph neural networks: A review of methods and applications — Graphs are a kind of data structure which models a set of objects (nodes) and their relationships (edges). Recently, researches on analyzing graphs with machine learning have been receiving more and more attention because of the great expressive power of graphs, i.e. graphs can be used as denotation of a large number of systems across various areas including social science (social networks (Wu ...
6.2 Open-Source Implementations and Libraries
- OpenCitations, an infrastructure organization for open scholarship ... — Abstract. OpenCitations is an infrastructure organization for open scholarship dedicated to the publication of open citation data as Linked Open Data using Semantic Web technologies, thereby providing a disruptive alternative to traditional proprietary citation indexes. Open citation data are valuable for bibliometric analysis, increasing the reproducibility of large-scale analyses by enabling ...
- PDF 1 Billion Citation Dataset and Deep Learning Citation Extraction — The dataset was created by adapting the citation styles within CSL, collecting citation metadata from CrossRef and using the open-source citation processor, citeproc-js. It contains 991,411,100 XML labelled citation strings in over 1,500 different citation styles.
- PDF GRL_Book - McGill University — 6.1.1 GNNs for Node Classification Node classification is one of the most popular benchmark tasks for GNNs. For instance, during the years 2017 to 2019—when GNN methods were beginning to gain prominence across machine learning—research on GNNs was dominated by the Cora, Citeseer, and Pubmed citation network benchmarks, which were popularized by Kipf and Welling [2016a]. These baselines ...
- CitGraph: Citation Network Analysis with GNN - GitHub — CitGraph employs Graph Neural Networks (GNNs) to analyze citation networks, specifically focusing on node classification tasks. Leveraging PyTorch Geometric and the Planetoid dataset, this project aims to classify nodes within citation graphs, offering insights into citation patterns and relationships.
- PDF Bibliobuild: a citation network visualisation and — tial component of any citation network, a source of citation data. It is followed by a review of the di erent database approaches of storing citat on data and a survey of the various means of visualising networks. Finally, to provide a more useful application by measuring the relevance or importance of papers in a network, the current ...
- GitHub - eric-sun92/Movie-Recommendation-System-Using-GNN: Movie ... — About Movie Recommendation System using Graph Neural Networks (GNNs), moving beyond traditional collaborative and content-based methods. Our approach involved a customized PinSage model and a novel Skip-Gram Graph Neural Network, utilizing rich data from MovieLens and IMDb to explore the multifaceted relationships between users and movies.
- Graph Neural Networks: Libraries, Tools, and Learning Resources - Neptune — Conclusion Over the past few years, GNNs have become powerful and practical tools for machine learning tasks in the graph domain. This article is just a simple overview of graph neural networks. We've summarised popular GNN libraries, and listed the best learning resources to ease your way into this boundless field.
- (PDF) FedGraphNN: A Federated Learning System and ... - ResearchGate — FedGraphNN is built on a unified formulation of federated GNNs and supports commonly used datasets, GNN models, FL algorithms, and flexible APIs. We also contribute a new molecular dataset, hERG ...
- Find Open Datasets and Machine Learning Projects | Kaggle — Download Open Datasets on 1000s of Projects + Share Projects on One Platform. Explore Popular Topics Like Government, Sports, Medicine, Fintech, Food, More. Flexible Data Ingestion.
- PyG Documentation — pytorch_geometric documentation — PyG Documentation PyG (PyTorch Geometric) is a library built upon PyTorch to easily write and train Graph Neural Networks (GNNs) for a wide range of applications related to structured data.
6.3 Recommended Books and Tutorials
- Citation recommendation: approaches and datasets | International ... — The basic concept of citing is depicted in Fig. 2.A citation is defined as a link between a citing document and a cited document at a specific location in the citing document. This location is called the citation marker (e.g., "[1]") and the text fragment which should be supported by the citation is called the citation context.During processing, the citation context can be transformed into ...
- Comprehensive Evaluation of GNN Training Systems: A Data Management ... — Many Graph Neural Network (GNN) training systems have emerged recently to support efficient GNN training. Since GNNs embody complex data dependencies between training samples, the training of GNNs should address distinct challenges different from DNN training in data management, such as data partitioning, batch preparation for mini-batch training, and data transferring between CPUs and GPUs ...
- PDF OUTRE: An OUT-of-core De-REdundancy GNN Training Framework for ... - VLDB — GNNs are considerably more scalable and ecient on large-scale graphs than GNNs that train on full neighborhoods. 2.2 Out-of-core Sampling-based GNN Training Stage Decomposition As the graphs used for GNN training grow larger [20, 27], using sampling-based GNNs has become the de facto standard for train-ing GNNs on large-scale graphs.
- MG-GCN: A Scalable multi-GPU GCN Training Framework - ACM Digital Library — DGCL is a distributed graph communication library for training GNNs on multiple ... (OGBN-Arxiv) and Cora are citation networks where each node represents a paper and directed ... 12.4 × faster on Products, and 1.77 × faster on Protein datasets than DistGNN's best performances. Note that, for Reddit dataset, since the GCN model is very small ...
- APA Citation Style, 7th Edition: Datasets, Software, & Tests — In-Text Citation (Paraphrase): (Borenstein, et al., 2014). Note: It's important to understand that common software and mobile apps that are are used to create a paper (like Microsoft Word, etc..) or mentioned in the document do not need to be citations. However, if you have paraphrased or quoted information directly FROM a software program ...
- A Practical Tutorial on Graph Neural Networks - ACM Digital Library — GNN papers Main sections Description; This work: Recurrent GNNs, Convolutional GNNs, Graph Autoencoders & Graph Adversarial Methods: A tutorial paper that steps through the operations of key GNN technologies in an explanatory and diagrammatic manner. Worked examples have been created to supplement explanations and are provided as code and in-text.
- PyG Documentation — pytorch_geometric documentation - Read the Docs — PyG Documentation . PyG (PyTorch Geometric) is a library built upon PyTorch to easily write and train Graph Neural Networks (GNNs) for a wide range of applications related to structured data.. It consists of various methods for deep learning on graphs and other irregular structures, also known as geometric deep learning, from a variety of published papers.
- When to Pre-Train Graph Neural Networks? From Data Generation ... — GNNs are usually trained in an end-to-end manner while getting enough labeled data is arduously expensive and sometimes even impractical to access. This motivates some recent advances in pre-training GNNs [14, 15, 23, 30]. The key insight of pre-training GNNs is to learn transferable knowledge from a collection of unlabeled graph data, hoping ...
- A Comprehensive Introduction to Graph Neural Networks (GNNs) — GNNs are used in predicting nodes, edges, and graph-based tasks. CNNs are used for image classification. Similarly, GNNs are applied to graph structure (grid of pixels) to predict a class. Recurrence Neural Networks are used in text classification. Similarly, GNNs are applied to graph structures where every word is a node in a sentence.
- A Practical Tutorial on Graph Neural Networks - arXiv.org — datasets (across varying application domains). Numerous resources (e.g. open source code, datasets, etc.) are linked in a structured way. Computing graph neural networks: A survey from algorithms to accelerators [1] GNN fundamentals, modeling, applications, complexity, algorithms, aceclerators & data flows A review of the field of GNNs is presented








