RIT's TGT Slashes AI Detection Failures by 13 Points in Specialized Visual Domains
A geometric fix restores domain-shift signal in single-domain classifiers, cutting distance-based OOD false positives by 11-13 points with zero inference overhead.
ProTakeaways
- New paper identifies Domain-Sensitivity Collapse, a geometric failure mode of OOD detectors on single-domain models.
- Supervised training compresses features into a low-rank class subspace, erasing exactly the directions that flag domain shift.
- Teacher-Guided Training distills class-suppressed residuals from a frozen DINOv2 teacher into the student.
- On ResNet-50, cuts out-of-domain FPR@95 by 11.6 pp (MDS), 10.8 pp (ViM), 12.9 pp (kNN) averaged over eight benchmarks.
- Teacher and auxiliary head are discarded after training, so inference cost is unchanged versus a plain classifier.
- Gains are smaller for DINOv2 students, and logit-based scorers like Energy can regress on some datasets.
Out-of-distribution detectors look great on CIFAR and ImageNet benchmarks, but they quietly fall apart the moment you train a model on a narrow visual domain like histopathology slides, satellite tiles, or factory-line photos. A new paper from Rochester Institute of Technology, Beyond the Class Subspace, pins down why this happens geometrically and proposes a training-time fix that leaves inference untouched.
The authors call the failure mode Domain-Sensitivity Collapse (DSC). Supervised single-domain training drives representations toward low-rank, class-aligned structure: variance is concentrated in a class-discriminative subspace, while orthogonal directions are suppressed for both in-distribution and OOD samples. In plain terms, the network throws away exactly the feature directions that would tell you an input is from a different domain, because those directions do not help minimize cross-entropy on a homogeneous training set.
Why your Mahalanobis score is lying to you
The paper works through the math for distance-based scorers (Mahalanobis, kNN, ViM) and logit-based ones (MSP, Energy). Distance-based scorers weight directions by coordinate differences in the ambient Euclidean geometry, so squared distance ends up dominated by the high-variance class directions regardless of their discriminative value against OOD. The authors call this variance-discriminability mismatch. Even shrinkage-regularized Mahalanobis cannot save you, because if both ID and OOD features have tiny energy outside the class subspace, there is simply nothing left to amplify.
Geometry audits back this up. On six of eight benchmarks tested with a ResNet-50, the effective rank of the feature covariance sits between 0.86 and 1.15 times the class count, meaning a 2048-dimensional embedding is behaving like a roughly C-dimensional one.
Borrowing structure from a frozen foundation model
The proposed method, Teacher-Guided Training (TGT), uses a frozen DINOv2 ViT-S/14 as a teacher. The clever bit is what gets distilled. Rather than matching teacher features directly, TGT computes per-class teacher means, builds a projector onto the class-discriminative teacher subspace, and subtracts it out. What remains is a class-suppressed residual that emphasizes domain, style, and acquisition cues.
A small auxiliary MLP head on the student is trained to predict this residual via cosine alignment, alongside the usual cross-entropy loss:
L_TGT = L_CE + lambda * (1 - cos(h(z_student), u_dom(x)))
where:
u_dom(x) = (I - P_cls) * (teacher(x) - mu_global)
P_cls = projector onto span of centered class means
After training the teacher and the auxiliary head are discarded, so inference is just the student backbone plus any standard post-hoc scorer.
Numbers that matter
Across eight single-domain datasets (Colon histopathology, TissueMNIST, EuroSAT, FashionMNIST, Food-101, Rock, Yoga, RealWaste), TGT delivers consistent double-digit gains for distance-based scorers on out-of-domain OOD. Averaged over the benchmarks on ResNet-50:
- MDS drops from 25.55% to 13.94% FPR@95 (-11.61 pp), ViM from 26.43% to 15.65% (-10.78 pp), kNN from 34.98% to 20.06% (-12.87 pp), and EBO from 52.69% to 41.73% (-8.93 pp)
- In-domain OOD also improves: MDS drops from 70.12% to 59.07% and ViM from 70.12% to 60.68% on ResNet-50
- Effective rank rises in 39 of 40 splits, confirming the geometry repair story
The authors also run a revealing oracle: running MDS directly on frozen DINOv2 features achieves 1.09% FPR@95 out-of-domain but 81.21% FPR@95 in-domain, because self-supervised features carry no class-discriminative structure. That is why you cannot just deploy DINOv2 and call it a day. TGT is trying to inherit the teacher's domain sensitivity without inheriting its class blindness.
Where TGT stumbles
Not everything wins. TGT gains are smaller and less uniform on DINOv2 students because teacher and student share architecture and pre-training, which reduces the novelty of the auxiliary supervision. Logit-based scorers like EBO and SCALE can regress on specific datasets when TGT redistributes variance too aggressively. Classification accuracy is mostly preserved or improves, with Yoga as the clear outlier at -4.1 pp, likely because the domain-residual objective conflicts with fine-grained pose boundaries.
Absolute in-domain FPR@95 also remains high across the board. Detecting a held-out class that shares acquisition modality with training classes is inherently hard, and the authors are candid that this regime remains largely unsolved.
When to reach for it
TGT is worth trying if you are shipping a classifier trained on a visually homogeneous dataset (medical, remote sensing, industrial inspection, waste sorting) and you rely on a post-hoc distance-based OOD scorer downstream. The recipe is drop-in: keep your backbone, add a domain head during training, use DINOv2 as the frozen teacher, and delete both at deployment. The authors state that code, pretrained weights, and data splits will be released upon acceptance, and the implementation slots into the OpenOOD pipeline they use for evaluation.