Loading…

Controllable Context Sensitivity and the Knob Behind It

When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering....

Full description

Saved in:
Bibliographic Details
Published in:arXiv.org 2024-11
Main Authors: Minder, Julian, Du, Kevin, Stoehr, Niklas, Monea, Giovanni, Wendler, Chris, West, Robert, Cotterell, Ryan
Format: Article
Language:English
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
cited_by
cites
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Minder, Julian
Du, Kevin
Stoehr, Niklas
Monea, Giovanni
Wendler, Chris
West, Robert
Cotterell, Ryan
description When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering. In this paper, we search for a knob which controls this sensitivity, determining whether language models answer from the context or their prior knowledge. To guide this search, we design a task for controllable context sensitivity. In this task, we first feed the model a context (Paris is in England) and a question (Where is Paris?); we then instruct the model to either use its prior or contextual knowledge and evaluate whether it generates the correct answer for both intents (either France or England). When fine-tuned on this task, instruction-tuned versions of Llama-3.1, Mistral-v0.3, and Gemma-2 can solve it with high accuracy (85-95%). Analyzing these high-performing models, we narrow down which layers may be important to context sensitivity using a novel linear time algorithm. Then, in each model, we identify a 1-D subspace in a single layer that encodes whether the model follows context or prior knowledge. Interestingly, while we identify this subspace in a fine-tuned model, we find that the exact same subspace serves as an effective knob in not only that model but also non-fine-tuned instruct and base models of that model family. Finally, we show a strong correlation between a model's performance and how distinctly it separates context-agreeing from context-ignoring answers in this subspace. These results suggest a single subspace facilitates how the model chooses between context and prior knowledge, hinting at a simple fundamental mechanism that controls this behavior.
format article
fullrecord <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_3128023072</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3128023072</sourcerecordid><originalsourceid>FETCH-proquest_journals_31280230723</originalsourceid><addsrcrecordid>eNqNikEKwjAQAIMgWLR_WPBcSDfW9GxRFI96Ly1daUpINNmK_t4KPsDTMMzMRIJK5Vm5QVyINMZBSolbjUWhEqEr7zh4a5vWEnyFXgwXctGweRp-Q-M64J7g7HwLO-rN5CdeifmtsZHSH5difdhfq2N2D_4xUuR68GNwU6pVjqVEJTWq_64P9O41Sg</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>3128023072</pqid></control><display><type>article</type><title>Controllable Context Sensitivity and the Knob Behind It</title><source>Publicly Available Content Database</source><creator>Minder, Julian ; Du, Kevin ; Stoehr, Niklas ; Monea, Giovanni ; Wendler, Chris ; West, Robert ; Cotterell, Ryan</creator><creatorcontrib>Minder, Julian ; Du, Kevin ; Stoehr, Niklas ; Monea, Giovanni ; Wendler, Chris ; West, Robert ; Cotterell, Ryan</creatorcontrib><description>When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering. In this paper, we search for a knob which controls this sensitivity, determining whether language models answer from the context or their prior knowledge. To guide this search, we design a task for controllable context sensitivity. In this task, we first feed the model a context (Paris is in England) and a question (Where is Paris?); we then instruct the model to either use its prior or contextual knowledge and evaluate whether it generates the correct answer for both intents (either France or England). When fine-tuned on this task, instruction-tuned versions of Llama-3.1, Mistral-v0.3, and Gemma-2 can solve it with high accuracy (85-95%). Analyzing these high-performing models, we narrow down which layers may be important to context sensitivity using a novel linear time algorithm. Then, in each model, we identify a 1-D subspace in a single layer that encodes whether the model follows context or prior knowledge. Interestingly, while we identify this subspace in a fine-tuned model, we find that the exact same subspace serves as an effective knob in not only that model but also non-fine-tuned instruct and base models of that model family. Finally, we show a strong correlation between a model's performance and how distinctly it separates context-agreeing from context-ignoring answers in this subspace. These results suggest a single subspace facilitates how the model chooses between context and prior knowledge, hinting at a simple fundamental mechanism that controls this behavior.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Algorithms ; Context ; Controllability ; Questions ; Sensitivity analysis ; Subspaces</subject><ispartof>arXiv.org, 2024-11</ispartof><rights>2024. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><linktohtml>$$Uhttps://www.proquest.com/docview/3128023072?pq-origsite=primo$$EHTML$$P50$$Gproquest$$Hfree_for_read</linktohtml><link.rule.ids>776,780,25731,36989,44566</link.rule.ids></links><search><creatorcontrib>Minder, Julian</creatorcontrib><creatorcontrib>Du, Kevin</creatorcontrib><creatorcontrib>Stoehr, Niklas</creatorcontrib><creatorcontrib>Monea, Giovanni</creatorcontrib><creatorcontrib>Wendler, Chris</creatorcontrib><creatorcontrib>West, Robert</creatorcontrib><creatorcontrib>Cotterell, Ryan</creatorcontrib><title>Controllable Context Sensitivity and the Knob Behind It</title><title>arXiv.org</title><description>When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering. In this paper, we search for a knob which controls this sensitivity, determining whether language models answer from the context or their prior knowledge. To guide this search, we design a task for controllable context sensitivity. In this task, we first feed the model a context (Paris is in England) and a question (Where is Paris?); we then instruct the model to either use its prior or contextual knowledge and evaluate whether it generates the correct answer for both intents (either France or England). When fine-tuned on this task, instruction-tuned versions of Llama-3.1, Mistral-v0.3, and Gemma-2 can solve it with high accuracy (85-95%). Analyzing these high-performing models, we narrow down which layers may be important to context sensitivity using a novel linear time algorithm. Then, in each model, we identify a 1-D subspace in a single layer that encodes whether the model follows context or prior knowledge. Interestingly, while we identify this subspace in a fine-tuned model, we find that the exact same subspace serves as an effective knob in not only that model but also non-fine-tuned instruct and base models of that model family. Finally, we show a strong correlation between a model's performance and how distinctly it separates context-agreeing from context-ignoring answers in this subspace. These results suggest a single subspace facilitates how the model chooses between context and prior knowledge, hinting at a simple fundamental mechanism that controls this behavior.</description><subject>Algorithms</subject><subject>Context</subject><subject>Controllability</subject><subject>Questions</subject><subject>Sensitivity analysis</subject><subject>Subspaces</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>PIMPY</sourceid><recordid>eNqNikEKwjAQAIMgWLR_WPBcSDfW9GxRFI96Ly1daUpINNmK_t4KPsDTMMzMRIJK5Vm5QVyINMZBSolbjUWhEqEr7zh4a5vWEnyFXgwXctGweRp-Q-M64J7g7HwLO-rN5CdeifmtsZHSH5difdhfq2N2D_4xUuR68GNwU6pVjqVEJTWq_64P9O41Sg</recordid><startdate>20241111</startdate><enddate>20241111</enddate><creator>Minder, Julian</creator><creator>Du, Kevin</creator><creator>Stoehr, Niklas</creator><creator>Monea, Giovanni</creator><creator>Wendler, Chris</creator><creator>West, Robert</creator><creator>Cotterell, Ryan</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PHGZM</scope><scope>PHGZT</scope><scope>PIMPY</scope><scope>PKEHL</scope><scope>PQEST</scope><scope>PQGLB</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20241111</creationdate><title>Controllable Context Sensitivity and the Knob Behind It</title><author>Minder, Julian ; Du, Kevin ; Stoehr, Niklas ; Monea, Giovanni ; Wendler, Chris ; West, Robert ; Cotterell, Ryan</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_31280230723</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Algorithms</topic><topic>Context</topic><topic>Controllability</topic><topic>Questions</topic><topic>Sensitivity analysis</topic><topic>Subspaces</topic><toplevel>online_resources</toplevel><creatorcontrib>Minder, Julian</creatorcontrib><creatorcontrib>Du, Kevin</creatorcontrib><creatorcontrib>Stoehr, Niklas</creatorcontrib><creatorcontrib>Monea, Giovanni</creatorcontrib><creatorcontrib>Wendler, Chris</creatorcontrib><creatorcontrib>West, Robert</creatorcontrib><creatorcontrib>Cotterell, Ryan</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>AUTh Library subscriptions: ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>ProQuest Central (New)</collection><collection>ProQuest One Academic (New)</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Middle East (New)</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Applied &amp; Life Sciences</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Minder, Julian</au><au>Du, Kevin</au><au>Stoehr, Niklas</au><au>Monea, Giovanni</au><au>Wendler, Chris</au><au>West, Robert</au><au>Cotterell, Ryan</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>Controllable Context Sensitivity and the Knob Behind It</atitle><jtitle>arXiv.org</jtitle><date>2024-11-11</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>When making predictions, a language model must trade off how much it relies on its context vs. its prior knowledge. Choosing how sensitive the model is to its context is a fundamental functionality, as it enables the model to excel at tasks like retrieval-augmented generation and question-answering. In this paper, we search for a knob which controls this sensitivity, determining whether language models answer from the context or their prior knowledge. To guide this search, we design a task for controllable context sensitivity. In this task, we first feed the model a context (Paris is in England) and a question (Where is Paris?); we then instruct the model to either use its prior or contextual knowledge and evaluate whether it generates the correct answer for both intents (either France or England). When fine-tuned on this task, instruction-tuned versions of Llama-3.1, Mistral-v0.3, and Gemma-2 can solve it with high accuracy (85-95%). Analyzing these high-performing models, we narrow down which layers may be important to context sensitivity using a novel linear time algorithm. Then, in each model, we identify a 1-D subspace in a single layer that encodes whether the model follows context or prior knowledge. Interestingly, while we identify this subspace in a fine-tuned model, we find that the exact same subspace serves as an effective knob in not only that model but also non-fine-tuned instruct and base models of that model family. Finally, we show a strong correlation between a model's performance and how distinctly it separates context-agreeing from context-ignoring answers in this subspace. These results suggest a single subspace facilitates how the model chooses between context and prior knowledge, hinting at a simple fundamental mechanism that controls this behavior.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2024-11
issn 2331-8422
language eng
recordid cdi_proquest_journals_3128023072
source Publicly Available Content Database
subjects Algorithms
Context
Controllability
Questions
Sensitivity analysis
Subspaces
title Controllable Context Sensitivity and the Knob Behind It
url http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-21T18%3A30%3A48IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=Controllable%20Context%20Sensitivity%20and%20the%20Knob%20Behind%20It&rft.jtitle=arXiv.org&rft.au=Minder,%20Julian&rft.date=2024-11-11&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E3128023072%3C/proquest%3E%3Cgrp_id%3Ecdi_FETCH-proquest_journals_31280230723%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_pqid=3128023072&rft_id=info:pmid/&rfr_iscdi=true