SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.14366 · 2026

Representation Alignment for Just Image Transformers is not Easier than You Think

Hyunjung Shim, Jiwook Kim, Jaeyo Shin

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; 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/2603.14366.json · badge: /api/ran/2603.14366.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
kaist-cvml/PixelREPA community
Papers with Code archive
7 ran · 2 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("6c7d7d14019a14d5")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim 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
import math

class RMSNorm(nn.Module):

    def __init__(self, hidden_size, eps=1e-06):
        """
        LlamaRMSNorm is equivalent to T5LayerNorm
        """
        super().__init__()
        self.weight = nn.Parameter(torch.ones(hidden_size))
        self.variance_epsilon = eps

    def forward(self, hidden_states):
        input_dtype = hidden_states.dtype
        hidden_states = hidden_states.to(torch.float32)
        variance = hidden_states.pow(2).mean(-1, keepdim=True)
        hidden_states = hidden_states * torch.rsqrt(variance + self.variance_epsilon)
        return (self.weight * hidden_states).to(input_dtype)

def scaled_dot_product_attention(query, key, value, dropout_p=0.0) -> torch.Tensor:
    L, S = (query.size(-2), key.size(-2))
    scale_factor = 1 / math.sqrt(query.size(-1))
    attn_bias = torch.zeros(query.size(0), 1, L, S, dtype=query.dtype)
    with torch.no_grad():
        attn_weight = query.float() @ key.float().transpose(-2, -1) * scale_factor
    attn_weight += attn_bias
    attn_weight = torch.softmax(attn_weight, dim=-1)
    attn_weight = torch.dropout(attn_weight, dropout_p, train=True)
    return attn_weight @ value

class Attention(nn.Module):

    def __init__(self, dim, num_heads=8, qkv_bias=True, qk_norm=True, attn_drop=0.0, proj_drop=0.0):
        super().__init__()
        self.num_heads = num_heads
        head_dim = dim // num_heads
        self.q_norm = RMSNorm(head_dim) if qk_norm else nn.Identity()
        self.k_norm = RMSNorm(head_dim) if qk_norm else nn.Identity()
        self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias)
        self.attn_drop = nn.Dropout(attn_drop)
        self.proj = nn.Linear(dim, dim)
        self.proj_drop = nn.Dropout(proj_drop)

    def forward(self, x, rope):
        B, N, C = x.shape
        qkv = self.qkv(x).reshape(B, N, 3, self.num_heads, C // self.num_heads).permute(2, 0, 3, 1, 4)
        q, k, v = (qkv[0], qkv[1], qkv[2])
        q = self.q_norm(q)
        k = self.k_norm(k)
        q = rope(q)
        k = rope(k)
        x = scaled_dot_product_attention(q, k, v, dropout_p=self.attn_drop.p if self.training else 0.0)
        x = x.transpose(1, 2).reshape(B, N, C)
        x = self.proj(x)
        x = self.proj_drop(x)
        return x

class IdentityRope(nn.Module):
    def forward(self, x):
        return x

INIT_ARGS = {
    'dim': 8,
    'num_heads': 2,
    'qkv_bias': True,
    'qk_norm': True,
    'attn_drop': 0.0,
    'proj_drop': 0.0,
}

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

if __name__ == '__main__':
    attn = Attention(**INIT_ARGS)
    output = attn(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: (2, 3, 8)")
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 3, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
BottleneckPatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("80aa00ff1884e0c9")
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, BottleneckPatchEmbed: 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
import torch.nn as nn

torch.manual_seed(0)

# Construct the arguments for BottleneckPatchEmbed
ARGS = {
    'img_size': 224,
    'patch_size': 16,
    'in_chans': 3,
    'pca_dim': 768,
    'embed_dim': 768,
    'bias': True
}
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 BottleneckPatchEmbed — 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 BottleneckPatchEmbed 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
FinalLayer Ran
ran on a synthesized input · constructed an object; no result was computed
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("85504c53809c9e71")
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, FinalLayer: 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
import torch.nn as nn

torch.manual_seed(0)

# Parameters for FinalLayer.__init__
hidden_size = 4
patch_size = 3
out_channels = 2

ARGS = {
    "hidden_size": hidden_size,
    "patch_size": patch_size,
    "out_channels": out_channels,
}

# Construct the module to verify it works
final_layer = nn.Module.__new__(type('FinalLayer', (nn.Module,), {}))
final_layer.__dict__.update({
    'norm_final': nn.Module.__new__(type('RMSNorm', (nn.Module,), {})),
    'linear': nn.Linear(hidden_size, patch_size * patch_size * out_channels, bias=True),
    'adaLN_modulation': nn.Sequential(nn.SiLU(), nn.Linear(hidden_size, 2 * hidden_size, bias=True))
})

# Setup for forward() call - prepare x and c tensors
batch_size = 2
seq_length = 3

# x: input tensor of shape (batch_size, seq_length, hidden_size)
x = torch.randn(batch_size, seq_length, hidden_size)

# c: conditioning tensor of shape (batch_size, hidden_size)
c = torch.randn(batch_size, hidden_size)

# Store forward arguments separately for reference
FORWARD_ARGS = {
    "x": x,
    "c": c,
}
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 FinalLayer — 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 FinalLayer 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
LabelEmbedder Ran
ran on a synthesized input · constructed an object; no result was computed
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("87930693cba7acab")
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, LabelEmbedder: 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
import torch.nn as nn

torch.manual_seed(0)

# Define the arguments for LabelEmbedder
num_classes = 5
hidden_size = 4

ARGS = {
    'num_classes': num_classes,
    'hidden_size': hidden_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 LabelEmbedder — 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 LabelEmbedder 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
RMSNorm Ran
ran on a synthesized input · constructed an object; no result was computed
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("77d34b3ccaee6e17")
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, RMSNorm: 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
import torch.nn as nn

torch.manual_seed(0)

# RMSNorm takes hidden_size (int) and eps (float, optional)
# In forward(), it expects hidden_states tensor
# It uses: hidden_states.dtype, .to(), .pow(), .mean(), .rsqrt(), self.weight
# So we need to construct a simple case

hidden_size = 4
eps = 1e-6

ARGS = {
    "hidden_size": hidden_size,
    "eps": eps,
}
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 RMSNorm — 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 RMSNorm 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
VisionRotaryEmbeddingFast Ran
ran on a synthesized input · constructed an object; no result was computed
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("38af29b14f134328")
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, VisionRotaryEmbeddingFast: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from math import pi

torch.manual_seed(0)

ARGS = {
    'dim': 8,
    'pt_seq_len': 4,
    'ft_seq_len': 4,
    'custom_freqs': None,
    'freqs_for': 'lang',
    'theta': 10000,
    'max_freq': 10,
    'num_freqs': 1,
    'num_cls_token': 0,
}
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 VisionRotaryEmbeddingFast — 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 VisionRotaryEmbeddingFast 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
scaled_dot_product_attention Ran
ran; our contract draft was wrong, not the code
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("ddbfee8e56c96b9c")
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; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim 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)

# Create small tensors for query, key, value
batch_size = 2
seq_len_query = 3
seq_len_key = 4
d_model = 5

query = torch.randn(batch_size, 1, seq_len_query, d_model)
key = torch.randn(batch_size, 1, seq_len_key, d_model)
value = torch.randn(batch_size, 1, seq_len_key, d_model)

dropout_p = 0.1

ARGS = {
    "query": query,
    "key": key,
    "value": value,
    "dropout_p": dropout_p
}
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 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (call:AssertionError)
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
JiT Not yet run
unverified (harvested, no recorded run)
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("8c409bbbdd6ab228")
How it ran

no invocation recorded.

JiTBlock Not yet run
unverified (harvested, no recorded run)
kaist-cvml/PixelREPA/model_pixelREPA.py
code served (permissive licence) · get_code("52326c48fe513e5f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 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
Attention
brick of this paper's assembly: model
1 other paper
1 dated earlier
2602.02493 (2026-02)
PixelGen: Improving Pixel Diffusion with Perceptual Supervision
BottleneckPatchEmbed
brick of this paper's assembly: model
1 other paper
1 dated earlier
2602.02493 (2026-02)
PixelGen: Improving Pixel Diffusion with Perceptual Supervision
JiTBlock
brick of this paper's assembly: model
1 other paper
1 dated earlier
2602.02493 (2026-02)
PixelGen: Improving Pixel Diffusion with Perceptual Supervision
LabelEmbedder
brick of this paper's assembly: model
1 other paper
1 dated earlier
2602.02493 (2026-02)
PixelGen: Improving Pixel Diffusion with Perceptual Supervision
RMSNorm
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2602.02493 (2026-02)
PixelGen: Improving Pixel Diffusion with Perceptual Supervision

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

Representation Alignment (REPA) has emerged as a simple way to accelerate Diffusion Transformers training in latent space. At the same time, pixel-space diffusion transformers such as Just image Transformers (JiT) have attracted growing attention because they remove a dependency on a pretrained tokenizer, and then avoid the reconstruction bottleneck of latent diffusion. This paper shows that the REPA can fail for JiT. REPA yields worse FID for JiT as training proceeds and collapses diversity on image subsets that are tightly clustered in the representation space of pretrained semantic encoder on ImageNet. We trace the failure to an information asymmetry: denoising occurs in the high dimensional image space, while the semantic target is strongly compressed, making direct regression a shortcut objective. We propose PixelREPA, which transforms the alignment target and constrains alignment with a Masked Transformer Adapter that combines a shallow transformer adapter with partial token masking. PixelREPA improves both training convergence and final quality. PixelREPA reduces FID from 3.66 to 3.17 for JiT-B/16 and improves Inception Score (IS) from 275.1 to 284.6 on ImageNet 256×256, while achieving > 2× faster convergence. Finally, PixelREPA-H/16 achieves FID= 1.81 and IS= 317.2.

For agents

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

get_harvested_code_for_paper("2603.14366")
get_code_for_paper("2603.14366")
have("2603.14366")

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

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

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

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

Connect an agent — have() is free.