Table of Contents
Fetching ...

Structure Your Data: Towards Semantic Graph Counterfactuals

Angeliki Dimitriou, Maria Lymperaiou, Giorgos Filandrianos, Konstantinos Thomas, Giorgos Stamou

TL;DR

The paper introduces semantic-graph counterfactual explanations for model-agnostic XAI by representing inputs as scene graphs and using a GNN to approximate Graph Edit Distance ($GED$) for efficient CE retrieval. It contributes a ground-truth GED construction strategy, a Siamese GNN to embed graphs, and a retrieval framework that yields minimal semantic edits, validated through extensive quantitative metrics and human studies across visual and non-visual modalities. Results show graph-based CEs outperform prior semantic and pixel-based approaches in fidelity, interpretability, and actionability, while remaining scalable and extensible to unannotated data. This work enables robust, human-aligned post-hoc explanations across domains, including vision and audio, with practical impact for debugging and trust in black-box models.

Abstract

Counterfactual explanations (CEs) based on concepts are explanations that consider alternative scenarios to understand which high-level semantic features contributed to particular model predictions. In this work, we propose CEs based on the semantic graphs accompanying input data to achieve more descriptive, accurate, and human-aligned explanations. Building upon state-of-the-art (SoTA) conceptual attempts, we adopt a model-agnostic edit-based approach and introduce leveraging GNNs for efficient Graph Edit Distance (GED) computation. With a focus on the visual domain, we represent images as scene graphs and obtain their GNN embeddings to bypass solving the NP-hard graph similarity problem for all input pairs, an integral part of the CE computation process. We apply our method to benchmark and real-world datasets with varying difficulty and availability of semantic annotations. Testing on diverse classifiers, we find that our CEs outperform previous SoTA explanation models based on semantics, including both white and black-box as well as conceptual and pixel-level approaches. Their superiority is proven quantitatively and qualitatively, as validated by human subjects, highlighting the significance of leveraging semantic edges in the presence of intricate relationships. Our model-agnostic graph-based approach is widely applicable and easily extensible, producing actionable explanations across different contexts.

Structure Your Data: Towards Semantic Graph Counterfactuals

TL;DR

The paper introduces semantic-graph counterfactual explanations for model-agnostic XAI by representing inputs as scene graphs and using a GNN to approximate Graph Edit Distance () for efficient CE retrieval. It contributes a ground-truth GED construction strategy, a Siamese GNN to embed graphs, and a retrieval framework that yields minimal semantic edits, validated through extensive quantitative metrics and human studies across visual and non-visual modalities. Results show graph-based CEs outperform prior semantic and pixel-based approaches in fidelity, interpretability, and actionability, while remaining scalable and extensible to unannotated data. This work enables robust, human-aligned post-hoc explanations across domains, including vision and audio, with practical impact for debugging and trust in black-box models.

Abstract

Counterfactual explanations (CEs) based on concepts are explanations that consider alternative scenarios to understand which high-level semantic features contributed to particular model predictions. In this work, we propose CEs based on the semantic graphs accompanying input data to achieve more descriptive, accurate, and human-aligned explanations. Building upon state-of-the-art (SoTA) conceptual attempts, we adopt a model-agnostic edit-based approach and introduce leveraging GNNs for efficient Graph Edit Distance (GED) computation. With a focus on the visual domain, we represent images as scene graphs and obtain their GNN embeddings to bypass solving the NP-hard graph similarity problem for all input pairs, an integral part of the CE computation process. We apply our method to benchmark and real-world datasets with varying difficulty and availability of semantic annotations. Testing on diverse classifiers, we find that our CEs outperform previous SoTA explanation models based on semantics, including both white and black-box as well as conceptual and pixel-level approaches. Their superiority is proven quantitatively and qualitatively, as validated by human subjects, highlighting the significance of leveraging semantic edges in the presence of intricate relationships. Our model-agnostic graph-based approach is widely applicable and easily extensible, producing actionable explanations across different contexts.
Paper Structure (59 sections, 4 equations, 25 figures, 17 tables)

This paper contains 59 sections, 4 equations, 25 figures, 17 tables.

Figures (25)

  • Figure 1: Examples where semantic graphs trump concept sets. Example 1 (top) shows the importance of the multiplicity of concepts for edit distance and example 2 (bottom) emphasizes the intricacy of relations. Edits (substitutions, insertions, deletions) are enclosed in striped rectangles. Images sourced from Visual Genome krishna2017visual, except unsafe driver Deccan.
  • Figure 2: Method outline (for image classifiers). Depicted stages directly correspond to Sec. \ref{['sec:method']} paragraphs. Predicted class labels are: A - query, B - target, $C_x$, $C_y$ - any class, others - random class instances. Graph $G'_{(B)}$ corresponds to counterfactual image $I'_{(B)}$.
  • Figure 3: Results for Rusty $\rightarrow$ Brewer Blackbird. Bold denotes best results (lowest number of edits and GED scores).
  • Figure 4: Qualitative results (best metrics in bold): VG-DENSE (left 3 columns) and VG-RANDOM (right 3 columns).
  • Figure 5: Graph edits (triples inserted/ deleted) to implement the 'pedestrian' $\rightarrow$ 'driver' transition. The yellow color distinguishes edge from node labels within a triple.
  • ...and 20 more figures