Compositional Network Embedding

Tianshu Lyu, Fei Sun, Peng Jiang, Wenwu Ou, Yan ZhangarXiv 2019

Abstract

Network embedding has proved extremely useful in a variety of network analysis tasks such as node classification, link prediction, and network visualization. Almost all the existing network embedding methods learn to map the node IDs to their corresponding node embeddings. This design principle, however, hinders the existing methods from being applied in real cases. Node ID is not generalizable and, thus, the existing methods have to pay great effort in cold-start problem. The heterogeneous network usually requires extra work to encode node types, as node type is not able to be identified by node ID. Node ID carries rare information, resulting in the criticism that the existing methods are not robust to noise. To address this issue, we introduce Compositional Network Embedding, a general inductive network representation learning framework that generates node embeddings by combining node features based on the principle of compositionally. Instead of directly optimizing an embedding lookup based on arbitrary node IDs, we learn a composition function that infers node embeddings by combining the corresponding node attribute embeddings through a graph-based loss. For evaluation, we conduct the experiments on link prediction under four different settings. The results verified the effectiveness and generalization ability of compositional network embeddings, especially on unseen nodes.

Introduction

Traditional network embedding techniques, such as DeepWalk or node2vec, are primarily transductive. They rely on learning a unique lookup table for specific node IDs. While effective in static environments, this approach faces significant challenges in real-world applications:

  1. Cold-Start Problem: New nodes without pre-learned ID embeddings cannot be represented.
  2. Heterogeneity: Node IDs lack inherent type information, complicating the modeling of networks with diverse node types (e.g., users and products).
  3. Robustness: Arbitrary node IDs offer no internal features to mitigate noise in graph topology.

While inductive methods like GraphSAGE aggregate neighbor features, they still struggle with isolated nodes. Compositional Network Embedding (CNE) addresses these limitations by shifting the focus from node IDs to node attributes.

The CNE Framework

CNE is inspired by the linguistic principle of compositionality, where the meaning of a complex expression is derived from its constituents. Instead of a lookup table, CNE employs a composition function ($\phi$) to transform a node's internal attributes (e.g., text, images) into a latent vector.

The Compositional Network Embedding (CNE) framework architecture.

The model utilizes a Siamese training framework with a graph-based loss. For a node $v$ and its neighbor $u$, the framework maximizes the similarity between their composed embeddings while minimizing similarity to a randomly sampled negative node $\bar{u}$. A max-margin (hinge) loss is employed to enforce a distinct separation between positive and negative pairs in the embedding space. This architecture is flexible, allowing for different encoders (e.g., GRUs for text, CNNs for images) tailored to specific node types.

Experimental Setup

Evaluation was conducted using the Amazon Baby category dataset, comprising metadata for over 71,000 items. The researchers constructed three network types:

  • Homogeneous: Based on "co-view" relations.
  • Multi-edge: Combining "co-view" and "buy-after-view" relations.
  • Multi-node: A heterogeneous network of users and items from session records.

CNE was benchmarked against strong baselines, including DeepWalk, CANE, TriDNR, and GraphSAGE.

Performance Evaluation

CNE consistently outperformed all baselines in link prediction tasks. In homogeneous networks, CNE achieved a Recall@100 of 0.547 at a 10% training ratio, significantly higher than CANE's 0.473.

Link prediction performance (Recall@k) on homogeneous networks across different training ratios.

A key strength of CNE is its performance on unseen nodes. For nodes entirely absent during training, CNE achieved a Precision@10 between 0.034 and 0.042, a task where ID-based methods like DeepWalk and CANE fail entirely. Qualitatively, CNE demonstrated superior semantic capture, grouping related concepts like "large size" and "plus size" more effectively than methods relying on exact keyword matches.

Discussion and Key Insights

  • Attribute-Centric Representation: By defining nodes through their own attributes rather than their neighborhood (as in GraphSAGE), CNE enables high-quality embeddings for isolated nodes, provided they have associated metadata.
  • Implicit Regularization: Sharing attribute embeddings (e.g., word vectors) across the network forces the model to learn generalizable mappings, enhancing robustness against noisy edges.
  • Multi-task Synergy: In multi-edge scenarios, CNE can leverage dense relation types to guide learning for sparser, more difficult relations.

Conclusion and Future Work

Compositional Network Embedding offers a robust, inductive alternative to traditional ID-based embedding methods. While currently focused on text attributes via GRUs, future work includes integrating multi-modal data (images and categorical features) and exploring the integration of neighborhood attributes to further enhance performance. Additionally, improving the interpretability of how specific attributes contribute to final embeddings remains a priority.

Summary updated

BibTeX
@misc{lyu2019compositional,
  author = {Tianshu Lyu and Fei Sun and Peng Jiang and Wenwu Ou and Yan Zhang},
  title = {{Compositional Network Embedding}},
  year = {2019},
  eprint = {1904.08157},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.08157},
}
Figure