{"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/exact-computation-of-any-order-shapley","title":"Exact Computation of Any-Order Shapley Interactions for Graph Neural Networks","arxiv_id":"2501.16944","date":"2025-01-28","proceeding":null,"authors":["Fabian Fumagalli","Maximilian Muschalik","Paolo Frazzetto","Janine Strotherm","Luca Hermes","Alessandro Sperduti","Eyke Hüllermeier","Barbara Hammer"],"abstract":"Albeit the ubiquitous use of Graph Neural Networks (GNNs) in machine learning (ML) prediction tasks involving graph-structured data, their interpretability remains challenging. In explainable artificial intelligence (XAI), the Shapley Value (SV) is the predominant method to quantify contributions of individual features to a ML model's output. Addressing the limitations of SVs in complex prediction models, Shapley Interactions (SIs) extend the SV to groups of features. In this work, we explain single graph predictions of GNNs with SIs that quantify node contributions and interactions among multiple nodes. By exploiting the GNN architecture, we show that the structure of interactions in node embeddings are preserved for graph prediction. As a result, the exponential complexity of SIs depends only on the receptive fields, i.e. the message-passing ranges determined by the connectivity of the graph and the number of convolutional layers. Based on our theoretical results, we introduce GraphSHAP-IQ, an efficient approach to compute any-order SIs exactly. GraphSHAP-IQ is applicable to popular message passing techniques in conjunction with a linear global pooling and output layer. We showcase that GraphSHAP-IQ substantially reduces the exponential complexity of computing exact SIs on multiple benchmark datasets. Beyond exact computation, we evaluate GraphSHAP-IQ's approximation of SIs on popular GNN architectures and compare with existing baselines. Lastly, we visualize SIs of real-world water distribution networks and molecule structures using a SI-Graph.","url_abs":"https://arxiv.org/abs/2501.16944v1","url_pdf":"https://arxiv.org/pdf/2501.16944v1.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":[],"tasks":[{"task_slug":"xai","task_name":"Explainable Artificial Intelligence (XAI)"},{"task_slug":"explainable-artificial-intelligence","task_name":"Explainable artificial intelligence"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2501.16944","atlas_url":"https://app.syntology.ai/?focus=2501.16944","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.16944"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/FFmgll/GraphSHAP-IQ","reach":null}],"summary":{"ran_honours":2,"ran_draft_wrong":1,"ran_violates":2,"ran_fixture":1,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":8,"ran":6,"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":8,"samples":[{"code_sha256_prefix":"14e52cf2e5dabcb3","entry":"count_interactions","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"14e52cf2e5dabcb3"}},{"code_sha256_prefix":"06f79ac14ebcac2c","entry":"generate_interaction_lookup","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"06f79ac14ebcac2c"}},{"code_sha256_prefix":"3e1a302d7440301e","entry":"get_bernoulli_weights","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3e1a302d7440301e"}},{"code_sha256_prefix":"c4f8361c51243c13","entry":"index_generalizes_bv","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c4f8361c51243c13"}},{"code_sha256_prefix":"f21bdac37289c58b","entry":"index_generalizes_sv","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f21bdac37289c58b"}},{"code_sha256_prefix":"f21e14f8bd8bb9c3","entry":"powerset","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f21e14f8bd8bb9c3"}},{"code_sha256_prefix":"7fbad39bae52c51e","entry":"ExactComputer","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7fbad39bae52c51e"}},{"code_sha256_prefix":"bbe6c88b2ba5fb40","entry":"InteractionValues","repo":"FFmgll/GraphSHAP-IQ","repo_kind":"found_in_text","path":"shapiq/exact.py","file_url":"https://github.com/FFmgll/GraphSHAP-IQ/blob/HEAD/shapiq/exact.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bbe6c88b2ba5fb40"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}