Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification

Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing lit...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Liu, Shang, Cai, Zhongze, Chen, Guanting, Li, Xiaocheng
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Liu, Shang
Cai, Zhongze
Chen, Guanting
Li, Xiaocheng
description Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing literature, we consider a bi-objective prediction task of predicting both the conditional expectation $\mathbb{E}[Y|X]$ and the conditional variance Var$(Y|X)$. This additional uncertainty quantification objective provides a handle to (i) better design out-of-distribution experiments to distinguish ICL from in-weight learning (IWL) and (ii) make a better separation between the algorithms with and without using the prior information of the training distribution. Theoretically, we show that the trained Transformer reaches near Bayes-optimum, suggesting the usage of the information of the training distribution. Our method can be extended to other cases. Specifically, with the Transformer's context window $S$, we prove a generalization bound of $\tilde{\mathcal{O}}(\sqrt{\min\{S, T\}/(n T)})$ on $n$ tasks with sequences of length $T$, providing sharper analysis compared to previous results of $\tilde{\mathcal{O}}(\sqrt{1/n})$. Empirically, we illustrate that while the trained Transformer behaves as the Bayes-optimal solution as a natural consequence of supervised training in distribution, it does not necessarily perform a Bayesian inference when facing task shifts, in contrast to the \textit{equivalence} between these two proposed in many existing literature. We also demonstrate the trained Transformer's ICL ability over covariates shift and prompt-length shift and interpret them as a generalization over a meta distribution.
doi_str_mv 10.48550/arxiv.2405.15115
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2405_15115</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2405_15115</sourcerecordid><originalsourceid>FETCH-LOGICAL-a675-868435b92ccb0e80c687600d78f23d7689e7f050787eb989efca47c43c70be023</originalsourceid><addsrcrecordid>eNpNj8lqwzAURbXJoiT9gK6qH7D7PMiSl6npEDCUgrM2z9JTESRSkdU2-fsmaRdZXe7AhcPYXQF5rYSAB4wH952XNYi8EEUhbpgdwg9GM_NHSoki33pDcU7ojfMfPFi-8VkXfKJD4j1h9Od4PbmdS0duY9hfD7ZeU0zo_Kl7_0KfnHUakwt-xRYWdzPd_uuSDc9PQ_ea9W8vm27dZ9hIkalG1ZWY2lLrCUiBbpRsAIxUtqyMbFRL0oIAqSRN7clZjbXUdaUlTARltWT3f7cX0PEzuj3G43gGHi_A1S9AhVHB</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification</title><source>arXiv.org</source><creator>Liu, Shang ; Cai, Zhongze ; Chen, Guanting ; Li, Xiaocheng</creator><creatorcontrib>Liu, Shang ; Cai, Zhongze ; Chen, Guanting ; Li, Xiaocheng</creatorcontrib><description>Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing literature, we consider a bi-objective prediction task of predicting both the conditional expectation $\mathbb{E}[Y|X]$ and the conditional variance Var$(Y|X)$. This additional uncertainty quantification objective provides a handle to (i) better design out-of-distribution experiments to distinguish ICL from in-weight learning (IWL) and (ii) make a better separation between the algorithms with and without using the prior information of the training distribution. Theoretically, we show that the trained Transformer reaches near Bayes-optimum, suggesting the usage of the information of the training distribution. Our method can be extended to other cases. Specifically, with the Transformer's context window $S$, we prove a generalization bound of $\tilde{\mathcal{O}}(\sqrt{\min\{S, T\}/(n T)})$ on $n$ tasks with sequences of length $T$, providing sharper analysis compared to previous results of $\tilde{\mathcal{O}}(\sqrt{1/n})$. Empirically, we illustrate that while the trained Transformer behaves as the Bayes-optimal solution as a natural consequence of supervised training in distribution, it does not necessarily perform a Bayesian inference when facing task shifts, in contrast to the \textit{equivalence} between these two proposed in many existing literature. We also demonstrate the trained Transformer's ICL ability over covariates shift and prompt-length shift and interpret them as a generalization over a meta distribution.</description><identifier>DOI: 10.48550/arxiv.2405.15115</identifier><language>eng</language><subject>Computer Science - Computation and Language ; Computer Science - Learning ; Statistics - Machine Learning</subject><creationdate>2024-05</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,885</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2405.15115$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2405.15115$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Liu, Shang</creatorcontrib><creatorcontrib>Cai, Zhongze</creatorcontrib><creatorcontrib>Chen, Guanting</creatorcontrib><creatorcontrib>Li, Xiaocheng</creatorcontrib><title>Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification</title><description>Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing literature, we consider a bi-objective prediction task of predicting both the conditional expectation $\mathbb{E}[Y|X]$ and the conditional variance Var$(Y|X)$. This additional uncertainty quantification objective provides a handle to (i) better design out-of-distribution experiments to distinguish ICL from in-weight learning (IWL) and (ii) make a better separation between the algorithms with and without using the prior information of the training distribution. Theoretically, we show that the trained Transformer reaches near Bayes-optimum, suggesting the usage of the information of the training distribution. Our method can be extended to other cases. Specifically, with the Transformer's context window $S$, we prove a generalization bound of $\tilde{\mathcal{O}}(\sqrt{\min\{S, T\}/(n T)})$ on $n$ tasks with sequences of length $T$, providing sharper analysis compared to previous results of $\tilde{\mathcal{O}}(\sqrt{1/n})$. Empirically, we illustrate that while the trained Transformer behaves as the Bayes-optimal solution as a natural consequence of supervised training in distribution, it does not necessarily perform a Bayesian inference when facing task shifts, in contrast to the \textit{equivalence} between these two proposed in many existing literature. We also demonstrate the trained Transformer's ICL ability over covariates shift and prompt-length shift and interpret them as a generalization over a meta distribution.</description><subject>Computer Science - Computation and Language</subject><subject>Computer Science - Learning</subject><subject>Statistics - Machine Learning</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNpNj8lqwzAURbXJoiT9gK6qH7D7PMiSl6npEDCUgrM2z9JTESRSkdU2-fsmaRdZXe7AhcPYXQF5rYSAB4wH952XNYi8EEUhbpgdwg9GM_NHSoki33pDcU7ojfMfPFi-8VkXfKJD4j1h9Od4PbmdS0duY9hfD7ZeU0zo_Kl7_0KfnHUakwt-xRYWdzPd_uuSDc9PQ_ea9W8vm27dZ9hIkalG1ZWY2lLrCUiBbpRsAIxUtqyMbFRL0oIAqSRN7clZjbXUdaUlTARltWT3f7cX0PEzuj3G43gGHi_A1S9AhVHB</recordid><startdate>20240523</startdate><enddate>20240523</enddate><creator>Liu, Shang</creator><creator>Cai, Zhongze</creator><creator>Chen, Guanting</creator><creator>Li, Xiaocheng</creator><scope>AKY</scope><scope>EPD</scope><scope>GOX</scope></search><sort><creationdate>20240523</creationdate><title>Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification</title><author>Liu, Shang ; Cai, Zhongze ; Chen, Guanting ; Li, Xiaocheng</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a675-868435b92ccb0e80c687600d78f23d7689e7f050787eb989efca47c43c70be023</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Computation and Language</topic><topic>Computer Science - Learning</topic><topic>Statistics - Machine Learning</topic><toplevel>online_resources</toplevel><creatorcontrib>Liu, Shang</creatorcontrib><creatorcontrib>Cai, Zhongze</creatorcontrib><creatorcontrib>Chen, Guanting</creatorcontrib><creatorcontrib>Li, Xiaocheng</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv Statistics</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Liu, Shang</au><au>Cai, Zhongze</au><au>Chen, Guanting</au><au>Li, Xiaocheng</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification</atitle><date>2024-05-23</date><risdate>2024</risdate><abstract>Predicting simple function classes has been widely used as a testbed for developing theory and understanding of the trained Transformer's in-context learning (ICL) ability. In this paper, we revisit the training of Transformers on linear regression tasks, and different from all the existing literature, we consider a bi-objective prediction task of predicting both the conditional expectation $\mathbb{E}[Y|X]$ and the conditional variance Var$(Y|X)$. This additional uncertainty quantification objective provides a handle to (i) better design out-of-distribution experiments to distinguish ICL from in-weight learning (IWL) and (ii) make a better separation between the algorithms with and without using the prior information of the training distribution. Theoretically, we show that the trained Transformer reaches near Bayes-optimum, suggesting the usage of the information of the training distribution. Our method can be extended to other cases. Specifically, with the Transformer's context window $S$, we prove a generalization bound of $\tilde{\mathcal{O}}(\sqrt{\min\{S, T\}/(n T)})$ on $n$ tasks with sequences of length $T$, providing sharper analysis compared to previous results of $\tilde{\mathcal{O}}(\sqrt{1/n})$. Empirically, we illustrate that while the trained Transformer behaves as the Bayes-optimal solution as a natural consequence of supervised training in distribution, it does not necessarily perform a Bayesian inference when facing task shifts, in contrast to the \textit{equivalence} between these two proposed in many existing literature. We also demonstrate the trained Transformer's ICL ability over covariates shift and prompt-length shift and interpret them as a generalization over a meta distribution.</abstract><doi>10.48550/arxiv.2405.15115</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2405.15115
ispartof
issn
language eng
recordid cdi_arxiv_primary_2405_15115
source arXiv.org
subjects Computer Science - Computation and Language
Computer Science - Learning
Statistics - Machine Learning
title Towards Better Understanding of In-Context Learning Ability from In-Context Uncertainty Quantification
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-24T02%3A33%3A21IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Towards%20Better%20Understanding%20of%20In-Context%20Learning%20Ability%20from%20In-Context%20Uncertainty%20Quantification&rft.au=Liu,%20Shang&rft.date=2024-05-23&rft_id=info:doi/10.48550/arxiv.2405.15115&rft_dat=%3Carxiv_GOX%3E2405_15115%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true