- The paper introduces GravityGraphSAGE, a novel method adapting GraphSAGE for directed link prediction with a gravity-inspired decoder to preserve asymmetry.
- It employs sampling-based message passing with ELU activations and a log-difference scoring mechanism to integrate node attributes efficiently.
- Experimental results on citation and real-world datasets show state-of-the-art AUC and AP scores, particularly excelling in large, dense graphs.
GravityGraphSAGE: Directed Link Prediction in Attributed Graphs
Background and Motivation
Link prediction is a central task in graph analytics, underpinning applications in domains such as biology, recommender systems, finance, and cybersecurity. Standard algorithms typically rely on node similarity indices and have limited expressiveness in the context of directed, attributed graphs. Recent advances in Graph Deep Learning (GDL)—including Graph Neural Networks (GNNs) such as GCN, GAT, and GraphSAGE—substantially improve upon traditional methods, but most are restricted to undirected graphs or neglect node attributes. Directed link prediction requires architectural innovations in both node representation and decoding mechanisms, demanding both scalability and asymmetry preservation.
Model Architecture: GravityGraphSAGE
GravityGraphSAGE (GG-SAGE) is introduced as the first adaptation of the GraphSAGE backbone for directed link prediction, combining node attribute handling with a gravity-inspired decoder.
GG-SAGE incorporates:
- Sampling-Based Message Passing: As in GraphSAGE, neighborhood sampling is used to aggregate node attributes, supporting inductive generalization and efficient scalability. The average aggregator and bias terms are employed to mitigate oversmoothing and to align learned embeddings with Euclidean geometry.
- Activation Function Choice: ELU is used in the final layer to enable negative activations, promoting both faster convergence and the capacity to model repulsive node interactions.
- Gravity-Inspired Decoder: The decoder draws inspiration from Newtonian gravity, representing each node embedding as a tuple (hˉu,log(Gmu)), where hˉu is the position and mu the mass. Directed link likelihood is computed via a log-difference formula:
Auv=σ(log(Gmv)−log∥hu−hv∥2)
This approach introduces asymmetry with only one extra parameter per node, avoiding the parameter overhead of source-target embedding approaches.
Figure 1: GG-SAGE schematic illustrating GraphSAGE sampling, ELU activations, and gravity-based decoding for directed link prediction.
Experimental Evaluation
GG-SAGE was benchmarked on standard citation datasets (Cora, Citeseer, PubMed) and 16 real-world, directed, attributed graphs from the Netzschleuder repository. Comparisons included Gravity GAE/VGAE, Source/Target GAE/VGAE, LightDiC, and D-HYPR, using consistent architectural and training settings.
Evaluation employed 5-fold resampled cross-validation, with test and validation splits constructed via random removal and negative sampling. Metrics reported are AUC and AP.
The results demonstrate that GG-SAGE matches or surpasses competitor models in nearly all settings, especially excelling in large graphs. On the Cora, Citeseer, and PubMed datasets, GG-SAGE achieves the highest mean AUC and AP scores, showing robust generalization across diverse topologies and feature sets.
Figure 2: AUC scores for GG-SAGE and competing models across selected Netzschleuder datasets; GG-SAGE leads or is statistically indistinguishable from best models on most datasets.
Figure 3: AP scores for GG-SAGE and competitors over Netzschleuder datasets; GG-SAGE consistently ranks among top performers, especially in large-scale graphs.
Scalability and Ablation Analysis
Ablation analysis using Random Forest Regression reveals that GG-SAGE's performance is primarily governed by edge density, displaying substantial robustness with respect to high-dimensional node features. For large, densely connected graphs, GG-SAGE achieves significant performance gains, saturating at high edge counts, while other models show feature-driven improvements.
Figure 4: Partial dependence of GG-SAGE performance (AUC/AP) on the number of nodes; GG-SAGE maintains accuracy in large graphs, outperforming source-target methods as node count increases.
Figure 5: GG-SAGE performance as a function of edge count; predictive power rises sharply with graph density, saturating with abundant connectivity.
Figure 6: Partial dependence on the number of node features; GG-SAGE exhibits feature-insensitivity, while other models' accuracy increases with richer attributes.
This edge-dominated response positions GG-SAGE as particularly suited to scenarios where graph structure is informative and node features may be sparse or noisy.
Practical and Theoretical Implications
GG-SAGE advances directed link prediction by integrating scalable sampling, attribute handling, and an efficient asymmetry-preserving decoder. Its architectural choices enable practical deployment on large graphs, making it relevant for operational systems in domains with vast relational data (e.g., social networks, transaction graphs). The theoretical emphasis on gravitational decoding aligns with recent trends toward geometric deep learning, suggesting further exploration of physically-inspired decoders for complex relational inference.
The observed performance highlights the efficacy of combining inductive generalization and asymmetric decoding for directed prediction tasks. Conversely, hierarchical networks (such as food webs and academic flow graphs) sometimes favor competitor models, indicating potential for hybrid or ensemble techniques.
Future Directions
Several avenues warrant further investigation:
- Analyzing why hierarchical networks favor source-target or Laplacian-based models, to dynamically select architecture based on graph properties.
- Exploring the impact of negative sampling strategies on generalization and robustness in directed link prediction.
- Integrating GG-SAGE with more elaborate pipelines for downstream tasks, such as dynamic graph forecasting or causal inference.
Conclusion
GravityGraphSAGE defines a new paradigm for directed link prediction in attributed graphs, leveraging the inductive power of GraphSAGE and a gravity-based decoder for efficient, asymmetric score computation. Empirical results corroborate its superiority across standard and real-world datasets, with unique scalability in large, densely connected graphs. Theoretical insights and ablation findings suggest GG-SAGE is especially robust in topology-driven tasks, with practical utility for large-scale deployment and future adoption in composite graph learning systems.
(2605.09408)