Graph-Guided Textual Explanation Generation Framework

Shuzhou Yuan, Jingyi Sun, Ran Zhang, Michael Färber, Steffen Eger, Pepa Atanasova, Isabelle Augenstein

Abstract

Natural language explanations (NLEs) are commonly used to provide plausible free-text explanations of a model’s reasoning about its predictions. However, recent work has questioned their faithfulness, as they may not accurately reflect the model’s internal reasoning process regarding its predicted answer. In contrast, highlight explanations–input fragments critical for the model’s predicted answers–exhibit measurable faithfulness. Building on this foundation, we propose G-TEx, a Graph-Guided Textual Explanation Generation framework designed to enhance the faithfulness of NLEs. Specifically, highlight explanations are first extracted as faithful cues reflecting the model’s reasoning logic toward answer prediction. They are subsequently encoded through a graph neural network layer to guide the NLE generation, which aligns the generated explanations with the model’s underlying reasoning toward the predicted answer. Experiments on both encoder-decoder and decoder-only models across three reasoning datasets demonstrate that G-TEx improves NLE faithfulness by up to 12.18% compared to baseline methods. Additionally, G-TEx generates NLEs with greater semantic and lexical similarity to human-written ones. Human evaluations show that G-TEx can decrease redundant content and enhance the overall quality of NLEs. Our work presents a novel method for explicitly guiding NLE generation to enhance faithfulness, serving as a foundation for addressing broader criteria in NLE and generated text.

Introduction

In the quest for Explainable AI (XAI), researchers often utilize Natural Language Explanations (NLEs)—free-text sentences that justify a model's decision. While NLEs are intuitive for humans, they frequently suffer from a "faithfulness" problem: the generated explanation may sound plausible but fail to reflect the model's actual internal decision-making process. This discrepancy can lead to "hallucinated" reasoning that misleads users.

Comparison of standard Language Model vs. G-TEx reasoning. G-TEx uses token interactions to anchor the explanation in the model's actual evidence.

Conversely, "highlight explanations"—identifying specific tokens or phrases in the input that triggered a prediction—are highly faithful but lack the narrative flow and context that humans find useful. G-TEx (Graph-Guided Textual Explanation Generation) bridges this gap by using faithful highlight cues as structural anchors to guide the generation of human-readable NLEs.

Methodology

The G-TEx framework introduces a structured approach to explanation generation through a four-step pipeline designed to align textual output with internal logic.

The four-step G-TEx pipeline: Base model training, Highlight extraction, Graph structure construction, and GNN integration.
  1. Base Model Training: A standard language model (such as T5 or BART) is trained on a specific reasoning task (e.g., Natural Language Inference).
  2. Highlight Extraction: Post-hoc attribution methods are used to identify critical input fragments. The framework supports three types: Highlight Tokens (individual words), Token Interactions (pairs of words across segments), and Span Interactions (coherent phrases).
  3. Graph Construction: These highlights are converted into a reasoning graph where tokens serve as nodes and their logical relationships serve as edges.
  4. GNN Integration: A Graph Neural Network (GNN) layer is injected into the language model—specifically at the 3/4-th mark of the encoder layers. This GNN encodes the reasoning graph and passes augmented representations back into the transformer blocks to guide the final generation.

Key Results and Discussion

The framework was evaluated on three major reasoning benchmarks: e-SNLI, ComVE, and ECQA.

Improved Faithfulness

G-TEx significantly reduced "Total Unfaithfulness" (measured via counterfactual tests) by up to 12.18% compared to standard fine-tuning and prompting baselines. For instance, on the e-SNLI dataset using a BART-based model, unfaithfulness dropped from 22.52% in the baseline to 14.75% with G-TEx. This demonstrates that anchoring the model to a reasoning graph forces the generated text to stay "truthful" to the evidence.

High Linguistic Quality

Despite the added structural constraints, the linguistic quality of the NLEs improved. G-TEx achieved higher SacreBLEU and BERTScore results across datasets, indicating that the generated explanations were more similar to human-written gold standards. Human evaluations further confirmed that G-TEx explanations were less redundant and of higher overall quality than those from baseline models.

Architectural Versatility

While primarily tested on encoder-decoder models like T5 and BART, the authors demonstrated that G-TEx is architecture-agnostic, showing successful implementation in decoder-only models like Llama-3 and long-context models like LED.

Conclusion

G-TEx presents a novel method for explicitly guiding NLE generation to enhance faithfulness. By treating highlight explanations as a structural constraint rather than just an output, the framework ensures that AI explanations are both human-friendly and technically accurate. Future research will explore weighted edges in reasoning graphs and broader applications in diverse generative tasks.

Summary updated

BibTeX
@misc{yuan2024graph,
  author = {Shuzhou Yuan and Jingyi Sun and Ran Zhang and Michael Färber and Steffen Eger and Pepa Atanasova and Isabelle Augenstein},
  title = {{Graph-Guided Textual Explanation Generation Framework}},
  year = {2024},
  eprint = {2412.12318},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.12318},
}
Figure