Wail Bouhedja
Author directory2026
CARVE: Verified Expansion for Variable-Length Generation in Diffusion Language Models
Wail Bouhedja | Amr Mohamed | Guokan Shang
Findings of the Association for Computational Linguistics: EMNLP 2026
Wail Bouhedja | Amr Mohamed | Guokan Shang
Findings of the Association for Computational Linguistics: EMNLP 2026
Masked diffusion language models offer bidirectional conditioning and parallel token refinement, but they inherit a rigid inference interface: the response canvas length is fixed before decoding begins. Choosing this length is difficult. A short canvas can truncate reasoning or code, while a long canvas wastes computation and can perturb denoising. We introduce CARVE (Counterfactual-Aware Reveal with Verified Expansion), a training-free variable-length algorithm for masked diffusion LMs. Instead of blindly expanding the canvas, CARVE branches into a candidate expanded canvas and asks a counterfactual question: would the model make the same predictions for the unresolved tokens if it had more room? The expansion is accepted only when the inserted masks induce low Jensen–Shannon divergence on aligned unresolved positions. This makes length growth a verified stability decision rather than a pure confidence heuristic. CARVE applies without retraining to both full-canvas and blockwise diffusion decoders. Across code generation and mathematical reasoning benchmarks, CARVE achieves the best or tied-best average performance across the evaluated model families, typically winning on three of four tasks per model, while often reducing inference cost and reaching roughly half the FLOPs of fixed-length decoding in some settings.