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.
Algebraic Representability as the Limiting Regime of Grokking: An Exactly Solvable Model with Holomorphic Activations
University Paris City & University of Reunion(巴黎城市大学和留尼汪大学);Dipartimento di Fisica e Chimica Emilio Segrè, Università degli Studi di Palermo(巴勒莫大学埃米利奥·塞格雷物理与化学系);Thayer School of Engineering, Dartmouth College(达特茅斯学院塞耶工程学院);EnergyLab, University of Reunion(留尼汪大学能源实验室);PEACCEL, AI for Biologics(PEACCEL,生物制品人工智能)
CleanDiffuser: An Easy-to-use Modularized Library for Diffusion Models in Decision Making
College of Intelligence and Computing, Tianjin University(天津大学智能与计算学部);School of Computer and Information Technology, Shanxi University(山西大学计算机与信息技术学院)
GMem: A Modular Approach for Ultra-Efficient Generative Models
Research Center for Industries of the Future, Westlake University(西湖大学未来产业研究中心);School of Engineering, Westlake University(西湖大学工程学院);Zhejiang University(浙江大学)
EGMOF: Efficient Generation of Metal-Organic Frameworks Using a Hybrid Diffusion-Transformer Architecture
Department of Chemical and Biomolecular Engineering, Korea Advanced Institute of Science and Technology(韩国科学技术院化学与生物分子工程系);Department of Chemistry, University of Toronto(多伦多大学化学系);Vector Institute for Artificial Intelligence(人工智能矢量研究所);Department of Chemistry, Sungkyunkwan University(成均馆大学化学系);Acceleration Consortium(加速联盟);Department of Computer Science, University of Toronto(多伦多大学计算机科学系);Department of Materials Science & Engineering, University of Toronto(多伦多大学材料科学与工程系);Department of Chemical Engineering & Applied Chemistry, University of Toronto(多伦多大学化学工程与应用化学系);Canadian Institute for Advanced Research (CIFAR)(加拿大高级研究 institute (CIFAR));NVIDIA