计算机科学 > 机器学习
[提交于 2026年2月5日]
标题:AnCoder: Anchored Code Generation via Discrete Diffusion Models
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要:Diffusion language models offer a compelling alternative to autoregressive code generation, enabling global planning and iterative refinement of complex program logic. However, existing approaches fail to respect the rigid structure of programming languages and, as a result, often produce broken programs that fail to execute. To address this, we introduce AnchorTree, a framework that explicitly anchors the diffusion process using structured, hierarchical priors native to code. Specifically, AnchorTree uses the abstract syntax tree to prioritize resolving syntactically and semantically salient tokens, such as keywords (e.g., if, while) and identifiers (e.g., variable names), thereby establishing a structural scaffold that guides the remaining generation. We validate this framework via AnCoder, a family of models showing that structurally anchored diffusion offers a parameter-efficient path to high-quality code generation.
提交历史
来自:Anton Xue[v1] 2026年2月5日 星期四 22:46:43 UTC