---
title: Cluster-Driven Feature Caching (ClusCa)
url: https://www.emergentmind.com/topics/cluster-driven-feature-caching-clusca
type: topic
---

# Cluster-Driven Feature Caching (ClusCa)

Searching arXiv for the cited papers to ground the article and confirm metadata.
Cluster-Driven Feature Caching (ClusCa) is an inference-time acceleration method for diffusion transformers introduced in “Compute Only 16 Tokens in One Timestep: Accelerating Diffusion Transformers with Cluster-Driven Feature Caching” [2509.10312]. It is defined as a lightweight, training-free wrapper that can be dropped into any diffusion Transformer at inference time to exploit both spatial and temporal redundancy among its patch tokens. In contrast to earlier feature caching schemes that reuse features across denoising timesteps while ignoring spatial similarity, ClusCa adds a spatial clustering mechanism within each timestep: it computes only one token in each cluster and propagates their information to the remaining tokens. The method is presented as orthogonal and complementary to previous feature caching, and is evaluated on DiT, FLUX, and HunyuanVideo for both text-to-image and text-to-video generation [2509.10312].

## 1. Conceptual basis and problem setting

Diffusion transformers generate images and videos through an iterative denoising process, and their computational cost is dominated by repeated Transformer evaluations across timesteps [2509.10312]. Feature caching was introduced to reduce this cost by caching feature computation in previous timesteps and reusing it in following timesteps, leveraging temporal similarity. The central limitation identified by ClusCa is that such methods ignore similarity in the spatial dimension.

ClusCa addresses that omission by combining temporal reuse with spatial grouping. The core claim is that tokens within a timestep exhibit redundancy that can be exploited by clustering patch-token features and recomputing only a representative token from each cluster. The remaining tokens receive approximated updates through propagation from the representative computation and the cached history. In the formulation given for partial steps, this reduces the number of computed tokens by over 90% for typical settings such as $H \cdot W = 256$ and $K = 16$, where the token reduction ratio is $(256-16)/256 = 93.75\%$ [2509.10312].

The term “feature caching” in this context refers to maintaining per-token, per-block features across diffusion timesteps. The term “cluster-driven” designates the addition of a spatial partition over tokens, obtained by K-means on last-layer features, to guide which tokens are recomputed and how updates are propagated. This framing places ClusCa among inference-time approximation methods rather than training-time model compression or architectural redesign.

## 2. Cache-cycle pipeline and operational stages

ClusCa partitions the $T$ denoising steps into disjoint cache cycles of length $N$ [2509.10312]. The first step of each cycle is a full-calculation step, and the remaining $N-1$ steps are partial-calculation steps. This cyclic structure is the organizing principle of the method.

At the first step of a cycle, denoted $t_0 = 1 \pmod N$, ClusCa computes all $H \times W$ tokens through every Transformer block $g_l$, stores their output features $C_i^l$ in a cache, and runs K-means on the last-layer features to obtain $K$ spatial clusters $S_1,\dots,S_K$ with assignments $I_i \in \{1 \dots K\}$ [2509.10312]. This stage establishes both the temporal cache and the spatial partition used during later partial steps.

In each subsequent timestep within the same cycle, ClusCa selects exactly one token per cluster to recompute through the Transformer blocks. The set of selected indices is written as $\mathcal{J} = \{j_1,\dots,j_K\}$, and representative selection may be random or based on simple heuristics [2509.10312]. For each selected token, the full self-/cross-attention plus MLP stack is executed, and the corresponding cache entries are updated.

For non-selected tokens, ClusCa does not execute the full block stack. Instead, it approximates the new feature through a weighted mixture of the old cache and the newly computed co-cluster centroid:
$$
C_i^l \leftarrow \gamma \cdot \mu_{I_i} + (1-\gamma)\cdot C_i^l,
$$
where $\mu_k$ is the mean of the computed features in cluster $k$, and $\gamma \in [0,1]$ is the propagation ratio [2509.10312]. Since exactly one token per cluster is selected in the described pipeline, the centroid is determined from the computed representative set.

This four-stage organization—full calculation and clustering, representative token selection, feature computation for cluster centers, and propagation to other tokens—defines ClusCa as a spatiotemporal caching scheme rather than a purely temporal cache reuse mechanism [2509.10312].

## 3. Formalization and update equations

The formal notation in [2509.10312] defines $x_i^l(t) \in \mathbb{R}^d$ as the feature of patch token $i \in \{1 \dots H \cdot W\}$ at Transformer block $l \in [1 \dots L]$ and diffusion timestep $t$. The layer-$l$ update is denoted $\mathcal{F}^l(\cdot): x_i^l(t) \to x_i^{l+1}(t)$.

During a full-calculation step, the final features $\{x_i^L(t_0)\}_{i=1}^{H \cdot W}$ are collected and clustered by K-means. The clustering objective is written in two equivalent forms. The first is a partition form minimizing intra-cluster variance:
$$
\arg\min_S \sum_{k=1}^K \frac{1}{|S_k|}\sum_{x,y \in S_k}\|x-y\|^2.
$$
The second is a centroid form:
$$
\arg\min_{\mu_1 \dots \mu_K} \sum_{i=1}^{H \cdot W}\|x_i^L(t_0)-\mu_{I_i}\|^2.
$$
After convergence, assignments $I_i$ and centroids $\mu_k$ are recorded [2509.10312].

The cache structure maintains $C_i^l$ for every block $l$ and token $i$, storing the latest computed feature. This allows a direct contrast with temporal-caching-only baselines such as FORA or ToCa, in which one would simply reuse $C_i^l(t-k) \approx C_i^l(t)$ for $k=1 \dots N-1$ [2509.10312]. ClusCa instead applies a spatiotemporal update during partial-calculation steps. For each selected representative $j \in \mathcal{J}$,
$$
C_j^l(t) \leftarrow \mathcal{F}^l(C_j^{l-1}(t)),
$$
while for each non-selected token $i \notin \mathcal{J}$,
$$
C_i^l(t) \leftarrow \gamma \cdot \mu_{I_i} + (1-\gamma)\cdot C_i^l(t-1).
$$
The paper characterizes $\gamma$ as the parameter that balances new spatial information from the recomputed cluster representatives against the preserved temporal cache [2509.10312].

A plausible implication is that ClusCa relies on the stability of both cluster structure and cached activations over short denoising intervals. The paper’s cycle-based design and small recommended values of $\gamma$ are consistent with that interpretation, though the explicit empirical claims remain those reported in the ablations.

## 4. Complexity reduction and token skipping

The computational analysis in [2509.10312] expresses the original cost per cycle of $N$ denoising steps, without caching, as approximately $N \cdot \mathrm{Cost}_{\mathrm{full}}$, where $\mathrm{Cost}_{\mathrm{full}} \propto H \cdot W$ times per-token overhead. Under ClusCa, the cost per cycle is approximated as
$$
H \cdot W + (N-1)K,
$$
because a full Transformer pass is performed once per cycle and only $K$ tokens are recomputed in each remaining partial step.

This yields an effective speed-up:
$$
\approx \frac{N \cdot (H \cdot W)}{H \cdot W + (N-1)K}.
$$
For the typical example $H \cdot W = 256$, $N = 6$, and $K = 16$, the reported computation is
$$
\frac{6 \cdot 256}{256 + 5 \cdot 16} = \frac{1536}{336} \simeq 4.57\times.
$$
The same section notes that empirically on FLUX this becomes $4.96\times$ end-to-end [2509.10312].

The token reduction ratio in partial steps is given as
$$
\frac{H \cdot W - K}{H \cdot W},
$$
which, for $256$ tokens and $16$ representatives, becomes $93.75\%$ [2509.10312]. This is the basis of the paper’s statement that ClusCa is able to reduce the number of tokens by over 90%.

The method therefore shifts the dominant approximation from omitting timesteps to omitting most token computations within selected timesteps. This suggests a different trade-off surface from purely temporal caching methods: quality degradation is controlled by cluster count $K$, cycle length $N$, and propagation ratio $\gamma$, rather than by temporal reuse alone.

## 5. Hyper-parameters, implementation, and inference integration

The implementation described in [2509.10312] is fully inference-time and does not modify model weights or require fine-tuning. The stated inputs to the pseudocode are a Transformer $\mathcal{G} = g_1 \circ \dots \circ g_L$, cache cycle length $N$, cluster count $K$, and propagation ratio $\gamma$. Cache initialization is performed for $C_i^0$ over all tokens, for example with zeros.

Several hyper-parameters are singled out. The cluster count $K$ is typically 16 for DiT and FLUX image models, and 32 for HunyuanVideo. The cycle length $N$ is 5–7 steps; larger $N$ yields more speedup but accumulates more error. The propagation ratio $\gamma$ is small, 0.002–0.005, to smoothly blend spatial updates, and ablations show an optimum around $\gamma \approx 0.004$–$0.005$ [2509.10312]. Clustering is performed once per cycle with at most 5% overhead, and the previous cycle’s centroids are used as initialization to accelerate convergence. Representative selection may be random or fixed one per cluster, and empirically one suffices.

The method is described as interposing a small caching and cluster-propagation layer around Transformer blocks while treating the Transformer as a black-box feature extractor [2509.10312]. No retraining or access to model internals beyond the block outputs is necessary. This is the operational basis for the paper’s generality claim across DiT, FLUX, HunyuanVideo, and future architectures.

A common misconception would be to interpret ClusCa as a learned token-pruning module. The reported design does not require training, does not alter weights, and does not introduce a learned routing network. Its approximation mechanism is cache-based and clustering-driven, with K-means and deterministic or random representative selection at inference time [2509.10312].

## 6. Empirical results on image and video generation

The empirical evaluation in [2509.10312] covers FLUX.1-dev, DiT-XL/2, and HunyuanVideo. The following table reproduces the main reported results.

| Model / Setting | Speed-up or latency | Quality metrics |
|---|---:|---:|
| Original (FlashAttention), FLUX.1-dev | latency = 25.82 s, 1.00× | ImageReward = 0.9898, CLIP = 19.761 |
| ClusCa $(N=6, O=2, K=16)$, FLUX.1-dev | latency = 7.12 s, 3.62×, FLOPs↓ = 748.48 T, end-to-end speed = 4.96× | ImageReward = 0.9949, CLIP = 19.453 |
| ToCa $(N=3)$, DiT-XL/2 | 2.44× | FID = 2.87, sFID = 4.76 |
| ClusCa $(N=4, K=16)$, DiT-XL/2 | 3.23× | FID = 2.51, sFID = 5.03 |
| ClusCa $(N=7, K=8)$, DiT-XL/2 | 5.91× | FID = 3.59, sFID = 6.28 |
| TaylorSeer $(N=6)$, HunyuanVideo | 5.56× | VBench Score = 79.78% |
| ClusCa $(N=6, K=32)$, HunyuanVideo | 5.54× | VBench Score = 79.96% |
| ClusCa $(N=7, K=32)$, HunyuanVideo | 6.21× | VBench Score = 79.60% |

For FLUX.1-dev at 50 steps and $256 \times 256$ resolution, ClusCa with $(N=6, O=2, K=16)$ reduces latency from 25.82 s to 7.12 s, with 3.62× acceleration and 4.96× end-to-end speed, while increasing ImageReward from 0.9898 to 0.9949 and slightly decreasing CLIP from 19.761 to 19.453 [2509.10312]. The abstract summarizes this as 4.96× acceleration on FLUX with an ImageReward of 99.49%, surpassing the original model by 0.51% [2509.10312].

For DiT-XL/2 on ImageNet 50k samples, ClusCa $(N=4, K=16)$ achieves 3.23× speed-up with FID 2.51 and sFID 5.03, while ClusCa $(N=7, K=8)$ reaches 5.91× with FID 3.59 and sFID 6.28 [2509.10312]. The comparison point listed is ToCa $(N=3)$ at 2.44×, FID 2.87, sFID 4.76.

For HunyuanVideo on 946 prompts using VBench, ClusCa $(N=6, K=32)$ attains 5.54× speed-up with 79.96% VBench Score, and ClusCa $(N=7, K=32)$ attains 6.21× with 79.60% [2509.10312]. The listed comparison is TaylorSeer $(N=6)$ at 5.56× and 79.78%.

The ablations report that $\gamma \in [0, 0.007]$ yields a U-shaped FID curve with optimum around $\gamma \approx 0.004$–$0.005$; $K \in \{4,8,16,32\}$ trades compute against fidelity, with $K=16$ or $32$ giving the best quality/speed balance; and $N \in \{3 \dots 7\}$ yields up to 5–6× speedup at modest FID/sFID degradation [2509.10312].

## 7. Generality, related notions of “ClusCa,” and broader context

Within diffusion transformers, ClusCa is presented as a plug-and-play strategy applicable to any diffusion Transformer, including DiT, FLUX, HunyuanVideo, or future architectures, simply by wrapping the inference loop [2509.10312]. The reported justification is that it does not modify model weights, require fine-tuning, or demand access to internals beyond block outputs. Its generality is therefore architectural rather than task-specific.

The name “ClusCa” also appears in a distinct and unrelated context in graph analytics, where a summary of Cagra’s “frequency-based clustering” is labeled “ClusCa” in the provided material and linked to “Making Caches Work for Graph Analytics” [1608.01362]. There, the technique reorders vertices so that high-frequency vertices are laid out contiguously, improving cache-line utilization and L2/L3 hit rates during pull-style graph algorithms. The mechanism, objective, and computational substrate differ fundamentally from diffusion-transformer feature caching: graph-analytic clustering is a one-time data-layout transformation on vertices and CSR structures, whereas Cluster-Driven Feature Caching in diffusion transformers is an inference-time token clustering and feature-propagation method [1608.01362].

The shared label can create terminological ambiguity. In the graph setting, “frequency-based clustering” groups hot vertices using out-degree as a proxy for pull frequency and yields zero extra instructions at steady state after preprocessing [1608.01362]. In the diffusion-transformer setting, ClusCa groups patch tokens by K-means over last-layer features within a cache cycle and updates non-recomputed tokens through a mixture of cached state and cluster-level propagated information [2509.10312]. The overlap is thus nominal rather than methodological.

Taken on its own terms, Cluster-Driven Feature Caching defines a specific spatiotemporal approximation regime for diffusion transformers: one full step per cache cycle, clustered token representatives in subsequent steps, and propagation controlled by $\gamma$. The reported outcome is 90%+ token skipping per partial step, 4–6× measured end-to-end acceleration, and preservation or improvement of selected quality metrics in the tested settings [2509.10312]. A plausible implication is that the method is most attractive where denoising trajectories exhibit both short-horizon temporal smoothness and spatial redundancy in token features; this interpretation is consistent with the design and the reported evaluations, though the empirical claims remain those explicitly enumerated in the paper.

Source: https://www.emergentmind.com/topics/cluster-driven-feature-caching-clusca