Retrieval-Based In-Context Learning: A Domain Adaptation Framework
Yilun Zhu, Naihao Deng, Yingcong Li, Naichen Shi, Clayton Scott
Abstract
In-context retrieval (ICR) is a retrieval-based form of in-context learning (ICL) in which demonstrations are retrieved from a source database based on similarity to the query, rather than sampled independently. In this work, we formulate ICR as a type of domain adaptation problem, where the source distribution of the database may differ from the target distribution of the test query-label pair. We investigate the performance of ICR under a flexible class of distributional shifts that substantially extends prior work \citep{li2024fine,guo2025retrieval}, and establish theoretical guarantees that quantify the benefits and pitfalls of this learning paradigm. Our theory is verified by experiments on synthetic and language tasks.
Create a lesson
Related papers
MediPFN: Amortized In-Context Nuisance Learning and Inference for Causal Mediation Analysis
Shared title terminology · Shi Bo, Jiaming Hu
Amortized Bayesian Experimental Design with In-Context Knowledge Conditioning
Shared title terminology · Zhanghu Zhao, Daolang Huang, Xinyi Wen et al.
Beyond Discrete Ancestry Groups: Distribution-Aware In-Context Learning for Cancer Outcome Prediction Across the Genetic Ancestry Continuum
Shared title terminology · Weizhi Li, Yan Cui
Joint Contrastive-Adversarial Representation Learning for Unsupervised Domain Adaptation
Shared title terminology · Yuling Jiao, Lican Kang, Jerry Zhijian Yang et al.
What can linear attention learn from nonlinear teachers in-context?
Shared title terminology · Mary Letey, Arman Rysmakhanov, Yue M. Lu et al.
A Statistical Framework for Training Data Auditing of Large Language Models
Shared title terminology · Shengjie Niu, Yeheng Ge, Jian Huang