ChatPaper.aiChatPaper

Van RAGs naar rijke parameters: Onderzoek naar hoe taalmodellen externe kennis benutten ten opzichte van parametrische informatie voor feitelijke vragen

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

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

Samenvatting

Retrieval Augmented Generation (RAG) verrijkt het vermogen van taalmodelen om te redeneren door externe context te gebruiken om antwoorden op een gegeven gebruikersprompt te versterken. Deze aanpak is in populariteit toegenomen vanwege praktische toepassingen in verschillende gebruiksscenario's van taalmodelen, zoals zoekopdrachten, vraag-antwoordsystemen en chatbots. Echter, de exacte werking van deze aanpak is niet duidelijk begrepen. In dit artikel onderzoeken we mechanistisch de RAG-pipeline om aan te tonen dat taalmodelen een kortere weg nemen en een sterke neiging hebben om alleen de contextinformatie te gebruiken om de vraag te beantwoorden, terwijl ze minimaal vertrouwen op hun parametrische geheugen. We onderzoeken dit mechanistische gedrag in taalmodelen met: (i) Causal Mediation Analysis om aan te tonen dat het parametrische geheugen minimaal wordt gebruikt bij het beantwoorden van een vraag en (ii) Attention Contributions en Knockouts om aan te tonen dat de laatste token-residualstream niet wordt verrijkt vanuit de onderwerptoken in de vraag, maar wel vanuit andere informatieve tokens in de context. We constateren dat dit uitgesproken shortcut-gedrag geldt voor zowel de LLaMa- als de Phi-familie van modellen.
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.
PDF212February 7, 2026