SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.04125 · NeurIPS · 2024

No "Zero-Shot" Without Exponential Data: Pretraining Concept Frequency Determines Multimodal Model Performance

Philip Torr, Matthias Bethge, Vishaal Udandarao, Yash Sharma, Adel Bibi, Samuel Albanie, Ameya Prabhu, Adhiraj Ghosh

arXiv · PDF · Open in the Atlas

Code that ran

8 of 14 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; 8 failures of our instrument; 6 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/2404.04125.json · badge: /api/ran/2404.04125.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
bethgelab/frequency_determines_performance canonical (classifier label)
classifier basis: census
8 ran · 6 no recorded run
FunctionStatusWhere it lives
analyze_tags Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/gpt_descriptions_for_ram.py
code served (permissive licence) · get_code("1ab1cc2780c29e05")
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
from unittest.mock import Mock, MagicMock

# Create a mock client that simulates OpenAI API responses
class MockChoice:
    def __init__(self, content):
        self.message = Mock()
        self.message.content = content

class MockResponse:
    def __init__(self):
        self.choices = [
            MockChoice("This is a visual description 1"),
            MockChoice("This is a visual description 2"),
            MockChoice("This is a visual description 3"),
            MockChoice("This is a visual description 4"),
            MockChoice("This is a visual description 5"),
            MockChoice("This is a visual description 6"),
            MockChoice("This is a visual description 7"),
            MockChoice("This is a visual description 8"),
            MockChoice("This is a visual description 9"),
            MockChoice("This is a visual description 10"),
        ]

class MockClient:
    def __init__(self):
        self.chat = Mock()
        self.chat.completions = Mock()
        self.chat.completions.create = Mock(return_value=MockResponse())

# Set up arguments
tag = "cat"
client = MockClient()

ARGS = {
    "tag": tag,
    "client": client
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
batchify_search_texts Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/integrated_search_matches_inverted_index.py
code served (permissive licence) · get_code("1f20979267216862")
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)

# Analyzing the function:
# - max_num_procs: int, used as batch size for slicing
# - search_texts: list/sequence, sliced by indices using range and len()
# - classnames: list/sequence, sliced by indices using range and len()
# Both search_texts and classnames are indexed and sliced, so they should be lists
# They are sliced in parallel, so they should have the same length

ARGS = {
    "max_num_procs": 2,
    "search_texts": ["text_1", "text_2", "text_3", "text_4", "text_5"],
    "classnames": ["class_a", "class_b", "class_c", "class_d", "class_e"]
}
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
custom_collate_fn Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/ram_model/image_search_run_rampp.py
code served (permissive licence) · get_code("eada73be057e8407")
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 numpy as np

torch.manual_seed(0)

# Create sample batch data
# Each item in batch should be a tuple of (image, json, filepath)
batch_item_1 = (
    torch.randn(3, 4, 4),  # image: 3x4x4 tensor
    {"key": "value1"},      # json: dict
    "/path/to/image1.jpg"   # filepath: string
)

batch_item_2 = (
    torch.randn(3, 4, 4),  # image: 3x4x4 tensor
    {"key": "value2"},      # json: dict
    "/path/to/image2.jpg"   # filepath: string
)

batch = [batch_item_1, batch_item_2]

ARGS = {
    "batch": batch
}
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 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
generate_combinations Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/image_search_matches_inverted_index.py
code served (permissive licence) · get_code("739edf2c5c8d6828")
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 torch
import numpy as np
from itertools import product

# The function takes a single parameter 'name' which is a string
# It splits the string by spaces, processes each word into lowercase and capitalized versions,
# generates all combinations using itertools.product, and joins them with underscores

ARGS = {
    "name": "Hello World Python"
}
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 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
get_embeddings Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bethgelab/frequency_determines_performance/src/retrieval_eval.py
code served (permissive licence) · get_code("507a009866a94a6f")
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. 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 torch.nn as nn

torch.manual_seed(0)

class SimpleEncoderModel(nn.Module):
    def __init__(self, embedding_dim=4):
        super().__init__()
        self.embedding_dim = embedding_dim
        self.image_proj = nn.Linear(3, embedding_dim)
        self.text_proj = nn.Linear(5, embedding_dim)
    
    def encode_image(self, images):
        return self.image_proj(images)
    
    def encode_text(self, texts):
        return self.text_proj(texts)

model = SimpleEncoderModel(embedding_dim=4)

batch_size = 2
captions_per_image = 3
image_feature_dim = 3
text_feature_dim = 5

batch1 = {
    'image': torch.randn(batch_size, image_feature_dim),
    'text': torch.randn(batch_size, captions_per_image, text_feature_dim)
}

batch2 = {
    'image': torch.randn(batch_size, image_feature_dim),
    'text': torch.randn(batch_size, captions_per_image, text_feature_dim)
}

dataloader = [batch1, batch2]

args = {}

ARGS = {
    'args': args,
    'model': model,
    'dataloader': dataloader
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
get_model_metadata Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/retrieval_eval.py
code served (permissive licence) · get_code("d2accc8537efedd5")
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, 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 torch.nn as nn

# Create a minimal args object that has the required attributes
class Args:
    def __init__(self, backbone, pretraining):
        self.backbone = backbone
        self.pretraining = pretraining

# Test with a valid combination from BACKBONES_AND_PRETRAINED
ARGS = {
    'args': Args(backbone='ViT-B-32', pretraining='laion400m')
}
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, ndim 1, dtype family float — a tuple 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_file Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/text_search_inverted_index_combine_dictionaries.py
code served (permissive licence) · get_code("426e1eb7406a069c")
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 pickle
import tempfile
import os

# Create a temporary directory and file for testing
temp_dir = tempfile.gettempdir()
temp_filename = os.path.join(temp_dir, 'test_data')

# Create a valid pickle file
test_content = {'key': 'value', 'data': [1, 2, 3]}
with open(f'{temp_filename}.pkl', 'wb') as f:
    pickle.dump(test_content, f)

# Define arguments for load_file
ARGS = {
    'filename': temp_filename
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
search_for_text Ran
ran; our contract draft was wrong, not the code
bethgelab/frequency_determines_performance/src/integrated_search_matches_inverted_index.py
code served (permissive licence) · get_code("6375919d880bdd02")
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, 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)

# Analyze the function:
# - args: appears unused, can be any object
# - unigram_index: dict-like, accessed with `term in unigram_index` and `unigram_index[term]`
#   Values should be iterables (converted to sets)
# - multigram_index: appears unused, can be any object
# - search_terms: iterable of terms (strings)
# - classname: returned as-is, can be any object

# Build minimal valid arguments
args = {}

unigram_index = {
    "hello": [0, 1, 3],
    "world": [1, 2, 3],
    "python": [0, 2],
}

multigram_index = {}

search_terms = ["hello", "world"]

classname = "DocumentClass"

ARGS = {
    "args": args,
    "unigram_index": unigram_index,
    "multigram_index": multigram_index,
    "search_terms": search_terms,
    "classname": classname,
}
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 tuple, ndim 1, dtype family float — a tuple 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
convert_to_rgb Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/ram_model/image_search_run_rampp.py
code served (permissive licence) · get_code("71b9114cf328f415")
How it ran

no invocation recorded.

data_load Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/src/downstream_retrieval_extract_concepts.py
code served (permissive licence) · get_code("4027c8ca9e8b9f1d")
How it ran

no invocation recorded.

data_load Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/src/retrieval_eval.py
code served (permissive licence) · get_code("7c897748918de731")
How it ran

no invocation recorded.

flatten_dictionary Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/ram_model/image_search_convert_to_rampp_format.py
code served (permissive licence) · get_code("0dfb182cef299f3d")
How it ran

no invocation recorded.

save_image_sample2concepts_index Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/src/misalignment_degree_quantification.py
code served (permissive licence) · get_code("13d86c6b0ba4d7cf")
How it ran

no invocation recorded.

save_text_sample2concepts_index Not yet run
unverified (harvested, no recorded run)
bethgelab/frequency_determines_performance/src/misalignment_degree_quantification.py
code served (permissive licence) · get_code("f94779e9fb3b9076")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

Web-crawled datasets underlie the impressive "zero-shot" performance of multimodal models, such as CLIP for classification and Stable-Diffusion for image generation. However, it is unclear how meaningful the notion of "zero-shot" generalization is for such models because the extent to which their pretraining datasets encompass downstream concepts used in "zero-shot" evaluation is unknown. In this work, we ask: How is the performance of multimodal models on downstream concepts influenced by the frequency of these concepts in their pretraining datasets? We comprehensively investigate this question across 34 models and 5 standard pretraining datasets, generating over 300GB of data artifacts. We consistently find that, far from exhibiting "zero-shot" generalization, multimodal models require exponentially more data to achieve linear improvements in downstream "zero-shot" performance, following a sample inefficient log-linear scaling trend. This trend persists even when controlling for sample-level similarity between pretraining and evaluation datasets [81], and testing on purely synthetic data distributions [52]. Furthermore, upon benchmarking models on long-tailed data sampled based on our analysis, we demonstrate that multimodal models across the board perform poorly. We contribute this long-tail test dataset as the Let it Wag! benchmark to further research in this direction. Taken together, our study reveals an exponential need for training data which implies that the key to "zero-shot" generalization capabilities under large-scale training data and compute paradigms remains to be found. * equal contribution, † equal supervising 2 class categories for classification tasks, objects in the text captions for retrieval tasks, and objects in the text prompts for generation tasks, see Sec. 2 for more details on how we define concepts. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).

For agents

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

get_harvested_code_for_paper("2404.04125")
get_code_for_paper("2404.04125")
have("2404.04125")

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

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

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

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

Connect an agent — have() is free.