SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2601.22527 · 2026

ρ-EOS: Training-free Bidirectional Variable-Length Control for Masked Diffusion LLMs

Jing Shao, Yuxian Jiang, Jingyi Yang

arXiv · PDF · Open in the Atlas

Code that ran

7 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, 0 violated it and 1 has no contract verdict; 4 failures of our instrument; 6 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/2601.22527.json · badge: /api/ran/2601.22527.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
yjyddq/rho-EOS canonical (classifier label)
classifier basis: census
7 ran · 6 no recorded run
FunctionStatusWhere it lives
E_factor_func Ran
ran on a synthesized input
yjyddq/rho-EOS/models/LLaDA_rho_EOS.py
code served (permissive licence) · get_code("e375378cea3801dd")
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 tuple, ndim 2, dtype family int; no output shape is stated. The image it ran in was 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

torch.manual_seed(0)

ARGS = {
    "density": torch.tensor([0.05, 0.5, 0.85, 0.95], dtype=torch.float32),
    "base_expansion_factor": 8,
    "scheduler": "exp",
    "low_density_threshold": 0.2,
    "high_density_threshold": 0.8,
    "density_interval": 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 tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
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
add_gumbel_noise Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yjyddq/rho-EOS/models/LLaDA_rho_EOS.py
code served (permissive licence) · get_code("2eceb68d6f6d3d37")
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)

# Create a small logits tensor (batch_size=2, num_classes=4)
logits = torch.randn(2, 4, dtype=torch.float32)

# Create a temperature value for Gumbel noise
temperature = 0.5

ARGS = {
    "logits": logits,
    "temperature": temperature,
}
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
causal_attention_bias Ran
ran, honoured the contract we drafted
yjyddq/rho-EOS/dllm_eval/models/modeling_llada.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from hed-ucas/Layer-wise-Learning-Rate, is pointer only (licence: NONE) · get_code("f9abf6d74699cc1c")
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 hed-ucas/Layer-wise-Learning-Rate, 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.

get_sample_size Ran
ran, honoured the contract we drafted
yjyddq/rho-EOS/dllm_eval/evaluator_utils.py
code served (permissive licence) · get_code("00f5e7d9ee6636ba")
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 int, ndim 0, dtype family int, 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 math
from typing import List, Optional, Tuple, Union

class MockTask:
    def __init__(self):
        self.eval_docs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

task = MockTask()

ARGS = {
    "task": task,
    "limit": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
hash_args Ran
ran; our contract draft was wrong, not the code
yjyddq/rho-EOS/dllm_eval/api/model.py
code served (permissive licence) · get_code("20a7cc804eb22661")
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 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 hashlib
import json

# Construct valid arguments for hash_args function
# The function takes attr (attribute name) and args (tuple/list of arguments)
# and creates a JSON string to hash

attr = "test_attribute"
args = ("value1", 42, [1, 2, 3], {"key": "value"})

ARGS = {
    "attr": attr,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — 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
parse_eval_args Ran
ran; our contract draft was wrong, not the code
yjyddq/rho-EOS/dllm_eval/__main__.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from BatsResearch/crosslingual-test-time-scaling, is pointer only (licence: NONE) · get_code("400ea4f64ccce5ef")
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 BatsResearch/crosslingual-test-time-scaling, 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.

request_caching_arg_to_dict Ran
ran; our contract draft was wrong, not the code
yjyddq/rho-EOS/dllm_eval/evaluator.py
code served (permissive licence) · get_code("c44830a7722ff5f7")
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 dict. 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

ARGS = {
    'cache_requests': '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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
add_gumbel_noise Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/models/LLaDA.py
code served (permissive licence) · get_code("3d179b42fcc82ef2")
How it ran

no invocation recorded.

count_potential_eos Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/models/LLaDA.py
code served (permissive licence) · get_code("814ba19c40f77295")
How it ran

no invocation recorded.

generate Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/models/LLaDA_rho_EOS.py
code served (permissive licence) · get_code("f00cde97932a227e")
How it ran

no invocation recorded.

generate Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/models/LLaDA_DAEDAL.py
code served (permissive licence) · get_code("2915ef0df5c62d3f")
How it ran

no invocation recorded.

get_num_transfer_tokens Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/models/LLaDA.py
code served (permissive licence) · get_code("e0d3b8594adea583")
How it ran

no invocation recorded.

try_parse_json Not yet run
unverified (harvested, no recorded run)
yjyddq/rho-EOS/dllm_eval/__main__.py
code served (permissive licence) · get_code("06b670bf334b8d88")
How it ran

no invocation 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, 8 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 8 the same month, 7 later) and 5 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
hash_args 44 other papers
37 dated earlier, 2 the same month, 4 later, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2110.04374 (2021-10)
A Few More Examples May Be Worth Billions of Parameters
2303.17003 (2023-03)
Evaluating GPT-3.5 and GPT-4 Models on Brazilian University Admission Exams
and 41 more not named here
request_caching_arg_to_dict 17 other papers
11 dated earlier, 2 the same month, 4 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2411.07176 (2024-11)
More Expressive Attention with Negative Weights
and 14 more not named here
causal_attention_bias 16 other papers
7 dated earlier, 2 the same month, 7 later
2406.10670 (2024-06)
CoLoR-Filter: Conditional Loss Reduction Filtering for Targeted Language Model Pre-training
2409.17146 (2024-09)
Molmo and PixMo: Open Weights and Open Data for State-of-the-Art Vision-Language Models
2410.01380 (2024-10)
Knowledge Entropy Decay during Language Model Pretraining Hinders New Knowledge Acquisition
and 13 more not named here
parse_eval_args 15 other papers
12 dated earlier, 1 the same month, 1 later, 1 undated
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2024.findings-emnlp.86 (2024 (year only))
Tokenization Falling Short: On Subword Robustness in Large Language Models
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
and 12 more not named here
get_sample_size 12 other papers
6 dated earlier, 2 the same month, 4 later
2005.14165 (2020-05)
Language Models are Few-Shot Learners
2405.07938 (2024-05)
EconLogicQA: A Question-Answering Benchmark for Evaluating Large Language Models in Economic Sequential Reasoning
2412.14171 (2024-12)
Thinking in Space: How Multimodal Large Language Models See, Remember, and Recall Spaces
and 9 more not named here
get_num_transfer_tokens 4 other papers
1 the same month, 3 later
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
2602.06462 (2026-02)
Diffusion-State Policy Optimization for Masked Diffusion Language Models
2605.02263 (2026-05)
Break the Block: Dynamic-size Reasoning Blocks for Diffusion Large Language Models via Monotonic Entropy Descent with Reinforcement Learning
and 1 more not named here
try_parse_json 4 other papers
2 dated earlier, 1 the same month, 1 undated
2025.findings-acl.744 (2025 (year only))
Ranked Voting based Self-Consistency of Large Language Models
2502.05171 (2025-02)
Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
and 1 more not named here
add_gumbel_noise 3 other papers
1 the same month, 2 later
2601.02236 (2026-01)
CD 4 LM: Consistency Distillation and aDaptive Decoding for Diffusion Language Models
2602.06462 (2026-02)
Diffusion-State Policy Optimization for Masked Diffusion Language Models
2606.18195 (2026-06)
Learning from the Self-future: On-policy Self-distillation for dLLMs

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

Beyond parallel generation and global context modeling, current masked diffusion large language models (masked dLLMs, i.e., LLaDA) suffer from a fundamental limitation: they require a predefined, fixed generation length, which lacks flexibility and forces an inevitable trade-off between output quality and computational efficiency. To address this, we study the denoising dynamics and find that the implicit density (ρ) of end-ofsequence (EOS) tokens serves as a reliable signal of generation sufficiency. In particular, the evolving implicit EOS density during denoising reveals whether the current masked space is excessive or insufficient, thereby guiding the adjustment direction for generation length. Building on this insight, we propose ρ-EOS, a training-free, singlestage strategy that enables bidirectional variablelength generation for masked dLLMs. Unlike prior two-stage approaches-which require separate length adjustment and iterative mask insertion phases while supporting only unidirectional expansion-ρ-EOS achieves bidirectional length adjustment within a unified denoising process by continuously estimating the implicit EOS density: excessively high density triggers MASK token contraction, while insufficient density induces expansion. Extensive experiments on mathematics and code benchmarks demonstrate that ρ-EOS achieves comparable performance while substantially improving inference efficiency and token utilization. Code is available at https://github.com/yjyddq/rho-EOS.

For agents

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

get_harvested_code_for_paper("2601.22527")
get_code_for_paper("2601.22527")
have("2601.22527")

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

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

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

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

Connect an agent — have() is free.