Lune

ACL2026Top-tier venue

Toward Robust In-Context Learning: Leveraging Out-of-distribution Proxies for Target Inaccessible Demonstration Retrieval

Hao Xu, Rite Bo, Fausto Giunchiglia, Yingji Li, Rui Song

Abstract

Although studies have demonstrated that Large Language Models (LLMs) can perform well on Out-of-Distribution (OOD) tasks, their advantage tends to diminish as the distribution shift becomes more severe. Consequently, researchers aim to retrieve distributionally similar and informative demonstrations from the available source domain to boost the inference capabilities of LLMs. However, in practical scenarios where the target domain is inaccessible, evaluating the unknown distribution is challenging, which indirectly impacts the quality of the selected demonstrations. To address this problem, we propose DOPA, a demonstration search framework that incorporates an OOD proxy to approximate the inaccessible target domain and guide the retrieval process. Building on proxy-based evaluation, DOPA further introduces a Mahalanobis distance-based global diversity constraint to ensure sufficient diversity among the retrieved demonstrations. Experimental results on multiple LLMs and tasks demonstrate that DOPA effectively enhances robustness in OOD settings.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Compositional Exemplars for In-context Learning cites The Curious Case of Neural Text Degeneration
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on12

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  2. SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
  3. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  4. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations
  5. Compositional Exemplars for In-context LearningJiacheng Ye, Zhiyong Wu, Jiangtao Feng, Tao Yu et al.ICML 2023 · 188 citations

Related papers

  1. D.Va: Validate Your Demonstration First Before You Use ItQi Zhang, Zhiqing Xiao, Ruixuan Xiao, Lirong Gao et al.ACL 2025
  2. Selective Demonstrations for Cross-domain Text-to-SQLShuaichen Chang, Eric Fosler-LussierEMNLP Findings 2023 · 19 citations
  3. CCL: Causal-aware In-context Learning for Out-of-Distribution GeneralizationHoyoon Byun, Gyeongdeok Seo, Joonseong Kang, Taero Kim et al.NeurIPS 2025 · 1 citation
  4. Adaptive Distraction: Probing LLM Contextual Robustness with Automated Tree SearchYanbo Wang, Zixiang Xu, Yue Huang, Chujie Gao et al.NeurIPS 2025 · 11 citations
  5. Countering Reward Over-Optimization in LLM with Demonstration-Guided Reinforcement LearningMathieu Rita, Florian Strub, Rahma Chaabouni, Paul Michel et al.ACL Findings 2024 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines