Source-linked AI summary

ShiftSplit-AD: Separating Domain Shift from Defects in Foundation-Feature Visual Anomaly Detection

Muhamathu Ameer Ali Aacaas Muhamath

arXiv:2608.27610v1cs.CV

TL;DR

Benign acquisition changes can enlarge nearest-normal distances and confound domain variation with defects. ShiftSplit-AD decomposes frozen DINOv2 residuals into low-rank and row-sparse components, then scores the sparse component or a fusion. The results show a conditional trade-off: sparse-only scoring improves AeBAD-S, but can discard defect information and underperform on other evaluations.

  • Problem

    Benign acquisition changes can enlarge nearest-normal distances, making it difficult to distinguish domain variation from defects.

    Source: §1 · p. 1
  • Method

    ShiftSplit-AD applies per-test-image low-rank/row-sparse decomposition to frozen DINO nearest-normal patch residuals and scores the sparse component or a low-rank/sparse fusion.

    Source: §1 · p. 1, §8 · p. 7
  • Results

    Sparse-only scoring improves AeBAD-S AUROC from 0.6780 to 0.7294 and AUPRC from 0.8052 to 0.8465, but underperforms raw scoring on held-out MVTec averages and degrades Bottle localization.

    Source: §8 · p. 7
  • Takeaways & Limitations

    Structured residual filtering can help when domain variation strongly contaminates raw residuals, but reliable use depends on balancing shift suppression against defect preservation.

    Source: §8 · p. 7

    The study uses one frozen DINOv2-small backbone, covers only five MVTec categories, and is exploratory rather than preregistered.

    Source: §7 · p. 6

Abstract

from arXiv · show

Visual anomaly detectors based on frozen foundation-model features commonly score distances from test patches to a memory of normal features. Benign acquisition changes can also enlarge these distances, confounding domain variation with defects. We investigate whether structured decomposition of nearest-normal DINOv2 residuals can suppress shift-induced evidence while retaining unseen defects. ShiftSplit-AD decomposes the patch residual matrix into low-rank and row-sparse components and scores the sparse component, with an optional low-rank/sparse fusion. The experiments expose a central trade-off rather than a universal separation: genuine defects can contain correlated, low-dimensional structure, so filtering broad residual activity may also remove defect information. On AeBAD-S, using settings fixed after Bottle development, sparse-only scoring improves image AUROC from 0.6780 to 0.7294 and AUPRC from 0.8052 to 0.8465. Paired bootstrap 95% intervals for the improvements are [0.0238, 0.0808] and [0.0170, 0.0650], respectively. However, sparse-only scoring reduces mean clean AUROC from 0.9890 to 0.9133 on four held-out MVTec categories and degrades Bottle localization. These findings show that residual decomposition can help when domain shift strongly contaminates anomaly evidence, but preserving defect structure remains the limiting problem.

1 Introduction

Nearest-normal distances can reflect benign acquisition changes as well as defects, motivating a test of whether residual structure can separate broad domain variation from localized defect evidence. ShiftSplit-AD studies that trade-off with per-image low-rank/row-sparse decomposition, finding that filtering can help under shift but may remove defect information.

1 Introduction

  • Benign illumination, viewpoint, background, blur, and sensor noise can enlarge nearest-normal residuals, confounding harmless acquisition changes with defects.AeBAD was introduced to expose real acquisition changes, including illumination, view, alignment, and scale variation, in aero-engine blade inspection.Source: §1 · p. 1
  • Real defects can contain correlated structure, so suppressing broad residual activity may remove defect information as well as shift evidence.Sparse-only scoring helps on AeBAD-S overall but loses accuracy on held-out MVTec categories; fusion recovers much of that loss without being universally superior.Source: §1 · p. 1
  • ShiftSplit-AD tests per-test-image low-rank/row-sparse decomposition of frozen DINO nearest-normal patch residuals as a way to study shift suppression versus defect preservation.The contribution is this application and empirical study, not a claim of novelty for decomposition or shift-aware anomaly detection generally.Source: §1 · p. 1
  • The study fixes decomposition, top-5 aggregation, and fusion settings after Bottle development, then evaluates four other MVTec categories and AeBAD-S without retuning.It reports paired bootstrap uncertainty on AeBAD-S alongside a defect-type failure and localization degradation.Source: §1 · p. 2

2 Related Work

ShiftSplit-AD is positioned as a post-hoc, training-free analysis of each test image’s nearest-normal frozen-feature residuals, distinct from methods that align distributions, learn invariance, or fit normal-feature subspaces. Its decomposition is a heuristic for reweighting residual structure, not a semantic or guaranteed separation of shift and defects.

Industrial visual anomaly detection

  • The raw baseline uses frozen DINOv2 patch features and exact nearest-neighbor residuals, within a broader memory-based family that includes SPADE and PatchCore [12].The repository’s PatchCore-style DINO coreset comparison is not a canonical PatchCore reproduction.Source: §2 · p. 2

Foundation features for anomaly detection

  • The method reweights frozen DINOv2 residual geometry rather than using language, learning a task-specific model, or aligning diffusion residual fields.DINOv2 patch tokens provide spatial representations; WinCLIP instead adapts CLIP through prompt ensembles and window features [9], while Anomaly-Related Residual Fields uses diffusion residual evolution.Source: §2 · p. 2

Domain shift

  • Unlike ADShift’s distribution alignment and Invariant Anomaly Detection’s learned regularization, ShiftSplit-AD leaves the frozen representation and normal memory unchanged and decomposes each test image’s residuals.AeBAD-S is the principal real-shift evaluation; synthetic brightness, contrast, blur, and noise are diagnostics, not models of the full acquisition domain.Source: §2 · p. 2

Subspace and residual methods

  • ShiftSplit-AD decomposes nearest-neighbor residuals for each test image, unlike SubspaceAD’s PCA model fitted to normal DINOv2 features.Its low-rank component is test-conditioned rather than a PCA model of normal training features.Source: §2 · p. 2
  • ShiftSplit-AD estimates structure from each test residual matrix without target-normal calibration images, unlike SPARC’s few-shot deployment calibration.SPARC uses up to eight verified-normal images from the incoming target lot.Source: §2 · p. 2

Low-rank and sparse decomposition

  • The low-rank/sparse decomposition is heuristic and does not inherit Principal Component Pursuit’s exact-recovery guarantees.Spatial-patch rows motivate an ℓ2,1 row-group penalty, and neither component has a guaranteed semantic identity.Source: §2 · p. 2

3 Method

ShiftSplit-AD matches frozen DINOv2 patch features to a normal-only memory, decomposes each test image’s residual matrix into low-rank and row-sparse structure, and scores sparse residuals or a fusion. Final image scores average the five largest patch scores, with the fusion weight fixed after Bottle development.

3.1 Frozen Patch Features and Normal Memory

  • A frozen DINOv2-small encoder produces 256 patch embeddings on a 16 × 16 grid, and normal-training patches form the memory used for exact Euclidean nearest-neighbor matching.No anomalous test image enters the memory; residuals and raw patch anomaly scores are then computed from the matches.Source: §3.1 · p. 3

3.2 ShiftSplit Decomposition

  • Each test-image residual matrix is approximately decomposed into low-rank L and row-sparse S components using a classical low-rank/sparse regularization pattern.The nuclear norm favors correlated residual structure in a low-dimensional subspace, while the row-group penalty encourages only a subset of spatial patches to remain active in S; locked evaluations use 20 iterations.Source: §3.2 · p. 3

3.3 Scoring and Fusion

  • Sparse-only patch scores use the norm of each S row, and final image scores average the five largest patch scores.Bottle development selected fusion weight α = 0.75, which is fixed for held-out MVTec categories and AeBAD-S rather than claimed universally optimal.Source: §3.3 · p. 3

4 Experimental Setup

The evaluation fixes design choices after Bottle development and then tests held-out MVTec categories and AeBAD-S without retuning. It combines controlled shift diagnostics with a real-shift benchmark, image-level metrics, localization metrics, and bootstrap comparisons.

4.1 Development and Evaluation Protocol

  • Bottle informs the decomposition thresholds, top-5 aggregation, and fusion weight; Cable, Hazelnut, Metal Nut, Wood, and AeBAD-S are subsequently evaluated with those settings fixed.Bottle test labels informed development, and the sequence is transfer-oriented evidence rather than a preregistered benchmark evaluation.Source: §4.1 · p. 3

4.2 Datasets

  • MVTec AD provides normal-only training images and test images with pixel masks, while AeBAD-S supplies the real domain-shift evaluation.The AeBAD-S test set contains 1,639 images: 490 normal and 1,149 anomalous, split across ablation, breakdown, fracture, and groove.Source: §4.2 · p. 3

4.3 Shifts, Baselines, and Metrics

  • The main Bottle comparison uses Gaussian noise with standard deviation 20, alongside brightness, contrast, blur, a severity sweep, and eight noise seeds.The raw baseline is exact DINOv2-small nearest-normal matching; fusion combines L and S with α = 0.75.Source: §4.3 · p. 3
  • Figure 2 reports that both decomposition scores improve AeBAD-S image AUROC over raw residual ranking, with S-only highest.Image performance uses AUROC and AeBAD-S AUPRC; localization uses pixel AUROC and AUPRC after upsampling from the 16 × 16 patch grid.Source: §4.3 · p. 3, Figure 2 · p. 4

5 Results

Sparse-only scoring improves AeBAD-S detection, but the gains are not universal: held-out MVTec results and Bottle localization show that decomposition can also remove useful defect evidence.

5.1 Real Domain Shift on AeBAD-S

  • 0.0514 AUROC and 0.0412 AUPRC gains: S-only ShiftSplit-AD exceeds raw residual scoring on AeBAD-S, with paired 95% intervals [0.0238, 0.0808] and [0.0170, 0.0650].Every one of 5,000 saved AUROC bootstrap resamples had a positive difference; 99.94% of AUPRC resamples were positive.Source: §5.1 · p. 4
  • Breakdown AUROC falls from 0.8894 to 0.7796 and AUPRC from 0.7931 to 0.6803 under S-only, although S-only improves both metrics for the other three defect types.The defect-type results rank each type against the same 490 normal test images.Source: §5.1 · p. 4, Table 2 · p. 4

5.2 Held-Out MVTec Categories

  • Across all five MVTec categories, mean clean AUROC is 0.9912 raw versus 0.9272 S-only, while Bottle noise-20 AUROC rises from 0.7421 to 0.9865 under S-only.Source: §5.2 · p. 4
  • Fusion consistently retains more defect evidence than S-only on held-out MVTec, but raw scoring is strongest in seven of eight category/condition comparisons.Figure 4 contrasts clean results with Gaussian noise at standard deviation 20.Source: Figure 4 · p. 5
  • 0.0757 clean and 0.0946 noise-20 mean-AUROC reductions: S-only trails raw on four held-out MVTec categories, while fusion recovers much but remains below raw on average.Table 3 reports mean image AUROC over four held-out categories after α = 0.75 was selected on Bottle.Source: §5.2 · p. 4, Table 3 · p. 5

5.3 Bottle Diagnostics and Ablations

  • On Bottle under noise-20, S reaches 0.9865 AUROC, versus 0.7421 for raw R, 0.6325 for low-rank L, and 0.5079 for remainder E.On clean Bottle, raw R and L each reach 1.0000 AUROC, while S reaches 0.9825 and E 0.5325; useful defect signal is not confined to S.Source: §5.3 · pp. 4–5, Table 4 · p. 5
  • Across eight noise seeds, S-only Bottle mean AUROC is 0.9522, 0.9576, and 0.9472 at standard deviations 10, 20, and 30, respectively, versus raw’s 0.5862, 0.6452, and 0.5875.With a threshold calibrated to 5% clean-normal false-positive rate, controlled noise-20 yields false-positive rates of 1.00 for raw and 0.05 for S-only.Source: §5.3 · p. 5
  • Bottle localization degrades under S-only: pixel AUROC is 0.8964 versus 0.9815 raw, and pixel AUPRC is 0.3951 versus 0.7357 raw.The result is consistent with some defect residuals being assigned to the low-rank component.Source: §5.3 · p. 5

6 Discussion

Residual structure offers useful clues about domain shift, but neither low-rank concentration nor spatial breadth reliably separates shift from defects. Sparse scoring can suppress nuisance evidence while also removing defect information, so its value depends on the setting.

6 Discussion

  • 90% residual spectral energy requires 67.55 singular components for clean Bottle normals, 48.10 for noisy normals, and 42.92 for real defects, so concentration alone cannot identify shift.Defects are at least as spectrally concentrated as synthetic shift in this diagnostic; the components therefore have no fixed semantic identity.Source: §6 · p. 5
  • The 80%-energy patch counts average 158.5 for clean normals, 173.9 for noisy normals, and 142.4 for defects, but broad defects and sparse glare or reflection limit this spatial-breadth tendency.Row shrinkage exploits the broader noise pattern in the Bottle development setting; the figure also shows real defects can contain substantial low-rank structure.Source: §6 · p. 5, Figure 5 · p. 6
  • S-only scoring helps AeBAD-S and three defect groups, but hurts held-out MVTec and AeBAD breakdown; fusion improves held-out MVTec averages while retaining less shift suppression on AeBAD-S.The bootstrap supports stability of the AeBAD-S aggregate improvement on this test set, not universality across domains, defect mixtures, or development choices.Source: §6 · p. 5
  • Paired bootstrap intervals support the AeBAD-S aggregate improvement only for resampling this test set, not for future domains, defect mixtures, or alternative development choices.A positive aggregate difference coexists with a large negative difference for breakdown.Source: §6 · p. 5
  • Residual decomposition may be useful as a robustness control when normal validation reveals shift-induced false positives, but default S-only scoring is unsupported.A safer future system could adapt raw, low-rank, and sparse evidence using normal calibration data or estimated shift severity without consulting anomalous evaluation labels.Source: §6 · pp. 5–6

7 Limitations

The study’s conclusions are bounded by its single frozen backbone, limited benchmark coverage, manually fixed decomposition settings, and retrieval design. It also does not provide real-shift localization results or a broad state-of-the-art comparison.

7 Limitations

  • The study uses only DINOv2-small, evaluates five MVTec categories rather than the full benchmark, and uses Bottle heavily during development.Although held-out labels did not choose α, the overall research process was exploratory rather than preregistered.Source: §7 · p. 6
  • Decomposition parameters are fixed and manually motivated, do not adapt to category, domain, defect scale, or memory quality, and lack a theoretical recovery guarantee for these residuals.The alternating proximal procedure also leaves nonzero reconstruction error.Source: §7 · p. 6
  • AeBAD-S covers one component family and one collection setting, and the study reports no corresponding real-shift localization analysis.More real-shift datasets are needed.Source: §7 · p. 6
  • Bottle localization degrades substantially under S-only scoring; the 16 × 16 patch grid and bilinear upsampling also limit boundary precision.Removing correlated defect structure contributes to the localization loss, while large defects, sparse reflections, dense sensor noise, and viewpoint changes can violate the spatial intuition in different ways.Source: §7 · p. 6
  • Exact patch retrieval can be expensive, and global nearest-neighbor matching does not enforce spatial correspondence.Matching across object locations may increase tolerance to pose variation but can also suppress spatially meaningful anomalies.Source: §7 · p. 6
  • The study analyzes mechanisms rather than providing a broad state-of-the-art comparison, and its PatchCore-style DINO coreset baseline is not a canonical PatchCore reproduction.Several recent distribution-shift and subspace-based methods are discussed but not reproduced under the same protocol.Source: §7 · p. 6

8 Conclusion

The paper asks whether structured decomposition of frozen nearest-normal patch residuals can reduce domain-shift-induced anomaly evidence. ShiftSplit-AD exposes a trade-off: sparse scoring improves AeBAD-S under Bottle-fixed settings, but also loses defect information, limiting a universal conclusion.

8 Conclusion

  • ShiftSplit-AD decomposes frozen DINO nearest-normal patch residuals into low-rank and row-sparse components, scoring the sparse component or a low-rank/sparse fusion.The study asks whether residual structure can reduce domain-shift-induced anomaly evidence.Source: §8 · p. 7
  • With Bottle-derived settings fixed, S-only scoring improves AeBAD-S AUROC from 0.6780 to 0.7294 and AUPRC from 0.8052 to 0.8465, but underperforms raw scoring on held-out MVTec averages, hurts AeBAD breakdown, and degrades Bottle localization.The paired bootstrap intervals for the AeBAD-S improvements are positive.Source: §8 · p. 7
  • Structured residual filtering is promising when domain variation strongly contaminates raw residuals, but reliable deployment requires balancing shift suppression against defect preservation.The results reject a simple semantic split between shift and defect because genuine defects can contain correlated structure.Source: §8 · p. 7
Loading 2608.27610v1…