SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.11083 · 2024

Customizing Visual-Language Foundation Models for Multi-modal Anomaly Detection and Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 1 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.11083.json · badge: /api/ran/2403.11083.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
xiaohao-xu/customizable-vlm canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
encode_image Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from jongwoopark7978/LVNet
pointer only; the stored copy get_code serves, from jongwoopark7978/LVNet, is pointer only (licence: NONE) · get_code("f41cb1a19b154297")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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_cache Ran
ran, honoured the contract we drafted
xiaohao-xu/customizable-vlm/main_gemini.py
code served (permissive licence) · get_code("2c735b7f8d93c08c")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Construct cache: list of dicts with 'defect_img_path' key
cache = [
    {'defect_img_path': '/path/to/defect1.jpg', 'data': 'cached1'},
    {'defect_img_path': '/path/to/defect2.jpg', 'data': 'cached2'},
]

# Construct example: list of lists, where each inner list contains dicts with 'defect_img_path'
example = [
    [
        {'defect_img_path': '/path/to/defect1.jpg', 'label': 0},
        {'defect_img_path': '/path/to/defect3.jpg', 'label': 1},
    ],
    [
        {'defect_img_path': '/path/to/defect2.jpg', 'label': 0},
        {'defect_img_path': '/path/to/defect4.jpg', 'label': 1},
    ],
]

# Construct args: a simple dict or namespace-like object
args = {
    'batch_size': 2,
    'num_workers': 0,
}

ARGS = {
    'cache': cache,
    'example': example,
    'args': args,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — 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
load_dataset Ran
ran; our contract draft was wrong, not the code
xiaohao-xu/customizable-vlm/main_gemini.py
code served (permissive licence) · get_code("5c4334b174c20d01")
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. 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 os
import json
import tempfile
from PIL import Image

# Create temporary directory and files for the test
temp_dir = tempfile.mkdtemp()

# Create a simple test image
test_image = Image.new('RGB', (100, 100), color='red')
defect_img_path = os.path.join(temp_dir, 'defect.png')
test_image.save(defect_img_path)

good_img_path = os.path.join(temp_dir, 'good_000.png')
test_image.save(good_img_path)

# Create dataset JSON file
dataset_json = [
    {
        'defect_img_path': defect_img_path,
        'good_img_path': good_img_path,
        'object_type': 'test_object'
    }
]

json_path = os.path.join(temp_dir, 'dataset.json')
with open(json_path, 'w') as f:
    json.dump(dataset_json, f)

ARGS = {
    'path': json_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
load_dataset Ran
ran; our contract draft was wrong, not the code
xiaohao-xu/customizable-vlm/main_gpt.py
code served (permissive licence) · get_code("314a958f3a61501b")
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. 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 os
import json
import tempfile
import base64
from pathlib import Path

# Create temporary directory and test files
temp_dir = tempfile.mkdtemp()

# Create dummy image files
defect_img_path = os.path.join(temp_dir, "defect_001.jpg")
good_img_path = os.path.join(temp_dir, "good_000.jpg")

# Write minimal valid JPEG data
minimal_jpeg = b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb\x00C\x00\x08\x06\x06\x07\x06\x05\x08\x07\x07\x07\t\t\x08\n\x0c\x14\r\x0c\x0b\x0b\x0c\x19\x12\x13\x0f\x14\x1d\x1a\x1f\x1e\x1d\x1a\x1c\x1c $.\' ",#\x1c\x1c(7),01444\x1f\'9=82<.342\xff\xc0\x00\x0b\x08\x00\x01\x00\x01\x01\x11\x00\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\xff\xda\x00\x08\x01\x01\x00\x00?\x00\xfb\xd7\xff\xd9'

with open(defect_img_path, 'wb') as f:
    f.write(minimal_jpeg)

with open(good_img_path, 'wb') as f:
    f.write(minimal_jpeg)

# Create a dataset JSON file with proper paths
dataset_json_path = os.path.join(temp_dir, "dataset.json")
dataset_data = [
    {
        "defect_img_path": defect_img_path,
        "good_img_path": good_img_path,
        "object_type": "type_a"
    },
    {
        "defect_img_path": defect_img_path,
        "good_img_path": good_img_path,
        "object_type": "type_b"
    }
]

with open(dataset_json_path, 'w') as f:
    json.dump(dataset_data, f)

ARGS = {
    "path": dataset_json_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
load_cache Not yet run
unverified (harvested, no recorded run)
xiaohao-xu/customizable-vlm/main_gemini.py
code served (permissive licence) · get_code("e451feea82753bb1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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
encode_image 76 other papers
11 dated earlier, 64 later, 1 same year, order not determinable
2309.05950 (2023-09)
Language Models as Black-Box Optimizers for Vision-Language Models
2311.15732 (2023-11)
GPT4Vis: What Can GPT-4 Do for Zero-shot Visual Recognition?
2312.14867 (2023-12)
VIEScore: Towards Explainable Metrics for Conditional Image Synthesis Evaluation
and 73 more not named here

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

Anomaly detection is vital in various industrial scenarios, including the identification of unusual patterns in production lines and the detection of manufacturing defects for quality control. Existing techniques tend to be specialized in individual scenarios and lack generalization capacities. In this study, our objective is to develop a generic anomaly detection model that can be applied in multiple scenarios. To achieve this, we custom-build generic visual language foundation models that possess extensive knowledge and robust reasoning abilities as anomaly detectors and reasoners. Specifically, we introduce a multi-modal prompting strategy that incorporates domain knowledge from experts as conditions to guide the models. Our approach considers diverse prompt types, including task descriptions, class context, normality rules, and reference images. In addition, we unify the input representation of multi-modality into a 2D image format, enabling multi-modal anomaly detection and reasoning. Our preliminary studies demonstrate that combining visual and language prompts as conditions for customizing the models enhances anomaly detection performance. The customized models showcase the ability to detect anomalies across different data modalities such as images, point clouds, and videos. Qualitative case studies further highlight the anomaly detection and reasoning capabilities, particularly for multi-object scenes and temporal data. Our code is publicly available at https://github.com/Xiaohao-Xu/Customizable-VLM

For agents

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

get_harvested_code_for_paper("2403.11083")
get_code_for_paper("2403.11083")
have("2403.11083")

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

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

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

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

Connect an agent — have() is free.