SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.00398 · 2023

ProbVLM: Probabilistic Adapter for Frozen Vision-Language Models

arXiv · PDF · Open in the Atlas

Code that ran

8 of 15 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 5 have no contract verdict; 3 failures of our instrument; 7 no recorded run), measured 2026-11-23; 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/2307.00398.json · badge: /api/ran/2307.00398.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
explainableml/probvlm canonical (classifier label)
classifier basis: census
8 ran · 7 no recorded run
FunctionStatusWhere it lives
basic_clean Ran
ran; our contract draft was wrong, not the code
explainableml/probvlm/src/clip/simple_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.

caption_transform Ran
ran on a synthesized input
explainableml/probvlm/src/ds/_transforms.py
code served (permissive licence) · get_code("aee2e1c6decd89e9")
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 Compose. 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 random
from functools import partial
from nltk.tokenize import word_tokenize
from torchvision import transforms

torch.manual_seed(0)
random.seed(0)

class SimpleVocab:
    """Stand-in vocabulary that maps tokens to indices."""
    def __init__(self):
        self.word_to_idx = {
            '<start>': 0,
            '<end>': 1,
            '<unk>': 2,
            'hello': 3,
            'world': 4,
            'this': 5,
            'is': 6,
            'a': 7,
            'test': 8,
            'caption': 9,
        }
    
    def __call__(self, token):
        """Return index for token, or <unk> if not found."""
        return self.word_to_idx.get(token, self.word_to_idx['<unk>'])

vocab = SimpleVocab()

ARGS = {
    'vocab': vocab,
    'caption_drop_prob': 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
nltk, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
explainableml/probvlm/src/clip/simple_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
get_recall Ran
ran on a synthesized input
explainableml/probvlm/src/utils.py
code served (permissive licence) · get_code("9e65d0d94b1c84fe")
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 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 numpy as np

# Create pred_ranks_all: shape [#query, max(recall_ks)]
# For this example, we'll have 3 queries and max(recall_ks) = 10
# Each row contains indices of ranked gallery items in descending order of similarity
num_queries = 3
max_k = 10
num_gallery = 15

# Create realistic ranking predictions
# Each query gets a ranking of gallery indices
pred_ranks_all = np.array([
    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
    [5, 10, 6, 11, 7, 12, 8, 13, 9, 14],
    [10, 11, 12, 13, 14, 0, 1, 2, 3, 4]
], dtype=np.int32)

# Parameters
recall_ks = (1, 5, 10)
n_gallery_per_query = 5

ARGS = {
    "pred_ranks_all": pred_ranks_all,
    "recall_ks": recall_ks,
    "n_gallery_per_query": n_gallery_per_query
}
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 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
image_to_caption_collate_fn Ran
ran on a synthesized input
explainableml/probvlm/src/ds/_dataloader.py
code served (permissive licence) · get_code("9e22cc211ad25fe0")
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)

# Create sample images: batch_size=2, 3 channels, 256x256
image1 = torch.randn(3, 256, 256)
image2 = torch.randn(3, 256, 256)

# Create sample sentences with different lengths
sentence1 = torch.tensor([1, 2, 3, 4, 5], dtype=torch.long)
sentence2 = torch.tensor([10, 20], dtype=torch.long)

# Create sample annotation and image IDs
ann_ids = (101, 102)
image_ids = (1001, 1002)

# Build a list of tuples matching the expected format
data = [
    (image1, sentence1, ann_ids[0], image_ids[0]),
    (image2, sentence2, ann_ids[1], image_ids[1]),
]

ARGS = {
    "data": data,
}
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
imagenet_transform Ran
ran on a synthesized input
explainableml/probvlm/src/ds/_transforms.py
code served (permissive licence) · get_code("d245fdedffda5d4f")
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 Compose. 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 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 random
import math
from torchvision import transforms

torch.manual_seed(0)
random.seed(0)

ARGS = {
    'resize_size': 256,
    'crop_size': 224,
    'random_resize_crop': False,
    'random_erasing_prob': 0.0,
    'custom_transforms': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
imagenet_transform_fn Ran
ran on a synthesized input
explainableml/probvlm/src/ds/_dataloader.py
code served (permissive licence) · get_code("071ac72cc5321a2e")
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 Compose. 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 torchvision import transforms

torch.manual_seed(0)

# Define custom transforms as a small list of valid transform objects
custom_transforms_list = [
    transforms.RandomVerticalFlip(p=0.5),
]

# Map all parameters of imagenet_transform_fn
ARGS = {
    'resize_size': 256,
    'crop_size': 224,
    'random_resize_crop': False,
    'random_erasing_prob': 0.0,
    'custom_transforms': custom_transforms_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
whitespace_clean Ran
ran; our contract draft was wrong, not the code
explainableml/probvlm/src/clip/simple_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 Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/clip/model.py
code served (permissive licence) · get_code("259eff225d89cc48")
How it ran

no invocation recorded.

eval_ProbVLM Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/train_probVLM.py
code served (permissive licence) · get_code("a37694f28caa41e1")
How it ran

no invocation recorded.

eval_ProbVLM_HF Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/train_probVLM.py
code served (permissive licence) · get_code("9c748a328db870d6")
How it ran

no invocation recorded.

get_pred_ranks Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/utils.py
code served (permissive licence) · get_code("d621259cb2503f6f")
How it ran

no invocation recorded.

get_recall_COCOFLICKR Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/utils.py
code served (permissive licence) · get_code("cdb3b6f67b14988a")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/clip/clip.py
code served (permissive licence) · get_code("9da6e7e7a1c0f8f6")
How it ran

no invocation recorded.

tokenize Not yet run
unverified (harvested, no recorded run)
explainableml/probvlm/src/ds/_transforms.py
code served (permissive licence) · get_code("841979de2ba28e2f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 3 later) and 12 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
61 dated earlier, 4 the same month, 185 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
45 dated earlier, 4 the same month, 176 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
45 dated earlier, 4 the same month, 163 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

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-23.

Repositories linked to this paper

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

Abstract

Large-scale vision-language models (VLMs) like CLIP successfully find correspondences between images and text. Through the standard deterministic mapping process, an image or a text sample is mapped to a single vector in the embedding space. This is problematic: as multiple samples (images or text) can abstract the same concept in the physical world, deterministic embeddings do not reflect the inherent ambiguity in the embedding space. We propose ProbVLM, a probabilistic adapter that estimates probability distributions for the embeddings of pre-trained VLMs via inter/intra-modal alignment in a post-hoc manner without needing large-scale datasets or computing. On four challenging datasets, i.e., COCO, Flickr, CUB, and Oxford-flowers, we estimate the multi-modal embedding uncertainties for two VLMs, i.e., CLIP and BLIP, quantify the calibration of embedding uncertainties in retrieval tasks and show that ProbVLM outperforms other methods. Furthermore, we propose active learning and model selection as two real-world downstream tasks for VLMs and show that the estimated uncertainty aids both tasks. Lastly, we present a novel technique for visualizing the embedding distributions using a large-scale pre-trained latent diffusion model. Code is available at https://github.com/ExplainableML/ProbVLM.

For agents

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

get_harvested_code_for_paper("2307.00398")
get_code_for_paper("2307.00398")
have("2307.00398")

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

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

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

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

Connect an agent — have() is free.