arXiv:2608.22274cs.CLAug 2026

Manuscript Offprint

arXiv:2608.22274

Length-Adaptive Decoding for Masked Diffusion Machine Translation

Yan Zhan, Mengkai Hou, Wanting Zhang, Zhijun Gao

Yan Zhan 1^{1} Mengkai Hou 1^{1} Wanting Zhang 2^{2} Zhijun Gao 1^{1}

1^{1}Peking University 2^{2}BYD Company Limited

Machine translation tests masked diffusion language models (dLLMs) because every source token must be rendered faithfully, while fixed canvas decoding must choose target length before denoising. Existing masked diffusion decoding work mainly studies token unmasking order, leaving this length decision under-explored despite its direct effect on coverage and redundancy. We introduce Entropy-Valley (EV), a training-free length selector that scores candidate target canvases by mean predictive entropy from all-mask forward passes and selects the canvas the backbone is most prepared to fill. Relative to a baseline using training corpus length statistics, EV recovers 64.9%, 65.3%, and 33.0% of the COMET-22 gain from reference target lengths on En→Zh, Zh→En, and En→De. Our diagnostics show that denoising-friendly lengths need not match reference lengths. Evaluation by three translation experts supports the En↔Zh adequacy gains, with stronger evidence on Zh→En. Compared with a LLaMA-3-8B autoregressive (AR) model trained on the same fine-tuning data, the EV system ties on En→Zh and leads on Zh→En; an oracle-length diagnostic further shows that, in this masked diffusion MT setting, deciding which tokens to reveal first matters less than how the target length is supplied.

Contact:

gaozhijun@pku.edu.cn

Code:

github.com/Entropy-Valley/Entropy-Valley

Dataset & Model:

huggingface.co/collections/YanZhanPKU/entropy-valley

Figure

1 Introduction

Pretrained masked diffusion language models (dLLMs) such as LLaDA-8B (Nie et al., 2025) and Dream-7B (Ye et al., 2025) now rival autoregressive (AR) LLMs on open ended generation and reasoning. Machine translation stresses a different part of the model. A translation system must preserve source content, reorder words across languages, choose suitable morphology, and stop at the right length. If the output is too short, content disappears; if it is too long, the model has room to repeat, hallucinate, or dilute the sentence.

The stopping problem is structural in fixed canvas masked diffusion decoding. An AR decoder generates tokens until it emits EOS. A masked diffusion decoder instead receives a target canvas before denoising begins. During supervised training, EOS is placed after that canvas, so at test time the model tends to fill whatever length it is given. Work on masked iterative generation and masked diffusion decoding often asks which positions to reveal first (Chang et al., 2022; Hong et al., 2026; Aman, 2026). Target length is often supplied either by the reference translation length during evaluation or by a single corpus-level source-to-target ratio. The former is an oracle upper bound rather than an inference procedure; the latter imposes one global length rule on sentences with different compression or expansion needs.

Borrowing length machinery from non autoregressive MT is not a clean fit for this setting. Classic systems predict fertilities or target lengths, sometimes with a small length beam (Gu et al., 2018; Ghazvininejad et al., 2019), or change the decoder into an insertion and deletion architecture (Gu et al., 2019). Those options are reasonable when the model is trained for that purpose, but they do not answer a narrower question: whether a pretrained decoder only masked diffusion backbone can select its canvas at test time without another model or another training objective. Static corpus ratios have the opposite problem. They are easy to deploy, but one ratio cannot account for source sentences with placeholders, numbers, short commands, and idiomatic compression.

Figure 1 shows why this is not a bookkeeping detail. For the source sentence “Tap Reset Now.”, the ratio baseline chooses five target slots and drops the action verb; EV chooses six slots and recovers the verb. For “Under #PRS_ORG#, tap Sign out.”, the shorter canvas loses the placeholder, while the EV canvas preserves it. These are ordinary translation failures: the reader loses an action, an entity marker, or both. They arise before any question about the order in which masks are revealed.

Case 1: Too short canvas drops the action
Source (EN)Tap Reset Now.Fixed Ratio (selected length=5)Entropy-Valley (selected length=6)
Output (ZH)现在。COMET 0.47Output (ZH)点击重圈。COMET 0.91
Reference (ZH)现在点击重圈。Missing Action VerbPreserve Action
One extra canvas slot preserves the main action.
Case 2: Too short canvas loses placeholder
Source (EN)Under#PRS_ORG#, tap Sign out.Fixed Ratio (selected length=10)Entropy-Valley (selected length=12)
Output (ZH)在私人组织下按退出。Output (ZH)在#PRS_ORG#,按下退出。COMET 0.87
Reference (ZH)在#PRS_ORG#,点击退出。Missing #PRS_ORG#Preserve Placeholder
Enough canvas length helps preserve literal source tokens.
Case 3: EV fails when the best length is outside its range
Source (EN)Please give me a moment.Fixed Ratio (selected length=6; matches reference)Entropy-Valley (selected length=7)
Output (ZH)请等一下。Output (ZH)请给我一会儿。COMET 0.77
Reference (ZH)请等我一下。Concise and CorrectGrid OvershootsTrue Ratio EV Grid Range0.5 0.6 0.7 0.8 0.9 1.0
EV is limited by its candidate length range.

Figure 1 Three En→Zh cases decoded with 32 denoising steps. A short canvas can drop an action verb or a required placeholder; EV chooses a longer canvas in these two cases and recovers the missing content. The third case shows the opposite boundary: the best compression lies below the EV candidate range, so the ratio baseline is better.

The same pattern appears beyond these examples. On WMT22 En→Zh, EV raises placeholder retention from 66.9% to 89.1% and number retention from 77.6% to 81.3% over the ratio baseline (Appendix D). The gain is not just longer output. The right length depends on the source sentence: some inputs need extra room to preserve a placeholder, while high compression cases need a shorter canvas than our current candidate range provides. This points to length selection, not length inflation.

The model already exposes a useful signal before any token is generated. On an all-mask canvas, each candidate length induces a predictive distribution over every target slot. A canvas that is too short must compress too much source content into too few target slots; a canvas that is too long creates extra positions for which the model has no confident token choice. Mean predictive entropy provides a direct way to compare candidate lengths before spending the full decoding budget. Because this signal comes from the translation model itself, it avoids both reference lengths and a separately trained length predictor.

Our approach is to ask the frozen backbone which canvas it is most prepared to fill. Given a source sentence, Entropy-Valley (EV) forms a small set of candidate canvas lengths, runs one all-mask forward pass for each candidate, and scores the canvas by mean predictive entropy. EV then decodes on the canvas with the lowest mean entropy. The method adds no trainable parameters and does not use reference lengths, development set tuning, or an external length predictor. Its target is not exact reference length prediction; it chooses a length that the masked diffusion model can denoise well.

We make four contributions in this LLaDA-8B LoRA-SFT masked diffusion MT setting.

  1. We identify target length selection as a measurable bottleneck in fixed canvas masked diffusion MT and include a controlled comparison with decoding-order choices under matched budgets.

  2. We introduce Entropy-Valley, which requires no additional training and uses entropy on all-mask canvases to choose a canvas the backbone can denoise well.

  3. We show across En→Zh, Zh→En, and En→De that EV recovers 64.9%, 65.3%, and 33.0% of the COMET-22 improvement obtained by supplying reference target lengths, while not simply matching those lengths.

  4. We test the length selection finding with statistical tests, bidirectional expert human evaluation, coverage and error type analysis, a matched data LLaMA-3-8B AR baseline, reveal-order controls, and cross backbone checks on DreamBase and DiffuLLaMA.