Manuscript Offprint
arXiv:2610.30685Learning Domain Trajectories with Flow Matching for Gradual Domain Adaptation
Abstract
Large distribution shifts remain a primary obstacle for domain generalization and unsupervised adaptation. Although gradual domain adaptation alleviates this difficulty by introducing ordered intermediate domains, most existing approaches still operate in a discrete, step-wise manner, which can accumulate errors and often relies on unstable Min–Max optimization. We propose FlowGDA, a flow-matching framework that models gradual adaptation as continuous transport on a statistical manifold in a representation space. FlowGDA learns time-dependent velocity fields that induce smooth domain trajectories, using a simulation-free regression objective rather than adversarial training. To prevent semantic drift, we couple left-to-right transport between consecutive domains with a source-anchored transport and a semantic consistency loss, and we further stabilize learning via a two-stage sequential optimization scheme. Extensive experiments demonstrate that our method outperforms state-of-the-art techniques, validating flow matching as an effective alternative for domain adaptation.
1 Introduction
Machine learning models often suffer from performance degradation under domain shift, where the test distribution differs from the training distribution [24, 3, 2]. Although traditional domain adaptation methods align a labeled source domain with an unlabeled target domain [10, 19, 31], direct alignment becomes unreliable when the distribution gap is large, as illustrated in Fig. 1. Gradual domain adaptation (GDA) mitigates this issue by introducing ordered intermediate domains, decomposing a large shift into a sequence of smaller transitions. This setting has strong theoretical support, with

Figure 1: Motivation of gradual domain adaptation under large distribution shifts. Gradual domain adaptation introduces intermediate domains to form a smooth transition path, reducing the discrepancy between consecutive domains and facilitating stable knowledge transfer.
*Yubo Huang and Yushe Cao contributed equally to this work.
Co-corresponding author: Jingzehua Xu (u3014074@connect.hku.hk).
Primary corresponding author: Xiongyu Hu (huxiongyu@swjtu.edu.cn).
Preprint.
intermediate domains shown to substantially improve generalization bounds over direct adaptation [33].
Despite its promise, existing GDA methods typically treat domain evolution as a discrete sequence of adaptation steps. Such stepwise procedures may accumulate errors and fail to capture the smooth geometric structure of distribution shifts [23]. Many methods also rely on adversarial training [10, 31] or complex optimal-transport optimization [32, 25, 37, 38], which can be unstable or computationally demanding in high-dimensional representation spaces [12, 22]. These limitations motivate a stable and efficient framework for learning continuous domain trajectories.
Flow matching [18] offers a natural alternative. By directly regressing velocity fields of continuous normalizing flows [5, 26, 41], it avoids simulation-heavy or adversarial objectives, and its extensions to Riemannian manifolds [6, 4] make it suitable for structured representation spaces. Motivated by this, we propose FlowGDA, a flow-matching framework that views gradual domain adaptation as continuous transport on a statistical manifold [7]. Instead of adversarially aligning domains, FlowGDA learns velocity fields that move representations along smooth trajectories while preserving semantic information. Our contributions are summarized as follows:
• We formulate gradual domain adaptation as flow matching on a statistical manifold, enabling continuous representation transport without adversarial training.
• We design a simulation-free objective with dual source-to-intermediate and intermediate-to-target flows, together with semantic consistency regularization to reduce drift.
• We provide theoretical analysis bounding the target error and show through experiments on multiple benchmarks that FlowGDA improves accuracy, stability, and efficiency over existing GDA methods.
2.1 Gradual Domain Adaptation
Gradual domain adaptation addresses large domain gaps by exploiting ordered intermediate domains. Early theory showed that self-training over intermediate domains can outperform direct adaptation when consecutive shifts are small, while later analyses established tighter bounds and characterized optimal adaptation paths [33, 42]. Algorithmically, existing methods construct or exploit intermediate domains through optimal transport, manifold-constrained robust optimization [23], graph-based adaptation [17], and domain osmosis [34, 35]. However, most approaches still treat the domain path as a discrete sequence, which may accumulate errors and underuse the smooth structure of gradual distribution evolution. Our work instead models this evolution as a continuous flow in representation space.
2.2 Optimal Transport for Domain Adaptation
Optimal transport provides a geometric framework for comparing and aligning probability distributions [32, 25, 39]. It has been widely used in domain adaptation to learn transport plans that map source samples to target samples while preserving class structure [8]. Wasserstein-based methods further connect optimal transport with adversarial learning, including Wasserstein GANs [1, 13] and domain adaptation methods such as WDGRL [28]. Although these methods offer meaningful distributional geometry, they often require costly transport computation or adversarial optimization with difficult Lipschitz constraints, especially in high-dimensional feature spaces [22, 11]. FlowGDA keeps the geometric transport perspective while replacing adversarial alignment with simulation-free velocity-field regression.
3 Problem Formulation
Preliminary Note. In this manuscript, we focus on representation-level flow modeling for gradual domain adaptation (GDA). We follow the standard GDA assumption that the source domain, the intermediate domains, and the target domain are ordered along a gradual adaptation path. This assumption is used to decompose a large source-to-target shift into a sequence of smaller local shifts, rather than to introduce additional supervision on the intermediate or target domains.
Gradual domain adaptation considers a labeled source domain , a sequence of unlabeled intermediate domains , and an unlabeled target domain . Here, is the -th source input, is its label, is the number of labeled source samples, denotes the input space, and denotes the label space. The integer denotes the number of source-to-target transition intervals, so that the complete domain chain can be written as , with and . We use , and both to denote empirical domains and, when they appear inside expectations, their underlying data distributions.
The domains are ordered such that consecutive distribution shifts are milder than the direct source-to-target shift. The goal is to learn a classifier , where maps an input into a representation space , maps a representation to a label prediction, and denotes function composition. The target error is defined as
where is an input-label pair from the target domain, is used only for evaluation, denotes expectation, and is the indicator function that equals one when its argument is true and zero otherwise. The subscript in denotes the target domain, while the scalar introduced later denotes continuous transport time.
FlowGDA views representations from different domains as lying near a shared statistical manifold. Under this view, domain shift corresponds to movement along the manifold, and gradual adaptation amounts to learning smooth velocity fields that transport representations across neighboring domains while preserving task-relevant semantics.

Figure 2: Domain evolution on a statistical manifold. Discrete steps can accumulate errors, while the continuous flow transports toward .
4 Methodology
FlowGDA formulates gradual domain adaptation as continuous transport in representation
space. As shown in Fig. 2, discrete stepwise adaptation may accumulate local misalignment along the domain path. FlowGDA instead models domain evolution as a smooth trajectory on a statistical manifold, governed by a time-dependent velocity field .
This velocity field is learned through flow matching, avoiding adversarial optimization and trajectory simulation. Fig. 3 summarizes the framework, including dual flow-matching losses, semantic consistency regularization, and two-stage sequential optimization over consecutive domain pairs.
4.1 Flow Matching for Domain Transport
We first describe the basic transport between two consecutive domains. Let and denote the current “left” domain and the next “right” domain, respectively. The subscripts and are mnemonic: refers to the departure domain in the current adaptation step, and refers to its neighboring destination domain. For samples and , the trainable encoder maps them to , , where are their representations, is the representation space, is the -dimensional Euclidean space, and is the representation dimension.
A time-dependent velocity field induces a continuous flow map through the ordinary differential equation
where is the initial representation, is the transport time, is the representation reached at time , and denotes the trainable parameters of the velocity network. The derivative describes the instantaneous movement of the representation along the flow.
Rather than simulating the ODE during training, FlowGDA adopts conditional flow matching. Given a paired representation , we define the deterministic interpolation path

Figure 3: Overview of FlowGDA. FlowGDA models gradual domain transport with source-to-left and left-to-right velocity fields, enforces semantic consistency using a fixed source classifier, and trains sequentially over domain pairs with curriculum-based two-stage optimization.
Here, is the intermediate representation at transport time ; when , the path starts from , and when , the path reaches . Equivalently, this interpolation induces the degenerate conditional distribution
where denotes the conditional distribution of the intermediate representation at time , and is the Dirac delta distribution concentrated at the interpolated point.
The velocity that exactly generates the path in Equation (3) is
Here, denotes the ideal conditional velocity, and is the displacement from the left-domain representation to the right-domain representation. Based on this observation, the flow matching loss is
where is the flow matching objective, Unif[0, 1] is the uniform distribution on [0, 1], is the coupling between representations from and , and denotes the Euclidean norm.
4.2 Manifold-Aware Flow Matching
Although Equation (3) is written as a Euclidean interpolation, domain representations usually concentrate near a lower-dimensional statistical manifold embedded in Z.A velocity field that only observes and t may ignore where the current transport step lies along the global source-to-target trajectory. To address this issue, FlowGDA conditions the velocity field on both a destination representation and normalized domain coordinates.
For the ordered chain , each domain is assigned a normalized coordinate , , where is the domain index, is the total number of transition intervals, and indicates the relative position of along the gradual path. For a consecutive pair and , we write and . The source coordinate is denoted by .
We parameterize the manifold-aware velocity field as
where is the current representation to be transported, is a conditioning representation sampled from the destination domain, is the normalized coordinate of the departure domain, is the normalized coordinate of the destination domain, and denote generic departure and destination indices, and is the local transport time. The time and domain coordinates are embedded using sinusoidal features:
(8) where is a scalar coordinate, is the number of frequency components, indexes the frequency component, is the -th frequency scale, and denotes concatenation over all frequency components. The symbol in is the circle constant and is distinct from the coupling in Equation (6). In implementation, the embeddings of , , and are used as conditioning signals for .
4.3 Dual Flow Architecture
For each adaptation step, FlowGDA uses two velocity fields. The first velocity field, denoted by , transports representations from the current domain to the next domain . The second velocity field, denoted by , transports source representations from the source domain to the current domain . Here, and are the trainable parameters of the left-to-right and source-to-left velocity networks, respectively.
The left-to-right flow captures the local distribution shift between neighboring domains, while the source-to-left flow provides a semantic anchor from the labeled source domain. For a departure representation , a destination conditioning representation , and the corresponding domain coordinates and , we approximate the endpoint of the transport by
where is the transport map from domain coordinate to domain coordinate , is the representation being transported, is the destination-side conditioning representation, denotes the parameters of the velocity field from domain to domain , and the final argument 1 denotes full transport time.
4.4 Training Objective
We now instantiate the above formulation for mini-batch training. At an adaptation step from to , let denote the -th labeled source sample, denote the -th unlabeled sample from the current domain , and denote the -th unlabeled sample from the next domain . We compute
where is the fixed source encoder, is the trainable encoder, and are the source, current-domain, and next-domain representations. The label is available only for the source sample.
For the left-to-right flow, the interpolated representation is
where the superscript denotes the left-to-right path, the subscript denotes the mini-batch sample index, and denotes the sampled transport time. The corresponding flow matching objective is
where is the left-to-right loss, denotes expectation over and the mini-batch index , is the destination conditioning representation, and are the normalized coordinates of the current and next domains, and is the target displacement.
For the source-to-left flow, we similarly define
where the superscript denotes the source-to-left path from the fixed source representation to the current-domain representation . The source-to-left flow matching loss is
where is the source-to-left loss, is the source-domain coordinate, is the current-domain coordinate, is the destination conditioning representation, and is the target displacement from the source representation to the current-domain representation.
To preserve semantic information during gradual adaptation, we introduce a curriculum coefficient that controls the strength of source-to-left transport:
where is the partially transported source representation. When , and no source-to-left movement is applied; when , the source representation is fully transported toward the current domain according to . The scalar in this curriculum term is distinct from the conditional path distribution in Equation (4).
The semantic consistency loss is defined as
where is the classification-based semantic loss at curriculum level , denotes expectation over source samples in the mini-batch, is the fixed source classifier, and denotes the cross-entropy loss between the prediction and the source label . The classifier serves as the semantic head used to preserve source-discriminative structure during adaptation.
The total objective at curriculum level is
where is the overall training loss and balances flow matching with semantic consistency.
Finally, FlowGDA proceeds sequentially along the ordered domains . For each consecutive pair , we first optimize the velocity fields and while freezing the encoder , so that the local transport directions can be estimated in a stable representation space. We then freeze the learned velocity fields and update the encoder using the curriculum-controlled objective in Equation (17). During this stage, the curriculum coefficient is gradually increased from 0 to 1, allowing the model to move from source-preserving representations toward the next domain without abruptly losing semantic consistency. The complete procedure is summarized in Algorithm 1.
Algorithm 1 FlowGDA
Require: 1: Cache: 2: for to do 3: 4: ; reset 5: for do 6: Freeze ; update 7: Freeze ; update 8: end for 9: end for 10: return Adapted
Table 1: Target-domain accuracy (%) on four GDA benchmarks; "N/A" means not reported.
| Category | Method | Rotated MNIST | Color-Shift MNIST | Portraits | Cover Type |
|---|---|---|---|---|---|
| UDA | DANN [10] | 44.2 | 56.5 | 73.8 | N/A |
| DeepCORAL [30] | 49.6 | 63.5 | 71.9 | N/A | |
| DeepJDOT [20] | 51.6 | 65.8 | 72.5 | N/A | |
| Gradual | GST [16] | 83.8 | 74.0 | 82.6 | 73.5 |
| GOAT [14] | 86.4 | 91.8 | 83.6 | 69.9 | |
| AST [29] | 90.6 | N/A | 84.8 | N/A | |
| CNF [27] | 62.6 | N/A | 84.6 | N/A | |
| Ours | FlowGDA | 97.0 | 99.2 | 87.6 | 76.1 |
5 Experiments
5.1 Experimental Setup
Datasets. Following the standard gradual domain adaptation (GDA) protocol, FlowGDA is evaluated on four benchmarks covering complementary domain trajectories. Rotated MNIST captures smooth geometric shift through increasing rotation angles; Color-Shift MNIST captures appearance shift through gradual changes in color statistics; Portraits captures real-world temporal drift across decades; and Cover Type evaluates tabular covariate shift in structured feature space. For each benchmark, domains form an ordered chain according to the natural shift parameter. Only the source domain is labeled, while intermediate and target domains are unlabeled during adaptation. All methods are trained sequentially along the chain.
Baselines. FlowGDA is compared with direct unsupervised domain adaptation baselines, including DANN [10], DeepCORAL [30], and CDAN [20], as well as gradual adaptation methods including GST [16], GOAT [14], AST [29], and CNF [27].
Architectures and optimization. All methods are implemented in PyTorch. Image benchmarks use a three-layer CNN encoder followed by a two-layer fully connected classifier, while Cover Type uses a three-layer MLP. Velocity fields are implemented as 4-layer residual MLPs with hidden dimension 512. AdamW [21] is used with learning rates for velocity networks and for the encoder. The classification weight is set to . Models are trained for 10 epochs per domain pair with batch size 64 on NVIDIA RTX 5090 GPUs.
5.2 Results
FlowGDA achieves the best performance across all four benchmarks. Compared with the strongest reported gradual baseline, FlowGDA improves target accuracy by +6.4 points on Rotated MNIST, +7.4 on Color-Shift MNIST, and +2.8 on Portraits; on Cover Type, it outperforms GST by +2.6 points. Direct UDA baselines perform substantially worse under large shifts, confirming the importance of intermediate domains. These results show that modeling gradual adaptation as continuous representation transport provides consistent gains over both direct alignment and discrete gradual adaptation.
On Rotated MNIST, the effect of intermediate-domain choice is further evaluated by fixing the source at and the target at , while varying a single intermediate domain . As shown in Fig. 4(a), intermediate angles near the midpoint of the source-target path, around , yield the highest and most stable accuracy, whereas very small or overly large intermediate shifts lead to lower accuracy and higher variance. Fig. 4(b) further shows that direct source-to-target adaptation performs worst, indicating that intermediate domains are essential for large shifts, while their quality further affects stability and final performance.
5.3 Ablation Study
To better understand how different components contribute across different types of domain shifts, we conduct a dataset-wise ablation study by removing one component at a time from FlowGDA. Table 2 reports the target accuracy on each benchmark, with the accuracy drop relative to the full model shown in parentheses. The effect of each component is not uniform across datasets. Removing the semantic consistency loss causes the largest degradation on average, especially on Portraits and Cover Type, where preserving class semantics under complex temporal or tabular covariate shifts is more challenging. The single-flow variant also suffers larger drops on the real-world and tabular datasets, indicating that source-anchored transport provides useful regularization beyond local left-to-right adaptation. Manifold-aware conditioning improves over time-only velocity parameterization across all datasets, while the two-stage optimization strategy consistently yields more stable final performance than joint optimization.
6 Theoretical Analysis
In this section, we theoretically explain why modeling gradual domain adaptation as a continuous transport trajectory leads to stable optimization and reduced error accumulation. Our analysis connects flow matching to optimal transport on representation distributions and derives a generalization bound for the target domain under gradual shifts.
(a) Intermediate-domain sensitivity

Rotation angle of intermediate domain
(b) Worst intermediate vs. no intermediate
Setting
Figure 4: Rotated MNIST sensitivity to intermediate-domain choice. (a) Accuracy vs. intermediate rotation (mean±std over five runs). (b) Removing the intermediate domain causes the largest degradation.
Table 2: Dataset-wise ablation study: target accuracy (%) with drops from full FlowGDA in parentheses.
| Variant | Rotated MNIST | Color-Shift MNIST | Portraits | Cover Type | Avg. Δ (pp) |
|---|---|---|---|---|---|
| FlowGDA (full) | 97.0 | 99.2 | 87.6 | 76.1 | - |
| Single flow | 95.5 (-1.5) | 98.0 (-1.2) | 85.6 (-2.0) | 73.6 (-2.5) | -1.8 |
| w/o semantic loss | 95.0 (-2.0) | 97.6 (-1.6) | 84.8 (-2.8) | 73.3 (-2.8) | -2.3 |
| Time-only velocity | 95.8 (-1.2) | 98.2 (-1.0) | 85.7 (-1.9) | 74.2 (-1.9) | -1.5 |
| Joint optimization | 96.3 (-0.7) | 98.6 (-0.6) | 86.5 (-1.1) | 74.9 (-1.2) | -0.9 |
6.1 Generalization Error Bounds for Flow-Based Gradual Adaptation
Let be ordered domains. For each domain , let denote the marginal distribution over inputs and the pushforward distribution in representation space induced by encoder .
We analyze expected risk with a Lipschitz surrogate loss. Let be a bounded loss (e.g., cross-entropy or margin loss), and assume it is -Lipschitz w.r.t. for hypotheses in .
Definition 6.1 (Wasserstein Discrepancy in Representation Space). For two distributions on , the Wasserstein-1 distance is
Lemma 6.2 (Risk Difference Controlled by ). Assume is -Lipschitz in for all and . Then for any and any two domains ,
where .
Lemma 6.2 implies that controlling the Wasserstein discrepancy between representation distributions directly bounds the change in expected risk across domains.
Theorem 6.3 (Target Risk Bound under Gradual Shifts). Let be ordered domains and . Then the target risk satisfies
where is the ideal joint error term.
Remark 6.4 (Error Accumulation in Discrete Adaptation). Theorem 6.3 makes explicit that gradual adaptation succeeds when the sum of consecutive discrepancies is small. Methods that perform discrete, independently-estimated alignments can introduce local mismatch at each step, effectively enlarging and causing accumulation. Our continuous-flow modeling aims to reduce such stepwise mismatch by learning a coherent transport trajectory.
6.2 Flow Matching Controls Wasserstein Transport Cost
We now connect our flow objective to optimal transport. Let be two distributions on Z and consider a time-dependent velocity field generating a flow by
Definition 6.5 (Benamou–Brenier Transport Energy). For a velocity field that transports to along a path , define the transport energy
Lemma 6.6 (Dynamic OT Upper Bound). For any admissible transport from P to Q, we have
Lemma 6.6 indicates that learning a low-energy velocity field implies a small Wasserstein-2 distance. Theorem 6.7 (Per-Step Discrepancy Control via Flow Matching). Consider two consecutive domains and with representation distributions and . Assume the learned velocity field induces a transport path between them. Then
Moreover, minimizing the flow matching objective yields a small empirical estimate of up to approximation and estimation errors.
Corollary 6.8 (From Flow Loss to Target Risk). Under the assumptions of Theorem 6.3 and Theorem 6.7, if for all , then
(25)
6.3 Semantic Consistency via Source-Anchored Transport
Our training includes the source-anchored classification term to preserve label information during transport. Let denote the probability assigned to the true class by the fixed source classifier .
Lemma 6.9 (Classification Loss Bounds Misclassification Probability). Let be the per-sample cross-entropy loss. Then for any random pair ,
Theorem 6.10 (Label Preservation under Source-to-Intermediate Flow). Let be the transported representation from the source to an intermediate domain induced by , and let . Then the misclassification probability after transport is bounded by
Theorem 6.10 formalizes that minimizing preserves semantic structure along the learned transport.
6.4 Why Flow Matching is More Stable than Adversarial Alignment
Adversarial domain alignment solves a min–max problem, whose convergence depends on discriminator optimality and Lipschitz enforcement, often leading to oscillatory dynamics in high-dimensional representation spaces. In contrast, flow matching reduces transport learning to a single-level regression objective, producing unbiased gradients and avoiding saddle-point instability.
Remark 6.11 (Optimization Landscape). Flow matching optimizes , a standard supervised regression objective, whereas adversarial alignment optimizes , which can exhibit multiple equilibria and sensitivity to critic capacity. This difference explains the empirically observed stability and faster convergence of our method.
7 Conclusions
This work introduced FlowGDA, a flow-matching framework for gradual domain adaptation. By modeling domain evolution as continuous transport on a statistical manifold, FlowGDA learns velocity fields that move representations across domains through a simulation-free regression objective, avoiding adversarial optimization. Experiments on multiple benchmarks show that FlowGDA consistently outperforms existing gradual adaptation methods, demonstrating the effectiveness of continuous representation transport for large domain shifts.
Acknowledgments
This research was supported by the National Key R&D Program of China (No. 2024YFB2606101), the National Natural Science Foundation of China (No. 52478418), and the Sichuan Science and Technology Program (No. 2025ZNSFSC1294).
Competing Interests
The authors declare no competing interests.
References
[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International Conference on Machine Learning, pages 214–223. PMLR, 2017.
[2] Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine Learning, 79(1):151–175, 2010.
[3] Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1798–1828, 2013.
[4] Ricky TQ Chen and Yaron Lipman. Riemannian flow matching on general geometries. In International Conference on Learning Representations, 2023.
[5] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems, pages 6571–6583, 2018.
[6] RT Chen and Yaron Lipman. Riemannian flow matching on general geometries. 2023. ArXiv preprint ArXiv230203660.
[7] Chaoran Cheng, Jiahan Li, Jian Peng, and Ge Liu. Categorical flow matching on statistical manifolds. Advances in Neural Information Processing Systems, 37:54787–54819, 2024.
[8] Nicolas Courty, Rémi Flamary, Devis Tuia, and Alain Rakotomamonjy. Optimal transport for domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(9):1853–1865, 2017.
[9] Enguang Fan, Yifan Chen, Zihan Shan, Klara Nahrstedt, Matthew Caesar, and Jae Kim. Communication-aware multi-agent reinforcement learning for decentralized cooperative uav deployment, 2026.
[10] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(1):2096–2030, 2016.
[11] Jonathan Geuter, Gregor Kornhardt, Ingimar Tomasson, and Vaios Laschos. Universal neural optimal transport. In Forty-second International Conference on Machine Learning, 2025.
[12] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014.
[13] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pages 5767–5777, 2017.
[14] Yifei He, Haoxiang Wang, Bo Li, and Han Zhao. Gradual domain adaptation: Theory and algorithms. arXiv preprint arXiv:2310.13852, 2023.
[15] Yubo Huang, Xiongyu Hu, Xin Lai, Pengyue Cheng, Sijin Liu, Yong Fang, Chuan He, Zixi Wang, and Jingzehua Xu. Tcn-aol: An online incremental learning method for real-time multi-step prediction of shield tunnel excavation performance. Computer-Aided Civil and Infrastructure Engineering, page 100138, 2026.
[16] Ananya Kumar, Tengyu Ma, and Percy Liang. Understanding self-training for gradual domain adaptation. In International conference on machine learning, pages 5468–5479. PMLR, 2020.
[17] Pui Ieng Lei, Ximing Chen, Yijun Sheng, Yanyan Liu, Zhiguo Gong, and Qiang Yang. Gradual domain adaptation for graph learning. arXiv preprint arXiv:2501.17443, 2025.
[18] Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In International Conference on Learning Representations, 2023.
[19] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. In International Conference on Machine Learning, pages 97–105. PMLR, 2015.
[20] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. Advances in neural information processing systems, 31, 2018.
[21] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019.
[22] Eduardo Fernandes Montesuma, Fred Maurice Ngole Mboula, and Antoine Souloumiac. Recent advances in optimal transport for machine learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024.
[23] Amir Najafi, Amin Behjati, Ala Emrani, Yasaman Zolfimoselo, Shadrooy Shadrooy, Abolfazl Motahari, Babak Khalaj, et al. Gradual domain adaptation via manifold-constrained distributionally robust optimization. volume 37, pages 73693–73725, 2024.
[24] Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10):1345–1359, 2010.
[25] Gabriel Peyré and Marco Cuturi. Computational optimal transport. Foundations and Trends in Machine Learning, 11(5-6):355–607, 2019.
[26] Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning, pages 1530–1538. PMLR, 2015.
[27] Shogo Sagawa and Hideitsu Hino. Gradual domain adaptation via normalizing flows. Neural Computation, pages 1–47, 2025.
[28] Jian Shen, Yanru Qu, Weinan Zhang, and Yong Yu. Wasserstein distance guided representation learning for domain adaptation. In AAAI Conference on Artificial Intelligence, pages 4058–4065, 2018.
[29] Lianghe Shi and Weiwei Liu. Adversarial self-training improves robustness and generalization for gradual domain adaptation. Advances in Neural Information Processing Systems, 36, 2024.
[30] Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In European Conference on Computer Vision Workshops, pages 443–450. Springer, 2016.
[31] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7167–7176, 2017.
[32] Cédric Villani. Optimal Transport: Old and New. Springer Science & Business Media, 2009.
[33] Haoxiang Wang, Bo Li, and Han Zhao. Understanding gradual domain adaptation: Improved analysis, optimal path and beyond. In International Conference on Machine Learning, pages 22784–22801. PMLR, 2022.
[34] Zixi Wang, Yushe Cao, Yubo Huang, Jinzhu Wei, Jingzehua Xu, Shuai Zhang, and Xin Lai. Self-training with dynamic weighting for robust gradual domain adaptation. Advances in Neural Information Processing Systems, 38:107257–107278, 2026.
[35] Zixi Wang, Yubo Huang, Jingzehua Xu, Jinzhu Wei, Shuai Zhang, and Xin Lai. Multi-modal gradual domain osmosis: Stepwise dynamic learning with batch matching for gradual domain adaptation. In Proceedings of the 33rd ACM International Conference on Multimedia, pages 8959–8967, 2025.
[36] Linqi Xiao, Venkateswarlu Gudepu, and Andrea Fumagalli. Joint alarm correlation and root alarm detection in optical transport networks with graph-attention. In 2025 IEEE 30th International Workshop on Computer Aided Modeling and Design of Communication Links and Networks (CAMAD), pages 1–6. IEEE, 2025.
[37] Linqi Xiao, Aparaajitha Gomathinayakam Latha, Venkateswarlu Gudepu, and Andrea Fumagalli. A yang-grounded llm agent supporting multi-vendor openroadm optical transport networks. In Proceedings of the ACM SIGCOMM 2026 Conference, pages 2109–2115, 2026.
[38] Wei Yang, Marco Grasso, Mohammad N Bisheh, Kamran Paynabar, and Bianca Maria Colosimo. Automated classification of microstructure data in additive manufacturing via low-dimensional learning. Additive Manufacturing, page 104909, 2025.
[39] Zhen Yao, Xin Li, Taotao Jing, Shuai Zhang, and Mooi Choo Chuah. Disa: Saliency-aware foreground-background disentangled framework for open-vocabulary semantic segmentation. arXiv preprint arXiv:2601.20064, 2026.
[40] Zhen Yao, Likai Wang, Yuming Yang, Zhihao Zheng, Bo Lang, Qiuyu Tang, Jialu Sheng, Jingqi Xu, Yuehai Yang, Jumal Barker, Xiaowen Ying, and Mooi Choo Chuah. Reva: A scene-centric dataset beyond repetition for remote sensing video question answering, 2026.
[41] Zhen Yao, Xiaowen Ying, Zhiyu Zhu, and Mooi Choo Chuah. Learning flow-guided registration for rgb-event semantic segmentation. arXiv preprint arXiv:2505.01548, 2025.
[42] Yuchen Zhang, Tianle Liu, Mingsheng Long, and Michael I Jordan. Bridging theory and algorithm for domain adaptation. In International Conference on Machine Learning, pages 7404–7413. PMLR, 2019.
Limitations
FlowGDA relies on ordered intermediate domains that form a meaningful gradual path between the source and target distributions. When such domains are missing, unordered, or contain abrupt semantic changes, the learned transport may no longer approximate a smooth domain trajectory. The method also assumes that class semantics are largely preserved along the path, so severe label shift or class-appearance changes can weaken the source-anchored consistency signal. In addition, although training is simulation-free with respect to ODE integration, FlowGDA introduces extra velocity networks and sequential optimization over domain pairs, which may increase implementation complexity and training cost compared with simpler direct adaptation baselines.
A Theoretical Proofs
In this appendix, we provide detailed proofs for the theoretical claims in Section 6. We first define all notation used in the derivations. We then prove the Wasserstein-based risk bound for gradual domain adaptation, derive the continuity equation for the interpolation path used in flow matching, show that flow matching learns the corresponding marginal velocity field, and finally prove the semantic consistency bound induced by the source-anchored classification loss.
A.1 Notation and Standing Assumptions
Let denote the input space, the label space with classes, and the representation space of dimension . A domain is a probability distribution over . We write for the marginal distribution of inputs in domain .
The encoder is denoted by , where maps an input to a representation . The pushforward representation distribution induced by is , where means that if , then .
Let be a classifier and let be a surrogate loss, such as cross-entropy or a margin loss. The expected risk of on domain is
where the expectation is taken over labeled samples drawn from .
We consider an ordered gradual domain chain , , , where is the labeled source domain, is the unlabeled target domain, and are unlabeled intermediate domains. The integer denotes the number of transitions from source to target.
Shared-labeling assumption. We assume that the conditional label distribution in representation space is invariant across domains: . Here is the conditional probability of label given representation in domain . This assumption means that the marginal distribution of representations may shift across domains, but the semantic labeling rule given is shared.
For any classifier h, define the conditional risk function
where denotes the shared conditional label distribution. We assume that is -Lipschitz:
where is the Lipschitz constant and is the Euclidean norm.
Wasserstein distances. For probability distributions P and Q on Z, the Wasserstein-1 distance is
where the supremum is over all 1-Lipschitz functions .
The squared Wasserstein-2 distance is
where denotes the set of all couplings whose first marginal is and whose second marginal is . A coupling is a joint distribution over pairs such that and .
A.2 Proof of Lemma 6.2
Proof. Fix any classifier . By definition of the expected risk,
Let . Since , the representation follows whenever . Therefore,
where is the joint distribution of representation-label pairs induced by on domain .
Using the law of total expectation with respect to z, we obtain
In (35), denotes integration with respect to the representation distribution of the domain , and denotes integration over the conditional label distribution.
By the assumption of shared-labeling, does not depend on the domain index . Hence
(36)
where is the conditional risk function defined in (29). Now consider two domains and . Using (36),
(37)
Taking the absolute value,
Since is -Lipschitz by (30), define the normalized function
Then is 1-Lipschitz, i.e., . Substituting into (38), we get
(40)
The last equality follows from the definition of in (31). This proves Lemma 6.2.
A.3 Proof of Theorem 6.3
Proof. Fix any classifier . For each consecutive pair of domains , decompose the risk as
Using the inequality for any scalar when deriving an upper bound,
Applying Lemma 6.2 to and gives
Substituting (43) into (42), we have
Applying (44) recursively along the domain chain yields
(45)
Here is the source-domain risk and is the target-domain risk.
To account for irreducible mismatch between the source and target labeling functions, define the ideal joint error
where measures the minimum simultaneous source-target risk achievable by the hypothesis class . Adding this nonnegative term to the right-hand side of (45) gives
This proves Theorem 6.3.
A.4 Proof of Theorem 6.7
Proof. Let and be the representation distributions of two consecutive domains and . Let be a coupling between and , where denotes the set of all joint distributions whose first marginal is and second marginal is . We sample , where is a representation from the current domain and is a representation from the next domain.
For , define the interpolation path
Let denote the distribution of . The conditional velocity along this path is
Since multiple pairs can produce the same interpolated representation , the velocity field acting on the marginal distribution is the conditional expectation
Here is called the marginal velocity field of the interpolation path.
We first show that defines a valid transport path from to . Let be any continuously differentiable test function with compact support. By definition of ,
Taking derivative with respect to t and using the chain rule gives
(52)
Using the definition of in (50), we can rewrite the last line as
Therefore,
Equation (54) is the weak form of the continuity equation
where is the divergence operator with respect to . Thus, is an admissible transport path from to with boundary conditions and .
By the Benamou–Brenier dynamic formulation of optimal transport, the squared Wasserstein-2 distance satisfies
where the infimum is over all admissible paths satisfying the continuity equation and the boundary conditions , . Since is one admissible path, we have
We now upper-bound the transport energy of . By definition,
Using Jensen’s inequality for the convex function , we get
(59)
Define the coupling cost
Since (59) holds for every , integrating over gives
Combining (57) and (61), we obtain
It remains to connect this marginal velocity field to the flow matching objective. The conditional flow matching loss between P and Q is
where is any measurable velocity field. Let
For fixed , the conditional expected squared error is
Using
we decompose
(67)
Taking conditional expectation given , the cross term vanishes:
Thus,
(69)
The second term in (69) does not depend on u. Therefore, the population minimizer of (63) is
Consequently, minimizing the flow matching loss learns the marginal velocity field whose kinetic energy upper-bounds as shown in (62). This proves Theorem 6.7.
A.5 Proof of Corollary 6.8
Proof. For each consecutive domain pair , let be the interpolation path between and , and let be its marginal velocity field. Define the per-step transport energy
where is the representation distribution at interpolation time t between the two consecutive domains.
From Theorem 6.7,
Taking square roots gives
For probability distributions with finite second moments, we have
Combining (73) and (74),
Substituting (75) into Theorem 6.3, we obtain
(76)
This proves Corollary 6.8.
A.6 Proof of Lemma 6.9
Proof. Let be the probability vector predicted by the fixed source classifier at representation . Let
be the probability assigned to the true class y. The cross-entropy loss is
Here denotes the -th component of the probability vector .
If misclassifies z, then
Therefore, there exists some class such that
Since all predicted class probabilities sum to one,
Combining (80) and (81), we obtain
Thus, on the misclassification event,
Equation (83) implies the pointwise bound
where is the indicator function.
Taking expectation over the random pair gives
(85)
This proves Lemma 6.9.
□
A.7 Proof of Theorem 6.10
Proof. In FlowGDA, a source representation is transported toward an intermediate domain by the source-to-left flow:
where is the flow map induced by the velocity field , and is the transported source representation.
The semantic consistency loss is
where is the source representation-label distribution, is the fixed source classifier, and y is the source label.
Applying Lemma 6.9 to the random pair yields
(88)
This proves Theorem 6.10.
Remark A.1 (Why a full JKO derivation is not required). Some flow and Wasserstein-gradient-flow papers derive a Jordan–Kinderlehrer–Otto (JKO) scheme of the form
where is a time-indexed density, is a step size, and is an energy functional. FlowGDA does not optimize a JKO objective. Instead, it uses conditional flow matching to regress velocity fields between neighboring representation distributions. Therefore, the appropriate theoretical tool is the continuity equation together with the Benamou–Brenier dynamic formulation, as used above. This directly matches the algorithmic objective and avoids introducing a variational objective that the method does not optimize.
B Additional Experimental Results
In this appendix, we provide additional analyses that complement the main experimental results. Instead of repeating the main comparison table, we focus on questions that are specific to gradual domain adaptation: how the choice of intermediate domains affects performance, how many intermediate domains are needed, how sensitive FlowGDA is to domain ordering, and how robust it is to key hyperparameters.
B.1 Effect of Intermediate-Domain Quality
We first analyze whether the quality of the intermediate domain affects FlowGDA. On Rotated MNIST, we fix the source domain as unrotated digits ( ) and the target domain as digits rotated by . We then use exactly one intermediate domain and vary its rotation angle. For each setting, FlowGDA is trained with the same configuration and evaluated on the target domain over five random seeds.
Fig. 5 shows that the best performance is obtained when the intermediate domain lies near the midpoint of the source–target trajectory, around . Intermediate domains that are too close to the source or too close to the target lead to slightly lower accuracy and larger variance. This supports the intuition behind gradual adaptation: the intermediate domain should reduce the local transport difficulty while still lying on the underlying geometric trajectory of the shift. Direct source-to-target adaptation without an intermediate domain performs worse, indicating that the existence of an intermediate bridge is more important than the exact optimality of its location.
B.2 Effect of the Number of Intermediate Domains
We study how the number of intermediate domains affects FlowGDA. Table 3 reports target accuracy when using different numbers of intermediate domains. The setting with zero intermediate domains corresponds to direct source-to-target adaptation. As the number of intermediate domains increases, performance improves consistently across all datasets, with larger gains on Portraits and Cover Type. This is consistent with our theoretical analysis in Section 6: more intermediate domains reduce the discrepancy between consecutive domains, making each local transport problem easier. The improvement gradually saturates when the trajectory becomes sufficiently fine-grained.
The results show two important trends. First, direct adaptation is consistently weaker than gradual adaptation, confirming the need for intermediate domains under large shifts. Second, the marginal gain from adding more domains decreases after a moderate number of intermediate domains. This suggests that FlowGDA benefits from finer trajectories, but does not require arbitrarily dense domain sequences once local shifts become sufficiently small.
B.3 Robustness to Domain Ordering
Gradual domain adaptation assumes that domains are ordered so that consecutive domains are closer than the source and target. To evaluate the importance of this assumption, we compare four orderings: the original ordered trajectory, a local shuffle that only swaps neighboring domains, a random permutation, and a reversed order. Table 4 reports the results.
FlowGDA is robust to mild local perturbations, but performance drops when the domain order is random or reversed. This confirms that the method benefits from a meaningful gradual trajectory. The drop is most pronounced on Portraits and Cover Type, where the shifts are less controlled and the representation trajectory is more complex. These results also suggest that when domain order is noisy in practice, estimating a reasonable ordering or neighborhood graph before adaptation may further improve performance.
B.4 Impact of Early Transport Steps
We further investigate whether early transport steps [40, 9, 15, 36] are more important than later ones. We divide the ordered domain chain into three blocks: early, middle, and late domain pairs. We then selectively disable velocity-field training in one or more blocks. When a block is disabled, FlowGDA

Figure 5: Effect of intermediate-domain quality on Rotated MNIST. Accuracy is reported as mean±std over five runs.
Table 3: Effect of the number of intermediate domains. Values denote target-domain accuracy (%).
| Dataset | 0 domains | 1 domain | 2 domains | 4 domains | 6 domains |
|---|---|---|---|---|---|
| Rotated MNIST | 92.6 | 95.1 | 96.5 | 96.8 | 97.0 |
| Color-Shift MNIST | 94.7 | 97.9 | 99.1 | 99.2 | 99.2 |
| Portraits | 80.9 | 83.2 | 85.1 | 86.4 | 87.6 |
| Cover Type | 71.6 | 69.2 | 74.7 | 75.5 | 76.1 |
uses identity transport for that block and only trains on the remaining blocks. Table 5 reports the results on Portraits and Cover Type, the two datasets with the most complex non-synthetic shifts.
The results show that early transport steps have a larger impact than later ones. Skipping early pairs causes the largest degradation among the single-block removals, while skipping late pairs is less harmful. Moreover, training only the early pairs outperforms training only the late pairs. This indicates that early transport steps establish a stable representation trajectory, while later steps mainly refine the already-aligned features. This behavior is consistent with the intuition that errors introduced at the beginning of a gradual path can propagate and affect subsequent adaptation.
B.5 Hyperparameter Sensitivity
Finally, we study the sensitivity of FlowGDA to key hyperparameters on the Portraits dataset. Table 6 reports the effects of the semantic consistency weight , the hidden dimension of the velocity network, the number of curriculum levels for , and batch size. FlowGDA is stable across reasonable ranges of these hyperparameters. The best performance is obtained with , hidden dimension 512, four curriculum levels, and batch size 128.
The semantic consistency weight shows a non-monotonic trend. Without , performance drops because transported representations may lose label information. However, an overly large also hurts performance because it over-constrains the transport and limits adaptation to the target domain. The velocity-network width shows saturation after 512 hidden units, suggesting that excessive capacity is unnecessary. For the curriculum schedule, a moderate number of levels works best: too few levels make adaptation abrupt, while too many levels add optimization overhead without clear benefit. Larger batch sizes generally improve stability, likely because they provide more reliable estimates of local transport directions.
Table 4: Robustness to domain ordering. Values denote target-domain accuracy (%).
| Ordering | Rotated MNIST | Color-Shift MNIST | Portraits | Cover Type |
|---|---|---|---|---|
| Ordered trajectory | 97.0 | 99.2 | 87.6 | 76.1 |
| Local shuffle | 95.6 | 98.0 | 85.4 | 74.0 |
| Random permutation | 92.8 | 94.7 | 81.7 | 70.5 |
| Reversed order | 90.7 | 92.6 | 79.8 | 69.2 |
Table 5: Impact of early, middle, and late transport steps. “Train” means velocity fields are optimized for the corresponding block, while “Skip” means identity transport is used. Values denote target-domain accuracy (%).
| Schedule | Early pairs | Middle pairs | Late pairs | Portraits | Cover Type |
|---|---|---|---|---|---|
| Full FlowGDA | Train | Train | Train | ||
| Skip early pairs | Skip | Train | Train | ||
| Skip middle pairs | Train | Skip | Train | ||
| Skip late pairs | Train | Train | Skip | ||
| Only early pairs | Train | Skip | Skip | ||
| Only late pairs | Skip | Skip | Train |
Table 6: Hyperparameter sensitivity on Portraits. Values denote target-domain accuracy (%).
| Factor | Setting | Accuracy |
|---|---|---|
| 0 | ||
| Hidden dimension | ||
| Curriculum levels | ||
| Batch size | ||