{'fraction_non_alphanumeric': 0.031302698145025294, 'fraction_numerical': 0.020130691399662733, 'mean_word_length': 4.886166253101737, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Assessing the Performance of Automated Prediction and Ranking of Patient Age from Chest X-rays Against Clinicians

Understanding the internal physiological changes accompanying the aging process is an important aspect of medical image interpretation, with the expected changes acting as a baseline when reporting abnormal findings. Deep learning has recently been demonstrated to allow the accurate estimation of patient age from chest X-rays, and shows potential as a health indicator and mortality predictor. In this paper we present a novel comparative study of the relative performance of radiologists versus state-of-the-art deep learning models on two tasks: (a) patient age estimation from a single chest X-ray, and (b) ranking of two time-separated images of the same patient by age. We train our models with a heterogeneous database of 1.8M chest X-rays with ground truth patient ages and investigate the limitations on model accuracy imposed by limited training data and image resolution, and demonstrate generalisation performance on public data. To explore the large performance gap between the models and humans on these age-prediction tasks compared with other radiological reporting tasks seen in the literature, we incorporate our age prediction model into a conditional Generative Adversarial Network (cGAN) allowing visualisation of the semantic features identified by the prediction model as significant to age prediction, comparing the identified features with those relied on by clinicians.


Introduction
The aging process is an important part of medical image analysis, since the physiological changes associated with age form a baseline for 'normality' in a given modality; observations which might be considered in the normal range for an elderly patient can indicate a pathological finding in a younger subject [6].
Understanding the characteristic features of the aging process as manifested in a particular modality is therefore of great importance in accurate and informative clinical reporting, and incorporating this knowledge into machine learning based diagnostic approaches could contribute to greater clinical utility than an 'age blind' model of abnormality presentation. Age prediction from chest X-rays is also known to be a challenging task for radiologists [1], and a greater understanding of the salient features learned in a reliable age prediction model could be of value in improving clinical understanding.
In this paper we leverage a set of 1.8M chest X-rays gathered from a range of clinical settings in six hospitals to train age prediction and ranking models for adult patients. We compare the performance of these models against three radiologists in a novel study testing age prediction and age ranking relative ability to explore clinicians' ability to perceive age-related changes in a single patient over time. Furthermore, to understand the features relied on by the models we use GAN-based age-conditional image generation, allowing progressive re-aging of a synthetic 'patient' and visualisation of age-relevant changes.
Related Work. Deep learning has been used to estimate patient age in several modalities, including neurological MRI scans [3] and paediatric hand X-rays [12]. In the chest X-ray domain, regression models have been applied to the NIH ChestX-ray14 [21] and CheXpert [9] public datasets, and report association of high prediction error with image abnormalities [10,19]. Patient age and gender are predicted from a proprietary dataset with a CNN in [22], with Grad-CAM [20] used to visualise characteristic features. Recent work has shown that overestimated patient age is predictive of cardiovascular and all-cause mortality rates [8,16]. GANs [5] have previously been used in a variety of medical image processing applications [23]. Controllable image features in GAN images of mammograms, cell histology and brain MRI datasets have been explored recently [2,4,17]. While human face re-aging with GANs has previously been explored [7], to the best of our knowledge GAN-based age-conditional generation of chest X-rays has not been previously demonstrated.
Contributions. The main contributions of this work are: (i) We present a stateof-the-art chest X-ray age prediction model trained on a large heterogeneous dataset, with sensitivity analysis to training set size and image resolution, and show generalisation performance on the public dataset NIH ChestX-ray14. (ii) We present a study comparing the performance of human radiologists against our model on two tasks: (a) ground truth age prediction from a chest X-ray; (b) ranking two time-separated scans of the same patient in age order. (iii) We use GAN-generated synthetic chest X-rays conditioned on patient age to intuitively visualise age-relevant features via simulated age progression.

Dataset
We train our models using a set of 1.798 million chest X-rays gathered under research partnerships with three Hospital Networks (UK NHS Trusts) comprising six hospitals covering a four million patient population: University Hospitals Coventry and Warwickshire NHS Trust, University Hospitals Birmingham NHS Foundation Trust, and University Hospitals Leicester NHS Trust. The data comprise scans taken from various departments and hardware representing both inpatient and outpatient settings covering the period 2006-2019, along with patient metadata including age, gender, anonymised patient ID, and free text radiologist's report. Images were normalised directly from the DICOM pixel data, and padded to square images with symmetric black borders where required.
After eliminating non-frontal and post-processed images, we obtained a core set of 1,660,060 scans from 955,142 unique patients, comprising 480,147 females and 474,995 males with mean age 61.2 ± 19.0 years. 688,568 patients had a single scan in the set, while 266,574 had multiple scans. The age distribution and longitudinal characteristics are presented in Fig.2. The images represent an unfiltered, unaligned 'in-the-wild' set of images including both healthy patients and those with abnormalities, and to the best of our knowledge is the largest and most heterogeneous such dataset reported to date. We divide the images into a training set of 1,460,060 images, a validation set of 100k images, and a held-back test set of 100k images sampled from the same age and gender distribution.

Age Prediction and Ranking Study
We performed a study aiming to address two questions: whether the ability of radiologists to order two images of the same patient by age is superior to their ability to estimate true patient age from a single image, and how their performance on each task compared to data-driven predictive models. To test this, we developed a web application which presented pairs of X-rays and required the users (working independently) to click on either the image they believed was older or a 'not sure' response, and also give an age estimate for one image (see supplementary material for the website interface). Our test data comprised 200 patients with pairs of images separated by up to 10 years, with 40 pairs from each two year separation bucket. The images were screened as 'normal' by a pretrained NLP reading of the associated free-text radiologist's reports attached to the image [15], ensuring that only physiological changes resulting from the aging process were present. By presenting pairs of time-separated images, we aimed to establish both the ability to estimate ground truth age (which previous work has indicated is a challenging task for which radiologists are not specifically trained), and over what time period age-related physiological changes become perceptible to an expert human observer with inter-subject differences removed. To the best of our knowledge this aspect has not been previously investigated.

Age Prediction Models
Given input images x i with continuous age labels a i , we aim to train predictive models for patient age formulated as regression and ranking problems. We investigate the accuracy of alternate forms of output prediction model on a convolutional neural network (CNN) backbone: (a) linear regression, taking a single rectified output directly as an age estimate; (b) categorical classification [18], taking an output over nominal integer age labels c j , j ∈ [0, ..., 105] and treating the softmax-activated output as a probability distribution with the weighted sum p j c j as our estimate; and (c) ordinal regression [13], again outputting over integer age labels but applying sigmoid activation and treating each output as the probability of the age exceeding that label, estimating the age as p j . For pairwise image ranking we train a task-specific model, taking as input two images {x j , x k } with a binary label y j,k indicating if a k > a j . The images are passed through a shared CNN and the features concatenated before a fully connected module outputs a binary prediction of the ranking label. By learning simultaneously from a pair of images we expect the model to learn discriminative features directly relevant to fine-grained age discrimination and outperform on the ranking task.
For our CNN backbone we used the feature extraction layers of the EfficientNet-B3 architecture beginning from the ImageNet pre-trained weights. This was followed by the relevant fully connected prediction module with Xavier weight initialisation. An ADAM optimizer with initial learning rate 0.001, adaptive learning rate decay with a 0.5 decay factor and a three epoch patience level was used. We report test set results for the lowest validation set error epoch. All models were trained using an Nvidia DGX1 server with batch sizes 1024 (224 2 resolution), 512 (299 2 resolution), 224 (512 2 resolution) and 52 (1024 2 resolution).

Age Conditional Image Generation and Manipulation
To visualise the aging features identified by the model, we incorporated our best performing pre-trained age prediction model at 299 2 resolution into a GAN to allow age-conditional synthetic image generation. By comparing images of the same synthetic patient at different ages with nuisance features such as pose held constant, we can visualise the features the age prediction model has identified as relevant to the aging process. To achieve this, we use an auxiliary classifier GAN (AC-GAN) architecture [14], illustrated in Fig.1, based on StyleGan2 [11]. During training the generated images are passed into both the frozen pre-trained age prediction network M to provide a training gradient for the age targeting accuracy of the generator G, and the discriminator network D to enforce generated image realism. We concatenate the age target A with the noise input w ∈ R 512 into the StyleGan intermediate latent space. The network is trained over a GAN minmax value function with an additional MSE loss term between A and the predicted age of the generated image G(A, w): G(A, w)))] + λ(A − M (G(A, w))) 2 (1) Leakage of age-relevant factors between w and A will degrade the age-prediction loss, therefore we expect aging features to be effectively separated from other factors of variation even though we do not explicitly enforce patient identity consistency. We therefore expect modifying A with a fixed w will perform synthetic re-aging of the same synthetic 'patient'. In order to visualise the agerelated changes in the 'patient' we generate two imagesX 1 = G(A, w) and X 2 = G(A + δA, w), and generate a difference map of pixel intensityX 2 −X 1 to visualise areas of greatest change in the image.

Age Prediction Accuracy
Model architectures & resolution comparison. We aimed to establish the effect of different prediction models on age prediction accuracy, and summarise our results in Table 1 (left) as mean absolute prediction error (MAE) in years. We observe little difference in accuracy between the three modelling approaches at 299 2 resolution with MAEs of 3.33-3.34, leading us to surmise that the performance of the CNN is saturated with this size of dataset and the specific modeling approach is only marginally relevant. We also investigated using DenseNet-169 CNN (14.1M parameters) in place of EfficientNet-B3 (12M parameters), but obtained a slightly lower performance (3.40 vs 3.33 years). We elected to retain the simple regression model 'EfficientNet-LR' for the following work since a more complex approach does not appear to be supported by these results.
Increased image resolution improves model accuracy significantly up to 512 2 , with only a minor improvement seen from 3.05 to 2.95 MAE when increasing to 1024 2 (Fig.3, right). We infer that age-relevant information is not purely limited to the coarse structural features in the image but is also present in intermediatelevel features, while fine detail is less relevant. We observe that taking a mean of estimates at each of the four resolution levels for each image reduces MAE further to 2.78 years, which to the best of our knowledge is the best accuracy reported in a heterogeneous non-curated dataset. We note increased error with patient age, possibly attributable to higher levels of clinical abnormalities with age (see supplementary material). Effect of Number of Training Images on Model Accuracy. We investigated the extent to which the large dataset available contributes to prediction accuracy by training the Efficient-LR model at 299 2 resolution on training sets from 10k to 1.597M images. Test set MAE is shown in Fig. 3 (left). MAE vs training set size empirically follows a logarithmic decline (shown as best fit), with diminishing improvements seen up to the full dataset size; we conclude that larger datasets are unlikely to be a major driver of improved performance. Generalisation Performance on NIH ChestX-ray14. Performance of our pre-trained models on the Chest14 public dataset is shown in Fig. 3 (right). This dataset is provided as jpg files with unknown normalisation; we show results before and after fine-tuning on the Chest14 training data to adapt to the unknown normalisation. After fine-tuning we observe an MAE of 3.10 years at 1024 2 resolution, 5% higher than for our own data; this could be due to information lost in pre-processing and image compression or different population characteristics and warrants further investigation. Direct performance comparisons with the literature are challenging, but we note that for the same dataset [8] reports MAE of 3.78 years, while [10] reports 67.5% within ±4 years vs 87.3% for our model. We conclude that pre-training on our dataset gives a significant performance increase over prior results.

Clinician vs Algorithm Performance Study
Results from the human vs model study are summarised in Fig.4. In the age estimation task (left) the regression model achieves an R 2 of 0.94, MAE 3.53 years and mean error (ME) −2.23 ± 3.86 years, whereas the radiologists achieve R 2 of 0.27 with MAE 11.84 years and ME −3.12 ± 14.25 years. The accuracy of the three radiologists varied between MAE 10.86 and 12.69 years with R 2 0.13 to 0.36. On the ranking task (right), both the ranking model and humans see increased accuracy with age separation as expected. The radiologists successfully ranked 48.3% of all pairs and 67.1% of those attempted, vs 82.5% of all pairs for the regression model and 85.5% for the ranking-specific model.
To test our hypothesis that humans are stronger at longitudinal change detection than point age estimation versus a null hypothesis of no benefit, we compare the observed ranking success with that expected if the two ages were estimated independently. Assuming Gaussian errors with the observed standard deviation of 14.25 years and calculating the probability of the sum of the two errors (∼ N (0,(2x14.25) 0.5 ) exceeding the true age separation of each pair at-tempted, we derive an expected ranking success rate of 60.1 ± 2.4%. Compared with the observed success rate of 67.1% on attempted pairs, we conclude that the radiologists do benefit from the longitudinal information (p-value 0.002). Performing the same analysis for the models with the observed point estimate standard deviation 3.86 years, we expect a ranking success rate of 79.0±2.7%. We find (as expected) no evidence of the regression model benefiting from paired images (p-value 0.098), whereas we find the ranking model benefits from the paired information (p-value 0.008).

Aging Feature Visualisation
In Fig.5 we show two examples of synthetic age interpolations. Each row uses a a constant w 'patient identity' input, showing the same artificial patient at progressively older target ages. The pixel-wise difference map of the 'oldest' image versus the 'youngest' highlights the features changed by the GAN to manipulate the age. We observe a widening of the aortic arch, lowering and widening of the heart, apical shadowing, some narrowing of the rib-cage, and widening of the mediastinum as the major features relevant to age prediction. These features are consistent with the opinion of our consultant radiologists, although they note that decreased transradiancy and increased aortic calcification would be expected which are not evident in the synthetically aged images. Further examples are provided in the supplemental materials.

Conclusion
In this work we present a study comparing the performance of three radiologists on chest X-ray age prediction and ranking tasks, comparing with data-driven models trained on a highly heterogeneous non-curated set of chest X-rays from a variety of clinical settings in six hospitals. We conclude that (a) the radiologists are significantly more accurate at detecting age-related changes in a single patient than at estimating age in single images and (b) the models significantly outperform humans on both tasks. We report a state of the art MAE of 2.78 years on our proprietary test data, and demonstrate the highest reported generalisation performance on the public NIH Chest14 dataset. Our work indicates that accuracy gains are likely to be small from larger datasets, and that the majority of age-relevant information is present at 512 2 resolution in this modality. We further demonstrate a GAN-based 'explainable AI' solution to visualise age-relevant features identified by the model, and compare with those identified by the radiologists based on their clinical experience. Fig. 6. Efficient-LR ensemble model predictions vs ground truth for test set with 5year bucketed mean and 1-sd overlay; MAE 2.78 years, R 2 = 0.963. We note increased standard deviation with higher patient age, possibly reflecting increased variability of presentation of older patients with respect to abnormalities. Error increases sharply beyond 90 years. Fig. 7. Screenshot of age comparison web application used by the radiologists in our study. The user clicks on the image believed to show the patient at an older age or 'not sure' and enters an age estimate for one of the images before moving to the next pair.