Discrete Network Embedding

Xiaobo Shen, Shirui Pan, Weiwei Liu, Yew-Soon Ong, Quan-Sen Sun

Abstract

Most network embedding methods represent nodes as high-dimensional continuous vectors, which are memory-intensive and computationally expensive for large-scale graphs. This paper introduces Discrete Network Embedding (DNE), a framework that learns compact binary codes for nodes and jointly optimizes them with a discrete classifier. By leveraging bitwise operations and joint learning, DNE slashes storage and computation costs by up to two orders of magnitude while maintaining competitive accuracy compared to state-of-the-art continuous methods.

Introduction

Network embedding maps nodes in a graph—such as users in a social network or papers in a citation index—into a low-dimensional space to facilitate downstream machine learning tasks. Traditionally, these embeddings are "continuous," consisting of floating-point vectors. However, as networks scale to millions or billions of nodes, continuous embeddings face a "scalability wall." Storing real-valued vectors requires massive RAM, and performing classification involves heavy floating-point arithmetic.

Furthermore, many existing workflows employ a two-stage process where embedding and classification are trained separately. This can lead to representations that are not optimally tuned for the final task. DNE addresses these challenges by learning discrete binary codes in a unified, task-aware framework.

The Discrete Network Embedding Framework

The DNE framework shifts from floating-point vectors to short strings of bits (binary codes) for node representation. This transition allows for significant optimizations in both storage and processing.

Key Components

  • Discrete Matrix Factorization: DNE approximates the similarity matrix of a network using the inner product of binary codes. The framework utilizes Hamming similarity, which is mathematically sound for approximating ground-truth node proximity.
  • Joint Learning: Unlike two-stage methods, DNE learns binary embeddings and a discrete multi-class classifier simultaneously. This ensures the learned bits are discriminative, capturing both graph structure and category-specific features.
  • Discrete Classifier in Hamming Space: The classifier weights are also binary, allowing classification to occur in Hamming space. This enables the use of lightning-fast bitwise operations (like XOR and popcount) instead of expensive matrix multiplications.
  • Optimization: To handle the NP-hard nature of binary optimization, the authors developed a tractable alternating algorithm using a proximal gradient method to iteratively update embeddings and classifier weights.

Experimental Evaluation

The researchers evaluated DNE on three benchmarks: DBLP (citation network, 60k nodes), YouTube (social network, 1.1M nodes), and Flickr (photo-sharing network, 80k nodes). The focus was on multi-class node classification performance across varying ratios of labeled training data.

Classification accuracy of DNE compared to baseline methods across DBLP, YouTube, and Flickr datasets.

Key Results

  • Storage Efficiency: DNE reduced the memory footprint by 64x compared to DeepWalk. For the DBLP dataset, the model size dropped from 17.3 MB to just 276 KB.
  • Computational Speed: Training DNE on DBLP was 46x faster than DeepWalk and 116x faster than MMDW. Inference time was approximately 2x faster due to Hamming space operations.
  • Competitive Accuracy: Despite the massive compression, DNE achieved classification accuracy comparable to, and sometimes exceeding, continuous methods like Node2Vec and LINE, particularly as the percentage of labeled nodes increased.

Conclusion

DNE demonstrates that discrete binary codes can replace continuous vectors in network embedding without sacrificing significant accuracy. By enforcing bit-uncorrelated and bit-balanced constraints, the model maximizes information density. While the current implementation uses a linear loss function and focuses on multi-class tasks, future work may extend the framework to more complex loss functions and multi-label scenarios to further enhance its versatility in large-scale graph analytics.

Summary updated

BibTeX
@inproceedings{shen2018discrete,
  author = {Xiaobo Shen and Shirui Pan and Weiwei Liu and Yew-Soon Ong and Quan-Sen Sun},
  title = {{Discrete Network Embedding}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/493},
}
Figure