Manuscript Offprint

arXiv:2611.06019

Phantom: Temporal Caching for Diffusion Models

Yuzhe Fu, Cong Guo, Zishan Shao, Bowen Duan, Chiyue Wei, Haoxuan Shan, Ting Jiang, Hancheng Ye, Jonathan Ku, Changchun Zhou, Hai "Helen" Li, Yiran Chen

Yuzhe Fu, Cong Guo, Zishan Shao, Bowen Duan, Chiyue Wei, Haoxuan Shan, Ting Jiang, Hancheng Ye, Jonathan Ku, Changchun Zhou, Hai “Helen” Li, and Yiran Chen

Abstract—Diffusion models have become the dominant paradigm for high-quality image generation, but their iterative inference across tens of timesteps incurs substantial computational overhead. Prior accelerators exploit temporal similarity in diffusion models via differential quantization or output sparsity, yet suffer from increased memory footprint, design complexity, and image degradation. In this work, we present Phantom, an algorithm–architecture co-designed accelerator built on temporal caching. We view temporal similarity as differential sparsity: between adjacent timesteps, only a small fraction of tokens (outliers) change significantly. Phantom recomputes only these outlier tokens and reuses the rest from a temporal cache. Phantom runs on standard systolic arrays with lightweight additions: a Phantom Engine at the global buffer that detects outliers and updates the cache as activations stream through, and a condensed pipeline that maps the resulting sparse updates onto dense systolic computation for FC, convolution, and attention layers. Evaluations on modern diffusion models show that Phantom achieves an average 4.0×4.0\times speedup and 5.5×5.5\times energy saving over GPUs and prior accelerators while preserving generation quality.

Index Terms—Diffusion models, temporal caching, differential sparsity, hardware accelerators.

I. INTRODUCTION

Diffusion models have recently emerged as the dominant paradigm for high-quality image generation and power many modern generative systems such as Stable Diffusion [1], [2] and DALL-E [3]. By iteratively refining a latent representation from noise to signal, they achieve photorealistic quality with strong controllability, but at substantial computational cost [4]. As shown in Fig. 1(a), modern diffusion pipelines, like Stable Diffusion 3.5 [2] (SD35), rely on large Transformer-based backbones that must be executed repeatedly across tens of timesteps, making inference compute-intensive [5] and challenging for efficient hardware deployment.

Since each timestep performs only a small refinement over the previous state, activations between neighboring steps tend to be highly similar. This observation has inspired both software and hardware optimizations that exploit temporal similarity. One representative approach is differential quantization (DQ) [6], [7], [10], illustrated in Fig. 1(b). Instead of computing each timestep independently, these methods compute the difference between consecutive steps and quantize the difference values using mixed precision. Because most differences are small in magnitude, they can be represented

using low precision, while large outliers are processed using higher precision. Cambricon-D [6] first realized this with INT4/FP16 arithmetic, while Ditto [7] combines DQ with W8A8 quantization to exploit more low-bit (INT4/INT8) and zero-valued temporal differences.

Differential quantization, however, is fundamentally constrained on two fronts. On the algorithm side, quantization injects numerical noise into a process designed to progressively remove it [11], [12], and since these schemes are training-free and act on dynamic activations, the resulting artifacts become visible on advanced backbones, as shown in Fig. 1(b). On the architecture side, the differential representation must be restored to full precision at every non-linear layer, inflating memory traffic. Meanwhile, mixed-precision execution requires both INT and FP units in the same datapath, and this heterogeneity, together with irregular outlier handling, complicates the hardware and limits scalability across evolving models.

Another class of work exploits temporal similarity as sparsity. To limit quality loss, many algorithm works [13]–[15] use attention-derived scores to select important tokens for recomputation. However, accessing these scores can conflict with fused attention kernels [16], limiting practical speedup: ToCa [14] achieves only 0.98×0.98\times the FlashAttention baseline on DiT-256. Some attention-score-free alternatives [17], [18] avoid this dependency but introduce other trade-offs. For example, random token selection [17] remains compatible with FlashAttention, but it misses highly changed tokens and yields unstable generation quality (35% higher FID on DiT [19]). Existing accelerators do not resolve this tension either: the cost of exposing sparsity still offsets much of the speedup gained from exploiting it. EXION [8] uses approximate attention score to predict sparsity and reuses previous FFN outputs to skip computation (Fig. 1(c)). However, it requires dedicated prediction hardware and triple-buffered weight storage, with 22% area overhead in our evaluation. Preserving generation quality on SD35 also requires conservative sparsity settings, limiting exploited sparsity to ∼\sim32%. Therefore, effective acceleration requires both a low-cost sparsity detection and an execution path that exploits it with modest hardware and quality costs.

To meet both requirements, our key insight is differential sparsity: temporal differences in block inputs serve as a hardware-friendly signal for identifying sparsity. As illustrated in Fig. 1(d), these differences are sparse: only a few tokens change significantly across timesteps, so only these tokens require recomputation while the rest can reuse their previous outputs. Because this signal depends only on block inputs, it can be detected before each block executes with a simple per-token reduction, without accessing attention scores. It also

This work was supported in part by the National Science Foundation under Grant 2625580 and Grant 2616525. (Corresponding author: Cong Guo.)

Yuzhe Fu is with the Department of Computer Science, Duke University, Durham, NC 27708 USA (e-mail: yuzhe.fu@duke.edu).

Cong Guo, Zishan Shao, Bowen Duan, Chiyue Wei, Haoxuan Shan, Ting Jiang, Hancheng Ye, Jonathan Ku, Changchun Zhou, Hai “Helen” Li, and Yiran Chen are with the Department of Electrical and Computer Engineering, Duke University, Durham, NC 27708 USA (e-mail: cong.guo@duke.edu; hai.li@duke.edu; yiran.chen@duke.edu).

Figure

Fig. 1. Overview of accelerator architectures for diffusion acceleration. (a) Overall network architecture of Stable Diffusion 3.5 (SD35) [2]. (b) Differential quantization [6], [7] and (c) output-sparsity architecture [8] used in prior diffusion accelerators. (d) Our proposed differential sparsity paradigm for diffusion acceleration. Images are generated by SD35 based on MSCOCO dataset [9].

exposes more reusable computation: on SD35, differential sparsity yields 63% average sparsity while preserving image quality, approximately twice that exploited by EXION in our evaluation.

Building on this insight, we propose Phantom, a diffusion accelerator that turns differential sparsity into speedup on standard systolic arrays. Rather than relying on heterogeneous mixed-precision datapaths like differential-quantization accelerators [6], [7], [10] or a heavy prediction array [8], Phantom detects outlier tokens on the fly and reuses the remaining activations from a temporal cache, realized as a partition of the existing global buffer rather than a dedicated structure. As a result, Phantom preserves both the original systolic dataflow and full-precision arithmetic, introducing no quantization noise and sustaining generation quality even on the most complex backbones.

However, realizing temporal cache on hardware nevertheless poses its own challenges. Unlike the sequential token accumulation of an LLM KV-cache [20], diffusion activations evolve spatially: as the latent is refined, outliers propagate through transformer blocks and the sparsity pattern shifts from layer to layer. Outliers must therefore be re-identified before every block rather than following a fixed pattern, and the corresponding cache entries updated at irregular locations, neither of which a conventional systolic array can support efficiently.

Phantom addresses this with a lightweight Phantom Engine placed alongside the systolic arrays, where it detects outliers and updates the temporal cache as activations stream past. Built on the same datapath, a condensed pipeline compacts the resulting row-sparse activations across FC, convolutional, and attention layers into dense operands, so that the exposed sparsity translates into speedup on an unmodified systolic dataflow.

Experimental results show that Phantom achieves an average 4.0× speedup and 5.5× energy savings across GPU and accelerator baselines, while maintaining near-baseline generation quality across the evaluated models, offering a favorable trade-off between generation quality and hardware performance.

Figure

Fig. 2. Evolution of diffusion backbones from UNet to Transformer and Multi-Modal DiT.

In summary, this paper makes the following contributions:

  • We identify temporal differential sparsity as a low-cost sparsity signal for diffusion hardware acceleration, and show that only a small fraction of activations need to be recomputed across differential timesteps.
  • We propose Phantom, an algorithm—architecture co-designed accelerator, with a light Phantom engine for streaming sparsity detection and cache management.
  • We develop a Condensed Pipeline that turns these sparse updates into systolic computation across FC, convolution, and attention, without modifying the PE-array dataflow.
  • We implement Phantom and conduct comprehensive evaluations on modern diffusion models, demonstrating significant improvements in performance and memory efficiency compared with prior diffusion accelerators.

References (44)