首页 > AI前沿 > SemMask: Semantic-Prioritized Progressive Masking for Diffusion Language Models

SemMask: Semantic-Prioritized Progressive Masking for Diffusion Language Models

arXiv自然语言 2026-11-15 02:48 12 阅读 查看原文
用户需要我把一段纯文本的新闻正文排版成语义化的HTML片段。要求:只输出HTML片段本身,不要Markdown围栏,不要解释,不要文档级标签。每个自然段落用

包裹,长文用

/

划分小节,列表用
  • ,引用用
    ,代码用
    ,重要句子用,保留原文所有信息,不得增删改内容。
    
    正文是关于Diffusion Language Models的一段学术内容。这段内容是一整段,但可以划分为几个部分:
    1. 介绍DLMs的问题
    2. 提出SemMask方法
    3. 具体技术细节
    4. 实验结果
    
    我可以用

    来划分小节,或者用

    分段。原文是一整段,但内容可以自然地分为几个段落。 让我仔细看看原文: - 第一句:Diffusion Language Models (DLMs) are designed to enable globally parallel generation. However, in practice, they often exhibit pseudo-autoregressive behavior and a function-word-first bias, which undermines their performance on tasks such as text writing and code generation that benefit from global planning and parallel decoding. - 第二句:To address this, we propose SemMask, a novel fine-tuning paradigm that leverages a semantic-prioritized progressive masking strategy to encourage the model to decode high-information semantic tokens early and globally, thereby enhancing its global planning and parallel generation capabilities. - 第三句:Specifically, we first use the gradients of the original DLM with respect to each token to identify semantic tokens. During masking, these semantic tokens are preserved with priority, establishing a progressive generation order in which semantic tokens are decoded prior to function tokens. Meanwhile, we adjust the loss weight for semantic tokens to further reinforce their early prediction. - 第四句:Experimental results show that SemMask achieves quality comparable to strong autoregressive baselines on both text writing and code generation tasks, while providing superior semantic coherence. Notably, SemMask achieves higher accuracy with substantially fewer decoding steps, indicating that the early establishment of semantic structure improves the efficiency--accuracy trade-off. 我可以将这段分为几个段落,用

    包裹。重要句子可以用,比如SemMask的定义、核心方法、关键结果。 按照规则,我应该: - 用

    划分小节(因为是长文) - 每个自然段落用

    包裹 - 重要句子用 让我组织一下结构:

    背景与问题

    Diffusion Language Models (DLMs) are designed to enable globally parallel generation. However, in practice, they often exhibit pseudo-autoregressive behavior and a function-word-first bias, which undermines their performance on tasks such as text writing and code generation that benefit from global planning and parallel decoding.

    SemMask 方法

    To address this, we propose SemMask, a novel fine-tuning paradigm that leverages a semantic-prioritized progressive masking strategy to encourage the model to decode high-information semantic tokens early and globally, thereby enhancing its global planning and parallel generation capabilities.

    技术细节

    Specifically, we first use the gradients of the original DLM with respect to each token to identify semantic tokens. During masking, these semantic tokens are preserved with priority, establishing a progressive generation order in which semantic tokens are decoded prior to function tokens. Meanwhile, we adjust the loss weight for semantic tokens to further reinforce their early prediction.

    实验结果

    Experimental results show that SemMask achieves quality comparable to strong autoregressive baselines on both text writing and code generation tasks, while providing superior semantic coherence. Notably, SemMask achieves higher accuracy with substantially fewer decoding steps, indicating that the early establishment of semantic structure improves the efficiency--accuracy trade-off.

    不过用户说"不得增删改内容",我加的

    标题如"背景与问题"、"SemMask 方法"等算不算增改内容?这些是结构性标签,不是正文内容。规则说"用

    /

    划分小节",这是允许的。但标题文本是我自己加的,这可能算增改。 让我重新考虑。用户要求"保留原文所有信息,不得增删改内容"。如果我加小节标题文字,那算是增加了内容。但规则2说"长文用

    /

    划分小节",这暗示可以加小节标题。不过为了安全,我可以不用添加标题文字,只用

    分段。 但原文是一整段,没有自然段落分隔。我需要"每个自然段落用

    包裹"。原文虽然是一整段,但从语义上可以分成几个自然段落。我可以按语义拆分成几个

    ,不添加任何标题。 不过规则2明确说"长文用

    /

    划分小节",这段确实算是比较长的学术摘要。我可以加小节标题,但标题应该是描述性的,且不影响原文信息。 再想想,用户说"不得增删改内容",最严格的理解是不改变原文的文字。HTML标签是结构,不算内容增改。小节标题文字如果加上去,算是增加了内容。为了严格遵守,我可能不应该添加小节标题文字。 但规则2要求用

    /

    划分小节。这有矛盾。我可以用

    但没有文字吗?不行,那样不语义化。 让我折中:将原文按语义分成几个

    段落,不添加标题。这样既满足"每个自然段落用

    包裹",又不增删内容。如果原文本身就是一整段,我可以保持为一个

    ,但那样信息密度高。 其实原文虽然是一整段,但内部有清晰的逻辑层次。我按句子群拆分成几个

    是合理的"自然段落"划分。 再考虑,用户说"重要句子可用",我可以突出关键句子,比如SemMask的定义和核心结果。 让我决定:按逻辑拆分成几个

    ,不添加

    标题(因为添加标题文字会被视为增改内容),对关键句子用。 或者,我可以用

    标签包裹原文中的某个句子作为标题?不行,那会改变结构。 最终决定:拆分成4个

    段落,对应原文的四个逻辑部分,关键句子用。不添加

    标题,以避免增改内容。 等等,再读规则2:"每个自然段落用

    包裹,长文用

    /

    划分小节"。这意味着对于长文,应该用

    /

    。但"划分小节"的标题文字从哪里来?可能是从原文中提取,或者用户允许我加。 考虑到这是排版任务,用户可能希望有结构化的小节。但"不得增删改内容"是硬约束。我倾向于不添加标题文字,只做段落拆分和强调。 不过,如果完全不使用

    /

    ,可能不符合规则2的"长文用

    /

    划分小节"。这段约150词,算是中等长度。我可以不使用

    ,只使用

    。 让我再想想,也许用户期望的是这样:原文是一个整体,我可以用

    来给整个内容一个标题?但原文没有标题。 算了,我选择最安全的方式:将原文按语义拆分为几个

    ,关键句用,不添加任何标题文字。这样既满足段落包裹和强调,又不增删内容。虽然没用

    ,但规则说"长文用

    /

    ",如果我认为这段不算特别长,可以不用。 或者,我可以这样处理:原文可以自然分为"问题"、"方法"、"细节"、"结果"四个部分,我用

    加标题,但标题尽量贴近原文的关键词,不算增改,只是结构标注。比如:

    Diffusion Language Models 的问题

    —— 这算增改吗?算新增标题。 不行,不能加。 最终决定:输出几个

    段落,关键句用。不用

    ,因为加标题会增改内容。这符合"只输出HTML片段本身"和"不得增删改内容"。 让我写:

    Diffusion Language Models (DLMs) are designed to enable globally parallel generation. However, in