English

Inseq: An Interpretability Toolkit for Sequence Generation Models

Computation and Language 2023-09-08 v3 Artificial Intelligence Human-Computer Interaction Machine Learning

Abstract

Past work in natural language processing interpretability focused mainly on popular classification tasks while largely overlooking generation settings, partly due to a lack of dedicated tools. In this work, we introduce Inseq, a Python library to democratize access to interpretability analyses of sequence generation models. Inseq enables intuitive and optimized extraction of models' internal information and feature importance scores for popular decoder-only and encoder-decoder Transformers architectures. We showcase its potential by adopting it to highlight gender biases in machine translation models and locate factual knowledge inside GPT-2. Thanks to its extensible interface supporting cutting-edge techniques such as contrastive feature attribution, Inseq can drive future advances in explainable natural language generation, centralizing good practices and enabling fair and reproducible model evaluations.

Keywords

Cite

@article{arxiv.2302.13942,
  title  = {Inseq: An Interpretability Toolkit for Sequence Generation Models},
  author = {Gabriele Sarti and Nils Feldhus and Ludwig Sickert and Oskar van der Wal and Malvina Nissim and Arianna Bisazza},
  journal= {arXiv preprint arXiv:2302.13942},
  year   = {2023}
}

Comments

ACL 2023 Demo Track. Library: https://github.com/inseq-team/inseq, Docs: https://inseq.readthedocs.io, v0.4

R2 v1 2026-06-28T08:50:48.463Z