TrustLoRA: Low-Rank Adaptation for Failure Detection under Out-of-distribution Data
Fei Zhu, Zhaoxiang Zhang
TL;DR
TrustLoRA addresses safe, open-world prediction by separating reliability knowledge into low-rank adapters and unifying them through LoRA arithmetic. By freezing the backbone and learning covariate-shift reliability with AugMix ($\mathcal{L}_{\rm LoRA,cov}$) and semantic-shift reliability with OE ($\mathcal{L}_{\rm LoRA,sem}$), two LoRA modules capture distinct failure sources, then merge via $\tau = \sum_t \alpha_t \tau_{\rm LoRA,t}$ to form a single, controllable detector. The approach supports rank adaptation through random projection and enables flexible reliability editing (addition or negation) to balance misclassification rejection and semantic OOD rejection without full retraining. Across CIFAR-10/100-C and ImageNet experiments, TrustLoRA outperforms strong baselines on unified failure detection metrics (e.g., AURC) while maintaining ID accuracy, and it demonstrates robustness to auxiliary data choices and backbones such as ViT. Overall, the method offers a practical, scalable way to implement flexible reliability under covariate and semantic shifts in open environments.
Abstract
Reliable prediction is an essential requirement for deep neural models that are deployed in open environments, where both covariate and semantic out-of-distribution (OOD) data arise naturally. In practice, to make safe decisions, a reliable model should accept correctly recognized inputs while rejecting both those misclassified covariate-shifted and semantic-shifted examples. Besides, considering the potential existing trade-off between rejecting different failure cases, more convenient, controllable, and flexible failure detection approaches are needed. To meet the above requirements, we propose a simple failure detection framework to unify and facilitate classification with rejection under both covariate and semantic shifts. Our key insight is that by separating and consolidating failure-specific reliability knowledge with low-rank adapters and then integrating them, we can enhance the failure detection ability effectively and flexibly. Extensive experiments demonstrate the superiority of our framework.
