{"id":20215876,"url":"https://github.com/thudm/selfkg","last_synced_at":"2025-04-10T14:44:38.323Z","repository":{"id":42401892,"uuid":"377792733","full_name":"THUDM/SelfKG","owner":"THUDM","description":"Codes for WWW2022 accepted paper: SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs","archived":false,"fork":false,"pushed_at":"2022-07-11T08:39:51.000Z","size":22003,"stargazers_count":68,"open_issues_count":1,"forks_count":8,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-24T13:11:11.648Z","etag":null,"topics":["entity-alignment","self-supervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/THUDM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-17T10:32:53.000Z","updated_at":"2025-02-18T02:38:09.000Z","dependencies_parsed_at":"2022-09-14T00:31:10.937Z","dependency_job_id":null,"html_url":"https://github.com/THUDM/SelfKG","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FSelfKG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FSelfKG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FSelfKG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/THUDM%2FSelfKG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/THUDM","download_url":"https://codeload.github.com/THUDM/SelfKG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248234010,"owners_count":21069494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["entity-alignment","self-supervised-learning"],"created_at":"2024-11-14T06:25:13.283Z","updated_at":"2025-04-10T14:44:38.304Z","avatar_url":"https://github.com/THUDM.png","language":"Python","readme":"\u003cimg src=\"img/combine.png\" style=\"zoom:100%;\" /\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/THUDM/SelfKG/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/THUDM/SelfKG\" /\u003e\u003c/a\u003e\n\n# SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs\n\nOriginal implementation for paper SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs.   \n\nThis paper is accepted and **nominated as a best paper** by  [The Web Conference2022](https://www2022.thewebconf.org/)! :satisfied:\n\nSelfKG 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.\n\n[SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs](https://arxiv.org/abs/2203.01044)\n  \nhttps://doi.org/10.1145/3485447.3511945\n\n- [Installation](#installation)\n  - [Requirements](#requirements)\n- [Quick Start](#quick-start)\n  - [Data Preparation](#data-preparation)\n  - :star:[Run Experiments](#run-experiments)\n- [❗ Common Issues](#-common-issues)\n- [Citing SelfKG](#citing-selfkg)\n\n## Installation\n\n### Requirements\n\n```txt\ntorch==1.9.0\nfaiss-cpu==1.7.1\nnumpy==1.19.2\npandas==1.0.5\ntqdm==4.61.1\ntransformers==4.8.2\ntorchtext==0.10.0\n```\n\nYou can use [`setup.sh`](https://github.com/THUDM/SelfKG/blob/main/setup.sh) to set up your Anaconda environment by\n\n```bash\nbash setup.sh\n```\n\n\n\n## Quick Start\n\n### Data Preparation\n\nYou can download the our data from [here](https://zenodo.org/record/6326870#.YiI2K6tBxPY), and the final structure our project should be:\n\n```bash\n├── data\n│   ├── DBP15K\n│   │   ├── fr_en\n│   │   ├── ja_en\n│   │   └── zh_en\n│   ├── DWY100K\n│   │   ├── dbp_wd\n│   │   └── dbp_yg\n│   └── LaBSE\n│       ├── bert_config.json\n│       ├── bert_model.ckpt.index\n│       ├── checkpoint\n│       ├── config.json\n│       ├── pytorch_model.bin\n│       └── vocab.txt\n│   └── getdata.sh\n├── loader\n├── model\n├── run.sh # Please use this bash to run the experiments!\n├── run_DWY_LaBSE_neighbor.py # SelfKG on DWY100k\n├── run_LaBSE_neighbor.py # SelfKG on DBP15k\n... # run_LaBSE_*.py # Ablation code will be available soon\n├── script\n│   └── preprocess\n├── settings.py\n└── setup.sh # Can be used to set up your Anaconda environment\n```\n\nYou can also use the following scripts to download the datasets directly:\n\n```bash\ncd data\nbash getdata.sh # The download speed is decided by your network connection. If it's pretty slow, please directly download the datasets from the website as mentioned before.\n```\n\n### :star:Run Experiments\n\n**Please use**\n\n**`bash run.sh`**\n\n to reproduce our experiments results. For more details, please refer to [`run.sh`](https://github.com/THUDM/SelfKG/blob/main/run.sh) and our code.\n\n## ❗ Common Issues\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\"XXX file not found\"\n\u003c/summary\u003e\n\u003cbr/\u003e\nPlease make sure you've downloaded all the dataset according to README.\n\u003c/details\u003e\n\n\nto be continued ...\n\n\n## Citing SelfKG\n\nIf you use SelfKG in your research or wish to refer to the baseline results, please use the following BibTeX.\n\n```\n@article{DBLP:journals/corr/abs-2203-01044,\n  author    = {Xiao Liu and\n               Haoyun Hong and\n               Xinghao Wang and\n               Zeyi Chen and\n               Evgeny Kharlamov and\n               Yuxiao Dong and\n               Jie Tang},\n  title     = {SelfKG: Self-Supervised Entity Alignment in Knowledge Graphs},\n  journal   = {CoRR},\n  volume    = {abs/2203.01044},\n  year      = {2022},\n  url       = {https://arxiv.org/abs/2203.01044},\n  eprinttype = {arXiv},\n  eprint    = {2203.01044},\n  timestamp = {Mon, 07 Mar 2022 16:29:57 +0100},\n  biburl    = {https://dblp.org/rec/journals/corr/abs-2203-01044.bib},\n  bibsource = {dblp computer science bibliography, https://dblp.org}\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthudm%2Fselfkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthudm%2Fselfkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthudm%2Fselfkg/lists"}