{"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/arxiv-2508-07117","title":"From Nodes to Narratives: Explaining Graph Neural Networks with LLMs and Graph Context","arxiv_id":"2508.07117","date":"2025-08-09","proceeding":null,"authors":["Peyman Baghershahi","Gregoire Fournier","Pranav Nyati","Sourav Medya"],"abstract":"Graph Neural Networks (GNNs) have emerged as powerful tools for learning over structured data, including text-attributed graphs (TAGs), which are common in domains such as citation networks, social platforms, and knowledge graphs. GNNs are not inherently interpretable and thus, many explanation methods have been proposed. However, existing explanation methods often struggle to generate interpretable, fine-grained rationales, especially when node attributes include rich natural language. In this work, we introduce GSPELL, a lightweight, post-hoc framework that uses large language models (LLMs) to generate faithful and interpretable explanations for GNN predictions. GSPELL projects GNN node embeddings into the LLM embedding space and constructs hybrid prompts that interleave soft prompts with textual inputs from the graph structure. This enables the LLM to reason about GNN internal representations and to produce natural-language explanations, along with concise explanation subgraphs. Our experiments across real-world TAG datasets demonstrate that GSPELL achieves a favorable trade-off between fidelity and sparsity, while improving human-centric metrics such as insightfulness. GSPELL sets a new direction for LLM-based explainability in graph learning by aligning GNN internals with human reasoning.","url_abs":"https://arxiv.org/abs/2508.07117","url_pdf":"https://arxiv.org/pdf/2508.07117","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2508.07117","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2508.07117"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/pbaghershahi/GSPELL","reach":null}],"summary":{"ran":1,"ran_honours":2,"ran_fixture":6,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":13,"ran":10,"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":"c9d899319827f4ce","entry":"Explainer","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c9d899319827f4ce"}},{"code_sha256_prefix":"901114382f288e3d","entry":"JSE_global_global","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"901114382f288e3d"}},{"code_sha256_prefix":"576a73bfc0fba66b","entry":"JSE_local_global","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"576a73bfc0fba66b"}},{"code_sha256_prefix":"bd1249b06676ae83","entry":"JSE_local_global_negative_paired","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bd1249b06676ae83"}},{"code_sha256_prefix":"ed21ce959dfc96c3","entry":"JSE_loss","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed21ce959dfc96c3"}},{"code_sha256_prefix":"c00190ff2b30cf8d","entry":"NCE_loss","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c00190ff2b30cf8d"}},{"code_sha256_prefix":"be00994a4a3a1b02","entry":"NT_Xent","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"be00994a4a3a1b02"}},{"code_sha256_prefix":"6c5944959229bc01","entry":"get_expectation","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c5944959229bc01"}},{"code_sha256_prefix":"1f7c09370c4a5ec7","entry":"infoNCE_local_intra_node","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f7c09370c4a5ec7"}},{"code_sha256_prefix":"801ee12eba171cd5","entry":"mask_fn","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"801ee12eba171cd5"}},{"code_sha256_prefix":"2043ddad6e4ecbe7","entry":"KHopSampler","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.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":"2043ddad6e4ecbe7"}},{"code_sha256_prefix":"93766fcea251d9eb","entry":"TAGExplainer","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.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":"93766fcea251d9eb"}},{"code_sha256_prefix":"ff71bf49cbcabcf0","entry":"infoNCE_local_global","repo":"pbaghershahi/GSPELL","repo_kind":"found_in_text","path":"TAGE/tagexplainer.py","file_url":"https://github.com/pbaghershahi/GSPELL/blob/HEAD/TAGE/tagexplainer.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":"ff71bf49cbcabcf0"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_api"},"syntology_extracted_results":null}