SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2112.00384 · 2021

Exploration into Translation-Equivariant Image Quantization

arXiv · PDF · Open in the Atlas

Code that ran

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

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2112.00384.json · badge: /api/ran/2112.00384.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
wcshin-git/te-vqgan canonical (classifier label)
classifier basis not recorded on the link
13 ran · 1 no recorded run
FunctionStatusWhere it lives
adopt_weight Ran
ran, honoured the contract we drafted
wcshin-git/te-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: MIT); the stored copy get_code serves, from joanrod/ocr-vqgan, is pointer only (licence: NONE) · get_code("7439a9d4c6be04b0")
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 joanrod/ocr-vqgan, 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.

count_params Ran
ran, honoured the contract we drafted
wcshin-git/te-vqgan/taming/modules/util.py
code served (permissive licence) · get_code("5ef87f1a172f152b")
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 int, ndim 0, dtype family int, 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 as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
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 int, ndim 0, dtype family int, 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
get_ckpt_path Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/util.py
pointer only (licence: MIT); the stored copy get_code serves, from lxa9867/ControlVAR, is pointer only (licence: NONE) · get_code("e70eb36cf08faee4")
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 lxa9867/ControlVAR, 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_obj_from_str Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/models/vqgan.py
code served (permissive licence) · get_code("221b2d116fdf1032")
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 type. 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 importlib
import torch
import torch.nn as nn

torch.manual_seed(0)

# The function get_obj_from_str takes a string like "module.path.ClassName"
# and returns the class/object by:
# 1. Splitting on the last dot to get module path and class name
# 2. Optionally reloading the module if reload=True
# 3. Importing the module and getting the attribute (class/object)

# We need to provide:
# - string: a valid module.class path that exists
# - reload: boolean flag

# Using a built-in class that's guaranteed to exist
string_value = "torch.nn.Linear"
reload_value = False

ARGS = {
    "string": string_value,
    "reload": reload_value,
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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
get_pad_layer Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/diffusionmodules/model.py
pointer only (licence: MIT); the stored copy get_code serves, from linwei-chen/seg-aliasing, is pointer only (licence: NONE) · get_code("50aa4a59fe718c61")
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 linwei-chen/seg-aliasing, 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_timestep_embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
wcshin-git/te-vqgan/taming/modules/diffusionmodules/model.py
code served (permissive licence) · get_code("cb49209c125de1b4")
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 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 math

torch.manual_seed(0)

# The function takes two parameters:
# 1. timesteps: a 1D tensor of timestep indices
# 2. embedding_dim: an integer specifying the embedding dimension

# Create a small 1D tensor of timesteps (batch size 2)
timesteps = torch.tensor([0, 5], dtype=torch.int64)

# Create an embedding dimension (use 4 as specified)
embedding_dim = 4

ARGS = {
    "timesteps": timesteps,
    "embedding_dim": embedding_dim,
}
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 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
hinge_d_loss Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: MIT); the stored copy get_code serves, from joanrod/ocr-vqgan, is pointer only (licence: NONE) · get_code("22a83df891d750c6")
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 joanrod/ocr-vqgan, 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.

md5_hash Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/util.py
pointer only (licence: MIT); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("07d90bd6ae1be7db")
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 zh460045050/V2L-Tokenizer, 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.

nonlinearity Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/diffusionmodules/model.py
code served (permissive licence) · get_code("3137073275f8c21a")
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 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

torch.manual_seed(0)

# The function takes a single parameter 'x' which is used with:
# - multiplication operator (*)
# - torch.sigmoid() function
# This means x should be a tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 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
normalize_tensor Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/losses/lpips.py
pointer only (licence: MIT); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("7257fdf155f5ef45")
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 zh460045050/V2L-Tokenizer, 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.

retrieve Ran
ran, honoured the contract we drafted
wcshin-git/te-vqgan/taming/util.py
pointer only (licence: MIT); the stored copy get_code serves, from lxa9867/ControlVAR, is pointer only (licence: NONE) · get_code("31543f3e2c18272e")
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 lxa9867/ControlVAR, 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.

spatial_average Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/losses/lpips.py
pointer only (licence: MIT); the stored copy get_code serves, from zh460045050/V2L-Tokenizer, is pointer only (licence: NONE) · get_code("e268053216b1dd62")
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 zh460045050/V2L-Tokenizer, 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.

vanilla_d_loss Ran
ran; our contract draft was wrong, not the code
wcshin-git/te-vqgan/taming/modules/losses/vqperceptual.py
pointer only (licence: MIT); the stored copy get_code serves, from joanrod/ocr-vqgan, is pointer only (licence: NONE) · get_code("263c54290c553ddd")
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 joanrod/ocr-vqgan, 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.

instantiate_from_config Not yet run
unverified (harvested, no recorded run)
wcshin-git/te-vqgan/taming/models/vqgan.py
pointer only (licence: MIT); the stored copy get_code serves, from ZhengyaoFang/RS-STE, is pointer only (licence: NONE) · get_code("f0ac78b4e05be194")
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 ZhengyaoFang/RS-STE, 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, 14 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 1 the same month, 14 later) and 0 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
nonlinearity 156 other papers
5 dated earlier, 151 later · 25 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 153 more not named here
get_timestep_embedding 91 other papers
4 dated earlier, 87 later · 7 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 88 more not named here
get_obj_from_str 54 other papers
2 dated earlier, 52 later · 12 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2201.06374 (2022-01)
RestoreFormer: High-Quality Blind Face Restoration from Undegraded Key-Value Pairs
and 51 more not named here
md5_hash 30 other papers
2 dated earlier, 28 later
2008.01777 (2020-08)
Making Sense of CNNs: Interpreting Deep Representations & Their Invariances with INNs
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2206.02262 (2022-06)
Diffusion-GAN: Training GANs with Diffusion
and 27 more not named here
get_pad_layer 25 other papers
4 dated earlier, 1 the same month, 20 later · 3 only as an assembly brick
2004.09484 (2020-04)
Bringing Old Photos Back to Life
2007.15651 (2020-07)
Contrastive Learning for Unpaired Image-to-Image Translation
2008.09604 (2020-08)
Delving Deeper into Anti-aliasing in ConvNets
and 22 more not named here
hinge_d_loss 15 other papers
1 dated earlier, 14 later
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
2305.13607 (2023-05)
Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation
and 12 more not named here
instantiate_from_config 13 other papers
13 later · 1 only as an assembly brick
2301.13670 (2023-01)
What Makes Good Examples for Visual In-Context Learning?
2306.14795 (2023-06)
MotionGPT: Human Motion as a Foreign Language
2310.03502 (2023-10)
Kandinsky: an Improved Text-to-Image Synthesis with Image Prior and Latent Diffusion
and 10 more not named here
normalize_tensor 13 other papers
13 later
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2203.16521 (2022-03)
CoordGAN: Self-Supervised Dense Correspondences Emerge from GANs
Xu_Versatile_Diffusion_Text_Images_and_Variations_All_in_One_Diffusion_ICCV_2023_paper (2023 (year only))
Versatile Diffusion: Text, Images and Variations All in One Diffusion Model
and 10 more not named here
vanilla_d_loss 11 other papers
1 dated earlier, 10 later
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
2305.13607 (2023-05)
Not All Image Regions Matter: Masked Vector Quantization for Autoregressive Image Generation
and 8 more not named here
get_ckpt_path 10 other papers
10 later
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
2308.07228 (2023-08)
RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 7 more not named here
adopt_weight 9 other papers
2 dated earlier, 7 later
2004.13166 (2020-04)
A Disentangling Invertible Interpretation Network for Explaining Latent Representations
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 6 more not named here
spatial_average 9 other papers
9 later
2203.10897 (2022-03)
Unified Multivariate Gaussian Mixture for Efficient Neural Image Compression
2203.16521 (2022-03)
CoordGAN: Self-Supervised Dense Correspondences Emerge from GANs
Xu_Versatile_Diffusion_Text_Images_and_Variations_All_in_One_Diffusion_ICCV_2023_paper (2023 (year only))
Versatile Diffusion: Text, Images and Variations All in One Diffusion Model
and 6 more not named here
retrieve 5 other papers
5 later
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
2308.07228 (2023-08)
RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 2 more not named here
count_params 4 other papers
4 later
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
2308.07228 (2023-08)
RestoreFormer++: Towards Real-World Blind Face Restoration from Undegraded Key-Value Pairs
aaai_29913 (2024 (year only))
Topic-VQ-VAE: Leveraging Latent Codebooks for Flexible Topic-Guided Document Generation
and 1 more not named here

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

This is an exploratory study that discovers the current image quantization (vector quantization) do not satisfy translation equivariance in the quantized space due to aliasing. Instead of focusing on anti-aliasing, we propose a simple yet effective way to achieve translation-equivariant image quantization by enforcing orthogonality among the codebook embeddings. To explore the advantages of translation-equivariant image quantization, we conduct three proof-of-concept experiments with a carefully controlled dataset: (1) text-to-image generation, where the quantized image indices are the target to predict, (2) image-to-text generation, where the quantized image indices are given as a condition, (3) using a smaller training set to analyze sample efficiency. From the strictly controlled experiments, we empirically verify that the translation-equivariant image quantizer improves not only sample efficiency but also the accuracy over VQGAN up to +11.9% in text-to-image generation and +3.9% in image-to-text generation.

For agents

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

get_harvested_code_for_paper("2112.00384")
get_code_for_paper("2112.00384")
have("2112.00384")

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

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

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

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

Connect an agent — have() is free.