All Projects → houchengbin → OpenANE

houchengbin / OpenANE

Licence: MIT license
OpenANE: the first Open source framework specialized in Attributed Network Embedding. The related paper was accepted by Neurocomputing. https://doi.org/10.1016/j.neucom.2020.05.080

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to OpenANE

FSCNMF
An implementation of "Fusing Structure and Content via Non-negative Matrix Factorization for Embedding Information Networks".
Stars: ✭ 16 (-58.97%)
Mutual labels:  embedding, network-embedding, graph-embedding
resolutions-2019
A list of data mining and machine learning papers that I implemented in 2019.
Stars: ✭ 19 (-51.28%)
Mutual labels:  network-embedding, graph-embedding
GNE
This repository contains the tensorflow implementation of "GNE: A deep learning framework for gene network inference by aggregating biological information"
Stars: ✭ 27 (-30.77%)
Mutual labels:  network-embedding, network-representation-learning
FEATHER
The reference implementation of FEATHER from the CIKM '20 paper "Characteristic Functions on Graphs: Birds of a Feather, from Statistical Descriptors to Parametric Models".
Stars: ✭ 34 (-12.82%)
Mutual labels:  network-embedding, graph-embedding
walklets
A lightweight implementation of Walklets from "Don't Walk Skip! Online Learning of Multi-scale Network Embeddings" (ASONAM 2017).
Stars: ✭ 94 (+141.03%)
Mutual labels:  embedding, graph-embedding
NetEmb-Datasets
A collection of real-world networks/graphs for Network Embedding
Stars: ✭ 18 (-53.85%)
Mutual labels:  network-embedding, attributed-networks
TriDNR
Tri-Party Deep Network Representation, IJCAI-16
Stars: ✭ 72 (+84.62%)
Mutual labels:  network-embedding, graph-embedding
Awesome Graph Classification
A collection of important graph embedding, classification and representation learning papers with implementations.
Stars: ✭ 4,309 (+10948.72%)
Mutual labels:  network-embedding, graph-embedding
Euler
A distributed graph deep learning framework.
Stars: ✭ 2,701 (+6825.64%)
Mutual labels:  network-embedding, graph-embedding
RolX
An alternative implementation of Recursive Feature and Role Extraction (KDD11 & KDD12)
Stars: ✭ 52 (+33.33%)
Mutual labels:  embedding, graph-embedding
pymde
Minimum-distortion embedding with PyTorch
Stars: ✭ 420 (+976.92%)
Mutual labels:  embedding, graph-embedding
The-5zig-Mod
All-in-one modification for Minecraft 1.8.9-1.15.2
Stars: ✭ 105 (+169.23%)
Mutual labels:  all-in-one
Cool-NLPCV
Some Cool NLP and CV Repositories and Solutions (收集NLP中常见任务的开源解决方案、数据集、工具、学习资料等)
Stars: ✭ 143 (+266.67%)
Mutual labels:  embedding
mandrake
Mandrake 🌿/👨‍🔬🦆 – Fast visualisation of the population structure of pathogens using Stochastic Cluster Embedding
Stars: ✭ 29 (-25.64%)
Mutual labels:  embedding
AmniXTension
A Kotlin extensions + Utils library with Bunch of Help
Stars: ✭ 34 (-12.82%)
Mutual labels:  all-in-one
DREML
PyTorch implementation of Deep Randomized Ensembles for Metric Learning(ECCV2018)
Stars: ✭ 67 (+71.79%)
Mutual labels:  embedding
hack-tools
"Кали-заменитель". Располагает в себе большое количество утилит для взлома.
Stars: ✭ 39 (+0%)
Mutual labels:  all-in-one
rottenjs
An all-in-one (2.6kb) Javascript library for web development
Stars: ✭ 15 (-61.54%)
Mutual labels:  all-in-one
jd scripts
停更
Stars: ✭ 57 (+46.15%)
Mutual labels:  all-in-one
MixGCF
MixGCF: An Improved Training Method for Graph Neural Network-based Recommender Systems, KDD2021
Stars: ✭ 73 (+87.18%)
Mutual labels:  network-embedding

OpenANE: the first Open source framework specialized in Attributed Network Embedding (ANE)

We reproduce several ANE (Attributed Network Embedding) methods as well as PNE (Pure Network Embedding) methods in one unified framework, where they all share the same I/O, downstream tasks, etc. We start this project based on OpenNE which mainly integrates PNE methods in one unified framework.
OpenANE not only integrates those PNE methods that consider pure structural information, but also provides the state-of-the-art ANE methods that consider both structural and attribute information during embedding.

Authors: Chengbin HOU [email protected] & Zeyu DONG [email protected] 2018

Motivation

In many real-world scenarios, a network often comes with node attributes such as paper metadata in a citation network, user profiles in a social network, and even node degrees in any plain networks. Unfortunately, PNE methods cannot make use of attribute information that may further improve the quality of node embeddings.
From engineering perspective, by offering more APIs to handle attribute information in graph.py and utils.py, OpenANE shall be easy to use for embedding an attributed network. Except attributed networks, OpenANE can also deal with plain networks by calling PNE methods, or by assigning node degrees as node attributes and then calling ANE methods. Therefore, to some extent, ANE methods can be regarded as the generalization of PNE methods.

Methods

ANE methods: ABRW (our method), ASNE, AANE, SAGE-Mean, SAGE-GCN, TADW, AttrComb, AttrPure
PNE methods: DeepWalk, Node2Vec, LINE, GraRep, others
All methods in this framework are unsupervised, and so do not require any label during embedding phase.

For more details of each method, please have a look at our paper or preprint via ResearchGate link. And if you find ABRW (namely RoSANE in the paper) or this frameworkis useful for your research, please consider citing it.

@article{hou2020RoSANE,
  title={RoSANE: Robust and Scalable Attributed Network Embedding for Sparse Networks},
  author={Hou, Chengbin and He, Shan and Tang, Ke},
  journal={Neurocomputing},
  year={2020},
  publisher={Elsevier},
  url={https://doi.org/10.1016/j.neucom.2020.05.080},
  doi={10.1016/j.neucom.2020.05.080},
}

Usages

Requirements

cd OpenANE
pip install -r requirements.txt

Python 3.6.6 or above is required due to the new print(f' ') feature

To obtain node embeddings as well as evaluate the quality

python src/main.py --method abrw --task lp_and_nc --emb-file emb/cora_abrw_emb --save-emb

To have an intuitive feeling in node embeddings

python src/vis.py --emb-file emb/cora_abrw_emb --label-file data/cora/cora_label.txt

Testing (Cora)

Parameter Settings

The default parameters for SAGE-GCN and SAGE-Mean are in src/libnrl/graphsage/_init_.py. And for other parameters:

AANE_lamb AANE_maxiter AANE_rho ABRW_alpha ABRW_topk ASNE_lamb AttrComb_mode GraRep_kstep LINE_negative_ratio LINE_order Node2Vec_p Node2Vec_q TADW_lamb TADW_maxiter batch_size dim dropout epochs label_reserved learning_rate link_remove number_walks walk_length weight_decay window_size workers
0.05 10 5 0.8 30 1 concat 4 5 3 0.5 0.5 0.2 10 128 128 0.5 100 0.7 0.001 0.1 10 80 0.0001 10 24

Testing Results

Link Prediction (LP) and Node Classification (NC) tasks:

STEPS: Cora -> NE method -> node embeddings -> (downstream) LP/NC -> scores

Method AUC (LP) Micro-F1 (NC) Macro-F1 (NC)
aane 0.8081 0.7296 0.6941
abrw 0.9376 0.8612 0.8523
asne 0.7728 0.6052 0.5656
attrcomb 0.9053 0.8446 0.8318
attrpure 0.7993 0.7368 0.7082
deepwalk 0.8465 0.8147 0.8048
grarep 0.8935 0.7632 0.7529
line 0.6930 0.6130 0.5949
node2vec 0.7935 0.7938 0.7856
sagegcn 0.8926 0.7964 0.7828
sagemean 0.8948 0.7899 0.7748
tadw 0.8877 0.8442 0.8321

*We take the average of six runs. During embedding phase, 10% links are removed. During downstream phase, the removed 10% links and the equal number of non-existing links are used for LP testing; and 30% of labels are used for NC testing.

2D Visualization task:

STEPS: Cora -> NE method -> node embeddings -> (downstream) PCA to 2D -> vis


Cora vis

*The different colors indicate different ground truth labels.

Other Datasets

More well-prepared (attributed) network datasets are available at NetEmb-Datasets

Your Own Dataset

*--------------- Structural Info (each row) --------------------*
adjlist: node_id1 node_id2 node_id3 ... (neighbors of node_id1)
or edgelist: node_id1 node_id2 weight (weight is optional)
*--------------- Attribute Info (each row) ---------------------*
node_id1 attr1 attr2 ...
*--------------- Label Info (each row) -------------------------*
node_id1 label1 label2 ...

Parameter Tuning

For different dataset, one may need to search the optimal parameters instead of taking the default parameters. For the meaning and suggestion of each parameter, please see main.py.

Contribution

We highly welcome and appreciate your contribution in fixing bugs, reproducing new ANE methods, etc. Please use the pull requests and your contribution will automatically appear in this project once accepted. We will add you to authors list, if your contribution is significant to this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].