跳到正文
arXiv cs.CL· Anton Xue, Alan Li, Rahul Saha·· 2 天前AI 评分29

扩散语言模型的多目标少样本提示

Multi-Target Few-Shot Prompting with Diffusion Language Models

AI 导读

研究提出用扩散语言模型进行多目标少样本提示,让示例引导共享画布中多个掩码区域的填充,以解决因果自回归模型难以同时利用左右上下文的问题。团队还通过对画布选择性掩码推导似然比奖励,偏好有示例支持的填充结果。在少样本提示基准和软件重构案例中,示例提升了填充准确率,示例引导在多个设置下带来进一步增益。

正文 · 原文

View PDF HTML (experimental)

Abstract:Few-shot prompting is useful when instructions and rewards are hard to specify. One such application is editing by example, where a demonstrated formatting change or API migration may need to be applied across multiple sites. However, such edits often depend on both left and right context, making generation with causal autoregressive models awkward. We therefore introduce multi-target few-shot prompting with diffusion language models, where examples guide the infilling of multiple masked regions within a shared canvas. To address the known challenge of reliably following demonstrations in few-shot prompting, we further leverage selective masking of the canvas to derive a likelihood-ratio reward that favors example-supported infills. Across few-shot prompting benchmarks and software refactoring case studies, we find that demonstrations improve infilling accuracy, with example guidance yielding further gains in several settings.
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2610.22294 [cs.CL]
  (or arXiv:2610.22294v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.22294

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Anton Xue [view email]
[v1] Thu, 15 Oct 2026 17:44:46 UTC (956 KB)

来源:arXiv cs.CL · arxiv.org