Smooth Flow Matching for Synthesizing Functional Data
Authors: Jianbin Tan, Anru R. Zhang
Organizations: Department of Biostatistics & Bioinformatics, Duke University, Durham, NC, USA · Department of Computer Science, Duke University, Durham, NC, USA
Functional data, i.e., random functions observed over a continuous domain, are increasingly available in areas such as biomedical research, health informatics, and epidemiology. However, effective statistical analysis for functional data is often hindered by challenges such as privacy constraints, sparse and irregular sampling, infinite-dimensionality, and non-Gaussian structures. To address these challenges, we introduce a novel framework named Smooth Flow Matching (SFM), tailored for generative modeling of functional data that enables statistical analysis without exposing sensitive real data. Under a copula framework, SFM constructs a semiparametric smooth flow to generate infinite-dimensional functional data, free of Gaussianity and low-rank assumptions. It is computationally efficient, handles irregular observations, and guarantees the smoothness of the generated functions, offering a practical and flexible solution in scenarios where existing deep generative methods are not applicable. Through extensive simulation studies, we demonstrate the advantages of SFM in terms of both synthetic data quality and computational efficiency. We then apply SFM to generate clinical trajectory data from the MIMIC-IV patient electronic health records (EHR) longitudinal database. Our analysis showcases the ability of SFM to produce high-quality surrogate data for downstream tasks, highlighting its potential to boost the utility of EHR data for clinical applications.
Figures & tables
Figure 1: A pictorial illustration of functional data generation via a three-dimensional flow. The left panel shows the base function input into the flow, while the right panel displays the output functions generated by applying the base function through the flow transformation.
Method
Deep Generative Models
Gaussian-based Methods
Smooth Flow Matching (this work)
Data Generator
Operator-form vector field (or score) estimated via deep learning ( Lim et al., 2023 ; Kerrigan et al., 2024 )
Gaussian process modelling via classical functional data approaches ( Yao et al., 2005 ; Yao, 2007 ; Hsing and Eubank, 2015 ) .
Three-dimensional vector field
Data Resolution
Dense
Dense or sparse
Dense or sparse
Computational Cost
High
Relatively low
Relatively low
Guaranteed Smoothness
No
Yes
Yes
Joint Distribution
Nonparametric
Parametric
Semiparametric
Table 1: Comparison of SFM with existing methods for functional data
Figure 2: The bias, variance, and mean squared error (MSE) of the estimated vector field V^ , computed from 100 simulation replications. The estimator is obtained from ( 21 ) by replacing Ln(U) with Ln(U) , with λu=λt=λx taking different values. The simulation setting and the definitions of bias, variance, and MSE are given in Part C.1.1 of the Supplementary Materials.
V^:=argminU∈BLV,4([0,1],S,X){L^n(U)+J(U)}.
Algorithm 1 Smooth Flow Matching for Gaussian Copula Processes
Figure 3: Left panel: Box plots of Wasserstein distances from 100 simulation replications under varying sample sizes n (subtitles) and numbers of observed time points Ji (main titles). Right panel: average computation times.
Figure 4: Illustration of generated functional data under different numbers of observed time points (main titles) and different generation methods (subtitles). The sample size is set to n=100 for data generation.
Figure 5: (A) Irregularly observed functional data for each clinical feature; (B) Synthetic functional data generated by SFM with Gaussian bases; (C) Synthetic functional data generated by SFM with Student- t bases; (D) Synthetic functional data generated by DSM; (E) Synthetic functional data generated by FM.
SFM (Gaussian base)
SFM (Student- t base)
DSM
FM
Arterial blood pressure
30.28
40.92
410.90
188.28
Respiratory rate
37.05
52.94
597.67
210.36
Heart rate
37.71
54.57
574.73
200.01
Table 2: Computational training time (in seconds) for different data generation methods. All experiments are conducted on a high performance machine with 40 CPU cores, 208 GB RAM, and a single NVIDIA RTX A5000 GPU.
Figure 6: Projected scores for the observed data, synthetic data, and Gaussian-based samples. The Wasserstein distances in the last four columns are computed between the corresponding samples and those from the observed data.
Figure 7: (A) Boxplots of privacy-loss values for different mixture proportions a (see legend) for datasets of three clinical features. For each setting, the privacy-loss values are computed over 200 replicated simulations. (B) Prediction errors of different methods across various prediction horizons g .
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
V^:=argminU∈BLV,4([0,1],S,X){L^n(U)
+J(U)}.
Appendix
Algorithm S1 Smooth Flow Matching for Student- t Copula Processes
V^:=argminU∈BLV,4([0,1],S,X){L^n(U)+J(U)}.
Appendix
Algorithm S2 Smooth Flow Matching for General Copula Processes
Figure 8: Median values of the bias and variance of the estimated flow map ϕ^1,t(x) over dense grids of t∈[0,1] and x∈[−3,3] (A), and median values of the averaged empirical roughness norms and Sobolev norms across 100 simulation replications (B). In each replication, one of λu , λt , or λx is varied over a range of values, while the other two are fixed at 10−7 when obtaining V^ . The averaged norm is computed as the mean of the norms of all generated functions within that simulation. The simulations follow the Gamma–process setting, with the sample size fixed at 100 and the numbers of observed time points set to {2,…,6} .
Figure 9: Normalized mean squared error (NMSE) between correlation functions. We compare the raw estimated correlation functions without NPD (denoted by Est), the estimated correlation functions after applying NPD (denoted by Est (NPD)), and the true correlation functions (denoted by True). For calculating NMSE, the denominator for normalization is the L2 norm of the latter correlation function; that is, “ A vs. B ” represents ∥A−B∥L22/∥B∥L22 , where A and B are kernels defined on S×S with norm ∥⋅∥L2 . The simulation follows the Gamma–process setting, with the numbers of observed time points set to {2,…,6} .
Figure 10: Empirical Sobolev norms of the estimated correlation functions across 100 simulation replications. We compare the raw estimator without NPD (denoted by Est) and the estimator after applying NPD (denoted by Est (NPD)). The simulation follows the Gamma–process setting, with the numbers of observed time points set to {2,…,6} .
Figure 11: Averaged empirical roughness norms from 100 simulation replications. For each replication, the averaged norm is computed as the mean of the norms of all generated functions within that simulation. The simulation follows the Gamma–process setting, with the sample size fixed at 100 and the numbers of observed time points set to {2,…,6} .
Figure 12: Boxplots of the conditional variance from 100 simulation replications under each setting. (A) Varying the number of discretization points in u ( F ) with H fixed at 1000 ; (B) varying the number of generated base samples ( H ) with F fixed at 30 . The simulations follow the Gamma–process setting, with sample size fixed at 100 and the numbers of observed time points set to {2,…,6} .
Figure 13: Mean squared error 61∫01∫−33ϕ^1,t(x)−ϕ1,t(x)2dxdt from 100 simulation replications, using a Gaussian base with covariance function Kv(t,s)=exp(−∣t−s∣/v) . Here, v is varied over a range of values. The simulation follows the Gamma–process setting, with the numbers of observed time points set to {2,…,6} .
MSE
{2,…,6}
{6,…,10}
MF
EF1
EF2
MDF
MF
EF1
EF2
MDF
(A)
n=100
DSM
0.45
1.07
1.10
0.20
1.12
1.18
FM
0.73
1.02
0.99
0.43
1.06
1.00
GP
0.12
0.25
0.39
0.11
0.19
0.31
KL
0.13
0.27
0.41
0.10
0.19
0.30
SFM
0.12
0.29
0.39
0.12
0.20
0.30
Appendix
Table 3: Mean squared errors (MSE) between the true mean function (MF), eigenfunctions (EF), median function (MDF), and their estimates from raw/generated data. "Oracle" refers to MF/EF estimated directly from observed data using the smoothing method of Hsing and Eubank (2015) .
Figure 14: Boxplots of Wasserstein distances from 100 simulation replications under varying sample sizes n and numbers of observed time points Ji∈{27,…,31} .
Figure 15: Averaged empirical roughness norms ∥f(2)∥L2 for a function f from 100 simulation replications. For each replication, the averaged norm is computed as the mean of the norms of all generated functions within that simulation.
Figure 16: Wasserstein distances from 100 simulation replications under varying sample sizes n . The simulation follows the Gamma–process setting, with the numbers of observed time points set to {6,…,10} .
Figure 17: Estimated mean function (MF) and the first two eigenfunctions (EF1 and EF2) for the observed and synthesized functional data.
Generating time-to-event data is increasingly important in survival analysis, but it remains statistically challenging because event times are often censored and thus prevent flexible generative modeling. To fill this gap, we propose a novel method called censored flow matching (CFM), aiming at providing a flexible flow-based generative mechanism for synthesizing time-to-event data as well as learning their corresponding probabilistic densities. Unlike existing methods, CFM does not rely on survival likelihoods to handle censoring, but instead exploits the monotonicity property of differential flows to address censoring via pullback sampling. Under this framework, we implement an alternating procedure between pullback sampling and CFM steps, leading to a flow-based expectation--maximization (EM) algorithm tailored for time-to-event inference. Under mild distributional conditions, we establish the convergence of CFM to the true event-time distribution as the EM iterations proceed. We then apply CFM to generate time-to-event data and estimate their probabilistic densities, where the observed censoring time can be incorporated to provide truncated sampling or truncated density estimation for survival inference. Through extensive simulation studies, we demonstrate the benefits of CFM for complex and large-scale data generation. Finally, we apply CFM to analyze data from the Organ Procurement and Transplantation Network (OPTN) and the Medical Information Mart for Intensive Care IV (MIMIC-IV), showcasing its benefits for synthetic and predictive survival analyses in terms of data fidelity, predictive performance, and empirical privacy characteristics.
Jianbin Tan, Xingran Chen, Kevin He +3
Department of Biostatistics & Bioinformatics, Duke University · Department of Biostatistics, University of Michigan · Department of Biostatistics, Yale University +1
Recent advances in generative modeling have substantially improved time series generation, yet most existing methods either assume a regular temporal grid or focus on feature dynamics under a given sampling structure. This makes them illsuited for generating irregular time series in their native form, where a model must capture not only feature values, but also how many observations occur, when they occur, and which features are observed together. To address this heterogeneous generation problem, we propose ChronoFlow, a unified hierarchical flow matching framework organized by statistical granularity. Following a coarse-to-fine hierarchy, ChronoFlow first generates observation counts and feature-wise frequencies, then jointly generates observation times and feature co-observation patterns, and finally generates values conditioned on the realized pattern. This turns a complex joint generation problem into structurally aligned subproblems while preserving their dependencies. To evaluate complete irregular time series generation, we introduce complementary metrics spanning sample realism, sampling structure, value fidelity, and temporal and cross-feature dependencies, and validate them through controlled corruptions. Across five benchmarks, ChronoFlow achieves strong improvements in generation fidelity over existing baselines, while factorization studies support the proposed hierarchy. Our code is available at https://anonymous.4open.science/r/ChronoFlow.
Synthetic medical tabular data generation has become essential for developing and validating computer-based medical systems (CBMSs) when real clinical data is restricted due to privacy, ethical, or data availability limitations. Existing probabilistic and deep generative models often lack interpretability and fail to preserve clinically meaningful dependencies, limiting their suitability for safety-critical applications. This paper proposes a novel application of Fuzzy Cognitive Maps (FCMs) in a framework for synthetic medical tabular data generation with explicit causality and privacy preservation. Clinical features are described using linguistically interpretable fuzzy sets, and inter-feature dependencies are encoded as FCM edge weights computed from fuzzy set intersections. Synthetic patient records are generated by propagating randomly initialized linguistic activation vectors through the FCM until convergence, followed by defuzzification to produce clinically coherent numerical values. The approach natively handles mixed data types, and domain constraints common in health records. Experimental evaluation on UCI medical benchmark datasets demonstrates competitive performance under a Train-on-Synthetic-Test-on-Real (TSTR) protocol. The proposed method achieves accuracy of up to 0.81 and AUROC of up to 0.90 on the Heart Disease dataset, matching or exceeding TVAE and Gaussian Copula baselines while running exclusively on CPU. Fidelity metrics including KS Complement (up to 0.91) and Correlation Similarity (up to 0.95) confirm strong statistical coherence, and DCR Baseline Protection scores consistently exceed those of TVAE, confirming adequate privacy guarantees. These results demonstrate that causally grounded, interpretable fuzzy modeling offers a computationally efficient and transparent alternative to deep generative models for trustworthy synthetic data generation in CBMSs.
Michael Vasilakakis, Dimitris K. Iakovidis
Department of Computer Science and Biomedical Informatics, University of Thessaly, Lamia, Greece