SAFE-Loss: Specialized Aligned Fusion of Experts for First-Trimester Pregnancy Loss Prediction
Main Article Content
Abstract
Background. Multimodal clinical prediction is conventionally approached by engineering domain-specific features, assigning specialist encoders to different views of the patient, and combining those encoders with a learned per-patient gate. The premise — that modality-specific specialisation recovers signal a single joint model would miss — is widely adopted and rarely tested against its own counterfactual.
Objective. To build such a system for first-trimester pregnancy-loss prediction, to evaluate it beyond discrimination alone, and to determine by controlled ablation where its accuracy actually comes from.
Methods. We developed CAFE (Clinically-Aligned Fusion of Experts): 43 engineered features in five clinically motivated families — temporal trajectory, growth velocity, inter-marker discordance, maternal risk profile and cross-modal interaction, all built on gestational-age normalisation — tree experts over a flat view and a cross-modal view, an optional 12,585-parameter temporal-attention encoder over the raw scan sequence, and a per-patient softmax gate over expert logits. Evaluation used a synthetic dual-etiology cohort (n = 3000, prevalence 20.3 %) under 5-fold cross-validation repeated twice. Every arm, hybrid and baseline alike, received an identical 66-feature union view, so no result can be attributed to an information advantage. Reported measures were AUROC, AUPRC, Brier score, Cox calibration slope and intercept, expected calibration error, decision-curve analysis, and a screening operating point selected on one repeat and scored on the other. A difference was declared real only if it exceeded twice the pooled fold standard deviation and agreed in sign on at least 8 of 10 folds.
Results. CAFE reached AUROC 0.852, the highest point estimate we recorded on this cohort and inside the 0.840–0.855 band predicted for it in advance. It was also the best-calibrated arm we measured (slope 0.946, expected calibration error 0.030, no post-hoc correction), returned the highest mean net benefit across risk thresholds 0.05–0.50, and trained in 43 s against 269 s for the deep temporal architecture it replaces.
Ablation. Its accuracy does not originate in its architecture. Replacing the gated multi-view ensemble with a single gradient-boosted tree on the same features moved AUROC by 0.001. The +0.030 total improvement over logistic regression was dominated by two of its four steps: +0.021 for the choice of boosting library and +0.015 for the engineered features — the latter only for a learner unable to represent interactions natively, since the same features were worth +0.002 to the deployed learner. The gated fusion contributed +0.001 and the sequence encoder −0.005; the gate independently learned to discount that encoder, assigning it 0.195 against an equal share of 0.333.
Interpretability. Feature importance and feature contribution pointed in opposite directions: out-of-fold exact TreeSHAP assigned the engineered block 66.8 % of total attribution mass, while ablation valued that block at 0.002 AUROC for the deployed model. The gate proved confident, patient-specific and clinically legible yet inconsequential — near-bimodal weights (mean 0.557, SD 0.402, spanning 0–1) routing abnormal yolk-sac measurements to the cross-modal expert and prominent maternal risk to the flat expert, for +0.001.
Conclusions. The arms separated in exactly one dimension, and it was not one the architecture gave any reason to examine: calibration. The XGBoost-derived arms had calibration slopes of 0.430–0.480 against 0.923–0.946 for the CatBoost-derived arms, with non-overlapping per-fold distributions, while their AUROCs differed by 0.021 and their Brier scores tied. The 90 %-sensitivity thresholds consequently spanned 0.004 to 0.081 across arms, so any workflow with a hard-coded risk threshold is silently coupled to the calibration of one particular model. CAFE is worth deploying; the explanation for why it performs as it does is not the one its architecture suggests.