{"id":22381978,"url":"https://github.com/googleinterns/sparsegraphssl","last_synced_at":"2025-10-19T02:28:58.244Z","repository":{"id":103690517,"uuid":"316076921","full_name":"googleinterns/sparsegraphssl","owner":"googleinterns","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-25T11:03:10.000Z","size":84277,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-05T00:12:24.774Z","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/googleinterns.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":"2020-11-25T23:34:55.000Z","updated_at":"2024-09-18T05:13:20.000Z","dependencies_parsed_at":"2023-07-06T21:15:30.950Z","dependency_job_id":null,"html_url":"https://github.com/googleinterns/sparsegraphssl","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/googleinterns%2Fsparsegraphssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fsparsegraphssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fsparsegraphssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleinterns%2Fsparsegraphssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleinterns","download_url":"https://codeload.github.com/googleinterns/sparsegraphssl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236608478,"owners_count":19176458,"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-12-05T00:11:21.023Z","updated_at":"2025-10-15T12:30:31.506Z","avatar_url":"https://github.com/googleinterns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This is not an officially supported Google product.**\n# Improving semi-supervised learning with sparse attention and pseudo-labels propagation.\n\n## Package description:\n\nHere is the original repository for the models introduced in \"Improving\nsemi-supervised learning with sparse attention and pseudo-labels propagation.\"\nOur graph neural networks model utilizes SparseMax attention to prune\nunessential connections to let the networks focus on a few edges only.\n\nOur Sparsity-inducing graph neural network (SIGN) improves the selection of\nmeaningful samples significantly by up to 8.01 % compared to the Graph Attention\nnetworks baselines. The model is up to 20% more robust to added noisy edges\nwhile achieving similar or slightly improved classification performance. As a\nside effect, SIGN also enhances the explanation of the classification decisions.\nWith our model, the attention mass is concentrated only on a few crucial samples\nsince SIGN sparsifies the graph connections. For selected samples, SIGN can\nreduce the interpretation graph by more than 99%.\n\n## Set-up the environment and required packages.\n\nThe easiest way is to set up a virtual environment with pip or conda. Below we\nshow an example to set up the pip environment.\n\n### Installation\n\nYou will need the packages virtualenv, graphviz, python3-tk. graphviz python3-tk\nare used for visualizations of the learned attention weights.\n\n```bash\nsudo apt-get --assume-yes install virtualenv graphviz-dev python3-tk\n```\n\n### Virtual environment to run on GPUs:\n\n```bash\nvirtualenv --python=python3.7 [YourENV]\nsource [YourENV]/bin/activate\npip install -r requirements.txt\n```\n\n### Running experiments on CPU:\n\n```bash\npip uninstall dgl-cu101\npip install dgl\n```\n\n## Running experiments:\n\nYou can run the experiments in low-labeling regimes with the standard settings\nas below. More examples can be found in the directory run_scripts. Currently,\nthe citation graph datasets: Cora, Citeseer, Pubmed are supported. Set gpu = -1\nto run on cpu.\n\nHere is how to run the GAT-model: \n\nRun the GAT model with the following command.\n```bash\npython training/train_ctgr.py --model GAT --data cora --labeling_rate 0.1 --gpu\n0 \n```\n\nFor the SIGN-model, simply change the model flag.\n\nRun SIGN model with the following command.\n```bash\npython training/train_ctgr.py --model SparseGAT --data cora --labeling_rate 0.1\n--gpu 0 \n```\n\nFor the LabelPropagationtGAT-model, simply change the model flag. \nRun LP-GAT model with three steps of label-propagation\n```bash\npython training/train_ctgr.py --model LabelPropagationGAT --data cora\n--labeling_rate 0.1 --label_prop_steps 3 --gpu 0 \n```\n\nFor the LabelPropagationtSIGN-model: \nRun LP-GAT model with 3 steps of label-propagation\n```bash\npython training/train_ctgr.py --model LabelPropagationSparseGAT --data cora\n--labeling_rate 0.1 --label_prop_steps 3 --gpu 0 \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Fsparsegraphssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleinterns%2Fsparsegraphssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleinterns%2Fsparsegraphssl/lists"}