Lune

ICML2025Top-tier venue

Federated In-Context Learning: Iterative Refinement for Improved Answer Quality

Ruhan Wang, Zhiyong Wang, Chengkai Huang, Rui Wang, Tong Yu, Lina Yao, John C. S. Lui, Dongruo Zhou

Abstract

For question-answering (QA) tasks, in-context learning (ICL) enables language models (LMs) to generate responses without modifying their parameters by leveraging examples provided in the input. However, the effectiveness of ICL heavily depends on the availability of high-quality examples, which are often scarce due to data privacy constraints, annotation costs, and distribution disparities. A natural solution is to utilize examples stored on client devices, but existing approaches either require transmitting model parameters-incurring significant communication overhead-or fail to fully exploit local datasets, limiting their effectiveness. To address these challenges, we propose Federated In-Context Learning (Fed-ICL), a general framework that enhances ICL through an iterative, collaborative process. Fed-ICL progressively refines responses by leveraging multi-round interactions between clients and a central server, improving answer quality without the need to transmit model parameters. We establish theoretical guarantees for the convergence of Fed-ICL and conduct extensive experiments on standard QA benchmarks, demonstrating that our proposed approach achieves strong performance while maintaining low communication costs.

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · related work

Get the answer

Free to start. No credit card required.

Builds on16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
  4. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  5. Improving Factuality and Reasoning in Language Models through Multiagent DebateYilun Du, Shuang Li, Antonio Torralba, Joshua B. Tenenbaum et al.ICML 2024 · 1,562 citations

Related papers

  1. FedDQC: Data Quality Control in Federated Instruction-tuning of Large Language ModelsYaxin Du, Rui Ye, Fengting Yuchi, Wanru Zhao et al.ACL Findings 2025 · 2 citations
  2. Feature-Adaptive and Data-Scalable In-Context LearningJiahao Li, Quan Wang, Licheng Zhang, Guoqing Jin et al.ACL 2024
  3. Privacy-Preserving In-Context Learning for Large Language ModelsTong Wu, Ashwinee Panda, Jiachen T. Wang, Prateek MittalICLR 2024 · 58 citations
  4. Customizing In-context Learning for Dynamic Interest Adaption in LLM-based RecommendationKeqin Bao, Ming Yan, Yang Zhang, Jizhi Zhang et al.ACL Findings 2025 · 1 citation
  5. TABGEN-ICL: Residual-Aware In-Context Example Selection for Tabular Data GenerationLiancheng Fang, Aiwei Liu, Hengrui Zhang, Henry Peng Zou et al.ACL Findings 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines