SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.08221 · ICLR · 2024

Generate Any Scene: Scene Graph Driven Data Synthesis for Visual Generation Training

Aniruddha Kembhavi, Jieyu Zhang, Ziqi Gao, Ranjay Krishna, Weikai Huang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 4 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/2412.08221.json · badge: /api/ran/2412.08221.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
raivnlab/generateanyscene canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
RAIVNLab/GenerateAnyScene canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
StableDiffusion2 Ran
ran on a synthesized input · constructed an object; no result was computed
RAIVNLab/GenerateAnyScene/gas/models/gen_model/text2image_model.py
code served (permissive licence) · get_code("a7e2d6002ce5485b")
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 an instance of its own class, StableDiffusion2: the run constructed the object and did not call it, so no result was computed. 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

# Since StableDiffusion2 attempts to download a model from huggingface,
# we need to mock the diffusers library components to avoid network calls.
# We'll create minimal stand-in classes that satisfy the interface.

class MockSchedulerConfig:
    pass

class MockScheduler:
    def __init__(self):
        self.config = MockSchedulerConfig()

class MockPipeline:
    def __init__(self, *args, **kwargs):
        self.scheduler = MockScheduler()
    
    def __call__(self, prompt, num_inference_steps=25, height=1024, width=1024):
        # Return a mock result with images attribute
        class MockResult:
            def __init__(self):
                self.images = [torch.zeros((3, height, width))]
        return MockResult()
    
    def enable_model_cpu_offload(self):
        pass

class MockDiffusionPipeline:
    @staticmethod
    def from_pretrained(ckpt, torch_dtype=None, revision=None, safety_checker=None):
        return MockPipeline()

class MockDPMSolverMultistepScheduler:
    @staticmethod
    def from_config(config):
        return MockScheduler()

# Mock the diffusers module
import sys
from types import ModuleType

diffusers_mock = ModuleType('diffusers')
diffusers_mock.DiffusionPipeline = MockDiffusionPipeline
diffusers_mock.DPMSolverMultistepScheduler = MockDPMSolverMultistepScheduler
sys.modules['diffusers'] = diffusers_mock

# Now we can define the arguments
ARGS = {
    'ckpt': 'stabilityai/stable-diffusion-2-base',
    'precision': torch.float16,
    'device': torch.device('cpu')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
diffusers, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type StableDiffusion2 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a StableDiffusion2 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
add_seed_graph_to_template_graph Ran
ran; our contract draft was wrong, not the code
raivnlab/generateanyscene/gas/captions_generation/scene_graph.py
code served (permissive licence) · get_code("9970c1cdbd2b5873")
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 list, ndim 2, 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 networkx as nx

# Create a seed graph with 2 nodes
seed_graph = nx.DiGraph()
seed_graph.add_node(0, type='object_node', value='apple')
seed_graph.add_node(1, type='object_node', value='red')
seed_graph.add_edge(0, 1, value='color_of')

# Create a template graph with 4 nodes that contains the seed graph structure
template_graph = nx.DiGraph()
template_graph.add_node('a', type='object_node', value=None)
template_graph.add_node('b', type='object_node', value=None)
template_graph.add_node('c', type='object_node', value=None)
template_graph.add_node('d', type='object_node', value=None)
template_graph.add_edge('a', 'b', value=None)
template_graph.add_edge('b', 'c', value=None)
template_graph.add_edge('c', 'd', value=None)
template_graph.add_edge('a', 'c', value=None)

ARGS = {
    'seed_graph': seed_graph,
    'template_graph': template_graph,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, 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
find_isomorphisms Ran
ran; our contract draft was wrong, not the code
raivnlab/generateanyscene/gas/captions_generation/scene_graph.py
code served (permissive licence) · get_code("1cd04068b5ed4f68")
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 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 networkx as nx

# Create two directed graphs with node attributes
graph1 = nx.DiGraph()
graph1.add_node(0, type='A')
graph1.add_node(1, type='B')
graph1.add_edge(0, 1)

graph2 = nx.DiGraph()
graph2.add_node(0, type='A')
graph2.add_node(1, type='B')
graph2.add_node(2, type='C')
graph2.add_node(3, type='A')
graph2.add_edge(0, 1)
graph2.add_edge(3, 2)

ARGS = {
    'graph1': graph1,
    'graph2': graph2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
networkx — 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
generate_prompt Ran
ran; our contract draft was wrong, not the code
RAIVNLab/GenerateAnyScene/generation.py
code served (permissive licence) · get_code("5022dcff291c3815")
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 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 torch.nn as nn

torch.manual_seed(0)

class MockTaskPlan:
    def __init__(self):
        self.scene_graph = {"nodes": [1, 2, 3], "edges": [(0, 1), (1, 2)]}

class MockGenerator(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def sample_task_plans(self, number_of_scene_attributes, complexity, sample_numbers):
        """Returns a list of task plans"""
        task_plans = []
        for _ in range(sample_numbers):
            task_plans.append(MockTaskPlan())
        return task_plans
    
    def generate(self, sg):
        """Takes a scene graph and generates a prompt string"""
        return f"Generated prompt from scene graph with {len(sg.scene_graph['nodes'])} nodes"

generator = MockGenerator()
complexity = "medium"
num_scene_attributes = 5

ARGS = {
    "generator": generator,
    "complexity": complexity,
    "num_scene_attributes": num_scene_attributes,
}
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 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
label_repeated_objects_in_sg Ran
ran; our contract draft was wrong, not the code
raivnlab/generateanyscene/gas/captions_generation/scene_graph.py
code served (permissive licence) · get_code("3591898e154d97a1")
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 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 networkx as nx

# Create a simple scene graph with object nodes and attribute nodes
graph = nx.DiGraph()

# Add first object node with attributes
graph.add_node('obj_1', type='object_node', value='red_cube')
graph.add_node('attr_1', type='attribute_node', value='large')
graph.add_node('attr_2', type='attribute_node', value='shiny')
graph.add_edge('obj_1', 'attr_1')
graph.add_edge('obj_1', 'attr_2')

# Add second object node with same value and attributes (repeated)
graph.add_node('obj_2', type='object_node', value='red_cube')
graph.add_node('attr_3', type='attribute_node', value='large')
graph.add_node('attr_4', type='attribute_node', value='shiny')
graph.add_edge('obj_2', 'attr_3')
graph.add_edge('obj_2', 'attr_4')

# Add third object node with different value (not repeated)
graph.add_node('obj_3', type='object_node', value='blue_sphere')
graph.add_node('attr_5', type='attribute_node', value='small')
graph.add_edge('obj_3', 'attr_5')

# Add another repeated object
graph.add_node('obj_4', type='object_node', value='blue_sphere')
graph.add_node('attr_6', type='attribute_node', value='small')
graph.add_edge('obj_4', 'attr_6')

ARGS = {
    'graph': graph,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
networkx — 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
GenModelInstance Not yet run
unverified (harvested, no recorded run)
RAIVNLab/GenerateAnyScene/gas/models/gen_model/text2image_model.py
code served (permissive licence) · get_code("f987c876bc076858")
How it ran

no invocation recorded.

Also present in other papers' code

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

Recent advances in text-to-vision generation excel in visual fidelity but struggle with compositional generalization and semantic alignment. Existing datasets are noisy and weakly compositional, limiting models' understanding of complex scenes, while scalable solutions for dense, high-quality annotations remain a challenge. We introduce GENERATE ANY SCENE, a data engine that systematically enumerates scene graphs representing the combinatorial array of possible visual scenes. GENERATE ANY SCENE dynamically constructs scene graphs of varying complexity from a structured taxonomy of objects, attributes, and relations. Given a sampled scene graph, GENERATE ANY SCENE translates it into a caption for text-to-image or text-to-video generation; it also translates it into a set of visual question answers that allow automatic evaluation and reward modeling of semantic alignment. Using GENERATE ANY SCENE, we first design a self-improving framework where models iteratively enhance their performance using generated data. SDv1.5 achieves an average 4% improvement over baselines and surpasses fine-tuning on CC3M. Second, we also design a distillation algorithm to transfer specific strengths from proprietary models to their open-source counterparts. Using fewer than 800 synthetic captions, we fine-tune SDv1.5 and achieve a 10% increase in TIFA score for compositional and hard-concept generation. Third, we create a reward model to align model generation with semantic accuracy at a low cost. Using GRPO algorithm, we fine-tune SimpleAR-0.5B-SFT and surpass CLIP-based methods by +5% on DPG-Bench. Finally, we apply these ideas to the downstream task of content moderation where we train models to identify challenging cases by learning from synthetic data.

For agents

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

get_harvested_code_for_paper("2412.08221")
get_code_for_paper("2412.08221")
have("2412.08221")

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

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

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

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

Connect an agent — have() is free.