{"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/interpretable-and-generalizable-graph","title":"Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism","arxiv_id":"2201.12987","date":"2022-01-31","proceeding":null,"authors":["Siqi Miao","Miaoyuan Liu","Pan Li"],"abstract":"Interpretable graph learning is in need as many scientific applications depend on learning models to collect insights from graph-structured data. Previous works mostly focused on using post-hoc approaches to interpret pre-trained models (graph neural networks in particular). They argue against inherently interpretable models because the good interpretability of these models is often at the cost of their prediction accuracy. However, those post-hoc methods often fail to provide stable interpretation and may extract features that are spuriously correlated with the task. In this work, we address these issues by proposing Graph Stochastic Attention (GSAT). Derived from the information bottleneck principle, GSAT injects stochasticity to the attention weights to block the information from task-irrelevant graph components while learning stochasticity-reduced attention to select task-relevant subgraphs for interpretation. The selected subgraphs provably do not contain patterns that are spuriously correlated with the task under some assumptions. Extensive experiments on eight datasets show that GSAT outperforms the state-of-the-art methods by up to 20%$\\uparrow$ in interpretation AUC and 5%$\\uparrow$ in prediction accuracy. Our code is available at https://github.com/Graph-COM/GSAT.","url_abs":"https://arxiv.org/abs/2201.12987v3","url_pdf":"https://arxiv.org/pdf/2201.12987v3.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":"interpretable-and-generalizable-graph","repo_url":"https://github.com/Graph-COM/GSAT","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"interpretable-and-generalizable-graph","repo_url":"https://github.com/divelab/good","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":"graph-learning","task_name":"Graph Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"GSAT","rank_in_archive_order":11,"of":43,"metrics":{"Ext. data":"No","Number of params":"249602","Test ROC-AUC":"0.8067 ± 0.0950","Validation ROC-AUC":"0.8347 ± 0.0031"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.12987","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.12987"}},"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":"deterministic:regex_extraction","url":"https://github.com/Graph-COM/GSAT","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/divelab/good","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"ran":3,"ran_honours":1,"ran_draft_wrong":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":"f61cb17009c83363","entry":"compute_adjacency_matrix_images","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/mnist.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/mnist.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f61cb17009c83363"}},{"code_sha256_prefix":"88a529db78fde884","entry":"list_to_torch","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/mnist.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/mnist.py","link_basis":"harvester_set","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":"88a529db78fde884"}},{"code_sha256_prefix":"60ccd1c98038811b","entry":"read_file","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/graph_sst2.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/graph_sst2.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60ccd1c98038811b"}},{"code_sha256_prefix":"fe7d97d9abf11937","entry":"split","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/graph_sst2.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/graph_sst2.py","link_basis":"harvester_set","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":"fe7d97d9abf11937"}},{"code_sha256_prefix":"dde52a0f318548b4","entry":"undirected_graph","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/graph_sst2.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/graph_sst2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dde52a0f318548b4"}},{"code_sha256_prefix":"58d024fc97883157","entry":"eval_one_batch","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/pretrain_clf.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/pretrain_clf.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":"58d024fc97883157"}},{"code_sha256_prefix":"1b2c93892e91d26d","entry":"get_loaders_and_test_set","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/utils/get_data_loaders.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/utils/get_data_loaders.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":"1b2c93892e91d26d"}},{"code_sha256_prefix":"748ff6aa4827bf6f","entry":"get_random_split_idx","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/utils/get_data_loaders.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/utils/get_data_loaders.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":"748ff6aa4827bf6f"}},{"code_sha256_prefix":"04d8e2c1ac682160","entry":"read_ba2motif_data","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/datasets/ba_2motifs.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/datasets/ba_2motifs.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":"04d8e2c1ac682160"}},{"code_sha256_prefix":"7e9b6145faddfc72","entry":"train_one_batch","repo":"Graph-COM/GSAT","repo_kind":"official","path":"src/pretrain_clf.py","file_url":"https://github.com/Graph-COM/GSAT/blob/HEAD/src/pretrain_clf.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":"7e9b6145faddfc72"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}