Sex-specific machine learning models for cardiovascular disease risk prediction in adults aged ≥ 80 years: insights from the Chinese longitudinal healthy longevity survey Authors: Hui Jiang, Ye Li Published: 2025 ABSTRACT BackgroundCardiovascular disease (CVD) is a leading cause of mortality among older adults, yet existing risk prediction tools lack validation for individuals aged ≥ 80 years. This study aims to develop and validate gender-specific machine learning models for CVD risk prediction in adults aged ≥ 80 years using routine biomarkers, and to identify key predictors through interpretable artificial intelligence approaches.MethodsThis prognostic study analyzed two independent longitudinal datasets (2012–2014 and 2014–2018) from the Chinese Longitudinal Healthy Longevity Survey including 1,954 community-dwelling adults aged ≥ 80 years (715 males, 1,239 females) without CVD at baseline. The outcome was incident CVD within 4 years. Five machine learning algorithms (i.e., logistic regression decision tree, support vector machine, random forest, and extreme gradient boosting (XGBoost)) were compared using area under the receiver operating characteristic curve (AUC), recall, specificity, precision, and F1-score. Model interpretability was assessed using SHapley Additive exPlanations values.ResultsThe XGBoost model demonstrated superior performance for both males (AUC [95% confidence interval], 0.751 [0.635–0.855]; recall, 759 [0.593–0.909]; F1-score, 0.506 [0.369–0.628]) and females (AUC, 0.748 [0.671–0.819]; recall, 0.891 [0.791–0.976]; F1-score, 0.463 [0.369–0.551]). Shared top predictors included vitamin D3, glycated albumin, platelet count, and vitamin B12. Risk stratification based on model predictions effectively identified high-risk individuals, with hazard ratios of 7.46 (95% CI, 2.81–19.78) for males and 5.18 (95% CI, 2.27–11.82) for females in the highest risk group compared to the lowest risk group.ConclusionsThis study developed interpretable, gender-specific machine learning models for CVD risk prediction in the oldest old population using routine biomarkers. The models demonstrated good discrimination and calibration, offering a practical tool for identifying high-risk individuals who may benefit from targeted preventive interventions. These findings suggest the potential utility of biomarker-based machine learning approaches in cardiovascular risk assessment for the rapidly growing elderly population.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12877-025-06676-0. Introduction Cardiovascular disease (CVD) is the leading cause of mortality and a major contributor to disability globally [1]. In China, CVD accounted for 43.0% of total deaths and 24.1% of total disability adjusted life years in 2019 [2]. The risk of CVD-related complications and mortality escalates sharply among the elderly, with individuals aged ≥ 80 years (the oldest old population) experiencing disproportionately adverse outcomes [3, 4]. As China’s life expectancy is projected to reach 80 years by 2035 [5], targeted strategies to mitigate CVD risks in this rapidly expanding population are imperative. Enhanced risk prediction tools tailored to the oldest old are critical for enabling timely interventions, reducing morbidity, and promoting quality of life. Current CVD risk prediction tools demonstrate several limitations for the oldest old population. Widely used models, including the Framingham Risk Score [6], QRISK [7], SCORE2 [8], Pooled Cohort Equations [9], and China-PAR [10], were developed for individuals aged 80 years or younger. While tools like SCORE O.P. (covering ages 65 to 101) [11] and SCORE2-OP (covering ages 70 to 89) [12] extend applicability to older people, their derivation cohorts predominantly include younger seniors (median age ~ 70 s), inadequately capturing risk profile of the oldest old. Moreover, these tools mostly derived from traditional risk factors such as smoking, hypertension, and lipid profiles. Emerging evidence suggests that associations between these conventional risk factors and CVD outcomes are attenuated with ageing [13, 14], highlighting the need for other prediction approaches for the longevity population. Alternatively, biomarkers linked to CVD pathologies (i.e., inflammation, oxidative stress, and hemostatic dysfunction, etc.), such as vitamin D3 levels [15], hemoglobin parameters [16, 17], and platelet indices [18, 19], offer promise for improving risk stratification but remain underexplored in predictive models for octogenarians and beyond. Models based on biomarkers should consider sex specific risk thresholds. Evidence showed that there are sex differences in atherosclerotic pathophysiology, including plaque morphology and hormone-mediated immune responses [20]. Biomarker profiles, such as vitamin D3 [21] and platelet indices [22], also exhibit sex-dependent variations in their associations with cardiovascular health, underscoring the need for sex-specific analyses. Advancing predictive accuracy rely on biomarkers requires addressing two additional challenges: (1) the multicollinearity and non-linear relationships between biomarkers and CVD outcomes, which traditional regression-based methods struggle to capture, and (2) the interpretability of complex models to foster clinical trust. Machine learning algorithms excel at identifying non-linear interactions and high-dimensional patterns within datasets, yet their “black box” nature has hindered clinical adoption. Recent advancements in explainable artificial intelligence, such as SHapley Additive exPlanations (SHAP), enable transparent interpretation of machine learning model outputs, bridging the gap between algorithmic complexity and clinical utility [23]. This study aims to develop and validate sex-specific machine learning models for CVD risk prediction in individuals aged ≥ 80 years. By using biomarkers with mechanistic links to CVD pathogenesis, we seek to (1) establish a robust predictive framework tailored to the longevity population, (2) identify sex-specific risk determinants, and (3) elucidate model decision-making through SHAP analysis to enhance clinical interpretability. This work addresses a critical gap in geriatric cardiovascular care, offering a paradigm for personalized risk stratification in rapidly aging societies. Methods Study population This study utilized data from the Chinese Longitudinal Healthy Longevity Survey (CLHLS), an ongoing community-based prospective cohort study investigating healthy aging among Chinese old adults. Launched in 1998, the CLHLS has conducted seven follow-up surveys in 2000, 2002, 2005, 2008 ~ 09, 2011 ~ 2012, 2014, and 2018, respectively. Biomarker data, including blood routine examinations, urine routine examinations, and blood biochemistry tests, were collected during the 5th (2009), 6th (2011 ~ 2012), and 7th (2014) surveys. Detailed descriptions of the study design, sampling strategies, measures, and data quality have been published previously [24]. The same survey areas and biomarker measurements were conducted in the 2011 ~ 2012 and the 2014 waves, we then combined these two waves’ data to enrich the number of participants and defined the outcome was 4-year CVD risk. A total of 3331 participants aged 80 years and older were recruited from the 2011 ~ 2012 and 2014 waves. After excluding 463 participants with CVD at baseline, 824 died without CVD, and 90 cases with missing value more than 30%, current analysis finally included 1954 participants. A flowchart summarizing the participant enrollment is provided in Fig 1. The CLHLS study complies with the Declaration of Helsinki, and ethical approvals were obtained from the Biomedical Ethics Committee, Peking University (IRB00001052–13074) and the Institutional Review Board, Duke University (Pro00062871). Written informed consent was obtained from all participants or their proxy respondents. This diagnostic study followed the Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis (TRIPOD) reporting guidelines. Data collection Questionnaires were used to collect basic demographic and health information. For each participant, 7 mL of blood and 50 mL of urine were collected after an overnight fast (≥ 12 h). Biomarkers data were obtained through blood routine examinations, urine routine examinations, and blood biochemistry testing. Detailed descriptions of the biological indicator testing methods are available elsewhere [24, 25]. Outcome definition The incidence of CVD was defined as any new occurrence of heart disease, stroke, or other cerebrovascular diseases identified during next wave surveys. This follow-up period spanned less than four years, covering the intervals from 2012 to 2014 and 2014 to 2018. CVD occurrence was determined through self-reported questionnaires or proxy reports from close family members for deceased participants. The reliability of self-reported chronic conditions in the CLHLS has been validated in previous studies [24]. Statistical analysis Descriptive analyses were performed for the entire sample and stratified by sex. Continuous variables were presented as mean (standard deviation, SD), while categorical variables were reported as frequency (percentage). Differences between sexes were assessed using chi-square tests for categorical variables and t-tests for continuous variables, as appropriate. Model development We adopted the established Framingham Risk Score [6] and SCORE2-OP algorithm [12] as benchmark models for comparison with our developed risk-prediction models. Before training the models, features and cases with missing values exceeding 30% were excluded. To address potential sex differences, separate models were developed for males and females. Given the imbalance in the dataset, where negative cases outnumbered positive cases, several strategies were implemented to mitigate this issue. The dataset was stratified and split into training and testing sets in an 8:2 ratio, maintaining proportional representation of each class. Stratified five-fold cross-validation was then applied within the training set for model development and validation. Additionally, class weights were adjusted by setting the weight for the positive class to the ratio of negative to positive cases to ensure balanced learning. Five machine learning algorithms were developed and compared, i.e., logistic regression, decision tree, support vector machine, random forest, and extreme gradient boosting (XGBoost). For algorithms that cannot handle missing values (e.g., logistic regression, decision tree, support vector machine, random forest), missing data were imputed using the mean (for continuous variables) or mode (for categorical variables) in both the training and testing sets separately to avoid data leakage. For XGBoost, missing values were left untouched. To mitigate over-fitting, early stopping strategy was employed in XGBoost, with the early stopping round set as 30. Hyperparameters were tuned by the optuna optimization framework which provides a flexible, efficient, and scalable way to automate the search for optimal hyperparameters [26]. The area under operating characteristic curve (AUC) was used as the optimization metric and the optimization process was configured with 1,000 trials (n_trials = 1000). The top 5% of hyperparameter combinations (50 candidates) were retained for further validation. Details of all tuned and optimal model hyperparameters are provided in the eMethods in Additional file. Model evaluation and interpretation The 50 candidate models underwent multi-dimensional evaluation in the test set. Model discrimination was summarized by the AUC and, at the cut-off maximizing Youden’s index, by the resulting recall, specificity, precision, and F1-score; 95% confidence intervals (CI) for all metrics were obtained from 10,000 bootstrap replicates. Model calibration was assessed using the sigmoid method and calibration plots were presented. Brier score was used to compare overall accuracy with a lower scores indicate superior model performance [27]. Decision curve analysis was adopted to demonstrate the net benefit of the model at different threshold to estimate clinical utility. Based on calibrated predicted probabilities, individuals were stratified into low-, medium-, and high-risk groups, corresponding to the lowest 60%, middle 30%, and highest 10% of predicted probabilities, respectively. Cox proportional hazards modeling was used to validate the associations between CVD risk groups and outcomes with hazard ratio (HR) and 95% CI was reported. The final model was selected through a comprehensive comparison of performance metrics, prioritizing AUC and clinical utility (net benefit in decision curve analysis) while ensuring robust calibration. We utilized the SHAP framework to generate interpretable biomarker attributions at both population and individual levels of the final model [28]. SHAP values quantify the marginal contribution of each feature to specific predictions, enabling rankings of feature importance and providing localized explanations of key risk drivers for individual cases. In this study, we utilized the SHAP summary plot and beeswarm plot for global interpretation, and waterfall plot for localized explanation. All analyses were conducted using Python 3.7 with packages including scikit-learn, XGBoost, shap, optuna, lifelines, and matplotlib. Results Participant characteristics The study included 1954 participants (mean [SD] age, 91.52 [7.60] years), with 715 males (144 CVD incident cases) and 1239 females (228 CVD incident cases). The characteristics of the participants according to sex are shown in Table 1. Compared to females, males had significantly lower mean age, total cholesterol, triglycerides, superoxide dismutase, and platelet count, while had higher mean blood urea nitrogen, serum creatinine, uric acid, urinary creatinine, and vitamin D3 levels, etc. Table 1Characteristics of participants according to sexFeatureFull nameAll(N = 1954)Male(N = 715)Female(N = 1239)P valueAge/91.52 ± 7.6089.02 ± 6.5592.96 ± 7.79 < 0.001Hypertension/864 (44.2)301 (42.1)563 (45.4)0.143Diabetes/26 (1.3)11 (1.5)15 (1.2)0.693alb (g/L)Plasma albumin40.77 ± 5.0840.82 ± 4.6140.74 ± 5.330.716bun (mmol/L)Blood Urea Nitrogen6.79 ± 2.286.93 ± 2.286.71 ± 2.28 0.038cho (mmol/L)Total cholesterol4.50 ± 1.014.26 ± 0.934.64 ± 1.02 < 0.001crea (mmol/L)Serum creatine84.02 ± 31.9592.95 ± 36.8078.84 ± 27.49 < 0.001crphs (mg/L)High sensitive C-reactive protein3.44 ± 7.693.51 ± 8.123.41 ± 7.430.777glu (mmol/L)Plasma glucose4.91 ± 1.774.83 ± 1.664.96 ± 1.830.090ga (µmol/L)Glycated albumin244.25 ± 36.71245.46 ± 37.99243.56 ± 35.950.277hdlc (mmol/L)High-density lipoprotein cholesterol1.35 ± 0.371.30 ± 0.351.37 ± 0.370.196tg (mmol/L)Triglyceride1.06 ± 0.650.94 ± 0.561.13 ± 0.69< 0.001ua (µmol/L)Urine acid296.97 ± 85.02326.69 ± 83.04279.76 ± 81.35 < 0.001sod (IU/ml)Superoxide dismutase57.96 ± 8.9356.86 ± 8.9758.59 ± 8.85 < 0.001vd3 (µg/L)25-OH-vitamin d340.75 ± 18.5746.51 ± 19.7737.43 ± 16.98 < 0.001mda (nmol/ml)Malonaldehyde5.54 ± 3.145.44 ± 3.065.59 ± 3.190.311vitb12 (pg/ml)Vitamin b12373.48 ± 169.10376.8 ± 172.09371.52 ± 167.350.524ualb (mg/L)Urinary microalbumin31.01 ± 99.2927.88 ± 85.0732.9 ± 106.980.279ucr (µmol/L)Urine creatinine96.75 ± 62.20116.85 ± 69.784.57 ± 53.67 < 0.001ualbbyucr (%)Ualb/ucr ratio53.15 ± 260.2431.99 ± 100.1265.95 ± 319.73 0.001wbc (10^9/L)White Blood Cell Count5.81 ± 1.775.81 ± 1.745.79 ± 1.780.979lymph (10^9/L)Lymphocyte count1.83 ± 0.731.81 ± 0.751.84 ± 0.710.072lymph%Percentage of lymphocytes32.23 ± 9.3231.68 ± 9.4232.54 ± 9.260.520rbc (10^12/L)Red Blood Cell Count4.18 ± 0.764.28 ± 0.814.13 ± 0.73 < 0.001hgb (g/L)Hemoglobin120.16 ± 19.98125.74 ± 21.12116.97 ± 18.56 < 0.001hct (%)Hematocrit38.57 ± 7.9939.81 ± 7.6237.85 ± 8.11 < 0.001mcv (fL)Mean Corpuscular Volume93.94 ± 8.0695 ± 7.8393.33 ± 8.13 < 0.001mch (pg)Mean Corpuscular Hemoglobin29.22 ± 4.0729.99 ± 4.0528.79 ± 4.02 < 0.001mchc (g/L)Mean Corpuscular Hemoglobin Concentration310.41 ± 35.05314.68 ± 36.34307.97 ± 34.06 < 0.001plt (10^9/L)Platelet Count198.95 ± 74.69181.02 ± 66.98209.24 ± 76.93 < 0.001mpv (fL)Mean Platelet Volume9.29 ± 2.659.21 ± 1.559.34 ± 3.110.221pdw (fL)Platelet Distribution Width15.34 ± 1.9215.39 ± 1.9415.30 ± 1.910.316pct (%)Plateletocrit0.18 ± 0.070.16 ± 0.060.20 ± 0.080.987 Table 1Characteristics of participants according to sexFeatureFull nameAll(N = 1954)Male(N = 715)Female(N = 1239)P valueAge/91.52 ± 7.6089.02 ± 6.5592.96 ± 7.79 < 0.001Hypertension/864 (44.2)301 (42.1)563 (45.4)0.143Diabetes/26 (1.3)11 (1.5)15 (1.2)0.693alb (g/L)Plasma albumin40.77 ± 5.0840.82 ± 4.6140.74 ± 5.330.716bun (mmol/L)Blood Urea Nitrogen6.79 ± 2.286.93 ± 2.286.71 ± 2.28 0.038cho (mmol/L)Total cholesterol4.50 ± 1.014.26 ± 0.934.64 ± 1.02 < 0.001crea (mmol/L)Serum creatine84.02 ± 31.9592.95 ± 36.8078.84 ± 27.49 < 0.001crphs (mg/L)High sensitive C-reactive protein3.44 ± 7.693.51 ± 8.123.41 ± 7.430.777glu (mmol/L)Plasma glucose4.91 ± 1.774.83 ± 1.664.96 ± 1.830.090ga (µmol/L)Glycated albumin244.25 ± 36.71245.46 ± 37.99243.56 ± 35.950.277hdlc (mmol/L)High-density lipoprotein cholesterol1.35 ± 0.371.30 ± 0.351.37 ± 0.370.196tg (mmol/L)Triglyceride1.06 ± 0.650.94 ± 0.561.13 ± 0.69< 0.001ua (µmol/L)Urine acid296.97 ± 85.02326.69 ± 83.04279.76 ± 81.35 < 0.001sod (IU/ml)Superoxide dismutase57.96 ± 8.9356.86 ± 8.9758.59 ± 8.85 < 0.001vd3 (µg/L)25-OH-vitamin d340.75 ± 18.5746.51 ± 19.7737.43 ± 16.98 < 0.001mda (nmol/ml)Malonaldehyde5.54 ± 3.145.44 ± 3.065.59 ± 3.190.311vitb12 (pg/ml)Vitamin b12373.48 ± 169.10376.8 ± 172.09371.52 ± 167.350.524ualb (mg/L)Urinary microalbumin31.01 ± 99.2927.88 ± 85.0732.9 ± 106.980.279ucr (µmol/L)Urine creatinine96.75 ± 62.20116.85 ± 69.784.57 ± 53.67 < 0.001ualbbyucr (%)Ualb/ucr ratio53.15 ± 260.2431.99 ± 100.1265.95 ± 319.73 0.001wbc (10^9/L)White Blood Cell Count5.81 ± 1.775.81 ± 1.745.79 ± 1.780.979lymph (10^9/L)Lymphocyte count1.83 ± 0.731.81 ± 0.751.84 ± 0.710.072lymph%Percentage of lymphocytes32.23 ± 9.3231.68 ± 9.4232.54 ± 9.260.520rbc (10^12/L)Red Blood Cell Count4.18 ± 0.764.28 ± 0.814.13 ± 0.73 < 0.001hgb (g/L)Hemoglobin120.16 ± 19.98125.74 ± 21.12116.97 ± 18.56 < 0.001hct (%)Hematocrit38.57 ± 7.9939.81 ± 7.6237.85 ± 8.11 < 0.001mcv (fL)Mean Corpuscular Volume93.94 ± 8.0695 ± 7.8393.33 ± 8.13 < 0.001mch (pg)Mean Corpuscular Hemoglobin29.22 ± 4.0729.99 ± 4.0528.79 ± 4.02 < 0.001mchc (g/L)Mean Corpuscular Hemoglobin Concentration310.41 ± 35.05314.68 ± 36.34307.97 ± 34.06 < 0.001plt (10^9/L)Platelet Count198.95 ± 74.69181.02 ± 66.98209.24 ± 76.93 < 0.001mpv (fL)Mean Platelet Volume9.29 ± 2.659.21 ± 1.559.34 ± 3.110.221pdw (fL)Platelet Distribution Width15.34 ± 1.9215.39 ± 1.9415.30 ± 1.910.316pct (%)Plateletocrit0.18 ± 0.070.16 ± 0.060.20 ± 0.080.987 Characteristics of participants according to sex Model performance Table 2 compares CVD-prediction performance of established risk scores and five machine-learning models across male and female participants in the testing set. Among ​​males, the traditional Framingham Risk Score and SCORE2-OP achieved only modest discriminative ability, with AUCs of 0.531 (95% CI: 0.474–0.588) and 0.541 (0.486–0.595), respectively. Among the five machine learning models, ​​XGBoost​​ demonstrated the highest AUC (0.751, 95% CI: 0.632–0.854) and recall (0.759, 95% CI: 0.593–0.909). The ​​decision tree classifier, while inferior in overall discrimination, delivered the best specificity (0.930, 95% CI: 0.881–0.974) and precision (0.579, 95% CI: 0.348–0.800). SCORE2-OP achieved the highest F1-score (0.523, 95% CI: 0.375–0.601), followed by XGBoost (0.506, 95% CI: 0.369–0.628). For ​​females, traditional models again underperformed (Framingham AUC = 0.513; SCORE2-OP AUC = 0.534). Machine learning models showed better discrimination, with ​​XGBoost​​ dominating in AUC (0.748, 95% CI: 0.671–0.819) and recall (0.891, 95% CI: 0.791–0.976). The ​​logistic regression model​​ achieved the highest specificity (0.842, 95% CI: 0.790–0.891) and precision (0.360, 95% CI: 0.231–0.500) but had the lowest recall (0.391, 95% CI: 0.255–0.535). SCORE2-OP achieved the highest F1-score (0.502, 95% CI: 0.434–0.581), followed by XGBoost (0.463, 95% CI: 0.369–0.551).The ​​XGBoost model​​ emerged as the optimal choice for both sexes, with its parameters detailed in ​​Table 3. Table 2Model performance for 4-year CVD prediction in testing setModelThresholdAUCRecallSpecificityPrecisionF1-scoreFramingham Risk Score0.5910.531 (0.474–0.588)0.475 (0.188–0.808)0.640 (0.288–0.890)0.246 (0.190–0.327)0.502 (0.285–0.598)SCORE2-OP0.3750.541 (0.486–0.595)0.620 (0.356–0.863)0.507 (0.266–0.745)0.233 (0.187–0.285) 0.523 (0.375–0.601)MaleLogistic regression0.5620.616 (0.479–0.744)0.552 (0.367–0.731)0.754 (0.675–0.831)0.364 (0.225–0.500)0.438 (0.286–0.568)Decision tree0.5470.663 (0.535–0.780)0.379 (0.200–0.563) 0.930 (0.881–0.974) 0.579 (0.348–0.800)0.458 (0.264–0.623)Support vector machine0.2020.677 (0.560–0.785) 0.759 (0.593–0.906)0.649 (0.560–0.736)0.355 (0.238–0.475)0.484 (0.347–0.602)Random forest0.4920.733 (0.620–0.838)0.690 (0.517–0.857)0.693 (0.605–0.776)0.364 (0.240–0.491)0.476 (0.338–0.600)XGBoost0.4930.751 (0.635-0.855) 0.759 (0.593–0.909)0.684 (0.598–0.769)0.379 (0.255–0.509)0.506 (0.369–0.628)Framingham Risk Score0.2150.513 (0.469–0.556)0.491 (0.071–0.894)0.579 (0.169–0.970)0.218 (0.174–0.320)0.431 (0.120–0.563)SCORE2-OP0.4110.534 (0.492–0.576)0.675 (0.394–0.828)0.440 (0.301–0.717)0.211 (0.179–0.249) 0.502 (0.434–0.581)FemaleLogistic regression0.6290.633 (0.547–0.718)0.391 (0.255–0.535) 0.842 (0.790–0.891) 0.360 (0.231–0.500)0.375 (0.247–0.495)Decision tree0.5980.639 (0.546–0.727)0.478(0.333–0.623)0.738 (0.677–0.797)0.293 (0.194–0.400)0.364 (0.252–0.470)Support vector machine0.1970.634 (0.548–0.719)0.587 (0.442–0.729)0.683 (0.617–0.747)0.297 (0.207–0.396)0.394 (0.288–0.496)Random forest0.4130.712 (0.630–0.789)0.696 (0.558–0.825)0.673 (0.607–0.736)0.327 (0.237–0.421)0.444 (0.341–0.540)XGBoost0.350 0.748 (0.671–0.819) 0.891 (0.791–0.976)0.554 (0.485–0.622)0.313 (0.236–0.394)0.463 (0.369–0.551) Table 2Model performance for 4-year CVD prediction in testing setModelThresholdAUCRecallSpecificityPrecisionF1-scoreFramingham Risk Score0.5910.531 (0.474–0.588)0.475 (0.188–0.808)0.640 (0.288–0.890)0.246 (0.190–0.327)0.502 (0.285–0.598)SCORE2-OP0.3750.541 (0.486–0.595)0.620 (0.356–0.863)0.507 (0.266–0.745)0.233 (0.187–0.285) 0.523 (0.375–0.601)MaleLogistic regression0.5620.616 (0.479–0.744)0.552 (0.367–0.731)0.754 (0.675–0.831)0.364 (0.225–0.500)0.438 (0.286–0.568)Decision tree0.5470.663 (0.535–0.780)0.379 (0.200–0.563) 0.930 (0.881–0.974) 0.579 (0.348–0.800)0.458 (0.264–0.623)Support vector machine0.2020.677 (0.560–0.785) 0.759 (0.593–0.906)0.649 (0.560–0.736)0.355 (0.238–0.475)0.484 (0.347–0.602)Random forest0.4920.733 (0.620–0.838)0.690 (0.517–0.857)0.693 (0.605–0.776)0.364 (0.240–0.491)0.476 (0.338–0.600)XGBoost0.4930.751 (0.635-0.855) 0.759 (0.593–0.909)0.684 (0.598–0.769)0.379 (0.255–0.509)0.506 (0.369–0.628)Framingham Risk Score0.2150.513 (0.469–0.556)0.491 (0.071–0.894)0.579 (0.169–0.970)0.218 (0.174–0.320)0.431 (0.120–0.563)SCORE2-OP0.4110.534 (0.492–0.576)0.675 (0.394–0.828)0.440 (0.301–0.717)0.211 (0.179–0.249) 0.502 (0.434–0.581)FemaleLogistic regression0.6290.633 (0.547–0.718)0.391 (0.255–0.535) 0.842 (0.790–0.891) 0.360 (0.231–0.500)0.375 (0.247–0.495)Decision tree0.5980.639 (0.546–0.727)0.478(0.333–0.623)0.738 (0.677–0.797)0.293 (0.194–0.400)0.364 (0.252–0.470)Support vector machine0.1970.634 (0.548–0.719)0.587 (0.442–0.729)0.683 (0.617–0.747)0.297 (0.207–0.396)0.394 (0.288–0.496)Random forest0.4130.712 (0.630–0.789)0.696 (0.558–0.825)0.673 (0.607–0.736)0.327 (0.237–0.421)0.444 (0.341–0.540)XGBoost0.350 0.748 (0.671–0.819) 0.891 (0.791–0.976)0.554 (0.485–0.622)0.313 (0.236–0.394)0.463 (0.369–0.551) Model performance for 4-year CVD prediction in testing set Table 3Optimal parameters of XGBoost algorithm for male and femaleParametersMaleFemalen_estimators250360max_depth33learning_rate0.2110.282subsample0.730.68colsample_bytree0.710.61gamma2.80.6reg_alpha0.760.49reg_lambda0.130.16min_child_weight2752 Table 3Optimal parameters of XGBoost algorithm for male and femaleParametersMaleFemalen_estimators250360max_depth33learning_rate0.2110.282subsample0.730.68colsample_bytree0.710.61gamma2.80.6reg_alpha0.760.49reg_lambda0.130.16min_child_weight2752 Optimal parameters of XGBoost algorithm for male and female Model interpretations Figures 1 and 2 visualizes the top-10 features ranked by SHAP values from the XGBoost model for males and females. Shared top predictors included vitamin D3, glycated albumin, platelet count, and vitamin B12. Figure 2a and c illustrate overall feature impacts on CVD prediction for males and females, respectively, while Fig. 2b and d detail directional effects (positive/negative) of features. For example, higher mean corpuscular hemoglobin values (show as red points) increased CVD risk scores in males, whereas lower values (blue points) reduced risk. Fig. 1Participant Enrollment Flowchart​ Participant Enrollment Flowchart​ Fig. 2SHAP visualization of modelling on CVD according to sex. Note: The importance ranking of the top 10 variables based on the mean absolute SHAP values for male (n = 143) and female (n = 248) (Fig. 2a and Fig. 2c, respectively). The width of the horizontal bars in Fig. 2b (male, n = 143) and Fig. 2d (female, n = 248) indicates the impact on the model prediction, with a wider range suggesting a greater influence. The color of the bars signifies the magnitude of predictors, ranging from low (blue) to high (red), as depicted in the color bar on the right side. The x-axis denotes the probability of developing CVD on the right and being healthy on the left. vd3: 25-OH-vitamin D3; mda: malondialdehyde; ga: glycated albumin; pdw: platelet distribution width; vitb12: vitamin B12; plt: platelet count; hgb: hemoglobinhct; mcv: mean corpuscular volume; ucr: urine creatinine; mch: mean corpuscular hemoglobin; sod: superoxide dismutase; crphs: high sensitive C-reactive protein; rbc: red blood cell count; glu: plasma glucose SHAP visualization of modelling on CVD according to sex. Note: The importance ranking of the top 10 variables based on the mean absolute SHAP values for male (n = 143) and female (n = 248) (Fig. 2a and Fig. 2c, respectively). The width of the horizontal bars in Fig. 2b (male, n = 143) and Fig. 2d (female, n = 248) indicates the impact on the model prediction, with a wider range suggesting a greater influence. The color of the bars signifies the magnitude of predictors, ranging from low (blue) to high (red), as depicted in the color bar on the right side. The x-axis denotes the probability of developing CVD on the right and being healthy on the left. vd3: 25-OH-vitamin D3; mda: malondialdehyde; ga: glycated albumin; pdw: platelet distribution width; vitb12: vitamin B12; plt: platelet count; hgb: hemoglobinhct; mcv: mean corpuscular volume; ucr: urine creatinine; mch: mean corpuscular hemoglobin; sod: superoxide dismutase; crphs: high sensitive C-reactive protein; rbc: red blood cell count; glu: plasma glucose Figure 3 contrasts high- and low-risk individuals using localized SHAP explanations. For instance, in Fig. 3a, a mean corpuscular hemoglobin of 30 pg increased predicted risk by 0.15, while vitamin B12 (276 pg/ml) decreased it by 0.11, yielding a final risk score of 0.685 for a correctly classified CVD case. Fig. 3Local interpretations contrasting predicted a high risk male (a) vs. a low risk male (b), and a high risk female (c) vs. a low risk female (d) based on the XGBoost model predictions and SHAP values Local interpretations contrasting predicted a high risk male (a) vs. a low risk male (b), and a high risk female (c) vs. a low risk female (d) based on the XGBoost model predictions and SHAP values Multi-Dimensional model validation: Calibration, decision Curve, and survival analysis Calibration plots (Fig. 4a–b) showed satisfactory alignment between predicted probabilities and observed CVD incidence for both sexes (brier score: male = 0.134; female = 0.143). Decision curve analysis revealed net benefits for risk thresholds of 0.2–0.6 (males, Fig. 4c) and 0.2–0.4 (females, Fig. 4d), outperforming “treat all” or “treat none” strategies. Fig. 4Model evaluation with calibration plots (a, b), decision curve analysis (c, d), and cox regression analysis (e, f) for male (n = 143) and female (n = 248), respectively Model evaluation with calibration plots (a, b), decision curve analysis (c, d), and cox regression analysis (e, f) for male (n = 143) and female (n = 248), respectively Participants were stratified into low- (60%), medium- (30%), and high-risk (10%) groups based on sex-specific thresholds (Table 4). CVD incidence was 8%, 27%, and 77% for males and 8%, 30%, and 42% for females in low-, medium-, and high-risk groups, respectively. Cox regression confirmed significant associations: high-risk males had a 7.46-fold higher hazard ratio (HR) for CVD versus low-risk males (95% CI = 2.81–19.78), while high-risk females had a 5.18-fold higher HR (95% CI = 2.27–11.82). Cumulative CVD incidence by risk group is shown in Figs. 4e (males) and 4f (females). Table 4Risk stratification according to prediction score and hazard ratio of CVDRisk groupCut-off valueCase/No. (%)HR (95% CI)MaleLow≤ 0.2127/85 (8%)1Medium~ 0.51512/45 (27%)3.43 (1.33 ~ 8.84) **High> 0.51510/13 (77%)7.46 (2.81 ~ 19.78) ***FemaleLow≤ 0.10112/146 (8%)1Medium~ 0.57623/76 (30%)3.22 (1.60 ~ 6.49) ***High> 0.57611/26 (42%)5.18 (2.27 ~ 11.82) *****: P < 0.01. ***: P < 0.001 Table 4Risk stratification according to prediction score and hazard ratio of CVDRisk groupCut-off valueCase/No. (%)HR (95% CI)MaleLow≤ 0.2127/85 (8%)1Medium~ 0.51512/45 (27%)3.43 (1.33 ~ 8.84) **High> 0.51510/13 (77%)7.46 (2.81 ~ 19.78) ***FemaleLow≤ 0.10112/146 (8%)1Medium~ 0.57623/76 (30%)3.22 (1.60 ~ 6.49) ***High> 0.57611/26 (42%)5.18 (2.27 ~ 11.82) *****: P < 0.01. ***: P < 0.001 Risk stratification according to prediction score and hazard ratio of CVD **: P < 0.01. ***: P < 0.001 Discussion This study developed and validated sex-specific machine learning models for CVD prediction in Chinese adults aged ≥ 80 years using blood and urine biomarkers. Among the five machine learning models tested, XGBoost consistently achieved superior predictive value in both sexes. Discrimination capacities of the optimal models were satisfactory across multiple evaluation metrics. The integration of SHAP analysis further enhanced the model’s interpretability, providing insights into the significant biomarkers contributed to CVD and supporting its potential implementation in clinical and public health applications. To our knowledge, this is the first study to develop sex-specific machine learning models for CVD prediction in longevity populations. Previous SCORE2-OP model attempted to address such an issue that covered a broader range of populations (65 to 100 years), but with a lower average age compared to ours (74.00 vs. 91.52 years), and exhibited lower discrimination, with C-index ranging from 0.63 to 0.67 in four geographical risk regions [11]. In the ​​CLHLS cohort​​ we studied, its performance further declined, alongside the ​​Framingham Risk Score, yielding AUCs near ​​0.53, indicating minimal predictive utility. In contrast, our models achieved AUCs around 0.75 for both sexes, suggesting clinically useful discrimination [29]. These substantial performance improvements highlight both the need for localized prediction models and the importance of developing dedicated risk assessment tools for the oldest-old population. The better model performance can be attributed to several factors. First, we focused exclusively on individuals aged 80 and above, reducing the aforementioned heterogeneity in the associations of risk factors with CVD between the younger old and oldest old age groups [13]. ​Second, we incorporated ​​sex-specific models​​ in our analysis, an approach recognized as essential not only for traditional CVD prediction models but also for recently developed machine learning algorithms [30]. Third, we utilized biomarkers which may have a closer and more objective relationship with CVD compared to traditional lifestyle factors, thereby reducing subjective biases. For instance, in the context of the oldest-old population, lifestyle factors such as smoking and drinking might be subject to survivor bias (i.e., heavy smokers or drinkers may have succumbed to related diseases at younger ages and thus are not present in the oldest-old cohort; those remaining in the study population may have a genetic predisposition to longevity) and abstainer bias (i.e., individuals who quit smoking or drinking due to health issues could introduce biased associations), resulting in distorted associations [31, 32]. Lastly, by employing a machine learning model, we were able to better capture the interactions and nonlinear relationships between variables. Considering the global trend of population aging and the significant burden of CVD, this study fills a gap in CVD risks management in the oldest old population. A major strength of this study is the explainability of our model. Based on SHAP values, we identified top contributors to CVD risk for the population level using the SHAP summary and beeswarm plots as well as for the individual level using waterfall plots. The shared top-10 predictors of CVD risk among male and female were vitamin D3, glycated albumin, platelet count, and vitamin B12. These biomarkers have been previously reported to be associated with CVD. For instance, epidemiology studies found that Vitamin D3 is a protective factor with its cardioprotective mechanisms supported by its effects on the vascular and myocardial cell calcification, inflammation, and endothelial function [33]. A meta-analysis suggested glycated albumin level was positively associated with CVD risk [34]. Higher platelet counts are associated with less favorable cardiovascular risk profiles, including smoking, triglycerides, low-density lipoprotein, and total cholesterol levels [22], which in turn increase the CVD risk. The Bronx Longitudinal Aging Study (mean age 79 years) found increased vitamin B12 levels were positively associated with increased fatal and non-fatal cardiac disease combined [35]. Our findings were in line with these studies which justified that the model interpretation was biological plausible. Our findings have practical implications for both clinical and public health settings. In clinical practice, using routinely captured biomarkers from electronic health records provides a scalable, low-cost means of early risk identification and can guide personalised preventive strategies—ranging from lifestyle counselling and pharmacological optimisation to further diagnostic work-up. Importantly, several of the top predictors are readily modifiable. Vitamin D deficiency can be addressed with targeted supplementation plus dietary enrichment; although RCTs have not consistently shown CVD benefit [36, 37], none have focused on the oldest-old, leaving open the possibility of a clinically meaningful effect in this high-risk group. Elevated glycated albumin can be reduced through tighter glycaemic control using existing antidiabetic therapies. Finally, macrocytosis suggested by high mean corpuscular haemoglobin and mean corpuscular volume, both among the strongest male-specific predictors, can often be corrected with vitamin B12 and folic acid supplementation [38]. In public health, this model could guide population level CVD screening and prevention programs for oldest old adults. The risk stratification strategy we proposed grouped most individuals into low- risk group (60%) and only a few into high-risk groups (10% of the population); significantly higher CVD incidence was observed in the high-risk groups than in the low-risk group among both sexes (male: 77% vs. 8%, HR = 7.46, 95%CI = 2.81 ~ 19.78; female: 42% vs. 8%, HR = 5.18, 95%CI = 2.27 ~ 11.82). Such an approach could help to efficiently allocate resource to those most likely to benefit from interventions. Additionally, the SHAP-based individual level interpretation allows health professionals to communicate risk factors clearly, promoting health literacy and encouraging adherence to preventive measures. Moreover, our model was developed from routine biomarkers which is feasible to be used in diverse healthcare systems, including resource-limited settings. Several limitations should be considered in this study. The first potential limitation of this study was the varying follow-up periods between the 2012 ~ 2014 cohort and the 2014 ~ 2018 cohort. The varying follow-up periods could potentially influence the observed CVD incidence rates and may affect the calibration of the predictive models. Specifically, the 2014 ~ 2018 cohort, with its longer follow-up duration, might have had more opportunities to detect CVD events compared to the 2012 ~ 2014 cohort. This difference in observation time could lead to an overrepresentation of CVD cases in the 2014 cohort, as evidenced by the higher CVD incidence rates in both male (24.2% vs. 15.6%) and female (23.7% vs. 13.2%) participants compared to the 2012 ~ 2014 cohort (results not tabulated). To address this limitation, we employed cox proportional hazards models with age as the time scale. This approach captures the ongoing CVD risk inherent to ageing rather than merely tracking elapsed study time [39, 40], yielding more intuitive and chronologically grounded incidence probabilities. The results demonstrated statistically significant hazard ratios in the medium and high-risk groups, suggesting that the model was able to reliably identify risk categories despite the variability in follow-up time. However, it is important to acknowledge that while the use of age as the time scale mitigates some of the issues associated with differential follow-up, it does not completely eliminate them. The longer follow-up in the 2014 cohort might still introduce some bias, as the extended observation period could capture more late-onset CVD events that might not have been observed in the shorter follow-up cohort. This could potentially influence the calibration of the models, particularly if the risk factors and their associations with CVD differ between the two cohorts over time. Validation of our models in prospectively followed cohorts with standardized observation periods, particularly for near-term risk stratification. Second, the reliance on self-reported CVD outcomes introduces the potential for reporting biases, although prior validations of the CLHLS data suggest adequate reliability. Third, the study population was limited to Chinese older adults, which may restrict generalizability to other ethnicities. Future research should validate the model in diverse populations and explore its applicability to different healthcare systems. Additionally, while SHAP analysis provided valuable insights into the relative importance of biomarkers, further research is needed to translate these findings into intervention strategies. Prospective studies assessing the impact of biomarker-driven risk stratification on clinical outcomes would help establish its utility in improving patient care. Conclusion This study developed and validated sex specific machine learning models for CVD risk prediction in oldest old adults. The model’s satisfactory performance, robust risk stratification, and SHAP-based interpretability enhance its value for both clinical and public health applications. Deriving from routine biomarkers and with interpretable results, our models were potential scalable, practical, and effective tools for mitigating the burden of CVD in longevity populations. Supplementary Information Supplementary Material 1. Supplementary Material 1.