HNECV: Heterogeneous Network Embedding via Cloud model and Variational inference

This repository provides a reference implementation of HNECV as described in the paper:

HNECV: Heterogeneous Network Embedding via Cloud model and Variational inference.
Ming Yuan, LiuQun, Guoyin Wang, Yike Guo.
CAAI International Conference on Artificial Intelligence. 2021.

The paper has been accepted by CICAI, available at here.


The processed data used in the paper are available at:

You need to perform the following steps for the downloaded file:

  • Move SingleDBLP.mat to the HNECV/dataset/DBLP/
  • Move SingleAminer.mat to the HNECV/dataset/AMiner/
  • Move SingleYelp.mat to the HNECV/dataset/Yelp/

Basic Usage

If you only want to train the model, you need to specify a certain data set, such as dblp, aminer, yelp

python --dataset dblp

If you want to understand all the processes of the model, you can execute the following command

python --dataset dblp

noted: You can adjust the hyperparameters in or according to your needs


  • Python ≥ 3.6
  • PyTorch ≥ 1.7.1
  • scipy ≥ 1.5.2
  • scikit-learn ≥ 0.21.3
  • tqdm ≥ 4.31.1
  • numpy
  • pandas
  • matplotlib

How to use your own data set

Your input file must be a adjacency matrix, which can be a mat file or other compressed format

If you only have the edgelist file, you need to follow the preprocessing method in, and rewrite the corresponding semantic random walk code.

noted: If you run directly, You need at least the label file of the node, like the initial file in the dataset/DBLP/reindex_dblp/ folder


If HNECV is useful for your research, please cite the following paper:

  title={HNECV: Heterogeneous Network Embedding via Cloud model and Variational inference},
  author={Ming Yuan, Qun Liu, Guoyin Wang, Yike Guo},
  booktitle={CAAI International Conference on Artificial Intelligence},