|
1 | 1 | <img src="img/combine.PNG" style="zoom:100%;" /> |
2 | 2 |
|
| 3 | +<p align="center"><a href="https://github.com/THUDM/SelfKG/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/THUDM/SelfKG" /></a> |
3 | 4 |
|
| 5 | +# SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs |
4 | 6 |
|
5 | | -# SelfKG |
| 7 | +Original implementation for paper SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs. |
6 | 8 |
|
7 | | -SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs. |
| 9 | +This paper is accepted by [The Web Conference2022](https://www2022.thewebconf.org/)! :satisfied: |
8 | 10 |
|
9 | | -The paper of SelfKG is accepted by The Web Conference 2022! |
| 11 | +SelfKG is the **first** **self-supervised** entity alignment method **without label supervision**, which can **match or achieve comparable results with state-of-the-art supervised baselines**. The performance of SelfKG suggests self-supervised learning offers great potential for entity alignment in Knowledge Graphs. |
10 | 12 |
|
11 | | -## 1. Setup |
| 13 | +[SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs](#SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs) |
12 | 14 |
|
13 | | -**Dependencies** |
| 15 | +- [Installation](#installation) |
| 16 | + - [Requirements](#requirements) |
| 17 | +- [Quick Start](#quick-start) |
| 18 | + - [Data Preparation](#data-preparation) |
| 19 | + - [Run Experiments](#run-experiments) |
| 20 | +- [❗ Common Issues](#-common-issues) |
| 21 | +- [Citing SelfKG](#citing-selfkg) |
14 | 22 |
|
15 | | -```bash |
16 | | -torch # just choose the version based on your machine |
17 | | -faiss-cpu |
18 | | -numpy |
19 | | -pandas |
20 | | -tqdm |
21 | | -transformers |
| 23 | +## Installation |
| 24 | + |
| 25 | +### Requirements |
| 26 | + |
| 27 | +```txt |
| 28 | +torch==1.9.0 |
| 29 | +faiss-cpu==1.7.1 |
| 30 | +numpy>=1.21 |
| 31 | +pandas==1.2.5 |
| 32 | +tqdm==4.61.1 |
| 33 | +transformers==4.8.2 |
22 | 34 | ``` |
23 | | -You can use `setup.sh` to set up your Anaconda environment. |
24 | 35 |
|
25 | | -**Data** |
| 36 | +You can use [`setup.sh`](https://github.com/THUDM/SelfKG/blob/main/setup.sh) to set up your Anaconda environment. |
| 37 | + |
| 38 | +## Quick Start |
| 39 | + |
| 40 | +### Data Preparation |
26 | 41 |
|
27 | 42 | You can download the our data from [here](https://drive.google.com/drive/folders/1vuXC6A0WETEr-b2yA6Y1ZxR8Dsli4xLr?usp=sharing), and the final structure our project should be: |
28 | 43 |
|
@@ -53,10 +68,31 @@ You can download the our data from [here](https://drive.google.com/drive/folders |
53 | 68 | └── settings.py |
54 | 69 | ``` |
55 | 70 |
|
56 | | -## 2. Run experiments |
| 71 | +### Run Experiments |
57 | 72 |
|
58 | | -You can use |
| 73 | +You can use |
59 | 74 |
|
60 | 75 | ```bash experiments.sh``` |
61 | 76 |
|
62 | | - to reproduce our experiments results. For more details, please refer to `experiments.sh` and our code. |
| 77 | + to reproduce our experiments results. For more details, please refer to [`experiments.sh`](https://github.com/THUDM/SelfKG/blob/main/experiments.sh) and our code. |
| 78 | + |
| 79 | +## ❗ Common Issues |
| 80 | + |
| 81 | +<details> |
| 82 | +<summary> |
| 83 | +"XXX file not found" |
| 84 | +</summary> |
| 85 | +<br/> |
| 86 | +Please make sure you've downloaded all the dataset according to README.md |
| 87 | +</details> |
| 88 | + |
| 89 | +to be continued ... |
| 90 | + |
| 91 | + |
| 92 | +## Citing SelfKG |
| 93 | + |
| 94 | +If you use SelfKGin your research or wish to refer to the baseline results, please use the following BibTeX. |
| 95 | + |
| 96 | +``` |
| 97 | +in preparation ... |
| 98 | +``` |
0 commit comments