Abstract
Network embedding aims to learn a latent, low-dimensional vector representations of network nodes, effective in supporting various network analytic tasks. While prior arts on network embedding focus primarily on preserving network topology structure to learn node representations, recently proposed attributed network embedding algorithms attempt to integrate rich node content information with network topological structure for enhancing the quality of network embedding. In reality, networks often have sparse content, incomplete node attributes, as well as the discrepancy between node attribute feature space and network structure space, which severely deteriorates the performance of existing methods. In this paper, we propose a unified framework for attributed network embedding—attri2vec—that learns node embeddings by discovering a latent node attribute subspace via a network structure guided transformation performed on the original attribute space. The resultant latent subspace can respect network structure in a more consistent way towards learning high-quality node representations. We investigate a series of linear and non-linear transformations performed on node attributes and empirically validate their effectiveness on various types of networks. Another advantage of attri2vec is its ability to solve out-of-sample problems, where embeddings of new coming nodes can be inferred from their node attributes through the learned mapping function. Experiments on various types of networks confirm that attri2vec is superior to state-of-the-art baselines for node classification, node clustering, as well as out-of-sample link prediction tasks.
Introduction
In graph analytics, network embedding transforms nodes into low-dimensional vectors to facilitate downstream tasks like classification and link prediction. Traditional methods like DeepWalk or node2vec focus exclusively on topology. However, real-world nodes often possess rich attributes (e.g., text in papers, user profiles). Integrating these attributes is challenging due to two primary factors:
- Sparsity and Incompleteness: Real-world networks often feature nodes with sparse connections or missing attribute data.
- Space Discrepancy: The "attribute space" and "structure space" frequently lack alignment. For instance, Canonical Correlation Analysis (CCA) on a Flickr dataset reveals a correlation of only 0.525 between these spaces. Forcing these disparate spaces together can degrade embedding quality.
The attri2vec Framework
To address these challenges, we propose attri2vec, a framework that shifts the focus from learning individual node representations to learning an attribute transformation function.
Core Mechanism
Instead of a simple lookup table for node embeddings, attri2vec defines the embedding of node $v_i$ as a function of its attributes $x_i$: $$\Phi(v_i) = f(x_i)$$ The network structure, captured via random walks, acts as a supervisor. The model is trained to ensure that nodes appearing in the same random walk context have transformed attribute vectors that are close in the latent subspace.
Transformation Functions
We investigated several mapping functions $f(\cdot)$:
- Linear: Matrix multiplication.
- ReLU: Non-linear rectified linear unit.
- Approximated Kernel: Random Fourier features to mimic high-dimensional kernel spaces.
- Sigmoid: Non-linear mapping squashing values between 0 and 1.
The system is optimized using Stochastic Gradient Descent (SGD) with negative sampling, maintaining linear complexity relative to the number of nodes.
Experimental Evaluation
We evaluated attri2vec on five real-world networks: Citeseer, DBLP, PubMed, Facebook, and Flickr.
Key Results
- Superior Performance: attri2vec consistently outperformed state-of-the-art baselines like TADW and SNE in node classification and clustering.
- Robustness to Sparsity: On Citeseer, performance remained stable even after removing 70% of attribute dimensions, whereas traditional methods degraded significantly.
- Out-of-Sample Success: For new nodes in DBLP,
attri2vec-sigmoidachieved AUC values up to 91.7% in link prediction, demonstrating its inductive capability.
Conclusion
Attri2vec provides a robust solution for attributed network embedding by discovering a structure-aware attribute subspace. By learning a mapping function rather than static vectors, it handles sparse data effectively and naturally supports out-of-sample nodes. While it requires node attributes to function, its ability to bridge the gap between content and structure makes it a powerful tool for modern graph analytics.
Source code available at: https://github.com/daokunzhang/attri2vec
Summary updated