ChatPaper.aiChatPaper

RAG에서 풍부한 파라미터로: 언어 모델이 사실 질문에 대해 외부 지식과 파라미터 정보를 어떻게 활용하는지 탐구

From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queries

June 18, 2024
저자: Hitesh Wadhwa, Rahul Seetharaman, Somyaa Aggarwal, Reshmi Ghosh, Samyadeep Basu, Soundararajan Srinivasan, Wenlong Zhao, Shreyas Chaudhari, Ehsan Aghazadeh
cs.AI

초록

검색 증강 생성(Retrieval Augmented Generation, RAG)은 언어 모델이 외부 컨텍스트를 활용하여 사용자 프롬프트에 대한 응답을 보강하는 능력을 강화합니다. 이 접근 방식은 검색, 질문/응답, 챗봇 등 다양한 언어 모델 응용 분야에서의 실용적인 적용 가능성으로 인해 인기를 얻고 있습니다. 그러나 이 접근 방식이 정확히 어떻게 작동하는지는 명확히 이해되지 않고 있습니다. 본 논문에서는 RAG 파이프라인을 기계적으로 분석하여, 언어 모델이 단축 경로를 취하며 질문에 답할 때 컨텍스트 정보만을 활용하려는 강한 편향을 보이고, 매개변수적 메모리에 의존하는 정도는 최소화한다는 점을 강조합니다. 우리는 언어 모델의 이러한 기계적 행동을 다음과 같은 방법으로 탐구합니다: (i) 인과 매개 분석(Causal Mediation Analysis)을 통해 질문에 답할 때 매개변수적 메모리가 최소한으로 활용됨을 보이고, (ii) 주의 기여도(Attention Contributions)와 노크아웃(Knockouts)을 통해 마지막 토큰 잔류 스트림이 질문의 주제 토큰으로부터가 아니라 컨텍스트의 다른 정보성 토큰으로부터 보강됨을 보입니다. 우리는 이러한 단축 경로 행동이 LLaMa와 Phi 모델군 모두에서 두드러지게 나타남을 발견했습니다.
English
Retrieval Augmented Generation (RAG) enriches the ability of language models to reason using external context to augment responses for a given user prompt. This approach has risen in popularity due to practical applications in various applications of language models in search, question/answering, and chat-bots. However, the exact nature of how this approach works isn't clearly understood. In this paper, we mechanistically examine the RAG pipeline to highlight that language models take shortcut and have a strong bias towards utilizing only the context information to answer the question, while relying minimally on their parametric memory. We probe this mechanistic behavior in language models with: (i) Causal Mediation Analysis to show that the parametric memory is minimally utilized when answering a question and (ii) Attention Contributions and Knockouts to show that the last token residual stream do not get enriched from the subject token in the question, but gets enriched from other informative tokens in the context. We find this pronounced shortcut behaviour true across both LLaMa and Phi family of models.

Summary

AI-Generated Summary

PDF212December 4, 2024