ferret: a Framework for Benchmarking Explainers on Transformers

Giuseppe Attanasio, Eliana Pastor, Chiara Di Bonaventura, Debora Nozza


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.
Anthology ID:
2023.eacl-demo.29
Volume:
Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations
Month:
May
Year:
2023
Address:
Dubrovnik, Croatia
Editors:
Danilo Croce, Luca Soldaini
Venue:
EACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
256–266
Language:
URL:
https://aclanthology.org/2023.eacl-demo.29
DOI:
10.18653/v1/2023.eacl-demo.29
Bibkey:
Cite (ACL):
Giuseppe Attanasio, Eliana Pastor, Chiara Di Bonaventura, and Debora Nozza. 2023. ferret: a Framework for Benchmarking Explainers on Transformers. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, pages 256–266, Dubrovnik, Croatia. Association for Computational Linguistics.
Cite (Informal):
ferret: a Framework for Benchmarking Explainers on Transformers (Attanasio et al., EACL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.eacl-demo.29.pdf
Video:
 https://aclanthology.org/2023.eacl-demo.29.mp4