TextGenSHAP: 長文テキスト生成におけるスケーラブルな事後説明手法
TextGenSHAP: Scalable Post-hoc Explanations in Text Generation with Long Documents
December 3, 2023
著者: James Enouen, Hootan Nakhost, Sayna Ebrahimi, Sercan O Arik, Yan Liu, Tomas Pfister
cs.AI
要旨
大規模言語モデル(LLM)は、そのますます正確な応答と一貫した推論能力から、実用アプリケーションにおいて大きな関心を集めています。入力に対して複雑な推論プロセスを行うブラックボックスとしての性質上、LLMが生成するコンテンツに対するスケーラブルで忠実な説明の需要が今後も増え続けることは避けられません。過去10年間で、ニューラルネットワークモデルの説明可能性に関する大きな進展がありました。その中でも、事後説明手法、特にShapley値は、深層学習モデルを解釈する上で有効であることが証明されています。しかし、LLMに対してShapley値をスケールアップする際には、数千のトークンを含む長い入力コンテキストや自己回帰的に生成される出力シーケンスを扱う場合に大きな課題があります。さらに、生成された説明を効果的に活用してLLMの性能を向上させる方法がしばしば不明確です。本論文では、LM固有の技術を組み込んだ効率的な事後説明手法であるTextGenSHAPを紹介します。これにより、従来のShapley値計算と比較して速度が大幅に向上し、トークンレベルの説明では処理時間が数時間から数分に、ドキュメントレベルの説明ではわずか数秒に短縮されることを示します。さらに、リアルタイムのShapley値を2つの重要なシナリオで活用する方法を示します。長文の質問応答において重要な単語や文を特定することで理解を深めること、および既存の文書検索システムを改善し、選択されたパッセージの精度を高め、最終的な応答を向上させることです。
English
Large language models (LLMs) have attracted huge interest in practical
applications given their increasingly accurate responses and coherent reasoning
abilities. Given their nature as black-boxes using complex reasoning processes
on their inputs, it is inevitable that the demand for scalable and faithful
explanations for LLMs' generated content will continue to grow. There have been
major developments in the explainability of neural network models over the past
decade. Among them, post-hoc explainability methods, especially Shapley values,
have proven effective for interpreting deep learning models. However, there are
major challenges in scaling up Shapley values for LLMs, particularly when
dealing with long input contexts containing thousands of tokens and
autoregressively generated output sequences. Furthermore, it is often unclear
how to effectively utilize generated explanations to improve the performance of
LLMs. In this paper, we introduce TextGenSHAP, an efficient post-hoc
explanation method incorporating LM-specific techniques. We demonstrate that
this leads to significant increases in speed compared to conventional Shapley
value computations, reducing processing times from hours to minutes for
token-level explanations, and to just seconds for document-level explanations.
In addition, we demonstrate how real-time Shapley values can be utilized in two
important scenarios, providing better understanding of long-document question
answering by localizing important words and sentences; and improving existing
document retrieval systems through enhancing the accuracy of selected passages
and ultimately the final responses.