{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/flag-adversarial-data-augmentation-for-graph-1","title":"Robust Optimization as Data Augmentation for Large-scale Graphs","arxiv_id":"2010.09891","date":"2020-10-19","proceeding":"CVPR 2022 1","authors":["Kezhi Kong","Guohao Li","Mucong Ding","Zuxuan Wu","Chen Zhu","Bernard Ghanem","Gavin Taylor","Tom Goldstein"],"abstract":"Data augmentation helps neural networks generalize better by enlarging the training set, but it remains an open question how to effectively augment graph data to enhance the performance of GNNs (Graph Neural Networks). While most existing graph regularizers focus on manipulating graph topological structures by adding/removing edges, we offer a method to augment node features for better performance. We propose FLAG (Free Large-scale Adversarial Augmentation on Graphs), which iteratively augments node features with gradient-based adversarial perturbations during training. By making the model invariant to small fluctuations in input data, our method helps models generalize to out-of-distribution samples and boosts model performance at test time. FLAG is a general-purpose approach for graph data, which universally works in node classification, link prediction, and graph classification tasks. FLAG is also highly flexible and scalable, and is deployable with arbitrary GNN backbones and large-scale datasets. We demonstrate the efficacy and stability of our method through extensive experiments and ablation studies. We also provide intuitive observations for a deeper understanding of our method.","url_abs":"https://arxiv.org/abs/2010.09891v3","url_pdf":"https://arxiv.org/pdf/2010.09891v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"flag-adversarial-data-augmentation-for-graph-1","repo_url":"https://github.com/devnkong/FLAG","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"flag-adversarial-data-augmentation-for-graph-1","repo_url":"https://github.com/sangyx/gtrick/tree/main/benchmark/pyg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"flag-adversarial-data-augmentation-for-graph-1","repo_url":"https://github.com/ytchx1999/GCN_res-FLAG","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"node-property-prediction","task_name":"Node Property Prediction"},{"task_slug":"open-question","task_name":"Open-Ended Question Answering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"DeeperGCN+FLAG","rank_in_archive_order":23,"of":43,"metrics":{"Ext. data":"No","Number of params":"531976","Test ROC-AUC":"0.7942 ± 0.0120","Validation ROC-AUC":"0.8425 ± 0.0061"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"GIN+virtual node+FLAG","rank_in_archive_order":35,"of":43,"metrics":{"Ext. data":"No","Number of params":"3336306","Test ROC-AUC":"0.7748 ± 0.0096","Validation ROC-AUC":"0.8438 ± 0.0128"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"GCN+FLAG","rank_in_archive_order":38,"of":43,"metrics":{"Ext. data":"No","Number of params":"527701","Test ROC-AUC":"0.7683 ± 0.0102","Validation ROC-AUC":"0.8176 ± 0.0087"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"GIN+FLAG","rank_in_archive_order":39,"of":43,"metrics":{"Ext. data":"No","Number of params":"1885206","Test ROC-AUC":"0.7654 ± 0.0114","Validation ROC-AUC":"0.8225 ± 0.0155"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"DeeperGCN+virtual node+FLAG","rank_in_archive_order":23,"of":36,"metrics":{"Ext. data":"No","Number of params":"5550208","Test AP":"0.2842 ± 0.0043","Validation AP":"0.2952 ± 0.0029"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"GIN+virtual node+FLAG","rank_in_archive_order":25,"of":36,"metrics":{"Ext. data":"No","Number of params":"3374533","Test AP":"0.2834 ± 0.0038","Validation AP":"0.2912 ± 0.0026"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"GCN+virtual node+FLAG","rank_in_archive_order":29,"of":36,"metrics":{"Ext. data":"No","Number of params":"2017028","Test AP":"0.2483 ± 0.0037","Validation AP":"0.2556 ± 0.0040"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"GIN+FLAG","rank_in_archive_order":31,"of":36,"metrics":{"Ext. data":"No","Number of params":"1923433","Test AP":"0.2395 ± 0.0040","Validation AP":"0.2451 ± 0.0042"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"GCN+FLAG","rank_in_archive_order":34,"of":36,"metrics":{"Ext. data":"No","Number of params":"565928","Test AP":"0.2116 ± 0.0017","Validation AP":"0.2150 ± 0.0022"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-ppa","task":"Graph Property Prediction","dataset":"ogbg-ppa","model":"DeeperGCN+FLAG","rank_in_archive_order":9,"of":18,"metrics":{"Ext. data":"No","Number of params":"2336421","Test Accuracy":"0.7752 ± 0.0069","Validation Accuracy":"0.7484 ± 0.0052"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-ppa","task":"Graph Property Prediction","dataset":"ogbg-ppa","model":"GIN+virtual node+FLAG","rank_in_archive_order":12,"of":18,"metrics":{"Ext. data":"No","Number of params":"3288042","Test Accuracy":"0.7245 ± 0.0114","Validation Accuracy":"0.6789 ± 0.0079"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-ppa","task":"Graph Property Prediction","dataset":"ogbg-ppa","model":"GCN+virtual node+FLAG","rank_in_archive_order":14,"of":18,"metrics":{"Ext. data":"No","Number of params":"1930537","Test Accuracy":"0.6944 ± 0.0052","Validation Accuracy":"0.6638 ± 0.0055"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-ppa","task":"Graph Property Prediction","dataset":"ogbg-ppa","model":"GIN+FLAG","rank_in_archive_order":15,"of":18,"metrics":{"Ext. data":"No","Number of params":"1836942","Test Accuracy":"0.6905 ± 0.0092","Validation Accuracy":"0.6465 ± 0.0070"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"GAT+FLAG","rank_in_archive_order":38,"of":86,"metrics":{"Ext. data":"No","Number of params":"1628440","Test Accuracy":"0.7371 ± 0.0013","Validation Accuracy":"0.7496 ± 0.0010"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"GCN_res + 8 layers + FLAG","rank_in_archive_order":56,"of":86,"metrics":{"Ext. data":"No","Number of params":"155824","Test Accuracy":"0.7276 ± 0.0024","Validation Accuracy":"0.7389 ± 0.0012"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"GraphSAGE+FLAG","rank_in_archive_order":64,"of":86,"metrics":{"Ext. data":"No","Number of params":"218664","Test Accuracy":"0.7219 ± 0.0021","Validation Accuracy":"0.7349 ± 0.0009"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"DeeperGCN+FLAG","rank_in_archive_order":67,"of":86,"metrics":{"Ext. data":"No","Number of params":"491176","Test Accuracy":"0.7214 ± 0.0019","Validation Accuracy":"0.7311 ± 0.0009"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"GCN+FLAG","rank_in_archive_order":69,"of":86,"metrics":{"Ext. data":"No","Number of params":"142888","Test Accuracy":"0.7204 ± 0.0020","Validation Accuracy":"0.7330 ± 0.0010"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-arxiv","task":"Node Property Prediction","dataset":"ogbn-arxiv","model":"MLP+FLAG","rank_in_archive_order":84,"of":86,"metrics":{"Ext. data":"No","Number of params":"110120","Test Accuracy":"0.5602 ± 0.0019","Validation Accuracy":"0.5817 ± 0.0011"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-mag","task":"Node Property Prediction","dataset":"ogbn-mag","model":"R-GCN+FLAG","rank_in_archive_order":31,"of":39,"metrics":{"Ext. data":"No","Number of params":"154366772","Test Accuracy":"0.4737 ± 0.0048","Validation Accuracy":"0.4835 ± 0.0036"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-products","task":"Node Property Prediction","dataset":"ogbn-products","model":"DeeperGCN+FLAG","rank_in_archive_order":35,"of":64,"metrics":{"Ext. data":"No","Number of params":"253743","Test Accuracy":"0.8193 ± 0.0031","Validation Accuracy":"0.9221 ± 0.0037"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-products","task":"Node Property Prediction","dataset":"ogbn-products","model":"GAT+FLAG","rank_in_archive_order":36,"of":64,"metrics":{"Ext. data":"No","Number of params":"751574","Test Accuracy":"0.8176 ± 0.0045","Validation Accuracy":"0.9251 ± 0.0006"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-products","task":"Node Property Prediction","dataset":"ogbn-products","model":"GraphSAGE+FLAG","rank_in_archive_order":49,"of":64,"metrics":{"Ext. data":"No","Number of params":"206895","Test Accuracy":"0.7936 ± 0.0057","Validation Accuracy":"0.9205 ± 0.0007"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-products","task":"Node Property Prediction","dataset":"ogbn-products","model":"MLP+FLAG","rank_in_archive_order":63,"of":64,"metrics":{"Ext. data":"No","Number of params":"103727","Test Accuracy":"0.6241 ± 0.0016","Validation Accuracy":"0.7688 ± 0.0014"},"uses_additional_data":false},{"leaderboard":"/sota/node-property-prediction-on-ogbn-proteins","task":"Node Property Prediction","dataset":"ogbn-proteins","model":"DeeperGCN+FLAG","rank_in_archive_order":13,"of":26,"metrics":{"Ext. data":"No","Number of params":"2374568","Test ROC-AUC":"0.8596 ± 0.0027","Validation ROC-AUC":"0.9132 ± 0.0022"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.09891","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.09891"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ytchx1999/GCN_res-FLAG","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/devnkong/FLAG","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sangyx/gtrick/tree/main/benchmark/pyg","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"ran_draft_wrong":1,"unverified":12},"by_repo_kind":{"official":{"samples":15,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a8175dac03aad20d","entry":"add_zeros","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/utils/data_util.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/utils/data_util.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a8175dac03aad20d"}},{"code_sha256_prefix":"070e6138d16be226","entry":"flag_biased","repo":"devnkong/FLAG","repo_kind":"official","path":"ogb/attacks.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/ogb/attacks.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"070e6138d16be226"}},{"code_sha256_prefix":"09e6ddb17c0adf28","entry":"norm_layer","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/dense/torch_nn.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/dense/torch_nn.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09e6ddb17c0adf28"}},{"code_sha256_prefix":"81d31aad45664fa2","entry":"act_layer","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/dense/torch_nn.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/dense/torch_nn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"81d31aad45664fa2"}},{"code_sha256_prefix":"cc3989d8108f91e4","entry":"batched_index_select","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/dense/torch_nn.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/dense/torch_nn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cc3989d8108f91e4"}},{"code_sha256_prefix":"47e2e99992a9c1aa","entry":"dense_knn_matrix","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/dense/torch_edge.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/dense/torch_edge.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"47e2e99992a9c1aa"}},{"code_sha256_prefix":"de9538ff3dc26161","entry":"flag","repo":"devnkong/FLAG","repo_kind":"official","path":"ogb/attacks.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/ogb/attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"de9538ff3dc26161"}},{"code_sha256_prefix":"a60e0e7261e1eeb3","entry":"flag_products","repo":"devnkong/FLAG","repo_kind":"official","path":"ogb/attacks.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/ogb/attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a60e0e7261e1eeb3"}},{"code_sha256_prefix":"a80d4edda30ba597","entry":"intersection","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/utils/data_util.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/utils/data_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a80d4edda30ba597"}},{"code_sha256_prefix":"16e18471c8106af0","entry":"knn_graph_matrix","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/sparse/torch_edge.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/sparse/torch_edge.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"16e18471c8106af0"}},{"code_sha256_prefix":"ed908dafa30d8f12","entry":"knn_matrix","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/sparse/torch_edge.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/sparse/torch_edge.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed908dafa30d8f12"}},{"code_sha256_prefix":"3be91b595771f70b","entry":"load_pretrained_models","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/utils/ckpt_util.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/utils/ckpt_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3be91b595771f70b"}},{"code_sha256_prefix":"c845b58421ba1367","entry":"load_pretrained_optimizer","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/utils/ckpt_util.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/utils/ckpt_util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c845b58421ba1367"}},{"code_sha256_prefix":"bc7cc66599be9207","entry":"pairwise_distance","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/gcn_lib/dense/torch_edge.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/gcn_lib/dense/torch_edge.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bc7cc66599be9207"}},{"code_sha256_prefix":"d2621e02b49ba256","entry":"process_indexes","repo":"devnkong/FLAG","repo_kind":"official","path":"deep_gcns_torch/utils/data_util.py","file_url":"https://github.com/devnkong/FLAG/blob/HEAD/deep_gcns_torch/utils/data_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d2621e02b49ba256"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}