Papers
Topics
Authors
Recent
Search
2000 character limit reached

SerpentFlow: Shared-Structure Domain Adaptation

Updated 12 January 2026
  • SerpentFlow is a framework that decomposes samples into shared low-frequency and domain-specific high-frequency components, enabling robust unpaired domain adaptation.
  • It leverages a classifier-based frequency cutoff selection to isolate invariant features and construct synthetic pseudo-pairs for conditional generative modeling.
  • Validation on super-resolution, fluid simulation, and climate downscaling tasks demonstrates superior reconstruction accuracy and domain alignment.

SerpentFlow (SharEd-structuRe decomPosition for gEnerative domaiN adapTation) is a generative framework introduced for unpaired domain alignment, specifically designed to operate in scenarios where two distinct domains exhibit shared underlying structure but do not offer paired observations. The central innovation lies in decomposing each sample into shared and domain-specific components within a latent space—typically the Fourier domain for tasks such as super-resolution—enabling the construction of synthetic "pseudo-pairs" for conditional generative modeling. Through a data-driven, classifier-based criterion for isolating invariant features common to both domains, SerpentFlow addresses the challenge of unsupervised cross-domain mapping by leveraging shared structural patterns for robust alignment and reconstruction (Keisler et al., 5 Jan 2026).

1. Mathematical Formulation

SerpentFlow models the source domain DA\mathcal{D}_A and the target domain DB\mathcal{D}_B as unpaired datasets with respective distributions pA(x)p_A(x) and pB(x)p_B(x) over a shared observation space X\mathcal{X}. The approach relies on a bijective encoder μ:X→Z\mu: \mathcal{X} \rightarrow \mathcal{Z} that provides an additive decomposition in the latent domain:

z=μ(x)=zshared+zspecificz = \mu(x) = z_{\mathrm{shared}} + z_{\mathrm{specific}}

where zshared∈Zsz_{\mathrm{shared}} \in \mathcal{Z}_s corresponds to the shared subspace (invariant structure) and zspecific∈Zdz_{\mathrm{specific}} \in \mathcal{Z}_d encapsulates domain-specific information. In super-resolution tasks, Z\mathcal{Z} is instantiated as the Fourier domain. The frequency cutoff ωc\omega_c partitions the latent subspace:

  • Zs={ω:∥ω∥<ωc}\mathcal{Z}_s = \{\omega: \|\omega\| < \omega_c\} (low frequencies)
  • Zd={ω:∥ω∥≥ωc}\mathcal{Z}_d = \{\omega: \|\omega\| \geq \omega_c\} (high frequencies)

The sample-level decomposition is

zshared=F−1[1∥ω∥<ωc⋅F{x}] zspecific=F−1[1∥ω∥≥ωc⋅F{x}]z_{\mathrm{shared}} = \mathcal{F}^{-1}[1_{\|\omega\|<\omega_c} \cdot \mathcal{F}\{x\}] \ z_{\mathrm{specific}} = \mathcal{F}^{-1}[1_{\|\omega\| \geq \omega_c} \cdot \mathcal{F}\{x\}]

Selection of ωc\omega_c is based on a discriminator Dϕ(x)∈[0,1]D_\phi(x) \in [0,1] trained to distinguish the domains using low-pass filtered samples x(ωc)x^{(\omega_c)}. The cutoff ωc∗\omega_c^* is chosen as the minimum value for which the discriminator's classification accuracy drops to chance (≈0.5\approx 0.5), indicating maximal removal of domain-specific information in the shared space.

2. Generative Model and Training Procedure

With ωc∗\omega_c^* fixed via the classifier-based criterion, SerpentFlow constructs pseudo-pairs for generative modeling:

  • For a target-domain sample xt∈DBx_t \in \mathcal{D}_B, synthesize

x~t=F−1[1∥ω∥<ωc∗⋅F{xt}+1∥ω∥≥ωc∗⋅F{ε}]\tilde{x}_t = \mathcal{F}^{-1}[1_{\|\omega\|<\omega^*_c} \cdot \mathcal{F}\{x_t\} + 1_{\|\omega\| \geq \omega^*_c} \cdot \mathcal{F}\{\varepsilon\}]

with ε∼N(0,I)\varepsilon \sim \mathcal{N}(0, I). This preserves the shared low frequencies and replaces high-frequency content with noise.

  • The pairs (x~t,xt)(\tilde{x}_t, x_t) are used for conditional generative training. The conditional distribution p(xt∣zshared)p(x_t | z_{\mathrm{shared}}) is modeled via continuous-time flow matching:

dx(t)dt=vθ(x(t),t),x(0)=x~t,x(1)=xt\frac{dx(t)}{dt} = v_\theta(x(t), t), \quad x(0) = \tilde{x}_t, \quad x(1) = x_t

with linear interpolation:

u(t)=(1−t)x~t+txtu(t) = (1-t)\tilde{x}_t + t x_t

  • The flow-matching loss [Lipman et al. '23] is:

LFM(θ)=Et∼Unif[0,1],(x~t,xt)[∥vθ(u(t),t)−(xt−x~t)∥2]L_{\mathrm{FM}}(\theta) = \mathbb{E}_{t \sim \mathrm{Unif}[0,1], (\tilde{x}_t, x_t)} \left[ \|v_\theta(u(t), t) - (x_t - \tilde{x}_t)\|^2 \right]

  • Architecture: vθv_\theta is parameterized as a U-Net, conditional on zsharedz_{\mathrm{shared}} via FiLM or concatenation.

The total loss consists of the discriminator loss LD(ϕ;ωc)L_D(\phi; \omega_c) (for cutoff selection) and the generative flow-matching loss LFM(θ)L_{\mathrm{FM}}(\theta) (for high-resolution sample reconstruction). A standard reconstruction loss can also be included in principle.

3. End-to-End Pipeline

The SerpentFlow pipeline proceeds in sequential phases:

Phase Operation Purpose
A Classifier-based cutoff selection Identify ωc∗\omega_c^* for shared-structure decomposition
B Pseudo-pair construction in target domain Enable conditional modeling with synthetic pairs
C Train conditional flow-matching model Learn p(xt∣zshared)p(x_t | z_{\mathrm{shared}})
D Inference: map source-domain input to target domain Generate aligned target-domain sample from source input

After training, inference on DA\mathcal{D}_A involves extracting the low-pass component zsz_s using ωc∗\omega^*_c, sampling random high-frequency noise ε\varepsilon, synthesizing the starting point x~\tilde{x}, and integrating the learned flow ODE to obtain the corresponding target-domain sample.

4. Experimental Validation and Results

SerpentFlow is validated on three unpaired super-resolution and downscaling tasks:

  • MRBI Synthetic Images (28×28 handwritten-digit backgrounds):
    • DA\mathcal{D}_A: low-pass filtered (cutoff ωc=4\omega_c=4), DB\mathcal{D}_B: full MRBI.
    • Metrics: digit-recognition accuracy (fine-tuned ResNet-18), domain-classification accuracy (new discriminator).
    • Compared to Dual FM and Diffusion Bridge baselines:
    • Digit accuracy: 88.6%88.6\% (SerpentFlow) vs. 41.3%41.3\% (best baseline)
    • Domain-classification: 50%50\% (chance) for SerpentFlow, >95%>95\% for baselines
    • Qualitative: preservation of digit shapes and plausible fine-grained backgrounds.
  • Fluid-Simulation Super-Resolution (64→\rightarrow512 grid):
    • DA\mathcal{D}_A: coarse 64×64 fields, DB\mathcal{D}_B: high-resolution 512×512 fields (wavenumbers k∈{2,4,8,16}k\in\{2,4,8,16\}).
    • Metrics: temporal-mean trajectories, probability densities, azimuthally-averaged power spectral densities.
    • For k=8k=8, SerpentFlow best matches true temporal dynamics and spectral properties, avoiding artifacts present in alternatives.
  • Climate Downscaling (CMIP6 GCM→\rightarrowERA5 winds over France):
    • Downscaling from 1.875∘×1.25∘1.875^\circ \times 1.25^\circ to 0.25∘×0.25∘0.25^\circ \times 0.25^\circ, daily fields.
    • Metrics:
    • Kolmogorov–Smirnov (KS) statistic: 0.0253 (SerpentFlow) vs. 0.0249 (Dual FM) vs. 0.251 (Diffusion Bridge)
    • Correlation-score bias: 0.052 (SerpentFlow), 0.045 (Dual FM), 0.293 (Bridge)
    • Temporal RMSE: 0.031 (SerpentFlow), 1.226 (Dual FM)
    • Nash–Sutcliffe efficiency (NSE): 0.982 (SerpentFlow), 0.291 (Dual FM)
    • Qualitative: recovery of terrain-induced correlation patterns and preservation of interannual variability.

5. Theoretical Insights and Extensions

SerpentFlow’s shared-structure decomposition transforms the unpaired alignment problem into a conditionally paired setting by isolating invariant signal content (large-scale or low-frequency structure). This framework enables conditional generative models to focus learning capacity on domain-specific variability while maintaining global consistency across domains.

The classifier-based cutoff selection is inherently data-driven and adapts flexibly to any domain pair with shared latent structure in frequency or other transform domains. Although instantiated here in the Fourier domain, the approach admits extensions to multi-scale or wavelet decompositions, as well as learned encoder representations for the latent domain.

SerpentFlow is agnostic to the specific conditional generative model: the flow-matching objective can be replaced by other frameworks, such as conditional GANs, conditional diffusion models, or normalizing flows, so long as the construction of pseudo-pairs via the shared/component decomposition is preserved.

Potential future directions include adapting the methodology to temporal upsampling, video frame interpolation, and more general structured signal reconstruction tasks. A plausible implication is that shared-structure decomposition may serve as a unifying principle for generative unpaired domain adaptation across a range of modalities (Keisler et al., 5 Jan 2026).

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 SerpentFlow (SharEd-structuRe decomPosition for gEnerative domaiN adapTation).