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
초록
대규모 언어 모델(LLMs)은 점점 더 정확한 응답과 일관된 추론 능력으로 인해 실용적인 응용 분야에서 큰 관심을 끌고 있다. 복잡한 추론 과정을 통해 입력을 처리하는 블랙박스 특성을 고려할 때, LLMs가 생성한 콘텐츠에 대한 확장 가능하고 신뢰할 수 있는 설명에 대한 수요는 계속 증가할 것으로 예상된다. 지난 10년 동안 신경망 모델의 설명 가능성에 관한 주요 발전이 있었다. 그 중에서도 사후 설명 방법(post-hoc explainability methods), 특히 샤플리 값(Shapley values)은 딥러닝 모델을 해석하는 데 효과적인 것으로 입증되었다. 그러나 LLMs에 대한 샤플리 값을 확장하는 데는 주요한 과제가 있다. 특히 수천 개의 토큰을 포함하는 긴 입력 문맥과 자동회귀적으로 생성된 출력 시퀀스를 다룰 때 이러한 문제가 두드러진다. 또한 생성된 설명을 효과적으로 활용하여 LLMs의 성능을 개선하는 방법이 종종 명확하지 않다. 본 논문에서는 LM 특화 기술을 통합한 효율적인 사후 설명 방법인 TextGenSHAP을 소개한다. 이 방법은 기존의 샤플리 값 계산에 비해 속도를 크게 향상시켜, 토큰 수준 설명의 처리 시간을 몇 시간에서 몇 분으로, 문서 수준 설명의 처리 시간을 단 몇 초로 단축한다. 또한, 실시간 샤플리 값을 두 가지 중요한 시나리오에서 활용하는 방법을 보여준다. 첫째, 중요한 단어와 문장을 지역화하여 장문 질문 응답에 대한 이해를 개선하고, 둘째, 선택된 구절의 정확도를 향상시켜 기존 문서 검색 시스템을 개선함으로써 궁극적으로 최종 응답의 질을 높이는 것이다.
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.