{"id":19979287,"url":"https://github.com/edisonleeeee/sgattack","last_synced_at":"2025-08-12T18:41:16.715Z","repository":{"id":109814588,"uuid":"348328119","full_name":"EdisonLeeeee/SGAttack","owner":"EdisonLeeeee","description":"Official Repository for \"Adversarial Attack on Large Scale Graph.\" [TKDE 2021]","archived":false,"fork":false,"pushed_at":"2021-12-21T12:40:14.000Z","size":354,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T04:33:23.035Z","etag":null,"topics":["adversarial-attacks","gcn","graph","graph-neural-networks","sga","sgc"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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}},"created_at":"2021-03-16T11:51:18.000Z","updated_at":"2024-12-15T07:37:29.000Z","dependencies_parsed_at":"2023-05-01T13:33:12.512Z","dependency_job_id":null,"html_url":"https://github.com/EdisonLeeeee/SGAttack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EdisonLeeeee/SGAttack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSGAttack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSGAttack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSGAttack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSGAttack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdisonLeeeee","download_url":"https://codeload.github.com/EdisonLeeeee/SGAttack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdisonLeeeee%2FSGAttack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270116358,"owners_count":24530273,"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-12T02:00:09.011Z","response_time":80,"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":["adversarial-attacks","gcn","graph","graph-neural-networks","sga","sgc"],"created_at":"2024-11-13T03:37:25.307Z","updated_at":"2025-08-12T18:41:16.648Z","avatar_url":"https://github.com/EdisonLeeeee.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SGA\nOfficial implementation of Simlified Gradient Attack (SGA) in TKDE 2021: [Adversarial attack on large scale graph](https://arxiv.org/abs/2009.03488).\n\n\n![SGA](./imgs/SGA.png)\n\n# Implementations\n+ The PyTorch implementation can be found at [DeepRobust](https://github.com/DSE-MSU/DeepRobust/blob/master/examples/graph/test_sga.py) or [GraphWar](https://github.com/EdisonLeeeee/GraphWar).\n\n\n# Update\n+ 2021/3/20: add tensorflow 2.x support\n\n# Requirements\n+ TensorFlow 1.15 (it should work in `1.14`, `1.13`... and `2.x`)\n+ Numpy\n+ Scipy\n+ tqdm\n\n# Datasets\n\nwe consider the largest connected component (LCC) of the graph for each dataset, e.g., `data/cora_lcc`.\n\nCora, Citeseer and Pubmed could be found at https://github.com/danielzuegner/gnn-meta-attack,\n\nreddit could be found at http://snap.stanford.edu/graphsage/\n\n+ cora\n+ citeseer\n+ pubmed  \n+ reddit\n\n# Usage\n\nHow to attack a graph neural networks?\n\n+ Train the surrogate model SGC\n+ Generate perturbation (edge flips)\n+ Attack target models with adversarial examples (SGC, GCN ...)\n\nSee `src/demo.ipynb` for a simple example to run our codes.\n\n# Reproduce results in paper\n\n+ Run `src/generate_edges.ipynb` to generate adversarial edges and save them, the adversarial edges can be generated by `SGA`, `GradArgmax`, `Nettack`.\n+ Run `src/attack.ipynb` to test the attack performance on `SGC` and `GCN`.\n\n# Cite\n\nIf you make use of this code or the SGA algorithm in your work, please cite the following paper:\n\n```bibtex\n@article{li2021adversarial,\n  title={Adversarial attack on large scale graph},\n  author={Li, Jintang and Xie, Tao and Liang, Chen and Xie, Fenfang and He, Xiangnan and Zheng, Zibin},\n  journal={IEEE Transactions on Knowledge and Data Engineering},\n  year={2021},\n  publisher={IEEE}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Fsgattack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedisonleeeee%2Fsgattack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedisonleeeee%2Fsgattack/lists"}