SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.03701 · NeurIPS · 2024

Return of Unconditional Generation: A Self-supervised Representation Generation Method

Dina Katabi, Kaiming He, Tianhong Li

arXiv · PDF · Open in the Atlas

Code that ran

12 of 18 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 3 failures of our instrument; 6 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/2312.03701.json · badge: /api/ran/2312.03701.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
LTH14/rcg canonical (classifier label)
classifier basis: classifier_2025
12 ran · 6 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("33aedbcfd18d75e0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned tuple. 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
import torch.nn as nn

class Attention(nn.Module):

    def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0):
        super().__init__()
        self.num_heads = num_heads
        head_dim = dim // num_heads
        self.scale = qk_scale or head_dim ** (-0.5)
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def forward(self, x):
        B, N, C = x.shape
        qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4)
        q, k, v = (qkv[0], qkv[1], qkv[2])
        with torch.cuda.amp.autocast(enabled=False):
            attn = q.float() @ k.float().transpose(-2, -1) * self.scale
        attn = attn - torch.max(attn, dim=-1, keepdim=True)[0]
        attn = attn.softmax(dim=-1)
        attn = self.attn_drop(attn)
        x = (attn @ v).transpose(1, 2).reshape(B, N, C)
        x = self.proj(x)
        x = self.proj_drop(x)
        return (x, attn)


INIT_ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_scale': None,
    'attn_drop': 0.1,
    'proj_drop': 0.1,
}

ARGS = {
    'x': torch.randn(2, 3, 8),
}

if __name__ == '__main__':
    model = Attention(**INIT_ARGS)
    output, attn = model(**ARGS)
    print("Output shape:", output.shape)
    print("Attention shape:", attn.shape)
    print("Test passed!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
BertEmbeddings Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("63c52efe80c94cb3")
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, BertEmbeddings: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    'vocab_size': 100,
    'hidden_size': 4,
    'max_position_embeddings': 8,
    'dropout': 0.1,
}
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 BertEmbeddings — 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 BertEmbeddings 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
Block Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("607e78af8a011f8d")
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, Block: 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
import torch.nn as nn
from timm.models.vision_transformer import DropPath, Mlp

torch.manual_seed(0)

class Attention(nn.Module):
    def __init__(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0.0, proj_drop=0.0):
        super().__init__()
        self.num_heads = num_heads
        head_dim = dim // num_heads
        self.scale = qk_scale or head_dim ** (-0.5)
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def forward(self, x):
        B, N, C = x.shape
        qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4)
        q, k, v = (qkv[0], qkv[1], qkv[2])
        with torch.cuda.amp.autocast(enabled=False):
            attn = q.float() @ k.float().transpose(-2, -1) * self.scale
        attn = attn - torch.max(attn, dim=-1, keepdim=True)[0]
        attn = attn.softmax(dim=-1)
        attn = self.attn_drop(attn)
        x = (attn @ v).transpose(1, 2).reshape(B, N, C)
        x = self.proj(x)
        x = self.proj_drop(x)
        return (x, attn)

ARGS = {
    "dim": 4,
    "num_heads": 2,
    "mlp_ratio": 4.0,
    "qkv_bias": False,
    "qk_scale": None,
    "drop": 0.0,
    "attn_drop": 0.0,
    "drop_path": 0.0,
    "act_layer": nn.GELU,
    "norm_layer": nn.LayerNorm,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Block — 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 Block 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
DDIMSampler Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("950818a420758dbe")
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, DDIMSampler: 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
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

class StandInModel(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.num_timesteps = 1000
        
        # Create alphas_cumprod: should be decreasing from 1 to near 0
        alphas_cumprod = torch.linspace(1.0, 0.01, self.num_timesteps)
        self.register_buffer('alphas_cumprod', alphas_cumprod)
        
        # Create betas
        betas = torch.linspace(0.0001, 0.02, self.num_timesteps)
        self.register_buffer('betas', betas)
        
        # Create alphas_cumprod_prev (shift by 1, prepend 1.0)
        alphas_cumprod_prev = torch.cat([torch.tensor([1.0]), alphas_cumprod[:-1]])
        self.register_buffer('alphas_cumprod_prev', alphas_cumprod_prev)

model = StandInModel()

ARGS = {
    'model': model,
    'schedule': 'linear'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DDIMSampler — 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 DDIMSampler 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
Decoder Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("9c54ac910ba566df")
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, Decoder: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

ARGS = {
    'ch': 128,
    'out_ch': 3,
    'ch_mult': (1, 2, 4, 8),
    'num_res_blocks': 2,
    'attn_resolutions': [16],
    'dropout': 0.1,
    'resamp_with_conv': True,
    'in_channels': 4,
    'resolution': 256,
    'z_channels': 4,
    'give_pre_end': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Decoder — 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 Decoder 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
Encoder Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("2deab9d7e8ce0dcd")
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, Encoder: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "ch": 64,
    "out_ch": 3,
    "ch_mult": (1, 2, 4),
    "num_res_blocks": 2,
    "attn_resolutions": [],
    "dropout": 0.1,
    "resamp_with_conv": False,
    "in_channels": 3,
    "resolution": 32,
    "z_channels": 4,
    "double_z": True,
}
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 Encoder — 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 Encoder 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
MlmLayer Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("72ec0347648af855")
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, MlmLayer: the run constructed the object and did not call it, so no result was computed. 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 MlmLayer(nn.Module):

    def __init__(self, feat_emb_dim, word_emb_dim, vocab_size):
        super().__init__()
        self.fc = nn.Linear(feat_emb_dim, word_emb_dim)
        self.gelu = nn.GELU()
        self.ln = nn.LayerNorm(word_emb_dim)
        self.bias = nn.Parameter(torch.zeros(1, 1, vocab_size))

    def forward(self, x, word_embeddings):
        mlm_hidden = self.fc(x)
        mlm_hidden = self.gelu(mlm_hidden)
        mlm_hidden = self.ln(mlm_hidden)
        word_embeddings = word_embeddings.transpose(0, 1)
        logits = torch.matmul(mlm_hidden, word_embeddings)
        logits = logits + self.bias
        return logits


feat_emb_dim = 4
word_emb_dim = 5
vocab_size = 6

mlm_layer = MlmLayer(feat_emb_dim, word_emb_dim, vocab_size)

batch_size = 2
seq_len = 3
x = torch.randn(batch_size, seq_len, feat_emb_dim)
word_embeddings = torch.randn(vocab_size, word_emb_dim)

ARGS = {
    'feat_emb_dim': feat_emb_dim,
    'word_emb_dim': word_emb_dim,
    'vocab_size': vocab_size
}
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 MlmLayer — 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 MlmLayer 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
ResnetBlock Ran
ran on a synthesized input
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("30fa834a4a883839")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch
import torch.nn as nn

def Normalize(in_channels):
    return torch.nn.GroupNorm(num_groups=32, num_channels=in_channels, eps=1e-06, affine=True)

def nonlinearity(x):
    return x * torch.sigmoid(x)

class ResnetBlock(nn.Module):

    def __init__(self, *, in_channels, out_channels=None, conv_shortcut=False, dropout, temb_channels=512):
        super().__init__()
        self.in_channels = in_channels
        out_channels = in_channels if out_channels is None else out_channels
        self.out_channels = out_channels
        self.use_conv_shortcut = conv_shortcut
        self.norm1 = Normalize(in_channels)
        self.conv1 = torch.nn.Conv2d(in_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False)
        if temb_channels > 0:
            self.temb_proj = torch.nn.Linear(temb_channels, out_channels)
        self.norm2 = Normalize(out_channels)
        self.dropout = torch.nn.Dropout(dropout)
        self.conv2 = torch.nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False)
        if self.in_channels != self.out_channels:
            if self.use_conv_shortcut:
                self.conv_shortcut = torch.nn.Conv2d(out_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=False)
            else:
                self.nin_shortcut = torch.nn.Conv2d(out_channels, out_channels, kernel_size=1, stride=1, padding=0, bias=False)

    def forward(self, x, temb):
        h = x
        h = self.norm1(h)
        h = nonlinearity(h)
        h = self.conv1(h)
        if temb is not None:
            h = h + self.temb_proj(nonlinearity(temb))[:, :, None, None]
        h = self.norm2(h)
        h = nonlinearity(h)
        h = self.dropout(h)
        h = self.conv2(h)
        if self.in_channels != self.out_channels:
            if self.use_conv_shortcut:
                x = self.conv_shortcut(h)
            else:
                x = self.nin_shortcut(h)
        return x + h

INIT_ARGS = {
    'in_channels': 64,
    'out_channels': 128,
    'conv_shortcut': False,
    'dropout': 0.1,
    'temb_channels': 256
}

ARGS = {
    'x': torch.randn(2, 64, 8, 8),
    'temb': torch.randn(2, 256)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
VectorQuantizer Ran
ran on a synthesized input · constructed an object; no result was computed
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("9d2f5c397afb9f4b")
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, VectorQuantizer: the run constructed the object and did not call it, so no result was computed. 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)

# VectorQuantizer constructor parameters:
# - n_e: number of embeddings (integer)
# - e_dim: dimension of embedding (integer)
# - beta: commitment cost (float)

ARGS = {
    'n_e': 8,
    'e_dim': 4,
    'beta': 0.25
}
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 VectorQuantizer — 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 VectorQuantizer 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
load_pretrained_deit Ran
ran; our contract draft was wrong, not the code
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("43b98b8b55d12a3d")
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 MinimalModel. 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
from pathlib import Path
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model that has load_state_dict method
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a temporary checkpoint file
model = MinimalModel()
checkpoint_data = {
    'model': model.state_dict()
}

# Write checkpoint to a temporary file
with tempfile.NamedTemporaryFile(mode='w', suffix='.pt', delete=False) as f:
    temp_ckpt_path = f.name

torch.save(checkpoint_data, temp_ckpt_path)

# Create the model to load into
model_to_load = MinimalModel()

ARGS = {
    'model': model_to_load,
    'ckpt_path': temp_ckpt_path
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
load_pretrained_ibot Ran
ran; our contract draft was wrong, not the code
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("c6c33009466a11bc")
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 SimpleModel. 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 SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.layer1(x)
        x = self.layer2(x)
        return x

def create_mock_checkpoint(path):
    """Create a mock checkpoint dict matching the expected structure."""
    # Create a model to extract state dict
    model = SimpleModel()
    
    # Build a state dict that matches what load_pretrained_ibot expects
    state_dict = {}
    for k, v in model.state_dict().items():
        # Prefix with 'backbone.' to simulate the structure
        state_dict[f'backbone.{k}'] = v
    
    # Add the head layers that will be deleted
    state_dict['head.last_layer.weight_g'] = torch.randn(2, 2)
    state_dict['head.last_layer.weight_v'] = torch.randn(2, 2)
    state_dict['head.last_layer2.weight_g'] = torch.randn(2, 2)
    state_dict['head.last_layer2.weight_v'] = torch.randn(2, 2)
    
    checkpoint = {
        'teacher': state_dict
    }
    
    return checkpoint

# Create a temporary checkpoint file content
mock_checkpoint = create_mock_checkpoint('mock_ckpt.pt')

# Create a model that matches the checkpoint structure
model = SimpleModel()

# Create a mock file by storing the checkpoint in memory
# We'll use torch.save to create it, but since we can't do file I/O,
# we need to patch torch.load
import tempfile
import os

temp_dir = tempfile.gettempdir()
ckpt_path = os.path.join(temp_dir, 'mock_ibot_ckpt.pt')
torch.save(mock_checkpoint, ckpt_path)

ARGS = {
    'model': model,
    'ckpt_path': ckpt_path
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
load_pretrained_moco Ran
ran; our contract draft was wrong, not the code
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("606b6d93861e426d")
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 MinimalModel. 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
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model that matches the expected structure
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.layer2(self.layer1(x))

# Create a mock model with state_dict that matches what load_pretrained_moco expects
model = MinimalModel()

# Create a temporary checkpoint file with the expected structure
checkpoint_data = {
    'state_dict': {
        'module.base_encoder.layer1.weight': torch.randn(3, 4),
        'module.base_encoder.layer1.bias': torch.randn(3),
        'module.base_encoder.layer2.weight': torch.randn(2, 3),
        'module.base_encoder.layer2.bias': torch.randn(2),
    }
}

# Create temporary file for checkpoint
with tempfile.NamedTemporaryFile(mode='wb', delete=False, suffix='.pt') as f:
    torch.save(checkpoint_data, f)
    ckpt_path = f.name

ARGS = {
    'model': model,
    'ckpt_path': ckpt_path
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
MaskedGenerativeEncoderViT Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("928ed9eea191af30")
How it ran

no invocation recorded.

VQModel Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("5ff5b3c39cac8e4d")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("43c459d4c7f134b2")
How it ran

no invocation recorded.

load_model_from_config Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("bf19fad78c0d01dd")
How it ran

no invocation recorded.

load_pretrained_dino Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("751c98281389ad11")
How it ran

no invocation recorded.

mask_by_random_topk Not yet run
unverified (harvested, no recorded run)
LTH14/rcg/pixel_generator/mage/models_mage.py
code served (permissive licence) · get_code("92679b16417e54ec")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 15 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
mask_by_random_topk
brick of this paper's assembly: helper
2 other papers
1 later, 1 same year, order not determinable
Li_MAGE_MAsked_Generative_Encoder_To_Unify_Representation_Learning_and_Image_CVPR_2023_paper (2023 (year only))
MAGE: MAsked Generative Encoder to Unify Representation Learning and Image Synthesis
2410.12490 (2024-10)
Stabilize the Latent Space for Image Autoregressive Modeling: A Unified Perspective
MlmLayer
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2406.05478 (2024-06)
Revisiting Non-Autoregressive Transformers for Efficient Image Synthesis
load_pretrained_moco
brick of this paper's assembly: helper
1 other paper
1 later
2410.12490 (2024-10)
Stabilize the Latent Space for Image Autoregressive Modeling: A Unified Perspective

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

Unconditional generation-the problem of modeling data distribution without relying on human-annotated labels-is a long-standing and fundamental challenge in generative models, creating a potential of learning from large-scale unlabeled data. In the literature, the generation quality of an unconditional method has been much worse than that of its conditional counterpart. This gap can be attributed to the lack of semantic information provided by labels. In this work, we show that one can close this gap by generating semantic representations in the representation space produced by a self-supervised encoder. These representations can be used to condition the image generator. This framework, called Representation-Conditioned Generation (RCG), provides an effective solution to the unconditional generation problem without using labels. Through comprehensive experiments, we observe that RCG significantly improves unconditional generation quality: e.g., it achieves a new state-of-the-art FID of 2.15 on ImageNet 256×256, largely reducing the previous best of 5.91 by a relative 64%. Our unconditional results are situated in the same tier as the leading class-conditional ones. We hope these encouraging observations will attract the community's attention to the fundamental problem of unconditional generation. Code is available at https://github.com/LTH14/rcg.

For agents

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

get_harvested_code_for_paper("2312.03701")
get_code_for_paper("2312.03701")
have("2312.03701")

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

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

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

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

Connect an agent — have() is free.