arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.17673cs.LG
收藏

扩散模型的掌握:模块加法的案例研究

A Mechanistic Study of Algorithmic Generalization in Diffusion Models on Modular Arithmetic

Department of Computer and Information Science(计算机与信息科学系)

Joon Hyeok Kim, Yong-Hyun Park, Mattis Dalsætra Østby, Jiatao Gu

AI总结:

研究扩散模型在模块加法任务中展现的延迟泛化现象,揭示其内部计算机制,通过单图像和多样本两种数据 regime 分析模型的算法学习过程。

摘要:

尽管在经验上取得了成功,扩散模型的泛化能力从机制上仍不明确。我们证明了使用流匹配目标训练的扩散模型在模块加法任务中表现出“掌握”——在过拟合后出现的延迟泛化——使能对内部计算进行受控分析。我们跨两个数据 regime 研究这一现象。在单图像 regime 中,机制性解剖揭示模型通过组合单个操作数的周期性表示来实现模块加法。在具有高类内变化的多样本 regime 中,我们发现模型利用其迭代采样过程将任务分为算术计算阶段和视觉去噪阶段,通过一个临界时间步阈值分隔。我们的工作提供了扩散模型中算法学习的机制性分解,揭示了这些模型如何在连续像素空间生成和离散符号推理之间架起桥梁。

英文摘要:

Despite their empirical success, how diffusion models generalize remains poorly understood from a mechanistic perspective. In this work, we provide a controlled mechanistic account of algorithmic learning in diffusion models. By utilizing the grokking phenomenon on an image-based modular addition task as a tractable testbed, we dissect the model's internal dynamics across two distinct visual regimes. In a single-image regime, mechanistic dissection reveals that the model implements modular addition by encoding operands as periodic representations and composing them at the self-attention--feedforward interface in a way that recovers the trigonometric addition identities. In a diverse-image regime with high intraclass variability, we find that the iterative sampling process partitions the task into an arithmetic computation phase and a subsequent visual refinement phase, with their transition precisely captured by an internal frequency-entropy signal. Together, our analysis clarifies the mechanics of algorithmic generalization of diffusion models in a controlled setting, while leaving open how broadly these mechanisms transfer beyond modular addition.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑