Table of Contents
Fetching ...

Temporal Score Analysis for Understanding and Correcting Diffusion Artifacts

Yu Cao, Zengqun Zhao, Ioannis Patras, Shaogang Gong

TL;DR

This work analyzes diffusion model artifacts through the lens of temporal score dynamics, revealing three generation phases and pinpointing artifacts to the Mutation phase via score traps. It introduces ASCED, an unsupervised, in-process detector that identifies abnormal score dynamics and a Trajectory-aware Targeted Correction that perturbs only artifact regions during diffusion, preserving diversity elsewhere. Across multiple datasets, ASCED matches or surpasses supervised baselines while offering faster inference and training-free applicability. The combination of real-time detection and on-the-fly correction demonstrates practical improvements in artifact reduction and latent representation quality, with insights into optimal correction timing and safe operation in non-artifact regions. Overall, the approach provides a principled, domain-general method to mitigate diffusion artifacts without post-hoc processing, enabling more reliable diffusion-based generation in diverse applications.

Abstract

Visual artifacts remain a persistent challenge in diffusion models, even with training on massive datasets. Current solutions primarily rely on supervised detectors, yet lack understanding of why these artifacts occur in the first place. In our analysis, we identify three distinct phases in the diffusion generative process: Profiling, Mutation, and Refinement. Artifacts typically emerge during the Mutation phase, where certain regions exhibit anomalous score dynamics over time, causing abrupt disruptions in the normal evolution pattern. This temporal nature explains why existing methods focusing only on spatial uncertainty of the final output fail at effective artifact localization. Based on these insights, we propose ASCED (Abnormal Score Correction for Enhancing Diffusion), that detects artifacts by monitoring abnormal score dynamics during the diffusion process, with a trajectory-aware on-the-fly mitigation strategy that appropriate generation of noise in the detected areas. Unlike most existing methods that apply post hoc corrections, \eg, by applying a noising-denoising scheme after generation, our mitigation strategy operates seamlessly within the existing diffusion process. Extensive experiments demonstrate that our proposed approach effectively reduces artifacts across diverse domains, matching or surpassing existing supervised methods without additional training.

Temporal Score Analysis for Understanding and Correcting Diffusion Artifacts

TL;DR

This work analyzes diffusion model artifacts through the lens of temporal score dynamics, revealing three generation phases and pinpointing artifacts to the Mutation phase via score traps. It introduces ASCED, an unsupervised, in-process detector that identifies abnormal score dynamics and a Trajectory-aware Targeted Correction that perturbs only artifact regions during diffusion, preserving diversity elsewhere. Across multiple datasets, ASCED matches or surpasses supervised baselines while offering faster inference and training-free applicability. The combination of real-time detection and on-the-fly correction demonstrates practical improvements in artifact reduction and latent representation quality, with insights into optimal correction timing and safe operation in non-artifact regions. Overall, the approach provides a principled, domain-general method to mitigate diffusion artifacts without post-hoc processing, enabling more reliable diffusion-based generation in diverse applications.

Abstract

Visual artifacts remain a persistent challenge in diffusion models, even with training on massive datasets. Current solutions primarily rely on supervised detectors, yet lack understanding of why these artifacts occur in the first place. In our analysis, we identify three distinct phases in the diffusion generative process: Profiling, Mutation, and Refinement. Artifacts typically emerge during the Mutation phase, where certain regions exhibit anomalous score dynamics over time, causing abrupt disruptions in the normal evolution pattern. This temporal nature explains why existing methods focusing only on spatial uncertainty of the final output fail at effective artifact localization. Based on these insights, we propose ASCED (Abnormal Score Correction for Enhancing Diffusion), that detects artifacts by monitoring abnormal score dynamics during the diffusion process, with a trajectory-aware on-the-fly mitigation strategy that appropriate generation of noise in the detected areas. Unlike most existing methods that apply post hoc corrections, \eg, by applying a noising-denoising scheme after generation, our mitigation strategy operates seamlessly within the existing diffusion process. Extensive experiments demonstrate that our proposed approach effectively reduces artifacts across diverse domains, matching or surpassing existing supervised methods without additional training.

Paper Structure

This paper contains 26 sections, 12 equations, 16 figures, 3 tables.

Figures (16)

  • Figure 1: Why do diffusion models generate artifacts? We discover that a diffusion generative process necessarily undergoes three phases, we call them: (2) "Profiling" which recovers holistic mean templates, (2) "Mutation" which introduces local divergence, and (3) "Refinement" which rationalizes pixel-wise generation in spatial context. Four visual examples are shown: The first two rows are two examples of rational local mutations (in green boxes) either naturally integrated (Row 1) or reasonably eliminated (Row 2). The bottom two rows show two failure cases when mutations were trapped unreasonably (in red boxes), resisting refinement and resulting in artifacts. Phases are visualized in equal intervals for clarity; please zoom in for more details.
  • Figure 2: Diagram of our framework. Denoising and Noising are using \ref{['eq:pred_xstart']} and \ref{['eq:forward_sde']}, respectively.
  • Figure 3: Artifact generation through denoising (top) and brush stroke noising via SDEdit meng2021sdedit (bottom), demonstrating the model's inability to distinguish artifacts during generation.
  • Figure 4: Visualization of score dynamics and visual artifact detection.(a) Generated images with detected visual artifact regions highlighted (red). (b) Visualization of score dynamics (normalized) between adjacent time steps as activation maps. Brighter regions (green to yellow) indicate areas of higher score variation, while darker regions (blue to black) show areas of lower score change. (c). Score acceleration curves (representing the rate of change in score dynamics between consecutive timesteps) comparing artifact regions (red) with non-artifact regions (blue). The artifact regions exhibit characteristic rapid acceleration followed by deceleration, while non-artifact regions maintain stable score dynamics over time throughout a generative (inference) process.
  • Figure 5: Qualitative Comparison of different correction methods. For each example, we show the original output with visual artifacts (left) and zoomed-in views of the artifact regions corrected by different methods (right): SARGD zheng2024self, state replacement (Replace), and our trajectory-aware targeted correction (Ours). Rows from top to bottom: FFHQkarras2019style, ImageNetdeng2009imagenet, and LSUN-(Cat, Horse, Bedroom)yu2015lsun.
  • ...and 11 more figures