Error Propagation Mechanisms and Compensation Strategies for Quantized Diffusion

Songwei Liu, Chao Zeng, Chenqian Yan, Xurui Peng, Xing Wang, Fangmin Chen, Xing Mei

TL;DR

Quantizing diffusion models to low bit-widths (like W4A4) drastically accelerates inference but suffers from severe image degradation because quantization errors accumulate across the iterative denoising steps. This paper introduces TCEC (Timestep-aware Cumulative Error Compensation), a theoretical framework that derives the first closed-form solution for this cumulative error and corrects it dynamically during sampling. TCEC achieves significant fidelity gains (e.g., a 1.2 PSNR improvement over SVDQuant on SDXL W4A4) with less than 0.5% computational overhead.

What Problem Does This Paper Address?

Diffusion models (DMs) generate stunning images and videos, but their iterative denoising process is computationally expensive. Post-Training Quantization (PTQ) is a popular remedy that converts weights and activations into low-bit integers (like 4-bit or 8-bit) to speed up hardware execution without costly retraining.

However, DMs present a unique challenge for PTQ: because the generation process relies on sequential, step-by-step noise estimation, a tiny quantization error introduced at step $t$ propagates and amplifies in all subsequent steps. Existing PTQ methods focus almost entirely on minimizing per-step quantization errors in isolation. They ignore the broader trajectory of how these errors compound over time, which fundamentally limits how low we can push the bit-width before the output quality collapses.

Methods

The authors tackle this by mathematically modeling the entire error propagation pipeline, using the popular DDIM solver as a paradigm.

  1. Closed-Form Error Derivation: By applying a first-order Taylor expansion to the denoising trajectory, the authors derived the first closed-form equation to track how individual step errors ($\epsilon_k$) compound into a total cumulative error ($\delta_t$) at any given timestep.
  2. Simplifying the Math (Jacobian Negligibility): Directly computing this exact cumulative error is computationally impossible for real-time inference because it involves complex Jacobian matrices. The authors proved both theoretically and empirically that because diffusion models heavily smooth the input space with noise, the Jacobian term can be safely ignored ($J_{x_t} \approx 0$). This reduces the computational complexity dramatically.
  3. Temporal Locality Approximation: The authors proved a surprising property: the cumulative error at any given step is overwhelmingly dominated by the quantization errors of the two immediately preceding steps. This means they don't need to track the entire generation history—just a tiny window.
  4. Timestep-Aware Online Compensation: The per-step quantization error is modeled as a channel-wise scaling of the quantized model's own output ($K_t \odot \tilde{\mu}_\theta$). The scaling matrices ($K_t$) are pre-computed offline using a small calibration dataset. During live inference, the model uses these matrices to estimate and subtract the cumulative error dynamically at each step.
Visualizing how TCEC corrects the quantized denoising path back toward the full-precision baseline

Datasets

The authors evaluated TCEC across both image and video generation tasks using several standard benchmarks:

  • Calibration Datasets: 1,024 random prompts from the COCO dataset (for image models) and 128 samples from WebVid (for video models) were used to calculate the offline error-scaling matrices.
  • Image Evaluation: Benchmarked using 5,000 prompts from MJHQ-30K and the Densely Captioned Images (sDCI) dataset across SDXL, SDXL-Turbo, and PixArt-$\Sigma$.
  • Video Evaluation: Evaluated on OpenSORA using the VBench benchmark suite.
  • Baseline Comparison: Compared against QNCD using the CIFAR-10 dataset.

Key Insights and Ideas

  • Quantization Error is Not Random: A key "aha" moment in the paper is that quantization noise in diffusion models isn't isotropic white noise. As visualized in the paper, the error maps are highly correlated with the high-frequency structures (like edges and textures) of the image being generated.
  • The Power of Two Steps: Intuitively, one might think correcting cumulative error requires tracking the entire chain of past steps. Proving that a window size of $m=1$ (looking back only two steps) is sufficient to capture the upper bound of error accumulation is what makes this approach practical for real-time deployment.
  • Orthogonality to Existing PTQ: Because TCEC operates as an online correction layer after the noise estimation network, it is completely orthogonal to weight-saving PTQ algorithms like SVDQuant or ViDiT-Q. It fixes the systemic propagation problem rather than trying to perfect individual layer weights.
Error maps showing how quantization errors align with high-frequency image content over time

Key Results

The addition of TCEC consistently pushes low-bit quantized models closer to their unquantized FP16 counterparts:

  • Fidelity Boost: On SDXL under W4A4 quantization, TCEC achieved a 1.2 PSNR improvement over the previous state-of-the-art method, SVDQuant.
  • Video Quality Improvements: When applied to OpenSORA (W4A4), TCEC boosted the VBench Imaging Quality score from 61.07 to 64.97.
  • Negligible Overhead: Because the online correction relies on simple element-wise multiplications of cached latent states, the extra end-to-end latency overhead is less than 0.5%.
  • Resource Efficiency: TCEC-W4A4 enables a 3.5× reduction in memory footprint compared to FP16 models, allowing large models to run efficiently on consumer-grade hardware (like a laptop RTX 4090).
Qualitative comparison showing TCEC preserving fine details and preventing structural distortion compared to other W4A4 methods

Limitations and Future Work

  • Diminishing Returns on Few-Step Models: TCEC's core value lies in mitigating error accumulation. For highly distilled models that generate images in very few steps (e.g., SDXL-Turbo running at 1 or 2 steps), the error doesn't have time to compound significantly. Experiments showed that TCEC provides meaningful gains only when the number of iterative steps is $\ge 3$.
  • Calibration Dependence: Although the authors demonstrate that TCEC is highly robust to domain shifts (e.g., calibrating on WebVid but evaluating on VBench), it still requires an offline calibration phase to compute the timestep-conditioned scaling matrices ($K_t$).

Summary updated

BibTeX
@inproceedings{liu2026error,
  author = {Songwei Liu and Chao Zeng and Chenqian Yan and Xurui Peng and Xing Wang and Fangmin Chen and Xing Mei},
  title = {{Error Propagation Mechanisms and Compensation Strategies for Quantized Diffusion}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=4YIY66tpvQ},
}
Figure