SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1811.10787 · 2018

Unsupervised Image Captioning

arXiv · PDF · Open in the Atlas

Code that ran

2 of 9 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 2 have no contract verdict; 0 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/1811.10787.json · badge: /api/ran/1811.10787.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
fengyang0317/unsupervised_captioning community (classifier label)
classifier basis not recorded on the link
2 ran · 7 no recorded run
FunctionStatusWhere it lives
batching_func Ran
ran on a synthesized input
fengyang0317/unsupervised_captioning/input_pipeline.py
code served (permissive licence) · get_code("76a9b6fe83ea92ce")
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 _PaddedBatchDataset. 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 tensorflow as tf

# Create a dataset that yields tuples matching the expected structure
# The function expects x to be a dataset that can be padded

# Create sample data matching the padded_shapes specification:
# ((299x299x3 image, var-length tensor, var-length tensor, scalar),
#  (var-length tensor, scalar, var-length tensor, scalar))

def create_sample_dataset():
    """Create a small TensorFlow dataset matching expected structure."""
    samples = []
    for i in range(4):  # Create 4 samples for batching
        x_data = (
            tf.random.normal([299, 299, 3]),  # Image: 299x299x3
            tf.random.normal([2 + i]),         # Variable length: 2, 3, 4, 5
            tf.random.normal([3 + i]),         # Variable length: 3, 4, 5, 6
            tf.constant(1.5)                   # Scalar
        )
        y_data = (
            tf.random.normal([1 + i]),         # Variable length: 1, 2, 3, 4
            tf.constant(2.0),                  # Scalar
            tf.random.normal([2 + i]),         # Variable length: 2, 3, 4, 5
            tf.constant(3.0)                   # Scalar
        )
        samples.append((x_data, y_data))
    
    # Create dataset from samples
    dataset = tf.data.Dataset.from_generator(
        lambda: iter(samples),
        output_signature=(
            (
                tf.TensorSpec(shape=[299, 299, 3], dtype=tf.float32),
                tf.TensorSpec(shape=[None], dtype=tf.float32),
                tf.TensorSpec(shape=[None], dtype=tf.float32),
                tf.TensorSpec(shape=[], dtype=tf.float32)
            ),
            (
                tf.TensorSpec(shape=[None], dtype=tf.float32),
                tf.TensorSpec(shape=[], dtype=tf.float32),
                tf.TensorSpec(shape=[None], dtype=tf.float32),
                tf.TensorSpec(shape=[], dtype=tf.float32)
            )
        )
    )
    return dataset

x_dataset = create_sample_dataset()
batch_size_val = 2

ARGS = {
    "x": x_dataset,
    "batch_size": batch_size_val
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _PaddedBatchDataset — a _PaddedBatchDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _PaddedBatchDataset 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
transform_grads_fn Ran
ran on a synthesized input
fengyang0317/unsupervised_captioning/misc_fn.py
code served (permissive licence) · get_code("1522d86852eae35f")
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. 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 tensorflow as tf
import numpy as np

# Create sample gradients and variables for the function
# The function expects a list of (gradient, variable) tuples

# Create some sample TensorFlow variables
var1 = tf.Variable(tf.random.normal([2, 4]))
var2 = tf.Variable(tf.random.normal([3, 5]))

# Create corresponding gradients (same shape as variables)
grad1 = tf.constant(np.random.randn(2, 4), dtype=tf.float32)
grad2 = tf.constant(np.random.randn(3, 5), dtype=tf.float32)

# Package as list of (grad, var) tuples
grads_and_vars = [
    (grad1, var1),
    (grad2, var2)
]

ARGS = {
    "grads": grads_and_vars
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
crop_sentence Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/misc_fn.py
code served (permissive licence) · get_code("87f21af9b546e678")
How it ran

no invocation recorded.

get_len Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/misc_fn.py
code served (permissive licence) · get_code("9f6e5b896223a455")
How it ran

no invocation recorded.

parse_image Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/input_pipeline.py
code served (permissive licence) · get_code("f67272b86ad5f3d3")
How it ran

no invocation recorded.

parse_image Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/initialization/eval_obj2sen.py
code served (permissive licence) · get_code("bd7686eb06b93e74")
How it ran

no invocation recorded.

parse_image Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/initialization/gen_obj2sen_caption.py
code served (permissive licence) · get_code("b16f4be70669c68b")
How it ran

no invocation recorded.

parse_sentence Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/initialization/obj2sen.py
code served (permissive licence) · get_code("ec1099fa086d8984")
How it ran

no invocation recorded.

preprocess_image Not yet run
unverified (harvested, no recorded run)
fengyang0317/unsupervised_captioning/input_pipeline.py
code served (permissive licence) · get_code("660085a67c222cf2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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

Deep neural networks have achieved great successes on the image captioning task. However, most of the existing models depend heavily on paired image-sentence datasets, which are very expensive to acquire. In this paper, we make the first attempt to train an image captioning model in an unsupervised manner. Instead of relying on manually labeled image-sentence pairs, our proposed model merely requires an image set, a sentence corpus, and an existing visual concept detector. The sentence corpus is used to teach the captioning model how to generate plausible sentences. Meanwhile, the knowledge in the visual concept detector is distilled into the captioning model to guide the model to recognize the visual concepts in an image. In order to further encourage the generated captions to be semantically consistent with the image, the image and caption are projected into a common latent space so that they can reconstruct each other. Given that the existing sentence corpora are mainly designed for linguistic research and are thus with little reference to image contents, we crawl a large-scale image description corpus of two million natural sentences to facilitate the unsupervised image captioning scenario. Experimental results show that our proposed model is able to produce quite promising results without any caption annotations.

For agents

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

get_harvested_code_for_paper("1811.10787")
get_code_for_paper("1811.10787")
have("1811.10787")

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

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

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

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

Connect an agent — have() is free.