Technology Research Research and Evidence Precision Endocrinology Predictive Risk Models

AI model predicts thyroid disease risk during pregnancy

July 07, 2026 By Matthew Solan 3 min read
Share Share via Email Share on Facebook Share on LinkedIn Share on Twitter

A random forest model accurately predicted thyroid disease during pregnancy using routinely collected clinical characteristics and outperformed seven other machine learning algorithms, according to a retrospective validation study published in Medical Science Monitor.

"Thyroid disease during pregnancy is challenging to predict and manage clinically due to complex risk factors," wrote first author Hui Qiao, MD, of the Department of Anesthesiology at Beijing Shijitan Hospital, Capital Medical University, in China, and colleagues. "These findings enhance the potential for early identification and intervention in thyroid disease during pregnancy; they provide clinicians with a valuable tool to improve risk assessment and decision-making."

The researchers retrospectively analyzed electronic medical records from 5,461 women who delivered at a single center in Beijing, China, between 2020 and 2024. The cohort was divided chronologically into a training dataset comprising 4,466 patients who delivered between 2020 and 2023 and an independent temporal test dataset comprising 995 patients who delivered in 2024. Thyroid disease during pregnancy, defined as a composite of subclinical hypothyroidism, clinical hypothyroidism, and hyperthyroidism, occurred in 12% of patients in the training cohort and 10% of those in the test cohort.

Using the Boruta feature-selection algorithm, which identifies the most informative predictors, researchers identified nine clinical predictors associated with thyroid disease during pregnancy: age, height, pre-pregnancy weight, gravidity, parity, primiparity or multiparity, hypertensive disorders of pregnancy, scarred uterus, and autoimmune disease.

Eight machine learning algorithms were evaluated: logistic regression, Bayesian, k-nearest neighbors, support vector machine, neural network, classification and regression tree, extreme gradient boosting, and random forest models. Model development incorporated balanced sampling, 10-fold cross-validation, and hyperparameter optimization.

The random forest model achieved the strongest performance. In the independent test cohort, it achieved an area under the receiver operating characteristic curve (AUROC) of 0.9999, an area under the precision-recall curve (AUPRC) of 0.9992, and an accuracy of 99.6%. In the training set, random forest achieved an AUROC of 0.9987, an AUPRC of 0.9986, and 98.4% accuracy.

For benchmark comparison, a logistic regression model based on conventional risk factors achieved an AUROC of 0.5504, an AUPRC of 0.1209, and 90% accuracy in the test dataset. In the training set, it had an AUROC of 0.5560, an AUPRC of 0.5357, and 55.1% accuracy;

Feature importance analyses identified height, pre-pregnancy weight, gravidity, and age as the strongest contributors to model predictions, followed by hypertensive disorders of pregnancy, primiparity or multiparity, scarred uterus, autoimmune disease, and parity. The study had several limitations. 

The researchers cautioned that the model's near-perfect performance metrics may reflect residual overfitting despite temporal validation and require confirmation in multi-center external validation studies. The model was also developed using data from a single center and lacked thyroid-specific biomarkers, including thyrotropin, free thyroxine, thyroid peroxidase antibodies, thyroglobulin antibodies, thyrotropin receptor antibodies, iodine status, and family history of thyroid disease. The study did not include imaging, psychological, or socioeconomic variables. 

The researchers noted that the model is intended as a prescreening tool using routinely available clinical data rather than a replacement for standard biochemical testing. They suggested that following prospective external validation, the model "could be utilized in early pregnancy (eg, at the first antenatal visit) and integrated into electronic medical records to automatically identify patients at high risk for thyroid disease during pregnancy," wrote Dr. Qiao, and colleagues. 

No conflicts of interest were reported.

 

AACE Endocrine AI is published by Conexiant under a license arrangement with the American Association of Clinical Endocrinology, Inc. (AACE®). The ideas and opinions expressed in AACE Endocrine AI do not necessarily reflect those of Conexiant or AACE. For more information, see Policies.

Related Content