Table of Contents
Fetching ...

EvalxNLP: A Framework for Benchmarking Post-Hoc Explainability Methods on NLP Models

Mahdi Dhaini, Kafaite Zahra Hussain, Efstratios Zaradoukas, Gjergji Kasneci

TL;DR

EvalxNLP tackles the lack of standardized evaluation for post-hoc explanations in NLP by offering a unified benchmarking framework for eight feature attribution methods on transformer-based classifiers. It jointly evaluates faithfulness, plausibility, and complexity, and augments explanations with LLM-generated natural language clarifications to aid user understanding. The framework integrates gradient-based and perturbation-based explainers via established libraries, provides NLP-specific metrics, and includes rationale-annotated datasets such as MovieReviews, HateXplain, and e-SNLI. Case studies and human evaluations indicate varying strengths across explainers and overall usability, underscoring the need to tailor explanation methods to task goals and user needs. EvalxNLP thus advances transparent, accessible XAI in NLP and supports systematic comparison and development of explainability techniques.

Abstract

As Natural Language Processing (NLP) models continue to evolve and become integral to high-stakes applications, ensuring their interpretability remains a critical challenge. Given the growing variety of explainability methods and diverse stakeholder requirements, frameworks that help stakeholders select appropriate explanations tailored to their specific use cases are increasingly important. To address this need, we introduce EvalxNLP, a Python framework for benchmarking state-of-the-art feature attribution methods for transformer-based NLP models. EvalxNLP integrates eight widely recognized explainability techniques from the Explainable AI (XAI) literature, enabling users to generate and evaluate explanations based on key properties such as faithfulness, plausibility, and complexity. Our framework also provides interactive, LLM-based textual explanations, facilitating user understanding of the generated explanations and evaluation outcomes. Human evaluation results indicate high user satisfaction with EvalxNLP, suggesting it is a promising framework for benchmarking explanation methods across diverse user groups. By offering a user-friendly and extensible platform, EvalxNLP aims at democratizing explainability tools and supporting the systematic comparison and advancement of XAI techniques in NLP.

EvalxNLP: A Framework for Benchmarking Post-Hoc Explainability Methods on NLP Models

TL;DR

EvalxNLP tackles the lack of standardized evaluation for post-hoc explanations in NLP by offering a unified benchmarking framework for eight feature attribution methods on transformer-based classifiers. It jointly evaluates faithfulness, plausibility, and complexity, and augments explanations with LLM-generated natural language clarifications to aid user understanding. The framework integrates gradient-based and perturbation-based explainers via established libraries, provides NLP-specific metrics, and includes rationale-annotated datasets such as MovieReviews, HateXplain, and e-SNLI. Case studies and human evaluations indicate varying strengths across explainers and overall usability, underscoring the need to tailor explanation methods to task goals and user needs. EvalxNLP thus advances transparent, accessible XAI in NLP and supports systematic comparison and development of explainability techniques.

Abstract

As Natural Language Processing (NLP) models continue to evolve and become integral to high-stakes applications, ensuring their interpretability remains a critical challenge. Given the growing variety of explainability methods and diverse stakeholder requirements, frameworks that help stakeholders select appropriate explanations tailored to their specific use cases are increasingly important. To address this need, we introduce EvalxNLP, a Python framework for benchmarking state-of-the-art feature attribution methods for transformer-based NLP models. EvalxNLP integrates eight widely recognized explainability techniques from the Explainable AI (XAI) literature, enabling users to generate and evaluate explanations based on key properties such as faithfulness, plausibility, and complexity. Our framework also provides interactive, LLM-based textual explanations, facilitating user understanding of the generated explanations and evaluation outcomes. Human evaluation results indicate high user satisfaction with EvalxNLP, suggesting it is a promising framework for benchmarking explanation methods across diverse user groups. By offering a user-friendly and extensible platform, EvalxNLP aims at democratizing explainability tools and supporting the systematic comparison and advancement of XAI techniques in NLP.
Paper Structure (13 sections, 3 figures, 1 table)

This paper contains 13 sections, 3 figures, 1 table.

Figures (3)

  • Figure 1: (Zoom in for a better view): (a) heatmap of the importance scores generated by the explainers for the single misclassified instance A masterpiece of how not to make a movie and (b) LLM-generated textual explanation for the scores by SHAP
  • Figure 2: Evaluation metrics results from EvalxNLP for the explainers on the MovieReviews dataset with best scores in bold. Darker colors refer to better values for each metric, and bold refers to the best value per metric.
  • Figure 3: Zoom in for a better view) (a) Bar chart for the demographics and background information of the participants in the human evaluation. (b) Radar chart presenting the results of the human evaluation. Responses on framework comparison were collected only from participants who confirmed prior experience using other tools (2 participants for lower NLP experience and 9 participants for higher NLP experience).