SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.04439 · ECCV · 2022

Improved Masked Image Generation with Token-Critic

Lu Jiang, Huiwen Chang, Irfan Essa, José Lezama

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 4 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/2209.04439.json · badge: /api/ran/2209.04439.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
lucidrains/phenaki-pytorch community
Papers with Code archive
5 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AlibiPositionalBias Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("1aaa3002a09281e8")
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, AlibiPositionalBias: 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
from torch.nn import Module

torch.manual_seed(0)

# AlibiPositionalBias.__init__ takes heads as a parameter
# The forward method expects sim to be a tensor with shape (..., h, i, j)
# where h is heads, i and j are sequence dimensions

# Create a small example with:
# - heads: number of attention heads
# - sim: a similarity tensor of shape (batch, heads, seq_i, seq_j)

heads = 8

# Create a small sim tensor to test with
# Shape: (batch=2, heads=8, i=3, j=4)
sim = torch.randn(2, heads, 3, 4)

ARGS = {
    'heads': heads
}
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 AlibiPositionalBias — 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 AlibiPositionalBias 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
FeedForward Ran
ran; our contract draft was wrong, not the code
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("69b968d8053ddaa5")
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 Sequential. 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
from torch import nn
import torch.nn.functional as F

torch.manual_seed(0)

ARGS = {
    "dim": 64,
    "mult": 4,
    "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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
GEGLU Ran
ran on a synthesized input
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("579b2c6b2cba46b3")
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 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 torch.nn as nn
from torch.nn import Module
import torch.nn.functional as F

class GEGLU(Module):

    def forward(self, x):
        x, gate = x.chunk(2, dim=-1)
        return F.gelu(gate) * x


INIT_ARGS = {}

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

if __name__ == '__main__':
    model = GEGLU(**INIT_ARGS)
    output = model(**ARGS)
    print(output.shape)
    print(output)
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 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
LayerNorm Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("a79da4959e7da465")
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, LayerNorm: 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
from torch import nn
import torch.nn.functional as F

torch.manual_seed(0)

# The LayerNorm.__init__ takes only one parameter: dim
# It creates gamma as a learnable parameter and beta as a buffer
# Both should have shape (dim,)

ARGS = {
    'dim': 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 LayerNorm — 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 LayerNorm 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
l2norm Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from tmlresearchgroup-cas/clipure
pointer only; the stored copy get_code serves, from tmlresearchgroup-cas/clipure, is pointer only (licence: NONE) · get_code("3eb58dae620046d3")
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.

prob_mask_like Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("3c6433dd421724e0")
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 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 three parameters:
# - shape: a tuple defining the shape of the output tensor
# - prob: a float probability value (0, 1, or between 0 and 1)
# - device: a torch device

ARGS = {
    "shape": (2, 4),
    "prob": 0.5,
    "device": torch.device("cpu")
}
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 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
Attention Not yet run
unverified (harvested, no recorded run)
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("20759ff768a1ec91")
How it ran

no invocation recorded.

PEG Not yet run
unverified (harvested, no recorded run)
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("370fef2ad04c6629")
How it ran

no invocation recorded.

TokenCritic Not yet run
unverified (harvested, no recorded run)
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("429489f94b946a0f")
How it ran

no invocation recorded.

Transformer Not yet run
unverified (harvested, no recorded run)
lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py
code served (permissive licence) · get_code("8ce27c87cf7c3f89")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
l2norm
brick of this paper's assembly: helper
16 other papers
5 dated earlier, 11 later · 4 only as an assembly brick
2112.05682 (2021-12)
Self-attention Does Not Need $O(n^2)$ Memory
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2203.07852 (2022-03)
Block-Recurrent Transformers
and 13 more not named here
prob_mask_like
brick of this paper's assembly: helper
11 other papers
1 dated earlier, 10 later · 2 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
2211.10658 (2022-11)
EDGE: Editable Dance Generation From Music
2211.12500 (2022-11)
Person Image Synthesis via Denoising Diffusion Model
and 8 more not named here
AlibiPositionalBias
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
Attention
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
FeedForward
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
GEGLU
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
LayerNorm
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
PEG
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer
Transformer
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2202.04200 (2022-02)
MaskGIT: Masked Generative Image Transformer

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

Non-autoregressive generative transformers recently demonstrated impressive image generation performance, and orders of magnitude faster sampling than their autoregressive counterparts. However, optimal parallel sampling from the true joint distribution of visual tokens remains an open challenge. In this paper we introduce Token-Critic, an auxiliary model to guide the sampling of a non-autoregressive generative transformer. Given a masked-and-reconstructed real image, the Token-Critic model is trained to distinguish which visual tokens belong to the original image and which were sampled by the generative transformer. During non-autoregressive iterative sampling, Token-Critic is used to select which tokens to accept and which to reject and resample. Coupled with Token-Critic, a state-of-the-art generative transformer significantly improves its performance, and outperforms recent di↵usion models and GANs in terms of the trade-o↵ between generated image quality and diversity, in the challenging class-conditional ImageNet generation.

For agents

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

get_harvested_code_for_paper("2209.04439")
get_code_for_paper("2209.04439")
have("2209.04439")

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

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

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

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

Connect an agent — have() is free.