NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Revisiting Out-of-distribution Robustness in NLP: Benchmark, Analysis, and LLMs Evaluations

Lifan Yuan, Yangyi Chen, Ganqu Cui, Hongcheng Gao, Fangyuan Zou, Xingyi Cheng, Heng Ji, Zhiyuan Liu, Maosong Sun · DOI

Abstract

Out-of-distribution (OOD) robustness remains a critical challenge for deploying NLP models in real-world scenarios. This paper introduces the Benchmark suite for Out-of-distribution robustneSS (BOSS), a rigorous evaluation framework comprising 20 datasets across five core NLP tasks. Through systematic benchmarking, we identify three distinct patterns of ID-OOD performance correlations and evaluate the effectiveness of various robustness-enhancing techniques. Our findings reveal that while specialized fine-tuned models dominate on in-distribution data, Large Language Models (LLMs) utilizing In-Context Learning (ICL) demonstrate significantly higher resilience to distribution shifts.

Introduction

Standard NLP evaluation typically relies on the i.i.d. assumption, where training and test data share the same distribution. However, real-world applications frequently encounter distribution shifts—variations in style, topic, or complexity—that can lead to catastrophic performance degradation. Previous OOD research often suffered from a lack of challenge in test sets and inconsistent benchmarking protocols. To address this, we propose BOSS, a standardized "stress test" designed to provide a more accurate measure of model generalizability.

The BOSS Methodology

The BOSS benchmark is built upon a systematic protocol designed to ensure genuine difficulty. Unlike previous paradigms that often relied on popular but potentially similar datasets, our approach emphasizes three principles: selecting diverse and large In-Distribution (ID) datasets, ensuring low semantic similarity between ID and OOD sets (using SimCSE embeddings), and verifying a significant performance drop for standard models like T5-large.

Comparison of the proposed BOSS construction protocol against previous evaluation paradigms.

The resulting suite covers Sentiment Analysis, Toxic Detection, Natural Language Inference, Named Entity Recognition, and Extractive QA, totaling 20 datasets.

Characterizing OOD Robustness

Our analysis of the relationship between ID and OOD performance reveals three distinct patterns, or "shapes," of robustness:

  1. Type I (Linear): OOD performance scales linearly with ID performance, typical in tasks like Sentiment Analysis.
  2. Type II (Piecewise Linear): OOD performance remains stagnant until a specific knowledge threshold is reached, after which it improves rapidly, often seen in Extractive QA.
  3. Type III (V-shaped): Initially, OOD performance decreases as the model learns spurious correlations on ID data. Robustness only improves once the model gains a deeper, more general understanding of the task, a phenomenon frequently observed in Natural Language Inference.
The three identified types of correlation between In-Distribution (ID) and Out-of-Distribution (OOD) performance.

Evaluating LLMs and Robustness Methods

A key finding of our study is the "ICL Paradox." While fine-tuned smaller models (e.g., T5-3B) achieve state-of-the-art results on ID data, they often fail on OOD tasks. Conversely, LLMs using In-Context Learning (ICL) prove to be the "OOD Kings." For instance, in Toxic Detection, GPT-3.5 (Turbo) significantly outperformed fine-tuned models on the ToxiGen dataset (76.07 vs 65.74 F1).

Interestingly, providing ID examples for ICL often yields better OOD results than using examples from the OOD domain itself. This suggests that ID examples help the model better define the task's label space rather than just providing domain-specific context. Furthermore, most classic robustness-enhanced methods (like label smoothing or data augmentation) failed to provide significant boosts over vanilla fine-tuning on the BOSS benchmark.

Conclusion and Future Work

The BOSS benchmark highlights the limitations of current fine-tuning methods and the surprising robustness of LLMs in zero-shot and ICL settings. While larger models generally exhibit better robustness, the V-shaped correlation suggests that medium-sized models may be particularly susceptible to learning the "wrong" shortcuts. Future work will focus on expanding BOSS to generative tasks and addressing the challenges of data contamination and temporal shifts in LLM evaluation.

Summary updated

BibTeX
@inproceedings{yuan2023revisiting,
  author = {Lifan Yuan and Yangyi Chen and Ganqu Cui and Hongcheng Gao and Fangyuan Zou and Xingyi Cheng and Heng Ji and Zhiyuan Liu and Maosong Sun},
  title = {{Revisiting Out-of-distribution Robustness in NLP: Benchmark, Analysis, and LLMs Evaluations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=hnNig9bqNe},
}
Figure