SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14800 · 2023

Exploring Diverse In-Context Configurations for Image Captioning

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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, 0 violated it and 1 has no contract verdict; 1 failure of our instrument; 0 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/2305.14800.json · badge: /api/ran/2305.14800.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
yongliang-wu/explorecfg canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
get_context_images Ran
ran, honoured the contract we drafted
yongliang-wu/explorecfg/open_flamingo/eval/evaluate.py
code served (permissive licence) · get_code("8bb4abd6ebaa0933")
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 Tensor, ndim 6, dtype family float, shape (1, 2, 1, 3, 4, 5) 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal image processor that takes an image tensor and returns a processed tensor
class MinimalImageProcessor:
    def __call__(self, image):
        # Simulate processing: just return the image as-is or reshape if needed
        if isinstance(image, torch.Tensor):
            return image
        # If it's a PIL image or numpy array, convert to tensor
        return torch.tensor(image, dtype=torch.float32)

# Create sample images (small tensors)
sample_image_1 = torch.randn(3, 4, 5)  # 3 channels, 4x5 spatial
sample_image_2 = torch.randn(3, 4, 5)

# Create in_context_samples with the expected structure
in_context_samples = [
    {'image': sample_image_1},
    {'image': sample_image_2}
]

# Create the image processor
image_processor = MinimalImageProcessor()

# Define num_shots
num_shots = 2

ARGS = {
    'image_processor': image_processor,
    'in_context_samples': in_context_samples,
    'num_shots': num_shots
}
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 Tensor, ndim 6, dtype family float, shape (1, 2, 1, 3, 4, 5) — shape (1, 2, 1, 3, 4, 5) 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
get_random_indices Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yongliang-wu/explorecfg/open_flamingo/eval/evaluate.py
code served (permissive licence) · get_code("0c5804bb71e2308b")
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 ndarray, ndim 1, dtype family int, shape (15,) 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 numpy as np

# Create a simple dataset (list of items)
full_dataset = list(range(100))

# Define arguments
ARGS = {
    'num_samples': 10,
    'query_set_size': 5,
    'full_dataset': full_dataset,
    'seed': 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (15,) — shape (15,) 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
prepare_eval_samples_and_dataset Ran
ran on a synthesized input
this paper's copy was not recorded; identical code first harvested from ucsc-vlaa/vllm-safety-benchmark
pointer only; the stored copy get_code serves, from ucsc-vlaa/vllm-safety-benchmark, is pointer only (licence: NONE) · get_code("9047aec079594943")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 2 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
prepare_eval_samples_and_dataset 1 other paper
1 later
2311.16101 (2023-11)
How Many Unicorns Are in This Image? A Safety Evaluation Benchmark for Vision LLMs

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

After discovering that Language Models (LMs) can be good in-context few-shot learners, numerous strategies have been proposed to optimize in-context sequence configurations. Recently, researchers in Vision-Language (VL) domains also develop their few-shot learners, while they only use the simplest way, ie., randomly sampling, to configure in-context image-text pairs. In order to explore the effects of varying configurations on VL in-context learning, we devised four strategies for image selection and four for caption assignment to configure in-context image-text pairs for image captioning. Here Image Captioning is used as the case study since it can be seen as the visually-conditioned LM. Our comprehensive experiments yield two counter-intuitive but valuable insights, highlighting the distinct characteristics of VL in-context learning due to multi-modal synergy, as compared to the NLP case. Furthermore, in our exploration of optimal combination strategies, we observed an average performance enhancement of 20.9 of CIDEr scores compared to the baseline. The code is given in https://github.com/yongliang-wu/ExploreCfg.

For agents

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

get_harvested_code_for_paper("2305.14800")
get_code_for_paper("2305.14800")
have("2305.14800")

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

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

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

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

Connect an agent — have() is free.