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.
Figures & tables
Figure 1: Overview of the proposed dominant-component-aware extension of TWA. For each checkpoint, leading rank-one components are extracted from selected weight matrices and added as correction directions to the TWA subspace. The final model is optimized in the expanded subspace using the ID classification objective.
Protocol
Method
SVHN
Textures
Places
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
MSP
FT
77.0
84.18
73.2
86.17
72.5
86.17
TWA
78.7
80.11
70.2
88.51
72.1
85.34
Ours
79.0+0.2
79.02−1.09
74.3+4.0
85.59−2.92
75.2+3.1
81.61−3.73
Energy
FT
84.8
79.72
76.9
84.57
75.0
84.49
TWA
83.5
79.80
71.2
89.41
74.2
80.75
Table 1: OOD detection performance without Outlier Exposure (OE) using ResNet50. The final classification layer is used for the proposed method. RankWeight denotes the post-hoc RankWeight protocol. Throughout the tables, scores are reported as percentages, subscripts indicate differences from TWA in percentage points, and bold indicates the best result for each metric and experimental setting.
Method
Accuracy (%) ↑
FT
73.94
TWA
72.55
Ours
75.04+2.49
Table 2: CIFAR-100 ID accuracy without OE.
Range
Method
MSP
Energy
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
(0,51)
TWA
71.1
85.60
79.4
89.30
Ours
74.3+3.2
83.18−2.42
84.4+5.1
83.20−6.10
(0,101)
TWA
74.1
83.50
83.5
79.80
Ours
78.3+4.2
81.28−2.22
85.9+2.4
76.44−3.36
(0,151)
TWA
70.8
84.83
79.9
83.93
Table 3: Effect of checkpoint averaging range on OOD detection without OE using ResNet50.
Method / Target
MSP
Energy
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
FT
77.0
84.18
84.8
79.72
TWA
78.7
80.11
83.5
79.80
Ours: target layer for dominant-component correction
all
75.6−3.1
84.21+4.10
84.2+0.7
78.49−1.31
conv
75.9−2.8
84.53+4.42
80.5−3.0
86.14+6.34
Table 4: Target-layer analysis for dominant-component correction without OE on CIFAR-100/SVHN using ResNet50.
Dataset
Backbone
Method
MSP
Energy
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
SVHN
VGG16BN
FT
67.5
87.63
73.4
82.51
TWA
65.7
90.25
72.8
87.46
Ours
66.8+1.1
84.88−5.37
76.0+3.2
76.88−10.58
ResNet50
FT
77.0
84.18
84.8
79.72
TWA
78.7
80.11
83.5
79.80
Table 5: Effect of backbone architectures on OOD detection without OE using CIFAR-100 as ID.
Method
Accuracy (%) ↑
FT
73.94
TWA
69.94
Ours
72.69+2.75
Table 6: CIFAR-100 ID accuracy with OE.
Protocol
Method
SVHN
Textures
Places
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
AUROC (%) ↑
FPR95 (%) ↓
MSP
FT
79.4
80.22
74.4
83.99
75.3
82.10
TWA
80.5
77.27
72.1
86.91
71.1
85.08
Ours
82.9+2.5
70.34−6.93
76.6+4.5
82.39−4.52
77.3+6.2
78.62−6.46
Energy
FT
84.2
75.80
77.4
81.33
79.9
75.48
TWA
85.4
75.00
74.3
84.68
75.2
77.06
Table 7: OOD detection performance with Outlier Exposure (OE) using ResNet50. The final classification layer is used for the proposed method. RankWeight denotes the post-hoc RankWeight protocol.
OE
Method
SVHN
Textures
Places
AUROC ↑
FPR95 ↓
AUROC ↑
FPR95 ↓
AUROC ↑
FPR95 ↓
w/o OE
FT
71.2
77.20
86.6
43.94
51.5
95.95
TWA
84.1
55.20
86.6
42.23
52.9
95.50
Ours
66.3−17.8
86.29+31.09
88.2+1.6
41.22−1.01
50.8−2.1
95.56+0.06
w/ OE
FT
71.2
79.69
88.6
38.30
55.0
94.38
TWA
84.1
56.64
85.6
42.71
58.9
93.66
Table 8: Feature-based OOD detection using Mahalanobis scoring on ResNet50, with CIFAR-100 as ID. Features are extracted from the input to the final classification layer.
Figure 2: Loss landscape visualization without Outlier Exposure (OE). The proposed method expands the TWA search subspace while retaining the flat-solution behavior of weight averaging.