Skip to main content
QUICK REVIEW

[Paper Review] Exploring the Robustness of In-Context Learning with Noisy Labels

Cheng Chen, Xinzhi Yu|arXiv (Cornell University)|Apr 28, 2024
Water Systems and OptimizationEngineering3 citations
TL;DR

This paper investigates the robustness of in-context learning (ICL) in Transformer models under noisy label conditions using synthetic function classes. It demonstrates that Transformers exhibit strong resilience to label noise in in-context demonstrations and further shows that injecting noise during training enhances this robustness, offering insights for improving LLM safety and alignment in real-world, noisy data settings.

ABSTRACT

Recently, the mysterious In-Context Learning (ICL) ability exhibited by Transformer architectures, especially in large language models (LLMs), has sparked significant research interest. However, the resilience of Transformers' in-context learning capabilities in the presence of noisy samples, prevalent in both training corpora and prompt demonstrations, remains underexplored. In this paper, inspired by prior research that studies ICL ability using simple function classes, we take a closer look at this problem by investigating the robustness of Transformers against noisy labels. Specifically, we first conduct a thorough evaluation and analysis of the robustness of Transformers against noisy labels during in-context learning and show that they exhibit notable resilience against diverse types of noise in demonstration labels. Furthermore, we delve deeper into this problem by exploring whether introducing noise into the training set, akin to a form of data augmentation, enhances such robustness during inference, and find that such noise can indeed improve the robustness of ICL. Overall, our fruitful analysis and findings provide a comprehensive understanding of the resilience of Transformer models against label noises during ICL and provide valuable insights into the research on Transformers in natural language processing. Our code is available at https://github.com/InezYu0928/in-context-learning.

Motivation & Objective

  • To understand how robust in-context learning (ICL) is in Transformers when faced with noisy labels in demonstration examples.
  • To investigate whether introducing label noise during model pre-training can enhance ICL robustness during inference.
  • To provide a systematic, interpretable analysis of ICL robustness using simple function classes like linear and polynomial regression.
  • To offer practical insights into improving the safety and reliability of large language models in real-world, noisy data environments.

Proposed method

  • The study uses synthetic datasets with simple function classes (e.g., linear and polynomial functions) to evaluate ICL robustness under controlled noise conditions.
  • Label noise is introduced during both training (as data augmentation) and inference (as test-time noise) via Gaussian noise injection to simulate real-world label inaccuracies.
  • The model is trained to learn a function from in-context demonstrations and then evaluated on query inputs with varying levels of label noise in the demonstrations.
  • Experiments vary input dimensionality (d ∈ {3, 5, 10}), number of in-context examples, and noise levels (σ ∈ {0, 0.2, ..., 1.0}) to assess robustness across settings.
  • Performance is measured via mean squared error (MSE) between predicted and true function outputs, with comparisons across noise levels and model configurations.
  • The analysis is conducted using a standardized framework where both input features and function parameters are sampled from isotropic Gaussian distributions.

Experimental results

Research questions

  • RQ1How does label noise in in-context demonstrations affect the performance of Transformer models in in-context learning?
  • RQ2Can injecting label noise during pre-training improve the robustness of in-context learning under noisy test-time demonstrations?
  • RQ3How does input dimensionality influence the robustness of ICL in the presence of label noise?
  • RQ4Does the model’s performance degrade more significantly for higher-order polynomial functions compared to linear functions under noisy labels?

Key findings

  • Transformers exhibit notable robustness to label noise in in-context demonstrations, maintaining low error rates even under high noise levels (σ_test = 1.0).
  • The performance degradation is more pronounced for higher-degree polynomial functions (e.g., degree 5) due to increased functional complexity and insufficient data diversity.
  • Increasing input dimensionality from d=3 to d=10 leads to a significant drop in ICL performance, indicating that model capacity is strained by higher-dimensional input spaces.
  • Training with label noise (σ_train = 0.6) improves generalization and robustness, especially in high-dimensional settings, suggesting noise injection acts as effective data augmentation.
  • The performance gap between d=3 and d=5 is small, but the drop at d=10 is substantial, indicating a critical threshold in model scalability under noisy conditions.
  • Overfitting is observed in high-degree polynomial tasks, particularly with limited in-context examples, further degrading performance under noisy settings.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.