{"id":13678423,"url":"https://github.com/baharefatemi/SimplE","last_synced_at":"2025-04-29T13:31:08.547Z","repository":{"id":70596584,"uuid":"172127938","full_name":"baharefatemi/SimplE","owner":"baharefatemi","description":"Implementation of SimplE Embedding for Link Prediction in Knowledge Graphs in PyTorch","archived":false,"fork":false,"pushed_at":"2020-08-23T20:01:59.000Z","size":8850,"stargazers_count":115,"open_issues_count":2,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-02T13:22:27.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/baharefatemi.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}},"created_at":"2019-02-22T20:07:18.000Z","updated_at":"2024-04-11T09:58:15.000Z","dependencies_parsed_at":"2023-06-10T01:02:57.299Z","dependency_job_id":null,"html_url":"https://github.com/baharefatemi/SimplE","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/baharefatemi%2FSimplE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baharefatemi%2FSimplE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baharefatemi%2FSimplE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baharefatemi%2FSimplE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baharefatemi","download_url":"https://codeload.github.com/baharefatemi/SimplE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224173945,"owners_count":17268202,"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":[],"created_at":"2024-08-02T13:00:53.443Z","updated_at":"2024-11-11T20:31:40.784Z","avatar_url":"https://github.com/baharefatemi.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Summary\n=======\n\nThis is a faster implementation of the model proposed in [SimplE Embedding for Link Prediction in Knowledge Graphs](https://papers.nips.cc/paper/7682-simple-embedding-for-link-prediction-in-knowledge-graphs) for knowledge graph embedding. It can be also used to learn `SimplE` models for any input model. The software can be also used as a framework to implement new knowledge graph embedding models.\n\n\n## Dependencies\n\n* `Python` version 3.6\n* `Numpy` version 1.15.4\n* `PyTorch` version 1.0.0\n\n## Usage\n\nTo run SimplE you should define the following parameters:\n\n`ne`: number of epochs\n\n`lr`: learning rate\n\n`reg`:l2 regularization parameter\n\n`dataset`: The dataset you want to run SimplE on\n\n`emb_dim`: embedding dimension\n\n`neg_ratio`: number of negative examples per positive example\n\n`batch_size`: batch size\n\n`save_each`: validate every k epochs\n\n* Run `python main.py -ne ne -lr lr -reg reg -dataset dataset -emb_dim emb_dim -neg_ratio neg_ratio -batch_size batch_size -save_each save_each`\n\n\nRunning a model `M` on a dataset `D` will save the embeddings in a folder with the following address:\n\n    $ \u003cCurrent Directory\u003e/models/D/\n\nAs an example, running the `SimplE` model on `wn18` will save the embeddings in the following folder:\n\n    $ \u003cCurrent Directory\u003e/models/wn18/\n    \n\n## Reproducing the Results in the Paper\n\nIn order to reproduce the results presented in the paper, you should run the following commands:\n\n### WN18\n\nRUN `python main.py -ne 1000 -lr 0.1 -reg 0.03 -dataset WN18 -emb_dim 200 -neg_ratio 1 -batch_size 1415 -save_each 50`\n\n### FB15K\n\nRUN `python main.py -ne 1000 -lr 0.05 -reg 0.1 -dataset FB15K -emb_dim 200 -neg_ratio 10 -batch_size 4832 -save_each 50`\n\n## Learned Embeddings for SimplE\n\n\n\n## Publication\n\nRefer to the following publication for details of the models and experiments.\n\n- [Seyed Mehran Kazemi](https://mehran-k.github.io/) and [David Poole](http://www.cs.ubc.ca/~poole)\n\n  [SimplE Embedding for Link Prediction in Knowledge Graphs](https://papers.nips.cc/paper/7682-simple-embedding-for-link-prediction-in-knowledge-graphs)\n  \n  [Representing and learning relations and properties under uncertainty](https://open.library.ubc.ca/collections/ubctheses/24/items/1.0375812)\n\n\n## Cite SimplE\n\nIf you use this package for published work, please cite one (or both) of the following:\n\n    @inproceedigs{kazemi2018simple,\n      title={SimplE Embedding for Link Prediction in Knowledge Graphs},\n      author={Kazemi, Seyed Mehran and Poole, David},\n      booktitle={Advances in Neural Information Processing Systems},\n      year={2018}\n    }\n    \n    @phdthesis{Kazemi_2018, \n      series={Electronic Theses and Dissertations (ETDs) 2008+}, \n      title={Representing and learning relations and properties under uncertainty}, \n      url={https://open.library.ubc.ca/collections/ubctheses/24/items/1.0375812}, \n      DOI={http://dx.doi.org/10.14288/1.0375812}, \n      school={University of British Columbia}, \n      author={Kazemi, Seyed Mehran}, \n      year={2018}, \n      collection={Electronic Theses and Dissertations (ETDs) 2008+}\n    }\n\nContact\n=======\n\nBahare Fatemi\n\nComputer Science Department\n\nThe University of British Columbia\n\n201-2366 Main Mall, Vancouver, BC, Canada (V6T 1Z4)  \n\n\u003cbfatemi@cs.ubc.ca\u003e\n\n\nLicense\n=======\n\nLicensed under the GNU General Public License Version 3.0.\n\u003chttps://www.gnu.org/licenses/gpl-3.0.en.html\u003e\n\n\nCopyright (C) 2019 Bahare Fatemi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaharefatemi%2FSimplE","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaharefatemi%2FSimplE","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaharefatemi%2FSimplE/lists"}