When Guidance Goes Off-Scale: Recalibrating Diffusion Transformers under Analog Compute-in-Memory Nonidealities
Authors: Wenshuai Yao, Wenyong Zhou
Organizations: School of Integrated Circuits, Peking University, Beijing, China · Department of Electrical and Computer Engineering, The University of Hong Kong, Hong Kong SAR, China
Diffusion Transformers (DiTs) incur high memory traffic and energy costs because sampling repeatedly evaluates large denoisers dominated by linear operations. Analog compute-in-memory (CIM) can alleviate these costs by executing linear operations within weight-storing memory arrays. However, CIM nonidealities perturb effective weights, with errors accumulating along the state-dependent denoising trajectory; their interaction with classifier-free guidance (CFG) remains underexplored. In this paper, we characterize the impact of analog CIM nonidealities on DiT sampling. Although conditional and unconditional predictions can each remain close to their clean counterparts, their difference (the CFG residual) is disproportionately attenuated and rotated. Identifying this residual as a controllable failure channel, we propose a retraining-free, sampler-side recalibration that adjusts only the CFG scale for a given CIM condition. Trajectory-level analysis shows that moderate recalibration strengthens the target-oriented component preserved in the distorted residual, enabling earlier commitment to a prompt-consistent semantic region. In contrast, excessive guidance amplifies the full noisy residual and degrades quality, resulting in a finite, noise-dependent optimum. Extensive experiments on PixArt-Sigma, PixArt-alpha, and DiT-XL/2 show that the optimal guidance scale increases with CIM noise. Using 30,000 samples per condition, guidance recalibration consistently restores generation quality across simulated CIM mappings, closing at least 87% of the CIM-induced FID gap at a CIM noise level of 0.20. It reduces FID from 59.22 to 20.49 on PixArt-Sigma, 72.37 to 21.12 on PixArt-alpha, and 20.89 to 6.62 on DiT-XL/2.
Figures & tables
Figure 1: Qualitative comparison across four prompts. Each triplet shows clean generation, CIM with clean-selected guidance, and CIM with recalibrated guidance.
Figure 2: Hybrid analog CIM deployment. (a) CIM-based matrix multiplication. (b) DiT mapping: linear layers are executed on CIM arrays, while other operations remain digital.
Figure 3: PixArt- Σ generations at 1024×1024 resolution under increasing CIM nonidealities at the clean-selected scale w0=2.0 .
Figure 4: CFG and residual diagnostics under CIM nonidealities. (a) Branch perturbations. (b) Residual rotation. (c) Clean-aligned decomposition. (d–e) Timestep statistics at σCIM=0.20 ; shading indicates 95% confidence intervals.
Figure 5: Conceptual sampling trajectories under (a) clean inference, (b) CIM inference with the clean-selected scale w0 , and (c) CIM inference with the recalibrated scale w⋆ . Shaded contours indicate semantic basins; arrows denote base and guidance updates. Each trajectory segment is the vector sum of the two component arrows.
Model and benchmark
σCIM
CFG w
FID ↓
KID ×103↓
Alignment ↑
Precision ↑
Density ↑
Coverage ↑
PixArt- Σ ( 5122 , COCO)
0 (clean)
1.5
20.51
7.75
30.34
0.550
0.654
0.595
0.05
1.5 ( =w0 )
20.31
7.68
30.31
0.551
0.647
0.582
0.10
1.5 → 2.0
21.12 → 19.98
8.27 → 7.05
30.09 → 30.69
0.513 → 0.552
0.575 → 0.654
0.556 → 0.580
0.15
1.5 → 2.5
28.62 → 20.18
12.85 → 6.87
29.37 → 30.79
0.432 → 0.543
0.423 → 0.628
0.477 → 0.572
0.20
1.5 → 4.5
59.22 → 20.49
30.41 → 6.49
27.32 → 31.17
0.248 → 0.527
0.203 → 0.602
0.292 → 0.560
PixArt- α ( 5122 , COCO)
0 (clean)
1.5
21.63
8.21
29.98
0.545
0.624
0.567
Table 1: Large-scale population-level evaluation across three diffusion transformers and multiple simulated CIM mappings, with 30,000 samples per setting. Noisy entries report w0→wσ⋆ ; a single value is shown when the selected scales coincide. Underlining marks the recalibrated endpoint, and bold marks improvement over the clean-guidance baseline.
Figure 6: Guidance response on a 3,000-prompt PixArt- Σ sweep. (a) FID and (b) CLIPScore versus w . (c) FID at w0 and wσ⋆ .
Figure 7: Qualitative comparisons under CIM noise. Left: PixArt- Σ text-to-image generation at σCIM=0.15 , using w0=1.5 and wσ⋆=2.5 . Right: SD3.5 Medium text rendering at σCIM=0.10 , using w0=1.5 and wσ⋆=3.0 .
Figure 8: Timestep semantic-entry analysis. (a) Ten evenly spaced checkpoints from 20-step predicted-clean trajectories for two prompts; rows show clean inference, CIM with w0 , and CIM with wσ⋆ . (b–d) Prompt retrieval top-1 accuracy across all steps. (e) Persistent semantic-entry indices at θ=0.30 .
Method
σCIM=0.15
σCIM=0.20
Clean-best CFG
44.93
75.94
CFG Rescale
40.40
40.72
APG
39.21
41.08
C 2 FG
38.11
39.52
Limited-Interval Guidance
37.28
38.76
Fixed recalibration (ours)
36.60
37.61
Table 2: FID in the shared 3,000-prompt PixArt- Σ comparison of sampler-side guidance controls.
(a) Endpoint counterfactuals
Metric
Clean
CIM w0
CIM w⋆
Restore u
Restore g
Remove η
Restore α
FID ↓
36.19
75.41
36.64
42.83
68.34
127.75
44.49
CLIP ↑
30.45
27.27
31.27
28.52
28.87
23.23
30.35
DINO-clean ↑
1.000
0.463
0.673
0.621
0.631
0.261
0.699
Table 3: Residual-surgery analysis at σCIM=0.20 over 3,000 prompts. (a) Endpoint counterfactuals. (b) FID along intervention paths from untreated CIM ( 0 ) to the full intervention ( 1 ).
School of Integrated Circuit Science and Engineering, Beihang University, Beijing, China · Zhicun Research Lab, Beijing, China · School of Integrated Circuits, Peking University, Beijing, China +1