Papers › AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection
AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection
Qihang Zhou, Guansong Pang, Yu Tian, Shibo He, Jiming Chen
Zero-shot anomaly detection (ZSAD) requires detection models trained using auxiliary data to detect anomalies without any training sample in a target dataset. It is a crucial task when training data is not accessible due to various concerns, eg, data privacy, yet it is challenging since the models need to generalize to anomalies across different domains where the appearance of foreground objects, abnormal regions, and background features, such as defects/tumors on different products/organs, can vary significantly. Recently large pre-trained vision-language models (VLMs), such as CLIP, have demonstrated strong zero-shot recognition ability in various vision tasks, including anomaly detection. However, their ZSAD performance is weak since the VLMs focus more on modeling the class semantics of the foreground objects rather than the abnormality/normality in the images. In this paper we introduce a novel approach, namely AnomalyCLIP, to adapt CLIP for accurate ZSAD across different domains. The key insight of AnomalyCLIP is to learn object-agnostic text prompts that capture generic normality and abnormality in an image regardless of its foreground objects. This allows our model to focus on the abnormal image regions rather than the object semantics, enabling generalized normality and abnormality recognition on diverse types of objects. Large-scale experiments on 17 real-world anomaly detection datasets show that AnomalyCLIP achieves superior zero-shot performance of detecting and segmenting anomalies in datasets of highly diverse class semantics from various defect inspection and medical imaging domains. Code will be made available at https://github.com/zqhang/AnomalyCLIP.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="2310.18961")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2310.18961", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2310.18961")
Code
Syntology 32 code samples harvested from 2 repositories linked to this paper: 19 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 1 honoured, 1 violated, 10 with no contract checked; 7 where Syntology's instrument failed) · 13 unverified. Where Syntology's instrument failed: 5 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: official repository: 18 samples from 1 repository, 12 ran (6 with no instrument failure; 6 where Syntology's instrument failed); community (archive-listed): 14 samples from 1 repository, 7 ran (6 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:
- zqhang/Accurate-WinCLIP-pytorch, community (archive-listed): harvested for 2 other papers, listed under the repository
Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 19 samples that ran have no recorded date.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.
Code Syntology ran Syntology
32 samples harvested: 19 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 1 honoured, 1 violated, 10 with no contract checked; 7 where Syntology's instrument failed) · 13 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 15 of the 32 samples are pointer only, meaning Syntology does not serve that copy's text. For 15 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
98f385d847636a3e · report
fixture: signature text:str/0/str · returned str · level recorded 2026-09-22 178a0488f0c59db0 · report
fixture: signature masks:ndarray/3/bool, amaps:ndarray/3/float, max_step:int/0/int, expect_fpr:float/0/float · returned float · level recorded 2026-09-24 bbbfccbf329e9fdd · report
fixture: signature dataset_name:str/0/str · returned tuple · level recorded 2026-09-24 01e8c2f30dcaa3d3 · report
fixture: signature save_path:str/0/str · returned Logger · level recorded 2026-09-24 d919ae32e5e4e616 · report
fixture: signature word:tuple/1/str · returned set · level recorded 2026-09-22 eb13a678b5dba664 · report
fixture: signature results:dict/0/?, obj:str/0/str, metric:str/0/str · returned float · level recorded 2026-09-24 4b3a4d17e1df3140 · report
fixture: signature checkpoint_path:str/0/str, map_location:str/0/str · returned dict · level recorded 2026-09-24 census: 70 implementations from 82 papers, 51 distinct outputs across 11 buckets, one shared input per bucket this sample: bucket 1 of 11, arg 1: rank 2, kind float, dtype float32 utils.py ran · honoured contract fingerprinted MIT (permissive) ·
0c3f9d9b0ac9f33d · report
fixture: signature pred:Tensor/2/float, max_value:float/0/float, min_value:float/0/float · returned Tensor · level recorded 2026-09-22 cc90ad1a3ffd0e88 · report
fixture: signature results:dict/0/?, obj:str/0/str, metric:str/0/str · returned float · level recorded 2026-09-24 census: 6 implementations from 8 papers, 5 distinct outputs across 3 buckets, one shared input per bucket this sample: bucket 3 of 3, arg 1: rank 3, kind float, dtype float32 loss.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted MIT (permissive) ·
abedbe9b904a9780 · report
fixture: signature arr:Tensor/3/float, lamda1:float/0/float · returned Tensor · level recorded 2026-09-22 208456d9417303f4 · report
fixture: signature arr:Tensor/2/float, target:int/0/int, lamda2:float/0/float · returned Tensor · level recorded 2026-09-24 9542161e9640b858 · report
fixture: signature text:str/0/str · returned str · level recorded 2026-09-22 175f83b44a42759d · report
ed57101d91ad0e4e · report
2c38b8a1a6553df1 · report
45e1ef91f571e2f5 · report
d53108edea9d2b46 · report
f09367dd0e4c9c94 · report
fixture: signature image:ndarray/3/int, scoremap:ndarray/2/float, alpha:float/0/float · returned ndarray · level recorded 2026-09-24 e6a423edd53e011c · report
fixture: signature masks:ndarray/3/bool, amaps:ndarray/3/float, max_step:int/0/int, expect_fpr:float/0/float · returned float · level recorded 2026-09-24 f19962ebb134b3d7 · report
fixture: signature state_dict:dict/0/? · returned dict · level recorded, date not recorded dcd422d66b0581d8 · report
fixture: signature precision:str/0/str · returned dtype · level recorded, date not recorded 8019976ff0ac258f · report
fixture: signature obj_list:list/1/str · returned tuple · level recorded 2026-09-24 fb651d0a97fd4d3f · report
fixture: signature input_ids:Tensor/2/int, image_inputs:Tensor/3/float, past:NoneType/0/?, attention_mask:Tensor/2/int, position_ids:Tensor/2/int · returned dict · level recorded 2026-09-26 2a377da4a76a2d44 · report
fixture: signature cls:callable/0/? · returned type · level recorded 2026-09-26 e332828701fffe70 · report
e0b318791c717866 · report
ddcbd45e940484ee · report
5c7cf820e99443ff · report
f34d8f34635af394 · report
a1693b09a14a516f · report
Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.
1 assembly on this paper: 1 harvested, 0 generated.
harvested Assembly for AnomalyCLIP (graph method: AnomalyCLIP). 8 bricks; individually on a fixture: 4 ran (of which 3 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 4 unverified. The assembly has not been run end-to-end.
- AnomalyCLIP entry · level 0 · unverified ·
f8d43518b10ab859 - LayerNorm helper · level 1 · ran ·
e296840ad4106ad9 - Transformer model · level 0 · unverified ·
904024b32ecbd1e1 - VisionTransformer model · level 0 · unverified ·
175f83b44a42759d - ResidualAttentionBlock model · level 0 · unverified ·
6cbaa01bb223f295 - ResidualAttentionBlock_learnable_token model · level 1 · ran ·
b0d940f6ea95cb97 - Attention helper · level 1 · ran ·
2e7ee770aa7c6018 - QuickGELU helper · level 1 · ran ·
8c5c4de012c0aab9
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2310.18961") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
| Task | Dataset | Model | Metric | Value | Rank at snapshot | Leaderboard | Report |
|---|---|---|---|---|---|---|---|
| Anomaly Detection | MVTec AD | AnomalyCLIP | Detection AUROC | 91.5 | #109 of 148 | Archive leaderboard | report |
| Anomaly Detection | MVTec AD | AnomalyCLIP | Segmentation AUPRO | 81.4 | #109 of 148 | Archive leaderboard | report |
| Anomaly Detection | MVTec AD | AnomalyCLIP | Segmentation AUROC | 91.1 | #109 of 148 | Archive leaderboard | report |
| Anomaly Detection | VisA | AnomalyCLIP | Detection AUROC | 82.1 | #39 of 50 | Archive leaderboard | report |
| Anomaly Detection | VisA | AnomalyCLIP | Segmentation AUPRO | 87.0 | #39 of 50 | Archive leaderboard | report |
| Anomaly Detection | VisA | AnomalyCLIP | Segmentation AUROC | 95.5 | #39 of 50 | Archive leaderboard | report |
Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.
Methods
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections