Censored Flow Matching for Hazard-Faithful Synthetic Survival Data

Hospitals and trial groups want to share survival datasets: patient covariates together with how long each patient was followed and whether the event, such as death or relapse, was actually observed. Synthetic copies are one way to share them, but a synthetic cohort is only useful if an epidemiologist who fits a hazard model to it reaches the same conclusions as on the real data. Here a hazard model is a regression of the instantaneous risk of the event on covariates, and the conclusions are mainly the hazard ratios, which say how much a covariate multiplies risk. Current generators get this wrong in two specific places. They treat the "event observed" flag as just another categorical column. They also often add a Cox proportional-hazards loss, which assumes each covariate's effect on risk is constant over time, to make the synthetic data rank patients correctly. The first choice discards the fact that the flag is set by a race between two clocks, the event time and the dropout time. The second risks forcing synthetic data to obey proportional hazards even when the real data do not, for example when a surgery raises short-term risk but lowers long-term risk.

We propose a generator that never produces the flag directly. A hybrid continuous-discrete flow matching model generates mixed-type covariates. Flow matching is a generator that learns a velocity field carrying noise to data along simple paths; "hybrid" means continuous columns follow a smooth path while categorical columns follow a jump process sharing the same generation clock. Two conditional one-dimensional flows then produce a latent event time and a latent censoring time, and the observed time and flag are computed as their minimum and comparison. A censored row's true event time is unknown; we only know it is later than the follow-up time. We therefore train the time flow by self-imputation: the model's own conditional distribution supplies the missing endpoint, restricted to times beyond the censoring point. One-dimensional flows are order-preserving, so this restricted sampling is exact and cheap. No Cox loss is used. The claim is that this design reproduces the real data's hazard ratios, including time-varying ones, and its censoring pattern better than generators that tokenize the flag or impose proportional hazards.

Core Claim

Write the latent event time as $T$, the latent censoring time as $C$, and covariates as $X$. The data only reveal

$$Y = \min(T, C), \qquad \delta = \mathbf{1}[T \le C].$$

Under the standard assumption that $T$ and $C$ are independent given $X$, the joint law of $(X, T, C)$ is identified from $(X, Y, \delta)$. Censoring may still be informative through shared covariates, the situation that Explicitly Modeling Censoring Produces Superior Survival Predictors shows carries real prognostic signal. A generator that models $p(X)\,p(T\mid X)\,p(C\mid X)$ and derives $(Y,\delta)$ deterministically therefore targets the right object. A generator that samples $\delta$ as a token targets a marginal with no built-in consistency between flag, time, and covariates.

The second claim is a falsifiable hypothesis about prior work. SurvDiff: A Diffusion Model for Generating Synthetic Data in Survival Analysis runs Gaussian diffusion on continuous covariates and times, masked diffusion on categoricals and the censoring flag, and adds a Cox partial-likelihood term. We expect that term to flatten crossing hazards in the synthetic data whenever the real data violate proportional hazards. The research file notes this risk for SurvDiff, and the result on collapse of steered generative paths in On the Collapse of Generative Paths: A Criterion and Correction for Diffusion Steering gives a general reason to distrust fixed auxiliary objectives layered onto generative paths. Our design keeps proportional hazards as something to measure on the output, not something imposed in training.

Research Program

Covariate generator. Continuous covariates follow a straight Gaussian-to-data path. Categorical covariates follow a masking continuous-time Markov chain, a process where each category token jumps from "masked" to a value at a learned rate, on the same generation time variable. This reuses the shared-clock mechanism from 3D Molecule Generation from Rigid Motifs via SE(3) Flows, which couples rigid-body flows with Markov-chain flows over motif types. We take only the clock-sharing idea, not the geometry. La-Proteina: Atomistic Protein Generation via Partially Latent Flow Matching shows that relative speeds across modalities matter, since it needed an asynchronous schedule. That constrains us, so we sweep the relative continuous and discrete schedule rather than fixing it.

Time generators. The event time and censoring time each come from a separate one-dimensional conditional flow on log-time. Each flow's velocity field reads a covariate embedding from a trunk shared with the covariate generator. A one-dimensional ODE flow cannot cross its own trajectories, so the map from base noise $z$ to time is strictly increasing. Sampling $T$ given $X$ and $T > c$ therefore needs only three steps: integrate $c$ backward to its base value $z_c$, draw $z$ from a Gaussian truncated to $z > z_c$, and integrate forward.

Self-imputation. Training alternates two steps. First, for every row censored at $Y_i$, we draw

$$T_i^{*} \sim p_\theta(T \mid X_i,\, T > Y_i)$$

from the current model and use it as the flow-matching endpoint. Observed rows use their actual $Y_i$. Second, we take ordinary flow-matching gradient steps. The censoring-time flow is trained symmetrically: rows with an observed event are the ones whose censoring time is right-censored.

Without covariates, the fixed point of this procedure should be the Kaplan–Meier curve. This follows from the self-consistency ("redistribute mass to the right") characterization of that estimator. We will verify this numerically as a correctness check before adding covariates.

What we analyze. We will measure how fast and how stably self-imputation converges under heavy censoring. We will also measure how much of the improvement comes from deriving the flag versus from dropping the Cox loss.

Baselines

The naive reference point uses our same hybrid covariate flow but treats each observed time $Y$ as if it were the event time, generating $\delta$ as an extra categorical column. This is exactly the mistake that Time to Event Modeling with Right Censored Data describes for standard regression: it pulls synthetic event times toward censoring times. It should be clearly worst, and it calibrates how much censoring handling matters.

The strongest existing method is SurvDiff, as the only end-to-end mixed-type survival generator in the file. Its paper reports the lowest Jensen–Shannon distance and the highest downstream C-index against SurvivalGAN and tabular VAE and GAN models on AIDS, GBSG2 and METABRIC. However, no reported result was found on Lacuna for SurvDiff's numeric values; the file says the exact figures are not printed. We will therefore rerun it from its description on identical splits, with matched parameter count, matched training GPU-hours, and the same hyperparameter-search budget as our model. Beating it means two things: lower Kaplan–Meier divergence and closer hazard-ratio agreement on at least the majority of datasets, and a clearly smaller error in time-varying hazard ratios on the crossing-hazard simulations. Matching it on C-index alone would not count.

We include SurvivalGAN: Generating Time-to-Event Data for Survival Analysis, the staged pipeline of a conditional GAN, then DeepHit, then an XGBoost time sampler, using its released configuration. We also include the reverse-conditioning method of Conditioning on Time is All You Need for Synthetic Survival Data Generation, which samples $(T,\delta)$ from a Dirichlet process mixture and then generates covariates given outcome. It reports a 3.6x improvement in Kaplan–Meier divergence over unconditional generation on AIDS, so it is a demanding reference on the outcome marginal specifically.

For the downstream train-on-synthetic, test-on-real check, we anchor against real-data predictors. On METABRIC, DeepSurv reports a C-index of 0.643, linear Cox 0.630, and random survival forest 0.624 (Deep Survival: A Deep Cox Proportional Hazards Network). A synthetic cohort that lets DeepSurv reach close to 0.643 on real test data is doing well.

Four ablations isolate the key ingredients. The first keeps everything but generates $\delta$ as a token; this isolates flag derivation. The second adds SurvDiff's Cox loss to our model; this isolates proportional-hazards imposition. The third replaces self-imputation with a censored-likelihood neural hazard model for $T\mid X$ and $C\mid X$, a discrete-time model in the style of multi-task logistic regression from Time to Event Modeling with Right Censored Data. The fourth trains the covariate flow and the two time flows with no shared trunk.

Why not just…?

Why not just swap SurvDiff's diffusion for flow matching? That swap is our second ablation's sibling, a flow with a tokenized flag and a Cox loss, and we run it. We do not expect speed to be the story on tables of a few thousand rows. The fewer-steps advantage reported for molecules in 3D Molecule Generation from Rigid Motifs via SE(3) Flows matters little at this scale. If this arm matches our full model on hazard-ratio fidelity and on crossing-hazard recovery, our central hypothesis is wrong and we will report that.

Why not just generate covariates with any tabular model and fit a censored-likelihood hazard model for event and censoring given covariates? This is the most serious threat. Under conditional independence that factorization is exactly correct, and unlike SurvivalGAN it has no XGBoost stage where errors pile up. Our third and fourth ablations are this alternative made concrete. If it ties our model, the contribution narrows to two findings: derive the flag rather than generate it, and do not impose proportional hazards. We would then recommend the simpler factorized system. Self-imputed flows would remain justified only if they win on continuous-time density quality, measured by integrated Brier score and calibration at late horizons, where discretized hazard models are coarse.

Why not just use reverse conditioning? Sampling outcomes from a covariate-free mixture and then generating covariates given outcome fits the outcome marginal well. But it gives no direct handle on how censoring depends on covariates, and that dependence is exactly what informative-censoring analyses need. Our censoring-fidelity metric, the agreement between real and synthetic hazard ratios for the censoring process itself, tests this directly. We expect reverse conditioning to do well on Kaplan–Meier divergence and poorly on this metric.

Why not just train DeepSurv or SALaD on the real data? If the task were prediction, we would. The use case here is releasing a dataset on which others can run their own analyses. Discriminative models cannot produce rows, so they appear only as downstream evaluators.

Proposed Experiments

The real cohorts are METABRIC (42% censored), GBSG2 (56.4%), AIDS ACTG 320 (91.7%), SUPPORT, and FLCHAIN. AIDS stress-tests self-imputation, because almost every endpoint is imputed. The decisive experiments are semi-synthetic. We keep the real SUPPORT and METABRIC covariates and simulate event times under two regimes: one with proportional hazards, and one where a treatment-like binary covariate produces crossing hazard curves. In both, censoring times depend on covariates that also drive the event, so the true time-varying hazard ratios and the true censoring mechanism are known.

The metrics come from the cited work: Kaplan–Meier divergence, optimism, and short-sightedness from SurvivalGAN, plus Jensen–Shannon distance, and train-on-synthetic, test-on-real C-index and integrated Brier score. To these we add three hazard-faithfulness metrics. The first is the gap between multivariable Cox coefficients and their confidence intervals fit on real versus synthetic data, mirroring how cohort studies such as Risk of severe COVID-19 disease with ACE inhibitors and angiotensin receptor blockers: cohort study including 8.3 million people report findings. The second is the error in piecewise-in-time hazard ratios on the crossing-hazard simulations. The third is the error in censoring-rate and censoring-hazard-ratio estimates.

Three outcomes settle the proposal. First, the Cox-loss arms should shrink the late-period reversal of the simulated hazard ratio while our model preserves it; in the proportional-hazards regime both should be fine. Second, the tokenized-flag ablation should mismatch censoring rates within covariate strata even when the overall rate looks right. Third, the comparison with the factorized hazard-model alternative decides whether the flow-based time model earns its place. Every arm is run over five seeds with matched budgets, and results are reported per dataset rather than averaged.