SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02546 · ICML · 2024

Machine Vision Therapy: Multimodal Large Language Models Can Enhance Visual Robustness via Denoising In-Context Learning

Yinpeng Dong, Hang Su, Chang Liu, Tongliang Liu, Zhuo Huang, Shibao Zheng

arXiv · PDF · Open in the Atlas

Code that ran

2 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 3 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/2312.02546.json · badge: /api/ran/2312.02546.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
tmllab/2024_icml_dicl canonical (classifier label)
classifier basis not recorded on the link
2 ran · 3 no recorded run
FunctionStatusWhere it lives
maybe_dictionarize Ran
ran; our contract draft was wrong, not the code
tmllab/2024_icml_dicl/ImageNet_datasets/common.py
code served (permissive licence) · get_code("b1e9e0d3d7d7e615")
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 dict. 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 numpy as np

torch.manual_seed(0)

# Test case 1: batch as a dict (should return as-is)
batch_dict = {
    'images': torch.randn(2, 4),
    'labels': torch.randint(0, 10, (2,))
}

# Test case 2: batch as tuple with 2 elements
batch_tuple_2 = (
    torch.randn(2, 4),
    torch.randint(0, 10, (2,))
)

# Test case 3: batch as tuple with 3 elements
batch_tuple_3 = (
    torch.randn(2, 4),
    torch.randint(0, 10, (2,)),
    {'sample_id': [0, 1]}
)

# Use the dict case for ARGS
ARGS = {
    'batch': batch_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
project_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmllab/2024_icml_dicl/ImageNet_datasets/imagenet.py
code served (permissive licence) · get_code("9fbea808db47dc66")
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 Tensor, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create logits tensor: batch_size=2, num_classes=4
logits = torch.randn(2, 4)

# Create class_sublist_mask: boolean mask with 3 True values (fewer than 4)
class_sublist_mask = torch.tensor([True, False, True, True])

# Device set to CPU
device = torch.device('cpu')

ARGS = {
    'logits': logits,
    'class_sublist_mask': class_sublist_mask,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_classnames Not yet run
unverified (harvested, no recorded run)
tmllab/2024_icml_dicl/ImageNet_datasets/imagenet_classnames.py
pointer only (licence: MIT); the stored copy get_code serves, from BeierZhu/VRF, is pointer only (licence: NONE) · get_code("3903d266387afea6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from BeierZhu/VRF, 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. No invocation recorded.

get_features Not yet run
unverified (harvested, no recorded run)
tmllab/2024_icml_dicl/ImageNet_datasets/common.py
pointer only (licence: MIT); the stored copy get_code serves, from ganglii/devsafety, is pointer only (licence: NONE) · get_code("7727c964cfcd56e6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from ganglii/devsafety, 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. No invocation recorded.

get_features_helper Not yet run
unverified (harvested, no recorded run)
tmllab/2024_icml_dicl/ImageNet_datasets/common.py
code served (permissive licence) · get_code("74edffa1dfc39e58")
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, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 5 later) and 0 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
maybe_dictionarize 13 other papers
3 dated earlier, 10 later · 1 only as an assembly brick
2308.01313 (2023-08)
PerceptionCLIP: Visual Classification by Inferring and Conditioning on Contexts
2308.12213 (2023-08)
CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say No
2311.01723 (2023-11)
Towards Calibrated Robust Fine-Tuning of Vision-Language Models
and 10 more not named here
project_logits 7 other papers
2 dated earlier, 5 later
2303.16203 (2023-03)
Your Diffusion Model is Secretly a Zero-Shot Classifier
2311.01723 (2023-11)
Towards Calibrated Robust Fine-Tuning of Vision-Language Models
2403.10245 (2024-03)
CoLeCLIP: Open-Domain Continual Learning via Joint Task Prompt and Vocabulary Learning
and 4 more not named here
get_classnames 4 other papers
4 later
2403.10245 (2024-03)
CoLeCLIP: Open-Domain Continual Learning via Joint Task Prompt and Vocabulary Learning
2403.11549 (2024-03)
Boosting Continual Learning of Vision-Language Models via Mixture-of-Experts Adapters
2406.03345 (2024-06)
Feature Contamination: Neural Networks Learn Uncorrelated Features and Fail to Generalize
and 1 more not named here
get_features_helper 4 other papers
2 dated earlier, 2 later
2308.01313 (2023-08)
PerceptionCLIP: Visual Classification by Inferring and Conditioning on Contexts
2311.01723 (2023-11)
Towards Calibrated Robust Fine-Tuning of Vision-Language Models
2410.03955 (2024-10)
A Retention-Centric Framework for Continual Learning with Guaranteed Model Developmental Safety
and 1 more not named here
get_features 3 other papers
1 dated earlier, 2 later
2308.01313 (2023-08)
PerceptionCLIP: Visual Classification by Inferring and Conditioning on Contexts
2410.03955 (2024-10)
A Retention-Centric Framework for Continual Learning with Guaranteed Model Developmental Safety
2411.19757 (2024-11)
Dual Risk Minimization: Towards Next-Level Robustness in Fine-tuning Zero-Shot Models

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

Although pre-trained models such as Contrastive Language-Image Pre-Training (CLIP) show impressive generalization results, their robustness is still limited under Out-of-Distribution (OOD) scenarios. Instead of undesirably leveraging human annotation as commonly done, it is possible to leverage the visual understanding power of Multi-modal Large Language Models (MLLMs). However, MLLMs struggle with vision problems due to task incompatibility, thus hindering their effectiveness. In this paper, we propose to effectively leverage MLLMs via Machine Vision Therapy which aims to rectify erroneous predictions of specific vision models. By supervising vision models using MLLM predictions, visual robustness can be boosted in a nearly unsupervised manner. Moreover, we propose a Denoising In-Context Learning (DICL) strategy to solve the incompatibility issue. Concretely, by examining the noise probability of each example through a transition matrix, we construct an instruction containing a correct exemplar and a probable erroneous one, which enables MLLMs to detect and rectify the incorrect predictions of vision models. Under mild assumptions, we theoretically show that our DICL method is guaranteed to find the ground truth. Through extensive experiments on various OOD datasets, our method demonstrates powerful capabilities for enhancing visual robustness under many OOD scenarios.

For agents

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

get_harvested_code_for_paper("2312.02546")
get_code_for_paper("2312.02546")
have("2312.02546")

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

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

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

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

Connect an agent — have() is free.