Papers › SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling

SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling

26 Feb 2026arXiv:2602.23013added by Syntology

Camile Lendering, Erkut Akdag, Egor Bondarev

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Detecting visual anomalies in industrial inspection often requires training with only a few normal images per category. Recent few-shot methods achieve strong results employing foundation-model features, but typically rely on memory banks, auxiliary datasets, or multi-modal tuning of vision-language models. We therefore question whether such complexity is necessary given the feature representations of vision foundation models. To answer this question, we introduce SubspaceAD, a training-free method, that operates in two simple stages. First, patch-level features are extracted from a small set of normal images by a frozen DINOv2 backbone. Second, a Principal Component Analysis (PCA) model is fit to these features to estimate the low-dimensional subspace of normal variations. At inference, anomalies are detected via the reconstruction residual with respect to this subspace, producing interpretable and statistically grounded anomaly scores. Despite its simplicity, SubspaceAD achieves state-of-the-art performance across one-shot and few-shot settings without training, prompt tuning, or memory banks. In the one-shot anomaly detection setting, SubspaceAD achieves image-level and pixel-level AUROC of 97.1% and 97.5% on the MVTec-AD dataset, and 93.2% and 98.2% on the VisA dataset, respectively, surpassing prior state-of-the-art results. Code and demo are available at https://github.com/CLendering/SubspaceAD.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2602.23013")

Code

Syntology Ran 11 of 14 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 3 ran · honoured contract; 1 ran · violated contract; 3 ran · fixture could not drive it; 4 ran with no contract checked.

By repository: found in paper text by Syntology: 14 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

CLendering/SubspaceAD found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 11 ran; 3 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
1ran · violated contract
3ran · fixture could not drive it
4ran
3unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from CLendering/SubspaceAD. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

_calculate_kpca_scores CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran Apache-2.0 (permissive) · b71cd95b05c2fa69 · report
_calculate_pca_scores CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · ea52b1a1192a9b12 · report
_get_patch_background_mask CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 3c8e1c01c6e9ae62 · report
_kernel_self_dot CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran Apache-2.0 (permissive) · 43d3180001d136a4 · report
_row_l2 CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · violated contract fingerprinted Apache-2.0 (permissive) · e22c585bb16ac152 · report
calculate_anomaly_scores CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran Apache-2.0 (permissive) · 6f1ac8fb13b62b63 · report
get_patch_coords CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · honoured contract fingerprinted Apache-2.0 (permissive) · 552643557a224e45 · report
parse_grouped_layers CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · honoured contract fingerprinted Apache-2.0 (permissive) · 2982e3d05b76622d · report
parse_layer_indices CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · honoured contract Apache-2.0 (permissive) · e65cd60368582d7b · report
pca_reconstruct CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · fixture could not drive it Apache-2.0 (permissive) · 30a77f2f75e458a9 · report
post_process_map CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 74366f11856cc2c5 · report
FeatureExtractor CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 640289a44a7ef6de · report
_process_single_image_patched CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology unverified Apache-2.0 (permissive) · e0d57393d0a6c133 · report
_stitch_patches_to_canvas CLendering/SubspaceAD/src/subspacead/core/patching.py found in paper text by Syntology unverified Apache-2.0 (permissive) · d9ab8d4ca34b2c10 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2602.23013, was issued in February 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections