mlsanityData to 7 Oct 2026

Improving Black-box Robustness with In-Context Rewriting

arXiv 2402.08225 ↗First posted 13 Feb 2024cs.LGcited by 8

Not on the map. Why?

Abstract (arXiv)

Machine learning models for text classification often excel on in-distribution (ID) data but struggle with unseen out-of-distribution (OOD) inputs. Most techniques for improving OOD robustness are not applicable to settings where the model is effectively a black box, such as when the weights are frozen, retraining is costly, or the model is leveraged via an API. Test-time augmentation (TTA) is a simple post-hoc technique for improving robustness that sidesteps black-box constraints by aggregating predictions across multiple augmentations of the test input. TTA has seen limited use in NLP due to the challenge of generating effective natural language augmentations. In this work, we propose LLM-TTA, which uses LLM-generated augmentations as TTA's augmentation function. LLM-TTA outperforms conventional augmentation functions across sentiment, toxicity, and news classification tasks for BERT and T5 models, with BERT's OOD robustness improving by an average of 4.48 percentage points without regressing average ID performance. We explore selectively augmenting inputs based on prediction entropy to reduce the rate of expensive LLM augmentations, allowing us to maintain performance gains while reducing the average number of generated augmentations by 57.74%. LLM-TTA is agnostic to the task model architecture, does not require OOD labels, and is effective across low and high-resource settings. We share our data, models, and code for reproducibility.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 73 of its 96 references that are in the map. First posted on arXiv 13 Feb 2024.

Builds on

73 of 96 references.

References · 73

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  6. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  7. 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,857
  8. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  9. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  10. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
  11. 2020The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalizationcited by 1,842
  12. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
38 more
  1. 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
  2. 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,324
  3. 2019Unsupervised Data Augmentation for Consistency Trainingcited by 1,057
  4. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  5. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
  6. 2015Improving Neural Machine Translation Models with Monolingual Datacited by 784
  7. 2021A Survey of Uncertainty in Deep Neural Networkscited by 675
  8. 2020Measuring Robustness to Natural Distribution Shifts in Image Classificationcited by 452
  9. 2022Memory-Based Model Editing at Scalecited by 443
  10. 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 419
  11. 2023Large Language Models Are State-of-the-Art Evaluators of Translation Qualitycited by 416
  12. 2021A Survey of Data Augmentation Approaches for NLPcited by 408
  13. 2019Nuanced Metrics for Measuring Unintended Bias with Real Data for Text Classificationcited by 396
  14. 2021MEMO: Test Time Robustness via Adaptation and Augmentationcited by 376
  15. 2020Med-BERT: pre-trained contextualized embeddings on large-scale structured electronic health records for disease predictioncited by 368
  16. 2023A Comprehensive Survey on Test-Time Adaptation under Distribution Shiftscited by 353
  17. 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 293
  18. 2021Unsolved Problems in ML Safetycited by 291
  19. 2020On the Stability of Fine-tuning BERT: Misconceptions, Explanations, and Strong Baselinescited by 254
  20. 2017PixelDefend: Leveraging Generative Models to Understand and Defend against Adversarial Examplescited by 243
  21. 2021Latent Hatred: A Benchmark for Understanding Implicit Hate Speechcited by 216
  22. 2018Contextual Augmentation: Data Augmentation by Words with Paradigmatic Relationscited by 201
  23. 2019Counterfactual Data Augmentation for Mitigating Gender Stereotypes in Languages with Rich Morphologycited by 200
  24. 2019Facebook FAIR's WMT19 News Translation Task Submissioncited by 179
  25. 2019Not Enough Data? Deep Learning to the Rescue!cited by 174
  26. 2020Data Augmentation using Pre-trained Transformer Modelscited by 168
  27. 2018QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehensioncited by 164
  28. 2023Multilingual Machine Translation with Large Language Models: Empirical Results and Analysiscited by 156
  29. 2020An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Modelscited by 133
  30. 2020Better Aggregation in Test-Time Augmentationcited by 121
  31. 2023Change is Hard: A Closer Look at Subpopulation Shiftcited by 119
  32. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 114
  33. 2021A Survey on Data Augmentation for Text Classificationcited by 111
  34. 2021An Empirical Survey of Data Augmentation for Limited Data Learning in NLPcited by 101
  35. 2023Align Your Prompts: Test-Time Prompting with Distribution Alignment for Zero-Shot Generalizationcited by 100
  36. 2023Revisiting Out-of-distribution Robustness in NLP: Benchmark, Analysis, and LLMs Evaluationscited by 96
  37. 2021Challenges in Automated Debiasing for Toxic Language Detectioncited by 95
  38. 2020SSMBA: Self-Supervised Manifold Based Data Augmentation for Improving Out-of-Domain Robustnesscited by 94

50 most cited of 73 All 73 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 2; 2026: 2.

8 papers.