Skip to main content
QUICK REVIEW

[論文レビュー] Inseq: An Interpretability Toolkit for Sequence Generation Models

Gabriele Sarti, Nils Feldhus|arXiv (Cornell University)|Feb 27, 2023
Topic Modeling参考文献 75被引用数 7
ひとこと要約

Inseqは、デコーダーのみおよびエンコーダ-デコーダーTransformersに対する帰属分析、制約付きデコoding、およびデータセット全体の評価を可能にする、アクセスしやすく拡張可能な解釈可能性ツールを提供するPythonライブラリです。

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.

研究の動機と目的

  • シーケンス生成モデル(例:MT、コード生成、対話)に対する解釈可能性をユニバーサルで拡張可能なツールキットとして民主化する。
  • デコーダーのみおよびエンコーダ-デコーダーTransformersのために、複数の特徴帰属手法(勾配ベース、内部ベース、摂動ベース)を統合する。
  • 実践的な分析(バイアス、知識のローカリゼーション)を、拡張性があり再現可能なワークフローでサポートする。
  • ユーザフレンドリーなインターフェース(CLI、バッチ処理、ビジュアライゼーション)と制約付きデコードを提供し、堅牢な実験を可能にする。

提案手法

  • TransformersのシーケンスモデルとCaptumの帰属手法を組み合わせたモジュール的インターフェースを提供する。
  • 勾配-, 内部-, 摂動ベースの帰属をサポートし、注意機構とDiscretized Integrated Gradientsを含む。
  • サブワードや埋め込みレベルのスコアをトークンレベルの説明へマッピングするポスト処理アグリゲータを含む。
  • 制約付きデコードと、対比的出力や不確実性スコアなどのカスタム帰属ターゲットを有効にする。
  • 再現性のある分析のためのバッチ処理、スパン集中の帰属、CLIアクセス、JSONシリアライズ、ビジュアライゼーションを提供する。
Figure 1: Feature importance and next-step probability extraction and visualization using Inseq with a Transformers causal language model.
Figure 1: Feature importance and next-step probability extraction and visualization using Inseq with a Transformers causal language model.

実験結果

リサーチクエスチョン

  • RQ1統一されたツールキットは、シーケンス生成タスク全体の帰属分析をどのように単純化・標準化できるか。
  • RQ2生成設定におけるデコーダーのみおよびエンコーダ-デコーダーTransformersにとって、どの帰属手法が最も信頼性が高く有用か。
  • RQ3帰属分析は、バイアス(例:MTでの性別バイアス)を明らかにしたり、大規模言語モデルの事実知識を効率的な手法で特定したりできるか。
  • RQ4大規模な解釈可能性研究を支援するための使いやすい機能(バッチ処理、制約付きデコード、ビジュアライゼーション)はどれが最も効果的か。

主な発見

  • 帰属手法(IG、Gradients、I×G)と確率指標を用いたトルコ語→英語MTでの性別バイアス分析を実演。
  • 特定の帰属スコアと職業の労働統計との相関を示し、バイアス検出における対比的アプローチを支持。
  • Contrastive Attribution Tracing(CAT)を導入し、GPT-2における層勾配×活性化で事実知識成分を特定する知識ローカリゼーションを効率化。
  • 制約付きデコード、ターゲットベースの帰属、集約パイプラインなど、解釈可能なトークンレベルまたは文レベルの説明を生成する実用的機能を提供。
  • 大規模モデルでの attribution の8-bit量子化互換性を検証し、完全精度と比較して最小の帰属差で済むことを示す。
Figure 2: Computing and visualizing source and target-side attributions using Flan-T5 (Chung et al., 2022 ) .
Figure 2: Computing and visualizing source and target-side attributions using Flan-T5 (Chung et al., 2022 ) .

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。