SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2301.07094 · CVPR · 2023

Learning Customized Visual Models with Retrieval-Augmented Knowledge

Chunyuan Li, Jianfeng Gao, Jae Lee, Jianwei Yang, Ce Liu, Haotian Liu, Yong, Kilho Son, -Madison Microsoft

arXiv · PDF · Open in the Atlas

Code that ran

9 of 17 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, 1 violated it and 2 have no contract verdict; 6 failures of our instrument; 8 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/2301.07094.json · badge: /api/ran/2301.07094.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
microsoft/react canonical (classifier label)
classifier basis not recorded on the link
9 ran · 8 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
microsoft/react/react_customization/src/open_clip/tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
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 ltpwy/MSCI, 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
microsoft/react/react_customization/src/open_clip/model.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from deep-real/dcp, 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.

generate_readme Ran
ran on a synthesized input
microsoft/react/react_customization/src/open_clip/push_to_hf_hub.py
code served (permissive licence) · get_code("f41a0f1396c97cb4")
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 str. 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

# Construct a comprehensive model_card dict with all optional fields
model_card = {
    'license': 'apache-2.0',
    'description': 'This is a CLIP-based zero-shot image classification model trained on large-scale vision-language datasets.',
    'details': {
        'Model Architecture': 'Vision Transformer + Text Transformer',
        'Dataset': 'ImageNet-1K',
        'Training Data Size': '400M image-text pairs',
        'Parameters': [
            'Vision encoder: 86M parameters',
            'Text encoder: 63M parameters'
        ],
        'Training Info': {
            'batch_size': 32768,
            'epochs': 32,
            'optimizer': 'AdamW'
        }
    },
    'usage': '''

import open_clip
model, preprocess = open_clip.create_model_and_transforms('ViT-B-32')
tokenizer = open_clip.get_tokenizer('ViT-B-32')

''',
    'comparison': 'This model achieves 76.2% top-1 accuracy on ImageNet-1K zero-shot classification, outperforming previous CLIP models.',
    'citation': [
        '@article{radford2021learning,\n  title={Learning Transferable Visual Models From Natural Language Supervision},\n  author={Radford, Alec},\n  year={2021}\n}',
        '@inproceedings{cherti2022reproducible,\n  title={Reproducible scaling laws for contrastive language-image learning},\n  author={Cherti, Mehdi},\n  year={2022}\n}'
    ]
}

model_name = 'ViT-B-32-quickgelu'

ARGS = {
    'model_card': model_card,
    'model_name': model_name
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_cast_dtype Ran
ran; our contract draft was wrong, not the code
microsoft/react/react_customization/src/open_clip/model.py
code served (permissive licence) · get_code("dcd422d66b0581d8")
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 dtype. 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)

ARGS = {
    "precision": "bf16"
}
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 dtype — a dtype output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dtype 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
get_pairs Ran
ran; our contract draft was wrong, not the code
microsoft/react/react_customization/src/open_clip/tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
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 set. 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)

# The function get_pairs takes a word parameter
# A word is represented as a tuple of symbols (variable-length strings)
# The function iterates through the word and creates pairs of consecutive symbols

word = ("hello", "world", "test")

ARGS = {
    "word": word
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
load_state_dict Ran
ran; our contract draft was wrong, not the code
microsoft/react/react_customization/src/open_clip/factory.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zqhang/PointAD, 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.

prepare_inputs_for_generation Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
microsoft/react/react_customization/src/open_clip/coca_model.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from WHU-USI3DV/TreeCLS, 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.

register_pooler Ran
ran on a synthesized input
microsoft/react/react_customization/src/open_clip/hf_model.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from WHU-USI3DV/TreeCLS, 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.

whitespace_clean Ran
ran; our contract draft was wrong, not the code
microsoft/react/react_customization/src/open_clip/tokenizer.py
pointer only (licence: MIT); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
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 ltpwy/MSCI, 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.

build_model_from_openai_state_dict Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/model.py
code served (permissive licence) · get_code("26a799d4c5d477a1")
How it ran

no invocation recorded.

gather_features Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/loss.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lxa9867/imagefolder, and GitHub could not classify the licence of that repository (NOASSERTION). 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)
microsoft/react/react_customization/src/open_clip/factory.py
code served (permissive licence) · get_code("5c7cf820e99443ff")
How it ran

no invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/factory.py
pointer only (licence: MIT); 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: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sarahesl/alignclip, 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.

list_pretrained Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/pretrained.py
code served (permissive licence) · get_code("0131858929a8ca1e")
How it ran

no invocation recorded.

list_pretrained_models_by_tag Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/pretrained.py
code served (permissive licence) · get_code("219f782c556ae686")
How it ran

no invocation recorded.

list_pretrained_tags_by_model Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/pretrained.py
code served (permissive licence) · get_code("3e68e3ec56ca86ee")
How it ran

no invocation recorded.

load_openai_model Not yet run
unverified (harvested, no recorded run)
microsoft/react/react_customization/src/open_clip/openai.py
code served (permissive licence) · get_code("a1693b09a14a516f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 16 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 16 later) and 1 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_pairs 258 other papers
41 dated earlier, 2 the same month, 207 later, 7 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
27 dated earlier, 1 the same month, 197 later, 5 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
27 dated earlier, 1 the same month, 184 later, 5 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
get_cast_dtype 66 other papers
3 dated earlier, 63 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 63 more not named here
gather_features 57 other papers
2 dated earlier, 55 later · 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
2302.03668 (2023-02)
Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery
and 54 more not named here
convert_to_custom_text_state_dict 49 other papers
3 dated earlier, 46 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 46 more not named here
register_pooler 45 other papers
45 later
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
2305.07017 (2023-05)
An Inverse Scaling Law for CLIP Training
and 42 more not named here
prepare_inputs_for_generation 43 other papers
43 later
2303.14814 (2023-03)
WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation
2305.07017 (2023-05)
An Inverse Scaling Law for CLIP Training
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 40 more not named here
build_model_from_openai_state_dict 30 other papers
30 later
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
2304.05884 (2023-04)
Unicom: Universal and Compact Representation Learning for Image Retrieval
and 27 more not named here
get_model_config 22 other papers
1 dated earlier, 21 later
2211.07636 (2022-11)
EVA: Exploring the Limits of Masked Visual Representation Learning at Scale
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 19 more not named here
load_state_dict 18 other papers
18 later
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
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 15 more not named here
get_tokenizer 8 other papers
8 later
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
2310.18961 (2023-10)
AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection
and 5 more not named here
list_pretrained 6 other papers
6 later
2307.12732 (2023-07)
CLIP-KD: An Empirical Study of CLIP Model Distillation
2311.17048 (2023-11)
Zero-shot Referring Expression Comprehension via Structural Similarity Between Images and Captions
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 3 more not named here
list_pretrained_tags_by_model 4 other papers
4 later
2307.12732 (2023-07)
CLIP-KD: An Empirical Study of CLIP Model Distillation
2309.03904 (2023-09)
Exploring Sparse MoE in GANs for Text-conditioned Image Synthesis
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 1 more not named here
load_openai_model 4 other papers
4 later
2307.12732 (2023-07)
CLIP-KD: An Empirical Study of CLIP Model Distillation
2310.18961 (2023-10)
AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detection
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
and 1 more not named here
list_pretrained_models_by_tag 3 other papers
3 later
2309.03904 (2023-09)
Exploring Sparse MoE in GANs for Text-conditioned Image Synthesis
2404.05231 (2024-04)
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
2407.15795 (2024-07)
AdaCLIP: Adapting CLIP with Hybrid Learnable Prompts for Zero-Shot Anomaly Detection

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

Image-text contrastive learning models such as CLIP have demonstrated strong task transfer ability. The high generality and usability of these visual models is achieved via a web-scale data collection process to ensure broad concept coverage, followed by expensive pre-training to feed all the knowledge into model weights. Alternatively, we propose REACT, REtrieval-Augmented CusTomization, a framework to acquire the relevant web knowledge to build customized visual models for target domains. We retrieve the most relevant image-text pairs (∼3% of CLIP pre-training data) from the web-scale database as external knowledge and propose to customize the model by only training new modularized blocks while freezing all the original weights. The effectiveness of REACT is demonstrated via extensive experiments on classification, retrieval, detection and segmentation tasks, including zero, few, and full-shot settings. Particularly, on the zero-shot classification task, compared with CLIP, it achieves up to 5.4% improvement on ImageNet and 3.7% on the ELEVATER benchmark (20 datasets). ♠ core contribution; ¶ equal advising; § work initiated during an internship at Microsoft.

For agents

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

get_harvested_code_for_paper("2301.07094")
get_code_for_paper("2301.07094")
have("2301.07094")

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

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

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

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

Connect an agent — have() is free.