Introduction
As large-scale language models become central to AI applications, ensuring their robustness to out-of-distribution (OOD) inputs is critical. A robust model should identify "unknown" inputs rather than providing confident but incorrect predictions. While OOD detection is well-studied for encoder-based models like BERT, the shift toward massive decoder-only models and Parameter-Efficient Transfer Learning (PETL) necessitates a new investigation. This study explores how model scaling and PETL methods—such as LoRA and Adapters—impact a model's ability to detect OOD inputs.
Methodology
The researchers evaluated OOD performance across three primary dimensions:
- Model Scale: Six auto-regressive models were tested, ranging from GPT2-Small (117M) to GPT-J (6B).
- Transfer Learning Methods: Full fine-tuning was compared against PETL techniques, including Adapters, LoRA (Low-Rank Adaptation), and Prefix-tuning.
- OOD Detection Scoring: The study compared logit-based methods (Maximum Softmax Probability and Energy-based scores) against representation-based methods (Mahalanobis distance and Cosine similarity).
Datasets
Two benchmarks for intention classification were utilized:
- CLINC150: Used for "far-OOD" scenarios where outliers are distributionally distinct from training data.
- Banking77: A fine-grained dataset used for "close-OOD" scenarios where outliers are semantically similar to training data.
Results and Discussion
The Impact of Scaling
Scaling provides a natural boost to OOD detection capabilities. Even without task-specific training, larger models demonstrate improved "self-awareness" regarding distributional shifts. However, a significant performance gap remains between frozen large-scale models and fine-tuned smaller models (like BERT-base), indicating that scale alone is insufficient for optimal robustness.
PETL vs. Full Fine-Tuning
A key finding of this research is that PETL methods often outperform full fine-tuning in OOD robustness, particularly as model size increases. For instance, on the Banking77 dataset, GPT-J with Adapters achieved an AUROC of 95.83, compared to 93.73 for full fine-tuning. This suggests that full fine-tuning may lead to overfitting on training nuances, whereas PETL preserves the general knowledge and inherent uncertainty of the pre-trained model.
Among PETL methods, LoRA demonstrated the most consistent performance across various scales. Additionally, the study found that logit-based methods, specifically Energy-based scoring, are superior to representation-based methods for decoder-only models. This is likely due to the absence of a dedicated [CLS] token in decoders, which limits the effectiveness of internal hidden states for holistic semantic capture.
Conclusion
This study highlights that scaling and parameter-efficient tuning are powerful tools for enhancing OOD robustness. While larger models are inherently more robust, PETL methods like LoRA provide a superior balance between task performance and the ability to detect distributional shifts. Future work should address the "close-OOD" challenge, where semantically similar outliers remain difficult to distinguish, potentially through improved pooling methods or specialized architectures.
Summary updated