SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.07132 · 2023

Image Content Generation with Causal Reasoning

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 4 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/2312.07132.json · badge: /api/ran/2312.07132.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
ieit-agi/mix-shannon canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
create_positive_map Ran
ran, honoured the contract we drafted
ieit-agi/mix-shannon/src/datamodules/data_bases.py
code served (permissive licence) · get_code("65b76f6fcd86e5be")
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 Tensor, ndim 2, dtype family float, shape (2, 256) 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

torch.manual_seed(0)

class MockTokenized:
    """Mock tokenizer output with char_to_token method"""
    def __init__(self):
        # Map character positions to token indices
        # Simple mapping: char 0-5 -> token 0, char 6-11 -> token 1, etc.
        self.char_to_token_map = {
            0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0,
            6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 11: 1,
            12: 2, 13: 2, 14: 2, 15: 2, 16: 2, 17: 2,
            18: 3, 19: 3, 20: 3, 21: 3, 22: 3, 23: 3,
        }
    
    def char_to_token(self, char_pos):
        """Return token index for a character position, or None if not found"""
        return self.char_to_token_map.get(char_pos, None)

tokenized = MockTokenized()

# tokens_positive is a list of lists of (beg, end) tuples
# Each inner list corresponds to one positive example/box
# (beg, end) are character positions in the original text
tokens_positive = [
    [(0, 6), (12, 18)],    # First box: chars 0-6 and 12-18
    [(6, 12)],             # Second box: chars 6-12
]

ARGS = {
    "tokenized": tokenized,
    "tokens_positive": tokens_positive,
}
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 Tensor, ndim 2, dtype family float, shape (2, 256) — shape (2, 256) 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
field_align_in_FREC Ran
ran, honoured the contract we drafted
ieit-agi/mix-shannon/src/datamodules/frec_datamodule.py
code served (permissive licence) · get_code("a1af7feaf9cc90fb")
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 Tensor, ndim 2, dtype family float, shape (9, 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

torch.manual_seed(0)

# Analyze the function:
# - batch: List of dicts with a field that contains tensors
# - field: str key to access in each batch item
# - The function accesses b[field].shape[0] and b[field].shape[1]
# - It pops the field from each batch item
# - The tensors should be 2D (has .shape[0] and .shape[1])

# Create batch items - each item is a dict with a field containing a 2D tensor
batch_item_1 = {
    "data": torch.randint(0, 2, (3, 4), dtype=torch.bool),  # 3 boxes, 4 length
    "other": torch.randn(2, 2)  # some other data
}

batch_item_2 = {
    "data": torch.randint(0, 2, (2, 5), dtype=torch.bool),  # 2 boxes, 5 length
    "other": torch.randn(2, 2)
}

batch_item_3 = {
    "data": torch.randint(0, 2, (4, 3), dtype=torch.bool),  # 4 boxes, 3 length
    "other": torch.randn(2, 2)
}

batch = [batch_item_1, batch_item_2, batch_item_3]
field = "data"

ARGS = {
    "batch": batch,
    "field": field
}
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 Tensor, ndim 2, dtype family float, shape (9, 5) — shape (9, 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
interpolate_pos_embed Ran
ran; our contract draft was wrong, not the code
ieit-agi/mix-shannon/lavis/models/vit.py
code served (permissive licence) · get_code("c6ec173f19f5c34d")
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 3, dtype family float, shape (1, 17, 4) 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)

class PatchEmbed(nn.Module):
    def __init__(self, num_patches):
        super().__init__()
        self.num_patches = num_patches

class VisualEncoder(nn.Module):
    def __init__(self, num_patches, pos_embed_shape):
        super().__init__()
        self.patch_embed = PatchEmbed(num_patches)
        self.pos_embed = torch.randn(pos_embed_shape)

# Create a visual encoder with 16 patches (4x4 grid)
# pos_embed shape: (1, num_patches + num_extra_tokens, embedding_dim)
num_patches = 16
num_extra_tokens = 1
embedding_size = 4
visual_encoder = VisualEncoder(
    num_patches=num_patches,
    pos_embed_shape=(1, num_patches + num_extra_tokens, embedding_size)
)

# Create pos_embed_checkpoint with original size 2x2 (4 patches) + 1 extra token
# This will trigger interpolation from 2x2 to 4x4
orig_size = 2
orig_num_patches = orig_size * orig_size
pos_embed_checkpoint = torch.randn(1, orig_num_patches + num_extra_tokens, embedding_size)

ARGS = {
    "pos_embed_checkpoint": pos_embed_checkpoint,
    "visual_encoder": visual_encoder,
}
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 3, dtype family float, shape (1, 17, 4) — shape (1, 17, 4) 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
tile Ran
ran; our contract draft was wrong, not the code
ieit-agi/mix-shannon/lavis/models/base_model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from MengzhouLu/RetroMPA, is pointer only (licence: NONE) · get_code("cb33571427334815")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from MengzhouLu/RetroMPA, 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.

all_gather_with_grad Not yet run
unverified (harvested, no recorded run)
ieit-agi/mix-shannon/lavis/models/base_model.py
code served (permissive licence) · get_code("0ec9fc2025c16f65")
How it ran

no invocation recorded.

create_eva_vit_g Not yet run
unverified (harvested, no recorded run)
ieit-agi/mix-shannon/lavis/models/eva_vit.py
code served (permissive licence) · get_code("5435e3d77040cfbb")
How it ran

no invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
ieit-agi/mix-shannon/validate.py
code served (permissive licence) · get_code("525aaa24d3342b71")
How it ran

no invocation recorded.

make_coco_transforms Not yet run
unverified (harvested, no recorded run)
ieit-agi/mix-shannon/src/datamodules/data_bases.py
code served (permissive licence) · get_code("481508014360cd2a")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
all_gather_with_grad 91 other papers
34 dated earlier, 5 the same month, 52 later · 2 only as an assembly brick
2206.02967 (2022-06)
Masked Unsupervised Self-training for Label-free Image Classification
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
2302.06605 (2023-02)
UniAdapter: Unified Parameter-Efficient Transfer Learning for Cross-modal Modeling
and 88 more not named here
tile 84 other papers
35 dated earlier, 4 the same month, 45 later
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
2210.07795 (2022-10)
EfficientVLM: Fast and Accurate Vision-Language Models via Knowledge Distillation and Modal-adaptive Pruning
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
and 81 more not named here
interpolate_pos_embed 52 other papers
24 dated earlier, 3 the same month, 25 later
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2111.09452 (2021-11)
Open Vocabulary Object Detection with Pseudo Bounding-Box Labels
2205.11169 (2022-05)
PEVL: Position-enhanced Pre-training and Prompt Tuning for Vision-language Models
and 49 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

The emergence of ChatGPT has once again sparked research in generative artificial intelligence (GAI). While people have been amazed by the generated results, they have also noticed the reasoning potential reflected in the generated textual content. However, this current ability for causal reasoning is primarily limited to the domain of language generation, such as in models like GPT-3. In visual modality, there is currently no equivalent research. Considering causal reasoning in visual content generation is significant. This is because visual information contains infinite granularity. Particularly, images can provide more intuitive and specific demonstrations for certain reasoning tasks, especially when compared to coarse-grained text. Hence, we propose a new image generation task called visual question answering with image (VQAI) and establish a dataset of the same name based on the classic \textit{Tom and Jerry} animated series. Additionally, we develop a new paradigm for image generation to tackle the challenges of this task. Finally, we perform extensive experiments and analyses, including visualizations of the generated content and discussions on the potentials and limitations. The code and data are publicly available under the license of CC BY-NC-SA 4.0 for academic and non-commercial usage. The code and dataset are publicly available at: https://github.com/IEIT-AGI/MIX-Shannon/blob/main/projects/VQAI/lgd_vqai.md.

For agents

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

get_harvested_code_for_paper("2312.07132")
get_code_for_paper("2312.07132")
have("2312.07132")

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

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

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

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

Connect an agent — have() is free.