Research
TreeQ: Pushing the Quantization Boundary of Diffusion Transformer via Tree-Structured Mixed-Precision Search
TreeQ: Pushing the Quantization Boundary of Diffusion Transformer via Tree-Structured Mixed-Precision Search Overview Research area: Model compression for generative vision models — specifically mixed
- arXiv
- 2512.06353
- Published
- 2025-12-06
- Authors
- Kaicheng Yang, Kaisen Yang, Baiting Wu, Xun Zhang, Qianrui Yang, Haotong Qin, He Zhang, Yulun Zhang
AI summary
TreeQ: Pushing the Quantization Boundary of Diffusion Transformer via Tree-Structured Mixed-Precision SearchOverview
Research area: Model compression for generative vision models — specifically mixed-precision quantization of Diffusion Transformers (DiTs) for image generation.
Technical level: Advanced. The paper assumes familiarity with quantization (PTQ vs. QAT), transformer architecture internals, low-rank decomposition (SVD/LoRA), and generative evaluation metrics (FID, sFID, IS, Precision).
Scope: The paper proposes TreeQ, a three-part framework — Tree-Structured Search (TSS), Environmental Noise Guidance (ENG), and the General Monarch Branch (GMB) — for quantizing DiT-XL/2 to W4A4 and W3A3 under post-training quantization (PTQ) and parameter-efficient fine-tuning (PEFT) settings.
Note on numbers: several figures in the paper's prose differ slightly from its tables (for example, the prose cites a W4A4 PTQ FID of 6.91 while Table 1 and the conclusion report 6.92; the prose cites a W3A3 PTQ FID of 23.21 while Table 1 reports 28.08). Both values are given below where they diverge.
What This Paper Is About
Diffusion Transformers generate high-quality images but are expensive in memory and computation, which limits real-world deployment. Mixed-precision quantization (assigning different bit-widths to different layers) has pushed U-Net diffusion models below 4 bits, but its application to DiT architectures remains limited and underexplored. TreeQ aims to close that gap by designing a search-and-branch framework tailored to DiT's strictly linear block topology, targeting state-of-the-art accuracy at W3A3 and W4A4.
Key Contributions
- Tree-Structured Search (TSS) — a DiT-specific search that exploits the architecture's linear block structure to explore the mixed-precision solution space in 𝒪(αk²n) time for an n-layer model, using comparison-based bottom-up merging and Pareto-queue pruning instead of expensive heuristic objectives.
- Environmental Noise Guidance (ENG) — a single hyperparameter e that steers the search objective toward either PTQ or QAT configurations, aligning the two paradigms' differing objectives.
- General Monarch Branch (GMB) — a structured sparse matrix branch, generalizing Monarch matrices from square-only to arbitrary weight shapes, that recovers high-frequency detail lost under ultra-low-bit quantization.
- State-of-the-art results — TreeQ achieves what the authors describe as the first near-lossless 4-bit PTQ performance on DiT-XL/2, with best-in-class W3A3 and W4A4 PTQ/PEFT results.
Main Findings
-
PTQ at W4A4 (CFG = 1.5): TreeQ-PTQ reaches FID 6.92, sFID 20.86, IS 219.66, Precision 0.7664, approaching the full-precision reference (FID 6.28, sFID 20.78, IS 241.18, Precision 0.783). The strong baseline RobuQ achieves FID 16.64 at the same setting, and the best prior 4-bit PEFT method (MPQ-DM) reports FID 22.35.
-
PTQ at W3A3 (CFG = 1.5): TreeQ-PTQ reports FID 28.08, sFID 28.97, IS 85.21, Precision 0.5346, versus baseline RobuQ at FID 99.99, sFID 67.54, IS 20.59. The paper's prose cites "23.21 FID" for this setting, which matches the L=16 row of the TSS queue-length ablation (Table 2) rather than Table 1's 28.08.
-
PTQ at CFG = 4.0: At W3A3, TreeQ-PTQ is reported at FID 9.91 (prose: 9.90) with sFID 20.84 (prose: 20.83) versus baseline sFID 30.93 at FID 14.00. At W4A4, TreeQ-PTQ reports Precision 0.9330 against the full-precision 0.9298.
-
PEFT gains: With QLoRA, TreeQ-PEFT at W4A4/CFG = 1.5 reports FID 8.69 (paper prose says 8.68) versus the 9.87 baseline. At W3A3, Table 1 reports TreeQ-PEFT FID 14.52 against a baseline of 16.63, while the prose describes the improvement as "from 17.08 to 16.63," which does not match the table.
-
TSS queue length: Ablating the Pareto queue maximum length over {4, 8, 12, 16, 32}, L = 16 gives an optimal trade-off: at W3A3 it yields FID 23.21 and sFID 27.79 in 5.16h, close to L = 32's FID 23.82 at 20.64h. The paper notes that because the candidate bit-width set has size 4 and its square equals 16, the first-round merging requires no computation.
-
TSS versus integer programming: At W3A3/CFG = 1.5, TSS reaches FID 28.08 and sFID 28.97, versus IP+L2 (49.47 / 61.53), IP+Hessian (50.28 / 62.34), and IP+L1 (53.15 / 63.94), with TreeQ using a calibration set of 64 versus 256 for the others.
-
Calibration set size: Scaling from 4 to 64 samples improves W4A4 FID from 15.26 to 12.10 and Precision from 0.7004 to 0.7494, but throughput drops from 5.96 to 0.76 iterations/second. At 256 samples, FID is 12.99 with 0.19 iter/s.
-
GMB design choices: Initializing the low-rank branch first (then deriving GMB from the residual) beats GMB-first (FID 7.53 vs. 8.32); placing GMB after the Hadamard transform beats pre-transform placement (6.92 vs. 7.53); and partition number r = 4 outperforms r = 0, 8, and 16 on FID (6.92 vs. 7.46, 6.90, and 7.13 respectively).
-
GMB on other tasks: On RealSR super-resolution under W4A6, adding GMB improves MUSIQ from 65.29 to 67.10, NIQE from 3.516 to 3.788, ClipIQA from 0.6212 to 0.6439, and MANIQA from 0.4249 to 0.4339 (LPIPS moves from 0.3248 to 0.3364). On MJHQ-5k text-to-image with FLUX-Schnell under W4A4, GMB improves FID from 18.57 to 18.37, ImageReward from 0.8617 to 0.9035, CLIPIQA from 0.9266 to 0.9402, and PSNR from 17.21 to 17.27, while CLIPScore moves from 26.34 to 26.29.
Methodology in Plain English
The problem with existing search. Most mixed-precision methods score each layer independently with a cheap heuristic (like L1, L2, or Hessian sensitivity) and then minimize the sum of those scores. That assumes layer sensitivities add up linearly, which they do not: quantization error in one layer propagates into the next. The authors also observe that DiT blocks are connected in a simple line (unlike U-Nets with long skip connections), so neighboring blocks are strongly coupled.
TSS: merging from the bottom up. The search starts with each layer as a small node, each holding a set of candidate bit-widths. Adjacent nodes are repeatedly merged: the Pareto-optimal (best-trade-off-between-error-and-bit-width) configurations of the two neighbors are combined, and if the combined set exceeds a size limit k, only the top k candidates whose mean bit-widths are closest to the target are kept. This continues until one root set remains, from which the configuration closest to the target bit-width is chosen. Because merges only require comparing configurations rather than trusting absolute scores, cheap calibration MSE can be used, and the whole procedure scales linearly in model depth — exactly n−1 merges for n layers.
ENG: one knob for PTQ or QAT. The hyperparameter e sets how much "environmental noise" surrounds a layer while it is being evaluated. Setting e to the target bit-width subjects each layer to realistic noise from its neighbors, which suits PTQ (where errors cannot be trained away). Setting e = 32 bits removes the noise, isolating each layer's sensitivity, which suits QAT (where fine-tuning can realign layers). The authors report the knob is highly sensitive: e = 2 bits (below target) collapses the search, e = 3 bits finds a PTQ-optimal configuration, and e = 32 bits finds one better suited to QAT.
GMB: a structured sparse branch. When quantization degrades local detail, one fix is to raise the rank of the low-rank branch — but parameters grow linearly with rank, defeating the purpose of compression. GMB instead adds a parallel structured sparse branch based on Monarch matrices. The weight matrix is split into blocks, each block is approximated by a rank-1 outer product, and the factors are reshaped and permuted into two block-diagonal matrices that map onto hardware-native block matrix-multiply (BMM) kernels. The design is generalized from square-only Monarch matrices to arbitrary weight shapes, and the parameter budget is matched to a rank-r low-rank branch by setting both partition counts to r. In the pipeline, the Hadamard-transformed weight is decomposed into LRB + GMB + a channel-wise quantized residual, with the low-rank branch initialized first and GMB placed after the Hadamard transform.
Experimental setup. DiT-XL/2 at 256×256 on ImageNet-1K, DDPM solver with 50 steps, evaluated with FID, sFID, IS, and Precision via the ADM toolkit. The search covers the 28 DiT blocks and the qkv, proj, fc1, and fc2 layers, with candidate bit-widths {2, 3, 4, 5}; adaln layers are excluded and assigned uniform bit-width. The performance indicator is MSE between quantized and full-precision outputs on 64 randomly sampled training examples at random timesteps. Training uses PyTorch on a single NVIDIA RTX A6000-48GB GPU with QLoRA rank 16, AdamW at learning rate 10⁻⁵, zero weight decay, 20k steps, and batch size 24.
Why This Matters
Research impact. The paper argues that DiT quantization has lagged behind U-Net quantization, and that the linear topology of DiT is an exploitable prior rather than a limitation. It reframes mixed-precision search as a comparison problem rather than a metric-accuracy problem, and it is presented as the first work to achieve near-lossless 4-bit PTQ on DiT-XL/2 — a threshold that matters because PTQ requires no retraining.
Real-world applications:
- On-device image generation — running text-to-image or class-conditional diffusion models on consumer GPUs or edge hardware where 16-bit weights are infeasible.
- Super-resolution pipelines — the paper validates GMB on DiT4SR with the RealSR dataset for detail-preserving upscaling.
- Text-to-image services — validated on FLUX-Schnell with the MJHQ-5k dataset, where reduced memory and compute translate into lower serving costs.
- Latency-sensitive creative tools — interactive generation where per-step inference cost dominates the user experience.
Industry relevance. The GMB design targets hardware-native BMM kernels, and the authors report implementing a dedicated W4A4 kernel. Memory and compute reductions of this kind directly affect serving cost and hardware requirements for generative products, while the tree search's linear scaling makes the method practical for deeper models.
Future Directions
- Joint optimization of quantization, low-rank decomposition, and structured sparsity. The authors explicitly identify the absence of a unified framework optimizing all three simultaneously as a limitation and a key future direction.
- Kernels for additional low-bit configurations. A dedicated W4A4 kernel was implemented, but the authors state that efficient public implementations for W2A2 and W3A3 remain scarce; they plan to develop these to demonstrate full hardware acceleration.
- Better order-preserving search metrics. The authors observe performance saturation with larger candidate sets and queue lengths because MSE is only an approximate proxy for final metrics, and suggest that metrics with stronger order-preserving properties could improve the method.
- Resolving the reported inconsistencies. The prose-versus-table discrepancies in reported FID values (for example 6.91 vs. 6.92, and 23.21 vs. 28.08 for W3A3 PTQ) are not addressed in the paper and would benefit from clarification.
Target Audience
Researchers and engineers working on model compression, efficient inference, or diffusion model deployment — particularly those already familiar with PTQ, QAT, and low-rank adaptation. It is also relevant to practitioners who need to run DiT-class image generators under tight memory or compute budgets, and to hardware-aware ML engineers interested in structured sparsity that maps to block BMM kernels. Readers without a quantization background will find the methodology section demanding, though the high-level framing of the three components is accessible.
Authors’ abstract
Diffusion Transformers (DiTs) have emerged as a highly scalable and effective backbone for image generation, outperforming U-Net architectures in both scalability and performance. However, their real-world deployment remains challenging due to high computational and memory demands. Mixed-Precision Quantization (MPQ), designed to push the limits of quantization, has demonstrated remarkable success in advancing U-Net quantization to sub-4bit settings while significantly reducing computational and memory overhead. Nevertheless, its application to DiT architectures remains limited and underexplored. In this work, we propose TreeQ, a unified framework addressing key challenges in DiT quantization. First, to tackle inefficient search and proxy misalignment, we introduce Tree Structured Search (TSS). This DiT-specific approach leverages the architecture's linear properties to traverse the solution space in O(n) time while improving objective accuracy through comparison-based pruning. Second, to unify optimization objectives, we propose Environmental Noise Guidance (ENG), which aligns Post-Training Quantization (PTQ) and Quantization-Aware Training (QAT) configurations using a single hyperparameter. Third, to mitigate information bottlenecks in ultra-low-bit regimes, we design the General Monarch Branch (GMB). This structured sparse branch prevents irreversible information loss, enabling finer detail generation. Through extensive experiments, our TreeQ framework demonstrates state-of-the-art performance on DiT-XL/2 under W3A3 and W4A4 PTQ/PEFT settings. Notably, our work is the first to achieve near-lossless 4-bit PTQ performance on DiT models. The code and models will be available at https://github.com/racoonykc/TreeQ