Abstract
Objectives
Chest X-rays (CXRs) convey much illegible physiological information that deep learning model (DLM) has been reported interpreting successfully. Since the electrocardiogram age established by DLM was revealed as a heart biological marker, we hypothesize that CXR age has similar potential to describe the heart and lung states. Therefore, we developed a DLM to predict sex and age through CXR and analyzed its relation with future cardiovascular diseases (CVD).
Methods
A total of 90,396 CXRs aged 20 to 90 were collected and separated into a development set with 53,102 CXRs and demographic information pairs, a tuning set with 7073 pairs, an internal validation set with 17,364 pairs, and an external validation set with 12,857 pairs. The study trained DLM with development set for estimating age and sex and compared them to actual information.
Results
The mean absolute errors of predicted age were 4.803 and 4.313 years in the internal and external validation sets, respectively. The area under the curve of sex analysis was 0.9993 and 0.9988 in the internal and external validation sets, respectively. Patients whose CXR age was 5 years older than chronologic age lead to higher risk of all-cause mortality (hazard ratio (HR): 2.42, 95% confidence interval (CI): 2.00–2.92), cardiovascular (CV)-cause mortality (HR: 7.57, 95% CI: 4.55–12.60), new-onset heart failure (HR: 2.07, 95% CI: 1.56–2.76), new-onset chronic kidney disease (HR: 1.73, 95% CI: 1.46–2.05), new-onset acute myocardial infarction (HR: 1.80, 95% CI: 1.12–2.92), new-onset stroke (HR: 1.45, 95% CI: 1.10–1.90), new-onset coronary artery disease (HR: 1.26, 95% CI: 1.04–1.52), and new-onset atrial fibrillation (HR: 1.43, 95% CI: 1.01–2.02).
Conclusions
Using DLM to predict CXR age provided additional information for future CVDs. Older CXR age is an accessible risk classification tool for clinician use.
Keywords
Key points
Existed cardiovascular disease (CVD) risk stratification tools lack of evidence and data acquisition requires invasive procedures.
Older deep learning model (DLM)-predicted chest X-ray age shows higher risk of mortality and CVD incidence.
Older predicted age is an accessible risk classification tool to manage CVD.
Introduction
Cardiovascular disease (CVD) management is a global issue. International guidelines suggest the necessity of an ongoing basis over the age of 40 to make an assessment of CVD risk over a 10-year period, 1 which is calculated by age, sex, blood pressure, lipid profile, and smoking history to score the 10-year risk of fatal CVD.2,3 Several management and drug treatments are recommended as soon as possible in patients at high risk for CVD. 4 Although the high-risk individuals showed more benefits from risk factor interventions, most deaths in the community came from people with lower risk levels because they were more numerous than high-risk individuals, 2 which means that more potential patients can be screened out with risk stratification tools in different assessment directions. However, existing global cardiovascular risk assessments are generally not accurate enough and lack high-quality evidence of direct reductions in CVD morbidity or mortality.5–8 In addition, <30% of them are available in the electronic medical records database, usually due to a lack of data on cholesterol. 9 Therefore, a risk stratification tool with different and approachable methods is necessary.
Chest X-ray (CXR) is low-cost, approachable and the most popular examinations for initial assessment. CXR shows overall chest images, including lung and cardiac vascular systems. 10 The utility of CXR examination (CXR) in clinical now even at annual health examinations, 11 but even outpatient department and pre-operation study, 12 , 13 especially chest and cardiology surgery. A deep learning model (DLM) also showed enough ability on CXR to screen diseases such as pneumothorax, 14 opacity, nodules or masses, fractures or even COVID-19, 15 and CVD such as heart failure, 16 aortic dissection, 17 and left ventricular dysfunction. 18 These methods show successful application; however, they are often used to explore the classification of disease rather than the overall overview of the body. 19
Recently, physical age defined by DLM was reported as a cardiovascular risk factor, demonstrating the ability of electrocardiogram based age to predict CV-caused mortality and new-onset CVDs. 20 Compared with existing methods, it does not need to combine several kinds of information, so it is more suitable as a risk stratification tool. The CXR can directly show the lung and cardiac vascular systems of one person. 21 As age increases, senescence causes structural and functional changes in the pulmonary circulation, which affect pulmonary pressure, pulmonary hemodynamics, and gas exchange. 22 Hemodynamic changes in pulmonary arterial pressure and pulmonary wedge pressure are found after 45 years.22,23 In addition, the reduction of the alveolar-capillary interface and sclerosis of the pulmonary vasculature contribute to the reduction of pulmonary capillary blood volume with age. 24 Age-related pulmonary vascular remodeling, with increased muscular content of the pulmonary arteries and increases in arterial and venous wall thickness, demonstrates that ageing is associated with increased stiffness of the pulmonary vessels.22,25,26 Although these changes are indistinguishable to clinicians, information in CXR can be obtained by observing the changes in size, diameter, calcification, and other changes of large vessels.27,28 Several cardiovascular abnormalities such as cardiomyopathy, pericardial disease, valvular abnormalities, congenital abnormalities have their own unique characteristics on CXR. 29 Even indistinguishable vessels can be used to identified diseases such as pneumothorax and vascular infiltration by density and distribution. 30 Therefore, CXR, which can observe the above phenomenon, shows its potential ability to predict the above ageing vascular changes. In a previous study, CXR-predicted age was also reported and used for survival, 31 and its visualization also showed cardiac related. 32 We therefore tried to explore the extensive application of CXR to predict age through CV ageing change.
According to the above statement, CXR can record cardiovascular change, and there is precedent for CXR use in DLM. Due to the success of DLM defined-physical age, residuals between chronological age, and CXR age may imply information about underlying excessive ageing cardiovascular factors, which may help clinician improve the accuracy of CVD prediction. We established a retrospective cohort study and developed a DLM to predict chronological age to test the hypothesis. We also compared the correlations between chronological age, CXR age, and measured cardiovascular factors. Finally, we used CXR age to predict future CVD mortality and incidence to verify the usefulness of residuals between chronological age and CXR age.
Method
Data source and population
The database used in this research is from Tri-Service General Hospital, Taipei, Taiwan and was ethically approved by its institutional review board (IRB NO. C202105150). The CXR that was used was selected using the following specifications: (1) data from January 1, 2010 to December 31, 2020; (2) excluded people younger than 20 years old and older than 90 years old; (3) came from outpatient department and health examination center to limit the bias affected by acute stage change (Supplemental Figure 1). Each patient had only a single CXR with randomized choice of a time point in life, which may be representative. 33
Databases were divided into development, tuning, internal validation, and external validation sets, and their characteristic and laboratory results were analyzed and are shown in Table 1. The process of database separation is shown in Figure 1. Cases were followed up from the date of the CXR exam to cardiovascular events or February 28, 2021, based on which came first. Other details were presented in Supplemental material.

Development, tuning, internal validation, and external validation set generation. Schematic representation of the dataset creation and analysis strategy, which was devised to assure a robust and reliable dataset for training, validating, and testing of the network. Once a patient's data were placed in one of the datasets, that individual's data were used only in that set, avoiding “cross-contamination” among the development, tuning, and validation sets. External validation sets were collected only for patients who visited the Jingjhou branch, while others were not. The details of the flow chart and how each of the datasets was used are described in the Methods section.
Patient characteristics and laboratory results in the development, tuning, internal validation, and external validation sets.
All the p values of the characteristics were <0.001, except chloride. The mean age ranged from 52.8 to 63.7 years.
AF: atrial fibrillation; Alb: albumin; ALT: alanine aminotransferase; AMI: acute myocardial infarction; AST: aspartate aminotransferase; BMI: body mass index; BUN: blood urea nitrogen; Ca: calcium; CAD: coronary artery disease; CKD: chronic kidney disease; Cl: chloride; COPD: chronic obstructive pulmonary disease; CRP, C-reactive protein; DBP: diastolic blood pressure; DM: diabetes mellitus; eGFR: estimated glomerular filtration rate; GLU: glucose; Hb: hemoglobin; HbA1c: glycated hemoglobin; HDL: high-density lipoprotein cholesterol; HF: heart failure; HLP: hyperlipidemia; HTN: hypertension; K: potassium; LDL: low-density lipoprotein cholesterol; Mg: magnesium; Na: sodium; PLT: platelet; SBP: systolic blood pressure; STK: stroke, TC: total cholesterol; TG: triglyceride; WBC: white blood cell count.
Observation variables
Our main observational variables included disease and laboratory characteristics. The definitions of the variables were described in Supplemental material.
Regarding all-cause mortality, the status of whether the patient was dead or alive was collected from electronic medical records and updated by each hospital, and survival time was calculated by the time interval from death to the date of CXR. Furthermore, to limit the bias of incomplete records, the last medical record for the patient's visit was used to correct their data. For CV-cause mortality, patients whose cause of death was related to arrhythmia, acute coronary syndrome, stroke, and heart failure (HF) were included.
DLM and statistical analysis
CXR data preprocessing and DLM details were showed in Supplemental material. Several statistical tools used were also presented in Supplemental material. The above analyses were performed on the software environment R version 3.4.4. The significance level was set to p < 0.05.
Results
Performance of the DLM to predict age and sex
The overall correlation and the explained variance (R-square), which are presented in Figure 2, were used to calculate the mean absolute error on predicting due to its property of continuity. In the internal validation set, the mean absolute error of actual age and CXR age was 4.803 years, and the explained variance (R-square) by CXR age on chronological age in the validation set was 84.5% (r = 0.919), as shown in Figure 2A. In the external validation set, the mean absolute error of actual age and CXR age was 4.313 years, and the explained variance (R-square) by CXR age on chronological age in the validation set was 89.1% (r = 0.944), as shown in Figure 2D. The confusion matrixes in Figure 2B and 2E visualize the distribution.

The association between chronological age and CXR age and the sensitivity and specificity of sexual prediction in the internal and external validation sets. (A) Scatter plots of chronologic age and CXR age in the internal validation set. Red points represent the highest density, followed by yellow, green light blue, and dark blue. Perfect model performance would fall only along the diagonal line. (B) The confusion matrix in the internal validation set categorized by 15 years old. The squared weighted kappa value was 0.76 in this analysis. (C) AUC curve of sexual prediction in the internal validation set. (D) Scatter plots of chronologic age and CXR age in the external validation set. Red points represent the highest density, followed by yellow, green light blue, and dark blue. Perfect model performance would fall only along the diagonal line. (E) The confusion matrix in the external validation set categorized by 15 years old. The squared weighted kappa value was 0.76 in this analysis. (F) AUC curve of sexual prediction in the external validation set. AUC: area under curve; CXR: chest X-ray.
We also used CXR to predict sex, with the internal validation set showing sensitivity of 98.9%, specificity of 98.7%, and area under curve (AUC) of 0.9993 on Figure 2C, and the external validation set showing sensitivity of 98.6%, specificity of 98.3%, and AUC of 0.9988 on Figure 2F.
Analysis of the characteristics and risk contributions in patients with unequal actual and predicted ages
Patients whose CXR age was more than 5 years old than the actual age (higher residual) had a higher prevalence of acute myocardial infarction, stroke, coronary artery disease, heart failure, atrial fibrillation, diabetes mellitus (DM), hypertension (HTN), and chronic kidney disease (CKD) but not chronic obstructive pulmonary disease (COPD). They also had worsened performance on laboratory data, including high-density lipoprotein (HDL), estimated glomerular filtration rate, blood urea nitrogen, aspartate aminotransferase, albumin, hemoglobin, white blood cells and platelets, as shown in Figure 3. In comparison, patients whose CXR ages were less than 5 years old than the actual age (lower residual) showed a better performance regardless of disease prevalence or laboratory data. Risk effect analysis of patient characteristics on new-onset cardiovascular-related disease was conducted by the Cox proportional hazard model, 34 adjusted by chronologic age in Figure 3. If the patient has the diseases listed above, the probability of CV mortality will be relatively high, and not to our surprise, the probability of other cardiovascular-related diseases in the future, except for a few outcomes, was roughly statistically significant, with a similar trend presented in the laboratory data.

Analysis of the characteristics and risk contributions in patients with inconsistent chronological age and CXR age in the validation set. We selected patient characteristics for risk analysis based on the outcome of interest. Bar plots represent the mean or proportion where appropriate and corresponding 95% conference intervals, which are adjusted by gender and chronological age via linear or logistic regression, based on patient characteristics in patients with lower to higher residuals. (CXR age—chronological age) Significant tests are based on the trend test (*: p for trend < 0.05; **: p for trend < 0.01; ***: p for trend < 0.001), and the effects were the difference per group. Risk analysis plots showed the hazard ratios, calculated by the change in values among each residual group. The colors red, gray, and blue represent positive, nonsignificant, and negative impacts on the corresponding outcomes, respectively. CXR: chest X-ray.
Analysis of the long-term outcomes in patients with unequal actual and predicted ages
We analyzed the long-term disease incidence in Figure 4. As above, we separated the CXR age >5, between 5 and −5, and <5 groups, presenting the relationship between residual age and disease. Patients who had high residuals showed statistically significant long-term incidence rates for all-cause mortality, CV-cause mortality, new-onset HF, new-onset CKD, new-onset acute myocardial infarction (AMI), new-onset stroke (STK), new-onset coronary artery disease (CAD), and new-onset atrial fibrillation (AF) in the internal validation set, and the external validation set also showed the same tendency for all-cause mortality, new-onset HF, new-onset CKD, and new-onset AF. Except for the CAD group in the external validation, the other groups still showed a varied tendency between the high residual and the incidence rate. In contrast, the results presented by the low-residual group were roughly the opposite of those of the high-residual group.

The comparison of positive, near zero, and negative inconsistent chronological age and CXR age for long-term outcomes of interest in each validation set. These line charts were compared with three lines, red, blue, and green, representing CXR ages >5, between 5 and −5, and <5, respectively, to show the difference in long-term incidence and adverse events in each group. The number of patients in the risk plot is shown under each line chart for assistance. (A) Analysis of the internal validation set. (B) Analysis of the external validation set. CXR: chest X-ray.
The continuous association between unequal age and outcome is presented in Figure 5. Except for the DM, AMI, and CAD groups in the external validation set, roughly speaking, the patients who had high-residual age tended to have high all-mortality, CV-cause mortality and CVD, and those who had low-residual age tended to have low all-mortality, CV-cause mortality, and CVD.

The comparison of higher and lower inconsistent chronological age and CXR age for outcomes of interest with hazard ratio in each validation set. Continuous association of the difference between chronological age and ECG age on each outcome. The solid line and dashed line are the point estimation and corresponding 95% conference interval, respectively. The solid lines red and blue represent the internal validation set and external validation set, respectively. For example, the figure in the upper left corner shows that whether it's an internal or external validation set, as the difference between chronological age and ECG age increases, the hazard ration of the overall mortality rate tends to increase. CXR: chest X-ray; ECG: electrocardiogram.
Discussion
In this retrospective cohort study, we established a CXR-based DLM to detect chronological age and tried to use it to predict mortality and some CVDs. In our study, the mean absolute error between CXR age and chronological age was <5 years, and these results suggest that the residuals themselves cause acceptable excessive random errors, proving the ability of predicting age. In patients with poor physical conditions and comorbidities, the CXR age was higher than their actual age. We further used CXR age to predict future cardiovascular-related diseases and survival age and found that patients with higher-residual age had a significantly higher incidence of future complications, which shows that the DLM can help in stratifying patients with high risk.
The area under the curve of sex was more than 0.99, so there was no doubt about the ability of the DLM to predict sex. Although it is of little clinical use, because of its high accuracy, it has a certain degree of applicability in forensic medicine, 35 identification of unidentified acute trauma patients, and even filling in missing data in large public datasets.
According to previous studies and our study, the DLM has the ability to predict the age of humans in normal body status via CXR.31,32 If a person has CVD comorbidities or worse laboratory data, the residual between CXR age and chronological age presents corresponding changes in our study. Previous studies used gradient-weighted class-activation maps to visualize areas of DLM analysis. One found that the DLM focused on the mediastinum, the cardiac silhouette, and the aortic knob, 31 and another found that the cervical spine, thoracic spines, first ribs, aortic arch, heart region, rib cage, and soft tissue of the thoracic wall and flank were highlighted, 32 hinting at the relationship between heart appearance and CXR age. Furthermore, we analyzed the prevalence of COPD and its relationship with CXR age and showed no consistent association, which may imply that CXR age is not related to lung fibrosis or lung parenchyma, corresponding with a previous study. 31 Theoretically, lung cancer is the lung disease that mainly affects mortality. The mean doubling time of lung cancer was 166.3 days, 36 which only had an increasing prevalence rate with age but not a gradual progression with age. In addition, pulmonary diseases related to CVD, such as acute pulmonary edema, were excluded from the case and did not affect the judgment. In contrast, CVD tends to progress gradually with age, making CVD and age development strongly associated. Furthermore, we also found a significant correlation between CXR age and CVD by analyzing the terms on the CXR report (Supplemental P.6). Overall, we can conclude from the above that CXR age is related to heart status, and we proposed a better way to evaluate cardiovascular status.
High-residual CXR age shows a tendency toward high CVD prevalence and poor laboratory data, and only two parameters, single CXR and age, were used for CVD risk stratification. Ageing affects cardiovascular systems in a multifaceted way. These include tissue hypoperfusion, vascular degeneration, remodeling, lumen enlargement, wall thickening, 37 left ventricular hypertrophy and fibroblast proliferation, resulting in decreased cardiac output and increased fibrotic tissue. 38 In addition, increased oxidative stress, inflammation, apoptosis, and overall myocardial deterioration and degeneration are associated with structural damage, such as cardiac hypertrophy and the development of fibrosis in aged hearts, which usually lead to eventual heart dysfunction.39,40 It affects the left ventricle asymmetrically, mainly the interventricular septum, and leads to a redistribution of cardiac muscle. 41 These pathological changes correlate with the visualization zone in previous studies and may be detected by DLM and establish the features.31,32 Age is another parameter that is an independent risk factor for CVD and is widely used in several international risk stratification tools. 42 We used it as a benchmark of ageing to distinguish between pathological and physiological changes. In comparison, the common CVD risk stratification tool Framingham Heart Score consists of age, sex, smoking history, total cholesterol, HDL cholesterol and systolic blood pressure, 43 and some parameters, such as family history or social deprivation, are recommended as risk factors.42–44 CXR age directly observes the cardiac image and is related to poor laboratory data and physical condition, corresponding to traditional tools, which use indirect laboratory data and vital signs to evaluate its ageing degree. Both have a reasonable mechanism and can complement each other. However, a lack of high-quality evidence on CVD morbidity or mortality,5–8 missing data due to expense and many parameters make it difficult to use in medical databases, 9 and the definition of family or social history is difficult to define. Conversely, the simple, minimal information needed and the most importantly, more precise CXR age is an approachable CVD risk stratification tool that we can use (the comparison was showed in supplemental Table 1).
To the best of our knowledge, this is the first study to use DLM-based CXR age to predict future cardiovascular-related diseases. Previous studies only analyzed risk factors and primary outcome only mortality without additional analysis, 31 other just analyzing heart failure. 45 Both were trained with small or public databases, which are well known that there are inaccuracies in labels and lower quality. 46 We analyzed high residuals and dug deeper into the reasons behind it, finding statistically significant risk difference on almost all complications. However, new-onset DM and HTN showed no obvious outcome. We suppose that because new-onset DM and HTN are usually caused not by insufficient existing heart function, they mostly affect small blood vessels first, and they take a long time to affect the heart. For CXR age, which directly observes the shape of the heart, it is possible to observe no change. In previous studies, the pathogenesis of HTN involved the interaction of genetic and environmental factors, including abnormal fluid volume regulation, increased vasoconstriction, and vessel wall remodeling. 47 However, it is a slow progression and requires several years to progress, so HTN is usually associated with later rather than early CAD. 48 For DM, there was no difference between patients with DM and non-DM on vessel screening by coronary angiography within 5 years of diagnosis. 49 As a result, CXR age has the ability to predict CVD mortality and incidence, which can present its abnormality on CXR.
CXR age is an approachable CVD risk stratification tool that can help clinician with early screenings who require further surveys, especially in the passive electronic medical records screening. The most important thing is that CXR age is not a new intervention, but only analyzes the original information from routine examination, allowing the doctor to give the human body state an overall score, which can be used to guide people regarding lifestyle improvements and further interventions without the need for a comprehensive inspection.
Limitation
Several limitations were found in our work. First, our research is hospital-based and only includes a physical examination center and outpatient department, which may show a limitation to the community. Second, it is uncertain which CXR characteristics were analyzed by the DLM. Previous research used Gradient-weighted Class Activation Mapping (Grad-CAMs) for analysis, but a certain relationship is still unconfirmed.31,32 Third, the laboratory characteristics were taken from the physical examination center and outpatient department, which may have received treatment. Taking the lipid profile as an example, we found that the result of low-density lipoprotein (LDL) was the opposite of our residual age. This may be related to the management of dyslipidemia. Since LDL is regarded as a major cardiovascular risk factor, European Society of Cardiology guidelines suggest controlling LDL-C levels lower than approximately 100 mg/dL with statins, adjusting for CV risk. 50 In contrast, low HDL is not often clinically interfered with by using drugs, causing HDL to correlate to residual age. Therefore, this factor should be considered in future studies. Finally, in our study, the internal validation and the external validation showed a different outcome on AMI, STK, CAD or CV-cause mortality. We hypothesize that this may be related to the characteristics of the hospital. As an external validation, it only has a respiratory care ward and nursing home, and there is no general ward. Further validation should be performed in more databases. Therefore, there is insufficient evidence to directly apply our model to foreign data, particularly in countries with different disease distributions, as it may yield inconsistent results. However, it is important to emphasize that our article primarily focuses on the correlation between the predicted physiological age based on CXRs and acute age. We believe that this conclusion holds true for individuals from diverse ethnic backgrounds.
Conclusion
Our study provides a protocol for using deep learning to analyze physiological age from conventional chest images as a clinical tool. It can lead to more accurate risk assessment classification models, and thus more accurate medical treatments can be given. Through further research, we may be able to understand the clinical role of deep learning to analyze the overall information of chest images and prove its usefulness in evaluation and treatment.
Supplemental Material
sj-docx-1-dhj-10.1177_20552076231191055 - Supplemental material for The deep learning algorithm estimates chest radiograph-based sex and age as independent risk factors for future cardiovascular outcomes
Supplemental material, sj-docx-1-dhj-10.1177_20552076231191055 for The deep learning algorithm estimates chest radiograph-based sex and age as independent risk factors for future cardiovascular outcomes by Hao-Chun Liao, Chin Lin, Chih-Hung Wang and Wen-Hui Fang in DIGITAL HEALTH
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Defense Medical Center, Taiwan, Tri-Service General Hospital, Ministry of Science and Technology, Taiwan (grant number NSTC112-2321-B-016-003, TSGH-B-112016, MND-MAB-C13-112052).
Supplemental material
Supplemental material for this article is available online.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
