https://github.com/thunlp/cane
Source code and datasets of "CANE: Context-Aware Network Embedding for Relation Modeling"
https://github.com/thunlp/cane
network-embedding
Last synced: about 2 months ago
JSON representation
Source code and datasets of "CANE: Context-Aware Network Embedding for Relation Modeling"
- Host: GitHub
- URL: https://github.com/thunlp/cane
- Owner: thunlp
- License: mit
- Created: 2017-04-19T06:11:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-03-30T05:35:36.000Z (about 6 years ago)
- Last Synced: 2025-04-03T20:22:59.834Z (3 months ago)
- Topics: network-embedding
- Language: Python
- Size: 1.66 MB
- Stars: 192
- Watchers: 17
- Forks: 79
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CANE
Source code and datasets of ACL2017 paper: "CANE: Context-Aware Network Embedding for Relation Modeling"## Datasets
This folder "datasets" contains three datasets used in CANE, including Cora, HepTh and Zhihu. In each dataset, there are two files named "data.txt" and "graph.txt".* data.txt: Each line represents the text information of a vertex.
* graph.txt: The edgelist file of current social network.Besides, there is an additional "group.txt" file in Cora.
* group.txt: Each vertex in Cora has been annotated with a label. This file can be used for vertex classification.
## Run
Run the following command for training CANE:python3 run.py --dataset [cora,HepTh,zhihu] --gpu gpu_id --ratio [0.15,0.25,...] --rho rho_value
For example, you can train like:
python3 run.py --dataset zhihu --gpu 0 --ratio 0.55 --rho 1.0,0.3,0.3
## Experimental Results
The experimental results are generated by the newest version of codes:
| | 0.15 | 0.25 | 0.35 | 0.45 | 0.55 | 0.65 | 0.75 | 0.85 | 0.95 |
| ----- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| cora | 85.2 | 90.5 | 92.2 | 93.5 | 93.4 | 93.6 | 94.4 | 95 | 92.5 |
| HepTh | 85 | 89.7 | 91.7 | 95 | 94.4 | 94.2 | 95.1 | 95.8 | 93.1 |
| zhihu | 64.5 | 67.1 | 69.2 | 69.9 | 72 | 72.2 | 72.5 | 72.8 | 73.3 |## Dependencies
* Tensorflow == 1.11.0
* Scipy == 1.1.0
* Numpy == 1.16.2## Cite
If you use the code, please cite this paper:_Cunchao Tu, Han Liu, Zhiyuan Liu, Maosong Sun. CANE: Context-Aware Network Embedding for Relation Modeling. The 55th Annual Meeting of the Association for Computational Linguistics (ACL 2017)._
For more related works on network representation learning, please refer to my [homepage](http://thunlp.org/~tcc/).