---
title: Latent Rectified Flow Models
url: https://www.emergentmind.com/topics/latent-rectified-flow
type: topic
---

# Latent Rectified Flow Models

Latent rectified flow is a class of generative and transport models that instantiates rectified-flow or flow-matching dynamics in a learned latent representation rather than directly in pixel, waveform, or token space. In the canonical formulation, a model learns a time-dependent velocity field on a latent variable \(z_t\) or on a latent-conditioned state \(s_t\), with training targets derived from straight-line interpolation between a simple source distribution and latent data, or between paired source and target latents. This yields deterministic ordinary differential equation (ODE) dynamics with linear reference paths, constant target velocities, and few-step sampling, while allowing the latent space to encode modality-specific structure such as semantics, physiology, acoustics, or spatio-temporal uncertainty [2209.03003]. Across recent work, latent rectified flow has been used for image generation and restoration, text generation and editing, room impulse response synthesis, precipitation nowcasting, remote-sensing change detection, PPG-to-ECG translation, and bidirectional autoencoding architectures such as RAC [2603.05925].

## 1. Definition, scope, and relation to rectified flow

Rectified flow, in the formulation of “Flow Straight and Fast,” learns a deterministic ODE that transports one distribution into another while making trajectories as straight as possible in Euclidean space [2209.03003]. Given a coupling \((X_0,X_1)\), the reference path is the linear interpolation
\[
X_t=(1-t)X_0+tX_1,
\]
and the optimal velocity field for the least-squares objective is the conditional mean
\[
v^X(x,t)=\mathbb{E}[X_1-X_0\mid X_t=x].
\]
The resulting rectified coupling preserves marginals and has provably non-increasing convex transport costs under rectification [2209.03003].

Latent rectified flow retains this ODE-and-linear-path structure but moves the dynamics into a learned latent space. The source variable may be Gaussian noise, a posterior-mean estimate, a source-domain latent, a teacher feature vector, or a latent-derived state; the target may be an encoded image, waveform, sentence, segmentation mask, or other structured latent. In most recent formulations, the training target remains the constant displacement between endpoints, while the learned vector field is conditioned on time and often on side information such as text, another modality, or historical frames. This makes latent rectified flow a broad design pattern rather than a single architecture.

The literature exhibits at least three recurring interpretations. First, latent rectified flow can mean a direct Gaussian-to-latent generator, as in PromptReverb’s conditional DiT for room impulse response latents, PPGFlowECG’s ECG-latent generator conditioned on PPG latents, ChangeFlow’s mask-latent synthesis, or RLFSeg’s image-to-mask latent transport [2510.22439] [2509.19774] [2605.15375] [2605.04590]. Second, it can mean transport between structured latent distributions, as in Language Rectified Flow, where source and target text domains are mapped in a VAE latent space, or Latent-PMRF, where the source is the latent of a posterior-mean restoration estimate [2403.16995] [2507.00447]. Third, it can denote a latent-augmented state-space bridge rather than a purely latent ODE, as in RAC, where the flow operates on a full-resolution state constructed from both latent and image representations [2603.05925].

This breadth suggests that latent rectified flow is best understood as rectified-flow-style transport in a representation space chosen to regularize geometry, reduce dimensionality, and better align optimization with the task-specific notion of structure or perception. That interpretation is explicit in several papers: PromptReverb argues that the latent space simplifies the generative problem for room acoustics [2510.22439], Latent-PMRF argues that a VAE latent better aligns with human perception in face restoration [2507.00447], and PG-LRF constructs a physiology-aware shared latent space before learning the rectified flow itself [2605.12541].

## 2. Mathematical formulation

The dominant formulation is the linear-interpolant ODE. Let \(z_0\) denote a source latent and \(z_1\) a target latent. The reference path is
\[
z_t=(1-t)z_0+t z_1,\qquad t\in[0,1],
\]
with constant target velocity
\[
\frac{d z_t}{dt}=z_1-z_0.
\]
A neural vector field \(v_\theta(z_t,t,\mathrm{cond})\) is trained by a flow-matching loss of the form
\[
\mathcal{L}_{\mathrm{RF}}=\mathbb{E}\left[\left\|v_\theta(z_t,t,\mathrm{cond})-(z_1-z_0)\right\|_2^2\right].
\]
This exact pattern appears in latent ECG generation conditioned on PPG [2509.19774], in multimodal room impulse response generation [2510.22439], in change-mask synthesis [2605.15375], in text-based segmentation [2605.04590], in precipitation nowcasting latents [2605.31204], and in physiology-guided ECG generation [2605.12541].

Sampling then integrates the deterministic ODE
\[
\frac{d z_t}{dt}=v_\theta(z_t,t,\mathrm{cond})
\]
from a simple initial condition, usually \(z_0\sim\mathcal{N}(0,I)\), to obtain a terminal latent that is decoded into the target modality. Several works use explicit Euler integration with a small number of steps, including PPGFlowECG, ChangeFlow, and RLFSeg [2509.19774] [2605.15375] [2605.04590]. PromptReverb instead uses an adaptive midpoint RK2 solver with a maximum 50 function evaluations and \( \mathrm{rtol}=\mathrm{atol}=10^{-5} \), together with cosine time reparameterization [2510.22439].

A second formulation replaces Gaussian-to-data generation by latent transport between observed source and target domains. Language Rectified Flow uses a VAE latent space for text and trains on pairs \((z_0,z_1)\) drawn from source and target corpora:
\[
\mathcal{L}_{\mathrm{FLOW}}=\mathbb{E}_{(z_0,z_1),\,t}\left[\left\|v_\theta(z_t,t)-(z_1-z_0)\right\|^2\right],\quad z_t=(1-t)z_0+t z_1,
\]
with Euler sampling over 10–20 steps in practice [2403.16995]. This is still rectified flow, but the source distribution is no longer necessarily Gaussian.

A third formulation modifies the state on which the ODE acts. RAC defines a deterministic ODE on a full-resolution state tensor \(s(t)\),
\[
\frac{d\mathbf{s}(t)}{dt}=\mathbf{v}_\theta(\mathbf{s}(t),t),
\]
where \(\mathbf{s}_0\) is a latent-derived initialization and \(\mathbf{s}^\ast\) is an image-like target state. The flow is coupled to latent space by padding, expansion, and downsampling operators, and the same velocity field is reused in reverse time as an encoder [2603.05925]. RAC also introduces a path-rectification loss that explicitly penalizes deviation from linear interpolation in state space, a latent alignment loss against a teacher VAE latent, pixel-level consistency with the teacher decoder, round-trip consistency, and an optional mean-velocity regularizer inspired by rectified flow [2603.05925].

Several papers augment the basic flow-matching loss with domain-specific structure. PromptReverb replaces plain \(L_2\) with a pseudo-Huber penalty for improved gradient stability in high-dimensional latent space [2510.22439]. PG-LRF adds simulator-based residual penalties on decoded ECG and on ECG-induced PPG, while keeping the latent rectified-flow objective intact [2605.12541]. ChangeFlow samples \(t\) from a logit-normal rather than a uniform distribution to emphasize the ambiguous middle of the trajectory [2605.15375]. These variations do not alter the core idea: a deterministic ODE trained to follow straight latent paths.

## 3. Latent-space constructions and representation choices

The decisive design choice in latent rectified flow is the meaning of “latent.” Recent work spans compressed generative latents, semantically aligned cross-modal latents, teacher feature vectors, state-space hybrids, and uncertainty-preserving spatio-temporal latents.

| Latent construction | Representative use | Example paper |
|---|---|---|
| VAE latent of data | Gaussian-to-data or conditional generation | PromptReverb [2510.22439] |
| Shared aligned cross-modal latent | PPG-conditioned ECG generation | PPGFlowECG [2509.19774] |
| Latent-augmented full-resolution state | Bidirectional auto-coder | RAC [2603.05925] |

In PromptReverb, the latent is the output of a VAE trained on mel-spectrogram representations of room impulse responses. The encoder produces 16 channels at 23.6 Hz, so a 5-second RIR yields 118 latent frames. Rectified flow operates purely in this latent space, while the frozen decoder reconstructs a 48 kHz full-band waveform [2510.22439]. In ChangeFlow, the latent is the SD-XL VAE encoding of a triplicated binary change mask, with spatial downsampling by a factor of 8 and latent dimension \(d=4\) [2605.15375]. In RLFSeg, both the image and the segmentation mask are encoded by the same Stable Diffusion VAE encoder, and the rectified flow is defined between the resulting image and mask latents [2605.04590].

Cross-modal biomedical work uses more structured latents. PPGFlowECG constructs a shared latent space with a CardioAlign Encoder, using a shared encoder, modality-specific decoders, latent distribution alignment, symmetric InfoNCE, and cross-modal reconstruction. The latent head outputs posterior parameters in \(\mathbb{R}^{L/32\times 4}\), and the flow model acts on this aligned latent rather than raw waveforms [2509.19774]. PG-LRF goes further by defining a Physiology-Aware AutoEncoder whose shared latent space is regularized by ECG–PPG phase delay consistency, global posterior alignment, contrastive alignment, and weak cross-decodability. The latent time series is then the substrate for the conditional rectified flow [2605.12541].

Other work treats latent space more abstractly. RestoRect defines rectified flow over 256-dimensional teacher feature vectors, separately for Retinex features and raw-image features, and interprets knowledge distillation itself as latent rectified transport in feature space [2509.23480]. Latent-PMRF defines the source as the latent of the posterior-mean image, \(z_0=\mathcal{E}(\mathbb{E}[X\mid Y])\), and the target as the latent of the high-quality image, \(z_1=\mathcal{E}(X)\), then trains a conditional flow-matching model on the latent interpolation [2507.00447]. Language Rectified Flow uses a text VAE latent space to move between source and target text domains by rectified ODE transport [2403.16995].

A recurring conclusion is that latent geometry materially affects both fidelity and tractability. Latent-PMRF explicitly argues that the VAE’s reconstruction error bounds the minimum distortion achievable by the latent-flow restoration pipeline [2507.00447]. FREUD, the first-stage model in precipitation nowcasting, uses a stochastic \(\tanh\) regularization to create bounded, smooth latents for a latent-space rectified-flow forecaster and shows that this uncertainty-preserving latent stage is beneficial for downstream probabilistic nowcasting [2605.31204]. RecTok shifts attention from latent points to latent trajectories: it treats the forward rectified-flow path \(x_t=(1-t)x_0+t x_1\) as the true training space of the diffusion transformer and enriches those trajectories semantically via VFM distillation [2512.13421]. This suggests that latent rectified flow should often be analyzed at the level of path geometry, not only endpoint representation.

## 4. Conditioning, bidirectionality, and path regularization

Conditioning in latent rectified flow is highly task dependent but structurally uniform: the velocity field takes the current latent state, time, and a conditioning signal. In PromptReverb the condition \(c\) includes text embeddings, audio features, and constant parameters, and classifier-free guidance is implemented by replacing \(c\) with learned unconditional embeddings with probability 0.2 during training and using guidance scale 6.0 at inference [2510.22439]. In PPGFlowECG, the flow network is a conditional Transformer whose evolving ECG latent attends to the PPG latent through cross-attention at every block [2509.19774]. PG-LRF keeps the same conditional pattern but makes the condition a physiology-aware PPG latent and augments training with ECG-side and ECG-to-PPG simulator consistency [2605.12541].

In computer vision, conditioning may be simpler but remains central. ChangeFlow computes
\[
\Delta F=\left|\mathrm{LN}(\Phi(I_1))-\mathrm{LN}(\Phi(I_2))\right|,
\]
resizes it to the VAE latent resolution, concatenates it with the current latent \(x_t\), and feeds the result to a DiT that predicts the latent velocity. The paper describes this as a “structured yet lightweight conditioning signal,” and ablations show that replacing absolute difference with signed difference or concatenation degrades performance [2605.15375]. RLFSeg conditions its rectified-flow UNet on text exactly as Stable Diffusion does, via frozen CLIP embeddings injected through cross-attention, but replaces the diffusion denoising task with velocity prediction between image and mask latents [2605.04590].

A notable line of work uses time reversal or bidirectionality. RAC explicitly reuses the same time-conditioned “Coder” in both directions: latent-to-image decoding is forward ODE integration, whereas image-to-latent encoding is numerical inverse integration with the same velocity field. The encoded latent is obtained by downsampling the recovered state, and the model is trained with latent alignment, pixel-level consistency, and round-trip losses. This yields nearly 41% parameter reduction relative to separate encoder–decoder designs while improving reconstruction and generation [2603.05925].

Path regularization is the mechanism by which “rectification” is often made explicit rather than implicit. RAC adds a decoding path loss forcing intermediate states to approximate linear interpolation between the latent-derived initial state and the target state, as well as an optional mean-velocity regularizer motivated by rectified-flow formulations [2603.05925]. RestoRect adds a trajectory consistency loss composed of a smoothness term across ODE steps, a target alignment term at the final step, and a semantic consistency term measured by cosine distance to teacher features [2509.23480]. Delta Rectified Flow Sampling, although focused on text-to-image editing rather than latent generation from scratch, highlights another dimension of path control: it introduces a time-dependent shift term that moves noisy target latents closer to the intended editing trajectory, and shows that setting the shift to zero recovers DDS while a linear schedule recovers FlowEdit as a strict special case [2509.05342]. This suggests that path shaping, not only endpoint supervision, is now a major axis of latent rectified-flow design.

## 5. Modalities, applications, and empirical behavior

Latent rectified flow now spans a wide range of modalities. In language, it provides a latent-space ODE alternative to diffusion language models: Language Rectified Flow reports 10–20 Euler steps in practice and approximately 26.7× speedup over a diffusion LM on a POS-control benchmark, while improving or matching task metrics on POS control, length control, infilling, and sentiment editing [2403.16995]. In acoustics, PromptReverb combines a VAE for RIR upsampling with a conditional rectified-flow DiT in latent space and reports 8.8% mean RT60 error for the XL long-prompt setting, compared with approximately \(-37\%\) underestimation for Image2Reverb [2510.22439].

In biomedical signal generation, latent rectified flow has become a central mechanism for PPG-to-ECG translation. PPGFlowECG shows that a standard rectified-flow baseline in raw signal space achieves Macro-AUROC 0.499 on MCMED, whereas the full aligned-latent method achieves 0.631, supporting the thesis that rectified flow alone is insufficient without a semantically aligned latent space [2509.19774]. PG-LRF strengthens that thesis by adding physiology-aware latent structure and simulator guidance, improving over PPGFlowECG on MC-MED in MAE, RMSE, FD, FID, HR MAE, and multiple morphology metrics, and raising downstream cardiovascular-disease classification from Macro-AUROC 0.545 with a PPG baseline to 0.633 using generated ECGs [2605.12541].

In image generation and restoration, latent rectified flow appears in several roles. RecTok uses latent-space rectified flow together with flow semantic distillation and reconstruction–alignment distillation, achieving state-of-the-art gFID-50K results with and without classifier-free guidance while observing consistent improvements as latent dimensionality increases [2512.13421]. Latent-PMRF reformulates Posterior-Mean Rectified Flow in VAE latent space for blind face restoration and reports a 5.79× speedup over PMRF in terms of FID convergence, while emphasizing that VAE design is crucial for both reconstruction and restoration [2507.00447]. RAC replaces the traditional VAE with a rectified-flow auto-coder and reports about 70% lower computational cost and nearly 41% fewer parameters while surpassing SOTA VAEs in both reconstruction and generation [2603.05925]. RestoRect reinterprets teacher-feature distillation as latent rectified-flow feature generation and reports lower FID with 3–4 steps than a DDIM-based baseline that needs 10+ steps to reach comparable quality [2509.23480].

In segmentation and change detection, latent rectified flow often appears as a discriminative alternative to diffusion. RLFSeg learns a direct latent mapping from image to segmentation mask with a one-step rectified-flow update and shows that one-step sampling is best; increasing to 2, 5, or 15 steps reduces performance [2605.04590]. ChangeFlow reformulates remote-sensing change detection as generative synthesis of a change-mask latent conditioned on feature differences between two images, reporting an average F1 of 80.4% across four benchmarks, improving by 1.3 points on average over the previous best method while maintaining inference speed comparable to recent strong baselines [2605.15375]. The model also supports sampling-based ensembling and confidence estimation through sample agreement [2605.15375].

In spatio-temporal forecasting, latent rectified flow has become a probabilistic forecaster rather than only a decoder. FREUD uses rectified flow both as a pixel-space generative decoder and as a latent-space forecasting transformer. The latent-space model is trained only on noised future latents while conditioning frames are kept clean, and the authors report state-of-the-art precipitation nowcasting on SEVIR together with calibrated ensemble uncertainty from repeated latent-flow sampling and repeated RF decoding [2605.31204]. This use case makes explicit that latent rectified flow can model aleatoric uncertainty despite deterministic ODE dynamics, because randomness enters through initial latent sampling and conditional generative decoding.

## 6. Limitations, misconceptions, and open directions

A common misconception is that latent rectified flow is merely “diffusion with fewer steps.” The cited work does not support that simplification. Rectified flow replaces score or noise prediction with direct velocity regression on prescribed paths; in several papers the training objective, path family, and solver behavior are substantively different from standard diffusion [2209.03003]. Another misconception is that operating in latent space automatically improves generation. Multiple studies indicate that latent construction is decisive: PPGFlowECG shows that raw-space rectified flow is ineffective without latent alignment [2509.19774], Latent-PMRF shows that the source latent must be the latent of the posterior mean rather than the posterior mean of latents if one wants to preserve the distortion argument [2507.00447], and PG-LRF shows that replacing a physiology-aware latent space with independent autoencoders degrades both waveform and physiological metrics [2605.12541].

Several limitations recur. Many systems depend on a pretrained or frozen first-stage model. RAC relies on a teacher KL-VAE and frozen teacher encoder to avoid latent collapse [2603.05925]. PromptReverb is a two-stage system with a frozen VAE decoder during rectified-flow training [2510.22439]. ChangeFlow uses a frozen SD-XL VAE and notes that this VAE was not tailored to binary masks, even though mask reconstruction is nearly perfect [2605.15375]. Latent-PMRF explicitly states that VAE reconstruction error bounds the minimum distortion of the overall method, making VAE design a bottleneck rather than a neutral component [2507.00447]. This suggests that first-stage representation learning remains a primary systems problem for latent rectified flow.

Another limitation is solver-path mismatch or instability under long horizons. RAC uses Euler integration with short horizons such as \(K=4\) and notes that long trajectories may require more careful numerical analysis [2603.05925]. ChangeFlow reports that repetitions in sampling help more than increasing ODE steps once a small step count is reached [2605.15375]. RLFSeg finds that multistep integration can trigger “path-crossing” effects because image and mask latents overlap in the shared VAE space, so one-step inference is actually preferable [2605.04590]. In beam prediction, the uniform-velocity assumption of rectified flow becomes less adequate on longer horizons, and a BeamLLM eventually surpasses the rectified-flow model on late prediction steps [2511.20265].

Conditioning and uncertainty also remain open areas. PromptReverb does not fully specify the exact conditioning injection mechanism inside the DiT [2510.22439]. ChangeFlow notes that latent RF is still heavier than the leanest discriminative models [2605.15375]. FREUD finds that classifier-free guidance, although standard in diffusion practice, is problematic for precipitation nowcasting because it systematically increases precipitation intensity and harms calibration [2605.31204]. These observations suggest that conditioning heuristics imported from diffusion are not automatically valid in latent rectified-flow systems.

The forward-looking direction that emerges from the literature is not a single replacement paradigm but a layered recipe. Learn a latent space that encodes the right invariants or semantics; define rectified ODE transport on that space with a path family compatible with the task; and, where available, add structural guidance such as bidirectional consistency, simulator residuals, feature distillation, or uncertainty-preserving decoding. The published work suggests that latent rectified flow is most effective when the latent space and the flow objective are co-designed, rather than when rectified flow is simply applied to an arbitrary compressed representation [2512.13421].

Source: https://www.emergentmind.com/topics/latent-rectified-flow