{"id":13754300,"url":"https://github.com/HKUST-KnowComp/FKGE","last_synced_at":"2025-05-09T22:31:49.512Z","repository":{"id":101128790,"uuid":"368029354","full_name":"HKUST-KnowComp/FKGE","owner":"HKUST-KnowComp","description":"Code for CIKM 2021 paper: Differentially Private Federated Knowledge Graphs Embedding (https://arxiv.org/abs/2105.07615)","archived":false,"fork":false,"pushed_at":"2022-12-06T05:59:50.000Z","size":12432,"stargazers_count":29,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-16T07:33:18.542Z","etag":null,"topics":["differential-privacy","federated-learning","knowledge-graph"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HKUST-KnowComp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-17T02:10:35.000Z","updated_at":"2024-05-28T05:12:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa31bd45-e659-4bcd-83b0-760d5da34fd7","html_url":"https://github.com/HKUST-KnowComp/FKGE","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/HKUST-KnowComp%2FFKGE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FFKGE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FFKGE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HKUST-KnowComp%2FFKGE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HKUST-KnowComp","download_url":"https://codeload.github.com/HKUST-KnowComp/FKGE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253335767,"owners_count":21892729,"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":["differential-privacy","federated-learning","knowledge-graph"],"created_at":"2024-08-03T09:01:53.665Z","updated_at":"2025-05-09T22:31:44.499Z","avatar_url":"https://github.com/HKUST-KnowComp.png","language":"Python","funding_links":[],"categories":["知识图谱"],"sub_categories":["其他_文本生成、文本对话"],"readme":"\u003c!---\n# FKGE:Federated Knowledge Graphs Embedding\nCode used for paper [Federated Knowledge Graphs Embedding](https://arxiv.org/abs/2105.07615), we use aligned entities to perform entity embedding translation over 11 knowledge graphs.\n---\u003e\n## Differentially Private Federated Knowledge Graphs Embedding:\n\n### Data Release\nThe datasets we used for experiments have been partially uploaded.\nTo obtain all the KGs, you can find it in https://drive.google.com/file/d/1oD1Gv2RbpNzO8GWGq7SusbAmYih5r-6Q/view?usp=sharing.\nMake sure to put KGs from the Google Drive into ```OpenKE/benchmarks```.\n\n**Update**: The aligned files are updated and already put in the ```trainse_data/aligned``` folder.\n\n### Package Dependencies\n* numpy\n* tensorflow 1.xx\n* tensorflow_probability\n\n### Baseline Embeddings\n\n**You need to run the baseline experiments to obtain the KG embeddings through the following code**: \n\n```python Config.py baseline 300 100 1.0 -1```\n\nThe parameters denotes mode, epoches, dimension, gan_ratio and pred_id respectively. \n\nNote that if you want to try other embedding algorithms or some files like ```1-1.txt``` is missing, you need to run ```n_n.py``` from ```OpenKE/benchmarks``` for each KG in ```/OpenKE/benchmarks/KG_1```.\nYou can replace baseline with strategy_1 or strategy_2 to conduct the experiments with respect to FKGE. \n\nBy running baseline embeddings, you will create a ```experiment/``` folder and the embeddings are inside ```experiment/0/``` if you sepcify ```pred_id=-1```.\n\n\n### Federated Knowledge Graphs Embedding\n\n\n**After obtaining KG's initital embeddings from running the baseline model (make sure there are embeddings in the ```experiment/0/``` folder), run**: \n\n```python Config.py strategy_1 300 100 1.0 0```\n\n### DPFKGE\nIf you want to train FKGE with the *PATE* mechanism, in `Config.py`, replace \n\n```from FederalTransferLearning.hetro_AGCN_mul_dataset import GAN```\n\nwith\n\n```from FederalTransferLearning.hetro_AGCN_mul_dataset_pate import GAN```\n\n\n### Citation\n* Paper: https://arxiv.org/abs/2105.07615\n\nIf you use this code in your work, please kindly cite it.\n\n```\n@inproceedings{Peng-2021-DPFKGE,\n  title={Differentially Private Federated Knowledge Graphs Embedding},\n  author={Hao Peng and\n          Haoran Li and\n          Yangqiu Song and\n          Vincent W. Zheng and\n          Jianxin Li},\n  booktitle={CIKM 2021},\n  year={2021},\n  url={https://arxiv.org/abs/2105.07615}\n}\n```\n### Miscellaneous\n\nPlease send any questions about the code and/or the algorithm to hlibt@connect.ust.hk\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKUST-KnowComp%2FFKGE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHKUST-KnowComp%2FFKGE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHKUST-KnowComp%2FFKGE/lists"}