On the Problem of Consistent Anomalies in Zero-Shot Industrial Anomaly Detection
Authors: Tai Le Gia
Jaehyun Ahn
Venue: Accepted by TMLR ()

Abstract: Zero-shot image anomaly classification (AC) and anomaly segmentation (AS) play a crucial role in industrial quality control, where defects must be detected without prior training data. Current representation-based approaches rely on comparing patch features with nearest neighbors in unlabeled test images. However, these methods fail when faced with consistent anomalies—similar defects that consistently appear across multiple images—leading to poor AC/AS performance. We present Consistent-Anomaly Detection Graph (CoDeGraph), a novel algorithm that addresses this challenge by identifying and filtering consistent anomalies from similarity computations. Our key insight is that for industrial images, normal patches exhibit stable, gradually increasing similarity to other test images, whereas consistent-anomaly patches show abrupt spikes after exhausting a limited set of images with similar matches. We term this phenomenon ``neighbor-burnout'' and engineer a robust system to exploit it. CoDeGraph constructs an image-level graph, with images as nodes and edges linking those with shared consistent-anomaly patterns, using community detection to identify and filter out consistent-anomaly patches. To provide a theoretical explanation for this phenomenon, we develop a model grounded in Extreme Value Theory that explains why our approach is effective. Experimental results on MVTec AD using the ViT-L-14-336 backbone show 98.3\% AUROC for AC and AS performance of 66.8\% (+4.2\%) F1 and 68.1\% (+5.4\%) AP over state-of-the-art zero-shot methods. Additional experiments with the DINOv2 backbone further enhance segmentation, achieving a 69.1\% (+6.5\%) F1 and a 71.9\% (+9.2\%) AP, demonstrating the robustness of our approach across different architectures. We release our at \url{https://github.com/DumBringer/CoDeGraph}.

Published in Transactions on Machine Learning Research (10/2025)
On the Problem of Consistent Anomalies in Zero-Shot In- dustrial Anomaly Detection
Tai Le-Gia
giataile@occo.com
Deportment of Mathematics
Chungnam National University
Ahn Jachyun
jhahn Bera. oc.kr
Department of Mathematics
Chungnam National University
Reviewed on OpenReview: openrevvee... net/ forum?? id= 024Rb50Z34
Abstract
Zero-shot image anomaly classification (AC) and anomaly segmentation (AS) play crucial role in industrial quality control, where defects must be detected without prior training data. Current representation--base approaches rely on comparing patch features with near- est neighbors in unlabeled test images. However, these methods fail when faced with con- sistent anomalies similar defects that consistently appear across multiple images-leading to poor AC/AS performance. We present Consistent-Anomaly Detection Graph (CoDe- Graph), novel algorithm that addresses this challenge by identifying and filtering consis- tent anomalies from similarity computations. Our key insight that for industrial images, normal patches exhibit stable, gradually increasing similarity to other test images, whercas consistent-anomally patches show abrupt spikes after exhausting a limited set of images with similar matches. We term this phenomenon "neighbor-burnoutt" and engineer a robust sys- tem to exploit it. CoDeGraph constructs an image-level graph, with images as nodes and edges linking those with shared consistent-anonally patterns, using community detection to identify and filter out consistent-anoraaly patches. To provide theoretical explanation for this phenomenon, we develop a model grounded in Extreme Value Theory that explains why approach is effective. Experimental results MVTee AD using the ViT-I-14-336 backbone show 98.3% AUROC for AC and AS performance of 66.8% (+4.2%) F1 and 68.1% (+5.4%%) AP over state-of-the-at zero-shot. methods. Additional experiments with the DI- NOv2 backbone further enhance segmentation, achieving a 69.1% (+6.5%) Fl and a 71.9% (+9.2%) AP, demonstrating the robustness our approach across different architectures. Our code available at htttps//githas con//uumrrringger//Drrrrllll
-imila
1
Introduction
Anomaly detection is vital for industrial manufacturing, where products are semantically identical but defects range from subtle scratches logical and structural errors. Traditional full-shot methods (Batzner et al.
2024 Detard et al.] 2021: Mousakhan et al.] 2024 Li et al.) 2021 Rudolph et al.) 2023) Roth et al.) 2022 large corpus of normal training images. However, the fast-paced and diverse nature of industrial settings often demands solutions that require mini-
Zhou et al. 2024 deliver strong AC/AS performance by relying
mal resources. Few-shol approaches, such as RegAD (Huang et al. 2022) and GraphCore (Xie et. al.) 2023) have shown reliable accuracy by utilizing a small handful of normal images. Zero-shot methods surpass this limit by completely removing the requirement for training data. Techniques like WinCLIP (Jeong et al. 2023). AnomalyGPT (Gu al., 2202)), AnomalyCLIP (Zhou et al., 2023), and APRIL-GAN [Chen et al.
2023 pioneer the of text prompts to guide anomaly detection. More recently, MuSe [Li et al. 2024

---

Published in Transactions on Machine Learning Research (10/2025)
Incoasistcatt Ancuull Imuge
Nomoal Irngess
Ouaestent Anteally Imagrs
Assemaons Panchex
Siuil cuttches
fond
Test, dattase D
Consletent-
Figure 1: Illustration of zero-shot anomaly detection's consistent-anomaly problem. Industrial images have normal patches (blue squares) that match nearly all test images. Scratches and other random anomalies have high anomaly scores since they fail to find similar matches across the test set. Defects from consistent- anomaly images (flipped metal nuts) easily find deceptive matches within the images (orange region) sharing the same anomaly pattern (rotate counter-clockwise instead of clockwise).
introduces a mutual scoring mechanism that compares patches across unlabeled test images, offering robust zero-shot solution.
Despite these advances, existing zero-shot methods face a critical limitation with consistent anoma- lies similar defects that recur across multiple images in a test dataset. For instance, in MVTec AD |Bergmann et al. (2019) anomalics like flipped metal_mut objects form isolated groups with distinct features, shown in Fig. They distinguishable at the image level but problematic for patch-level text-prompt approaches (Jeong et al. 2023). resulting in false negatives. This motivates methods exploiting image-level relationships for zero-shot industrial anomaly detection.
To address this challenge, we propose CoDeGraph Coosistent-Anomall Detection Graph), novel approach that leverages image-level relationships rather than purely patch-level comparisons. Our key insight is that consistent anomalies exhibit a distinctive neighbor-burnoul phenomennn: normal patches relain steady similarity to neighboring images due to abundant similar matches across images, characterized by power-law decay rate, whereas consistent-anomaly patches show stable distances to limited set of similar anomalous images followed by abrupt distance spikes when these matches are exhausted.
CoDeGraph operationalizes this observation through three-stage framework. First, by introducing the endurance ratio that captures the neighbor-burnout phenomenon, we enable the identification of connections that potentially connect similar anomalous patches across images. Second, we construct a similarity graph where nodes represent test images and edge weights reflect the strength of suspicious connections wet them, enabling consistent-anomal images to form densely connected communities. Finally, we apply com- munity detection algorithms identify these dense communities and selectively filter patches within them that exhibit strong dependency intra-commuuity matches, thereby removing the source of scoring bias while preserving useful normal patches for the comparison.
This graph-based approach enables CoDeGraph to robustly identify and mitigale the impact of consistent anomalies while maintaining robust performance on other datasets. Experimental results demonstrate that CoDeGraph achieves competitive performance on inconisttent-anomaly datasets, including the inconsistent subelasses of MVTee AD (98.3% AUROC-cls, 65.1% Fl-seg) and Visa (91.6% AUROC-els, 48.3% Fl-seg), while simultaneously providing substantial improvements on consistent-anomaly datasets with gains of up to 14.9% in Fl-score and 18.8% in AP for segmentation tasks. The main contributions of our work are
We formalize the mnsistennt-nommal problem and identify the neighbor- phenomenon, devel- oping an Extreme Value Theory model explaining why normal patches follow predictable power-law decay while consistent anomalies deviate sharply. Motivated by this insight, we propose the en- durance ratio metric for consistent-anomaly discrimination.
2

---

Published in Transactions on Machine Learning Research (10/2025)
We propose CoDeGraph, novel framework that constructs an image-level similarity graph based our endurance ratio. This approach enables the robust identification of consistent-anomaly images as dense communities, which are then selectively filtered to mitigate scoring bias from deceptive matches.
Our CodeGraph achieves state-of-the-art performance on consistent-anomaly benchmarks (gains up to 14.9% Fi-score, 18.8% AP) while maintaining competitive performance conventional datasets, proving effectiveness a general wero-shot solution.
2 Preliminary
In zero-shot anomaly detection and segmentation, we aim identify defects in unlabeled test images D (I,,... . without any training data. Our method builds upon two key components from existing work: Local Neighborhood Aggregation and Mutual Scoring Mechanism
Li et al. 2024
2.1 Local Neighborhood Aggregation (LNAMD)
LNAMD [Li al. 2024 processes Vision Transformer (ViT) (Dosovitskiy et al. 2021 features at multiple receptive fields to capture anomalies of varying sizes. For patch tokens at ViT layer of image Li, F [r/,,.......MM E IR MxC where M is the number of patches and C is the feature dimension, the process begins by reshaping patch tokens F. to VM x VM x An adaptive pooling operation then applied in r neighborhoods at each spatial location to capture multi-scale features. The output aggregated patch tokens reshaped back to size M C, resulting in p.. ( p" p1(1,,n)) pooling operator of size
where p" adapt.ive
2.2 Mutual Scoring Mechanism
Mutual Scoring Mechanism (MSM) (Li et al. 2024 computes anomaly scores by comparing each patch in query Q to patches of all images in the base B. In zero-shot settings, the query set and the base set are simply identical to the test dataset D = (I,,..,,
Given a patch z! in image I; E Q, its distance to image 1j at layer and receptive field is:
d' d' 4)) = min I|p" (x(..) (1)
The distances all other images in are collected into a vector and sorted:
Di( [d' (o) I(y)..... ..... df (o) I (()-1)))
where d' (x I()) is the i-th smallest distance from af_m to the images in the base set B. We refer to this process Mutual Similarity Ranking (MSR), and the resulting vector matual similarity vector. For more stable scoring, Li et. al. 2024) proposes applying an interval average operation on the K smallest elements:
K
ag (2 =
Σ d' (()).
(1)
K
The final anomaly score for patch computed as the expectation over all selected layers and receptive fields:
= Es, (afg(1%..))
(2)
'Throughout this paper, when refer to the similarity (or distance) of patch to image, the similarity (or distance) between the patch and the similar patch found within that image. We the "similarity patch image" and "distance patch an image" interchangeshly, where distance represents the inverse of similarity.
3

---

Published in Transactions on Machine Learning Research (10/2025)
Feature and Mutual Similarity Extraction
Identify Suspicious Links
N
NN
Test Images
Targeted Flltering
Isolate Consistent- Anomaly Communities
MuSe
Pex
Segmentation Masks
Figure 2: Overview CoDphruph.
3 Proposed Method
3.1 Overview
CoDeGraph addressos consistent anomalies through threc-stage pipeline: identify, isolate, and filter. Sub- section 3.2 introduces the neighbor-burnout phenomenon and the endurance ratio metric for quantifying it, thus enabling detection of connections wetween consistent-anomally patches. Subsection 3.3 presents the construction of an image-level similarity graph, where nodes represent images and edges encode shared consistent anomalies, enabling consistent-anomall images to form densely connected communitics. Sub- section 3.4 details the commmunty detection methodology and largeted filtering stralegy, which identifies oonsislent-anomaly images as outlier communities and selectively removes anomalous patches from the base set B while preserving useful normal patches.
Throughout this section, set the receptive field parameter unless specified. We use > 1 only for the final anomaly score calculations.
3.2 Mutual Similarity Analysis
Let's first formalize the concept of consistent and consistent-anomaly patches.
Definition 3.1 (e-consistent). Given a metric distance d, a patch token x from image / is called e-consistent if there exists at least one patch token x' in some image I' * I such that d(x, x') < e. We say there exists an e-consistent. link from to in this case, and the set of all such images I' is called the e-consistent neighbors of r.
Definition 3.2 (e-oosistent-anommll) An e-consistent link is called an aconsistent-anomee link the ground truth label of the source patch anomalous. Similarly, an e-consistent patch called an e-consistent- anomaly patch if its ground truth label is anomalous.
For an anomalous patch va with an e-consistent neighbors size in B, we can derive the bound,
K E d' I()).
K alg(xa) < Hoe +
i=Ho+1
where Ho min(H,K) K). When e is sufficiently small (less than typical distances between similar normal patches) and the ratio Ho/ K is substantial, (g(x.)) fails to distinguish e-consistent-anomally patches from
4

---

Published in Transactions on Machine Learning Research (10/2025)
Growsh Ract
10-
Growth
Normal
conssslent-Anemally
inconsistent-Anommlll
10
10a
10
10a
Neighbor Index
Neighbor Index
(a) Cable: Avg. Growth Rate
(b) Capsule: Avg. Growth Rate
Figure 3: Log-log plots avg. growth rate (x). While normal patches and inconsistent anomalies in the Cable of MVTec AD show power-law decay in the growth rate, consistent anomalies show neighbor-burnout with a sudden rise (orange) in (2) after exhausting similar matches. All patches in Capsule, which has minimum presence of consistent, anomalies, exhibit power-law decay in the growth.
normal patches. Such patches usually appear in scenarios with repeated similar anomalies, such as logical flaws (flipped metal_mut _utts, contaminated pills) or structural flaws (missing components). This behavior contrasts with random defects like scratches or cracks, which exhibit unique patterns. Our goal is isolate these consistent anomalies from the base set B.
Throughout the rest of the paper, unless otherwise specified, consistent-anomall patches refers to consistent-anomaly patches with sufficiently small For consistent-anonaly benchmarks, we define them as anomalous patches whose anomaly scores fall below the 80th percentile of normal patch scores, indicating deceptive matches.
Neighbor-burnout phenomenon. Patch distances to their neighbors evolve differently normal and musistent-anomall patches. Let d(z, denote the distance the i-th nearest image in B, we define the (log) similarity growth rate index follows:
(
[(xx, (d(z)((+)))
(x) Inn (
(3)
d(z, (w))
For normal patches, mutual similarity vectors grow gradually due to abundant similar matches in the base set B, resulting in small, stable values of (ar). Empirically, we observed power-law decay in the growth of (x) and (x)], as demonstrated in Fig. 3 To provide a formal basis for this empirical finding, we developed a theoretical model grounded in Extreme Value Theory. Our model rests on two key assumptions: that patch-to-patch similarity distributions have a power-law tail (validated in Appendix Fig and that distances can be approximated as i.i.d. random variables. While we acknowledge spatial correlations cxist, the large number of patches per image (e.g., 1369) justifies the i.i.d. approxination and thus makes our model mathematically tractable. These assumptions, along with the Fisher- Fisher-Tippet Tippet-Gnedenko Gnedenko theorem (Fisher & Tippett 1928) and results from ordered statistics, lead to the following result:
Theorem 3.1 (Similarity Growth Dynamics). Under the assumptions of our model, the similarity growth rate (()) (x) for a normal patch x at neighbor inder i is exponentially distributed:
(x) ~ Exp(a-1) i),
where a is the lail index of the underlying similarily distribution. Consequently, the expectation and voriance decay with the neighbor indez are
E (1) (x)
(arl = (xx)²²
ai
The full derivation and formal statement are provided in Appendia A.1
This theorem establishes a predictable statistical baseline for normal patches, characterized by stable, power- law decay in growth rates. In contrast, consistent-anomaly patches Va exhibit. fundamentally different
5

---

Published in Transactions on Machine Learning Research (10/2025)
Normal
15
ConsistanttAnomaa
4
Inconsétent-Aromall
Dausiry
10
2
0
1.0 0
0.5
0.6
0.7
0.6
0.8
1.0
(a) Distribution of endurance ratios (())(()
(b) Distribution of absolute distances d(x, 4(a)
Figure 4: Distributions of ((x, (ay) and d(a, (() for i< w across patch types on cable. (a) The endurance ratio provides clear domination at the tail, with consistent-anomal patches exhibiting siguificantly lower ç. enabling robust identification of suspicious links. (b) Absolute distances d(x,1) show overlapping distribu-
tions between normal patches and consistent anomalics, making discrimination challenging.
behavior we term neighbor-burnoue their distances to the images in B spike abruptly after exhausting a limited set of H e-consistent neighbors. This manifests as (x,) remaining small for < H, but then jumping significantly for 2 H, creating a distinct discontimuity in the mutual similarity vector. The neighbor-burnou phenomenon thus represents a icalls significant deviation from the expected growth rate dynamics at (z). We leverage this phenomenon by defining the endurance ratio:
d(x, ((9) C(x, (e)) d())
where >> H serves as reference index beyond the burnout point. This ratio becomes exceptionally small for consistent-anomale patches, as early distances remain small while later distances grow large after exhausting similar matches. Normal patches typically exhibit more moderate ratios due to the power law
decay in mutual similarity growth. In practice, setting w sufficiently large (e.g., w = 0.5 - N) effectively captures this disparity and provides a robust discriminative signal for identifying consistent-anomally links.
Suspicious links. Using the endurance ratio, we define set of suspicions links as the set of links with the smallest endurance ratios:
S = (x, E L(((E, {s))
where L = {(x, 1) is an image in B, x is a patch & 1 is the set of all possible links, and X is a threshold controlling the number of links in St. This set S forms the foundation of our graph-basod approach by capturing links likely to be consistent-anomally links. While this basic formulation provides good starting point, zero-shot scttings require additional robustness, which address in the next subsection.
3.3 Anomaly Similarity Graph
We construct an image-level similarity graph G E) to model relationships among images in base set B and to identify shared anomalous patterns. The graph's basic construction comprises the following: each node E V represents image in B, an edge (7i, []) E E exists if at least one suspicious link in St connects patch between 4; and Lj. and the weight Wij counts the number of suspicious links between 1; and 45.
The graph is designed to be discriminative: images with consistent anomalies form densely connected com- munities with high edge weights, distinct from normal images or those with random anomalies. This is achicvable because consistent anomalics yield strong, systematic connections due a large number of low- links concentraled within small subset of consistent-anomaly images, unlike the sparser links of normal random-anomal patches, visualized in Fig, In zero-shot settings, robustly achieving this discrimina- tiveness is challenging. Hence, to enhance the graph's 's ability to isolate consistent-anomaly communities, we introduce two key refinements: the Weighted Endurance Ratio and Coverage-based Link Selection.
Weighted endurance ratio. Although the links from normal patches are often widely distributed across the graph 9, their overpresence can blur the distinctiveness of consistent-anomaly communities. This issue becomes clear in datasets with high normal pattern variability, such breakfast box in MVTec LOCO. Such variability leads to more normal patches exhibiting high and unstable growth rates -(1, resulting in
6

---

Published in Transactions on Machine Learning Research (10/2025)
increased number of normal links with small endurance ratios Ç. To address this, we introduce the weighted endurance ratio: (a (6)) = C(x, (()) ) d(a, (aa) dlz, 1(0)
d(r, ((w))
By incorporating the inverse distance d (s; (()) -a this formulation prioritizes links with larger absolute distances, typically associated with anomalous patches, including consistent-anomaly patches. Thereby, l amplifies the presence of anomalous patches in St while suppressing normal links, shown in Fig. 7 Additionally, in MSM 2.2 removing normal patches from the base set B is more harmful than filtering anomalous oncs. The weighted endurance ratio biases filtration toward anomalous patches, preserving normal patches and hence maintaining the core strength of MSM.
Coverage-based Selection. For St construction, we introduce coverage- based approach. The core concept is simple: gradually incrcase until the resulting graph achieves sufficient coverage-defnned as the percenlage of nodes v with d(v) O. Such approach ensures the graph caplures enough connections in the background nodes to make the consistent-anomall communities distinctive without being overwhelmed by normal links. In our implementation, we achieve this efficiently through an incremental link addition process, captured in A The target coverage 7 was set to 0.95 to ensure that most images were represented in the graph while allowing for potential isolation of outlier nodes, thereby avoiding the situation of adding an in- finite number of links. Further details regarding the stopping time of Algorithm D are given in Appendix A.2
Algorithm Coverage-based Selection
A Algorithm 2 Targeted Patch Filtering
function COVERACESELECCTOO((LL...)
1: function TARGETEDFILTTRINGSS...
Sort L by ç ascending
2: Pex + 0; Compute as(p) for all patches p
3: Si --0
3: for each C. E S do
4: + &+NNN - 1)/2 b Initial number of links
Btomp + B C; R +- 5: for each patch p do
4:
5: repeat
6:
Add top-k links from L to S 6 c fraction of nodes with degree 2
6:
r(p) + 0g,amp (p)/as(p)
7:
7:
Append r(p) to
if c < r then k k + N(N 1)/2
8:
99th percentile of {r(p)le B C.H Pex + Pex U Upp C,(r(p) 00
9: until 2 or all links used
9:
10:
return S
10: return Pex
3.4
Community Detection and Filtering
We employ the Leiden algorithm Traag et al. 2019 with the Constant Potts Model (CPM) (Taag et al. 2011h to identify communities sharing consistent anomalies. The CPM optimizes the following objective function:
Q ((A
where Aú is the adjacency matrix and 8(0,, 0j) = if nodes i and j belong to the same community. The resolution parameter ensures commuitics have density exceeding y while anter-commuuity density remains below > (Traag et al. 2011). Thus, we set y the 25th quantile of edge weights to ensure that communities with sufficient density were identified. Community density is p(C) = Eu,rec Wwv/ne hau//cccnc -1) where ne is the number of nodes in community C. We choose CPM over popular modularity-based methods (Newman) & Girvan 2004) the latter fragment consistent-anomally communities due to degree-baset, null model assumptions. Detailed analysis of the community detection algorithms is presented in Appendix B.1
Let C = (C, be detected communities. To identify those containing consistent anomalies (exhibiting exceptionally high density), we apply Tukey's fences IQR outlier detection Tukey et al. (1977): Carling (2000) community densitics (p(C))(nc. > 1)}. Communities with density exceeding Q3 + KIQR IQR are flagged as outliers, where we set KIQR 4.5 ensure only profoundly connected communities are identified. We denote the set of all outlier communities as S.-

---

Published in Transactions on Machine Learning Research (10/2025)
LQR threshold: $0.85
IQR threshold: 70.97
Density: 29.97
Anomalive:
goodd: manipulated front:
Density: 147.42
scratch, head: 4
Anomaltes: flig: 23
sccutch neck: 2
thread side:
Density: 15,03
Anomekeet eet
Denety: $3.00 Anomallos:: good:
bent:
Denety 56.17
Density: 37.32 Anomaabess
scratch:
Anemaklee es:
manipoltted Front:
good: 2
good: 5
musipulated front: thread
(a) Metal_man nut
(b) Screw
Figure 5: Anomaly similarity graphs on MVTec AD subclasses showing top three communities by density, (a) Metal_ Nuta:_Nut: Community #1 contains all 23 flipped metal nuts with excoptionally high density, exceeding the IQR threshold. (b) Screw: Nodes are clustered into distinct communities, but none exhibit exceptionally high density.
Targeted Patch Filtering. Rather than removing entire Se from B, we selectively target patches with strong intra-community dependency. Consistent-anomaly patches rely heavily on matches within their com- munity Ci, causing significant score increases when these matches are excluded, unlike normal patches that find abundant external matches outside C, Concretely, for each C, E Sc, compute score ratio r(p) = aB,c, (p)/as(p), where high ratios indicate strong dependency. Our method adaptively sets threshold to the 99th percentile of ratios from patches outside C,, automatically identifying exceptionally dependent patches without manual tuning. The filtering process is formalized in Algorithm 2
3.5 Final Anomaly Scores
The final anomaly scores are computed using the original Mutual Scoring Mechanism from Section 2.2 using multiple receptive fields r, but with the new base B B Pax, where Pex is the of patches to be excluded, resulting from Algorithm 2 This ensures that anomaly scores reflect true anomalies without being biased by deceptively close matches from consistent anomalous patterns. This targeted approach preserves useful information from normal patches within outlier communities while effectively addressing the scoring bias introduced by consistent anomalies.
4 Experiments
We evaluated CoDeGraph's performance for zero-shot AC and AS on standard and newly introduced bench- marks to evaluate its ability to detect consistent anomalies while maintaining robust performance on datasets without consistent anomalies. The experiments demonstrate that CoDeGraph outperforms SOTA zero-shot methods on consistent-anomall datasets and delivers competitive results on inconsistent-anomaly datasets.
4.1 Experimental Setup
benchmarks for industrial AC and AS: MVTec AD (Bergmann et al. 2019) and Visa (Zou et al. 2022). MVTec AD (15 classes) is divided into MVTec- Consistent Anomaly (cable, metal_nutt pill) exhibiting strong consistent-anomaly presence and MVToc- Inconsistent Anomaly (remaining 12 classes). Visa provides diverse, subtle defects for inconsistent-anonally evaluation. To address the lack benchmarks tailored for messistent-aoomal evaluation, we introduced two novel benchmarks: MVTec-SynCAA and ConsistAD. MVTec-SynCA applics subtle transformations (lighting changes, camera shifts) to single anomalous image for each subclass in MVTec AD, simulating consistent anomalies. ConsistAD comprises consistent-anomaly subclasses from MVTeec AD, MVTTec LOCO (Bergmann)
Datasets. We conducted experiments two

---

Published in Transactions on Machine Learning Research (10/2025)
Table 1: Quantitative comparisons on Consistent-Anonas Datasets, We compared CoDeGraph with
state-of thtte-of-thh-art the-art zero-shot methods. Bold indicates the best performance. All metrics are in %.
Dataset
Method
AUROC-els
Fi-chs
AP-cls
AUROC-seg
F1-seg
AP-seg
PRO-seg
AnonalyCLIP
81.3
87.7
91.7
81.8
29.2
24.3
64.4
WinCLIP
87.6
90.8
95.4
72.6
23.2
46.6
APRIL-GAN
79.1
88.5
26.6
22.6
43.2
MVTec-CA
ACR
73.3
88.1
86.9
42.7
35.5
66.0
MuSe 30%
97.2
97.0
99.3
93.3
38.9
58.4
92.8
Muße 10%
94.1
94.9
98.7
88.3
51.6
51.2
90.1
CoDeGraph (Ours)
98.5 (f 1.3)
97.8(1 0.8)
99.6(1 0.3)
98.1(t 4.8)
73.8(1 14.9)
77-2(1
18.
95.4(1 2.6)
AnoMalyCLIP
$7.4
92.4
95.7
80.9
37.9
33.5
77.6
APRIL-GAN
81.3
90.2
92.4
85.7
42.1
39.7
41.0
MYTA
WinCLIP
93.8
26.0
18.7
59.2
MuSe 10%
58.8
02.3
96.8
90.7
50.8
48.3
82.9
CoDeGraph (Ours)
96.8(1
6.9)
97.2(1 3.4)
99.0(1 2.2)
97.2(1 6.5)
63.2(1 12:4)
63.3(1
15.0)
91.1(1 8.2)
AnomalyCL.I
75.1
73.8
76.3
73.6
31.1
26.2
53.2
WidLIP
76.6
74.5
75.9
60.8
24.7
18.8
41.8
CunsistAD
APRIL.GAM GAN
68.7
73.9
69.2
61.1
24.3
19.9
21.7
Muße
84.8
43.6
78.9
CoDeGraph (Ours)
91.0(t 2.1)
87.9(1 3.1)
90.3(1 1.4)
86.9(1 5.2)
55.9(1 11.3)
57.5(1
13.9)
82.5(1 3.6)
et al. 2022), and MANTA (Fan et al.
2024
Details on MVTec-SynCA and ConsistAD are provided in
Appendix C
Implementation Details. All experiments use fixed parameters (described below). across all datasets, unless specified in ablations. For fair comparison with baselines, we primarily used ViT-L/14-336, pre- trained by OpenAl Radford al. (2021), the feature extraction backbone. This model consists of 24 layers, organized into four stages of six layers each. Patch tokens were extracted from layers 6, 12, 18, and 24, following Chen et al. (2023); Li ct al. (2024). The lincarly projected class token from the final layer was employed for classification optimization with RsCIN Li et al. 2024). All unlabeled test images were resized to 518 518 pixels. While we report CLIP FTT-L/14-333 results for fair comparison with existing methods, experiments with different architectures such as DINO (Caron et al., 2021) and DINOv2 (Oquab et al. 2023 demonstrated that DINOv2-L-14 achieved superior segmentation performance (89.9% pixel-wiss AUROC 69.1% pixel-wise F1, 71.9% pixel-wise AP). Detailed results different ViT structures are in Appendix B.6
For the anomaly similarity graph, selected the distance d(I, (()) to the i-th nearest image, used in equation 3 and equation as the average of distances to the i-th nearest image across the selected layers:
dagg (I, 160) =
Σ
d'' (o).
16(6.12.18,24)
This averaging strategy enabled efficient graph construction and captured multi-level semantic relationships between patches. Consequently, each patch-image pair in Si established four links, corresponding patch tokens from the four selected layers, rather than single link. The weighted endurance ratio was set with 0.3 N. The coverage-bass based selection algorithm targeted coverage of 0.95. For
0.2 and anomaly scoring via the MSM in equation 2 we averaged the lowest 10% of distances instead of the 30% used in prior work (Li et al.] (2024) (for the discussion on this decision, see Appendix [B7)). For the final anomaly scores, we used receptive field sizes r E (1,3,5) 5) to enhance AS of both small and large defects. All main experiments use fixed hyperparameters across all datasets, with no manual per-dataset tuning except ablation study.
Evaluation Metrics. For AC, we reported three metrics: Area Under the Receiver Operating Characteristic curve (AUROC), Average Precision (AP), and F F'-sccore at the optimal threshold (F1). For AS, we reported four metrics: pixel-wise AUROC, pixcl-wise F1, pixel-wise AP, and Arca Under the Per-Region Overlap Curve (AUPRO). For the evaluation metrics related to consistent anomalies, we selected consistent anomalies as anomalous patches with anomaly scores in the full base B (i.e., MuSc) below the 80th percentile of normal patch scores. Other anomalies were labeled as inconsistent-anomaly patches. This threshold uses ground- truth solely for post-hoe analysis and evaluation metrics, ensuring no impact on the zero-shot nature of CoDeGraph.
9

---

Published in Transactions on Machine Learning Research (10/2025)
Baselines. We compared CoDeGraph against SOTA zero-shot methods, including WinCLIP (Jeong et al,
2023), APRII-GAN (Chen et al. 2023), AnomalyCT.IP (Zhou et al. 2023), ACR [Li et al.
2023) and MuSe Li et al. (2024). For MuSc, we reported two versions: MuSc 30% (reported in Li et al.
(2024)) and MuSc
10%, where the percentage indicates the size of the interval average operation from equation 1 Additionally,
we compare with representative few-shot methods and full-shot methods Appendix
B.8 When baseline
metrics were unavailable, we reproduced results using official implementations.
4.2 Quantitative and qualitative results
Consistent-Anonally Datasets.
The results for consistent-anomaly datasets are summarized in Table [ On the MVTec-CA dataset, CoDeGraph recorded an image-lovel AUROC of 98.5%, which was 1.3% higher than MuSc and comparable to state-of-the-art full-shot methods + For segmentation metrics, CoDeGraph showed a 14.9% increase in F1 and an 18.8% increase in AP compared to the next best zero-shot method. These results highlight challenges faced by existing zero-shot methods in addressing consistent anomalies, especially for segmentation tasks.
Experiments on the MVTec-SynCA and ConsistAD datasets, specifically designed for consistent anomalies, further supported these observations. CoDeGraph outperformed other methods in both classification and segmentation tasks, with improvements exceeding 10% in F1 and AP metrics. These improvements are due to CoDeGraph's ' ability to locate and remove consistent anomalies from B when other approaches fail.
Inconsistent-Anomen Anmmaly Datasets. On the MVTee-IA and Visa datasets, CoDeGraph outperformed the best-based&oe zero-shot methods and matched the performance of MuSe, as shown in Table 2 The performance of CoDeGraph and MuSe was nearly identical, as the absence of consistent anomalies prevented the formation of dense communities in the anomaly similarity graph G. This led to minimal patch exclusions, which had a negligible impact on overall performance.
Analysis of Pex. As illustrated in Figure 6a Pex successfully captured areas of consistent anomalies. On datasots without consistent anomalics, Pex hardly took away any patches from the basc set B, as shown in Figure 6b This behavior is validated quantitatively by Table On MVTec-CA, CoDeGraph excluded patches. For the ConsistAD dataset, it removed 4.8% of patches and identified 55.2% of total consistent anomalics. In contrast, exclusion rates were minimal for coonsistent-anomaly datasets, reported at 0.3% for MVTec-IA and 0.05% for Visa, preserving the integrity of B, thus maintaining robust performance across diverse datasets.
6.9% of patches from B while capturing 73.9% of consistent-
Visualizations of anomaly score masks, as shown in Fig. G demonstrated CoDe- Graph's superior segmentation of consistent anomalies on consistent-anomaly datasets. CoDeGraph's masks fully captured regions with consistent anomalies, such as flipped metal nuts and missing-component cables, while MuSe and other zero-shot methods mostly highlighted edges, failing to cover the full extent. For incon- sistent anomalies, CoDeGraph maintained MuSc's precision in segmenting small defects, producing masks with fewer false positives compared to other zero-shot methods.
Qualitative Results.
4.3 Ablation Study
Impact of outlier community detection and patch filtering. We tested IQR vs. top-3 community selection on S. with/without patch filtering, The results are presented in Table 4 On MVTec-CA, perfor- mance remained stable, with pixel-wise F1 decreasing from 73.8% to 73.5%. On MVTec-IA, where consistent anomalies are rare, selecting the top-3 communities without patch filtering reduced pixel-wise F1 by 2.9% and image-wise AUROC by 2.0%, as it automatically removed a significant number of patches from B with out selection. Algorithm 2 mitigated this negative impact by removing only high-dependency patches. We also conducted an ablation study on the Tukey's fences parameter KIQR, detailed in Appendix B.3, Notably, for standard values kiqR 1.5 and kiQR = 3 instead of kIqn 4.5, our method's performance remained nearly unchanged. Together, outlier detection for outlier communities and targeted patch filtering serve safeguards, ensuring CoDeGraph's robustness.
2In the full-shot setting, PatchCore-1 recorded 98.6% AUROC-els.
10

---

Published in Transactions on Machine Learning Research (10/2025)
We compared CoDeGraph with state-of- tfate-of-the-art zero-shot methods. Bold indicates the best performance. All metrics are in %.
Table 2: Quantitative comparisons on the Inconsistent-Anomall Dataset.
Dataset
Method
AUROC-cls
F1-cls
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
AnIM
94.1
94.0
97.5
93.4
41.6
37.1
83.1
WinCLIP
92.8
93.4
96.8
88.2
69.1
APRIL-GAN
87.9
90.9
93.5
91.7
47.5
45.4
44.3
MVTec-IA
ACR
88.2
92.8
94.3
93.8
44.7
40.1
74.2
MuSe 30%
98.0
97.6
98.2
63.7
94.0
MuSe 10%
98.3
97.3
99.1
98.2
64.9
65.7
94.3
CoDeGraph (Ours)
98.3
97.3
99.1
98.2
65.1
65.8
94.4
WinCLIP
78.1
79.0
81.2
79.6
14.8
56.8
APRTI-GAN
78.0
78.7
81.4
94.2
25.7
86.8
Visa
MuSe 10%
91.6
89.1
92.2
98.7
48.3
45.4
91.4
CoDeGraph (Ours)
91.6
89.0
92.2
98.7
48.3
45.4
91.4
APRIL- GAN
APRIL- GAN
Image
GT
Pex
MuSc
Ours
Image
GT
Pex
MUSC
Ours
(a) Objects with consistent anomalies
(b) Objects with inconsistent anomalies
Figure 6: Visualization of anomaly segmentation results and excluded patches P.x-
Impact of weighted endurance ratio. As shown in Figure 7 the weighted endurance ratio a shows a strong correlation between consistent-anomally capture rate and AS performance, For a > 0.5, capture rate drops cause decline pixel-wise F1, while within the range a [0.0, 0.5], both metrics remainod stable across the datasets. On Consist which exhibits high normal-patteru variability, both capture rate and AS improved as increased, demonstrating the power of in enhancing the distinctiveness of consistent- anomaly communities in such datasets. In contrast, inconsistent- datasets like MVTTec-IA, both metrics remained constant across all a values.
Necessity of Goverage-based Selection. Coverage-based selection ensures the graph g = (V, E) provides a comparative baseline for the IQR detection of outlier communities. In our experiments, most datasets required no more than total of (M) links added St to achieve sufficient coverage. However, the approach of fixing the total number of links in Si becomes problematic when facing datasets of which patches in consistent-anomall images are majority consistent anomalies, such as flipped metal_nut To understand this problem, consider small example: in a test datasel with duplicated anomalous images, each with M patches, zero-distance links dominate if S₁ contains fewer than M (3) links. This creates graph with only connections between the duplication images, offering no baseline for IQR-basod detection. We tested CoDeGraph with fixed numbers of links added to S on metal_nut For |S|] = (G), the coverage was 54.7%, while for [S|] /2) the coverage dropped to 33.9%. In both cases, CoDeGraph failed to identify consistent-anomaly communities as outliers, demonstrating the necessity of coverage-based selection.
Impact reference index w. An effective w selection should enable normal patches to detect similar matches w, while consistent anomalics fail do so. Extreme values of w, set at 10%N and 90%N, degraded performance significantly, as detailed in Table At w 10%N, consistent-anonen metal nut (account. for 20% of the test images), easily found similar matches, while 90%N, normal
patches, such as flipped
11

---

Published in Transactions on Machine Learning Research (10/2025)
100
MVTec Consistett
Percentage
Concitten-
Incer Anemaly
consistAD
MVlec ADHinranssteet
80
Fi:seg
-70
Operational a 0.2
0.25
Capture Rate
0.00
1.0
60
Fl-seg
a
(b) Distribution of Pex according to
-55
Percentage
0.75
0.50
45
40
0.2
0.6
1.0
0.0
0.2
0.4
0.6
0.8
1.0
a
(a) Impact of
(c) Distribution St according to
Figure 7: Ablation study the weight endurance ratio parameter a. (Left) Impact of capture rate and Fi-seg performance. (Right) Impact of a on Pex and suspicious link S on MVTec-CA.
Table 3: Analysis of Pex, showing exclusion rate, consistent-anomaly capture rate, and patch distribution in (Normal / Consistent Inconsistent). All metrics in %.
Table 4: Ablation study on the impact of outlier community detec- tion methods (IQR vs Top-3) with/without patch filtering, reporting consistent anomalies capture rate, percentage of normal patches re- moved from B, AUROC-cls, and Fl-seg. All metrics in %.
Excluded Capt. Distribution Rate
Capt. Rate
Removed Normal
AUROC- cls
Dataset
Rate
(N/C/1)
Datasct
Method
Filter
F F1-seg
MVTec-CA
39.3/31.5/29.2
IQR
73.8
ConsistAD
55.2
39.8/39.6/20.
MVTea-CA
Top-3
IQ
x
90.9
8.9
98.4
73.8
73.8
MVTec-IA
0.3
0.9
92.7/1.7/5.6
Top-3
X
90.9
12.5
98.4
73.5
Visa
0.05
0.0
100.0/0.0/0.0
IQR
0.9
0.2
98.3
65.0
MVTe--IA
IQ
4.9
3.2
98.2
64.9
Top-3
Top-3
21.0
18.7
96.3
62.
Table 5: Ablation study on inference time on MVTTec-AD, is the number of chunks, and 17 is the percentage of nearest images joining similarity search. All experiments use one RTX 4070Ti Super. All metrics are in %.
Table 6: Ablation study on reference
index MVTec-CA. All metrics in %.
Method
Time (ms)
AUROC-cls
Fl-seg
AUROC-cl
Fl-seg
MuSe
CoDeGraph
281.31
98.3
66.8
0.3N
98.5
73.8
CoDeGraph
0.6
211.76
98.4
66.0
0.5N
98.5
73.3
CoDeGraph
192.17
98.1
66.1
0.7N
98.5
73.3
CoDeGraph
0.6
158.32
98.
65.7
0.9N
94.11
55.9
patches struggled to locate counterparts. Both violated the principles of neighbor-burnon leading to poor AC/AS. Apart from these extreme values, values between 30% and 70% of N ensure reliable performance. However, for objects with inherent multi-modal variations (e.g., juice boxes in MVTec LOCO have three types of juices), the selection of requires careful consideration, legitimate normal variations may be mistakenly identified as consistent anomalics. We provide detailed guidelines for handling multi-modal industrial objects in the Appendix B.2
Inference Time and Memory Cost. CoDeGraph adds negligible processing time compared to MuSc, as shown in Table 5 However, like MuSe, its inference time and GPU memory costs increase with larger test sets due to similarity search demands. CoDeGraph even requires additional VRAM due to operations involving mutual similarity indices. To address this, adopt MuSe's subset. division strategy (L. et. al.
12

---

Published in Transactions on Machine Learning Research (10/2025)
2024h, processing test images in equal-sized chunks. Additionally, we propose CLS token-based screening to reduce similarity search space, where patches in an image A are compared only to patches in A's nearest neighbor images, determined by CLS token similarity and controlled by the nearest neighbor fraction Table D shows that combining chunk division s and CLS token screening n reduces inference time while maintaining performance. Further discussions are provided in Appendix [.4 and Appendix [3.5
5 Related Works
Zero-shot anomaly detection. Zero-shot AC and AS leverage foundation models (Dosovitskiy et al. 2021:
Radford et al. 2021 Caron al. 2021 Kirillov et al., 2023) to handle unseen anomalies without training data. WinCLIP (Jeong et al., 2023) introduces text prompls for anomaly segmentation but requires hand- crafted prompts. APRIL-GAN (Chen et al. 2023 proposes learnable projection for image-text alignment, while AnOMalyCLIP (Zhou et al. 2023) improves robustness by using object-agnostic learnable prompts. Both APRIL-GAN and Anomaly CLIP depend on auxiliary datasets for training. Similarly, ACR (Li et al. auxiliary data. Drawing inspiration from the rich informa-
2023) requires tuning on barget-domain-relevar
tion in unlabeled datasets, which are successfully used in medical image analysis (Cai et al.) 2023 Yoon et al. 2021), MuSc (Li al., 2024) utilizes unlabeled test images for zero-shot AC/AS. MuSe exploits the char- acteristic that, in industrial images, normal patches exhibit significant similarity across test sets, whereas anomalous patches do not. However, existing zero-shot methods struggle with consistent anomalies, and CoDeGraph addresses this by using graphs to identify and remove them from anomaly score calculation.
Graph in machine learning Graphs have become a cornerstone in machine learning, with Graph Neural Networks (GNNs) (Kipf & Welling 2016 Hamilton et al. 2017 Veličković et al. 2018) being the most notable example. GNNs have revolutionized the way we interact with complex structured data (Wu et al. 2021), from social networks Ying et al. (2018) to complex physical systems (Sanchez Gonzalez et al. 2020 Tsubaki & Mizoguchi 2020) The interaction of graph theory and deep learning extends beyond GNNs. Tn the literature of information retrieval, pre-trained deep learning models like BERT (Devlin et al.
2019 are
used to extract representations for constructing graph databases (Yang et al.
2019 Melnyk et al.
2021
Liu
et al. 2020: Wang et al. 2025). In Retrieval-Augmee Augmented Generation systems, more researchers use Ls for
knowledge graph extraction (Ranade & Joshi 2023 Ban et al. 2023 Trajanoska et al. 2023 Yao et al. 2025
GraphRAG (Edge el al. 2024) leverages LLMs to extract entities and relationships from textual data, thereby generating graphs with entities represented as nodes and relationships as edges. Community detection algorithms then divide the graphs into closely related entities to enhance query processing performance. Similarly, CoDeGraph uses patch tokens from ViT to construct graphs that encode relationships between images sharing consistent anomaly patterns. Through community detection on these graphs, CoDeGraph successfully locates images with consistent anomalies.
6 Conclusion
This paper introduced CoDeGraph, a zero-shot framework that successfully solves the problem of consistent anomalies by analyzing their similarity growth dynamics. Unlike the predictable growth of normal patches, consistent anomalies exhibit a unique neighbor-burnout phenomenon. CoDeGraph operationalizes this in- sight by constructing an image-level similarity graph using a principled endurance ratio metric, which makes these hidden recurring patterns explicit. Through community detection, the framework robustly identifies and filters these deceptive anomalies, correcting key failure point of prior methods. The result is a power- ful zero-shot system that advances the state-of-the-art on consistent-anomaly benchmarks while maintaining competitive performance on traditional datasets, demonstrating its value as a general-purpose solution.
Limitations. CoDeGraph's applicability is limited when consistent anomaly images outnumber normal images, as may occur multimodal test datasets. In such cases, the fundamental assumption that normal patterns are more frequent than anomalous ones is violated, and the method may fail to distinguish between legitimate variations and anomalies. Further discussion is presented in Appendix B.2
13

---

Published in Transactions on Machine Learning Research (10/2025)
Broader Impact Statement
This work focuses on industrial anomaly detection for quality control and manufacturing, The proposed method could improve product quality and safety by better detecting defects. However, automated inspection systems should maintain human oversight in critical applications.
Acknowledgments
This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (No. (IS-0223000244515))
References
Taiyu Ban, Lyvzhou Chen, Xiangyu Wang, and Huanhuan Chen. From query tools to causal architects: Har- nessing large language models for advanced causal discovery from data. arXiv preprint arXiv:2306.16902 2023.
Kilian Batzner, Lars Heckler, and Rebecca König. Efficientad: Accurate visual anomaly detection millisecond-level latencies. In Proceedings of the IEEE/CVF Winter Conference Applications of Com- puter Vision, pp. 128-138, 2024.
Jan Beirlant, Yuri Goegebeur, Johan Segers, and Jozef L Teugels. Statistics of extremes: theory and appli- cations. John Wiley & Sons, 2006.
Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger. Mvtec ad comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF conference computer vision and pattern recognition, pp. 9592-9600, 2019.
Paul Bergmann, Kilian Batzner, Michael Fauser, David Sattlegger, and Carsten Steger. Beyond dents and scratches: Logical constraints in unsupervised anomaly detection and localization. International Journal of Computer Vision, 130(4):947-969, 2022.
Yu Cai, Hao Chen, Xin Yang, Yu Zhou, and Kwang- Ting Cheng. Dual-distribution discrepancy with self- supervised refinement for anomaly detection in medical images. Medical image analysis, 86:102794, 2023.
Kenneth Carling. Resistant outlier rules and the non-gaussian case. Computational Statistics & Data Analysis, 33(3):249 2588, 2000.
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the International Conference Computer Vision (ICCV), 2021.
Xuhai Chen, Yue Han, and Jiangning Zhang. A zero-/few-shot anomaly classification and segmentation method for evpr 2023 vand workshop challenge tracks 1&:2: 1st place on zero-shot ad and 4th place on few-shot ad. arXiv preprint arXi::2305.120 17988 2023.
Herbert A David and Haikady N Nagaraja. Order statistics. John Wiley & Sons, 2004.
Thomas Defard, Aleksandr Setkov, Angelique Loesch, and Romaric Audigier. Padim: a patch distribu- tion modeling framework for anomaly detection and localization. International conference on pattern recognition, pp. 475-489. Springer, 2021.
Jacob Devlin, Ming- Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training deep bidirectional transformers for language understanding. In Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, volume 1 (long and short popers), pp.
2019.
14

---

Published in Transactions on Machine Learning Research (10/2025)
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Un- terthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby, An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. URL https://openreviin met//forum2id-iicoaaal
Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan Larson. From local to global: A graph rag approach query-focused summarization. arXiv preprint ar arXiv:2404.1611 2024.
Lei Fan, Dongdong Fan, Zhiguang Hu, Yiwen Ding, Donglin Di, Kai Yi, Maurice Pagmucco, and Yang Song, Manta: A large-scale multi-view and visual-text anomaly detection dataset. for tiny objects. arXiv preprinl. arXiv:2412.0480 04867, 2024.
Ronald Aylmer Fisher and Leonard Henry Caleb Tippett. Limiting forms of the frequency distribution of the largest smallest member of sample. In Mathemalical proceedings of the Cambridge plelossophical society, volume 24, pp. 180-190. Cambridge University Press, 1928.
Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Ming Tang, and Jinqiao Wang. Anomalygpt: Detecting industrial anomalics using large vision-language models. In Proceedings of the AAAI conference on artificial intelligence, volume 38, pp. 1932-1940, 2024.
Denis Gudovskiy, Shun Ishizaka, and Kazuki Kozuka. Cflow-ad: Real-time unsupervised anomaly detection with localization via conditional normalizing flows. In Proceedings of the IEEE/CVI winter conference on applicalions of compuler vision, pp. 98 107, 2022.
Laurens Haan and Ana Ferreira. Extreme value theory: on introduction, volume 3. Springer, 2006.
Will Hamilton, Zhitao Ying, and Jure Leskovec, Inductive representation learning on large graphs. Advances in neural information processing systems, 30, 2017.
Chaoqin Huang, Haoyan Guan, Aofan Jiang, Ya Zhang, Michael Spratling, and Yan-Feng Feng Wang. Registration based few-shol anomaly detection. In Shai Avidan, Gabriel Brostow, Moustapha Cissé, Giovanni Maria Cham, 2022. Springer
Farinella, and Tal Hassner (eds.), Computer Vision - ECCV 2022, pp. Nature Switzerland. ISBN 978-3-031-20053-3.
Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran, and Onkar Dabeer. Win- clip: Lero-/few-shot anomaly classification and segmentation. In Proceedings of the IEEE/CVE Conference on Computer Vision and Pottern Recognition (CVPR), pp. 19606-19616, June 2023.
Brad C. Johnson and Thomas M. Sellke. On the number of i.i.d. samples required to observe all of the balls in an urn. Methodology and Computing in Applied Probability, 12(1):139-154, 2010. doi: 10.1007/ s1 $11008-008-9099511 URT
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks arXiv preprint ar:i 02907, 2016.
Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C. Berg, Wan- Wan-Yen Lo, Piotr Dollár, and Ross Girshick. Segment anything. arXiv:2304.026: 2023.
Aodong Li, Chen Qiu, Marius Kloft, Padhraic Smyth, Maja Rudolph, and Stephan Mandt. Zero-shot anomaly detection via batch normalization. In seirth- Conference on Neural Information Process- ing Systems, 2023.
Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas Pfister. Cutpaste: Self-supervised learning for anomaly detection and localization. In Proceedings of the IEEE/CVF conference on computer vision and pollern recognition, pp. 9674, 2021.
15

---

Published in Transactions on Machine Learning Research (10/2025)
Xurui Li, Ziming Huang, Feng Xue, and Yu Zhou. Musc: sero-shot industrial anomaly classification and segmentation with mutual scoring of the unlabeled images. In The Twelfth. International Conference Learning Representations, 2024.
Chunxiao Liu, Zhendong Mao, Tianzhu Zhang, Hongtao Xie, Bin Wang, and Yongdong Zhang. Graph structured network for image-text matching, In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10921-10930, 2020.
Igor Mcinyk, Pierre Dognin, and Payel Das. Grapher: Multi-stage knowledge graph construction using pretrained language models. In NeurIPS 2021 Workshop on Deep Generalive Models and Doumstream Applications, 2021.
Arian Mousakhan, Thomas Brox, and Jawad Tayyub. Anomaly detection with conditioned denoising diffu- sion models. In DAGM German Conference on Pattern Recognition, pp. 181-195. Springer, 2024.
Jayakrishnan Nair, Adam Wierman, and Bert Zwart. The Pundamentals of Heavy Tails: Properties, Emer- gence, and Estimation, Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge Uni- versity Press, 2022.
Mark EJ Newman and Michelle Girvan. Finding and evaluating community structure in networks. Physical review E, 692:0221,,,, 2004.
Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy Vo, Mare Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, et al. Dinov2: Learning robust visual features without supervision. arXiv preprint arXiv:2304.07198, 2023.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8748 8763. PMLR, 18 24 Jul 2021. URL htttps:/ppocceeding: mlr.
creas/vv39/raat ww199//aaafrd211a.. html
Priyanka Ranade and Anupam Joshi. Fabula: Intelligence report generation using rotrieval-augmenned narrative construction. In Proceedings of the International Conference on Advances in Social Nelworks Analysis and Möning, pp. 603- 610, 2023.
Sheldon M. Ross Chapter 5 the exponential distribution and the poisson process. In Sheldon M. Ross (ed.), Introduction to Probability Models (Tenth Edition), pp. 291-370. Academic Press, Baston, tenth edition edition, 2010. ISBN 978-0-12-375686-2. doi: http:///w.rrr...oooo////////6662 12---11----27--22211 2.00008-- URL
htt.://ccccccccc.o..o...ccaaaaaa https: //t::///wwww www. wwwencedirect..c..oo....
Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, and Peter Gehler. To- wards total recall in industrial anomaly detection. In Proceedings of the IEEE/CVE conference on computer vision and pattern recognition, pp. 14318 14318-14328, 14328, 2022.
Marco Rudolph, Tom Wehrbein, Bodo Rosenhahn, and Bastian Wandt, Asymmetric student-teacher net- works for industrial anomaly detection. In Proceedings of the IEEE/CVP winter conference on applications of computer vision, pp. 2592-2602, 2023.
Alvaro Sanzalzz Jonathan Godwin, Tobias Pfaff, Rex Ying, Jure Leskovec, and Peter Battaglia. Learning simulate complex physics with graph networks. In International conference on machine learning, pp. 8459 8468. PMLR, 2020.
Thomas M. Sellke. How many iid samples does take to see all the balls in a box? The Annals of Applied Probability, 5(1):294 309, 1995. ISSN 10505164. URL
V. A. Traag, P. Van Dooren, and Y. Nesterov. Narrow scope for resolution-limit-ieee community detection. Phys. Rev. E, 84:016114, Jul 2011. doi: doi/10.111 htt./o0..100/PhysReeE....B 01.611
URL hattps:/link.... http:::///nnka.......... aps.
16

---

Published in Transactions on Machine Learning Research (10/2025)
Vincent A Traag, Ludo Waltman, and Nees Jan Van Eck. From louvain to leiden: guaranteeing well- connected communities. Stienlific reports, 9(1):1-12, 2019.
Milena Trajanoska, Riste Stojanov, and Dimitar Trajanov. Enhancing knowledge graph construction using large language models. Xiv preprint or *xix:2305004676 2023.
Masashi Tsubaki and Teruyasu Mizoguchi. On the equivalence of molecular graph convolution and molec- ular wave function with poor basis set. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1982-1993. Cur- ran Associates, Inc., 2020. URL https::/pproeeeddngg/ neurips. httpiippp.cpppppprraeeeeeeeeeeee filees/paperr/222/E1L.
paf
John Wilder Tukey et al. Exploratory data analysis, volume Springer, 1977.
Petar Veličković, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua Bengio. Graph attention networks. In International Conference on Learning Representations, 2018.
Tianshi Wang, Fengling Li, Lei Zhu, Jingjing Li, Zheng Zhang, and Heng Tao Shen. Cross-modal retrieval: systematic review of methods and future dircctions. Proceedings of the IEFE, 2025.
Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. comprehensive survey on graph neural networks. IEEE Transactions on Neural Networks and Learning Systems, 32((): 2-24, 2021. doi: 10.1109/TTNII
4020.2978386.
Guoyang Xie, Jinbao Wang, Jiaqi Liu, Yaochu Jin, and Feng Zheng, Pushing the limits of fewshol anomaly detection in industry vision: Graphcore. In The Eleventh International Conference on Learning Repre- sentations, 2023.
Fan Yang, Ryota Hinami, Yusuke Matsui, Steven Ly, and Shin'ichi Satoh. Efficient image retrieval via decoupling diffusion into online and offline processing, In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 9087-9094, 2019.
Liang Yao, Jiazhen Peng, Chengsheng Mao, and Yuan Luo. Exploring large language models for knowledge graph completion. In ICASSP 2025-2025 IEFE International Conference Acoustics, Speech and Signal Processing (ICASSP), pp. 1- 5. IEEE, 2025.
Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William I. Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & dula mining, pp. 974 983, 2018.
Jinsung Yoon, Kihyuk Sohn, Chun-Liang Li, Serean O Arik, Chen-Y Yu Lee, and Tomas Pfister. superviee, refine, repeat: Improving unsupervised anomaly detection. arXio preprint or xrXiv22106.06113 2021.
Qihang Zhou, Guansong Pang, Yu Tian, Sheng He, and Jinghui Chen. Anomalyclip: Object-agnostic prompt learning for zero-shot anomaly detection. In The Twelfth International Conference on Learning Representations, 2023.
Yixuan Zhou, Xing Xu, Jingkuan Song, Fumin Shen, and Heng Tao Shen. Msflow: Multiscale flow-based framework for unsupervised anomaly detection. IEEE Transactions on Neural Networks and Learning Systems, 2024.
Yang Zou, Jongheon Jeong, Latha Pemula, Dongqing Zhang, and Onkar Dabeer. Spot-the self- supervised pre-training for anomaly detection and segmentation. In European Conference on Computer Vision, pp. 392 408. Springer, 2022.
17

---

Published in Transactions on Machine Learning Research (10/2025)
A Mathematical Foundations
In this section, we provide theoretical analysis on the similarity growth rate and the coverage-basee selection algorithm. Furthermore, we use the Poisson process to explain why consistent-anomaly communities achieve higher densities.
A.1 A Model for Mutual Similarity Growth Dynamics
This section provides a theoretical model to explain the neighbor-burnote phenomenon the key empirical observation motivating our work. Using tools from Extreme Value Theory (EVT) Beirlant et al. (2006); Haan & Ferreira (2006); Nair al. (2022), we demonstrate why the similarity growth for normal patches follows stable power-law decay, while consistent anomalies deviate sharply from this baseline. This model is intended to provide intuition for our empirical findings and relies simplifying assumptions, such treating patch features as independent and identically distributed (i..d.), to ensure tractability.
Our analysis begins by assuming a power-law tail for patch-to-patch similarity (validated empirically in Fig. S This assumption, under EVT, implies a Fréchet distribution for patch-to-image similarity. This allows us to model normalized distances with a Beta distribution, leading to the main result: the predictable power-law decay of the similarity growth rate for normal patches (Theorem A.1). This formalizes the neighbor burbout of consistent anomalies statistically significant deviation from the norm.
A.1.1 Patch-to-Patch Similarity and Power-Law Hypothesis
Let D represent the set of normal patches for a specific object class, and let x be a fixed reference patch. We define X as random variable representing the distance from æ normal patch in D, and the patch- to-patch similarity its reciprocal:
1 Sp2p X
Our core assumption is that Sp2p has a heavy-tailed distribution. Concretely, Assumplion A.1 (Asymptotic Power Law Tail). The similarity Spep is regularly varying of index This is formally stated as
P(Sp2p > = s>==~>((>> L(s), as s
where 0 is the tail index, and L(s) is slowly varying function.
This assumption is empirically supported by Hill plots (Fig. 8p. The Hill plots show stable platcaus for Spap across different patches, which strongly suggest that the tail of Spap approximately follows power law.
A.1.2 Patch-to-lmage Similarity via Extreme Value Theory
For an image with N patches {pi....,PP pNN, the distance from x to is defined as follows:
Y min X
pel
where Xp is the distance from x to a patch p. The patch-to-ing image similarity is
Spa = Y max
X
Thus, Sp2i is the maximum N patchh similarities with i..d. distribution Es Despite spatial correlations among patches an image, the large number patches (e.g., N 1369) justifies an i.i.d. ap- proximation for distant patch pairs, enabling the application of the Fisher- ScsherTippeet-CCe Tipeect-GGeeennko Gnedenko theorem Fisher
& Tippett (1928).
This theorem states that for i.i.d. random variables XI.... Xu with distribution F, the normalized maximum
max(X1, (X,,...... X,)) bn 4 G.
an
18

---

Published in Transactions on Machine Learning Research (10/2025)
30.0
30.0
Patch Patch 2
Patch
27.
Patch 3
27.5
Patch 3
Patch
25.0
25.0
22.5
22.5
20.0
20.0
17.5
17.5
15.0
15.0
12.5
12.5
10.0
200
400
603
800
1000
10.0
200
400
600
800
1000
(order statistics)
(order statistics)
(a) Hill plots for screw dataset
(b) Hill plots for cable dataset
Figure 8: Hill plots showing the tail index estimation for patch-to-pate patch similarity distributions in industrial datascts. We randomly selected patches from cach dataset and computed distances from these patches all patches in different images. Each plot shows line plots corresponding to the 3 selected patches. The stable plateau in both plots indicates the presence of power-law tails, supporting Assumption A.1 that the tail of the distribution of Sp2p approximately follows power law.
if and only if G is max-stable. If F(x) x L(x), then G is Fréchet distribution &a with tail index a, i.e., P(G > v)) a Given Assumption A.1 Sp2i follows Fréchet distribution with tail index o, implying:
P(Sp2t > 5) s
A.1.3 Normalized Distance and Beta Distribution
The power-law tail of Sp2i implies specific distribution for the distance Y 1/Spa. For y - 0:
1) y1
P(Y S y) =P Sp21 2 Cy"
To model this behavior, define normalized distance index.
Definition A.1 (Normalized Distance Index). Let be scale threshold within the power-law region of
Y. The normalized index Z is:
Y < 50
Z
80
The CDF of Z is
P(Y < 280) C(aso)
F2(2) P(Z 2)
2 2 [0.
P(Y < 50)
Osf
This corresponds Beta(q, 1) distribution with density fz(2) a=
Assumption A.2 (Beta Distribution Model). The normalized patch-to-image distance Z follows a Beta(o, distribution.
Empirical validation confirms this model. We select the endurance ratio Yo/Ye Y(w) for < w, where w is a low-order statistic (e.g., w 0.3N). This choice ensures Y(w) lies within the power-law tail region of the distance distribution, where the Beta(o, 1) model most applicable. Q-Q plots (Fig. [ demonstrate that Yoy (w)) aligns closely with Beta(o, (f) distribution, with B and a > 8, supporting our theoretical works.
19

---

Published in Transactions on Machine Learning Research (10/2025)
plot: Beta(e=18 B=1.21)
plat: Beta(a=10.00 (=1.23)
Empirical Quanties (Endurancee Ratio)
Empiniall Quartites |Enourance
P.
4.7
1.00
012
3.3
0.35
Theoretical Quantiles (Beta)
Theoretical Quantiles (Beta)
(a) Breakfast_
_botatttttxtxtt_boeeeeeooreoeeee box (MVTTec LOCO)
(b) Screw (M AD)
plot: Endurance Beta(g=28.70. B=1.06)
Q-0 plot: Beta/q=16.82 3=1.28)
Empirical Quantiles (Endurance Ratio)
0.08
1:44
Emplrical Quantiles
0.90
0.58
626
3.0
0.55
3.93
330
0.34
2.35
0.50
3.00
375
0.00
0.00
6.5
135
18
Theoretical Quantiles (Beta)
Theoretical Quantiles (Beta)
(c) Metal_nut (MVTTe AD)
(d) Cable (MV'Te AD)
Figure 9: Q-Q plots validating the Beta distribution assumption for similarity indices across four normal industrial objects, including objects with inconsistent normal patterns (screw, breakfast_boo object, we fixed one randomly selected patch and computed similarity indices from this patch to all patches in different images. Each plot compares the empirical quantiles of (() with w = 0.3.N against theoretical quantiles from its fitted Beta distribution. The close alignment along the diagonal demonstrates that our modeling assumption is reasonable.
For each
A.1.4 Similarity Growth Rate and Log-Spacing
Let Y(1) .... S Y(j be the order statistics of w i.idd. samples of Y Y so, with Y()) Z0 and Z(o) the order statistics of Z ~ Beta(a, 1). The similarity growth rate is defined as
Y(+1) Y())
(00 (z)
We derive its statistical properties using two lemmas.
Lemma A.1. If Z Beta(o, 1), then - In Z Exp(a).
Proof. For Z Beta(a, 1), the density is fz(2) a=a-1 2 (0, 1). Let W -
In Z. The density of W is
dz
(w(w) Sz(e du
ale -wya-1 e ae 0,
which is the density of an Exp(a) distribution.
Lemma A.2. For i..dd WI,..., W, Exp(A), the spacings W(K+1) W(K) are independent and follow Exp(X(n k))
20

---

Published in Transactions on Machine Learning Research (10/2025)
Proof. This is well-established result in order statistics theory (David & Nagaraja 2004
Theorem A.1 (Log-Spacing of Order Statistics). The log-spacings In Y(+1)) In Y(s) independent and follow Exp(ai) for = ,,....-11.
Proof. Let 21...., Zw (eta 1); and define W, - In Zz. By Lemma A.1 W Exp(a). Since ((2) = Inn is decreasing, W(K) In Z (n---1)- For Y(1) (62 we have
In ((+1)) - In (() = In 2(0+)) - In (0 W (w--++) (w--))
Setting & i, this spacing is ((I+1) W(x) Exp(a(w k)) Exp(ai) by Lemma A.2
This theorem directly leads to the following corollaries about the moments of the growth rate.
Corollary A.1 (Growth Rate Properties). The moments of (x) In Y(++)) In Y() exhibit power-law decay:
E
ai (arl-(())) (x)
(axi)²
Corollary A.2 (Cumulative Growth Propertics). For cumulative growth A (z) In 1n In Y(, j 1> t:
B
Varl (x)0
(x)
=² The variance is bounded by 6a2: and Var (ar(A(H))))) + of the endurance ratio Ç for anomaly delection.
0 as i,j oc with fixed, justifying the stability
Remark A.1 (Generality of Power-Law Framework). Our theoretical framework applies to any distribution whose tail approximately follows power law. This generality explains why in empirical log-log plots (such as Fig. 3 and Fig. T0P, inconsistent-anonall patches also exhibit power-law decay in their growth rate, and even consistent-anomia patches demonstrate similar behavior in early steps before neighbor-burnond occurs. The key distinction lies in the disruption of this power-law pattern for consistent anomalies after exhausting their limited pool of similar matches, which our endurance ratio metric effectively captures.
Stc. Growth
10-2
10-2
Normal
Normal
Consistent-Anees Anemally
Std. of
Consistent-Anome
10-3
Inconsistent
10a
10
10a
10
Neighbor Index
Neighbor Index
(a) Cable: Std. Growth Rate
(b) Capsule: Std. of Growth Rate
Figure 10: Log-log plots of standard deviation of growth rate ((())) on the test images of Cable and Capsule.
A.2 Stopping Time of Coverage- Based Selection
A primary concern in coverage-based selection is whether the incremental link addition process might exces- sively connect non-consistent-anone
(non-CA) nodes, thereby diluting the signal from consistent-anomally nodes. To analyze this risk, we examine the expected number of links required to achieve the target coverage T, where every non-CA node attains a degree of at least one (d(v) 2 1).
We model our coverage-based selection using the Generalized Coupon Collector Problem (Selkee 1995;
Johnson & Sellke 2010). which be visualized as observing all balls in urn. Consider containing
21

---

Published in Transactions on Machine Learning Research (10/2025)
distinct white balls (numbered 1.2....,n). In each turn: (1) random sample of size K balls is drawn without replacement, (2) any white balls in the sample are painted red, and (3) all balls are returned to the urn. The process repeats until all balls are red. The generalized coupon collector problem seeks to determine the expected waiting time (number of turns) until completion.
Mapping to Coverage- Based Selection: Non-CA nodes correspond to white balls. A non-CA node achieving d(e) 2 corresponds its ball being painted red. Each link addition step constitutes one turn. Adding link from CA node to non-CA node corresponds to drawing sample of size K = 1. Adding link between two non-CA nodes corresponds to drawing sample of size K = 2.
The classical coupon collector result (where P(K 1) 1) provides an upper bound for [[[] in our mixed K setting, since K = 2 step covers two nodes simultaneoully, accelerating coverage compared to always using K = 1. For n balls where ball j is collected with probability Pj per turn, the expected number of turns satisfics (Ross 2010):
Analysis and Bounds:
E
1 II - e P(t) dt.
(5)
In the idcalized case where balls are drawn with equal probability, this yields the classical result E[T] n- n-- where Hn is the n-th harmonic number. However, in practice, although non-CA nodes receive links in relatively balanced manner, outlier images may exist where the probability of adding link to them is extremely small. When Pmin min; p; approaches zero, by Fatou's lemma we obtain E[T] + co. The partial coverage threshold 7 prevents this infinite link addition to the graph G by allowing the ignoring of certain nodes that are difficult to reach.
Suppose there are m non-CA nodes remaining, and let m m- Pmmin I/C where Puiin is the minimum probability among the remaining nodes. By the change of variables,
(m)
E T
( J0
[ [
-1-- c- -- my
dt
Hm -.Cmmmm
(6)
(m) Pmin
Since hard-to-reach nodes were ignored through the threshold t, we might. assume that C' is not extremely large, thus providing a reasonable upper bound. If we further assume that m non-CA nodes are selected uniformly at random each turn, then under this assumption, the expected number of links added follows the approximation derived in (Johnson & Sellke| (010)). Let p denote the probability that an added link connects two non-CA nodes, and p) the probability that it connects CA node to non-CA node, i.e.,
P(K 1)
1) = 1 p and P(K 2) p. Then:
Hm
02
[[
2
+
Em:
01
dj
where the coefficients are,
P(K > r)
01 =
+
P(K > r)
Σ
1
p
02
j
11
m(m
j=1
The error term is bounded: |Eml I -2m-3 for some constant Co > 0 that does not depend For large m, this yields the asymptotic behavior:
2m/3
In m P (1+p)² + O(e P(e-2mm33 2m/3).
ET
+
(7)
1+p
Both inequalities equation 0 and equation 7 demonstrate that coverago- selection exhibits maximum (m In
links for images that are not consistent-anomaly images, while they broadly distributed
22

---

Published in Transactions on Machine Learning Research (10/2025)
among at least (2) edges. This ensures that coverage-based selection remains computationally efficient and maintains the sparse connectivity essential for subsequent community detection.
A.3 Community Density
In this section, we study the density of communities by modeling CoDeGraph's link addition process Poisson process (N(t)) with rate of À = 1. Each incoming link is classified into one of k + communities: CI....,C Cs are the communities naturally formed by the nature of the dataset, and the (k+ 1)-th community represents inter-community connections.
By Theorem 5.2 Ross (010)). lct (t) denote the number of Cj links addod by time Then (N)( are independent Poisson processes with rate X Py Pj, where Pj the probability that a link belongs community j, and Σ Pj 1. At stopping time T determined by the coverage-based selection criterion, the expected number of links added to community/ j is
For communities CI,..., Ck with sizes my [Cy], the expected density of community Cj is given by (T)) T B[p(C,)] my(m; - 1) mm(m)
Due to the neighbor-burnout phenomenon, consistent-anomaly communities accumulate links at a signif- icantly higher rate during the stopping period T of coverage- coverage-based based selection, whereas other communities accumulate links at slower pace. This leads to expected weight density that is considerably higher for consistent-anomally communities than for non-CA communities. Hence, consistent-anomaly communities become detectable as density outliers in the graph structure.
B Additional Ablation Study
B.1 Community Detection Algorithms
We investigate the impact of different community detection algorithms on CoDeGraph.
Modularity-Based Community Detection. One of the most popular methods in community detection is called modularity (Newman & Girvan 2004).. Modularity is proposed specifically to measure the strength of community partition for real-world networks by taking into account the degree distribution of nodes. It partitions the graph by maximizing the difference between observed edge weights and expected edge weights under null model. The modularity objective is defined follows:
kiki
Q = Σ ij
Aij
8(0,,
2m
where Ai is the adjacency matrix, k and Ky are the degrees of nodes and j. m the total edge weight in the graph, and o(),, = if nodes i and j belong to the same community, and otherwise. Here, k is the expected number of odges between nodes v and uy.
Limitations of Modularity on Anomaly Similarity Graphs. While modularity is effective in general- purpose graphs, its degree- based null model introduces key limitation for the anomaly similarity graph G constructed in CoDeGraph. In our graph, consistent-anomaly images form high-density communities through many strong connections, but some links may be weaker due to natural intra-class variation (e.g.. illumination, pose, or noise). Despite being much stronger than any connection between normal images, these weak intra-community links can fall below the expected weight k2k//2m implied by node degroes. As result, modularity treats them as unexpectedly weak and penalizes their presence in the same community. This leads to the fragmentation of consistent-anomaly clusters into multiple high-density communities.
23

---

Published in Transactions on Machine Learning Research (10/2025)
This fragmentation undermines IQR-based community scoring, diluting the density of anomaly clusters and hindering the reliable detection of consistent-anomaly patterns. Figure 11 illustrates this effect on the aotal_mutt class, where semantically identical flip anomalies are split into three separate communities, despite their strong relative similarity.
Density: 138.79
Anomelies:
flip: 7
scratch: 1
Density; 201.76 Anomalles: flip: 10
Density: $25.93
Anomalless:
flip:
Figure 11: Modularity- community detection fragments a consistent anomaly type (flipped metal nuts) into several smaller communities due to weak intra-groun group links falling below bagree-basede expectations. This fragmentation interferes with reliable detcction of consistent-anomaly groups.
Why CPM is More Appropriate. CPM avoids these issues by evaluating communities based absolute resolution 7, independent of node degree. This makes it well-suited to our anomaly similarity graph, where consistent-anomall communities may contain mix of strong and moderately strong links. As long as the overall density exceeds the resolution threshold ?; the community preserved intact. As described in the main paper, we set y to the 25th percentile of edge weights. This choice ensures that most connections within consistent-anomall communities lic above this threshold, hence preventing the fragments. This results in more stable and coherent detection of consistent-anomaly clusters, which is essential for reliable patch filtering and improved segmentation performance in the zero-shot setting.
B.2 Multi-Modal Industrial Objects
This subsection examines the challenges of applying CoDeGraph to industrial settings with multi-modal normal variations and scenarios where dominant consistent anomalies lead to failure modes.
Parameter Sclection for Multi-modal Normal Variations. In vast industrial domains, industrial ob- jects may exhibit multi-modal variations that represent different normal states. For example, juice_botttteeeeee bottles in MVTec T.OCO contains three distinct juice types (banana, orange and tomato), each representing a sepa- rate normal variant. In such cases, selection of the reference index w requires careful consideration to avoid misclassifying normal variations as consistent anomalics. The reference index w must satisfy w < N/C, where N is the total number of test images and the number of distinet normal variants. This threshold allows patches within each normal variant to maintain similar neighbors before experiencing the neighbor-burno phenomenon. When N/C, the similarity graph forms clusters corresponding to different normal vari- ants, as shown in Fig. 12 Thus, the community detection algorithm may then identify normal variations outlier communities.
Limitations with Dominant Consistent Anomalies. CoDeGraph assumes normal patterns are more frequent than anomalies, enabling the identification consistent anomalies as outlier communities. However, this assumption fails when consistent anomalics outnumber specific normal variants. For instance, if 25% of juice bottles are empty (anomalous) and only 20% contain orange juice, empty bottles may appear more "normal" than orange juice bottles. Consequently, CoDeGraph may misclassify frequent empty bottles
24

---

Published in Transactions on Machine Learning Research (10/2025)
FOR Earobhold: 51.42
Danaty: 24.00
IQR thresbold: 43.85
ligieal Ingiel__noomalsss anomaliss
Dendty, 15. 77
Asomalies:
Anomaljes Sogical anerialls:
logioal anomaalcs: 9
legacel ansomaliee
Deasiby:
Anomalies:
Density: 24.00 logiical scnemales:
good: logical anomalles:
(a) Multi-modal case with w = 10% of
(b) Multi-modal case with w = 50% of N
Figure 12: Visualization of multi-modal juice bottle classification. (a) At w = 10% N, connections among anomalous and consistenl-anomalyy images are clear and detectable by CPM. (b) At. w 50% of N, normal variant connections dominate, obscuring anomalous image connections.
as normal and less frequent normal variants (e.g., orange juice) as anomalies, undermining its ability to distinguish between normal and consistent-anomaly patterns.
Experimental Analysis of Failure Modes. Due to the absence of multi-modal industrial datasets with dominant consistent anomalies, designed controlled experiment using the juice_ cetteee subclass from MVTec LOCO. We selected 8 tomato, 4 orange, and 4 banana juice bottle images as normal variants. To simulate dominant anomalies, we introduced 8 consistent-anonse
images (logical anomalies lacking orange labels, c.g., Logical_anomalies awwmalies_saaat _000,,0000 003, 010, 011, 072, 077, 078, 079), outnumbering the orange and banana variants. In the similarity graph (Figure 13 the less frequent orange and banana variants form dense clusters, which can be wrongly identified as anomalous communities.
Density: 69.50
Anomalies: banana:
Density: 58.50
Anomalles:
orange::
Figure 13: Visualization anomaly similarity graph when consistent anomalies outnumber specific normal variants.
This experiment underscores the limitation of CoDeGraph when consistent anomalies outnumber specific normal variants, leading to misclassification of legitimate multi-modal normals. In practice, such scenarios are rarc, as none of the datasots, such as MVTec AD or Visa, contain more than 20% consistent-anonaly sam- ples. Future work could explore pre-clustering normal variants to isolate them before applying CoDeGraph, enhancing robustness in diverse industrial settings with multi-modal data.
25

---

Published in Transactions on Machine Learning Research (10/2025)
B.3 Tukey Parameter Selection for IQR Outlier Detection
In CoDeGraph, we use Tukey's fences IQR outlier detection to identify outlier communities. A community is flagged as outlier if its density excoeds Q3 + kiqn IQR, where Qa is the third quartile and IQR is the interquartile range of the community density distribution. The IQR parameter KIQR determines how strictly we identify a community as an outlier. In the main paper, we purposefully set kIqu = 4.5, a strict threshold that only extreme far-out outliers could overcome. This extreme choice presents clear empirical evidence that consistent-anomaly images form distinctly dense communitios, far exceoding typical statistical outliers, thereby validating the discriminative power our graph-based approach.
For real-world applications, we recommend more standard IQR-based outlier detection thresholds, such RrQR 1.5 or KIOR = 3. These values strike balance between sensitivity and specificity, effectively capturing
wider range of consistent-anomal
patterns. The rationale for these moderate thresholds is twofold: (1)
both kIqu = 1.5 and liqn 3 reliably identify outliers while being less restrictive than kIQn = 4.5, and (2) our targeted patch filtering mechanism in Algorithm 2 mitigates the risk of erroneously removing normal patches from the base set B, enhancing robustness. We evaluated the impact of varying AIQR values on the MVTec AD dataset, with results summarized in Table 7
Table 7: Ablation study on KIQR for outlier detection on MVTec AD dataset. All metrics are in %.
Value
AUROC-cls
F1-cls
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
KIQR 1.5
98.01
97.08
99.11
98.14
66.32
66.64
94.46
kIqR = 3.0
98.29
97.39
99.21
98.16
66.41
66.81
94.59
kIQR 4.5 (default)
98.32
97.39
99.24
98.20
66.82
68.06
94.59
The results demonstrated that both kIQR = 3 and KIQR 1.5 out performedd all other zero-shot methods reported in the main paper, achieving over 98% AUROC for both classification and segmentation tasks. Importantly, the effectiveness of these smaller values indicates that practitioners can confidently set & to more sensitive thresholds to capture all potential consistent anomalies while not worrying about performance degradation on general datasets. This flexibility allows CoDeGraph be more inclusive in identifying outlier communities, ensuring that even moderately cohesive consistent-anomall patterns are detected without compromising the method's robustness across diverse industrial scenarios.
B.4 Computational Efficiency and Memory Considerations
The base VRAM memory requirements for MuSc include the ViT model weights, extracted features from all images in the base set B, and the computed distance vectors (1()).,)) for mutual similarity ranking. These components constitute the primary memory allocation for the underlying scoring mechanism. Due to operations that relate to indexing the distance vectors in Algorithm [ and Algorithm [ CoDeGraph introduces additional memory overhead through index storage for the distance vectors. These indices are of size [L, N, M, N - -1], where I. denotes the number of ViT layers, N the number of images, M the number of patches per image, and N - accounts for excluding self-comparisons, which can be huge for large datasets. However, these indices allow us to efficiently implement the calculation of distance vectors over the new base set B Pex- Rather than recalculating distance vectors over the new base set B \ Pex: our implementation uses torch. isin to identify invalid distances whose indices correspond to excluded patches Pex. Although this approach allocates more VRAM, these operations help us add minimal processing time, shown in Table 5
For GPU-constrained environments, we recommend mapping index tensor operations exclusively to CPU while maintaining feature computations on GPU. Empirical evaluations on a dataset of 200 images showed a maximum VRAM allocation of 7.4 GB (CPU indexing) versus 10.4 GB (full GPU). Processing time evaluations on MVTec AD added minimal computational overhead: average processing time increased from 281 ms to 291 ms per image. For MVTec- CA,, which contains several outlier communities requiring multiple iterations in Algorithm (as the algorithm loops over all communities in Sc), the average processing time
26

---

Published in Transactions on Machine Learning Research (10/2025)
increased from 327 ms to 350 ms per image, representing acceptable trade-offs for memory-constrrined deployments.
B.5 CLS Token-baset Screening Analysis
Table 8: Extended analysis of CLS token-based screening performance on MVTec AD datasel with different
7/
?
Time (ms)
AUROC-els (%)
Fl-seg (%)
1.0
281.34
98.3
66.8
0.8
246.33
98.2
66.5
0.6
211.76
98.4
66.0
0.4
178.52
98.3
65.2
0.2
148.62
96.7
60.5
CLS token-based screening is a computational optimization technique that uses the global representation capabilities of Vision Transformer (ViT) CLS tokens to pre-filter patches before applying Mutual Similarity Ranking. We extract CLS tokens from the ViT backbone's final layer, which encode global image-level representations of semantic information and structural patterns. Then, calculate the cosine similarity between each target picture 1; and other images in the base set B using CLS tokens. The similarities are ranked to determine the top 7) N most similar photos, where 7/ E [0, 1] indicates the closest neighbor fraction and N specifies the total number of images in the base set.
This approach is based on the observation that images with similar CLS tokens share similar overall features, like postures. For example, screws with the same rotation have higher CL. token cosine similarity than screws with different postures, or cables with missing components tend to find each other using CLS token similarity, By constraining the Mutual Similarity Ranking process to operate only on patches from these v N similar images, we reduce the computational burden from P(N2M) to Nm),2M²) where M represents the number of patches per image.
The performance of CLS Loken-based screening across various values of is presented in Table S Reduced search space led to decreased processing time, while performance remained stable. At 1 0.4, the AUROC- cls remained stable, whereas the F1-sog decreased from 66.8% to 65.2%, and the processing time reducod from 281.34 ms to 178.52 ms per image (about 37%). At 1) = 0.2, the search space becomes excessively constrained. For example, in the case of metal metal_nut, nut, the detection of neighbor- burbout phenomena requires that > 0.2N, meaning the quantity of images contributing to mutual similarity ranking must exceed 0.2NV for functionality. This resulted in AUROC-cls falling to 96.7% and F1-sog declining to 60.5% for 1) 0.2.
B.6 Effect of Different Backbones
We investigated the impact of various backbone architectures on CoDeGraph's anomaly detection perfor- mance. Our evaluation covered different Vision Transformer architectures such as DINO (Caron et al. 2021 DINOv2 (Oquab et al. 2023). and CLIP (Radford et al. 2021). We used the same four-stage division scheme across all architectures: ViT-Large models were divided into 4 stages with layers each, while ViT-Base models used 3 layers per stage. We extract patch tokens from each stage and utilize the lincarly projectod class token from the final layer for classification optimization. All other experimental settings remained identical to those described in the main text.
Table g presents the comprehensive performance comparison across different backbone architectures. All backbone architectures demonstrated solid anomaly detection performance across both classification and segmentation tasks. Generally, larger models trained with smaller patch sizes and higher resolutions achieved better results, with DINOv2-L-14 showing the best overall performance while CLIP VrT-I-14-336 achieved the highest classification AUROC. These results confirm that CoDeGraph's graph- based approach generalizes effectively across different ViT architectures.
27

---

Published in Transactions on Machine Learning Research (10/2025)
Table 9: Comparison of CoDeGraph performance across different backbone architectures on MVTec AD, Results show AUROC and Fi-score for both anomaly classification and anomaly segmentation on the Con- sistAD benchmark.
Pre-training Method
Pre-training Dataset
Architecture
AUROC-cls
F1-cls
AUROC-seg
F1-seg
A.-seg
ViT-B-8
ImageNet-1l ImageNet-Ile lk
97.1
97.1
98.4
65.7
67.8
DINO
ViT-B-16
96.8
96.9
98.6
66.9
69.1
ViT-B-14
LVD-142M
97.6
97.5
98.7
67.1
69.3
DINOv2
VIT-L-14
LVD-142M
98.0
97.7
98.9
69.1
71.9
ViT-B-16
WIT-400M
96.2
95.8
98.1
65.9
67.0
CLIP
ViT-L-14-336
WIT-400M
98.3
97.4
98.2
66.8
68.1
B.7 Analysis of the Internal Average Parameter
The internal average parameter K Equation equation I controls the interval size for calculating anomaly scores within the Mutual Scoring Mechanism. Finding the optimal value for K is challenging due to its strong dependence on the dataset. In this section, analyze how K affects performance across different dataset types and demonstrate how CoDeGraph mitigates this parameter sensitivity. This also explains our decision to set K = 10%N rather than 30%N as in Li et al. (2024).
AUROC--c4
AUROC-
Fleeg
AUROC-Il
Fl-reg
Flosag
(a) MuSe baseline performance
(b) CoDeGraph performance
Figure 14: Impact of internal average parameter K anomaly detection performance. (a) MuSe baseline shows opposite behavior for consistent-anomaly datasets ppetal_nutt versus datasets with inconsistent pos- tures (screw), creating parameter selection conflicts. (b) CoDeGraph exhibits a similar relationship between AC/AS performance and K for both dataset types.
Dataset-Dependent Behavior of Parameter K. The impact of on performance depends on the underlying dataset characteristics. For consistent-anomaly datasets such as metal metal_nut, increasing beyond the number of consistent neighbors H improves performance. From the bound derived in Section 3.2 we
obtain
Hoe K
dFp(
<
Σ d' (2)r)())) H=H++1
K
where Ho Mi) When K H and K is sufficiently large, the distances beyond H consistent neighbors balance the small distances from deceptive matches, causing d²g(z,) to increase and properly penalize consistent anomalies. This explains why consistent-anomalyy patches require larger K values to achieve proper scoring. Figure 14a demonstrates this behavior, where metal_mut nut shows improvement in Fl-segmentation scores as increases. In contrast, for objects with inconsistent postures, such as screw, there an opposite tendency. As K approaches .N, distances to the K-th nearest neighbor [(K) become less reliable, causing performance drops, as visualized in Fig 14a] This establishes a trade-off in parameter selection, whereby an optimal K for munsitennt-nnmmal datasets yields suboptimal K for datasets with inconsistent postures.
28

---

Published in Transactions on Machine Learning Research (10/2025)
CoDeGraph's Robustness. Since CoDeGraph is able to remove deceptive matches from the base set B, our method performs in more predictable manner. As shown in Figure 14b both datasets exhibit a similar relationship between AC/ AS performance and the internal average parameter K, where the optimal performance is around small K instead of large K. Targeted filtering by CoDeGraph makes H near zero for patches in the refined base set B Pexs eliminating the need for large K.
Our analysis demonstrates that CoDeGraph reduces the parameter sensitivity issue, making K selection more robust across diverse datasets.
B.8
Additional Benchmark Results
We present additional comparisons with few-shot and full-shot methods in this appendix. For few-shot meth- ods, compared with PatchCore (Roth et al. 2022), WinCLIP (Jeong et al. 2023), APRIL-GAN (Chen ct a.. 2023), and GraphCore (Xie ct al., 2023) in the 4-shot setting. For full-shot methods, we included
CFlow (Gudovskiy et al. 2022 and DDAD [Mousakaan et al. 2024 The results are presented in Table and Table
Table 10: Quantitative comparisons on Consistent-Anomaly Datasets. We compared CoDeGraph with feo- and full-shot methods. Bold indicates the best performance. All metrics are in %.
Dataset
Method
Setting
AUROC-cls
F1-cis
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
PatchCCore
4-shot
91.2
91.9
97.1
96.0
67.7
68.2
87.2
WinCLIP
4-shot
94.4
93.3
97.6
95.0
63.3
87.0
APRIL-GAN
4-shot
83.9
87.8
93.8
93.5
54.7
49.0
90.8
MVTeaCCA
CraphCore
4-shot
93.2
97.5
CaDeGraph (Ours)
0-shot
98.5
97.8
99.6
98.1
73.8
77.2
95.4
PatchCCore
full-shot
98.6
97.9
91.9
CFlow
full-shot
98.4
98.4
93.5
DDAD
full-shot
99.1
98.1
92.8
Table 11: Quantitative comparisons on the Prtonsistent-Anomaae Dataset. We compared CoDeGraph with fow-shot and full-shot methods. Bold indicates the best performance. All metrics are %.
Dataset
Method
Setting
AUROC-cls
Fl-cls
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
PatchCCore
4-shot
94.7
95.3
83.0
WinCLIP
4-shot
95.1
97.2
89.5
MVTee-IA
APRIL-GAN
4-shot
95.0
94.0
96.9
96.5
57.4
55.9
92.1
GraphCore
4-shot
92.8
97.4
CoDeCraph (Ours)
0-shot
98.3
97.3
99.1
98.2
65.1
65.8
94.4
PatchCore
full-shot
99.1
98.0
93.4
CFlow
full-shot
98.3
98.7
94.9
DDAD
full-shot
99.6
98.1
92.9
C Implementation Details
C.1 Construction of the MVTec-SynCA Dataset
To create MVTcc-SynCA, for each object subclass, we randomly selected representative anomalous image and applied series of geometric and photometric transformations to simulate real-world imaging variations. The applied transformations included:
Randomly applied rotations of +15..
Randomly applied translations of +2.5% of image dimensions in both and y directions.
Randomly applied brightness, contrast and saturation adjustments of +10% 80% of generated images.
29

---

Published in Transactions on Machine Learning Research (10/2025)
Applied Gaussian noise (ar 7.5) and salt-and-pepper noise (1% of total pixels) to 20% of the generated images.
All transformations were applied to both the anomalous images and their corresponding ground truth masks using reflection padding to maintain boundary integrity. For each subclass, the number of syuthetic anomalies added to each subclass is approximately 15% of the total images. For the consistent-anomaly subclass metal, metal_nut, kept the original dataset unchanged as the number of consistent-anomaly images already exceeds 20% of the total images.
C.2 Construction of the ConsistAD Dataset
The ConsistAD dataset was designed as a comprehensive benchmark for evaluating consistent anomaly detection by aggregating test images from three established anomaly detection datasets: MVTec AD, MVTec. LOCO, and MANTA. It totally comprises 9 subclasses: cable, betal_nut, and pill from MVTec AD; breakfast_bo and pushpins from MVTec LOCO; and capsule, coated coated_tables tablet, coffee_bean bean, and red_ tablet from MANTA. The dataset construction process for each source is detailed below:
MVTec AD and MVTec LOCO: We directly used the original test images from the specified subclasses without modifications.
MANTA:
The MANTA dataset consists of multi-view images, where each image concatenates five views of an object captured from different viewpoints, tailored for multi-view anomaly detection. To adapt these for our purpose, we extracted single-view images as follows:
For normal images, selected the middle view.
For anomalous images, we chose the view with the largest. anomaly mask area, as some views may not display anomalies.
From each subclass, randomly sampled 100 normal images and 50 anomalous images. To emphasize consistent anomalies, which often exhibit large anomaly masks in MANTA, we en- sured that 40% of the anomalous images (20 images) were those with the largest anomaly masks, while the remaininn 40 were randomly selected from the other anomalous views.
C.3 Detailed Results
This section provides detailed per-class results for CoDeGraph on individual datasets, showing the perfor- mance breakdown across all object categorics.
30

---

Published in Transactions on Machine Learning Research (10/2025)
Table 12: Detailed per-class results for CoDeGraph on MVTec AD dataset. All metrics are in %.
Class
AUROC-cls
F1-cls
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
bottle
100.00
100.00
100.00
98.68
79.98
83.18
96.25
cable
99.44
97.80
99.69
98.30
69.25
72.35
91.97
capsule
96.29
95.54
99.20
99.11
53.84
53.30
97.41
carpet
99.92
99.44
99.97
99.39
73.73
75.18
97.43
grid
98.50
95.65
99.48
98.34
47.16
41.75
94.96
hazelnut
99.04
97.22
99.40
99.30
71.63
71.66
95.44
leather
100.00
100.00
100.00
99.69
62.04
65.77
98.30
metal nut
99.85
99.46
99.97
98.03
83.50
85.87
96.28
pill
96.07
96.22
99.27
97.86
68.72
73.26
97.85
screw
91.04
92.19
95.00
99.12
49.24
45.74
96.09
tile
100.00
100.00
100.00
97.99
76.49
79.06
95.56
toothbrush
100.00
100.00
100.00
99.59
74.47
75.69
96.43
transistor
98.46
92.31
97.87
91.84
60.55
60.54
77.14
wood
96.49
95.87
98.83
97.46
68.81
74.49
93.38
zipper
99.76
99.17
99.94
98.36
62.82
63.09
94.35
Mean
98.32
97.39
99.24
98.20
66.82
68.06
94.59
Table 13: Detailed per-class results for CoDeGraph on Visa dataset. All metrics in %.
Class
AUROC-cls
F1-cls
AP-cls
AUROC-seg
F1-seg
AP-seg
PRO-seg
candle
95.44
88.32
95.63
99.36
40.69
32.64
95.62
capsules
88.15
84.82
93.76
98.67
51.03
43.61
85.55
cashew
95.52
93.68
98.03
99.28
75.37
79.10
91.87
chewinggum
98.24
95.92
99.22
99.33
52.46
50.67
92.60
fryum
97.52
94.79
98.93
98.04
59.26
52.53
87.37
macaronil
87.97
82.35
87.73
99.48
19.82
12.40
95.68
macaroni2
57.17
68.53
54.13
96.61
6.85
1.86
83.16
pcbl
91.57
86.38
90.47
99.57
79.62
87.79
94.74
pcb2
93.84
91.37
94.43
97.74
35.66
24.15
88.10
pcb3
95.75
90.38
96.01
98.42
40.85
42.61
92.43
pcb4
99.42
96.12
99.42
98.88
48.39
45.40
92.80
pipe fryum
98.52
95.65
99.24
99.45
69.08
71.82
96.78
Mean
91.59
89.03
92.25
98.73
48.26
45.38
91.39
31

---

Published in Transactions on Machine Learning Research (10/2025)
Table 14: Detailed per-class results for CoDeGraph on MVTec-SynCA dataset. All metrics are in %.
Class
AUROC-cls
F1-cls
AP-cls
AUROC-seg
Fl-seg
AP-seg
PRO-seg
bottle
100.00
100.00
100.00
98.75
79.64
83.11
96.49
cable
99.56
98.71
99.81
97.84
65.53
66.58
92.12
capsule
90.51
93.02
98.34
95.18
37.64
32.76
92.23
carpet
99.57
99.54
99.89
99.00
71.04
71.78
94.06
grid
98.84
97.14
99.67
97.28
42.66
36.28
86.01
hazelnut
99.02
98.34
99.49
98.98
66.26
60.07
96.10
leather
100.00
100.00
100.00
99.59
58.25
68.42
97.65
metal nut
99.85
99.46
99.97
98.03
83.50
85.87
96.28
pill
96.09
96.55
99.39
97.46
74.69
79.69
97.16
screw
73.39
87.76
90.61
98.07
46.32
40.82
89.50
tile
98.75
97.06
99.63
93.28
67.73
67.97
82.30
toothbrush
100.00
100.00
100.00
99.51
81.42
83.28
94.27
transistor
99.04
94.64
99.03
90.14
54.55
52.63
70.62
wood
97.33
96.60
99.28
97.50
70.58
77.39
91.92
zipper
99.66
99.31
99.92
97.13
48.20
42.18
89.55
Mean
96.78
97.21
99.00
97.18
63.20
63.25
91.09
Table 15: Detailed per-class results for CoDeGraph on ConsistAD dataset. All metrics are in %.
Class
AUROC-cls
F1-cls
AP-cls
AUROC-seg
F1-seg
AP-seg
PRO-seg
breakfast box
76.99
69.57
77.89
85.08
41.59
44.48
63.10
cable
99.44
97.80
99.69
98.30
69.25
72.35
91.97
capsule
94.68
91.30
94.06
92.46
69.39
72.77
85.38
caated_ttblett
99.58
98.99
99.41
99.53
82.01
91.03
98.10
coffee bean
91.58
82.35
86.35
73.17
26.46
24.61
68.48
metal nut.
99.85
99.46
99.97
98.03
83.50
85.87
96.28
pill
96.07
96.22
99.27
97.86
68.72
73.26
97.85
pushpins
61.79
59.09
57.70
52.57
11.08
6.95
56.60
red. tablet
99.34
96.08
98.68
85.00
51.19
45.93
85.12
Mean
91.04
87.87
90.33
86.89
55.91
57.47
82.54
32


Reviews:
[{"review_id": "HNaQNe3W0J", "reviewer": "Reviewer_DTjc", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper introduces CoDeGraph, a zero-shot industrial anomaly detection method tailored to “consistent anomalies” that recur across images. It proposes an image-level graph representation with community detection to exploit cross-image consistency for robust anomaly localization and classification. The authors identify and formalize a “neighbor-burnout” phenomenon—normal patches retain many neighbors while anomalous patches quickly exhaust them—and provide an Extreme Value Theory-based explanation for its discriminative power. Extensive experiments show state-of-the-art performance on standard industrial benchmarks with strong backbone-agnostic robustness.", "claims_and_evidence_yn": "Yes", "claims_explanation": "The claims are supported by theoretical grounding and solid empirical studies.", "audience_yn": "Yes", "audience_explanation": "The paper is about image anomaly classification and anomaly segmentation, which will attract TMLR audience in computer vision and image processing.", "requested_changes": "Strengths:\n- Strong and timely problem framing: clearly identifies “consistent anomalies” as a failure mode for zero-/few-shot industrial inspection and motivates why standard nearest-neighbor or feature-matching pipelines struggle.\n- Methodologically sound design: constructs an image-level graph (images as nodes, edges via cross-image similarity of anomaly patterns) and leverages community detection to isolate and down-weight consistent anomalies; the pipeline remains training-free and backbone-agnostic.\n- Theoretical grounding: provides an Extreme Value Theory (EVT) perspective that explains why “neighbor-burnout” is discriminative, offering a principled underpinning rather than a purely empirical heuristic.\n- Solid empirical evidence on dedicated benchmarks (e.g., MVTec-CA, MVTec-SynCA, ConsistAD) demonstrating notable gains on the targeted consistent anomaly regime.\n- Clear writing and presentation: motivation, intuition, and empirical setup are generally easy to follow.\n\nWeaknesses:\n- While this method demonstrates clear advantages over existing approaches on benchmarks containing only consistent anomalies, the evaluation would be more convincing if it also included benchmarks with both consistent and inconsistent anomalies (e.g., the full MVTec AD dataset). Since the paper is positioned as zero-shot industrial inspection, it is important to validate performance in scenarios without prior knowledge of anomaly types, which better reflects real-world applications.\n- The paper is generally well-written. However, it would be helpful to include some figures that illustrate key aspects of the algorithm, as this would improve clarity and enhance the reader’s understanding.\n\nRequested changes:\n- Add a pipeline diagram.\n- Add experiments on full MVTec AD.", "broader_impact_concerns": "None", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "VHNKtsTG1U", "reviewer": "Reviewer_MfYc", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "Current anomaly detection methods can fail when “consistent anomalies” are present in the test set, such as when a machine produces similar defects for multiple objects. This failure can be attributed to a lack of anomaly signal when considering only the most similar image. This is addressed by considering the distribution of similarities across all images, providing a clearer change in distribution between anomalous and in-distribution imagery. The endurance ratio enables this change in distribution to be characterized and a graph of suspicious links to be constructed. Communities of anomalous image patches are detected in the graph and removed from consideration for a standard novelty detection procedure. Experiments show that the proposed CoDeGraph method better addresses consistent anomalies while maintaining parity with other methods on standard benchmarks.", "claims_and_evidence_yn": "Yes", "claims_explanation": "The figures throughout Section 3 do a great job of providing intuition for the individual concepts introduced in this paper. I especially like how Figure 2B shows a limitation of the method: there is little/no benefit when consistent anomalies are not present.\n\nThe experiments are very thorough, covering data with and without consistent anomalies, segmentation maps, and various ablations.\n\nHowever, I think the paper needs to provide more guidance on what the full CoDeGraph method looks like. The paper introduces a lot of bespoke concepts, terminology, and algorithms, so working out how they connect was challenging to me. I think that a figure showing these connections would address this issue.\n\nThere’s an incongruity between the EVT model being mentioned as part of a core contribution, then relegated to the Appendix with little discussion in the core paper.", "audience_yn": "Yes", "audience_explanation": "The issue of consistent anomalies proposed in the paper is compelling and the high-level solution to the problem intuitive. The proposed method neatly resolves the implementation challenges of the high-level solution.", "requested_changes": "C1: I think the equation following Definition 3.2 only makes sense if $H < K$, but this condition is not stated. Please add this condition or explain whether the equation holds when the condition is violated.\n\nC2: Provide more figure and/or text guidance for what the full CoDeGraph method looks like.\n\nC3: Remove the “Setting” column of Tables 1-2 and use the extra space to increase the font size.\n\nC4: Either improve the EVT discussion in the main paper or remove it from the first contribution.", "broader_impact_concerns": "None.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "nK1T2GZfVG", "reviewer": "Reviewer_yJpR", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper introduces CoDeGraph, a novel zero-shot anomaly detection (AC) and segmentation (AS) framework tailored to address the overlooked challenge of consistent anomalies in industrial inspection datasets. Unlike existing methods that suffer performance drops when anomalies recur across images, CoDeGraph exploits a new insight called the **neighbor-burnout phenomenon**, in which consistent anomalies exhibit abrupt drops in similarity growth that is quantified via an **endurance ratio**. This metric is used to construct an image-level graph whose dense communities correspond to consistent anomalies. By identifying and filtering out high-dependency patches from these communities, CoDeGraph significantly improves performance. Theoretical justification is provided via Extreme Value Theory, and extensive benchmarks on MVTec AD, Visa, and newly proposed datasets MVTec-CA, MVTec-SynCA, ConsistAD show improved zero-shot performance in classification and segmentation tasks.\n\n**Strengths**:\n1. Well-motivated and novel identification of consistent anomaly issue\n2. Clear formalization of \"neighbor-burnout\" and strong theoretical backing in Section 3.2\n3. Impressive experimental improvements (up to +14.9% F1, +18.8% AP) across 3 datasets and cls. and seg. tasks\n4. Robustness validated across feature extractors (ViT, DINOv2) and other frameworks (e.g., AnomalyCLIP, WinCLIP. etc)\n5. Thorough ablation studies and practical considerations (inference time, scalability).\n\n**Weaknesses**:\n1. Despite claiming zero-shot capability and conducting zero-shot experiments, the method makes extensive assumptions about the structure of test data (e.g., normal patterns outnumber anomalies, consistent anomalies form dense communities) that may not hold in real-world deployments\n2. Relies on heuristic thresholding (e.g., 80th percentile of normal patch scores) to define consistent anomalies, introducing circularity in performance evaluation and may not be robust across all datasets.\n3. The method’s performance is sensitive to hyperparameters such as ω (burnout threshold) and α (weighting exponent), which are currently manually tuned. This tuning undermines claims of zero-shot generality. Some hyperparameters (e.g., ω, α) could be further auto-tuned or learned through parameter aware training.\n4. The paper does not quantify or visualize failure cases (e.g., over-filtering of legitimate patterns), especially in complex test distributions like MVTec LOCO.\n5. Assumes access to the full test set at inference to build graphs and communities, which is incompatible in streaming and online detection cases", "claims_and_evidence_yn": "Yes", "claims_explanation": "- The empirical results on consistent-anomaly benchmarks are strong and clearly support the core claims. For instance, in Table 1, CoDeGraph improves the pixel-wise F1 score by +14.9% and AP by +18.8% over the strongest prior zero-shot method (MuSc 10%) on MVTec-CA, and similar gains are observed on MVTec-SynCA and ConsistAD. These results substantiate the claim that existing methods fail under consistent anomaly conditions and that CoDeGraph mitigates this issue effectively\n\n- The neighbor-burnout phenomenon is supported both theoretically and empirically. The authors derive growth dynamics from Extreme Value Theory (Appendix A.1), showing that:\n“τ(i)(x) follows an exponential distribution with rate proportional to i, under certain assumptions such as distances from a normal patch x to other normal patches having an asymptotic power law tail ” (Page 4)   \nThey validate this in Figure 2, where growth rates for consistent-anomaly patches (orange) exhibit sharp spikes, distinguishing them from the smooth decay in normal or inconsistent anomalies. The endurance ratio ζ(x, I(i)) is derived from this and further supported by Figure 3(a).", "audience_yn": "Yes", "audience_explanation": "The paper introduces a novel problem setting around consistent anomalies in zero-shot segmentation. The authors propose an elegant and generally applicable graph-based solution. Researchers in industrial vision, unsupervised representation learning, and zero-shot transfer would find the method and insights (e.g., neighbor-burnout) both practically and theoretically valuable. \n\nThe work also exemplifies how one can blend statistical modeling (EVT) with modern ViT-based features for structured anomaly detection, which should interest the broader TMLR community.", "requested_changes": "1. Evaluation circularity via ground truth thresholds (Section 4.1 Evaluation Metrics):   \nThe paper defines consistent anomalies based on whether their anomaly scores fall below the 80th percentile of normal patch scores, using ground-truth labels. This creates a circular dependency between how anomalies are defined and how performance is evaluated, which may artificially favor the proposed method.   \nTo strengthen the evaluation, the authors should either remove reliance on ground truth when selecting consistent anomalies or include an ablation showing how performance varies with different (a comparison between 2 values suffices) unsupervised thresholds. This would improve confidence in the general applicability of the evaluation protocol.\n\n2. Missing failure mode analysis:\nThe manuscript acknowledges in Section 6 Limitations that the method may underperform in certain cases (e.g., when anomaly images outnumber normal ones), but provides no concrete examples. Including both qualitative and quantitative failure cases, such as incorrect filtering in multi-modal normal categories or poor performance when consistent anomalies dominate, would clarify the framework's limitations.\n\n3. Hyperparameter sensitivity not fully addressed (Section 4.3):\nKey parameters such as α (weighting for endurance ratio) and ω (burnout index) are manually tuned per dataset, which contradicts the method's zero-shot claims. The authors should report results using fixed or cross-dataset settings, or provide performance ranges under moderate variation. This would demonstrate robustness without requiring dataset-specific calibration.   \nAlternatively, the authors could consider evaluating the method across a broader set of consistent-anomaly (CA) datasets with similar structural patterns, which would help confirm the generalizability of the chosen hyperparameter settings.\n\n4. Theoretical assumptions behind neighbor-burnout (Section 3.2, Appendix A.1):\nThe modeling of neighbor-burnout using EVT assumes that patch-to-patch distances are i.i.d. and follow a power-law distribution in the tail. However, features from Vision Transformers are known to be highly structured and spatially correlated, especially in industrial images where defects may align with visual textures or lighting patterns. Prior work (e.g., Athalye et al., 2018) has shown that deep network feature spaces violate i.i.d. assumptions, calling into question the applicability of classical EVT. The authors are encouraged to empirically verify these assumptions or qualify the limitations of their theoretical model accordingly. This would help clarify the scope and robustness of the endurance ratio’s theoretical foundation.   \nAthalye, A., Engstrom, L., Ilyas, A., & Kwok, K. (2018). Synthesizing Robust Adversarial Examples. Proceedings of ICML 2018. https://arxiv.org/abs/1707.07397\n\n5. Optional: Incomplete runtime and memory profiling (Table 5):\nWhile inference time is reported, memory usage and the cost of graph construction and community detection are not detailed. Including GPU memory and per-stage latency would help assess scalability, especially for large test sets.", "broader_impact_concerns": "No major ethical concerns. Authors addressed the concern of deploying such systems in critical applications in \"Broader Impact Statement\".", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Decision: Accept (poster)