Trainable rank one weight corrections improve out of distribution detection
Rank-1 Weight-Corrected Trainable Weight Averaging for Out-of-Distribution Detection
Computer Vision and Pattern RecognitionArtificial IntelligenceMachine Learning
Summary
Detecting when AI encounters data unlike what it trained on is important but hard. The authors improve a method that averages learned model weights by adding small, trainable corrections based on the most important weight patterns. This helps the model better identify unusual inputs on several tests. They find the improvements depend on the way unusual data is scored and work best near the model's final decision layer.
What this means in practice
- •For machine learning engineers: Improve detection of out-of-distribution inputs in deployed image recognition models by applying rank-one weight correction during weight averaging.
- •For security operations teams: Enhance anomaly detection in AI-powered monitoring systems by integrating weight-corrected averaging to reduce false positives on unusual inputs.
Authors
Akito Shinohara, Hiroaki Aizawa
Abstract
Out-of-distribution (OOD) detection identifies inputs outside the training distribution. Rank-based analyses such as RankFeat and RankWeight suggest that OOD overconfidence is closely related to dominant low-rank components in feature and weight spaces. Since weight averaging operates directly in parameter space and improves model generalization, we consider it for OOD detection from a dominant-component perspective. Trainable Weight Averaging (TWA) assigns a single coefficient to each checkpoint, limiting independent control of dominant weight components. We extend TWA with leading rank-one weight components extracted by Singular Value Decomposition as correction directions, whose contributions are learned through the in-distribution classification objective. On ResNet50, our method improves over fine-tuning and standard TWA across the evaluated datasets with MSP and RankWeight, both with and without Outlier Exposure. Mahalanobis-based evaluation yields mixed results, indicating that the benefit depends on the OOD scoring protocol. Target-layer analyses with MSP and Energy favor correction near the classifier.