Unlabeled Data Achieves Provable Gains in Transformer In-Context Learning Performance

The limitations of labelled data in large language models present a significant challenge to improving in-context learning (ICL) performance. Renpu Liu and Jing Yang, both from the University of Virginia, alongside their colleagues, address this problem by investigating how unlabeled data can demonstrably enhance ICL capabilities. Their research introduces a new augmented ICL framework which incorporates unlabeled inputs alongside labelled examples within a prompt, allowing transformers to implicitly learn from a broader data range. By demonstrating a connection between this framework and the expectation-maximization algorithm, the study provides theoretical guarantees for improved accuracy and a linear convergence rate during training. This work represents a crucial step forward in understanding and optimising ICL, offering a pathway to leverage the vast quantities of readily available unlabeled data to build more effective language models.

Pseudo-Demonstration Generation for In-Context Learning

Transformers have become fundamental models across numerous fields, notably natural language processing, computer vision and reinforcement learning, largely due to their capacity for In-Context Learning (ICL). This allows transformers to adapt to new tasks using only contextual examples within a prompt, achieving strong few-shot performance in areas like reasoning, language understanding and linear regression. However, the reliance on labelled examples for ICL presents a challenge for large language models, as acquiring such data is often costly and time-consuming. Researchers have explored a new approach to enhance ICL performance by directly utilising readily available unlabeled data alongside limited labelled examples, termed augmented in-context learning.

This work proposes a novel augmented ICL framework where prompts incorporate a small set of labeled examples alongside a block of unlabeled inputs, differing from previous approaches that rely on generating synthetic labelled data. The central question investigated is whether transformers can demonstrably improve ICL performance through effective use of abundant unlabeled data. The methodology involves training a transformer via teacher forcing, aiming for linear convergence of parameters towards the desired solution. This training process leverages unlabeled data to improve the transformer’s ability to generalise from limited labelled examples during ICL. Experiments were conducted to compare the performance of this augmented ICL framework against conventional few-shot ICL, providing empirical evidence to support the theoretical findings. The researchers demonstrate consistent performance gains with the augmented approach, representing the first theoretical study examining the impact of unlabeled data on the ICL performance of transformers.

Unlabeled Data Boosts In-Context Learning Accuracy

Scientists achieved a significant breakthrough in enhancing the performance of large language models (LLMs) through a novel augmented in-context learning (ICL) framework. The research demonstrates that incorporating unlabeled data alongside labeled examples within a prompt provably improves ICL accuracy, addressing a fundamental limitation of relying solely on costly labeled demonstrations. Experiments revealed that a multi-layer transformer, when prompted with chain-of-thought (CoT), effectively emulates an expectation-maximization (EM) algorithm, allowing it to extract valuable information from both labeled and unlabeled sources. This innovative approach unlocks the potential of vast, readily available unlabeled datasets to boost LLM capabilities.

The team measured excess risk scaling at O (1/ p N +poly(M)), where N represents the number of labeled samples and M the number of unlabeled samples. This result represents a strict improvement over the previously established lower bound of O (1/ √ N) for classifiers utilizing only labeled data, confirming the benefit of incorporating unlabeled data. Data shows that as the number of unlabeled data samples increases, the augmented ICL framework delivers steady performance improvements, surpassing even Bayes-optimal classifiers that rely exclusively on labeled data. Measurements confirm the transformer’s ability to estimate class means, converging towards ground truth as the number of CoT steps increases.

Further analysis proves that the transformer can be trained via teacher forcing, with parameters converging to the desired solution at a linear rate, achieved through a novel decomposition of the CoT training loss gradient. Tests prove that this trained transformer accurately mimics the EM algorithm during inference, theoretically demonstrating the identifiability and learnability of the expressive solution for augmented ICL. The breakthrough delivers a theoretical foundation for understanding and optimizing the impact of unlabeled data on transformer performance. The study establishes a non-asymptotic convergence guarantee in a general multi-class setting, utilizing a more realistic transformer architecture incorporating softmax attention. Results indicate that for a prompt consisting of N labeled and M unlabeled samples, the augmented ICL framework consistently outperforms conventional ICL, providing empirical support for the theoretical findings.

Augmented In-Context Learning Emulates Expectation-Maximization

This work introduces augmented in-context learning (ICL), a novel framework where large language models process both labeled and unlabeled examples within a single prompt. Researchers demonstrated that, under specific conditions, transformers employing chain-of-thought prompting can effectively emulate an expectation-maximization algorithm when utilising this augmented ICL approach. This allows the model to implicitly integrate information from unlabeled data, demonstrably improving accuracy in multi-class linear classification tasks. The study provides theoretical justification for these improvements, showing that prediction error decreases as the amount of unlabeled data increases, and that the model can be trained using standard teacher forcing techniques.

Empirical results consistently validate these theoretical findings, particularly when the initial labeled dataset is small and potentially noisy. The authors acknowledge a limitation in the scope of their work, focusing on a specific linear classification setting, and suggest future research could explore the generalizability of these findings to more complex models and tasks. Further investigation into the optimal balance between labeled and unlabeled data, and the impact of different unlabeled data distributions, may also prove fruitful. Their research introduces a new augmented ICL framework which incorporates unlabeled inputs alongside labelled examples within a prompt, allowing transformers to implicitly learn from a broader data range. By demonstrating a connection between this framework and the expectation-maximization algorithm, the study provides theoretical guarantees for improved accuracy and a linear convergence rate during training. This work represents a crucial step forward in understanding and optimising ICL, offering a pathway to leverage the vast quantities of readily available unlabeled data to build more effective language models.

👉 More information
🗞 Unlabeled Data Can Provably Enhance In-Context Learning of Transformers
🧠 ArXiv: https://arxiv.org/abs/2601.10058

Rohail T.

Rohail T.

As a quantum scientist exploring the frontiers of physics and technology. My work focuses on uncovering how quantum mechanics, computing, and emerging technologies are transforming our understanding of reality. I share research-driven insights that make complex ideas in quantum science clear, engaging, and relevant to the modern world.

Latest Posts by Rohail T.:

Non-invertible Nielsen Circuits Advance 3d Ising Gravity Understanding with Fusion Graphs

Non-invertible Nielsen Circuits Advance 3d Ising Gravity Understanding with Fusion Graphs

January 19, 2026
Finite Entropy Density Matrices Advance Understanding of AdS/CFT and Causal Diamonds

Finite Entropy Density Matrices Advance Understanding of AdS/CFT and Causal Diamonds

January 19, 2026
Topological Equivalence Principle Demonstrates Gravity’s Non-Perturbative Sensitivity Via Sums over Configurations

Topological Equivalence Principle Demonstrates Gravity’s Non-Perturbative Sensitivity Via Sums over Configurations

January 19, 2026