mlsanityData to 14 Oct 2026

In-Context Learning (and Unlearning) of Length Biases

arXiv 2502.06653 ↗First posted 10 Feb 2025cs.CLcited by 3

On the map: LLM safety and security → Machine unlearning

Abstract (arXiv)

Large language models have demonstrated strong capabilities to learn in-context, where exemplar input-output pairings are appended to the prompt for demonstration. However, existing work has demonstrated the ability of models to learn lexical and label biases in-context, which negatively impacts both performance and robustness of models. The impact of other statistical data biases remains under-explored, which this work aims to address. We specifically investigate the impact of length biases on in-context learning. We demonstrate that models do learn length biases in the context window for their predictions, and further empirically analyze the factors that modulate the level of bias exhibited by the model. In addition, we show that learning length information in-context can be used to counter the length bias that has been encoded in models (e.g., via fine-tuning). This reveals the power of in-context learning in debiasing model prediction behaviors without the need for costly parameter updates.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Machine unlearning, one of 12 directions in LLM safety and security. Builds on 25 of its 43 references that are in the map. First posted on arXiv 10 Feb 2025.

Builds on

25 of 43 references.

References · 25

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  3. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
  4. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,512
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  6. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  7. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  8. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  9. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  10. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  11. 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 876
  12. 2018Annotation Artifacts in Natural Language Inference Datacited by 671
13 more
  1. 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 669
  2. 2021Datasets: A Community Library for Natural Language Processingcited by 530
  3. 2018Hypothesis Only Baselines in Natural Language Inferencecited by 295
  4. 2019PAWS-X: A Cross-lingual Adversarial Dataset for Paraphrase Identificationcited by 264
  5. 2022Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Orderingcited by 161
  6. 2023Compositional Exemplars for In-context Learningcited by 144
  7. 2023Mitigating Label Biases for In-context Learningcited by 89
  8. 2022Structured Prompting: Scaling In-Context Learning to 1,000 Examplescited by 81
  9. 2022On the Relation between Sensitivity and Accuracy in In-context Learningcited by 72
  10. 2023In-Context Learning for Text Classification with Many Labelscited by 35
  11. 2023A Study on the Calibration of In-context Learningcited by 22
  12. 2024Mitigating Copy Bias in In-Context Learning through Neuron Pruningcited by 11
  13. 2023Scaling In-Context Demonstrations with Structured Attentioncited by 8

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 1.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Positional Biases Shift as Inputs Approach Context Window Limits
  2. 2025On the generalization of language models from in-context learning and finetuning: a controlled study
  3. 2024Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning
  4. 2025Disentangling Length Bias In Preference Learning Via Response-Conditioned Modeling
  5. 2023The Mystery of In-Context Learning: A Comprehensive Survey on Interpretation and Analysis
  6. 2026Emergence of Context Characteristics Sensitivity in Large Language Models
  7. 2026The Illusion of Robustness: Aggregate Accuracy Hides Prediction Flips under Task-Irrelevant Context
  8. 2026Causal Interventions on Continuous Variables: A Case Study on Verb Bias in Steering Vectors for In-Context Learning