每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

SPK: Eliciting Structured Prior Knowledge for Interpretable Out-of-Distribution Detection in Real-Time Object Detection

arXiv:2608.190802026-08-18

从物体检测器内部本来就藏着的信息里提炼出五个数字来揪出它自以为是的误判

自动驾驶和机器人视觉里常用的物体检测器,遇到训练时没见过的物体类别,常常会给出自信满满却错误的判断,这就是所谓的OoD幻觉问题。这篇论文提出SPK方法,把检测器内部原本就隐含的部位语义信息、几何信息和图像背景信息提取出来,压缩成一个五维的紧凑表示。仅凭这五个数字,SPK就能比以往方法更准确地识别出这些误判,并且能说明拒绝的原因。

他们做了什么

  1. 以往方法要么在检测器输出的高维特征上设计越来越复杂的打分规则,要么重新微调检测器本身来抑制误判,而这篇论文选择直接把检测器内部原本就编码好的知识挖出来用。
  2. 研究者用两类诊断数据做监督:视觉上和已知类别相似的伪类物体(Proximal OoD),以及纯背景图像,并用GPT-5生成部位名称(如翅膀、鸟喙等),再用OWLv2和SAM 2自动定位这些部位,训练出针对每个检测区域的部位级语义响应头。
  3. 由此得到三种语义响应(与正常类别部位的相似度、与伪类部位的相似度、与背景的相似度),再加上物体相对大小(几何先验)和图像整体与训练图像的相似度(上下文先验),组成五维的SPK表示。
  4. 在PASCAL-VOC和BDD-100K数据集、YOLO、Faster R-CNN、RT-DETR三种检测器架构上实验,把同样的判别算法(KNN、Isolation Forest等)套用在SPK表示上,FPR95(在通过95%正常样本时的误判率)比直接用原始高维特征时持续更低,清除的误判数量也比此前最强方法Proximal-OoD更多。
  5. 这一切都是在完全不改动或微调原始检测器的前提下实现的,以YOLO为例,原本单张图片推理需要10.15毫秒,加上SPK全部处理后也只需要12.65毫秒,仍能满足实时使用的需求。
Figure 1: The proposed SPK framework, a proactive OoD hallucination mitigation framework, further reduces OoD-induced hallucinations beyond previous state-of-the-art methods (48), achieving additional improvements in challenging high-performance regimes.
Figure 1: The proposed SPK framework, a proactive OoD hallucination mitigation framework, further reduces OoD-induced hallucinations beyond previous state-of-the-art methods (48), achieving additional improvements in challenging high-performance regimes.
Table 1: Comparison of OoD detection performance using FPR95 across different detector architectures trained on PASCAL-VOC and BDD-100K. Lower is better.
MethodYOLOFaster R-CNNRT-DETR
PASCAL-VOCBDD-100KPASCAL-VOCBDD-100KPASCAL-VOCBDD-100K
Near-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoD
MSP67.4867.1872.9374.1268.3678.6977.4674.4170.4467.8177.4674.41
EBO90.4990.8487.2287.0660.6256.2194.8394.3798.0396.6994.8394.37
MLS89.8890.0886.4787.0659.6257.8992.5591.0892.8489.7592.5591.08
SCALE80.6780.9277.4470.5992.3480.7086.3584.9881.1276.9286.3584.98
MDS57.6769.4768.4282.3549.9656.3878.9079.3448.6552.9078.9079.34
BAM45.3643.7249.6352.1865.4442.1665.7361.3475.6165.2775.4868.44
KNN48.2039.5041.9545.2461.9537.5350.5449.7677.1063.0062.1058.00
iForest70.2767.8260.4265.2375.4352.3863.2562.7879.5265.9268.2362.30
SPK-MDS14.9917.2823.356.4621.0323.5042.4242.7318.4317.8341.7716.48
SPK-BAM21.9621.7316.753.0718.9818.179.076.1823.1225.1918.7616.84
SPK-KNN19.6417.9913.471.1715.5013.694.703.0918.2620.4316.9713.74
SPK-iForest14.2511.849.860.7013.9210.522.311.5215.4817.3211.429.25
Figure 2: Overview of the proposed SPK framework. SPK elicits semantic, geometric, and contextual priors from a pretrained object detector and organizes them into a compact five-dimensional representation for OoD hallucination detection.
Figure 2: Overview of the proposed SPK framework. SPK elicits semantic, geometric, and contextual priors from a pretrained object detector and organizes them into a compact five-dimensional representation for OoD hallucination detection.
Table 2: OoD detection counts (Near-OoD/Far-OoD) across different detector architectures. Lower is better.
ModelMethodVOC (N/F)BDD (N/F)
YOLOOriginal946 / 440701 / 666
Proximal-OoD134 / 6080 / 47
SPK135 / 5269 / 5
Faster R-CNNOriginal2150 / 13352576 / 1634
Proximal-OoD710 / 253207 / 167
SPK299 / 14060 / 25
RT-DETROriginal2311 / 15893145 / 1220
Proximal-OoD386 / 470525 / 240
SPK358 / 275359 / 113
Figure 3: Automated part-level annotation pipeline. Given an RoI crop and its object category, OWLv2 grounds the corresponding GPT-5-generated concept vocabulary into part bounding boxes. Each box prompts SAM 2 to produce a refined pixel-level part mask. Masks satisfying the object-mask coverage threshold are projected into detector-RoI coordinates and rasterized as binary 7×7 targets. Concepts without a retained mask receive an all-zero target.
Figure 3: Automated part-level annotation pipeline. Given an RoI crop and its object category, OWLv2 grounds the corresponding GPT-5-generated concept vocabulary into part bounding boxes. Each box prompts SAM 2 to produce a refined pixel-level part mask. Masks satisfying the object-mask coverage threshold are projected into detector-RoI coordinates and rasterized as binary 7×7 targets. Concepts without a retained mask receive an all-zero target.
Table 3: Ablation study of the SPK loss components on YOLO trained on PASCAL-VOC and BDD-100K. Results are reported as Near-OoD / Far-OoD FPR95. The average is computed over all four results. Lower is better.
ℒdiceℒsuppressℒgroupVOCBDDAverage
Near / FarNear / FarFPR95 ↓
25.80 / 21.3017.85 / 18.2620.80
22.10 / 16.4015.29 / 15.9717.44
20.50 / 15.8014.18 / 12.9315.85
14.25 / 11.849.86 / 0.709.16
Figure 4: Part-Level Concept Annotation Example. We use a bird RoI crop to illustrate the step-by-step annotation process for the concepts wing, head, beak, and torso. Step 1: OWLv2 grounds each concept within the detector RoI and generates a bounding-box proposal (a). Step 2: SAM 2 refines each proposal into a pixel-level part mask, which is retained only if at least 70% of its pixels overlap with the corresponding SAM 2 object mask (b). Step 3: Each retained mask is projected into detector-RoI coordinates and converted into a binary 7×7 supervision target (c). Step 4: The binary target is overlaid on the RoI crop for visualization (d).
Figure 4: Part-Level Concept Annotation Example. We use a bird RoI crop to illustrate the step-by-step annotation process for the concepts wing, head, beak, and torso. Step 1: OWLv2 grounds each concept within the detector RoI and generates a bounding-box proposal (a). Step 2: SAM 2 refines each proposal into a pixel-level part mask, which is retained only if at least 70% of its pixels overlap with the corresponding SAM 2 object mask (b). Step 3: Each retained mask is projected into detector-RoI coordinates and converted into a binary 7×7 supervision target (c). Step 4: The binary target is overlaid on the RoI crop for visualization (d).
Table 4: Ablation study of different prior components on YOLO trained on PASCAL-VOC and BDD-100K. Each dataset column reports Near-OoD / Far-OoD FPR95. The average is computed over all four results. Lower is better.
Prior componentsVOCBDDAverage
Near / FarNear / FarFPR95 ↓
Semantic15.43 / 13.2830.37 / 25.5821.17
Semantic + Geometric13.23 / 11.5020.88 / 3.8412.36
Semantic + Geometric + Contextual14.25 / 11.849.86 / 0.709.16
Figure 5: Qualitative visualization of part-level semantic responses. The learned concept maps are well aligned with the corresponding regions, demonstrating that the semantic elicitation head successfully decodes spatially grounded semantic evidence from detector RoI features.
Figure 5: Qualitative visualization of part-level semantic responses. The learned concept maps are well aligned with the corresponding regions, demonstrating that the semantic elicitation head successfully decodes spatially grounded semantic evidence from detector RoI features.
Table 5: Quality of the automated part-level annotations. We report the overall concept-mIoU, Recall@0.5, number of covered concepts, and per-class concept-mIoU. All values except concept coverage are percentages. Best results are shown in bold.
MethodOverallPer-class concept-mIoU
concept-mIoURecall@0.5# Conceptsbirdbuscarcatcowdoghorse
Ours40.838.42546.537.943.940.437.441.838.2
VLPart (37)37.036.82535.632.832.538.136.844.136.5
Grounded SAM (31)32.330.72532.131.731.333.029.538.329.4
(b) Prediction: wing
(b) Prediction: wing
Table 6: RoI feature sources and dimensions for each detector. YOLO and RT-DETR concatenate RoI-aligned features from three feature scales, whereas Faster R-CNN uses the Detectron2 box_pooler.
DetectorFeature sourceChannelsRoI feature 𝐅i
YOLODetect neck128+256+512896×7×7
RT-DETRHybrid-encoder neck256+256+256768×7×7
Faster R-CNNResNet-FPN256256×7×7
(c) Prediction: torso
(c) Prediction: torso
Table 7: Hyperparameters of the Semantic Elicitation Head.
Semantic Elicitation HeadHyperparameterValue
ArchitectureHidden channels256
Dropout0.1
NormalizationGroupNorm
ActivationGELU
Residual blocks2
Output head1×1 conv → num_concepts
Inference activationSigmoid
RoI spatial size7×7
Inference poolingLogSumExp, τ=0.5
TrainingTraining epochs80
Batch size2000
OptimizerAdamW
Learning rate2×10−4
Weight decay5×10−4
Random seed42
Validation split10%
Training samplerWeightedRandomSampler
Suppress loss weight0.25
Group loss weight0.75
Early-stopping patience10 epochs
(d) Prediction: foot
(d) Prediction: foot
Table 8: Image-level embedding sources and dimensions for each detector. We globally pool each selected feature map by its spatial mean and standard deviation, then concatenate the resulting statistics. YOLO and RT-DETR use their deepest selected backbone stage, whereas Faster R-CNN aggregates all four ResNet-FPN levels.
DetectorFeature sourceChannelsEmbedding dimension
YOLOBackbone L6 (stride 16)256mean+std:512
RT-DETRHGBlock L9 backbone (stride 32)2048mean+std:4096
Faster R-CNNResNet-FPN P2–P54×256mean+std:2048
Figure 6: Distributions of the learned semantic group responses. Samples from different data sources predominantly activate their corresponding semantic groups, validating the effectiveness of the proposed group objective.
Figure 6: Distributions of the learned semantic group responses. Samples from different data sources predominantly activate their corresponding semantic groups, validating the effectiveness of the proposed group objective.
Table 9: Semantic-head group-classification accuracy. Computed by applying arg⁡max to concept activations for YOLO on PASCAL-VOC.
Data splitAccuracy (%)
ID training set96.5
Proximal OoD81.0
Background77.0
Figure 7: UMAP visualization of representation spaces for detections from the dog, sheep, and cat categories. The visualizations are obtained using YOLO trained on PASCAL-VOC. We compare detector classification logits (left) with the proposed SPK representations (right), using the same ID-validation, Near-OoD, and Far-OoD samples. SPK yields a more structured representation space with clearer distributional differences between ID and OoD samples.
Figure 7: UMAP visualization of representation spaces for detections from the dog, sheep, and cat categories. The visualizations are obtained using YOLO trained on PASCAL-VOC. We compare detector classification logits (left) with the proposed SPK representations (right), using the same ID-validation, Near-OoD, and Far-OoD samples. SPK yields a more structured representation space with clearer distributional differences between ID and OoD samples.
Table 10: AUROC comparison across detector architectures on PASCAL-VOC and BDD-100K. Higher is better.
MethodYOLOFaster R-CNNRT-DETR
PASCAL-VOCBDD-100KPASCAL-VOCBDD-100KPASCAL-VOCBDD-100K
Near-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoD
MSP81.2479.4777.6375.1278.7173.8472.4876.3979.1678.7274.3175.06
EBO60.7357.9265.4162.8682.5886.1452.0750.8340.1243.3149.6852.74
MLS59.4161.2663.7865.0284.7683.5854.8259.4656.3759.7454.9157.43
SCALE69.8471.7372.4679.3157.4969.7264.1867.8269.3775.1666.4265.73
MDS85.6277.8180.3468.4688.3984.4173.6870.9487.4385.7173.2771.18
BAM90.1489.3889.5786.9480.9691.5680.7583.6575.7581.6576.5080.45
KNN89.5290.3191.2688.4781.7392.5888.4386.7275.1281.4683.6885.29
iForest77.3880.7182.4680.1976.3185.6481.3783.2970.8281.9478.4683.57
SPK-MDS96.1293.5595.8098.6596.1094.2092.1091.8094.3595.5489.1099.21
SPK-BAM94.5592.5096.9099.3596.4595.4098.3098.8593.7593.9093.4599.18
SPK-KNN94.9193.3197.4099.7197.0796.4699.0699.3694.4094.8793.9499.36
SPK-iForest96.3195.4398.1099.8197.3897.2599.5099.6595.2395.6795.7899.60
(b) sheep
(b) sheep
Table 11: Ablation of SPK loss components. Evaluated across Faster R-CNN and RT-DETR on PASCAL-VOC and BDD-100K. Lower FPR95 is better.
ℒdiceℒsuppressℒgroupFaster R-CNNRT-DETR
PASCAL-VOCBDD-100KPASCAL-VOCBDD-100K
Near-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoD
27.8719.9818.3618.7432.3127.0825.3529.14
24.4215.4214.1516.1127.8622.5320.7124.36
22.1914.7311.3413.2724.8621.6418.1520.81
13.9210.522.311.5215.4817.3211.429.25
(c) cat
(c) cat
Table 12: Ablation of SPK prior components. Evaluated across Faster R-CNN and RT-DETR on PASCAL-VOC and BDD-100K. Lower FPR95 is better.
Prior componentsFaster R-CNNRT-DETR
PASCAL-VOCBDD-100KPASCAL-VOCBDD-100K
Near-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoDNear-OoDFar-OoD
Semantic18.1718.9123.9225.2118.3429.1733.3634.75
Semantic + Geometric15.7816.4314.5215.7115.8525.3526.5126.82
Semantic + Geometric + Contextual13.9210.522.311.5215.4817.3211.429.25
Table 13: Comparison with competitive OoD detection methods for Deformable-DETR. Results are reported on PASCAL-VOC and BDD-100K as ID datasets, with MS-COCO and OpenImages as OoD datasets. Higher AUROC and lower FPR95 indicate better OoD detection performance. Methods marked with † employ an external DINO ViT encoder to extract additional visual representations for OoD detection, rather than relying solely on Deformable-DETR features. SPK (DINO ViT) is included to provide a fair comparison with UNO-Adapter, as both methods operate under this setting. The best results are highlighted in bold.
MethodID: PASCAL-VOCID: BDD-100K
OoD: MS-COCOOoD: OpenImagesOoD: MS-COCOOoD: OpenImages
FPR95↓AUROC↑FPR95↓AUROC↑FPR95↓AUROC↑FPR95↓AUROC↑
MDS (18)97.3950.2897.8849.0870.8676.8371.4377.98
Gram matrices (32)94.1643.9795.2938.8173.8160.1371.5657.14
KNN (38)91.8062.1591.3659.6464.7580.9061.1379.64
CSI (39)84.0055.0779.1651.3770.2777.9371.3076.42
VOS (8)97.4654.4097.0752.7776.4477.3372.5876.62
OW-DETR (11)93.0955.7093.8257.8080.7870.2977.3773.78
DisMax (25)82.0575.2176.3770.6677.6272.1481.2367.18
SIREN-vMF (7)75.4976.1078.3671.0567.5480.0666.3179.77
SIREN-KNN (7)64.7778.2365.9974.9353.9786.5647.2889.00
SAFE (42)48.8878.888.9996.7339.1885.9521.1094.31
InfoBound (52)44.8889.7643.8988.0044.8889.7643.8988.00
UNO-Adapter† (28)32.6191.6819.9095.409.8897.613.8099.04
SPK52.3275.8424.3890.201.6899.420.3799.93
SPK (DINO ViT)†28.5592.3814.8596.250.0099.800.0099.97
Table 14: Comparison with competitive OoD detection methods for Faster R-CNN. Results are reported on PASCAL-VOC as the ID dataset, with MS COCO and OpenImages as OoD datasets. Higher AUROC and lower FPR95 indicate better OoD detection performance. Methods marked with † employ an external DINO ViT encoder to extract additional visual representations for OoD detection, rather than relying solely on Faster R-CNN features. SPK (DINO ViT) is included to provide a fair comparison with UNO-Adapter, as both methods operate under this setting. The best results are highlighted in bold.
MethodMS-COCOOpenImages
AUROC↑FPR95↓AUROC↑FPR95↓
CSI (39)82.9557.4181.8359.91
GAN-Synthesis (17)82.6759.9783.6760.93
VOS (8)85.2351.3388.7047.53
SIREN (7)85.3664.6882.7868.53
TIB (44)90.3641.5588.0947.19
DFDD (43)90.7941.3488.6544.52
WFS (45)89.0140.0590.3539.17
UNO-Adapter† (28)91.2538.7392.4035.74
SPK91.5841.2095.5025.61
SPK (DINO ViT)†95.4826.2898.1610.97
Table 15: Per-image runtime of the complete SPK inference pipeline. Reported for a YOLO model pretrained on PASCAL-VOC. The complete SPK pipeline introduces an additional 2.72 ms latency per image, corresponding to a 26.8% runtime overhead over the original detector inference. *SPK inference obtains detection outputs, image-level contextual embeddings, and RoI features within the same forward pass.
ComponentCost (ms)
Original inference10.15
SPK inference*12.65
Semantic prior elicitation0.17
Isolation Forest0.05

为什么重要

自动驾驶车辆或机器人如果对从未见过的物体做出自信却错误的判断,可能导致严重后果,而这套方法无需重新训练检测器就能轻量级地挂载使用,还能说明每次拒绝判断的具体原因,这对实际部署很有价值。它也提示我们,构建更好的特征表示可能比设计越来越复杂的判别算法更重要。

本文术语

  • OoD幻觉 · 检测器把训练时没见过的物体或背景自信地误判为已知类别的现象
  • FPR95 · 在正常样本通过率达到95%时的误判率,数值越低越好
  • RoI特征 · 从检测器预测的边界框区域中提取出的细节特征向量
  • Isolation Forest · 一种通过反复随机切分数据来快速找出异常点的轻量级异常检测算法
  • Proximal OoD · 视觉上与已知类别相似、容易让检测器混淆的训练类别之外的物体

论文原文摘要(英文)

Object detectors often produce over-confident predictions for objects outside their training categories, leading to so-called out-of-distribution (OoD) hallucinations. Existing approaches for detecting or mitigating such hallucinations typically either construct scoring functions directly over learned object detector representations or modify the object detector itself to suppress hallucination emergence. However, the latent priors implicitly encoded in these representations remain largely unexplored and have not been explicitly decoded for OoD detection. To uncover and exploit these latent priors, we propose Structured Prior Knowledge (SPK), a hallucination-oriented framework that explicitly elicits OoD-relevant priors from pretrained object detectors. Specifically, SPK leverages in-distribution data and hallucination-inducing samples as diagnostic supervision to elicit part-level semantic concepts underlying object detector decision-making, rather than using them merely for rejection or object detector adaptation. The elicited semantic priors are further integrated with geometric and contextual priors to form a compact five-dimensional SPK representation for OoD detection. Extensive experiments across diverse object detector architectures and multiple OoD benchmarks demonstrate that SPK achieves state-of-the-art OoD detection. Our findings reveal that pretrained object detectors already encode substantially richer latent knowledge than is typically exploited for OoD detection. More importantly, this knowledge can be explicitly elicited and organized into a compact, structured, and interpretable knowledge space for prediction reliability analysis. This suggests a promising proactive route for improving object detector reliability by explicitly uncovering and leveraging latent priors. Code and data are available at: https://gricad-gitlab.univ-grenoble-alpes.fr/dnn-safety/spk

作者 · Changshun Wu

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Changshun Wu et al., arXiv:2608.19080, cc-by-nc-nd-4.0