Papers › ResTok: Learning Hierarchical Residuals in 1D Visual Tokenizers for Autoregressive...
ResTok: Learning Hierarchical Residuals in 1D Visual Tokenizers for Autoregressive Image Generation
Xu Zhang, Cheng Da, Huan Yang, Kun Gai, Ming Lu, Zhan Ma
Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).
Existing 1D visual tokenizers for autoregressive (AR) generation largely follow the design principles of language modeling, as they are built directly upon transformers whose priors originate in language, yielding single-hierarchy latent tokens and treating visual data as flat sequential token streams. However, this language-like formulation overlooks key properties of vision, particularly the hierarchical and residual network designs that have long been essential for convergence and efficiency in visual models. To bring "vision" back to vision, we propose the Residual Tokenizer (ResTok), a 1D visual tokenizer that builds hierarchical residuals for both image tokens and latent tokens. The hierarchical representations obtained through progressively merging enable cross-level feature fusion at each layer, substantially enhancing representational capacity. Meanwhile, the semantic residuals between hierarchies prevent information overlap, yielding more concentrated latent distributions that are easier for AR modeling. Cross-level bindings consequently emerge without any explicit constraints. To accelerate the generation process, we further introduce a hierarchical AR generator that substantially reduces sampling steps by predicting an entire level of latent tokens at once rather than generating them strictly token-by-token. Extensive experiments demonstrate that restoring hierarchical residual priors in visual tokenization significantly improves AR image generation, achieving a gFID of 2.34 on ImageNet-256 with only 9 sampling steps. Code is available at https://github.com/Kwai-Kolors/ResTok.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="2601.03955")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2601.03955", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2601.03955")
Code
Syntology 18 code samples harvested from 1 repository linked to this paper: 10 ran (of which 3 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 4 where Syntology's instrument failed) · 8 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; 3 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: found in paper text by Syntology: 18 samples from 1 repository, 10 ran (6 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
18 samples harvested: 10 ran (of which 3 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 4 where Syntology's instrument failed) · 8 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from Kwai-Kolors/ResTok. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
census: 13 implementations from 12 papers, 10 distinct outputs across 4 buckets, one shared input per bucket modeling/restok.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) ·
dc0b1a5e1598b3db · report
fixture: returned Attention · level recorded 2026-09-22 331849d453e4a146 · report
fixture: signature only_trainable:bool/0/bool, exclude_embeddings:bool/0/bool · returned int · level recorded 2026-09-24 e5a6cad693b52a50 · report
fixture: returned EmbedND · level recorded 2026-09-22 f92ea3569a8d2a16 · report
fixture: signature h:int/0/int, w:int/0/int, text_length:int/0/int, text_first:bool/0/bool, device:NoneType/0/? · returned Tensor · level recorded 2026-09-24 df7e4e4587a3a993 · report
fixture: signature hw_list:list/1/tuple, text_length:int/0/int, text_first:bool/0/bool, device:device/0/? · returned Tensor · level recorded 2026-09-24 ae6827aeaa6c2f91 · report
fixture: returned VectorQuantizer · level recorded 2026-09-22 9b90fac7ef321810 · report
fixture: signature block_sizes:list/1/int, device:NoneType/0/? · returned Tensor · level recorded 2026-09-22 8d096c594b535eea · report
fixture: signature x:Tensor/3/float, patch_sizes:list/1/tuple, orig_size:tuple/1/int, residual:bool/0/bool · returned Tensor · level recorded 2026-09-22 census: 4 implementations from 5 papers, 1 distinct output on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float64 modeling/restok.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) ·
17724d4203fa5863 · report
fixture: signature pos:Tensor/2/float, dim:int/0/int, theta:int/0/int · returned Tensor · level recorded 2026-09-22 88f9ed95e47dbf7d · report
fixture: signature x:Tensor/4/float, patch_sizes:list/1/tuple, residual:bool/0/bool · returned Tensor · level recorded 2026-09-22 6d4d68d101ba1d9f · report
031fee67ad484ab8 · report
census: 3 implementations from 8 papers, 2 distinct outputs across 2 buckets, one shared input per bucket modeling/restok.py unverified Apache-2.0 (permissive) ·
3444bbcc9065f707 · report
Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.
1 assembly on this paper: 1 harvested, 0 generated.
harvested Assembly for ResTok (graph method: ResTok). 22 bricks; individually on a fixture: 12 ran (of which 4 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 5 where Syntology's instrument failed) · 10 unverified. The assembly has not been run end-to-end.
- ResTok entry · level 0 · unverified ·
666149bd0f290f52 - BaseModel helper · level 1 · ran ·
331849d453e4a146 - ResTokDecoder model · level 0 · unverified ·
6b02763c63ccc2bf - ResTokEncoder model · level 0 · unverified ·
51c9fbe126e5f0be - VectorQuantizer helper · level 1 · ran ·
ae6827aeaa6c2f91 - EmbedNDHybrid2DMaker helper · level 1 · ran ·
f92ea3569a8d2a16 - TransformerBlock helper · level 0 · unverified ·
031fee67ad484ab8 - multi_level_1d_features_to_2d_maps_avg helper · level 1 · ran; the contract check could not run (RAISES) ·
8d096c594b535eea - EmbedNDHybridMulti2DMaker helper · level 1 · ran ·
df7e4e4587a3a993 - ResTokTransformerBlock model · level 0 · unverified ·
6d4d68d101ba1d9f - build_hierarchical_causal_mask helper · level 1 · ran · our draft was wrong ·
9b90fac7ef321810 - sample_multi_level_1d_tokens helper · level 1 · ran; the contract check could not run (RAISES) ·
88f9ed95e47dbf7d - compute_entropy_loss helper · level 1 · ran · our draft was wrong ·
a85cfd31cc2ac08c - EmbedND helper · level 1 · ran ·
e5a6cad693b52a50 - rope helper · level 1 · ran; the contract check could not run (RAISES) ·
17724d4203fa5863 - Attention helper · level 1 · ran ·
dc0b1a5e1598b3db - apply_rope helper · level 0 · unverified ·
3444bbcc9065f707 - apply_rope_single helper · level 0 · unverified ·
2fa3d7da1cf96e21 - Conv2dSame helper · level 1 · ran ·
10cffbe1e3498007 - DownsamplingBlock helper · level 0 · unverified ·
fb1dd34f22935870 - ResnetBlock helper · level 0 · unverified ·
948ed9d3fca0a0b0 - UpsamplingBlock helper · level 0 · unverified ·
a743a53b959dc7db
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2601.03955") returns these assemblies with each brick's role and wiring (how to connect).
Results from the paper
The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2601.03955, was issued in January 2026, after that date, so the archive has no leaderboard rows for it.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections