Fine-tune Language Models to Approximate Unbiased In-context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning (ICL) is an astonishing emergent ability of large language models (LLMs). By presenting a prompt that includes multiple input-output pairs as examples and introducing a new query input, models can generate the corresponding output. However, the performance of models heavily relies on the quality of the input prompt when implementing in-context learning. Biased or imbalanced input prompts can significantly degrade the performance of language models. To address this issue, we introduce a reweighted algorithm called RICL (Reweighted In-context Learning). This algorithm fine-tunes language models using an unbiased validation set to determine the optimal weight for each input-output example to approximate unbiased in-context learning. Furthermore, we also introduce a low-cost reweighted algorithm, a linear optimal weight approximation algorithm called LARICL (Linear Approximation of Reweighted In-context Learning). This algorithm requires minimal training cost while providing effective results. We prove the convergence of our algorithm and validate its performance through experiments conducted on a numerical dataset. The experimental findings reveal a substantial improvement in comparison to benchmarks including the performance of casual prompt-based in-context learning and the performance of a classic fine-tuning method.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 59 of its 77 references that are in the map. First posted on arXiv 5 Oct 2023.
Builds on
59 of 77 references.
References · 59
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2023G-Eval: NLG Evaluation using GPT-4 with Better Human Alignmentcited by 2,205
38 more
- 2022Survey of Hallucination in Natural Language Generationcited by 2,056
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2023PaLM 2 Technical Reportcited by 1,154
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 886
- 2023StarCoder: may the source be with you!cited by 790
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2021P-Tuning v2: Prompt Tuning Can Be Comparable to Fine-tuning Universally Across Scales and Taskscited by 686
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2018Learning to Reweight Examples for Robust Deep Learningcited by 670
- 2023Larger language models do in-context learning differentlycited by 386
- 2023How Good Are GPT Models at Machine Translation? A Comprehensive Evaluationcited by 344
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023How Language Model Hallucinations Can Snowballcited by 310
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2020Evaluation of Text Generation: A Surveycited by 275
- 2022Emergent Analogical Reasoning in Large Language Modelscited by 239
- 2021SPoT: Better Frozen Model Adaptation through Soft Prompt Transfercited by 235
- 2017Survey of the State of the Art in Natural Language Generation: Core tasks, applications and evaluationcited by 206
- 2022Delta Tuning: A Comprehensive Study of Parameter Efficient Methods for Pre-trained Language Modelscited by 179
- 2023Sources of Hallucination by Large Language Models on Inference Taskscited by 168
- 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
- 2023Progressive-Hint Prompting Improves Reasoning in Large Language Modelscited by 147
- 2023Towards Making the Most of ChatGPT for Machine Translationcited by 138
- 2023The Learnability of In-Context Learningcited by 126
- 2021Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learnerscited by 115
- 2023Multitask Prompt Tuning Enables Parameter-Efficient Transfer Learningcited by 115
- 2023Do Language Models Know When They're Hallucinating References?cited by 115
- 2023Finding Support Examples for In-Context Learningcited by 104
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 95
- 2023Attention Scheme Inspired Softmax Regressioncited by 49
- 2019Learning to Balance: Bayesian Meta-Learning for Imbalanced and Out-of-distribution Taskscited by 48
- 2019Learning Data Manipulation for Augmentation and Weightingcited by 44
- 2022Neural Collapse Inspired Attraction-Repulsion-Balanced Loss for Imbalanced Learningcited by 43
- 2023Using In-Context Learning to Improve Dialogue Safetycited by 41
- 2022Tuning Language Models as Training Data Generators for Augmentation-Enhanced Few-Shot Learningcited by 36
50 most cited of 59 All 59 (JSON)
Built on by
Citing papers per year: 2023: 5; 2024: 4; 2025: 3.
12 papers.
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weightscited by 11
- 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruningcited by 11
- 2024Towards Infinite-Long Prefix in Transformercited by 10
- 2023An Automatic Learning Rate Schedule Algorithm for Achieving Faster Convergence and Steeper Descentcited by 9
- 2023The Expressibility of Polynomial based Attention Schemecited by 7
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformercited by 6
- 2023Large Scale Foundation Models for Intelligent Manufacturing Applications: A Surveycited by 6
- 2024Advancing the Understanding of Fixed Point Iterations in Deep Neural Networks: A Detailed Analytical Studycited by 4
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2024Enhancing Stochastic Gradient Descent: A Unified Framework and Novel Acceleration Methods for Faster Convergencecited by 0
- 2025Exploring Imbalanced Annotations for Effective In-Context Learningcited by 0
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspectivecited by 0
- 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspective7 Oct 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2025Exploring Imbalanced Annotations for Effective In-Context Learning6 Feb 2025
- 2024Advancing the Understanding of Fixed Point Iterations in Deep Neural Networks: A Detailed Analytical Study15 Oct 2024
- 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruning2 Oct 2024
- 2024Towards Infinite-Long Prefix in Transformer20 Jun 2024
- 2024Enhancing Stochastic Gradient Descent: A Unified Framework and Novel Acceleration Methods for Faster Convergence2 Feb 2024
- 2023Large Scale Foundation Models for Intelligent Manufacturing Applications: A Survey11 Dec 2023
- 2023A Theoretical Insight into Attack and Defense of Gradient Leakage in Transformer22 Nov 2023
- 2023The Expressibility of Polynomial based Attention Scheme30 Oct 2023
- 2023Unmasking Transformers: A Theoretical Approach to Data Recovery via Attention Weights19 Oct 2023
- 2023An Automatic Learning Rate Schedule Algorithm for Achieving Faster Convergence and Steeper Descent17 Oct 2023