SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.06495 · CVPR · 2024

Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Prompts

Guansong Pang, Jiawen Zhu

arXiv · PDF · Open in the Atlas

Code that ran

16 of 21 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 13 failures of our instrument; 5 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

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

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

RepositoryRoleRan
mala-lab/WinCLIP canonical (classifier label)
classifier basis: census
11 ran · 4 no recorded run
mala-lab/inctrl canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
aucPerformance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/inctrl/engine_IC.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from anindyasdas/adl4vad, is pointer only (licence: NONE) · get_code("cd7be40e5f2e4888")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from anindyasdas/adl4vad, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_custom_text_state_dict Ran
ran, violated the contract we drafted
mala-lab/WinCLIP/open_clip/model.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from deep-real/dcp, is pointer only (licence: NONE) · get_code("f19962ebb134b3d7")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

eval_epoch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/inctrl/engine_IC.py
code served (permissive licence) · get_code("4405aae96cb9935e")
How it ran

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

import torch
import torch.nn as nn
from torch.utils.data import DataLoader
import numpy as np

torch.manual_seed(0)

# Stand-in tokenizer - just needs to be callable
class SimpleTokenizer:
    def __call__(self, x):
        return x

# Stand-in config - needs NUM_GPUS attribute
class SimpleConfig:
    def __init__(self):
        self.NUM_GPUS = 0

# Simple model that takes (tokenizer, inputs, types, None) and returns (preds, _)
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, tokenizer, inputs, types, arg4):
        # inputs shape: (batch_size, 4)
        # Return predictions and dummy second output
        preds = self.linear(inputs)
        # Ensure preds are flattened for metric computation
        preds = preds.squeeze()
        return preds, None

# Create model
model = SimpleModel()

# Create config
cfg = SimpleConfig()

# Create tokenizer
tokenizer = SimpleTokenizer()

# Create validation loader
# Each batch: (inputs, types, labels)
# inputs: (batch_size, 4) - feature dimension
# types: (batch_size, 3) - type dimension
# labels: (batch_size,) - binary labels for AUC computation
val_loader = [
    (torch.randn(2, 4), torch.randint(0, 2, (2, 3)), torch.randint(0, 2, (2,)).float()),
    (torch.randn(2, 4), torch.randint(0, 2, (2, 3)), torch.randint(0, 2, (2,)).float()),
]

ARGS = {
    'val_loader': val_loader,
    'model': model,
    'cfg': cfg,
    'tokenizer': tokenizer,
    'mode': 'test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
freeze_batch_norm_2d Ran
ran; our contract draft was wrong, not the code
mala-lab/WinCLIP/open_clip/new_utils.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from mahmoodlab/CONCH, is pointer only (licence: NOASSERTION) · get_code("9b5765523c6d17fd")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_cast_dtype Ran
ran; our contract draft was wrong, not the code
mala-lab/WinCLIP/open_clip/model.py
pointer only (licence: GPL-3.0) · get_code("dcd422d66b0581d8")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_input_dtype Ran
ran; our contract draft was wrong, not the code
mala-lab/WinCLIP/open_clip/model.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from deep-real/dcp, is pointer only (licence: NONE) · get_code("b476c8cfbf0f1f47")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_inputs Ran
ran, honoured the contract we drafted
mala-lab/WinCLIP/datasets/mvtec_dataset.py
pointer only (licence: GPL-3.0) · get_code("8be46af3c88f4a4a")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_texts Ran
ran; our contract draft was wrong, not the code
mala-lab/inctrl/open_clip/model.py
code served (permissive licence) · get_code("b45d9bb956858415")
How it ran

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

import torch

torch.manual_seed(0)

state_level = {'normal': ['{}', 'flawless {}', 'perfect {}', 'unblemished {}', '{} without flaw', '{} without defect', '{} without damage'], 'anomaly': ['damaged {}', '{} with flaw', '{} with defect', '{} with damage']}

template_level = ['a cropped photo of the {}.', 'a cropped photo of a {}.', 'a close-up photo of a {}.', 'a close-up photo of the {}.', 'a bright photo of a {}.', 'a bright photo of the {}.', 'a dark photo of a {}.', 'a dark photo of the {}.', 'a jpeg corrupted photo of a {}.', 'a jpeg corrupted photo of the {}.', 'a blurry photo of the {}.', 'a blurry photo of a {}.', 'a photo of the {}.', 'a photo of a {}.', 'a photo of a small {}.', 'a photo of the small {}.', 'a photo of a large {}.', 'a photo of the large {}.', 'a photo of a {} for visual inspection.', 'a photo of the {} for visual inspection.', 'a photo of a {} for anomaly detection.', 'a photo of the {} for anomaly detection.']

def get_texts(obj_name):
    l = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck', 'animal']
    if obj_name in l:
        normal_texts = []
        anomaly_texts = []
        normal = 'a photo of ' + obj_name + ' for anomaly detection.'
        normal_texts.append(normal)
        anomaly = 'a photo without ' + obj_name + ' for anomaly detection.'
        anomaly_texts.append(anomaly)
    else:
        normal_states = [s.format(obj_name) for s in state_level['normal']]
        anomaly_states = [s.format(obj_name) for s in state_level['anomaly']]
        normal_texts = [t.format(state) for state in normal_states for t in template_level]
        anomaly_texts = [t.format(state) for state in anomaly_states for t in template_level]
    return (normal_texts, anomaly_texts)

ARGS = {
    'obj_name': 'widget'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
img_batch_tensor2numpy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/WinCLIP/datasets/mvtec_dataset.py
pointer only (licence: GPL-3.0) · get_code("86643f692da7dfe4")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

img_tensor2numpy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/WinCLIP/datasets/mvtec_dataset.py
pointer only (licence: GPL-3.0) · get_code("356af6b8fba23d25")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_state_dict Ran
ran; our contract draft was wrong, not the code
mala-lab/WinCLIP/open_clip/factory.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from zqhang/PointAD, is pointer only (licence: NONE) · get_code("4b3a4d17e1df3140")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

multiple_samples_collate Ran
ran; our contract draft was wrong, not the code
mala-lab/inctrl/datasets/loader.py
code served (permissive licence) · get_code("89796902ab9c77c5")
How it ran

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

import torch
import torch.nn as nn
from torch.utils.data._utils.collate import default_collate

torch.manual_seed(0)

# The function expects a batch where each item is a tuple of (inputs, targets, labels)
# Each of inputs, targets, labels is itself a list of samples (repeated augmentation)
batch = [
    (
        [torch.randn(2, 4), torch.randn(2, 4)],  # inputs: list of 2 samples
        [torch.randn(3, 4), torch.randn(3, 4)],  # targets: list of 2 samples
        [torch.tensor([0]), torch.tensor([1])]   # labels: list of 2 samples
    ),
    (
        [torch.randn(2, 4), torch.randn(2, 4)],  # inputs: list of 2 samples
        [torch.randn(3, 4), torch.randn(3, 4)],  # targets: list of 2 samples
        [torch.tensor([1]), torch.tensor([0])]   # labels: list of 2 samples
    )
]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
prepare_inputs_for_generation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/WinCLIP/open_clip/coca_model.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from WHU-USI3DV/TreeCLS, is pointer only (licence: NONE) · get_code("fb651d0a97fd4d3f")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

register_pooler Ran
ran on a synthesized input
mala-lab/WinCLIP/open_clip/hf_model.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from WHU-USI3DV/TreeCLS, is pointer only (licence: NONE) · get_code("2a377da4a76a2d44")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

replace_linear Ran
ran; our contract draft was wrong, not the code
mala-lab/WinCLIP/open_clip/new_utils.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from sarahesl/alignclip, is pointer only (licence: NONE) · get_code("d50f37a336cfbd4c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tile_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mala-lab/inctrl/datasets/IC_dataset_new.py
code served (permissive licence) · get_code("ef6be348d60ab9c4")
How it ran

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

import numpy as np

# Create a small test image with shape (height, width, channels)
# Using distinct dimensions: 10x8x3
img = np.random.randint(0, 256, size=(10, 8, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "stride_ratio": 0.8
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 4, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
construct_loader Not yet run
unverified (harvested, no recorded run)
mala-lab/inctrl/datasets/loader.py
code served (permissive licence) · get_code("c061f59d4b035f46")
How it ran

no invocation recorded.

gather_features Not yet run
unverified (harvested, no recorded run)
mala-lab/WinCLIP/open_clip/loss.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from lxa9867/imagefolder, is pointer only (licence: NOASSERTION) · get_code("ddcbd45e940484ee")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_model_config Not yet run
unverified (harvested, no recorded run)
mala-lab/WinCLIP/open_clip/factory.py
pointer only (licence: GPL-3.0) · get_code("5c7cf820e99443ff")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
mala-lab/WinCLIP/open_clip/factory.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from sarahesl/alignclip, is pointer only (licence: NONE) · get_code("f34d8f34635af394")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_openai_model Not yet run
unverified (harvested, no recorded run)
mala-lab/WinCLIP/open_clip/openai.py
pointer only (licence: GPL-3.0); the stored copy get_code serves, from eify/open_clip, is pointer only (licence: NOASSERTION) · get_code("8811c5d06f3a2eaa")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, mala-lab/WinCLIP, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

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

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

FunctionAlso present inEarliest-datedOthers named
get_cast_dtype 66 other papers
21 dated earlier, 4 the same month, 40 later, 1 same year, order not determinable
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 63 more not named here
gather_features 57 other papers
20 dated earlier, 3 the same month, 33 later, 1 same year, order not determinable · 1 only as an assembly brick
2206.01670 (2022-06)
Egocentric Video-Language Pretraining
2212.00638 (2022-12)
Finetune like you pretrain: Improved finetuning of zero-shot vision models
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
and 54 more not named here
convert_to_custom_text_state_dict 49 other papers
16 dated earlier, 5 the same month, 27 later, 1 same year, order not determinable
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 46 more not named here
register_pooler 45 other papers
14 dated earlier, 3 the same month, 27 later, 1 same year, order not determinable
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2302.03668 (2023-02)
Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 42 more not named here
prepare_inputs_for_generation 43 other papers
12 dated earlier, 3 the same month, 27 later, 1 same year, order not determinable
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
2305.07017 (2023-05)
An Inverse Scaling Law for CLIP Training
and 40 more not named here
get_input_dtype 29 other papers
5 dated earlier, 3 the same month, 21 later
2103.00020 (2021-03)
Learning Transferable Visual Models From Natural Language Supervision
2210.08402 (2022-10)
LAION-5B: An open large-scale dataset for training next generation image-text models
2212.07143 (2022-12)
Reproducible scaling laws for contrastive language-image learning
and 26 more not named here
get_model_config 22 other papers
9 dated earlier, 2 the same month, 11 later
2211.07636 (2022-11)
EVA: Exploring the Limits of Masked Visual Representation Learning at Scale
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 19 more not named here
load_state_dict 18 other papers
10 dated earlier, 1 the same month, 7 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.07240 (2023-03)
PMC-CLIP: Contrastive Language-Image Pre-training using Biomedical Documents
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
and 15 more not named here
freeze_batch_norm_2d 16 other papers
7 dated earlier, 1 the same month, 8 later · 3 only as an assembly brick
2102.05918 (2021-02)
Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
2303.07240 (2023-03)
PMC-CLIP: Contrastive Language-Image Pre-training using Biomedical Documents
2305.10415 (2023-05)
PMC-VQA: Visual Instruction Tuning for Medical Visual Question Answering
and 13 more not named here
get_tokenizer 8 other papers
5 dated earlier, 3 later
2301.07094 (2023-01)
Learning Customized Visual Models with Retrieval-Augmented Knowledge
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
2305.17382 (2023-05)
APRIL-GAN: A Zero-/Few-Shot Anomaly Classification and Segmentation Method for CVPR 2023 VAND Workshop Challenge Tracks 1&2: 1st Place on Zero-shot AD and 4th Place on Few-shot AD
and 5 more not named here
load_openai_model 4 other papers
1 the same month, 3 later
2403.15378 (2024-03)
Long-CLIP: Unlocking the Long-Text Capability of CLIP
2404.02132 (2024-04)
ViTamin: Designing Scalable Vision Models in the Vision-Language Era
2406.07543 (2024-06)
Vision Model Pre-training on Interleaved Image-Text Data via Latent Compression Learning
and 1 more not named here
replace_linear 2 other papers
2 later
2405.19366 (2024-05)
ECG Semantic Integrator (ESI): A Foundation ECG Model Pretrained with LLM-Enhanced Cardiological Text
2406.17639 (2024-06)
Mitigate the Gap: Investigating Approaches for Improving Cross-Modal Alignment in CLIP
aucPerformance 1 other paper
1 later
2411.09558 (2024-11)
Adaptive Deviation Learning for Visual Anomaly Detection with Data Contamination
img_batch_tensor2numpy 1 other paper
1 dated earlier
2108.06852 (2021-08)
A Hybrid Video Anomaly Detection Framework via Memory-Augmented Flow Reconstruction and Flow-Guided Frame Prediction
img_tensor2numpy 1 other paper
1 dated earlier
2108.06852 (2021-08)
A Hybrid Video Anomaly Detection Framework via Memory-Augmented Flow Reconstruction and Flow-Guided Frame Prediction

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

Repositories linked to this paper

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

Abstract

This paper explores the problem of Generalist Anomaly Detection (GAD), aiming to train one single detection model that can generalize to detect anomalies in diverse datasets from different application domains without any further training on the target data. Some recent studies have showed that large pre-trained Visual-Language Models (VLMs) like CLIP have strong generalization capabilities on detecting industrial defects from various datasets, but their methods rely heavily on handcrafted text prompts about defects, making them difficult to generalize to anomalies in other applications, e.g., medical image anomalies or semantic anomalies in natural images. In this work, we propose to train a GAD model with few-shot normal images as sample prompts for AD on diverse datasets on the fly. To this end, we introduce a novel approach that learns an incontext residual learning model for GAD, termed InCTRL. It is trained on an auxiliary dataset to discriminate anomalies from normal samples based on a holistic evaluation of the residuals between query images and few-shot normal sample prompts. Regardless of the datasets, per definition of anomaly, larger residuals are expected for anomalies than normal samples, thereby enabling InCTRL to generalize across different domains without further training. Comprehensive experiments on nine AD datasets are performed to establish a GAD benchmark that encapsulate the detection of industrial defect anomalies, medical anomalies, and semantic anomalies in both one-vs-all and multi-class setting, on which InCTRL is the best performer and significantly outperforms state-of-the-art competing methods. Code is available at https:// github.com/ mala-lab/ InCTRL.

For agents

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

get_harvested_code_for_paper("2403.06495")
get_code_for_paper("2403.06495")
have("2403.06495")

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

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

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

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

Connect an agent — have() is free.