Abstract
Shallow graph embeddings like node2vec (N2V) are highly effective at capturing structural information within networks but are inherently transductive, meaning they cannot generate representations for nodes not present during training. This paper introduces iN2V, a simple yet effective post-hoc method and training framework that extends transductive embeddings to the inductive setting. By employing an iterative neighborhood averaging scheme that updates both new and existing node embeddings, iN2V significantly improves node classification performance and acts as a powerful structural feature generator for Graph Neural Networks (GNNs) and Multi-Layer Perceptrons (MLPs).
Introduction
Graph Neural Networks (GNNs) have become the standard for node-level predictions, but their performance is heavily dependent on the quality of available node features. In many real-world scenarios, graphs are incomplete: features may be missing, or the graph may grow dynamically as new nodes (e.g., new users or documents) are added.
Structural embedding methods like node2vec (N2V) offer a solution by learning representations based on local topology via random walks. However, N2V is strictly transductive; it maps specific node IDs to vectors. When a new node appears, the model has no mechanism to generate an embedding for it without retraining the entire graph. While techniques like Feature Propagation (FP) attempt to diffuse existing features to new nodes, they often keep the original embeddings fixed, leading to rigid and potentially inaccurate representations in dynamic environments.
Methodology
The authors propose iN2V (inductive node2vec), which bridges the gap between transductive training and inductive inference through a two-pronged approach.
1. Post-Hoc Inductive Extension
During the inference phase, iN2V handles unseen test nodes by iteratively assigning them the average embedding of their immediate neighbors. A critical innovation in iN2V is that it does not treat the training embeddings as static. Instead, it updates the embeddings of the original training nodes using a convex combination of their current state and their neighbors' mean. This flexibility allows the latent space to adapt as new nodes bridge previously disconnected components, resulting in a smoother and more representative embedding manifold.
2. Inductive-Aware Training
To ensure that the initial N2V embeddings are optimized for the neighborhood averaging process, the authors introduce two training modifications:
- Loss-based Regularization: A new loss term is added to pull a node’s embedding closer to its neighborhood mean. To prevent the "collapse" of all embeddings into a single point, a diversity term is included to maintain separation between individual neighbors.
- Sampling-based Simulation: During the training phase, the model occasionally replaces a node's actual feature with its neighborhood mean, effectively simulating the conditions it will encounter during inductive inference.
Experimental Evaluation
The effectiveness of iN2V was tested across a variety of benchmark datasets, categorized by their structural properties:
- Homophilic Graphs: Cora, CiteSeer, PubMed, Computers, Photo, and WikiCS. In these graphs, connected nodes typically share the same labels.
- Heterophilic Graphs: Actor, Amazon-ratings, and Roman-empire. In these graphs, edges often connect nodes of different classes.
Key Results and Insights
- Performance Gains: iN2V consistently outperformed standard Feature Propagation by an average of 1 percentage point, with gains reaching up to 6 points in specific inductive scenarios.
- Structural Power: In low-data regimes (e.g., using only 10% of the graph for training), iN2V embeddings proved more informative than the original raw features on datasets like Cora and Computers. Furthermore, when iN2V embeddings were concatenated with raw features, model performance increased by approximately 10 points compared to using structural embeddings alone.
- MLPs vs. GNNs: A significant finding was that an MLP equipped with iN2V structural features can match or exceed the performance of complex message-passing GNNs. This suggests that when structural information is explicitly encoded into the features, the architectural complexity of the classifier becomes less critical.
- The Homophily Constraint: The study confirmed that iN2V, like the original N2V, relies on the assumption of homophily. On highly heterophilic datasets like Actor, the method struggles because the local neighborhood structure does not correlate strongly with node labels.
Conclusion and Future Work
iN2V provides a lightweight and effective way to make transductive structural embeddings usable in real-world, inductive graph applications. By allowing training nodes to shift during the inference process, it creates a more fluid and accurate representation of the evolving graph.
Future research directions include applying this averaging framework to embedding methods designed for heterophily (such as struc2vec) and extending the logic to Knowledge Graphs by incorporating relational embeddings into the neighborhood update step.
Summary updated