ferret: a Framework for Benchmarking Explainers on Transformers
arXiv:2208.01575 · doi:10.18653/v1/2023.eacl-demo.29
Abstract
As Transformers are increasingly relied upon to solve complex NLP problems, there is an increased need for their decisions to be humanly interpretable. While several explainable AI (XAI) techniques for interpreting the outputs of transformer-based models have been proposed, there is still a lack of easy access to using and comparing them. We introduce ferret, a Python library to simplify the use and comparisons of XAI methods on transformer-based classifiers. With ferret, users can visualize and compare transformers-based models output explanations using state-of-the-art XAI methods on any free-text or existing XAI corpora. Moreover, users can also evaluate ad-hoc XAI metrics to select the most faithful and plausible explanations. To align with the recently consolidated process of sharing and using transformers-based models from Hugging Face, ferret interfaces directly with its Python library. In this paper, we showcase ferret to benchmark XAI methods used on transformers for sentiment analysis and hate speech detection. We show how specific methods provide consistently better explanations and are preferable in the context of transformer models.
11 pages, 3 figures. Accepted to EACL 2023 (System Demonstration). More details at https://github.com/g8a9/ferret
References in corpus (5)
- Captum: A unified and generic model interpretability library for PyTorch
- Understanding Neural Networks through Representation Erasure
- Post-hoc Interpretability for Neural NLP: A Survey
- OpenXAI: Towards a Transparent Evaluation of Model Explanations
- Inseq: An Interpretability Toolkit for Sequence Generation Models
Cited by in corpus (4)
- Toward Accurate Interpretable Predictions of Materials Properties within Transformer Language Models
- Inseq: An Interpretability Toolkit for Sequence Generation Models
- Clinical information extraction for Low-resource languages with Few-shot learning using Pre-trained language models and Prompting
- idMotif: An Interactive Motif Identification in Protein Sequences