acceptodds
Under review as a conference paper at ICLR 2027

Locate, Mask, and Regenerate: Parser-Guided Self-Repair for Structured Generation with Diffusion Language Models

Abstract

Diffusion language models (DLMs) have attracted growing attention as promising backbones for large language model (LLM)-based agents due to their capabilities for parallel generation and partial revision. To interact successfully with external environments, these agents must reliably generate structured outputs that conform to strict syntactic rules. However, we consistently observe low parsing success rates across a range of structured generation tasks, with further declines as the number of denoising steps decreases. To address this issue, we introduce a new post-generation strategy, namely Parser-Guided Self-Repair (PGSR), which reinterprets the parser feedback as an explicit localization signal for selective refinement. Using the parser-reported error position as an anchor, PGSR remasks a small surrounding span and reconstructs it through DLM infilling. It is designed to perform localized repair without additional training and to generalize across diverse structured output domains in a format-agnostic manner. We conduct comprehensive experiments with LLaDA-8B and Dream-7B across four structured generation tasks: tool calling, code generation, text-to-structured query language (SQL), and molecular generation. Experimental results demonstrate that PGSR consistently improves both structural validity and downstream task performance across different denoising budgets. It is also confirmed that the proposed approach is compatible with existing decoding strategies, yielding further gains when combined with constrained decoding.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
diffusion language models, structured output, llm-based agents

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_FX8UOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper focuses on improving the structured-generation capability of diffusion language models (DLMs). By using additional feedback information from structured-language parsers, the authors propose a new strategy called parser-guided self-repair (PGSR), so that the DLM can ideally fix its mistakes by regenerating correct tokens in place. Since the regeneration only happens within a limited window around the parser-flagged position, it is considered a more effective and precise self-refining approach that could strengthen the DLM's structured output reliability coupled with its parallel decoding efficiency. Across two DLM architectures and four benchmarks, the experiments show that PGSR provides nontrivial performance increases. With different decoding budgets, PGSR also shows superior latency compared with other baselines in analytical experiments.

Critical strengths
  • Compared with complete regeneration, this PGSR is parser-grounded and ideally more efficient in terms of in-place fixing of its own mistakes. The parallel decoding nature of DLMs further makes iterative repair cheaper and practical.
  • The proposed PGSR method is empirically transferable across different domains, including tool calling, SQL queries, molecular, and code generation.
  • The method is training-free and low-latency, which unveils the DLM's potential for reliable and robust structured content generation for applications in real agentic environments.
Critical weaknesses
  • PGSR performs repair only around the malformed position with a fixed-size window controlled by the hyperparameter ww. Although in Section 5.4, the authors have analyzed the sensitivity of this parameter choice, there is no guarantee of the size of the malformed region at test time, which may potentially weaken the effectiveness of this method beyond the benchmarks.
  • It seems that PGSR only supports in-place replacement as the primary way to repair malformed structured output. However, in other cases, e.g., deleting redundant tokens or inserting new tokens, PGSR would be unable to fix the errors.
  • Given that the autoregressive LM, Qwen2.5-7B, can achieve accuracy of 97.8–99.9% (as reported in Figure 1), PGSR would need about 64 steps to match the performance (in Table 4), which suggests that DLMs still have some fundamental limitations that PGSR has not solved.
Questions for authors
  • Can structured-language parsers reliably and accurately point out the position where repair is needed? Since this is the critical signal that PGSR relies on, a misalignment between the parsing failure position and the true source of the error may greatly impact the effectiveness of PGSR.
  • PGSR seems inadequate when incorrect structured output needs to add or remove some tokens. How does PGSR handle these cases?
  • When compared with AR models, is PGSR with different decoding budgets worse, equal, or better in terms of accuracy, parsing rate, and latency?
Reviewer_dGdBOpenReview ↗
Rating
3(+1)
Confidence
4
Informativeness
2
Presentation
3
Soundness
3
Read review
Paper summary

This paper identifies structural invalidity as a major bottleneck for diffusion language models under small denoising budgets and proposes Parser-Guided Self-Repair (PGSR), a training-free post-generation repair method. PGSR uses the parser-reported error position to remask a small local span and reconstructs it through DLM infilling, repeating the procedure until parsing succeeds or the repair budget is exhausted.

Critical strengths
  1. PGSR is simple and intuitive, using parser feedback to localize errors and the native infilling capability of DLMs to repair them. The method is fully training-free and requires neither repair-specific supervision nor additional parameter updates.
  2. The gains are largest under small denoising budgets, where efficient DLM decoding is most useful and structural failures are most severe.
Critical weaknesses
  1. The technical novelty is moderate, as PGSR mainly combines standard parser diagnostics with the existing infilling capability of DLMs.
  2. The theoretical analysis is limited to a simple computation bound and provides no guarantee of repair success, semantic preservation, or convergence.
  3. The method assumes that the parser-reported failure position is close to the true error, which may not hold for long-range structural dependencies.
  4. The evaluation lacks a compute-matched full-regeneration or parser-feedback retry baseline, despite presenting such approaches as key alternatives.
Questions for authors
  1. The benefits of the proposed method appear to be limited to a subset of structured or code-generation scenarios, raising concerns about its generalizability. Could the framework be extended to incorporate other forms of feedback, such as environment feedback, verifiers for mathematical reasoning, or LLM-based judges?
  2. The core idea of PGSR resembles the feedback-driven correction paradigm used by agentic methods such as ReAct, but the paper considers only parser-guided repair. Could the authors compare PGSR with representative agent-based self-correction baselines to determine whether it offers unique advantages for diffusion language models?
Reviewer_kQyQOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This paper introduces Paser-Guided Self-Repair (PGSR), a post-generation framework, for improving the structural reliability of discrete language model outputs. PGSR uses parser error feedback to repair invalid sections through targeted regeneration. Experiments show improved performance of PGSR in code generation, SQL, and molecular generation.

Critical strengths

The paper considers a timely and important question. The reported performance is very good.

Critical weaknesses

There is no ablation study -- it seems hard to assess which factor contributes the most in the performance improvement in the analysis.

Why the proposed procedure work? It seems hard to understand from the current brief description. If there is more evidence, like theoretical analysis, to justify, the results would be much strengthened.

Questions for authors

My questions would be if it is possible to further address the critical weaknesses mentioned.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.