SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2412.02692 · 2024

Scalable Image Tokenization with Index Backpropagation Quantization

arXiv · PDF · Open in the Atlas

Code that ran

13 of 13 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; 2 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 6 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2412.02692.json · badge: /api/ran/2412.02692.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
tencentarc/open-magvit2 community (classifier label)
classifier basis not recorded on the link
10 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
3 ran · 0 no recorded run
FunctionStatusWhere it lives
swish Ran
ran; our contract draft was wrong, not the code
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/diffusionmodules/improved_model.py
code served (permissive licence) · get_code("0f786c407fb1ee4c")
How it ran

Ran in Syntology's jail 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. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T22:33:52Z). 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 swish takes a single parameter 'x' which is used with:
# - torch.sigmoid(x) - requires a tensor
# - x * ... - requires a tensor that supports multiplication
# So 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
adopt_weight Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from joanrod/ocr-vqgan
pointer only; 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 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.

depth_to_space Ran
ran; our contract draft was wrong, not the code
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/diffusionmodules/improved_model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from SilentView/GigaTok, is pointer only (licence: NOASSERTION) · get_code("3743889a7a1ed998")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from SilentView/GigaTok, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

depth_to_space3d Ran
ran on a synthesized input
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/diffusionmodules/improved_video_model.py
code served (permissive licence) · get_code("523ecb8d3aa7e677")
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 5, dtype family float, shape (2, 2, 8, 6, 10) 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)

# Construct a valid input tensor for depth_to_space3d
# The function expects a channels-first tensor of at least 3 dimensions
# with shape (*outer_dims, C, T, H, W)
# where C is divisible by (time_block * h_block * w_block)

# Parameters:
time_block = 2
h_block = 2
w_block = 2
block_size = [time_block, h_block, w_block]
s = time_block * h_block * w_block  # = 8

# Create input tensor with shape (batch, C, T, H, W)
# C must be divisible by 8
batch_size = 2
C = 16  # divisible by 8
T = 4
H = 3
W = 5

x = torch.randn(batch_size, C, T, H, W)

ARGS = {
    'x': x,
    'block_size': block_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 Tensor, ndim 5, dtype family float, shape (2, 2, 8, 6, 10) — shape (2, 2, 8, 6, 10) 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
disabled_train Ran
ran, violated the contract we drafted
tencentarc/open-magvit2/src/Open_MAGVIT2/models/cond_transformer.py
code served (permissive licence) · get_code("4cb732f513d69dfd")
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 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.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()

ARGS = {
    "self": model,
    "mode": True
}
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 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
flatten_t_dim Ran
ran on a synthesized input
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/util.py
code served (permissive licence) · get_code("c16bc40c0efe0d76")
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 4, dtype family float, shape (6, 4, 5, 6) 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
from einops import rearrange

torch.manual_seed(0)

# The function flatten_t_dim takes a single parameter 'x'
# It expects a 5D tensor with shape (b, c, t, h, w)
# The function will rearrange it to (b*t, c, h, w)

# Create a 5D tensor with distinct sizes for each dimension
# b=2 (batch), c=4 (channels), t=3 (time), h=5 (height), w=6 (width)
x = torch.randn(2, 4, 3, 5, 6)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 4, dtype family float, shape (6, 4, 5, 6) — shape (6, 4, 5, 6) 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
tencentarc/open-magvit2/src/Open_MAGVIT2/util.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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.

hinge_d_loss Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joanrod/ocr-vqgan
pointer only; 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 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.

md5_hash Ran
ran; our contract draft was wrong, not the code
tencentarc/open-magvit2/src/Open_MAGVIT2/util.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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.

preprocess Ran
ran on a synthesized input
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/util.py
code served (permissive licence) · get_code("f772835c441ad58e")
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 5, dtype family float, shape (2, 3, 3, 8, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small video tensor with shape (b, t, h, w, c)
# b=2 (batch), t=3 (time/frames), h=4 (height), w=5 (width), c=3 (channels)
videos = torch.randint(0, 256, (2, 3, 4, 5, 3), dtype=torch.float32)

# Target resolution as a tuple (new_h, new_w)
target_resolution = (8, 10)

ARGS = {
    "videos": videos,
    "target_resolution": target_resolution,
}
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 5, dtype family float, shape (2, 3, 3, 8, 10) — shape (2, 3, 3, 8, 10) 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
retrieve Ran
ran, honoured the contract we drafted
tencentarc/open-magvit2/src/Open_MAGVIT2/util.py
pointer only (licence: Apache-2.0); 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 (Apache-2.0), 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.

unflatten_t_dim Ran
ran on a synthesized input
tencentarc/open-magvit2/src/Open_MAGVIT2/modules/util.py
code served (permissive licence) · get_code("4def1646226b2fac")
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 5, dtype family float, shape (2, 4, 3, 5, 6) 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 einops import rearrange

torch.manual_seed(0)

# The function expects:
# x: a 4D tensor with shape (b*t, c, h, w)
# t: an integer representing the time dimension size

# Create a tensor with shape (b*t, c, h, w)
# Using b=2, t=3, c=4, h=5, w=6 for distinct dimensions
b = 2
t = 3
c = 4
h = 5
w = 6

# x should have shape (b*t, c, h, w) = (6, 4, 5, 6)
x = torch.randn(b * t, c, h, w)

ARGS = {
    'x': x,
    't': t
}
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 Tensor, ndim 5, dtype family float, shape (2, 4, 3, 5, 6) — shape (2, 4, 3, 5, 6) 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
vanilla_d_loss Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from joanrod/ocr-vqgan
pointer only; 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 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.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 9 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 5 the same month, 7 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
swish 206 other papers
184 dated earlier, 18 later, 4 same year, order not determinable · 44 only as an assembly brick
1408.5882 (2014-08)
Convolutional Neural Networks for Sentence Classification
1805.12114 (2018-05)
Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models
1809.01357 (2018-09)
Zero Shot Learning for Code Education: Rubric Sampling with Deep Learning Inference
and 203 more not named here
disabled_train 173 other papers
146 dated earlier, 2 the same month, 17 later, 8 same year, order not determinable · 5 only as an assembly brick
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
and 170 more not named here
md5_hash 30 other papers
25 dated earlier, 2 the same month, 2 later, 1 same year, order not determinable
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
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 27 more not named here
hinge_d_loss 15 other papers
11 dated earlier, 2 the same month, 2 later
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 12 more not named here
vanilla_d_loss 11 other papers
10 dated earlier, 1 later
2012.09841 (2020-12)
Taming Transformers for High-Resolution Image Synthesis
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
2211.13221 (2022-11)
Latent Video Diffusion Models for High-Fidelity Long Video Generation
and 8 more not named here
get_ckpt_path 10 other papers
8 dated earlier, 1 the same month, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
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
and 7 more not named here
adopt_weight 9 other papers
7 dated earlier, 1 the same month, 1 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
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
and 6 more not named here
retrieve 5 other papers
4 dated earlier, 1 same year, order not determinable
2112.00384 (2021-12)
Exploration into Translation-Equivariant Image Quantization
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
and 2 more not named here
depth_to_space 1 other paper
1 later
2504.08736 (2025-04)
GigaTok: Scaling Visual Tokenizers to 3 Billion Parameters for Autoregressive Image Generation

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

Existing vector quantization (VQ) methods struggle with scalability, largely attributed to the instability of the codebook that undergoes partial updates during training. The codebook is prone to collapse as utilization decreases, due to the progressively widening distribution gap between non-activated codes and visual features. To solve the problem, we propose Index Backpropagation Quantization (IBQ), a new VQ method for the joint optimization of all codebook embeddings and the visual encoder. Applying a straight-through estimator on the one-hot categorical distribution between the encoded feature and codebook, all codes are differentiable and maintain a consistent latent space with the visual encoder. IBQ enables scalable training of visual tokenizers and, for the first time, achieves a large-scale codebook ($2^{18}$) with high dimension ($256$) and high utilization. Experiments on the standard ImageNet benchmark demonstrate the scalability and superiority of IBQ, achieving competitive results on reconstruction and the application of autoregressive visual generation. The code and models are available at https://github.com/TencentARC/SEED-Voken.

For agents

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

get_harvested_code_for_paper("2412.02692")
get_code_for_paper("2412.02692")
have("2412.02692")

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

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

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

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

Connect an agent — have() is free.