Skip to main content
QUICK REVIEW

[논문 리뷰] Inseq: An Interpretability Toolkit for Sequence Generation Models

Gabriele Sarti, Nils Feldhus|arXiv (Cornell University)|2023. 02. 27.
Topic ModelingComputer Science참고 문헌 75인용 수 7
한 줄 요약

Inseq는 sequence generation 모델에 대해 접근 가능하고 확장 가능한 해석 가능성 도구를 제공하는 Python 라이브러리로, decoder-only 및 encoder-decoder Transformers에 대한 attribution 분석, constrained decoding, 그리고 데이터셋 전체 평가를 가능하게 합니다.

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, 코드 합성, 대화)에 대한 해석 가능성을 민주화한다.
  • gradient-based, internals-based, perturbation-based를 포함한 다수의 특징 기여 방법을 decoder-only 및 encoder-decoder Transformers에 통합한다.
  • 확장 가능하고 재현 가능한 워크플로를 통해 편향(bias), 지식 로컬화와 같은 실용적인 분석을 지원한다.
  • 사용자 친화적 인터페이스(CLI, 배칭, 시각화)와 constrained decoding을 제공하여 견고한 실험을 가능하게 한다.

제안 방법

  • Transformers의 시퀀스 모델과 Captum의 attribution 방법을 결합한 모듈형 인터페이스를 제공한다.
  • gradient-, internals-, 및 perturbation-based attribution을 지원하고, 어텐션과 Discretized Integrated Gradients를 포함한다.
  • subword 또는 임베딩 수준의 점수를 토큰 수준의 설명으로 매핑하는 후처리 애그리게이터를 포함한다.
  • 제한된 디코딩과 맞춤형 attribution 대상(예: 대조 출력, 불확실성 점수)을 가능하게 한다.
  • 배칭, 구간 중심의 attribution, 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단일화된 도구 모음이 시퀀스 생성 작업 전반에 걸친 attribution 분석을 어떻게 단순화하고 표준화할 수 있을까?
  • RQ2생성 설정에서 decoder-only 및 encoder-decoder 트랜스포머에 대해 어떤 attribution 방법이 가장 신뢰할 수 있고 정보성이 높은가?
  • RQ3효율적인 기법을 사용해 attribution 분석이 편향(예: MT의 성별 편향)이나 대형 언어 모델의 사실 지식을 찾아낼 수 있는가?
  • RQ4대규모 해석 가능성 연구를 가장 잘 지원하는 사용 편의 기능(배칭, 제한된 디코딩, 시각화)은 무엇인가?

주요 결과

  • IG, Gradients, I×G를 포함한 attribution 방법과 확률 지표를 사용하여 Turkish→English MT에서 성별 편향 분석을 시연한다.
  • 일부 attribution 점수와 직업에 대한 노동 통계의 상관관계를 보여주어 편향 탐지에서 대조적 접근을 뒷받침한다.
  • GPT-2에서 layer-gradient×activation을 통해 사실 지식 구성요소를 위치시키는 Contrastive Attribution Tracing (CAT)을 도입하여 효율적인 지식 로컬라이제이션을 달성한다.
  • 제한된 decoding, 표적 기반 attribution, 그리고 토큰- 또는 문장 단위의 해석 가능한 설명을 생성하기 위한 집계 파이프라인과 같은 실용적인 기능을 제공한다.
  • 대형 모델에서 attribution에 대해 8비트 양자화 호환성을 검증하고 전체 정밀도에 비해 attribution 차이가 최소화된다.
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가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.