SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.06885 · 2026

Don't Retrain-Align: Adapting Autoregressive LMs to Diffusion LMs via Representation Alignment

Alexander Tong, Anru Zhang, Alexis Fox, Fred Peng

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2605.06885.json · badge: /api/ran/2605.06885.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
pengzhangzhi/Open-dLLM canonical (classifier label)
classifier basis: census
4 ran · 3 no recorded run
FunctionStatusWhere it lives
build_processor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pengzhangzhi/Open-dLLM/veomni/models/auto.py
code served (permissive licence) · get_code("5ec4d72b6f05006b")
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 Mock. 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a mock processor that mimics AutoProcessor.from_pretrained behavior
mock_processor = Mock()
mock_processor.padding_side = 'right'

# Mock the AutoProcessor class to return our mock processor
from transformers import AutoProcessor

original_from_pretrained = AutoProcessor.from_pretrained

def mock_from_pretrained(processor_path, padding_side='right', trust_remote_code=True):
    """Mock processor builder"""
    processor = Mock()
    processor.padding_side = padding_side
    processor.trust_remote_code = trust_remote_code
    return processor

# Monkey patch for this execution
AutoProcessor.from_pretrained = mock_from_pretrained

ARGS = {
    'processor_path': 'bert-base-uncased'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Mock — a Mock output has no array shape of its own; none is 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
doc_to_target Ran
ran; our contract draft was wrong, not the code
pengzhangzhi/Open-dLLM/lm-evaluation-harness/lm_eval/tasks/careqa/utils_open.py
code served (permissive licence) · get_code("6244b5d275c44812")
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 str. 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

torch.manual_seed(0)

# The function doc_to_target takes a doc parameter and returns doc['answer']
# So doc must be a dictionary with an 'answer' key

ARGS = {
    'doc': {
        'answer': 'This is the target answer',
        'question': 'What is the answer?',
        'id': 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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
doc_to_text Ran
ran; our contract draft was wrong, not the code
pengzhangzhi/Open-dLLM/lm-evaluation-harness/lm_eval/tasks/careqa/utils_open.py
code served (permissive licence) · get_code("13913db932bfc84c")
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 str. 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

torch.manual_seed(0)

# The function accesses doc['question'], so we need a dict with a 'question' key
doc = {
    'question': 'What is the capital of France?'
}

ARGS = {
    'doc': doc
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
fixed_cross_entropy Ran
ran; our contract draft was wrong, not the code
pengzhangzhi/Open-dLLM/veomni/ops/loss.py
code served (permissive licence) · get_code("885b51df1ff1abff")
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 0, dtype family float, 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)

# Create small tensors for cross_entropy
# source: logits of shape (batch_size, num_classes)
# target: class indices of shape (batch_size,)
batch_size = 2
num_classes = 4

source = torch.randn(batch_size, num_classes)
target = torch.randint(0, num_classes, (batch_size,))

# num_items_in_batch: optional tensor for normalization
num_items_in_batch = torch.tensor(batch_size, dtype=torch.float32)

# ignore_index: classes to ignore in loss computation
ignore_index = -100

ARGS = {
    'source': source,
    'target': target,
    'num_items_in_batch': num_items_in_batch,
    'ignore_index': ignore_index,
}
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 0, dtype family float, 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
build_tokenizer Not yet run
unverified (harvested, no recorded run)
pengzhangzhi/Open-dLLM/veomni/models/auto.py
code served (permissive licence) · get_code("7c6cb8d3e6d5a33b")
How it ran

no invocation recorded.

causallm_loss_function Not yet run
unverified (harvested, no recorded run)
pengzhangzhi/Open-dLLM/veomni/ops/loss.py
code served (permissive licence) · get_code("543a6e07d0504113")
How it ran

no invocation recorded.

doc_eval Not yet run
unverified (harvested, no recorded run)
pengzhangzhi/Open-dLLM/lm-evaluation-harness/lm_eval/tasks/careqa/utils_open.py
code served (permissive licence) · get_code("9d8856ea8e6a06db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 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.

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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Diffusion language models (DLMs) have recently demonstrated capabilities that complement standard autoregressive (AR) models, particularly in non-sequential generation and bidirectional editing. Although recent work has shown that pretrained autoregressive checkpoints can be converted into diffusion language models, existing recipes primarily transfer parameters through continued denoising training with objective-and attention-level modifications. We instead ask whether the internal representation geometry learned by next-token prediction can be explicitly preserved during AR→DLM conversion. We hypothesize that much of the semantic structure learned by AR pretraining can transfer across generation orders, and thus DLM training should be viewed as relearning the decoding path rather than relearning language representations. To investigate this, we introduce REPR-ALIGN, a Representation Alignment objective that adapts a bidirectional masked diffusion model to reuse representations from a pretrained AR model of identical architecture. Concretely, we align the hidden states of the DLM to the frozen AR model at every layer using cosine similarity, while optimizing the standard masked denoising objective. This simple alignment-with no adapters and no architectural changes beyond the attention mask-yields up to 4× training acceleration in our setting and is particularly effective in low-data regimes. Our results suggest that linguistic representations are universal regardless of generation order, and representation alignment could be a new go-to technique for training diffusion language models. Code is available at https://github.com/pengzhangzhi/Open-dLLM.

For agents

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

get_harvested_code_for_paper("2605.06885")
get_code_for_paper("2605.06885")
have("2605.06885")

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

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

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

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

Connect an agent — have() is free.