Papers
Topics
Authors
Recent
Search
2000 character limit reached

Shallow Flow Matching in TTS

Updated 6 March 2026
  • Shallow Flow Matching (SFM) is a generative modeling framework that refines flow matching by integrating shallow intermediate states along conditional optimal transport paths.
  • It employs a dual-component system combining a coarse TTS generator with an SFM head to construct and align intermediate representations for efficient signal generation.
  • SFM improves inference speed and synthesis quality as evidenced by enhanced PMOS and reduced WER, offering up to a 60% acceleration in computational performance.

Shallow Flow Matching (SFM) is a generative modeling framework that modifies the standard flow matching methodology by introducing intermediate ("shallow") states along deterministic or stochastic probability flow paths. Originating in the context of speech synthesis, SFM addresses inefficiencies and limitations inherent in conventional flow matching (FM) approaches by adaptively determining where to begin integration on the conditional optimal transport (CondOT) path, and constructing a principled single-segment piecewise flow. The approach generalizes to any CondOT-based FM configuration and is applicable to diverse domains utilizing coarse-to-fine generation paradigms, notably text-to-speech (TTS) synthesis (Yang et al., 18 May 2025).

1. Mathematical Formulation of Shallow Flow Matching

SFM extends conventional conditional flow matching by leveraging an intermediate state Xt~hX_{\tilde t_h}, constructed via projection from a coarse generator's output onto the CondOT trajectory. The conventional FM path between a standard Gaussian prior p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I) and data sample X1X_1 of mel-spectrograms is given by pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I), with μt(X1)=tX1\mu_t(X_1) = t X_1, σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t. The flow is ϕt(X0)=(1t)X0+t(X1+σminX0)\phi_t(X_0) = (1-t) X_0 + t(X_1 + \sigma_{\min} X_0), and vector field ut(XtX1)=(X1+σminX0)X0u_t(X_t | X_1) = (X_1 + \sigma_{\min} X_0) - X_0.

SFM introduces a split at tm(0,1)t_m \in (0,1), with the intermediate point xtm=(1tm)X0+tm(X1+σminX0)x_{t_m} = (1 - t_m) X_0 + t_m (X_1 + \sigma_{\min} X_0). The remaining segment is rescaled to p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)0 via p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)1, so that for p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)2, the "shallow" flow is

p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)3

with velocity field

p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)4

This defines a single-segment, piecewise vector field utilized during both SFM training and inference (Yang et al., 18 May 2025).

2. Construction of Intermediate States

The mechanism for intermediate state construction involves a two-component system: a coarse TTS generator p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)5 (conditioned on text or speaker embeddings) produces high-level hidden states p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)6 and a coarse mel-spectrogram p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)7, while a lightweight SFM head p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)8 predicts p0(X0)=N(0,I)p_0(X_0)=\mathcal N(0, I)9. Here, X1X_10 (intermediate state), X1X_11 (temporal position), and X1X_12 (variance) are inferred per frame and aggregated.

Projection of X1X_13 onto the CondOT path is performed via orthogonal projection: X1X_14 Then, employing Theorem 1 of (Yang et al., 18 May 2025), the exact CondOT-aligned state is found using

X1X_15

and sampling

X1X_16

This intermediate state is used as the starting point for downstream ODE integration.

3. Training Objective and Algorithmic Workflow

SFM's training loss X1X_17 consolidates both standard FM and auxiliary objectives to supervise the construction of the intermediate state and the estimation of its location:

  • Coarse mel L2-loss: X1X_18
  • Orthogonal projection loss: X1X_19
  • Time prediction loss: pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)0
  • Variance prediction loss: pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)1
  • Shallow flow matching loss: For pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)2 (scheduler), pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)3, where pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)4, pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)5.

Total loss: pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)6 Gradient-based optimization is performed on this objective, with detailed stepwise pseudocode enumerated in (Yang et al., 18 May 2025).

4. Inference Procedure and Computational Advantages

Inference in SFM is characterized by its initialization from the learned intermediate state pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)7, rather than white noise, focusing computation on the "latter" segment of the CondOT path. The procedure is as follows:

  1. Generate pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)8.
  2. Compute pt(XtX1)=N(μt(X1),σt(X1)2I)p_t(X_t|X_1) = \mathcal N(\mu_t(X_1), \sigma_t(X_1)^2 I)9.
  3. For SFM strength μt(X1)=tX1\mu_t(X_1) = t X_10, form rescaled variables as above.
  4. Sample μt(X1)=tX1\mu_t(X_1) = t X_11 and generate μt(X1)=tX1\mu_t(X_1) = t X_12.
  5. Solve μt(X1)=tX1\mu_t(X_1) = t X_13 for μt(X1)=tX1\mu_t(X_1) = t X_14, outputting μt(X1)=tX1\mu_t(X_1) = t X_15.

This higher-SNR initialization dramatically reduces the number of function evaluations required by adaptive ODE solvers. SFM with μt(X1)=tX1\mu_t(X_1) = t X_16 yields accelerations of μt(X1)=tX1\mu_t(X_1) = t X_17–μt(X1)=tX1\mu_t(X_1) = t X_18 compared to vanilla CFM using Dopri(5), Bogacki–Shampine(3), and other solvers on LJ Speech (Yang et al., 18 May 2025).

5. Integration with TTS Architectures

The SFM head is integrated as a light module after the coarse generator. It consists of two 1D-convolutional layers with ReLU and LayerNorm, followed by a linear layer outputting three channels per frame. These correspond to μt(X1)=tX1\mu_t(X_1) = t X_19, σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t0, and σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t1, with σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t2 and σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t3 subsequently mean-pooled and post-processed. Both the coarse and SFM heads are jointly trained until convergence, but only the SFM head and learned vector field σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t4 are required for inference (Yang et al., 18 May 2025).

6. Empirical Results

Quantitative assessment on LJ Speech, VCTK, and LibriTTS corpora demonstrates that SFM produces consistent improvements in synthesized speech naturalness, as measured by pseudo-MOS (PMOS) and word error rate (WER), across multiple TTS backbones (Matcha-TTS, StableTTS, CosyVoice). For example, on LJ Speech with Matcha-TTS, baseline PMOS is σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t5 and SFM (σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t6) achieves σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t7. Inference speed improvements of up to σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t8 are reported for Heun(2)-based solvers. Subjective CMOS preference studies further corroborate relative improvements (Yang et al., 18 May 2025).

7. Practical Considerations and Extensions

Appropriate tuning of SFM strength σt(X1)=1(1σmin)t\sigma_t(X_1) = 1 - (1 - \sigma_{\min}) t9 is critical for optimal performance, typically achieved through validation grid search over ϕt(X0)=(1t)X0+t(X1+σminX0)\phi_t(X_0) = (1-t) X_0 + t(X_1 + \sigma_{\min} X_0)0. The method requires a coarse generator capable of yielding high-fidelity mel-spectrogram estimates as a foundation. Ablations indicate that using ϕt(X0)=(1t)X0+t(X1+σminX0)\phi_t(X_0) = (1-t) X_0 + t(X_1 + \sigma_{\min} X_0)1 directly (SFM-c) results in collapse to ϕt(X0)=(1t)X0+t(X1+σminX0)\phi_t(X_0) = (1-t) X_0 + t(X_1 + \sigma_{\min} X_0)2, and omitting speaker embeddings (SFM-t) impairs zero-shot speaker similarity. Training hyper-parameters and data flows for SFM generalize across architectures and modalities, and the SFM concept is extensible to other CondOT-based FM setups and potentially to diffusion or super-resolution tasks (Yang et al., 18 May 2025).

Architecture PMOS (Baseline) PMOS (SFM, ϕt(X0)=(1t)X0+t(X1+σminX0)\phi_t(X_0) = (1-t) X_0 + t(X_1 + \sigma_{\min} X_0)3) WER (Baseline) WER (SFM) Speed-up (RTF)
Matcha-TTS (LJ) 4.217 4.257 3.308% 3.413% +47.6% -- +60.8% (solvers)
Matcha-TTS (VCTK) 4.026 4.106 1.534% 0.952%
CosyVoice (LibriTTS) 4.183 4.194 3.513% 3.810%

The empirical evidence supports the utility of SFM in reducing computational cost and improving output quality in coarse-to-fine generative frameworks.

References

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Shallow Flow Matching (SFM).