atlas

Research map / Architectures and efficiency / Attention and transformers

Learning-to-Cache: Accelerating Diffusion Transformer via Layer Caching

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Transformer block and depth design · 10 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Learning-to-Cache (L2C) learns a continuous, input-invariant, timestep-variant router that decides which diffusion transformer layers to reuse from the previous step, training only the router while keeping model weights frozen.

Problem

Diffusion transformers have slow inference because every denoising step runs a large transformer; naive layer dropping degrades quality and exhaustive search over layer caching choices is exponential in depth.

Approach

Interpolate each transformer layer's residual branch between the outputs at two adjacent timesteps, make the binary cache/compute choice per layer and timestep differentiable via a learnable router beta, and optimize beta with a regularized approximation loss while freezing the diffusion model; the discretized router yields a static computation graph for inference.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use layer caching instead of fewer-step DDIM at 20 NFE-comparable speedDiT-XL/2 · ImageNet 256×256, 20-step comparisonFID: 4.68 -> 3.46Helped
Use layer caching instead of fewer-step DDIMDiT-XL/2 · ImageNet 256×256, 10 NFEFID: 16.57 -> 12.79Helped
Use layer caching instead of fewer-step DDIMDiT-XL/2 · ImageNet 512×512, 50 NFEFID: 3.28 -> 3.69Hurt
Use layer caching instead of DPM-SolverU-ViT-H/2 · ImageNet 256×256, 50 NFEFID: 2.3728 -> 2.3625Helped
Use layer caching instead of DPM-SolverU-ViT-H/2 · ImageNet 256×256, 20 NFEFID: 2.5739 -> 2.5809Hurt
Shift cache steps from [2,4,6,8,10,...] to [3,5,7,9,11,...] (ablation)DPM-Solver-2 with all layers cached · ImageNet 256×256, 20 NFEFID: 5.30 -> 2.80Helped
Cache layers rather than learn to drop layers (ablation)DiT-XL/2 · ImageNet 256×256, 10 NFEFID: 17.35 -> 3.47Helped
Cache layers rather than randomly drop layers (ablation)DiT-XL/2 · ImageNet 256×256, 10 NFEFID: 277.42 -> 3.47Helped
Increase λ from 0 to 5e-6 (ablation)L2C router · ImageNet 256×256, 10 NFEFID: 3.48 -> 3.45Helped
Increase λ from 5e-6 to 1e-4 (ablation)L2C router · ImageNet 256×256, 10 NFEFID: 3.45 -> 6.51Hurt
Use a larger threshold at higher acceleration ratios (ablation)L2C router · Image generation; higher acceleration ratiosimage qualityHelped
Use a smaller threshold at lower acceleration ratios (ablation)L2C router · Image generation; lower acceleration ratiosimage qualityHelped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet

Benchmarks: ImageNet 256x256 ImageNet 512x512

Metrics: FID sFID IS Precision Recall MACs latency speedup

Baselines: DDIM DPM-Solver DeepCache Faster Diffusion Random Drop Learning-to-Drop

Builds on: DDIM DPM-Solver DeepCache Faster Diffusion

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy