Papers
Topics
Authors
Recent
Search
2000 character limit reached

RestoRect: Latent Flow Restoration

Updated 14 July 2026
  • RestoRect is a deep learning framework that restores degraded images by synthesizing teacher-quality features through latent rectified flow.
  • It integrates Retinex theory, learnable anisotropic diffusion, and polarized color modeling to enhance texture, luminance, and color fidelity.
  • The system achieves superior performance on 15 datasets across 4 tasks with faster inference and improved quality metrics compared to traditional methods.

RestoRect is a degraded image restoration framework that addresses the trade-off between high-performance but slow models and fast but lower-quality models by recasting feature-level knowledge distillation as a latent rectified-flow problem. It is described as a “Latent Rectified Flow Feature Distillation” method in which a student network learns to synthesize teacher-quality features through learnable trajectories in latent space, while the overall restoration system combines Retinex theory, learnable anisotropic diffusion constraints, trigonometric color space polarization, and a Feature Layer Extraction loss for cross-normalized transformer feature alignment with percentile-based outlier detection (Verma et al., 27 Sep 2025). The reported scope is broad: 15 image restoration datasets, 4 tasks, and 8 metrics, with claimed improvements in training stability, convergence, inference speed, and restoration quality (Verma et al., 27 Sep 2025).

1. Problem setting and architectural objective

RestoRect is motivated by two limitations stated for existing restoration pipelines: high-performance models are too slow for practical use, and fast models produce poor results. Within this setting, knowledge distillation is treated as necessary but insufficient in its conventional form, because static feature matching cannot capture how modern transformer architectures dynamically generate features (Verma et al., 27 Sep 2025).

The central objective is for the student network to learn a small number of ODE integration steps that carry a Gaussian prior to the teacher’s high-quality features in a low-dimensional latent space. At layer ll, the teacher and student features are denoted by fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l} and fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}, where dld_l is the dimensionality after spatial-channel flattening of transformer features (Verma et al., 27 Sep 2025).

This design places the method at the interface of restoration, feature distillation, and flow matching. A plausible implication is that the framework is intended not merely to compress a teacher into a smaller student, but to change the geometry of the distillation problem from static alignment to trajectory learning in latent feature space.

2. Latent rectified flow formulation

The latent rectified flow component samples

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})

and defines the straight-line interpolation

xt=(1t)z+tfteachl,t[0,1].(1)\mathbf{x}_t=(1-t)\mathbf{z}+t\,\mathbf{f}_{\mathrm{teach}^l},\qquad t\in[0,1]. \tag{1}

Its velocity field is

v(xt,t)=dxtdt=fteachlz.(2)\mathbf{v}(\mathbf{x}_t,t)=\frac{d\mathbf{x}_t}{dt}=\mathbf{f}_{\mathrm{teach}^l}-\mathbf{z}. \tag{2}

A residual-MLP predictor ϵθ\epsilon_\theta is trained with the flow-matching objective

Lvel=Et,z,fteachlϵθ(xt,t,c)v(xt,t)22,(3)L_{\mathrm{vel}} = \mathbb{E}_{t,\mathbf{z},\mathbf{f}_{\mathrm{teach}^l}} \Bigl\| \epsilon_\theta\bigl(\mathbf{x}_t,t,\mathbf{c}\bigr) - \mathbf{v}(\mathbf{x}_t,t) \Bigr\|_2^2, \tag{3}

where c\mathbf{c} denotes conditioning from the student’s low-quality input (Verma et al., 27 Sep 2025).

The predictor fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}0 is specified as a small Residual MLP stacking 5 layers, each with LeakyReLU activations. At inference time, the ODE is solved by simple Euler steps,

fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}1

The reported empirical finding is that fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}2–5 suffices to match teacher-quality features, in contrast to “10+ steps for typical DDIM diffusion” (Verma et al., 27 Sep 2025).

A common misunderstanding would be to view this module as a conventional denoising diffusion surrogate. The formulation in fact uses rectified flow to learn straight-line latent transport and explicitly emphasizes a small-step ODE solver rather than a longer DDIM-style sampling chain.

3. Feature distillation and the FLEX loss

RestoRect’s feature distillation mechanism is the Feature Layer Extraction loss, abbreviated FLEX. Its stated motivation is that standard fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}3 or KL losses assume teacher and student feature distributions align in scale and outlier behavior; FLEX instead combines cross-normalization using student statistics, percentile-based outlier masking, and resolution-aware weighting (Verma et al., 27 Sep 2025).

For each layer fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}4, student statistics over spatial locations fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}5 are computed as

fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}6

Both teacher and student features are then normalized using student statistics: fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}7

Outlier handling is percentile-based. For channel fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}8 of layer fteachlRdl\mathbf{f}_{\mathrm{teach}^l}\in\mathbb{R}^{d_l}9, if fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}0 is the fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}1-th percentile of fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}2, the reliable-location mask is

fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}3

To prevent domination by high-resolution layers, the resolution-aware weight is

fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}4

The complete FLEX loss is

fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}5

In practice, fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}6 is chosen so that finer layers receive moderate emphasis, and FLEX is applied only in student-training Stage 2 when the signal-to-noise ratio fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}7 (Verma et al., 27 Sep 2025).

This suggests that the distillation mechanism is designed to remain stable under architecture mismatch and feature-scale mismatch, especially for transformer-based restoration systems whose internal representations may not be directly comparable layer by layer.

4. Physics-based decomposition and auxiliary constraints

RestoRect augments the latent distillation pipeline with physics-informed priors derived from Retinex decomposition. Each image fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}8 is factorized as

fstudlRdl\mathbf{f}_{\mathrm{stud}^l}\in\mathbb{R}^{d_l}9

Two separate U-Net decomposers, dld_l0 and dld_l1, are used for low- and normal-light pre-conditioning (Verma et al., 27 Sep 2025).

The anisotropic diffusion component uses the Perona–Malik operator

dld_l2

where dld_l3 is learnable. The texture and luminance losses are

dld_l4

dld_l5

For color modeling, the method introduces a polarized HVI color space intended to avoid HSV’s red-hue discontinuity. It defines

dld_l6

dld_l7

with dld_l8 learnable. The corresponding color loss is

dld_l9

The teacher’s total loss is

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})0

where

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})1

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})2

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})3

and

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})4

The stated combination of Retinex decomposition, anisotropic diffusion, and polarized color modeling indicates that restoration is not treated as purely data-driven regression, but as a constrained reconstruction problem with explicit texture, illumination, and chromatic structure (Verma et al., 27 Sep 2025).

5. Training protocol, inference regime, and reported results

The experimental program spans 4 tasks and 15 datasets: low-light restoration on LOL-v1, LOL-v2-real/syn, and SID; underwater restoration on UIEB and LSUI; backlit restoration on BAID; fundus restoration on FIE; unpaired settings on DICM, LIME, MEF, NPE, and VV; and contrast enhancement on SICE-Mix and SICE-Grad. The 8 primary metrics are PSNR\u2191, SSIM\u2191, FID\u2193, BIQI\u2193, UIQM\u2191, BRISQUE\u2193, CLIPQ\u2191, and LPIPS\u2193 (Verma et al., 27 Sep 2025).

Training is divided into teacher and student stages. Stage 1 trains the teacher for 15–20 epochs per dataset with early stopping on validation, using Adam with zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})5, learning rate zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})6, and batch size 16. Stage 2 contains two student phases. In Phase 1, the restoration net is frozen, the velocity predictors only are trained, learning rates satisfy zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})7, the duration is 10 epochs, and the loss is

zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})8

In Phase 2, end-to-end training uses learning rate zN(0,Idl)\mathbf{z}\sim\mathcal{N}(0,I_{d_l})9, 10 epochs, and

xt=(1t)z+tfteachl,t[0,1].(1)\mathbf{x}_t=(1-t)\mathbf{z}+t\,\mathbf{f}_{\mathrm{teach}^l},\qquad t\in[0,1]. \tag{1}0

with xt=(1t)z+tfteachl,t[0,1].(1)\mathbf{x}_t=(1-t)\mathbf{z}+t\,\mathbf{f}_{\mathrm{teach}^l},\qquad t\in[0,1]. \tag{1}1 and xt=(1t)z+tfteachl,t[0,1].(1)\mathbf{x}_t=(1-t)\mathbf{z}+t\,\mathbf{f}_{\mathrm{teach}^l},\qquad t\in[0,1]. \tag{1}2 (Verma et al., 27 Sep 2025).

The reported convergence profile is that the teacher typically converges in 500 K iterations, while students reach plateau in approximately 200 K iterations per phase. On an RTX 4090 / H100 GPU, inference time is approximately 156 ms per image for RestoRect with 3 rectified-flow steps and approximately 198 ms with 5 steps, compared with “DDIM (10+ steps): xt=(1t)z+tfteachl,t[0,1].(1)\mathbf{x}_t=(1-t)\mathbf{z}+t\,\mathbf{f}_{\mathrm{teach}^l},\qquad t\in[0,1]. \tag{1}3 ms+.” The paper states that 3–5 steps suffice to match or exceed 10-step DDIM outputs (Verma et al., 27 Sep 2025).

Quantitative results are given task by task. On LOL-v1, RestoRect is reported at PSNR 27.84, SSIM 0.945, FID 38.67, and BIQI 8.35, corresponding to “+2.49 dB vs RetiDiff,” “+0.079,” “–10.47,” and “–9.40,” respectively. On UIEB, the reported values are PSNR 25.88, SSIM 0.950, and UIQM 3.121, with gains “+1.76 dB,” “+0.040,” and “+0.033.” On BAID, the reported values are PSNR 27.67, SSIM 0.965, and FID 15.82, with “+4.48 dB” and “–11.65” for PSNR and FID. On FIE, BIQI is reported as 6.033 and CLIPQ as “0.503 vs 0.557.” For the unpaired datasets DICM through VV, BRISQUE improvements of 5–15 points are reported. For SICE-Mix and SICE-Grad, the values are PSNR 15.04/15.45, SSIM 0.667/0.715, with gains “+1.6/2.0 dB” (Verma et al., 27 Sep 2025).

Qualitative evidence is also summarized. The paper reports crisp edge preservation under extreme low-light, faithful color recovery in underwater scenes, and artifact-free backlit photos. In a blind user study with 20 images and 8 participants, RestoRect was preferred over RetiDiff and CIDNet in more than 60% of trials (Verma et al., 27 Sep 2025).

6. Scope, significance, and terminological ambiguity

Within image restoration, RestoRect denotes the latent rectified flow and feature distillation framework described above (Verma et al., 27 Sep 2025). The name, however, is not unique across arXiv-adjacent usage. In harmonic analysis, “RestoRect” is explicitly used to refer to “the problem of understanding exactly how the Fourier-restriction norms above a rectangular patch of the paraboloid depend on the aspect ratios of the patch,” in the context of rectangular-paraboloid restriction, sharpness by Knapp- and Kakeya-type examples, perturbations, and degenerate hypersurfaces (Schwend et al., 2019). It should also be distinguished from “RESTORE,” which is a visual token reduction framework for multimodal LLM inference that rectifies positional and attentional distortions by attention calibration and distinctive anchor selection (Cho et al., 1 Jun 2026).

This terminological overlap can obscure the specificity of the restoration framework. In the restoration setting, the defining features are the latent rectified-flow ODE, FLEX-based transformer feature alignment, Retinex-based decomposition, learnable anisotropic diffusion constraints, and trigonometric color space polarization (Verma et al., 27 Sep 2025). A plausible implication is that the term is best interpreted contextually: in computer vision restoration it names a student–teacher distillation architecture, whereas in harmonic analysis it names a restriction-theoretic problem over rectangles.

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 RestoRect.