Introduction
Despite decades of progress in ovarian stimulation, embryo culture, and cryopreservation, predicting the outcome of an individual IVF cycle remains difficult. Each cycle is shaped by a chain of interdependent biological events, from follicular recruitment and oocyte competence through fertilization, cleavage, blastocyst formation, and implantation, and every step adds its own variability. Conventional statistical models summarize this process with population-average coefficients, whereas machine-learning models can represent nonlinear interactions among routine clinical and laboratory variables. The main weakness of that approach is that it assumes fixed, population-averaged biological rates at each stage. Published systems vary widely in design and outcome definition, and favorable internal discrimination does not ensure reliable probabilities in another population or laboratory.1,2
Automated embryo-assessment systems based on morphology or time-lapse imaging can support ranking, but performance against implantation or pregnancy remains moderate and center dependent.3–5 More importantly, many high-performing predictors are opaque: they return a probability without an independently observable biological trajectory, so the clinician cannot inspect its origin, cannot see when calibration has drifted for a patient outside the training distribution, and cannot recognize a failure mode at the bedside. This limitation becomes more consequential as reproductive medicine moves toward agentic workflows in which several models contribute to one recommendation.6,7 A language agent that consumes such a number inherits its opacity and cannot, by itself, judge whether that number should be trusted for this particular patient. What an agentic architecture therefore needs, alongside its predictive agents, is an independent verification agent whose task is not to be the most accurate model but to check, on different principles, whether another model’s output is plausible for the case in hand.
The present paper develops such an agent. It extends the pipeline described in our previous work on neural-network-based quality management in the IVF laboratory, in which a combination of Kolmogorov-Arnold networks, deep neural networks, and a Bayesian inference layer reached AUC 0.75 with an expected calibration error of 0.06 using only standard tabular data.8 The present study adds a paradigm-independent generative component. Conditional score-based diffusion (CSDI) first generates a distribution of plausible laboratory outcomes and only then derives a pregnancy estimate, which makes disagreement with a discriminative classifier inspectable at the level of blastocyst yield rather than as a difference between two unexplained scores. We evaluated this CSDI Hybrid model retrospectively, prospectively in two settings, and on public external data, with TabPFN as an opaque reference predictor. The primary aim was to test whether a generative model can provide a reproducible, biologically grounded verification signal, and to characterize how that signal transfers across laboratories.
Materials and methods
Study Design and Data
We analyzed 15,193 consecutive IVF/ICSI cycles performed between 2012 and 2025 at three reproductive centers. Clinical pregnancy was defined by fetal cardiac activity on transvaginal ultrasonography 25 days after transfer. No cycle was excluded for missing data. Among the nine modelling variables and the outcome, missing values were present in 11 of 15,193 cycles (0.07%), confined to oocyte and fertilization counts (retrieved oocytes, inseminated oocytes and 2PN oocytes, ten cycles each; oocyte-retrieval rate and fertilization rate, eleven cycles each). These were set to zero before modelling, which for count variables carries the biologically meaningful interpretation that no oocytes or zygotes were obtained. Because the affected fraction is negligible, neither complete-case exclusion nor multiple imputation would materially change the analyzed cohort, and selection bias arising from missingness is not expected. The analyzed cohort therefore comprises every consecutive cycle recorded over the study period, which removes the principal route by which retrospective prediction studies acquire optimistic performance. The study is a retrospective model-development study with a held-out internal test set, followed by two prospective observational validation cohorts and external validation in two public datasets. Reporting follows TRIPOD+AI (Supplementary File S1). Patient selection and cohort allocation are shown in Figure 1; baseline characteristics are in Supplementary File S2. The source extract does not carry a patient identifier, so cycles belonging to the same patient cannot be linked and clustering could not be modelled. Repeated treatment is nevertheless documented at cycle level by the attempt-number field: 46.4% of cycles were recorded as attempt two or higher. Repeated cycles from the same patient are therefore present in the cohort in substantial numbers, and observations cannot be assumed independent. Because linkage is impossible, confidence intervals are marginal rather than cluster-robust, and both discrimination and interval coverage may be estimated slightly optimistically. We state this as a limitation rather than correcting for it, since any correction would require an assumption about cluster membership that the data cannot support.
Two prospective cohorts were evaluated with predictions generated before embryo culture. The first comprised 96 cycles with known outcomes from one center. The second comprised 38 cycles with recorded outcomes from a further independent center, drawn from 90 consecutively scored cycles. Its per-transfer pregnancy rate was 65.8% (25/38), and only the full pipeline and TabPFN were scored at that center. External validation used frozen- and fresh-transfer cohorts and their associated public datasets.9–12 Prespecified harmonization mapped common variables; reconstructed blastocyst endpoints were exploratory. Anti-Müllerian hormone, antral follicle count, and body mass index, used by the wider pipeline, were unavailable externally and fixed at cohort defaults (2.0 ng/mL, 12 follicles and 23 kg/m2 respectively). The verification agent and TabPFN used the same seven observed day-1 variables and were unaffected by those defaults.
Model Inputs and Architecture
The CSDI (Conditional Score-based Diffusion for Imputation) Hybrid model is deployed within the IVF Digital Twin, a decision-support pipeline best understood as a multi-agent system in which each layer is a specialized agent with a defined competence and its own modelling paradigm. This paper describes the generative verification agent, Layer 5. The CSDI conditions on seven variables available after the day-1 fertilization check: follicle count, cumulus-oocyte complexes, metaphase-II oocytes, two-pronuclear (2PN) oocytes, oocyte-retrieval rate, fertilization rate, and KPIScore, a summary of nine laboratory indicators aligned with the Vienna consensus.13 The generated targets are total and good-quality blastocysts (Gardner grade ≥3BB); blastocyst formation and good-quality rates are derived analytically from the generated counts, which enforces the constraint that good-quality blastocysts cannot exceed total blastocysts.
CSDI was adapted from Tashiro et al.13 with six Transformer layers. Self-attention between the two output tokens captures the biological correlation between total and good-quality counts, while cross-attention from output tokens to conditioning tokens lets each output weight the stimulation parameters most relevant to it. This replaces the global feature modulation of the predecessor architecture (FiLM-ResNet) and removes independent drift that had caused biological-constraint violations. Quantile normalization preceded diffusion, and an inverse transform restored the count distributions. Counts were rounded to nonnegative integers. Sampling used a deterministic 50-step denoising diffusion implicit model sampler.14 For fixed trained weights, repeated runs therefore return the same generated distribution; determinism at inference does not imply invariance to the training seed.
The denoiser used a hidden dimension of 128, six Transformer layers, four attention heads, a 64-dimensional time embedding, dropout 0.1, 1,000 forward steps with a cosine schedule, and 50 DDIM sampling steps. Training used AdamW, learning rate 3×10-4 after 15 warm-up epochs, cosine annealing, 200 epochs, batch size 128, weight decay 10-4, and gradient clipping at 1.0. A LightGBM classifier estimated pregnancy from the seven conditioning variables and median generated counts, using DART boosting, class weighting, up to 600 trees, learning rate 0.04, 31 leaves, early stopping, and Platt scaling.15 Split conformal prediction used absolute count residuals.16 Generation used 100 samples per calibration cycle, 200 per primary evaluation, and 2,000 per patient in the clinical interface. Hyperparameters were taken from the source architectures and preliminary configurations were evaluated only on internal validation loss; the held-out test set was never used for model selection, hyperparameter selection, or threshold selection during development, and was evaluated only once. Five replicate models differing only in initialization, dropout, and batch-order seed were evaluated on the same held-out test set, with all partitions fixed; results are reported in Supplementary File S4.
Verification Against a Black-Box Predictor
TabPFN, a transformer foundation model pretrained on synthetic tabular tasks, was used as an opaque comparator.17 The released v3 weights were used without fine-tuning. For each cycle, TabPFN and CSDI operated independently on the same seven inputs. The verification layer reported the absolute probability difference, whether predictions fell on the same side of the cohort event rate, and whether the black-box estimate was compatible with the generated blastocyst distribution. External TabPFN predictions were generated leave-one-out. The verification agent was used as a decision-support component rather than an autonomous decision maker.
The probability that a cycle yielded no blastocyst or no good-quality blastocyst was read directly as the proportion of generated samples with a zero count; no separate model was fitted. A logistic recalibration of predicted log-odds was cross-fitted across ten folds. Discrimination was summarized by AUROC and accuracy by the Brier score.
Software
Analyses used Python 3.11 with PyTorch 2.5.1 (CPU build), LightGBM 4.6.0, scikit-learn 1.5.0, NumPy 1.26.4, SciPy 1.17.1, pandas 3.0.3 and Matplotlib 3.10.9. Random seeds were fixed for all reported analyses, and the seed values, environment specification and analysis scripts are included in the archived code release.
Statistical Analysis
Discrimination was assessed by AUROC and AUPRC; calibration and probabilistic accuracy by expected calibration error (ECE; 10 equal-width bins), calibration slope, observed versus predicted event rate, and Brier score. Generated and observed counts were compared by mean absolute error, Wasserstein distance, the two-sample Kolmogorov-Smirnov statistic, and interval coverage. Model agreement used Pearson and Spearman correlations and paired tests. The classification threshold of 0.343 was selected post hoc on the retrospective test set by maximizing the harmonic mean of sensitivity and specificity; threshold-specific operating characteristics are therefore exploratory.
Percentile bootstrap intervals over cycles (2,000 resamples; fixed seed) were used for AUROC, AUPRC, Brier score, ECE, calibration slope, and mean predicted risk; Wilson intervals were used for event rates and conformal coverage. AUROCs were compared by DeLong tests. Because patients could not be linked, intervals were not cluster robust. Tests were two-sided with p<0.05.
Results
Retrospective Performance
In 1,520 held-out cycles, the verification agent achieved AUROC 0.661 (95% CI, 0.631–0.691), AUPRC 0.468 against an event-rate baseline of 0.340, Brier score 0.209, and ECE 0.029. Mean predicted pregnancy was 33.9% versus 34.0% observed. Platt scaling reduced ECE from approximately 0.15. At the post hoc threshold of 0.343, sensitivity was 0.623 and specificity 0.628. Published comparisons in Table 1 are contextual because endpoints and validation designs differ.
For total blastocysts, median-prediction error was 1.38 and 90% conformal coverage was 93.2% (95% CI, 91.8%–94.4%); for good-quality blastocysts, the corresponding values were 1.18 and 91.0% (89.4%–92.3%). Kolmogorov-Smirnov statistics of 0.237 and 0.381 indicated residual distributional differences despite close marginal coverage. On public data, 2PN was the only consistently observed laboratory endpoint; the difference in 2PN error between the Digital Twin and TabPFN was not significant (ΔMAE −0.041, 95% CI −0.101 to 0.018; p=0.064). Reconstructed blastocyst endpoints were exploratory.
Prospective and External Validation
In the 96-cycle prospective cohort, the verification agent achieved AUROC 0.637,. In the 38-cycle cohort the full pipeline reached AUROC = 0.726 and TabPFN 0.700 (95% CI 0.50–0.88) (Supplementary File S2).
In 489 external transfer cycles, AUROC was 0.569 (0.514–0.624) for the verification agent, and 0.596 (0.538–0.655) for TabPFN(Table 2).. Mean predicted risks ranged from 0.38 to 0.51 versus 0.29 observed, showing systematic overprediction. The full-pipeline estimate was obtained with three predictors fixed at defaults; the verification agent and TabPFN had their intended inputs. DeLong tests detected no difference between TabPFN and the Digital Twin (p = 0.70), the verification agent (p = 0.44), or a Bayesian ensemble variant (p = 0.25) (Supplementary File S3).
Verification Analysis
In the first prospective cohort, CSDI and TabPFN predictions were weakly correlated (Pearson r=0.29; Spearman ρ=0.29). Their paired mean difference was −2.7 percentage points, and the Wilcoxon test was not significant (p=0.126); this does not establish equivalence. CSDI had a Brier score of 0.244 versus 0.249 for TabPFN. Among 26 cycles with an absolute probability difference >0.15, Brier scores were 0.225 and 0.243. Opposite-side-of-base-rate flags occurred in 37 of 96 cycles and identified 21 of 46 TabPFN directional errors. These descriptive flags demonstrate the verification mechanism but do not define a clinical intervention threshold.
Across five replicate models, test-set AUROC had a median of 0.654 (range, 0.647–0.656), ECE a median of 0.023 (0.022–0.034), and total-blastocyst 90% interval coverage a median of 93.0% (92.5%–93.4%). Training-seed variability was therefore smaller than the change across settings (Supplementary File S4).
Predicting a Cycle With No Usable Embryo
No blastocyst was obtained in 614 of 1,520 cycles and no good-quality blastocyst in 789. The same generated distribution identified these outcomes with AUROC 0.840 (95% CI, 0.820–0.859) and 0.883 (0.865–0.900), respectively, but underestimated absolute risk. Cross-fitted recalibration corrected the mean risk while leaving discrimination unchanged and reduced the Brier score (Table 3).
Discussion
As reproductive medicine adopts multi-agent and language-model-orchestrated systems, the binding constraint on deployment shifts from discrimination to verifiability.6,18 Language-model agents used alone are inconsistent and only partly concordant with expert decisions,19 image-based selection networks are unstable across random initializations,20 and reviews of AI across the IVF cycle repeatedly name generalizability and transparency as dominant open problems.21–23 In an architecture where several black-box agents feed an orchestrator, an error in any one can propagate unchecked. The remedy is not another opaque vote but an independent control whose job is to test another model’s output on different principles.24,25 Our results show that a generative model suits this role because it derives risk from an inspectable blastocyst trajectory and its errors were only weakly correlated with those of TabPFN.
Calibration is particularly important for prediction models intended to provide individual probabilities rather than merely rank patients. Discrimination and calibration describe different properties: AUROC measures how well patients with and without an outcome are separated, whereas calibration asks whether predicted probabilities match observed frequencies.26,27 The retrospective ECE of 0.029 should be read as an absolute result because published IVF systems often report discrimination without calibration.28,29 It did not transfer unchanged: the model underpredicted in the second prospective cohort and all systems overpredicted on public data. Recalibration can correct mean risk and dispersion, but it preserves rank and cannot restore reduced discrimination.
The futility analysis makes the same point on a second endpoint. The generated distribution separated cycles with no blastocyst or no good-quality blastocyst more strongly than it separated pregnancy, which is unsurprising because blastocyst formation is what the generative stage models directly. Yet absolute risks were underestimated, and a cross-fitted logistic transformation corrected the level without changing the ranking. The same output therefore supplies a clinically interpretable warning after the fertilization check, but its risk level must be calibrated locally before use. This also gives the verification agent a second and more immediately actionable output. A flag that a cycle is unlikely to produce any transferable embryo is available on the day after the fertilization check, from variables every laboratory already records, and it is a statement about the laboratory trajectory rather than about implantation — the part of the process this model actually observes. Used with its calibrated interval, it supports concrete conversations about whether to continue culture, whether to counsel for an additional retrieval, and whether to bank oocytes, and it does so without requiring the clinician to accept an opaque probability. We would expect it to be the first component of the pipeline to reach routine use, and we note that its absolute risk, like every other level reported here, should be recalibrated locally before it is acted on.
The prospective decline is a clinically relevant test of transportability, rather than an unfavorable metric. Retrospective studies can be optimistic because of temporal leakage, outcome-dependent inclusion, nonrandom missingness, repeated patients, and repeated model selection against the same validation data. TRIPOD+AI and PROBAST+AI emphasize these risks, while DECIDE-AI positions prospective evaluation as a necessary step before routine use.30–32 Our prospective cohorts contained only 44 and 25 events; their intervals overlap between systems, so they show that the models can be run prospectively but do not rank them. The first cohort was older and included more repeat attempts than development data (82.3% versus 46.4%).
The external benchmark further illustrates why no prediction model is universally validated. Clinic-specific performance variation has been reported for time-lapse algorithms, and geographical validation of a day-3 selection model preserved AUC at 0.68 while the calibration slope fell to 0.72.5,33,34 Here, three architecturally different systems clustered at AUROC 0.57–0.61. The lower external event rate explains overprediction in the expected direction, while three unavailable predictors weakened the wider pipeline but not the verification agent. Many transfers occurred on day 3; because day-3 morphology imperfectly predicts later blastocyst formation, the remaining siblings need not represent the original cohort’s potential.35 This is a plausible mechanism, not a demonstrated causal explanation.
The same limitation clarifies the gap between embryo-centered predictions and clinical pregnancy. The model observes laboratory development but not endometrial receptivity, synchronization, uterine conditions, transfer technique, medication adherence, or other patient-level factors, and guidance on implantation failure and embryo transfer recognizes this heterogeneity.36,37 A model that looks excellent on one clinic’s retrospective data can therefore behave quite differently in another clinic, and a single opaque probability gives the clinician no way to notice when this is happening. This gap, however, is not a difference in biological understanding but a difference in scale calibration. The small, nonsignificant mean difference between CSDI and TabPFN suggests that disagreement among model components was not the dominant source of error; however, concordance does not prove that implantation-side factors caused the failures because the models share inputs and may share correlated errors. Risk-adjusted residuals should therefore be interpreted with stage-specific laboratory KPIs. If fertilization and blastocyst metrics remain within local control limits while pregnancy falls below calibrated expectation, review should extend beyond the embryo; if generated and observed blastocyst development diverge, laboratory processes deserve priority. This extends the Vienna consensus principle that each laboratory should define and monitor its own KPI system.38
The CSDI verifier also avoids inference-time variability described for image-based embryo-selection networks: changes in rankings across independently initialized models.20 Ranking agreement was low in Thirumalaraju et al study (Kendall’s W 0.357 ± 0.130 and 0.341 ± 0.140), and critical errors, in which a degenerate embryo was ranked above an intact blastocyst, occurred in 3.6% to 21.7% of cohorts at the training centre and 4.4% to 37.8% at the external one. Replicate models spanning AUROC 0.49 to 0.72 with a mean of 0.60 can therefore correspond to materially different clinical decisions under a different seed. Our verifier does not share the inference-time component of this instability, because the deterministic DDIM sampler yields identical outputs for identical conditioning and fixed weights, and the gradient-boosted head is far less sensitive to initialization than image networks. Determinism at inference is not, however, the same as invariance of the trained weights to the training seed, and it would be inconsistent to cite this evidence against image-based systems while leaving our own training variability unmeasured. Across five replicate models differing only in the training seed, AUROC on the fixed held-out test set had a median of 0.654 (range 0.647 to 0.656), expected calibration error a median of 0.023 (range 0.022 to 0.034), and coverage of the 90% conformal intervals a median of 93.0% (range 92.5 to 93.4); the conformal radius for total blastocysts was identical in all five replicates (Supplementary File S4). The spread in discrimination across seeds, 0.009 AUROC, is an order of magnitude smaller than the ranking instability reported for replicate image-based networks, and it is also much smaller than the difference between our retrospective and external estimates. Seed variability is therefore not a material source of uncertainty for this architecture, whereas transportability is. That a model built on day-1 count data reaches AUROC values within the confidence intervals of systems using 120-hour morphokinetic series does not mean time-lapse data are uninformative. It means their marginal value for cycle-level pregnancy probability is limited once adequate methods are applied to the tabular data already at hand. A Cochrane review found no significant live-birth benefit for time-lapse systems over conventional incubation (OR 1.12, 95% CI 0.92–1.36 with embryo-selection software; OR 0.91, 0.67–1.23 with morphological assessment; low to very low quality).39 The main value of time-lapse may lie in ranking embryos within a cohort rather than in estimating cycle-level probability, a distinction that per-transfer AUROC does not capture. For units without time-lapse infrastructure, an independent control layer based on routine data brings auditability within reach without implying clinical equivalence.
Several limitations constrain interpretation. The prospective cohorts were small and differed in case mix; the public cohorts were heterogeneous, reconstructed blastocyst endpoints were exploratory, and three predictors used by the wider pipeline were unavailable externally. Clinical pregnancy rather than live birth was modeled. Patients could not be linked across cycles, so intervals may be optimistic. The cohort spans 2012–2025 and mixes fresh and frozen transfers, but temporal drift was not modeled. Donor-oocyte status and implantation-side variables were unavailable. Nested cross-validation was not performed, the operating threshold was selected post hoc on the test set, and each prospective or external cohort was evaluated once. A universal architecture may transfer, but universal coefficients, calibration, and thresholds should not be assumed. Deployment should begin with silent local validation, prespecified updating on one local sample, and prospective retesting on another.
Conclusion
To our knowledge, this is the first application of Transformer-based diffusion modelling to tabular embryological data in reproductive medicine and the first use of a generative model as a point-of-care verifier for a tabular foundation model; we did not perform a systematic literature search to establish priority. CSDI Hybrid generated reproducible embryological trajectories that made black-box IVF predictions independently checkable, and the same output identified cycles at risk of yielding no usable embryo. Retrospective performance was calibrated, but prospective and external evaluation revealed setting-dependent discrimination and miscalibration. These findings argue against the assumption that a single fixed model can retain its original probability estimates and discrimination in every IVF clinic without local evaluation. As reproductive medicine adopts multi-agent and language-model-orchestrated systems, we propose that generative verification agents of this kind should become a standard component, the mechanism by which black-box accuracy is made auditable. Generative verification can improve auditability, but clinical deployment requires local calibration, prospective validation, and interpretation alongside laboratory KPIs and non-embryological determinants of pregnancy.
Declaration of Generative AI and AI-Assisted Technologies in the Writing Process
OpenAI Codex was used during revision for language editing, consistency checking, and document formatting. Anthropic Claude Code was used for python code compilation, debugging and GitHub verification The authors reviewed and edited the output, verified the scientific claims, analyses, and references against the underlying materials and original sources, and take full responsibility for the manuscript.
Funding statement
The authors received no external funding for this study. The authors were solely responsible for the study design, analysis, interpretation, manuscript preparation, and decision to submit.
Conflict of interest statement
The authors declare no relationships, activities, or interests that could have influenced this work.
CRediT authorship contribution statement
Sergei Sergeev: Conceptualization; Methodology; Software; Formal analysis; Data curation; Visualization; Writing – original draft. Iuliia Diakova: Investigation; Data curation; Validation; Writing – review and editing. Lasha Nadirashvili: Investigation; Data curation; Validation; Writing – review and editing. All authors approved the submitted version and accept accountability for the work.
Data sharing statement
The two public benchmark datasets are available from Mendeley Data (doi:10.17632/hp9n9w6w2f.1 and doi:10.17632/dk62nfft5y.1). Source code is available at https://github.com/embryossa/IVF-Digital-Twin. The revision-specific analysis code and seed-stability results are supplied with this revision. Clinic-level records cannot be shared publicly due to institutional and patient confidentiality restrictions; aggregate data may be requested from the corresponding author.
Reporting guideline
TRIPOD+AI and STROBE.
Study registration
Not registered; this was a retrospective model-development study with observational prospective and external evaluation, not a clinical trial.
Ethics approval
The study used fully de-identified retrospective embryo-development data. The requirement for individual informed consent was waived under the applicable institutional policy.
Online Resources
1. Online Resource 1 (Supplementary File S1): Completed TRIPOD+AI checklist with page references.
2. Online Resource 2 (Supplementary File S2): Baseline characteristics and cohort comparability.
3. Online Resource 3 (Supplementary File S3): Confidence intervals for reported performance measures.
4. Online Resource 4 (Supplementary File S4): Stability across five training seeds.


