{"id":18032040,"url":"https://github.com/claudmor/gravity_gae_torch_geometric","last_synced_at":"2025-07-27T02:02:45.119Z","repository":{"id":212316167,"uuid":"721833390","full_name":"ClaudMor/gravity_gae_torch_geometric","owner":"ClaudMor","description":"Pytorch Geometric implementation of the \"Gravity-Inspired Graph Autoencoders for Directed Link Prediction\" paper.","archived":false,"fork":false,"pushed_at":"2023-12-24T19:19:43.000Z","size":926,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T01:51:22.428Z","etag":null,"topics":["autoencoder","deep-learning","gnn-algorithm","gnn-model","gnns","graphneuralnetwork","machine-learning","statistics"],"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/ClaudMor.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-21T21:37:43.000Z","updated_at":"2024-10-22T22:37:02.000Z","dependencies_parsed_at":"2023-12-24T20:43:02.307Z","dependency_job_id":null,"html_url":"https://github.com/ClaudMor/gravity_gae_torch_geometric","commit_stats":null,"previous_names":["claudmor/gravity_gae_torch_geometric"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ClaudMor/gravity_gae_torch_geometric","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudMor%2Fgravity_gae_torch_geometric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudMor%2Fgravity_gae_torch_geometric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudMor%2Fgravity_gae_torch_geometric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudMor%2Fgravity_gae_torch_geometric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClaudMor","download_url":"https://codeload.github.com/ClaudMor/gravity_gae_torch_geometric/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaudMor%2Fgravity_gae_torch_geometric/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267284810,"owners_count":24064063,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autoencoder","deep-learning","gnn-algorithm","gnn-model","gnns","graphneuralnetwork","machine-learning","statistics"],"created_at":"2024-10-30T10:12:04.365Z","updated_at":"2025-07-27T02:02:45.086Z","avatar_url":"https://github.com/ClaudMor.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gravity-(V)GAE Pytorch Geometric\n\nThis repository contains a Pytorch Geometric implementation of the [Gravity-Inspired Graph Autoencoders for Directed Link Prediction](https://doi.org/10.1145/3357384.3358023) paper.\n\nThis implementation has been referenced in the [original implementation](https://github.com/deezer/gravity_graph_autoencoders), and it has been reviewed by one of its authors.\n\nWith respect to the original implementation, it has the following limitations:\n\n- Only the Cora dataset has currently been tested (but support for the other datasets should be already there);\n- Only the Gravity-GAE, Gravity-VGAE, SourceTarget-GAE and SourceTarget-VGAE are implemented.\n\nAnd additions:\n\n- Early stopping;\n- Trainable lambda;\n- New training strategy for the biased task, which sometimes drastically improves performance\n\nSee below for details on each of these additions.\n\n## Early Stopping\n\nThe general setting contains a validation set that we use to perform early stopping w.r.t. a validation loss obtained by summing the AUC and AP scores on the validation set.\n\n## Trainable Lambda\n\nInstead of treating lambda as an hyperparameter, we enable training for it.\n\n## New Training Strategy\n\nThe \"biased_rev\" tasks have a train set which is different from that of the original implementation (\"biased\"). It consists of all positive edges (as defined in the \"biased\" task) and all their reverses as negatives. This produces a training set which is statistically more similar to the test set and thus improves performance on many models.\n\n## Further Observations\n\nSometimes the `recon_loss` is more numerically stable than the `BCELossWithLogits`, and thus we preferred it.\n\n## How to Run\n\nPlease use the provided `environment.yml` file to instantiate a conda environment `gravity_gae_env` compatible with this code. Then open the `main.py` script, set the parameters within the \"Please set the parameters below\" section and run it e.g. in VSCode.\n\n## References\n\nSalha, G., Limnios, S., Hennequin, R., Tran, V., \u0026 Vazirgiannis, M. (2019). Gravity-Inspired Graph Autoencoders for Directed Link Prediction. In ACM International Conference on Information and Knowledge Management (CIKM).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudmor%2Fgravity_gae_torch_geometric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaudmor%2Fgravity_gae_torch_geometric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaudmor%2Fgravity_gae_torch_geometric/lists"}