MeanCache: From Instantaneous to Average Velocity for Accelerating Flow Matching Inference

Huanlin Gao, Ping Chen, Fuyuan Shi, Ruijia Wu, Yantao Li, Qiang Hui, [0.1cm] Yuren You, Ting Lu, Chao Tan, Shaoan Zhao, Zhaoxiang Liu, [0.1cm] Fang Zhao, Kai Wang, Shiguo Lian, [0.2cm] Data Science & Artificial Intelligence Research Institute, China Unicom · 2026

Read MeanCache: From Instantaneous to Average Velocity for Accelerating Flow Matching Inference by Huanlin Gao, Ping Chen, Fuyuan Shi, Ruijia Wu, Yantao Li, Qiang Hui, [0.1cm] Yuren You, Ting Lu, Chao Tan, Shaoan Zhao, Zhaoxiang Liu, [0.1cm] Fang Zhao, Kai Wang, Shiguo Lian, [0.2cm] Data Science & Artificial Intelligence Research Institute, China Unicom (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-19961.txt.

Introduction

Huanlin Gao and colleagues speed up flow matching, a generative modeling method. Flow matching learns a velocity field that carries noise into data. Inference follows that field step by step, which costs many evaluations. Caching reuses earlier computations to skip steps, but most caches use instantaneous velocity snapshots.

That shortcut bends the trajectory, and errors pile up at high acceleration. Their framework, MeanCache, caches average velocity instead of instantaneous values. Averages track the true path more faithfully over long jumps. The method needs no retraining of the underlying model. Faster generation matters for image and video tools used interactively. The work improves the speed-quality trade-off at aggressive settings.

Catalog record

CREATORHuanlin Gao, Ping Chen, Fuyuan Shi, Ruijia Wu, Yantao Li, Qiang Hui, [0.1cm] Yuren You, Ting Lu, Chao Tan, Shaoan Zhao, Zhaoxiang Liu, [0.1cm] Fang Zhao, Kai Wang, Shiguo Lian, [0.2cm] Data Science & Artificial Intelligence Research Institute, China Unicom
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE45 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2601-19961

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

MeanCache: From Instantaneous to Average Velocity for Accelerating Flow Matching Inference Huanlin Gao, Ping Chen, Fuyuan Shi, Ruijia Wu, Yantao Li, Qiang Hui, [0.1cm] Yuren You, Ting Lu, Chao Tan, Shaoan Zhao, Zhaoxiang Liu, [0.1cm] Fang Zhao, Kai Wang, Shiguo Lian, [0.2cm] Data Science & Artificial Intelligence Research Institute, China Unicom Abstract We present MeanCache , a training-free caching framework for efficient Flow Matching inference. Existing caching methods reduce redundant computation but typically rely on instantaneous velocity information (e.g., feature caching), which often leads to severe trajectory deviations and error accumulation under high acceleration ratios. MeanCache introduces an average-velocity perspective: by leveraging cached Jacobian–vector products (JVP) to construct interval average velocities from instantaneous velocities, it effectively mitigates local error accumulation. To further improve cache timing and JVP reuse stability, we develop a trajectory-stability scheduling strategy as a practical tool, employing a Peak-Suppressed Shortest Path under budget constraints to determine the schedule. Experiments on FLUX.1, Qwen-Image, and HunyuanVideo demonstrate that MeanCache achieves 4.12 × 4.12\times , 4.56 × 4.56\times , and 3.59 × 3.59\times acceleration, respectively, while consistently outperforming state-of-the-art caching baselines in generation quality. We believe this simple yet effective approach provides a new perspective for Flow Matching inference and will inspire further exploration of stability-driven acceleration in commercial-scale generative models. 0 0 footnotetext: ∗ Corresponding author 1 1 footnotetext: {gaohl51, zhaof50, liansg}@chinaunicom.cn Figure 1: Visualization of images generated by different methods on FLUX.1[dev] under varying acceleration ratios. 1 Introduction Flow Matching ( 27 ; 1 ) has recently demonstrated remarkable progress across image ( 55 ) , video ( 64 ; 22 ) , and multi-modal generation tasks ( 18 ) . By modeling instantaneous velocity fields to learn continuous transport paths, it offers a concise and effective paradigm for generative modeling. However, in commercial-scale models such as FLUX.1 ( 23 ) , Qwen-Image ( 55 ) , and HunyuanVideo ( 22 ) , the large memory footprint, heavy per-step computational cost, and long inference latency significantly hinder its applicability in interactive or resource-constrained scenarios. Traditional acceleration methods, such as distillation ( 40 ; 21 ; 42 ) , pruning ( 13 ) , and quantization ( 26 ) , usually rely on architecture modification and large-scale retraining. In contrast, caching-based methods ( 34 ) offer a lightweight, training-free alternative. By reusing intermediate representations from selected timesteps, they reduce redundant computation and accelerate sampling. However, at high acceleration ratios, these methods often suffer from severe error accumulation : interval states reconstructed solely from instantaneous velocity or feature information amplify local deviations, causing the trajectory to drift away from the true path. As shown in Fig. 2 (left), instantaneous velocities fluctuate sharply along the denoising trajectory, making them unstable for reuse, whereas interval average velocities are much smoother and thus more stable for reconstruction. Figure 2: Instantaneous vs. Average Velocity and JVP Caching. (Left) Along the original trajectory, instantaneous velocity shows sharp fluctuations, while average velocity is much smoother. (Middle) At timestep 927, JVP Caching reduces error accumulation, though its effectiveness depends on the cache interval and hyperparameter K . (Right) At timestep 551, it achieves stronger error mitigation, showing that effectiveness varies across timesteps. Both middle and right figures are under the single-cache setting on the original trajectory. This observation is consistent with the objective of Flow Matching, which encourages trajectories to satisfy linear characteristics. Under fixed input conditions, an ideal trajectory approximates linear interpolation between sample and noise; the more linear the trajectory, the more stable and higher-quality the generation results. Recent work such as MeanFlow ( 11 ) , further demonstrates that modeling and leveraging average velocity can significantly improve trajectory stability, underscoring the potential of the average-velocity domain for more robust generation. Motivated by this insight, we propose MeanCache , a training-free caching paradigm that operates in the average-velocity domain rather than relying solely on instantaneous velocities. The key idea is to construct interval average velocities from instantaneous ones under a limited budget, ensuring trajectory stability. MeanCache has two components. First, interval average velocities are approximated using cached Jacobian–vector products (JVP), yielding smoother and more stable guidance signals that help mitigate local error accumulation. As shown in Fig. 2 (middle, right), JVP caching reduces errors at timesteps 927 and 551; however, its benefit varies with the timestep, cache interval, and hyperparameters, indicating that fixed caching rules are insufficient. Second, we develop a trajectory-stability scheduling strategy as a practical tool. Inspired by the graph-based modeling idea in ShortDF ( 5 ) , timesteps are represented as nodes, deviations of average velocity under JVP caching define edge weights, and a budget-constrained shortest-path search determines cache placement. This scheduling tool systematically improves cache timing and JVP reuse stability without retraining. The main contributions of this work are summarized as follows: • Average-Velocity Perspective on Caching. We introduce MeanCache, which redefines the caching problem from an instantaneous velocity view to the average-velocity domain, offering a simpler and more stable perspective for high-acceleration generative modeling. • Trajectory-Stability Scheduling Strategy. We develop a scheduling tool that scores timesteps by JVP-based stability deviation and uses a budget-constrained shortest-path search for cache placement, improving timing and reuse stability without retraining. • Outstanding Performance. MeanCache maintains generation quality under high acceleration while significantly reducing inference cost. Compared to state-of-the-art caching baselines, experiments on FLUX.1, Qwen-Image, and HunyuanVideo show speedups of 4.12\times , 4.56\times , and 3.59\times , respectively. Moreover, MeanCache consistently delivers higher generation quality across different acceleration ratios (Fig. 1 ), highlighting its acceleration potential on commercial-scale generative models. 2 Methodology 2.1 Preliminaries Flow Matching and MeanFlow. Flow Matching ( 27 ; 1 ) constructs continuous transport paths between a noise distribution \pi_{1} and a data distribution \pi_{0} via velocity fields, typically defined by linear interpolation x_{t}=(1-t)x_{0}+tx_{1} , t\in[0,1] . This leads to the ODE dx_{t}=(x_{0}-x_{1})dt . Since x_{0} is unknown during generation, a neural network v_{\theta}(x_{t},t) is trained to predict the instantaneous velocity, yielding the dynamics d\hat{x}_{t}=v_{\theta}(x_{t},t)\,dt. (1) Where \hat{x}_{t} denotes the trajectory point predicted by the neural ODE. Building on this formulation, MeanFlow ( 11 ) offers a new perspective by modeling the average velocity over the interval [s,t] , defined as u(z_{s},t,s)=\tfrac{1}{s-t}\int_{t}^{s}v(z_{\tau},\tau)\,d\tau, (2) Furthermore, the MeanFlow Identity provides a theoretical bridge between instantaneous and average velocity: v(z_{s},s)=u(z_{s},t,s)+(s-t)\tfrac{d}{ds}u(z_{s},t,s). (3) In this identity, the derivative term \tfrac{d}{ds}u can be expressed as a Jacobian–Vector Product (JVP) , where the Jacobian of u with respect to (z,s) is contracted with the tangent vector [v(z_{s},s),1] . Observing this formulation, JVP can be regarded as a computational bridge that directly connects instantaneous velocity and average velocity. Figure 3: From Instantaneous to Average Velocity. Directly caching the instantaneous velocity v(z_{t},t) over [t,s] easily leads to trajectory drift and error accumulation, whereas the average velocity u(z_{t},t,s) accurately reaches the target s . MeanCache introduces a prior timestep r and reuses \mathrm{JVP}_{r\to t} to estimate the average velocity \hat{u}(z_{t},t,s) , thereby correcting the trajectory and effectively mitigating error accumulation. Feature Caching in Diffusion Models. Cache, as a training-free acceleration method, speeds up the denoising process by storing intermediate features and reusing them across adjacent timesteps. In particular, the reuse strategy directly substitutes cached features from a previous step: \mathcal{F}(x_{t-k}^{l}):=\mathcal{F}(x_{t}^{l}),\quad\forall k\in[1,N-1], (4) where \mathcal{F} denotes the feature extraction function, and l

Read the complete text