Manuscript Offprint

arXiv:2608.25922

Query-Side Attacks on GNN-Based KGQA: Tracing Failures from Entity Linking to Answer Generation

Pankaj Kumar, Subhankar Mishra

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

GNN-based Knowledge Graph Question Answering (KGQA) pipelines process queries through four discrete stages: entity linking, subgraph retrieval, GNN reasoning, and answer generation. Standard robustness evaluations conflate stage-level failures into a single end-to-end metric, obscuring both the source of brittleness and the appropriate mitigation target. We ask which stage fails, and why, when the pipeline is subjected to adversarial perturbations on the input question. We introduce a stage-isolation protocol with two answer-preserving adversarial perturbations verified against the knowledge graph: Compositional Restructuring (CR) and Relation Synonym Swap (RS) target distinct stages while leaving entity seeds intact. Evaluated across ComplexWebQuestions and WebQSP, the results run counter to prevailing assumptions: the GNN reasoning stage retains near-baseline accuracy when the subgraph is intact, while subgraph construction accounts for over 99% of the end-to-end collapse under CR, occurring even when the gold answer is present in 74% of retrieved subgraphs. This exposes a fundamental distinction between answer presence and answer reachability that end-to-end metrics cannot detect, and places the mitigation target firmly at the subgraph construction stage rather than the reasoning model. Perturbed datasets and evaluation infrastructure are released at https://anonymous.4open.science/r/atkgrag-E85C.

1 Introduction

Knowledge graph question answering (KGQA) has become a core benchmark for structured reasoning: given a natural-language question and a large knowledge graph (KG) such as Freebase, the system must find the answer entity by traversing multihop relational paths (Sun et al., 2018; Saxena et al., 2020; Zhang et al., 2022). GNN-based pipelines have pushed state-of-the-art accuracy by coupling a graph neural network (GNN) reasoner with a retrieval-augmented generation (RAG) framework, achieving strong results on ComplexWebQuestions (CWQ) and WebQSP (Mavromatis and Karypis, 2024).

The path from question to answer runs through four discrete stages: Entity Linking, Subgraph Retrieval, GNN reasoning, and Answer generation. Each stage can fail independently and pass corrupted outputs to the next. An adversary who reformulates the query without touching the KG or model can trigger a cascade of failures through this pipeline. Figure 1 shows the four stages and their distinct attack surfaces.

Most robustness work on RAG focuses on corpus-side attacks: poisoning the retrieval index (Zhong et al., 2023; Zou et al., 2025; Chaudhari et al., 2024), injecting adversarial passages (Perez and Ribeiro, 2022; Shi et al., 2023), or manipulating retrieved context (Xue et al., 2024). These require the adversary to write to the KG or corpus, a strong and often unrealistic capability. Existing KGQA robustness studies (Perçin et al., 2025) have explored entity surface-form noise and relation paraphrase perturbations but have not measured which pipeline stage fails first, nor how that failure propagates downstream.

We conduct the first systematic, stage-resolved robustness study of a GNN-based KGQA pipeline. The adversary needs only the ability to submit a question, with no KG access or model internals. To attribute failures to the correct stage, we introduce a stage-isolation protocol: fix upstream outputs, perturb only the query, and measure per-stage degradation separately. Two attacks probe distinct stages: Compositional Restructuring (CR) rewrites the question via hop-order reversal or constraint injection, leaving entity mentions intact and preserving the SPARQL answer; Relation Synonym Swap (RS) replaces predicate surface forms with synonyms while keeping entity mentions unchanged.

Figure

Figure 1: GNN-RAG pipeline and perturbation entry points. The pipeline ( fEL→fSR→fGR→fAGf_{EL} \rightarrow f_{SR} \rightarrow f_{GR} \rightarrow f_{AG}) maps question q to answer a^\hat{a}. ES targets fELf_{EL} (entity swap ⇒\Rightarrow ELQ seed failure). CR targets fSRf_{SR} (hop-order reversal ⇒\Rightarrow topology mismatch). RS targets fGRf_{GR} (predicate synonym ⇒\Rightarrow instruction drift). Dashed grey arrows: q feeds all stages directly.

Entity Swap (ES) is a diagnostic perturbation (Appendix D) that changes the gold answer by design and characterises entity-linker brittleness.

Under CR, subgraphs built from the ELQ entity linker (Li et al., 2020a) contain the gold answer in 74% of cases yet GNN-RAG achieves only 0.68% EM (Exact Match) on CWQ, the answer is present but Personalized-PageRank (PPR) retrieval topology is anchored to the original reasoning chain. GraftNet's question-embedding-weighted PPR achieves 29.82% EM at 63.3% answer coverage, higher EM than ELQ's 0.68% despite lower coverage (63.3% vs. 74%), because it reorients PPR mass toward the restructured reasoning chain rather than the original one. Under RS the ELQ subgraph is structurally unchanged, so RS ELQ EM (20.3% CWQ, 50.9% WebQSP) measures GNN instruction decoder sensitivity in near-isolation. Path injection at inference recovers 51.4% CWQ EM under CR without fine-tuning, matching or exceeding the relation-path-augmented model. EPR-KGQA (single-shot pattern-based retrieval) retains near-baseline accuracy under both attacks; ExplaiGNN (iterative pattern-matching, Wikidata) collapses like GNN-RAG, showing robustness requires single-shot rather than PPR-free retrieval (Ding et al., 2024; Christmann et al., 2023).

Contributions.

  1. Stage-isolation framework. A protocol and two adversarial perturbation types (CR, RS) that probe distinct pipeline stages, enabling per-stage degradation measurement ( ΔEL\Delta_{EL}, ΔSR\Delta_{SR}, ΔAG\Delta_{AG} defined in §4.1) on standard KGQA benchmarks.

  2. Answer presence ≠\neq answer reachability. Under CR, 74% subgraph answer presence yields only 0.68% EM (CWQ); GraftNet (GEM: Golden Entity Map oracle seeds) at 63.3% coverage reaches 29.82% EM because its PPR topology aligns with the restructured reasoning chain.

  3. Subgraph construction is the performance ceiling. Stage-isolation attributes 52.08 percentage points (pp) of the 52.22 pp total CR CWQ drop to subgraph topology failure; the GNN instruction decoder is robust when the subgraph is intact (52.76% CWQ EM on clean subgraph + CR question).

  4. Inference-time path injection recovers most of the gain. Injecting predicted relation paths at inference (no fine-tuning) recovers 51.4% CWQ EM under CR, matching or exceeding relation-path-augmented fine-tuning.

References (57)