Lune

ICML2025Top-tier venue

On the Power of Context-Enhanced Learning in LLMs

Xingyu Zhu, Abhishek Panigrahi, Sanjeev Arora

Abstract

We formalize a new concept for LLMs, contextenhanced learning. It involves standard gradientbased learning on text except that the context is enhanced with additional data on which no autoregressive gradients are computed. This setting is a gradient-based analog of usual in-context learning (ICL) and appears in some recent works. Using a multi-step reasoning task, we prove in a simplified setting that context-enhanced learning can be exponentially more sample-efficient than standard learning when the model is capable of ICL. At a mechanistic level, we find that the benefit of context-enhancement arises from a more accurate gradient learning signal. We also experimentally demonstrate that it appears hard to detect or recover learning materials that were used in the context during training. This may have implications for data security as well as copyright. * Equal contribution with theoretical framework and setting up the problem, XZ undertook most of the experiments.

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 · 3 top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers3

  1. URLs Help, Topics Guide: Understanding Metadata Utility in LLM TrainingDongyang Fan, Vinko Sabolcec, Martin JaggiNeurIPS 2025 · 2 citations
  2. Metadata Conditioning Accelerates Language Model Pre-trainingTianyu Gao, Alexander Wettig, Luxi He, Yihe Dong et al.ICML 2025
  3. Do Retrieval Augmented Language Models Know When They Don't Know?Youchao Zhou, Heyan Huang, Yicheng Liu, Rui Dai et al.AAAI 2026

Builds on34

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  3. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
  4. Data Distributional Properties Drive Emergent In-Context Learning in TransformersStephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang et al.NeurIPS 2022 · 407 citations
  5. Measuring and Narrowing the Compositionality Gap in Language ModelsOfir Press, Muru Zhang, Sewon Min, Ludwig Schmidt et al.EMNLP Findings 2023 · 296 citations

Related papers

  1. Revisiting In-Context Learning with Long Context Language ModelsJinheon Baek, Sun Jae Lee, Prakhar Gupta, Geunseob Oh et al.ACL Findings 2025 · 2 citations
  2. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 citations
  3. Revisiting Chain-of-Thought Prompting: Zero-shot Can Be Stronger than Few-shotXiang Cheng, Chengyan Pan, Minjun Zhao, Deyang Li et al.EMNLP Findings 2025 · 4 citations
  4. Improving Context Fidelity via Native Retrieval-Augmented ReasoningSuyuchen Wang, Jinlin Wang, Xinyu Wang, Shiqi Li et al.EMNLP 2025 · 1 citation
  5. Iterative Forward Tuning Boosts In-Context Learning in Language ModelsJiaxi Yang, Binyuan Hui, Min Yang, Bailin Wang et al.ACL 2024
Dusk over the sea between two cliffs drawn in fine vertical lines