SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.05720 · NeurIPS · 2023

Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model

Fernanda Viégas, Martin Wattenberg, Yida Chen

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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 4 have no contract verdict; 7 failures of our instrument; 3 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/2306.05720.json · badge: /api/ran/2306.05720.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
yc015/scene-representation-diffusion-model canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
check_imports Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/modified_diffusers/dynamic_modules_utils.py
code served (permissive licence) · get_code("301682fc3342590a")
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, 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 tempfile
import os

# Create a temporary Python file with various import statements
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False, encoding='utf-8')
temp_file.write("""
import os
import sys
from pathlib import Path
from . import utils
from .submodule import helper
import torch
import numpy
""")
temp_file.close()

ARGS = {
    "filename": temp_file.name
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
compute_scale_and_shift Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/probe_src/depth_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from ethanygao/Aux-NAS, is pointer only (licence: NONE) · get_code("25ba9b5031480973")
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 ethanygao/Aux-NAS, 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.

cosine_distance Ran
ran on a synthesized input
yc015/scene-representation-diffusion-model/modified_diffusers/pipelines/stable_diffusion/safety_checker.py
code served (permissive licence) · get_code("a580fad941fd2f88")
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, 3) 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 small embedding tensors
# image_embeds: shape (2, 4) - 2 images, 4-dimensional embeddings
image_embeds = torch.randn(2, 4)

# text_embeds: shape (3, 4) - 3 text samples, 4-dimensional embeddings
text_embeds = torch.randn(3, 4)

ARGS = {
    "image_embeds": image_embeds,
    "text_embeds": text_embeds,
}
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, 3) — shape (2, 3) 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_parameter_device Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/modified_diffusers/modeling_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from mayuelala/followyourcanvas, is pointer only (licence: NONE) · get_code("eafa252fd6f86857")
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 mayuelala/followyourcanvas, 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.

get_parameter_dtype Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/modified_diffusers/modeling_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from mayuelala/followyourcanvas, is pointer only (licence: NONE) · get_code("dc2045840ce679cb")
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 mayuelala/followyourcanvas, 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.

get_relative_import_files Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/modified_diffusers/dynamic_modules_utils.py
code served (permissive licence) · get_code("00cc853a73f3aeb6")
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, 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 re
from pathlib import Path
import tempfile
import os

# Create a temporary directory and files for testing
temp_dir = tempfile.mkdtemp()

# Create a simple module file with relative imports
module_file = os.path.join(temp_dir, "main_module.py")
with open(module_file, 'w') as f:
    f.write("""
from .helper import some_function
import .utils
from .submodule import ClassA
""")

# Create helper module
helper_file = os.path.join(temp_dir, "helper.py")
with open(helper_file, 'w') as f:
    f.write("""
def some_function():
    pass
""")

# Create utils module
utils_file = os.path.join(temp_dir, "utils.py")
with open(utils_file, 'w') as f:
    f.write("""
# utility functions
""")

# Create submodule
submodule_file = os.path.join(temp_dir, "submodule.py")
with open(submodule_file, 'w') as f:
    f.write("""
class ClassA:
    pass
""")

ARGS = {
    "module_file": module_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
get_relative_imports Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/modified_diffusers/dynamic_modules_utils.py
code served (permissive licence) · get_code("450aeffe7f80f917")
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, 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 tempfile
import os

# Create a temporary Python file with relative imports
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_module.py")

content = """
import .submodule
import .utils
from .helpers import some_function
from .core import another_function
import os
from typing import List
"""

with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(content)

ARGS = {
    'module_file': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 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
make_counterfactual_label Ran
ran on a synthesized input
yc015/scene-representation-diffusion-model/probe_src/continuous_depth_intervention_utils.py
code served (permissive licence) · get_code("1090b7fe2da4f983")
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 (4, 3) 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 numpy as np
from torchvision.transforms import functional

torch.manual_seed(0)

# Create a small label array (2D image-like)
label = np.random.randint(0, 10, size=(4, 3), dtype=np.uint8)

ARGS = {
    "label": label,
    "angle": 15,
    "translate": [2, 3],
    "scale": 1.1,
    "sheer": 0.2,
    "fill": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — 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 (4, 3) — shape (4, 3) 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
make_counterfactual_label Ran
ran on a synthesized input
yc015/scene-representation-diffusion-model/probe_src/depth_intervention_utils.py
code served (permissive licence) · get_code("002691469b74a353")
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 int, shape (4, 3) 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 torchvision.transforms import functional
import numpy as np

torch.manual_seed(0)

# Create a small label tensor (2D array representing a segmentation mask)
label = np.random.randint(0, 10, size=(4, 3), dtype=np.uint8)

ARGS = {
    "label": label,
    "angle": 15,
    "translate": [2, 1],
    "scale": 1.2,
    "sheer": 0.1,
    "fill": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — 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 int, shape (4, 3) — shape (4, 3) 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
optimize_one_inter_rep Ran
ran on a synthesized input
yc015/scene-representation-diffusion-model/probe_src/continuous_depth_intervention_utils.py
code served (permissive licence) · get_code("16f5f8b292ace798")
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. 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, 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 import nn

torch.manual_seed(0)

class SimpleProbe(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

class SimpleSmoothnessLoss(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, probe_out, image):
        if image is None:
            return torch.tensor(0.0)
        return torch.mean(probe_out ** 2)

inter_rep = torch.randn(2, 4)
layer_name = "layer_1"
target = [0.5, 0.3, 0.2]
probe = SimpleProbe()
lr = 0.001
max_epoch = 2
loss_func = nn.HuberLoss()
smoothness_loss_func = SimpleSmoothnessLoss()
image = torch.randn(2, 3)
verbose = False

ARGS = {
    'inter_rep': inter_rep,
    'layer_name': layer_name,
    'target': target,
    'probe': probe,
    'lr': lr,
    'max_epoch': max_epoch,
    'loss_func': loss_func,
    'smoothness_loss_func': smoothness_loss_func,
    'image': image,
    'verbose': verbose
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, tqdm — 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
reduction_batch_based Ran
ran; our contract draft was wrong, not the code
yc015/scene-representation-diffusion-model/probe_src/depth_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from ethanygao/Aux-NAS, is pointer only (licence: NONE) · get_code("e8996630fe3501e1")
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 ethanygao/Aux-NAS, 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.

load_state_dict Not yet run
unverified (harvested, no recorded run)
yc015/scene-representation-diffusion-model/modified_diffusers/modeling_utils.py
code served (permissive licence) · get_code("77bd5e6e8ca8c91d")
How it ran

no invocation recorded.

optimize_one_inter_rep Not yet run
unverified (harvested, no recorded run)
yc015/scene-representation-diffusion-model/probe_src/depth_intervention_utils.py
code served (permissive licence) · get_code("b31fe2f42ad6b09d")
How it ran

no invocation recorded.

reduction_image_based Not yet run
unverified (harvested, no recorded run)
yc015/scene-representation-diffusion-model/probe_src/depth_loss.py
pointer only (licence: MIT); the stored copy get_code serves, from ethanygao/Aux-NAS, is pointer only (licence: NONE) · get_code("c92f0115a72bf454")
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 ethanygao/Aux-NAS, 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. No invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 9 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
get_relative_import_files 18 other papers
3 dated earlier, 15 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 15 more not named here
get_relative_imports 18 other papers
3 dated earlier, 15 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 15 more not named here
check_imports 10 other papers
3 dated earlier, 7 later
2211.11694 (2022-11)
Exploring Discrete Diffusion Models for Image Captioning
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2305.15756 (2023-05)
UniTRec: A Unified Text-to-Text Transformer and Joint Contrastive Learning Framework for Text-based Recommendation
and 7 more not named here
get_parameter_device 10 other papers
1 dated earlier, 9 later
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2307.10829 (2023-07)
Exact Diffusion Inversion via Bi-directional Integration Approximation
2403.08268 (2024-03)
Follow-Your-Click: Open-domain Regional Image Animation via Short Prompts
and 7 more not named here
get_parameter_dtype 10 other papers
1 dated earlier, 9 later
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2307.10829 (2023-07)
Exact Diffusion Inversion via Bi-directional Integration Approximation
2403.08268 (2024-03)
Follow-Your-Click: Open-domain Regional Image Animation via Short Prompts
and 7 more not named here
load_state_dict 5 other papers
1 dated earlier, 4 later
2304.05568 (2023-04)
Improving Diffusion Models for Scene Text Editing with Dual Encoders
2307.10829 (2023-07)
Exact Diffusion Inversion via Bi-directional Integration Approximation
2406.00816 (2024-06)
Invisible Backdoor Attacks on Diffusion Models
and 2 more not named here
reduction_batch_based 5 other papers
2 dated earlier, 3 later
2109.10563 (2021-09)
Improving 360 Monocular Depth Estimation via Non-local Dense Prediction Transformer and Joint Supervised and Self-supervised Learning
2206.00665 (2022-06)
MonoSDF: Exploring Monocular Geometric Cues for Neural Implicit Surface Reconstruction
2308.07868 (2023-08)
ObjectSDF++: Improved Object-Compositional Neural Implicit Surfaces
and 2 more not named here
compute_scale_and_shift 3 other papers
1 dated earlier, 2 later
2206.00665 (2022-06)
MonoSDF: Exploring Monocular Geometric Cues for Neural Implicit Surface Reconstruction
2308.07868 (2023-08)
ObjectSDF++: Improved Object-Compositional Neural Implicit Surfaces
2405.05695 (2024-05)
Aux-NAS: Exploiting Auxiliary Labels with Negligibly Extra Inference Cost
reduction_image_based 3 other papers
1 dated earlier, 2 later
2206.00665 (2022-06)
MonoSDF: Exploring Monocular Geometric Cues for Neural Implicit Surface Reconstruction
2308.07868 (2023-08)
ObjectSDF++: Improved Object-Compositional Neural Implicit Surfaces
2405.05695 (2024-05)
Aux-NAS: Exploiting Auxiliary Labels with Negligibly Extra Inference Cost

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

Latent diffusion models (LDMs) exhibit an impressive ability to produce realistic images, yet the inner workings of these models remain mysterious. Even when trained purely on images without explicit depth information, they typically output coherent pictures of 3D scenes. In this work, we investigate a basic interpretability question: does an LDM create and use an internal representation of simple scene geometry? Using linear probes, we find evidence that the internal activations of the LDM encode linear representations of both 3D depth data and a salient-object / background distinction. These representations appear surprisingly early in the denoising process-well before a human can easily make sense of the noisy images. Intervention experiments further indicate these representations play a causal role in image synthesis, and may be used for simple high-level editing of an LDM's output.

For agents

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

get_harvested_code_for_paper("2306.05720")
get_code_for_paper("2306.05720")
have("2306.05720")

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

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

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

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

Connect an agent — have() is free.