SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.06787 · 2024

[MASK] is All You Need

arXiv · PDF · Open in the Atlas

Code that ran

9 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, 1 violated it and 1 has no contract verdict; 7 failures of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2412.06787.json · badge: /api/ran/2412.06787.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
CompVis/mask reimplementation (classifier label)
classifier basis: classifier_2025
8 ran · 5 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
custom_to_np Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from weizhigao/modiff
pointer only; the stored copy get_code serves, from weizhigao/modiff, is pointer only (licence: NONE) · get_code("834bbad6b027b869")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

custom_to_pil Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CompVis/mask/ldm/scripts/sample_diffusion.py
code served (permissive licence) · get_code("73fba7367428c8a5")
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 Image. 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 numpy as np
from PIL import Image

torch.manual_seed(0)

# The function expects a tensor x with shape (C, H, W) where:
# - C is channels (3 for RGB)
# - H is height
# - W is width
# The tensor values should be in range [-1, 1] for the clamping to make sense

x = torch.randn(3, 4, 5)  # 3 channels, 4 height, 5 width
x = torch.clamp(x, -1.0, 1.0)  # Ensure values are in valid range

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
extend_as Ran
ran, violated the contract we drafted
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("137bf88ab8750134")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family float, shape (8, 1, 1) 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)

# Create two tensors with different numbers of dimensions
# x has fewer dimensions than y, so extend_as will reshape x
x = torch.randn(2, 4)  # 2D tensor: shape (2, 4)
y = torch.randn(2, 3, 5, 6)  # 4D tensor: shape (2, 3, 5, 6)

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (8, 1, 1) — shape (8, 1, 1) 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
indices_to_diracp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("70517741ca818319")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 3, dtype family int, shape (2, 10, 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 einops import rearrange

torch.manual_seed(0)

# Test case 1: 'bt' type
x_bt = torch.randint(0, 10, (2, 4))
vocab_size_bt = 10
type_data_bt = 'bt'

# Test case 2: 'bwh' type
x_bwh = torch.randint(0, 8, (2, 3, 4))
vocab_size_bwh = 8
type_data_bwh = 'bwh'

# Test case 3: 'bcwh' type
x_bcwh = torch.randint(0, 6, (2, 3, 4, 5))
vocab_size_bcwh = 6
type_data_bcwh = 'bcwh'

# Test case 4: 'btwh' type
x_btwh = torch.randint(0, 7, (2, 3, 4, 5))
vocab_size_btwh = 7
type_data_btwh = 'btwh'

# Use the 'bt' case as the primary test
ARGS = {
    'x': x_bt,
    'vocab_size': vocab_size_bt,
    'type_data': type_data_bt
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (2, 10, 4) — shape (2, 10, 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
logs2pil Ran
ran; our contract draft was wrong, not the code
CompVis/mask/ldm/scripts/sample_diffusion.py
code served (permissive licence) · get_code("968eb3375c1d67e1")
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 torch
import numpy as np

torch.manual_seed(0)

# Create test tensors with different shapes
# 4D tensor: (batch, channels, height, width)
tensor_4d = torch.randn(2, 3, 4, 5)

# 3D tensor: (channels, height, width)
tensor_3d = torch.randn(3, 4, 5)

# Create logs dict with various tensor shapes
logs = {
    'sample': tensor_4d,
    'sample_3d': tensor_3d,
    'invalid': torch.randn(2),  # 1D tensor - should fail gracefully
}

ARGS = {
    'logs': logs,
    'keys': ['sample']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy, torch — 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
sample_p Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("650ed748a9500619")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family int, 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
from einops import rearrange

torch.manual_seed(0)

# Test case 1: type_data == 'bt'
# pt shape should be (b, k, t) where k is vocab size
# multinomial requires probabilities that sum to 1
pt_bt = torch.softmax(torch.randn(2, 4, 3), dim=1)  # (b=2, k=4, t=3)

# Test case 2: type_data == 'bwh'
# pt shape should be (b, k, h, w)
pt_bwh = torch.softmax(torch.randn(2, 4, 3, 5), dim=1)  # (b=2, k=4, h=3, w=5)

# Test case 3: type_data == 'bcwh'
# pt shape should be (b, k, c, h, w)
pt_bcwh = torch.softmax(torch.randn(2, 4, 3, 5, 6), dim=1)  # (b=2, k=4, c=3, h=5, w=6)

# mask_token_id is an optional integer
mask_token_id = 1

ARGS = {
    "pt": pt_bt,
    "type_data": "bt",
    "mask_token_id": mask_token_id
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, 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 int, 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
search_ah Ran
ran; our contract draft was wrong, not the code
CompVis/mask/ldm/scripts/train_searcher.py
code served (permissive licence) · get_code("7629721cb0905b41")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockSearcher:
    def __init__(self):
        self.data = torch.randn(2, 4)
    
    def score_ah(self, dims_per_block, anisotropic_quantization_threshold=None):
        self.dims_per_block = dims_per_block
        self.aiq_threshold = anisotropic_quantization_threshold
        return self
    
    def reorder(self, k):
        self.reorder_k = k
        return self
    
    def build(self):
        return {"result": self.data}

searcher = MockSearcher()
dims_per_block = 2
aiq_threshold = 0.5
reorder_k = 3

ARGS = {
    "searcher": searcher,
    "dims_per_block": dims_per_block,
    "aiq_threshold": aiq_threshold,
    "reorder_k": reorder_k
}
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 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
search_bruteforce Ran
ran on a synthesized input
CompVis/mask/ldm/scripts/train_searcher.py
code served (permissive licence) · get_code("872823964fff640d")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockScorer:
    """Mock scorer that implements score_brute_force() method."""
    def score_brute_force(self):
        return self
    
    def build(self):
        """Return a simple result."""
        return {"result": "brute_force_search_complete"}

class MockSearcher:
    """Mock searcher with score_brute_force method."""
    def __init__(self):
        self.scorer = MockScorer()
    
    def score_brute_force(self):
        """Return a scorer-like object that has build() method."""
        return self.scorer

ARGS = {
    "searcher": MockSearcher()
}
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 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
search_partioned_ah Ran
ran; our contract draft was wrong, not the code
CompVis/mask/ldm/scripts/train_searcher.py
code served (permissive licence) · get_code("eda17c2c32cd3500")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

class MockTree:
    def __init__(self, num_leaves, num_leaves_to_search, training_sample_size):
        self.num_leaves = num_leaves
        self.num_leaves_to_search = num_leaves_to_search
        self.training_sample_size = training_sample_size
    
    def score_ah(self, dims_per_block, anisotropic_quantization_threshold):
        self.dims_per_block = dims_per_block
        self.aiq_threshold = anisotropic_quantization_threshold
        return self
    
    def reorder(self, reorder_k):
        self.reorder_k = reorder_k
        return self
    
    def build(self):
        return {
            "num_leaves": self.num_leaves,
            "num_leaves_to_search": self.num_leaves_to_search,
            "training_sample_size": self.training_sample_size,
            "dims_per_block": self.dims_per_block,
            "aiq_threshold": self.aiq_threshold,
            "reorder_k": self.reorder_k
        }

class MockSearcher:
    def tree(self, num_leaves, num_leaves_to_search, training_sample_size):
        return MockTree(num_leaves, num_leaves_to_search, training_sample_size)

ARGS = {
    "searcher": MockSearcher(),
    "dims_per_block": 8,
    "aiq_threshold": 0.95,
    "reorder_k": 10,
    "partioning_trainsize": 256,
    "num_leaves": 32,
    "num_leaves_to_search": 4
}
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 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
Coupling Not yet run
unverified (harvested, no recorded run)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("04cecb2affe0b210")
How it ran

no invocation recorded.

DiscreteInterpolants Not yet run
unverified (harvested, no recorded run)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("a69c41311ff4819e")
How it ran

no invocation recorded.

KappaScheduler Not yet run
unverified (harvested, no recorded run)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("8ed8619511cec220")
How it ran

no invocation recorded.

logits_with_top_k_top_p_ Not yet run
unverified (harvested, no recorded run)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("e927bede2e52cbc7")
How it ran

no invocation recorded.

print_rank_0 Not yet run
unverified (harvested, no recorded run)
CompVis/mask/dynamics/dynamic_di.py
code served (permissive licence) · get_code("a41a92fc83ae68c8")
How it ran

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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 3 later) and 8 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
custom_to_pil 8 other papers
6 dated earlier, 1 later, 1 same year, order not determinable
2212.04231 (2022-12)
Harnessing the Power of Multi-Task Pretraining for Ground-Truth Level Natural Language Explanations
2305.17100 (2023-05)
BiomedGPT: A Generalist Vision-Language Foundation Model for Diverse Biomedical Tasks
2306.02115 (2023-06)
Table and Image Generation for Investigating Knowledge of Entities in Pre-trained Vision and Language Models
and 5 more not named here
custom_to_np 5 other papers
3 dated earlier, 1 later, 1 same year, order not determinable
Huang_TFMQ-DM_Temporal_Feature_Maintenance_Quantization_for_Diffusion_Models_CVPR_2024_paper (2024 (year only))
TFMQ-DM: Temporal Feature Maintenance Quantization for Diffusion Models
2402.03666 (2024-02)
QuEST: Low-bit Diffusion Model Quantization via Efficient Selective Finetuning
2403.03463 (2024-03)
FLAME Diffuser: Wildfire Image Synthesis using Mask Guided Diffusion
and 2 more not named here
logs2pil 5 other papers
3 dated earlier, 1 later, 1 same year, order not determinable
Huang_TFMQ-DM_Temporal_Feature_Maintenance_Quantization_for_Diffusion_Models_CVPR_2024_paper (2024 (year only))
TFMQ-DM: Temporal Feature Maintenance Quantization for Diffusion Models
2402.03666 (2024-02)
QuEST: Low-bit Diffusion Model Quantization via Efficient Selective Finetuning
2403.03463 (2024-03)
FLAME Diffuser: Wildfire Image Synthesis using Mask Guided Diffusion
and 2 more not named here
search_ah 1 other paper
1 dated earlier
2403.03463 (2024-03)
FLAME Diffuser: Wildfire Image Synthesis using Mask Guided Diffusion
search_bruteforce 1 other paper
1 dated earlier
2403.03463 (2024-03)
FLAME Diffuser: Wildfire Image Synthesis using Mask Guided Diffusion
search_partioned_ah 1 other paper
1 dated earlier
2403.03463 (2024-03)
FLAME Diffuser: Wildfire Image Synthesis using Mask Guided Diffusion

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

In generative models, two paradigms have gained attraction in various applications: next-set prediction-based Masked Generative Models and next-noise prediction-based Non-Autoregressive Models, e.g., Diffusion Models. In this work, we propose using discrete-state models to connect them and explore their scalability in the vision domain. First, we conduct a step-by-step analysis in a unified design space across two types of models including timestep-independence, noise schedule, temperature, guidance strength, etc in a scalable manner. Second, we re-cast typical discriminative tasks, e.g., image segmentation, as an unmasking process from [MASK] tokens on a discrete-state model. This enables us to perform various sampling processes, including flexible conditional sampling by only training once to model the joint distribution. All aforementioned explorations lead to our framework named Discrete Interpolants, which enables us to achieve state-of-the-art or competitive performance compared to previous discrete-state based methods in various benchmarks, like ImageNet256, MS COCO, and video dataset FaceForensics. In summary, by leveraging [MASK] in discrete-state models, we can bridge Masked Generative and Non-autoregressive Diffusion models, as well as generative and discriminative tasks.

For agents

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

get_harvested_code_for_paper("2412.06787")
get_code_for_paper("2412.06787")
have("2412.06787")

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

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

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

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

Connect an agent — have() is free.