about
Inseq: An Interpretability Toolkit for Sequence Generation Models (arxiv.org)
1 point by gsarti96 on Feb 28, 2023 | hide | past | pdf | discuss on HN

In plain words: A free Python library that shows which input words a text-generation model leaned on when writing each output word, making it easy to inspect models that write sentences rather than just classify them. Using it on translation systems exposed gender bias in their choices.

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.

Gabriele Sarti, Nils Feldhus, Ludwig Sickert, Oskar van der Wal, Malvina Nissim, Arianna Bisazza
arXiv:2302.13942 · cs.CL, cs.AI, cs.HC, cs.LG · submitted Feb 27, 2023 · updated May 27, 2023
abstract · pdf · html · ACL 2023 Demo Track. Library: https://github.com/inseq-team/inseq, Docs: https://inseq.readthedocs.io, v0.4

add comment on HN