{"id":19979283,"url":"https://github.com/edisonleeeee/lrgae","last_synced_at":"2025-08-10T20:06:54.301Z","repository":{"id":243672855,"uuid":"797617997","full_name":"EdisonLeeeee/lrGAE","owner":"EdisonLeeeee","description":"A comprehensive (masked) graph autoencoders benchmark.","archived":false,"fork":false,"pushed_at":"2024-12-04T10:53:36.000Z","size":1601,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T04:33:21.733Z","etag":null,"topics":["benchmark","graph-autoencoder","graph-contrastive-learning","graph-neural-networks","masked-autoencoder"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2410.10241","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/EdisonLeeeee.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,"zenodo":null}},"created_at":"2024-05-08T07:33:00.000Z","updated_at":"2024-12-15T07:23:33.000Z","dependencies_parsed_at":"2024-12-08T12:45:25.209Z","dependency_job_id":null,"html_url":"https://github.com/EdisonLeeeee/lrGAE","commit_stats":null,"previous_names":["edisonleeeee/lrgae"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EdisonLeeeee/lrGAE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FlrGAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FlrGAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FlrGAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FlrGAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdisonLeeeee","download_url":"https://codeload.github.com/EdisonLeeeee/lrGAE/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FlrGAE/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780617,"owners_count":24474686,"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-08-10T02:00:08.965Z","response_time":71,"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":["benchmark","graph-autoencoder","graph-contrastive-learning","graph-neural-networks","masked-autoencoder"],"created_at":"2024-11-13T03:37:24.535Z","updated_at":"2025-08-10T20:06:54.275Z","avatar_url":"https://github.com/EdisonLeeeee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Revisiting and Benchmarking Graph Autoencoders: A Contrastive Learning Perspective\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"./imgs/comparison.png\" /\u003e \u003cp align=\"center\"\u003e\u003cem\u003eFig. 1. Comparison of different GAEs from contrastive learning perspective.\u003c/em\u003e\u003c/p\u003e\n\nWe introduce the `lrGAE` (left-rigt GAE) benchmark --- graph autoencoders as contrastive learning architectures. lrGAE provides a new contrastive learning perspective of designing powerful GAEs from five dimensions:\n+ Augmentations\n+ Encoder/decoder networks\n+ Contrastive views\n+ Contrastive losses\n+ (optional) Negative examples\n\nThe **contrastive views** is the key to design different yet advanced GAEs, which invovels three components: *graph views, receptive fields, and node pairs.*\n\n+ Graph views: the graph or augmentated graph in two contrastive views, denoted as graph $A$ or $B$.\n+ Receptive fields: the depth of the graph neural network or the number of sampled hops in a node's neighborhood, denoted as $l$ or $r$.\n+ Node pairs: the contrasting objective over a single node $v$ or two nodes $v$ and $u$.\n\nTherefore, we have $2^3=8$ variants of lrGAE in terms of the **contrastive views**, shown below:\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"./imgs/cases_table.png\" /\u003e \u003cp align=\"center\"\u003e\u003cem\u003eTable 1. Illustration of all possible cases of GAEs falling within the lrGAE frmework\u003c/em\u003e\u003c/p\u003e\n\n\u003e [!NOTE]\n\u003e Actually, we got 7 variants since lrGAE-1 is not applicable as a contrastive method. \n\u003e There are more than 7 variants of lrGAE, you can design more powerful GAEs by exploring different combinations of augmentation strategies, encoder/decoder networks, contrastive views, contrastive losses and even the negative sampling tricks.\n\n# 💫 Environment Setup\n\nBefore you begin, please make sure that you have Anaconda or Miniconda installed on your system. This guide assumes that you have a CUDA-enabled GPU.\n\n```shell\n# Create and activate a new Conda environment named 'lrGAE'\nconda create -n lrGAE python==3.12 -c conda-forge -y\nconda activate lrGAE\n\n# Install Pytorch 2.3.1 with CUDA 12.1 support\n# If your use a different CUDA version, please refer to the PyTorch website for the appropriate versions.\npip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121\n\n# Install PyG\npip install torch_geometric\n# Install additional dependencies of PyG\npip install pyg_lib torch_scatter torch_sparse torch_cluster -f https://data.pyg.org/whl/torch-2.3.0+cu121.html\n```\nAdditional dependences of PyG can be found at https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html\n\n# 🚀 Installation\nPlease make sure you have installed [PyTorch](https://pytorch.org) and [PyTorch Geometric (PyG)](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html).\n\n\n```bash\n# Coming soon\npip install -U lrgae\n```\n\nor\n\n```bash\n# Recommended\ngit clone https://github.com/EdisonLeeeee/lrGAE.git \u0026\u0026 cd lrGAE\npip install -e . --verbose\n```\n\nwhere `-e` means \"editable\" mode so you don't have to reinstall every time you make changes.\n\n# 📍 Reproduction\nFive graph-based learning tasks are supported:\n\n+ [Node classification task](./examples/node_classification)\n+ [Link prediction task](./examples/link_prediction)\n+ [Graph clustering task](./examples/graph_clustering)\n+ [Graph classification task](./examples/graph_classification)\n+ [Heterogeneous node classification task](./examples/hetero_node_classification)\n\n# 👀 Implementations\n\n\n+ GAE: [Variational graph auto-encoders](https://arxiv.org/abs/1611.07308). NeurIPS 2016 \n+ MaskGAE: [What’s behind the mask: Understanding masked graph modeling for graph autoencoders](https://arxiv.org/abs/2205.10053). KDD 2023\n+ GraphMAE: [GraphMAE: Self-supervised masked graph autoencoders](https://arxiv.org/abs/2205.10803). KDD 2022\n+ GraphMAE2: [GraphMAE2: A decoding-enhanced masked self-supervised graph learner](https://arxiv.org/abs/2304.04779). WWW 2023\n+ AUG-MAE: [Rethinking graph masked autoencoders through alignment and uniformity](https://arxiv.org/abs/2402.07225). AAAI 2024\n+ GiGaMAE: [GiGaMAE: Generalizable graph masked autoencoder via collaborative latent space reconstruction](https://arxiv.org/abs/2308.09663). CIKM 2023\n+ S2GAE: [S2GAE: self-supervised graph autoencoders are generalizable learners with graph masking](https://dl.acm.org/doi/10.1145/3539597.3570404). WSDM 2023\n+ 7 variants of lrGAE in terms of different contrastive views (See Fig.2 for illustration)\n    + 2️⃣ lrGAE-ABllvv\n    + 3️⃣ lrGAE-AAlrvv\n    + 4️⃣ lrGAE-ABlrvv\n    + 5️⃣ lrGAE-AAllvu\n    + 5️⃣ lrGAE-AAlrvu\n    + 7️⃣ lrGAE-ABllvu\n    + 8️⃣ lrGAE-ABlrvu\n \n\u003cp align=\"center\"\u003e \u003cimg src=\"./imgs/cases.png\" /\u003e \u003cp align=\"center\"\u003e\u003cem\u003eFig. 2. Illustration of seven possible cases of lrGAE.\u003c/em\u003e\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Flrgae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedisonleeeee%2Flrgae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Flrgae/lists"}