基於策略性去噪與重新遮罩的擴散學習

Diffusion Learning via Strategic Denoising and Remasking

檔案

全文將於 2031年7月2日 起公開。

日期

2026

類型

語言

英文

摘要

近年來,大型語言模型在自然語言理解、推理與文字生成任務上展現出優異能力,其中自迴歸
式模型長期以來是離散序列生成的主流方法。然而,自迴歸模型必須依照由左至右的順序逐步產生
token,使其生成過程受到序列化限制,且早期錯誤容易影響後續輸出。相較之下,離散擴散模型可
從被遮罩或破壞的序列出發,透過多次去噪步驟逐漸還原完整輸出,因而具有非自迴歸生成、平行
更新與迭代修正的潛力。
在遮罩式擴散語言模型中,模型透過遮罩部分 token 並學習還原原始序列來建立生成能力;推
論時,模型從大量遮罩 token 出發,逐步填補遮罩位置直到產生完整序列。為使模型具備修正能力,
remasking 機制被引入解碼過程,允許已生成的 token 重回遮罩狀態,並於後續步驟重新生成。
然而,denoising 與 remasking 在解碼軌跡中扮演不同的角色:denoising 為遮罩位置填入
token,增加序列的可見資訊;remasking 則移除已生成的可見 token,改變後續去噪步驟所能利用
的上下文。兩者的決策相互影響——某次修正是否有益,往往需要觀察後續整體生成結果才能判斷,
無法僅從局部信心分數得知。現有 remasking 方法多依賴人工設計的規則或局部信心分數來決定哪
些 token 應被重新遮罩,但局部看似不確定的 token 不一定導致最終錯誤,而局部看似合理的
token 也可能使後續生成偏離正確答案。
本研究提出 Denoising and Remasking Policy Optimization(DRPO),一個針對遮罩式擴散
語言模型的學習框架,用以共同最佳化 denoising 與 remasking 行為。DRPO 的核心概念是明確區

分兩種行為的不同性質,並以不對稱的方式分別學習:denoising 是建構性的生成動作,而
remasking 是修正性的修訂動作,因此不應以相同的標準評估兩者的決策品質。
現有的 remasking 方法大致可分為兩類。第一類為推論時修正方法,直接在解碼過程中加入修
正規則,無需額外訓練。這類方法包括以信心閾值決定是否重新遮罩的 token 驗證機制,以及透過
固定排程或回溯策略調整採樣軌跡的程序式修正方法,其優點在於可直接套用於已訓練好的模型,
但修正規則由人工設計,無法根據任務結果自動調整。第二類為可學習式方法,透過訓練模型或輔
助模組,使其能從生成錯誤中學習識別需要修正的 token,例如利用自身生成的錯誤作為監督信號
來估計各位置的生成品質。然而,這類方法的學習目標仍停留在局部 token 品質,並未直接評估某
次修正是否能改善後續的整體生成結果。兩類方法的共同限制在於,修正決策皆基於局部狀態的評
估,而非透過比較「修正」與「保留」兩種選擇在相同狀態下的最終輸出差異來直接學習修正的長
期效益。
具體而言,本研究首先透過監督式預訓練,使 remasking 模組具備基礎的局部錯誤偵測能力;
接著利用 rollout-based 最佳化,從相同的中間解碼狀態產生多個生成分支,其中包含一個強制保
留所有已生成 token 的不重新遮罩分支作為比較基準。透過比較各分支的最終任務結果,DRPO 對
denoising 與 remasking 分別建立不同的學習信號:denoising 根據所有分支的相對優劣進行更新,
而 remasking 則僅在對應分支優於不重新遮罩基準時才被強化,並對過度修正加以懲罰。
實驗結果顯示,DRPO 在數學推理任務上帶來最為明顯的改善,在一般語言理解任務上亦維持穩
定表現。進一步分析顯示,DRPO 所學習的 remasking 政策能以較少的修正次數達到更高的準確率,
說明學習式的修正決策比固定規則更具選擇性。總結而言,本研究將 denoising 與 remasking 整
合為可共同學習的解碼政策,使模型能從任務結果中學習何時、以及如何進行修正,為非自迴歸文
字生成模型的自我修正能力提供新的研究方向。
Large language models have achieved strong performance across natural
language understanding, reasoning, and generation, but most rely on
autoregressive decoding, where tokens are generated sequentially. This limits
parallelization and makes later outputs highly dependent on earlier predictions.
Discrete diffusion language models offer an alternative by generating text through
iterative denoising from masked or corrupted sequences, enabling parallel token
updates and revision of intermediate outputs.
Remasking allows generated tokens to be returned to the mask state and
regenerated in later decoding steps. Existing remasking methods fall into two
categories: inference-time methods that apply fixed or confidence-based
heuristics without task-level supervision, and trainable methods that learn revision
behavior from data but do not connect remasking decisions to final generation
quality. This thesis studies how remasking can be jointly optimized with
denoising through outcome-level feedback.
A key challenge is that denoising and remasking play structurally different
roles. Denoising fills masked positions to extend the visible context, while
remasking returns visible tokens to the mask state, altering the future decoding
trajectory. These different consequences call for different learning signals.
Moreover, the benefit of a remasking decision cannot be determined from local
token confidence alone: a plausible token may still steer generation in the wrong
direction over a full decoding trajectory.
We propose Denoising and Remasking Policy Optimization (DRPO), which
jointly optimizes these two decisions using rollout-based feedback. DRPO adds a
remasking policy head to a masked diffusion language model and trains in two
stages: a warmup stage that provides supervised initialization using confidence
signals from a frozen model, and a rollout stage that applies outcome-guided
optimization. Multiple rollout branches—including a no-remask branch that
forces all eligible tokens to be kept—are generated from the same intermediate
decoding state. Denoising decisions are updated with group-relative advantage
across all branches; remasking decisions are updated with keep-relative advantage,
measuring improvement over the forced-keep baseline. This asymmetric design
reflects the distinct functional roles of the two actions.
Experiments on mathematical reasoning show that DRPO improves over
both the base diffusion model and supervised fine-tuning, with clearer gains on
harder problems. DRPO also uses fewer remasking steps than heuristic baselines
while achieving stronger results, indicating that learned remasking is more
targeted than confidence-based approaches. These results demonstrate that
optimizing the collaboration between denoising and remasking as a joint policy
provides a practical path toward reliable non-autoregressive text generation.

所屬典藏

電機工程學系
顯示完整詮釋資料 統計資料

引用此條目

Tsai, M.-Y. (2026). Diffusion Learning via Strategic Denoising and Remasking. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/90583

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/90583