SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.19298 · ICML · 2024

Compositional Image Decomposition with Diffusion Models

Joshua Tenenbaum, Yilun Du, Nan Liu, Yanbo Wang, Jocelin Su

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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, 2 violated it and 1 has no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2406.19298.json · badge: /api/ran/2406.19298.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
1Konny/Beta-VAE canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
openai/InfoGAN canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
baudm/MONet-pytorch community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
Flatten Ran
ran on a synthesized input
baudm/MONet-pytorch/models/networks.py
pointer only (licence: NOASSERTION) · get_code("c4c6d0c722ce7f3e")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, baudm/MONet-pytorch (NOASSERTION). 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.

cuda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
1Konny/Beta-VAE/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from seymayucer/VAEs, is pointer only (licence: NONE) · get_code("8c252d04248affd7")
How it ran

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

is_power_of_2 Ran
ran, violated the contract we drafted
1Konny/Beta-VAE/dataset.py
code served (permissive licence) · get_code("6523d8d6272a3cc5")
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.

import torch

torch.manual_seed(0)

ARGS = {
    "num": 8
}
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 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
kl_divergence Ran
ran; our contract draft was wrong, not the code
1Konny/Beta-VAE/solver.py
code served (permissive licence) · get_code("39b467466c64b8ed")
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 tuple. 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

torch.manual_seed(0)

# Create small tensors for mu and logvar
# The function expects:
# - mu: tensor with .size() method, .data attribute, .pow() method
# - logvar: tensor with .size() method, .data attribute, .exp() method
# Both should support view operations and arithmetic

batch_size = 2
latent_dim = 4

mu = torch.randn(batch_size, latent_dim)
logvar = torch.randn(batch_size, latent_dim)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
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 tuple — a tuple 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
leaky_rectify Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
openai/InfoGAN/infogan/misc/custom_ops.py
pointer only (licence: NONE) · get_code("0b71fdd2dc019d86")
How it ran

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

reconstruction_loss Ran
ran; our contract draft was wrong, not the code
1Konny/Beta-VAE/solver.py
code served (permissive licence) · get_code("4865b8d298fd30b3")
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 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.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for testing
batch_size = 2
feature_dim = 4

# x: input tensor (can be binary or continuous depending on distribution)
x = torch.randn(batch_size, feature_dim)

# x_recon: reconstructed tensor (logits for bernoulli, or pre-sigmoid values for gaussian)
x_recon = torch.randn(batch_size, feature_dim)

# distribution: string specifying the distribution type
distribution = 'bernoulli'

ARGS = {
    'x': x,
    'x_recon': x_recon,
    'distribution': distribution
}
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 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
reparametrize Ran
ran, honoured the contract we drafted
1Konny/Beta-VAE/model.py
code served (permissive licence) · get_code("863fc64cd51264f0")
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, 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
from torch.autograd import Variable

torch.manual_seed(0)

# The function reparametrize expects:
# - mu: a tensor (used with arithmetic operations and passed to std.data.new)
# - logvar: a tensor (used with .div(2).exp() and .data.new and .size())

# Create small tensors for mu and logvar
# logvar should be a log variance tensor
mu = torch.randn(2, 4)
logvar = torch.randn(2, 4)

ARGS = {
    "mu": mu,
    "logvar": logvar,
}
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, 4) — shape (2, 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
return_data Ran
ran; our contract draft was wrong, not the code
1Konny/Beta-VAE/dataset.py
code served (permissive licence) · get_code("d920047f26420214")
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 DataLoader. 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 os
import tempfile
import numpy as np
import torch
from torch.utils.data import Dataset, DataLoader
from torchvision.datasets import ImageFolder
from torchvision import transforms
from PIL import Image

torch.manual_seed(0)

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
dset_dir = temp_dir

# Create mock dataset directories
chairs_dir = os.path.join(dset_dir, '3DChairs')
os.makedirs(chairs_dir, exist_ok=True)

# Create a simple mock image file for ImageFolder
img_class_dir = os.path.join(chairs_dir, 'class0')
os.makedirs(img_class_dir, exist_ok=True)
img = Image.new('RGB', (64, 64), color='red')
img.save(os.path.join(img_class_dir, 'test_image.jpg'))

# Create args object as a simple class
class Args:
    def __init__(self):
        self.dataset = '3dchairs'
        self.dset_dir = dset_dir
        self.batch_size = 2
        self.num_workers = 0
        self.image_size = 64

ARGS = {'args': Args()}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
str2bool Ran
ran, violated the contract we drafted
1Konny/Beta-VAE/utils.py
code served (permissive licence) · get_code("f017532fc389cbfe")
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 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.

import argparse

def str2bool(v):
    if v.lower() in ('yes', 'true', 't', 'y', '1'):
        return True
    elif v.lower() in ('no', 'false', 'f', 'n', '0'):
        return False
    else:
        raise argparse.ArgumentTypeError('Boolean value expected.')

# Setup code to construct valid arguments
ARGS = {
    'v': 'true'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
where Ran
ran; our contract draft was wrong, not the code
1Konny/Beta-VAE/utils.py
code served (permissive licence) · get_code("748ecd3b20613687")
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, 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)

# The function `where` expects:
# - cond: a tensor that can be converted to float
# - x: a tensor for multiplication
# - y: a tensor for multiplication
# All tensors should support element-wise operations

cond = torch.tensor([[1, 0, 1, 0],
                     [0, 1, 0, 1]], dtype=torch.bool)

x = torch.randn(2, 4)

y = torch.randn(2, 4)

ARGS = {
    "cond": cond,
    "x": x,
    "y": y
}
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, 4) — shape (2, 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
ComponentVAE Not yet run
unverified (harvested, no recorded run)
baudm/MONet-pytorch/models/networks.py
pointer only (licence: NOASSERTION) · get_code("5b577f5bef67740c")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, baudm/MONet-pytorch (NOASSERTION). 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. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 1 the same month, 2 later) and 4 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
str2bool 82 other papers
77 dated earlier, 2 the same month, 3 later
1510.03055 (2015-10)
A Diversity-Promoting Objective Function for Neural Conversation Models
1703.06490 (2017-03)
Generating Multi-label Discrete Patient Records using Generative Adversarial Networks
1710.10467 (2017-10)
Generalized End-to-End Loss for Speaker Verification
and 79 more not named here
reparametrize 10 other papers
8 dated earlier, 2 later · 2 only as an assembly brick
2105.14203 (2021-05)
Understanding Instance-based Interpretability of Variational Auto-Encoders
2111.02338 (2021-11)
Drop, Swap, and Generate: A Self-Supervised Approach for Generating Neural Activity
2210.13647 (2022-10)
Temporally Disentangled Representation Learning
and 7 more not named here
cuda 2 other papers
2 dated earlier
1804.03599 (2018-04)
Understanding disentangling in $β$-VAE
2309.16515 (2023-09)
Latent Noise Segmentation: How Neural Noise Leads to the Emergence of Segmentation and Grouping
is_power_of_2 2 other papers
2 dated earlier
1802.05983 (2018-02)
Disentangling by Factorising
1902.01568 (2019-02)
Relevance Factor VAE: Learning and Identifying Disentangled Factors
kl_divergence 2 other papers
2 dated earlier · 1 only as an assembly brick
2105.14203 (2021-05)
Understanding Instance-based Interpretability of Variational Auto-Encoders
2111.02338 (2021-11)
Drop, Swap, and Generate: A Self-Supervised Approach for Generating Neural Activity
leaky_rectify 2 other papers
2 dated earlier
1612.03242 (2016-12)
StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks
1710.10916 (2017-10)
StackGAN++: Realistic Image Synthesis with Stacked Generative Adversarial Networks
where 1 other paper
1 dated earlier
2108.10252 (2021-08)
Federated Multi-Task Learning under a Mixture of Distributions

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

Given an image of a natural scene, we are able to quickly decompose it into a set of components such as objects, lighting, shadows, and foreground. We can then envision a scene where we combine certain components with those from other images, for instance a set of objects from our bedroom and animals from a zoo under the lighting conditions of a forest, even if we have never encountered such a scene before. In this paper, we present a method to decompose an image into such compositional components. Our approach, Decomp Diffusion, is an unsupervised method which, when given a single image, infers a set of different components in the image, each represented by a diffusion model. We demonstrate how components can capture different factors of the scene, ranging from global scene descriptors like shadows or facial expression to local scene descriptors like constituent objects. We further illustrate how inferred factors can be flexibly composed, even with factors inferred from other models, to generate a variety of scenes sharply different than those seen in training time. Code and visualizations are at https://energy-based-model. github.io/decomp-diffusion.

For agents

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

get_harvested_code_for_paper("2406.19298")
get_code_for_paper("2406.19298")
have("2406.19298")

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

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

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

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

Connect an agent — have() is free.