SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.23013 · 2026

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

Egor Bondarev, Camile Lendering, Erkut Akdag

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2602.23013.json · badge: /api/ran/2602.23013.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
CLendering/SubspaceAD community
Papers with Code archive
11 ran · 3 no recorded run
FunctionStatusWhere it lives
_calculate_kpca_scores Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("b71cd95b05c2fa69")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.decomposition import KernelPCA
from sklearn.preprocessing import StandardScaler

# Create minimal input data
np.random.seed(0)
X = np.random.randn(2, 4).astype(np.float64)

# Create and fit a scaler
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)

# Create and fit a KernelPCA instance with 'rbf' kernel
kpca = KernelPCA(n_components=3, kernel='rbf', random_state=0)
kpca.fit(X_scaled)

# Construct the pca dict with required keys
pca = {
    'scaler': scaler,
    'kpca': kpca
}

# Define ARGS
ARGS = {
    'X': X,
    'pca': pca,
    'drop_k': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_calculate_pca_scores Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("ea52b1a1192a9b12")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create a small PCA dictionary with required keys
n_samples = 2
n_features = 4
n_components = 3

# Generate synthetic data
X = np.random.randn(n_samples, n_features).astype(np.float32)

# Create PCA dict with required structure
pca = {
    'mu': np.random.randn(n_features).astype(np.float32),
    'components': np.random.randn(n_features, n_components).astype(np.float32),
    'eigvals': np.array([2.5, 1.8, 0.9], dtype=np.float32),
    'k': n_components,
    'eps': 1e-8
}

# Define ARGS with all parameters for _calculate_pca_scores
ARGS = {
    'X': X,
    'pca': pca,
    'method': 'reconstruction',
    'drop_k': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_get_patch_background_mask Ran
ran, violated the contract we drafted
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("3c8e1c01c6e9ae62")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import logging
import cv2

# Set random seed for reproducibility
np.random.seed(0)

# Create a small batch of saliency masks
# Shape: (batch_size, height, width) = (2, 4, 3)
saliency_masks_batch = np.random.rand(2, 4, 3).astype(np.float32) * 255

# Test with percentile threshold method
threshold_method = 'percentile'
percentile_threshold = 0.5

ARGS = {
    'saliency_masks_batch': saliency_masks_batch,
    'threshold_method': threshold_method,
    'percentile_threshold': percentile_threshold
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_kernel_self_dot Ran
ran; our contract draft was wrong, not the code
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("43d3180001d136a4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.decomposition import KernelPCA

# Create a small numpy array for X
X = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]])

# Create a mock KernelPCA object with specific attributes
class MockKernelPCA:
    def __init__(self, kernel, gamma=None, degree=None, coef0=1):
        self.kernel = kernel
        self.gamma = gamma
        self.degree = degree
        self.coef0 = coef0

# Instantiate the mock KernelPCA with 'rbf' kernel
kpca_rbf = MockKernelPCA(kernel='rbf')

# Instantiate the mock KernelPCA with 'linear' kernel
kpca_linear = MockKernelPCA(kernel='linear', coef0=2)

# Instantiate the mock KernelPCA with 'poly' kernel
kpca_poly = MockKernelPCA(kernel='poly', gamma=0.1, degree=3, coef0=1)

# Instantiate the mock KernelPCA with 'sigmoid' kernel
kpca_sigmoid = MockKernelPCA(kernel='sigmoid', gamma=0.2, coef0=0)

# Instantiate the mock KernelPCA with an unknown kernel
kpca_unknown = MockKernelPCA(kernel='unknown')

# Choose one of the mock KernelPCA instances to use in the function call
kpca = kpca_rbf

# Define the ARGS dictionary with the parameters for _kernel_self_dot
ARGS = {
    'X': X,
    'kpca': kpca
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_row_l2 Ran
ran, violated the contract we drafted
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("e22c585bb16ac152")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small test matrix with shape (2, 4)
# Rows will be normalized to unit length
X = np.array([
    [3.0, 4.0, 0.0, 0.0],
    [1.0, 1.0, 1.0, 1.0]
], dtype=np.float32)

eps = 1e-8

ARGS = {
    "X": X,
    "eps": eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_anomaly_scores Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("6f1ac8fb13b62b63")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import KernelPCA, PCA

# Set random seed for reproducibility
np.random.seed(0)

# Create sample data
n_samples = 5
n_features = 4
X_data = np.random.randn(n_samples, n_features).astype(np.float64)

# Create a standard PCA dict
pca_scaler = StandardScaler()
pca_scaler.fit(X_data)
X_scaled = pca_scaler.transform(X_data)

pca_model = PCA(n_components=3)
pca_model.fit(X_scaled)

pca_dict = {
    'mu': pca_model.mean_,
    'components': pca_model.components_.T,  # transpose to match expected shape
    'k': 3,
    'eigvals': pca_model.explained_variance_,
    'eps': 1e-8
}

# Create test data for scoring
X_test = np.random.randn(2, n_features).astype(np.float64)

# Define ARGS for calculate_anomaly_scores with standard PCA
ARGS = {
    'X': X_test,
    'pca': pca_dict,
    'method': 'reconstruction',
    'drop_k': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_patch_coords Ran
ran, honoured the contract we drafted
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("552643557a224e45")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - image_height: int, used in range() and min/max comparisons
# - image_width: int, used in range() and min/max comparisons
# - patch_size: int, used in arithmetic and comparisons
# - overlap: float, used in arithmetic (1 - overlap)

ARGS = {
    "image_height": 100,
    "image_width": 150,
    "patch_size": 32,
    "overlap": 0.25
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_grouped_layers Ran
ran, honoured the contract we drafted
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("2982e3d05b76622d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# parse_grouped_layers takes a single parameter: arg_str (a string)
# The function parses a comma-separated string of integers, grouped by colons
# Example: '-1,-2:-3,-4' would parse as [[-1, -2], [-3], [-4]]

ARGS = {
    'arg_str': '-1,-2:-3,-4'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_layer_indices Ran
ran, honoured the contract we drafted
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("e65cd60368582d7b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# The function parse_layer_indices takes a comma-separated string of integers
# and returns a list of integers. We need to provide a valid string argument.

ARGS = {
    "arg_str": "0, 1, 2, 3"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pca_reconstruct Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("30a77f2f75e458a9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small PCA dictionary with the required structure
# The function expects:
# - pca['mu']: mean vector
# - pca['components']: full components matrix
# - pca['k']: number of components to use

# Set up dimensions: 
# - Original feature dimension: 4
# - Number of components: 3
# - Batch size: 2

feature_dim = 4
n_components = 3
batch_size = 2

# Create synthetic PCA data
np.random.seed(0)
mu = np.random.randn(feature_dim).astype(np.float32)
# Components should be (feature_dim, n_components_total)
# We'll create more components than we use
components = np.random.randn(feature_dim, n_components).astype(np.float32)

pca = {
    'mu': mu,
    'components': components,
    'k': n_components
}

# Create input data X: (batch_size, feature_dim)
X = np.random.randn(batch_size, feature_dim).astype(np.float32)

# drop_k parameter: number of leading components to zero out
drop_k = 0

ARGS = {
    'X': X,
    'pca': pca,
    'drop_k': drop_k
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
post_process_map Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("74366f11856cc2c5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 2, dtype family float, shape (8, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import cv2

# Create a small anomaly map (4x3 to have distinct dimensions)
anomaly_map = np.random.rand(4, 3).astype(np.float32) * 255

# Define ARGS dict with all parameters
ARGS = {
    "anomaly_map": anomaly_map,
    "res": 8,
    "blur": True,
    "close_holes": False,
    "close_k_size": 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 8) — shape (8, 8) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
FeatureExtractor Not yet run
unverified (harvested, no recorded run)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("640289a44a7ef6de")
How it ran

no invocation recorded.

_process_single_image_patched Not yet run
unverified (harvested, no recorded run)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("e0d57393d0a6c133")
How it ran

no invocation recorded.

_stitch_patches_to_canvas Not yet run
unverified (harvested, no recorded run)
CLendering/SubspaceAD/src/subspacead/core/patching.py
code served (permissive licence) · get_code("d9ab8d4ca34b2c10")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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 visionlanguage 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-ofthe-art results. Code and demo are available at https: //github.com/CLendering/SubspaceAD

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2602.23013")
get_code_for_paper("2602.23013")
have("2602.23013")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2602.23013.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2602.23013.svg)](https://syntology.ai/paper/2602.23013)

Connect an agent — have() is free.