---
title: 'ReCache: Budget-Aware Diffusion Caching'
url: https://www.emergentmind.com/topics/recache
type: topic
---

# ReCache: Budget-Aware Diffusion Caching

Searching arXiv for the ReCache diffusion-model paper and closely related caching baselines.
ReCache is a budget-aware scheduling method for diffusion-model feature caching that treats compute as a direct input rather than an indirect consequence of heuristic thresholds. Introduced for image and video diffusion inference, it assumes a denoising process with $T$ discrete steps and a user-specified budget $k$ full network evaluations, then learns a cache schedule $S \subset \{1,\dots,T\}$ with $|S|=k$ that maximizes final generation quality under that budget. The method is trained with policy gradients, uses generations from uncached inference as matching targets, requires no labelled data, and is designed to be compatible with both feature reuse and feature forecasting mechanisms such as FORA, $\Delta$-DiT, DiCache, TaylorSeer, HiCache, and DPCache [2606.06060].

## 1. Definition and computational setting

ReCache is formulated around the standard diffusion or flow-matching inference loop in which a model $G$ runs $T$ denoising steps. The latent at step $t$ is denoted $x_t$, with $x_T \sim \mathcal{N}(0,I)$ and $x_0$ the final output. At each step, a large network $v_\theta$ computes a velocity or noise estimate
$$
v_t = v_\theta(x_t,t),
$$
followed by the solver update
$$
x_{t-1}=\mathrm{Solver}(x_t,v_t,t).
$$
The dominant cost is the forward pass through $v_\theta$ at every step [2606.06060].

Within this setting, ReCache distinguishes between recomputation steps and cached steps. A schedule $S=\{s_1,\dots,s_k\} \subset \{1,\dots,T\}$ specifies the $k$ denoising steps at which the full network is run and selected intermediate activations $h_t$ are stored. At steps $t \notin S$, the method reconstructs approximate activations $\hat h_t$ cheaply via either direct reuse, which copies from the last cache, or feature forecasting, which extrapolates from several previous caches. The output under schedule $S$ and caching mechanism $\mathcal{M}$ is written
$$
G(z \mid S,\mathcal{M}).
$$
This arrangement makes the schedule itself the optimization target, rather than treating it as a by-product of a hand-tuned error heuristic [2606.06060].

The central conceptual inversion is that the user specifies exactly how many full evaluations can be afforded. Existing schedules are described as fixed, such as uniform, or adaptively selected from per-step error heuristics; ReCache instead learns the recomputation schedule that maximizes generation quality for the target budget $k$ [2606.06060].

## 2. Policy parameterization and schedule selection

ReCache casts schedule selection as a one-shot RL problem over $k$-subsets of diffusion steps. Equivalently, the schedule can be represented as binary actions $a_1,\dots,a_T$ with
$$
a_t \in \{0,1\}, \qquad \sum_t a_t = k,
$$
where $a_t=1$ means “cache at $t$.” The policy does not use a standard recursive state evolution; instead, it computes in one shot a distribution over all $k$-subsets based on the budget $k$ alone [2606.06060].

Budget conditioning is implemented with a small MLP:
$$
\theta = \mathrm{MLP}_\phi(k),
$$
where $\theta=(\theta_1,\dots,\theta_T)$ are step-importance scores. ReCache then defines a policy $\pi_\phi(S \mid k)$ over $k$-subsets using the Plackett–Luce top-$k$ distribution:
$$
\log \pi_\phi(S\mid k)
= \sum_{i=1}^k \left[
\theta_{s_i} - \log \sum_{j \notin \{s_1\dots s_{i-1}\}} \exp(\theta_j)
\right].
$$
Sampling is performed with Gumbel-Top-$k$:
$$
g_i = \theta_i - \log(-\log u_i), \qquad u_i \sim \mathrm{Uniform}(0,1),
$$
followed by
$$
S = \arg \mathrm{top}\text{-}k(g_1,\dots,g_T).
$$
At inference time, the noise is dropped and the deterministic top-$k$ of $\theta$ is used [2606.06060].

This parameterization has two notable consequences. First, one trained policy can be queried at different budgets during inference. Second, schedule selection is decoupled from backpropagation through full diffusion inference, which would otherwise be burdensome. This suggests that ReCache is best understood as a meta-controller over denoising steps rather than a modification of the underlying denoiser itself.

## 3. Reward design and REINFORCE training

Training combines a fidelity term against uncached inference with a perceptual quality reward. For noise input $z \sim \mathcal{N}(0,I)$, let
$$
x^\star = G(z)
$$
be the full-inference output and
$$
x^{(S)} = G(z \mid S,\mathcal{M})
$$
the output produced under schedule $S$. ReCache defines the single-schedule loss as
$$
L(S) = d(x^{(S)},x^\star) - \alpha_q \mathcal{R}(x^{(S)}),
$$
where $d(\cdot)$ is instantiated as patchwise LPIPS and $\mathcal{R}(\cdot)$ is a perceptual or quality reward such as HPSv2 for images or VBench for videos. The corresponding RL reward is
$$
R(S) = -L(S) = -d(\cdot) + \alpha_q \mathcal{R}(\cdot).
$$
The uncached output $x^\star$ serves as the supervised target for computing the fidelity term, while $\mathcal{R}(\cdot)$ scores final perceptual quality [2606.06060].

Optimization uses REINFORCE with a leave-one-out baseline and an entropy bonus. The objective minimizes $\mathbb{E}_{S \sim \pi_\phi}[L(S)]$, and with $n$ sampled schedules $S^{(i)}$ the gradient estimate is
$$
\nabla_\phi \mathbb{E}[L] \approx \frac{1}{n-1} \sum_{i=1}^n
\left[
(L(S^{(i)}) - \bar L)\nabla_\phi \log \pi_\phi(S^{(i)} \mid k)
\right],
$$
where
$$
\bar L = \frac{1}{n} \sum_i L(S^{(i)}).
$$
The paper’s pseudocode adds the entropy term through
$$
L_{\mathrm{reg}}^{(i)} = L^{(i)} + \beta \cdot (-\log p^{(i)}).
$$
Training proceeds by precomputing a dataset of $(z_i,x_i^\star=G(z_i))$, sampling budgets $k \sim q(k)$, sampling schedules via Gumbel-Top-$k$, evaluating the cached generator, and updating $\phi$ with Adam using the REINFORCE estimator [2606.06060].

A plausible implication is that ReCache optimizes the schedule against end-of-trajectory quality rather than local feature error. That distinction matters because a denoising step that appears unimportant under a per-step approximation metric may still be disproportionately important to downstream perceptual quality.

## 4. Inference behavior, compatibility, and empirical results

At test time, ReCache is operationally simple: choose a budget $k$, compute $\theta=\mathrm{MLP}_\phi(k)$, select $S=\mathrm{top}\text{-}k(\theta)$, and run the generator once under caching mechanism $\mathcal{M}$ with that schedule. No further fine-tuning is needed, and a single policy works across budgets [2606.06060].

The method is explicitly described as compatible with both direct feature-reuse and feature-forecasting mechanisms. The paper lists FORA, $\Delta$-DiT, DiCache, TaylorSeer, HiCache, and DPCache as compatible mechanisms, with the only change being how $x^{(S)}$ is computed for each sampled schedule [2606.06060].

The reported results emphasize same-compute comparisons against scheduling baselines. On FLUX.1-dev with $T=50$ and budget $k=9$, corresponding to approximately $\times 5.04$ FLOPs reduction, Uniform DiCache gives LPIPS $=0.456$, whereas ReCache + DiCache gives LPIPS $=0.316$, a $31\%$ reduction, with HPS $+0.006$. Under the same model family, Uniform TaylorSeer $(O=2)$ changes from LPIPS $0.520$ to ReCache TaylorSeer $0.430$, and Uniform HiCache $(O=2)$ changes from $0.521$ to ReCache HiCache $0.331$ [2606.06060].

On Wan2.1 video generation with $T=25$ and budget $k=7$, corresponding to approximately $\times 3.5$ speedup in the detailed summary and described in the abstract as $\sim \times 2.6$ speedup for one comparison, Uniform TaylorSeer $(O=1)$ changes from LPIPS $0.499$ to ReCache $0.263$, Uniform HiCache $(O=1)$ from $0.514$ to $0.266$, and Uniform DPCache from $0.420$ to $0.287$. The VBench score increases by $5$–$7$ points, with the abstract giving the concrete example of $70.4$ to $76.0$ over uniform HiCache [2606.06060].

On HunyuanVideo with $T=50$ and budget $k=7$, corresponding to $\times 7.1$, Uniform TaylorSeer $(O=1)$ changes from $0.508$ to ReCache $0.390$, Uniform HiCache $(O=1)$ from $0.512$ to $0.380$, and Uniform DPCache from $0.420$ to $0.399$, with VBench increasing by $1$–$2$ points [2606.06060].

The paper also reports several qualitative properties. Across all models and budgets, ReCache outperforms uniform or heuristic schedules at the same compute, with the largest gains when $k$ is small. It also states that discovered schedules are nested in $k$, showing a stable step ranking [2606.06060]. This suggests that the learned controller identifies a consistent ordering of denoising-step importance, then truncates that ordering according to the available budget.

## 5. Relation to other cache-reuse mechanisms

The name “ReCache” is used in multiple technical contexts, but the diffusion-model method is distinct in objective and mechanism. In diffusion inference, ReCache learns *when* to recompute under a fixed budget. By contrast, several recent systems address *what* to cache, *when* to refresh, or *how* to reuse keys and values in other architectures.

| System | Domain | Core mechanism |
|---|---|---|
| ReCache [2606.06060] | Diffusion models | Learns a budget-aware recomputation schedule via REINFORCE |
| SD-VLA recache gate [2602.03983] | Vision-language-action models | Reuses static-token KV cache and refreshes it only when a gate exceeds threshold $\delta_l$ |
| LongLive KV-recache [2509.22622] | Interactive long video generation | Rebuilds cached states under a new prompt after prompt switches |
| PRCR [2606.26631] | Interleaved multimodal reasoning | Rebinds raw visual keys to position-compatible coordinates before cache injection |
| KV cache recycling [2512.11851] | Decoder-only LLM inference | Reloads cached past key values when a cached prompt is an exact prefix of the new input |

In SD-VLA, the recache gate is attached to a static–dynamic token disentanglement framework. At each time step, static tokens can appear only once while dynamic tokens from the last $T$ frames are stacked. A lightweight gate network
$$
g_l(Z_{t-\Delta},Z_t)=\sigma(\mathrm{MLP}(\varphi(Z_{t-\Delta}),\varphi(Z_t))) \in [0,1]
$$
decides whether the static KV at level $l$ should be refreshed or reused, with threshold comparison against $\delta_l$ at inference. This mechanism is intended to reduce repeated attention work in long-horizon robotic control rather than to allocate a fixed compute budget across denoising steps [2602.03983].

LongLive addresses prompt switching in frame-level autoregressive video generation. There, naive cache clearing breaks visual continuity and naive cache retention causes prompt inertia. KV-recache discards the old cache at the switch frame and rebuilds it by re-encoding already generated frames under the new prompt, then continues causal decoding. In the reported controlled $10\,\mathrm{s}$ setting with one prompt switch at $5\,\mathrm{s}$, “KV recache” achieves Background $94.81$, Subject $94.04$, and CLIP $27.87$, combining smooth transitions with prompt compliance, at approximately $6\%$ extra time on a $10\,\mathrm{s}$ sample [2509.22622].

PRCR, or Position Rebinding Cache Reuse, tackles replay-free visual revisiting in interleaved multimodal reasoning. It identifies that direct reuse of historical visual KV cache fails because keys remain bound to stale positional context. PRCR therefore stores raw visual KV together with original spatial coordinates, reassigns compatible coordinates, reapplies RoPE to reconstruct keys, and injects the rebound cache into the active decoder cache. On Qwen3-VL-8B with $K=32$ selected tokens, the paper reports replay cost of approximately $483\,\mathrm{GFLOPs}$ versus PRCR cost of approximately $14\,\mathrm{MFLOPs}$, i.e. more than $33{,}000\times$ reduction, while matching or slightly outperforming token replay [2606.26631].

KV cache recycling for small LLMs is again different: it stores cached past key values on CPU, retrieves candidate prompts by sentence-embedding similarity, verifies an exact token-level prefix match, and resumes generation from the cached prefix. In the reported tests on DialoGPT-medium, average generation time changes from $1.15\,\mathrm{s}$ to $0.65\,\mathrm{s}$ with average reused tokens $32$ and average speedup $43.5\%$, while behavior matches baseline when overlap is absent [2512.11851].

These comparisons clarify a common misconception: ReCache in diffusion models is not a generic synonym for KV-cache reuse. It is specifically a learned scheduler over denoising steps, whereas the other systems focus on cache refresh, replay avoidance, prefix reuse, or position-corrected reinsertion.

## 6. Broader usage of the term and limitations

Outside generative-model inference, “ReCache” or “Reuse Cache” has also been used for hardware cache-management mechanisms. One line of work uses a decoupled tag/data SLLC in heterogeneous CPU–GPU systems and stores data only for lines that have been accessed more than once. In a 32 nm CACTI modeling result, a conventional $1\,\mathrm{MB}$ LLC is $2.43\,\mathrm{mm}^2$, whereas ReCache with $1\,\mathrm{MB}$ tag and $512\,\mathrm{KB}$ data is $1.33\,\mathrm{mm}^2$, yielding $45\%$ savings, while achieving within $0.8\%$ of the static-partition baseline IPC [2107.13649]. Another line of work uses per-line reuse-distance prediction to decide whether a clean line evicted from an upper-level cache should be copied back into the lower-level LLC, reporting average IPC improvement of $+2.5\%$ and up to $+12.8\%$ over an LRU plus copy-back-all baseline for STT-MRAM LLC [2105.14442]. These systems share the high-level motif of exploiting reuse, but they are architecturally unrelated to the diffusion-model scheduler.

For the diffusion-model ReCache itself, the paper identifies several strengths and limits. Its strengths are true budget control, direct optimization of final output quality rather than intermediate feature error, adaptation across budgets with a single policy, compatibility with multiple caching mechanisms, and nested schedules that indicate a stable step ranking. Its limitations are that any caching scheme struggles in very low-step regimes with $k<4$, because reuse gaps become too large, and that offline RL training is required for each $(\text{model},\mathcal{M})$ pair, though the reported overhead is only a few hundred GPU-hours once [2606.06060].

The proposed extensions are correspondingly targeted. The paper suggests incorporating continuous or fractional budgets via temperature-controlled sampling, jointly optimizing both the caching schedule and the caching mechanism, and combining the method with distillation or efficient-solver approaches for larger speedups [2606.06060]. A plausible implication is that the current formulation separates *when to cache* from *how to cache*, and that future systems may collapse these into a single learned control problem over denoising computation.

Source: https://www.emergentmind.com/topics/recache