SyntaxShap: Syntax-aware Explainability Method for Text Generation

Kenza Amara, Rita Sevastjanova, Mennatallah El-Assady
2/14/2024
cs.CLcs.AI

No official code found. Best implementation: k-amara/syntax-shap (5 stars, MIT, last commit 2024-07-31).

Abstract

To harness the power of large language models in safety-critical domains, we need to ensure the explainability of their predictions. However, despite the significant attention to model interpretability, there remains an unexplored domain in explaining sequence-to-sequence tasks using methods tailored for textual data. This paper introduces SyntaxShap, a local, model-agnostic explainability method for text generation that takes into consideration the syntax in the text data. The presented work extends Shapley values to account for parsing-based syntactic dependencies. Taking a game theoric approach, SyntaxShap only considers coalitions constraint by the dependency tree. We adopt a model-based evaluation to compare SyntaxShap and its weighted form to state-of-the-art explainability methods adapted to text generation tasks, using diverse metrics including faithfulness, coherency, and semantic alignment of the explanations to the model. We show that our syntax-aware method produces explanations that help build more faithful and coherent explanations for predictions by autoregressive models. Confronted with the misalignment of human and AI model reasoning, this paper also highlights the need for cautious evaluation strategies in explainable AI.

View on arXivView PDF

Code Implementations(1)

k-amara/syntax-shapCommunity100%
MIT
51Python, Jupyter NotebookJan 18, 20242 years agoMIT

Similar Papers

Cite this paper

@article{amara2024syntaxshap,
  title  = {SyntaxShap: Syntax-aware Explainability Method for Text Generation},
  author = {Kenza Amara and Rita Sevastjanova and Mennatallah El-Assady},
  year   = {2024},
  eprint = {2402.09259},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.09259v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.09259.svg)](https://codeofpaper.com/paper/2402.09259)

Discussion