SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2211.00575 · 2022

Text-Only Training for Image Captioning using Noise-Injected CLIP

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, 1 violated it and 0 have no contract verdict; 2 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/2211.00575.json · badge: /api/ran/2211.00575.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
davidhuji/capdec canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
avitej-iyer/CapDec-Recreation reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
uriberger/re_cap extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
caption_has_gender_term Ran
ran, violated the contract we drafted
davidhuji/capdec/embeddings_generator.py
code served (permissive licence) · get_code("885631f3668eea0d")
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 bool, ndim 0, dtype family float, shape () 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.

# Setup code for caption_has_gender_term function

gender_terms_map = [['boy', 'brother', 'dad', 'husband', 'man', 'groom', 'male', 'guy', 'men', 'males', 'boys', 'guys', 'dads', 'dude', 'policeman', 'policemen', 'boyfriend', 'father', 'son', 'fireman', 'he', 'actor', 'gentleman', 'mans', 'his', 'actors'], ['girl', 'sister', 'mom', 'wife', 'woman', 'bride', 'female', 'lady', 'women', 'girls', 'ladies', 'females', 'moms', 'actress', 'nun', 'policewoman', 'girlfriend', 'mother', 'daughter', 'fire woman', 'she', 'actress', 'lady', 'women', 'her', 'actresses']]

gender_terms = gender_terms_map[0] + gender_terms_map[1]

gender_terms_set = set(gender_terms)

man_terms_set = set(gender_terms_map[0])

woman_terms_set = set(gender_terms_map[1])

def caption_has_gender_term(caption, gender_mode=0):
    caption_words = caption.lower().split(' ')
    if gender_mode == 0:
        return len(set(caption_words) & gender_terms_set) > 0
    elif gender_mode == 1:
        return len(set(caption_words) & man_terms_set) > 0
    elif gender_mode == 2:
        return len(set(caption_words) & woman_terms_set) > 0

# Test caption with gender term (should return True for gender_mode=0)
test_caption_1 = "a man standing in the street"

# Test caption without gender term (should return False for gender_mode=0)
test_caption_2 = "a dog playing in the park"

# Test caption with female gender term
test_caption_3 = "a woman wearing a dress"

ARGS = {
    'caption': test_caption_1,
    'gender_mode': 0
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
change_gender_randomly Ran
ran; our contract draft was wrong, not the code
davidhuji/capdec/embeddings_generator.py
code served (permissive licence) · get_code("afcd5e18d918a60c")
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
import random

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

# The function takes a single parameter: caption
# It expects a string that will be lowercased and split by spaces
# The function checks if words are in gender_terms_set and replaces them

caption = "The boy and girl walked with their dad and mom to the policeman and policewoman"

ARGS = {
    'caption': caption
}
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
count_ready_parphrased_embeddings Ran
ran, honoured the contract we drafted
avitej-iyer/CapDec-Recreation/predictions_runner.py
code served (permissive licence) · get_code("1f75ed1d9554f429")
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 int, ndim 0, dtype family int, shape () 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 numpy as np

torch.manual_seed(0)

# The function iterates over embeddings_dict keys and checks:
# 1. If the value is not None
# 2. If the length of the value equals 5
# So we need a dict where values are either None or sequences of length 5

embeddings_dict = {
    "img_001": [torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4)],
    "img_002": None,
    "img_003": [torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4)],
    "img_004": [torch.randn(4), torch.randn(4), torch.randn(4)],
    "img_005": [torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4), torch.randn(4)],
}

ARGS = {
    "embeddings_dict": embeddings_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 int, ndim 0, dtype family int, shape () — shape () 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
remove_long_samples Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
uriberger/re_cap/reformulate.py
pointer only (licence: NONE) · get_code("ab6c8d4586f1b912")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, uriberger/re_cap 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.

calc_distances_of_ready_embeddings Not yet run
unverified (harvested, no recorded run)
avitej-iyer/CapDec-Recreation/predictions_runner.py
code served (permissive licence) · get_code("0b71ec66957d1ec4")
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, 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 5 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-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

We consider the task of image-captioning using only the CLIP model and additional text data at training time, and no additional captioned images. Our approach relies on the fact that CLIP is trained to make visual and textual embeddings similar. Therefore, we only need to learn how to translate CLIP textual embeddings back into text, and we can learn how to do this by learning a decoder for the frozen CLIP text encoder using only text. We argue that this intuition is "almost correct" because of a gap between the embedding spaces, and propose to rectify this via noise injection during training. We demonstrate the effectiveness of our approach by showing SOTA zero-shot image captioning across four benchmarks, including style transfer. Code, data, and models are available on GitHub.

For agents

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

get_harvested_code_for_paper("2211.00575")
get_code_for_paper("2211.00575")
have("2211.00575")

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

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

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

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

Connect an agent — have() is free.