Estimating Model Performance on External Samples from Their Limited Statistical Characteristics
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
Preprint, 1–14 Estimating Model Performance on External Samples from Their Limited Statistical Characteristics Tal El-Hay talelh@kinstitute.org.il KI Research Institute, Kfar Malal, Israel Chen Yanover chen@kinstitute.org.il KI Research Institute, Kfar Malal, Israel arXiv:2202.13683v1 [stat.ML] 28 Feb 2022 Abstract (OHDSI, 2019). Definitions of cohorts, features, Methods that address data shifts usually as- and outcomes are available through OHDSI demo sume full access to multiple datasets. In the ATLAS. Code is available at https://github.com/ healthcare domain, however, privacy-preserving KI-Research-Institute/external-evaluation. regulations as well as commercial interests limit data availability and, as a result, researchers can typically study only a small number of 1. Introduction datasets. In contrast, limited statistical char- acteristics of specific patient samples are much Predictive models, such as disease risk scores, are easier to share and may be available from pre- typically trained on a single, or few, data sources viously published literature or focused collabo- but are often expected to work well in other environ- rative efforts. ments, that may vary in their population character- Here, we propose a method that estimates istics, clinical settings, and policies (Steyerberg and model performance in external samples from Harrell, 2016). In many cases, model performance their limited statistical characteristics. We deteriorates significantly in these external environ- search for weights that induce internal statis- ments, as demonstrated repeatedly (e.g., Ohnuma tics that are similar to the external ones; and and Uchino (2017)), and most recently for the widely that are closest to uniform. We then use model performance on the weighted internal sample as implemented proprietary Epic Sepsis Model (Wong an estimation for the external counterpart. et al., 2021) and for COVID-19 risk models (Reps We evaluate the proposed algorithm on sim- et al., 2021). ulated data as well as electronic medical record Model robustness – that is, its ability to provide data for two risk models, predicting complica- accurate prediction despite changes, e.g., in the char- tions in ulcerative colitis patients and stroke in acteristics of input covariates – can be demonstrated women diagnosed with atrial fibrillation. In the using external validation, the process of evaluating vast majority of cases, the estimated external model performance on data sources that were not performance is much closer to the actual one used for its derivation. However, full access to med- than the internal performance. Our proposed ical datasets is often limited due to privacy, regula- method may be an important building block in tory and commercial factors. Therefore, we aim to training robust models and detecting potential model failures in external environments. estimate the performance of a given model on exter- nal sources using only their more commonly available Data and Code Availability This paper uses statistical characteristics. the IQVIA Medical Research Data, primary care Here, we propose an algorithm which reweights in- electronic medical records (EMRs) from the United dividuals in an internal sample to match external Kingdom (IMRD-UK, version: 2019-03), incorporat- statistics, potentially reported in preceding publica- ing data from THIN, A Cegedim Database (refer- tions or characterization studies (e.g., Recalde et al. ence made to THIN is intended to be descriptive 2021); then estimates the performance on the exter- of the data asset licensed by IQVIA), and trans- nal sample using the reweighted internal one. We formed to the Observational Medical Outcomes Part- focus on cases that are common in the healthcare do- nership (OMOP) common data model (CDM; v5.1) main, where the size of samples (that is, number of © T. El-Hay & C. Yanover.
Estimating Model Performance on External Samples individuals) is much larger than the number of fea- moments of an otherwise inaccessible sample (rather tures. In such cases, infinite number of weight sets than samples from an accessible data source). may recapitulate the external statistics, therefore the proposed algorithms searches for weights with a min- imal divergence from a uniform distribution. 3. Estimation Algorithm We first study the strengths and limitations of our The goal of the proposed method is to estimate the suggested approach using simulated data; then split performance of a prediction model, e.g., risk score, on a sample from a primary care dataset into ”internal” an external sample, given some of its statistical prop- versus ”external” subsets based on demographic in- erties, and using an internal, fully-accessible data. formation, and validate the approach using a predic- Briefly, we reweight an internal sample to obtain the tion model for 3-year risk of complications in ulcer- external statistics, then compute model performance ative colitis patients; and, finally, use the entire pri- on the weighted sample as an estimate of the external mary care data to estimate the performance of three performance. stroke risk scores in seven external resources and com- pare it to the actual performance, as reported in a 3.1. Problem Formulation recent study (Reps et al., 2020). Let xi and yi denote an observation (or feature) vec- tor and a binary outcome† , respectively, for an indi- 2. Related Work vidual i. Suppose we have access to observations for nint individuals in an internal sample: The task of evaluating model performance in external samples, often with (at least some) data shift (Fin- Dint = {xi , yi }ni=1 int ; layson et al., 2021), is tightly coupled with that of training robust models, as evaluation is a necessary and summary statistics for an external sample (with step in model selection and optimization. next individuals): One line of work handling data shifts adopts ideas 1 X from causal inference. Specifically, causal models µ= φ(xi , yi ), next (Bareinboim and Pearl, 2016) can distinguish in- (xi ,yi )∈Dext variant relations between risk factors (e.g., biologi- where φ(xi , yi ) is a set of transformations on cal or physiological) and outcomes from context- or individual-level observations. For example: environment-dependent mechanisms (Subbaswamy et al., 2019). Subbaswamy et al. (2021) developed a φ(xi , yi ) = {xi · yi , xi · (1 − yi ), yi } method for analyzing model robustness (or stability) allows computation of features mean in subsets of in- that, given a model, a set of distribution-fixed (im- dividuals with and without the outcome (as often re- mutable) variables and a set of distribution-varying ported in a study’s Table 1). (mutable) variables, identifies the sub-population We aim at estimating the performance of a model with the worst average loss; thus, enabling evalua- m on the external sample Dext , using µ and observa- tion of model safety, with no external information. tions from DintP. To this end, we search for weights Sample reweighting is commonly applied to adjust w ∈ [0, 1]nint , i wi = 1, such that the statistical for confounders, either measured (Hainmueller, 2012) nint properties of the weighted sample {xi , yi , wi }i=1 ap- or unmeasured (Streeter et al., 2017), and to ac- proximate these of the external one. Let W (µ, Z) count for selection bias (Kalton and Flores-Cervantes, denote the space of such weight sets: 2003), typically leveraging fully-accessible samples. Methodologically, the optimization problem we de- X W (µ, Z) = w ∈ Rn : Z > w = µ, wi = 1, rive is similar to that studied for entropy balancing (Hainmueller, 2012), which attempts to reweight a sample (e.g., control group) so its prespecified set wi ≥ 0, i = 1, . . . , nint of moments exactly match that of another sample (e.g., treatment group), while maximizing the weight †. We focus here on binary outcomes, as these are commonly used – and reported – in healthcare applications; it is pos- entropy (that is, keeping weights as close as possi- sible to extend the proposed approach to continuous out- ble to uniform). We note, however, that we explore comes, using an appropriate performance measure and sta- a different use-case and, consequently, optimize over tistical characteristics. 2
Estimating Model Performance on External Samples P Where Z is a matrix whose rows are z i ≡ φ(xi , yi ). where H(w) = − i wi log wi is the entropy function. As W (µ, Z) may be infinitely large, we propose to We derive a dual formulation of Problem (2), sim- search for a set of weights that is also closest to uni- ilar to Hainmueller (2012), in Appendix B; and show form. This additional constraint is based on a prox- that the optimal solution has the form: imity assumption, intuitively that the external dis- wi ∝ ezi ·ν , tribution is relatively similar to the distribution in W (µ, Z) that is closest to the internal distribution. where ν ∈ R|φ| . In other words, the optimal weights Using the reweighted sample we can now estimate are normalized exponents of a linear function of Z. two types of performance measures: We note that, as the number of features is typically much smaller than the sample size, the solution to • Measures that can be expressed as a pointwise the dual problem is expected to be more numerically loss function, l(m(xi ), yi ), for which we estimate stable than the primal’s. the expected loss of the model in the external In cases where W (µ, Z) = ∅, Problem (1) can sample as: be adjusted to trade-off, using hyper-parameter λ, 1 X the accuracy at which the weighted internal sample wi · l(m(xi ), yi ). nint reproduce the external statistics and proximity and (xi ,yi )∈Dint rewritten as: For example, for a model that computes the > probability of an outcome y, we can estimate min Z w − µ + λ · Df (wk1/n) w the expected negative log-likelihood by setting X (3) l(m(xi ), yi ) = −yi log(m(xi )) − (1 − yi ) log(1 − such that wi = 1, wi ≥ 0 , m(xi )). i where the norm can be L2 or L1 . • Non-decomposable measures that can be evalu- ated on weighted samples. For example, the area under the receiver operating characteristic curve 3.2. Detecting Estimation Failure (AUC). To estimate the performance of a model in an exter- Below we present a model independent scheme, nal sample Dext , with distribution Pext (z) of trans- which minimizes an f-divergence function (for ex- formed features, we assume that Pint (z) > 0 when- ample, maximizes the weights entropy); and in Ap- ever Pext (z) > 0. This condition is analogous to the pendix A, we derive a model (and loss) dependent positivity assumption in causal inference, except that scheme, which maximizes a weighted upper bound on it is one sided. In other words, the support of Pext (z) the model loss and the regularized divergence func- can be a strict subset of the support of Pint (z). Al- tion. though this assumption cannot be verified, its vio- lations can be detected when external expectations Model-independent optimization scheme. To cannot be attained in the internal sample. find a weighted representation of an internal sample that replicates the external expectations, we solve the 3.3. Implementation following optimization problem: We used R’s CVXR (Fu et al., 2020) library to solve min Df (wk1/n), (1) the optimization problem and WeightedROC library w∈W(µ,Z) (Hocking, 2020) to compute weighted AUC. To deal where Df (P kQ), f-divergence, for discrete measures with cases where W (µ, Z) = ∅ we used the relaxed P and Q is: Problem (3) with λ = 10−6 and L2 norm. To alleviate X P (x) numerical issues, we set a minimum weight parameter Df (P kQ) = f Q(x) (10−6 ) and remove features with a small standard Q(x) x deviation (< 10−4 ). and f : R+ → R is a convex function, with f (1) = 0. For example, when f (t) = t log t, Optimization 4. Empirical Evaluation Problem (1) becomes: To evaluate the accuracy of the proposed algorithm, max H(w), (2) we estimated the external performance of various w∈W(µ,Z) 3
Estimating Model Performance on External Samples models using an internal sample and limited exter- We defined the simulations using the following nal statistical characteristics, in three scenarios: (a) structural equations model: simulating data using a structural equation model (Bareinboim and Pearl, 2016) for ”internal” and ”ex- H = βH,A A + H ternal” environments; training an outcome prediction X = β X,A A + β X,H H + β X,AH AH + X model on the internal sample and evaluating its per- Y ∼ Bernoulli(sigmoid(f (X, H, A))) formance on the external one; (b) extracting a co- hort of newly diagnosed ulcerative colitis individu- where als in IMRD-UK data; synthetically splitting this co- hort into ”internal” and ”external” samples; train- f (X, H, A) = βY,A A+βY,H H +β Y,X X +β Y,AX AX , ing a complication risk model on the internal sample and evaluating its performance on the external one; βX,· and β·,X ∈ Rp are coefficient vectors, the rest and (c) extracting atrial fibrillation patient cohorts of the coefficients are scalars, H ∼ N (0, 1), X ∼ in IMRD-UK data as an internal sample; evaluating N (0, Ip ) are independent sources of variability and the performance of three stroke risk models in multi- sigmoid(z) = 1+e1−z . ple inaccessible claim and EMR databases using their This model is similar to the anchor regression published statistical characteristics. model (Rothenhäusler et al., 2021), replacing the con- tinuous outcome with a binary one. The depen- dency of X on the hidden variable H induces cor- relations between features, and the interaction term 4.1. Synthetic Data AH induces differences in the correlations structure between environments. Therefore, the coefficient We simulated synthetic data using structural equa- β X,AH controls the ”strength” of the shift in corre- tion models that contain a hidden variable H ∈ R, lations between features, depending on the environ- features X ∈ Rp , a binary outcome Y , and a deter- ment; and the coefficient β Y,AX controls the shift in ministic binary variable A where A = 0 denotes an direct effect of X on Y . internal environment and A = 1 denotes an external one (Figure 1). This framework allows examining the 4.1.1. Implementation strengths and limitations of the proposed algorithm subject to different types of data shifts. Here, we set the dimension of X to be p = 10 and sample coefficients βH,A , βY,A ∼ N (0, 0.2), β X,A ∼ N (0, 0.2Ip ), βX,H ∼ N (0, Ip ), and βY,H ∼ N (0, 1). We let only X1 and X2 (but not X3 to X10 ) affect the outcome Y by setting βY,X = (1, 1, 0, . . . , 0) and βY,AX = (−0.8, −0.2, 0, . . . , 0). As studies do not typically report correlations be- tween features within each outcome class, we tested our algorithm in different scenarios of correlation shifts. Specifically, we used three configurations of β X,AH ∼ N (0, σX,AH ), where σX,AH = 0, 0.5, or Figure 1: Graphical representation of the data- 1, emulating weak, medium, and strong correlation generating causal model. A is an environ- shifts, respectively. ment variable (e.g., in a clinical setting, Given a specific simulation model, we generated specific healthcare system), H is a hidden three data sets, namely internal training and tests variable (encoding, for example, an indi- sets and an external data set. We computed the mean vidual’s healthcare status), X is a set of and variance of every feature in X, separately for in- observed features (e.g., prescribed medica- dividuals with Y = 0 and Y = 1, in the external tions or lab test results) and Y is a bi- set. Next, we trained an elastic net regularized logis- nary outcome (e.g., disease onset or pro- tic regression model on the internal training set and gression). computed the AUC on the internal test and external sets. Finally, we applied the performance estimation 4
Estimating Model Performance on External Samples algorithm on the internal test set, using external ex- pectations, and compared the estimated AUC to the actual one. Supplementary Figure 6 presents examples of gen- erated samples with varying values of σX,AH . For each setting, we generated 200 models, and from each sampled data with varying sizes (n = 200, 500, 1000, 2000, 5000). 4.1.2. External Performance Estimation The results of the proposed algorithm, in terms of divergence from uniform weights and AUC estima- tion accuracy, for different values of σX|AH and data size n = 5000 are shown in Table 1. As expected, weight divergence from uniform (DKL (wk1/n)) and estimation error grow with σX|AH . Figure 2 presents the estimation error of the ex- Figure 2: Estimation error (absolute value of the ternal AUC values, as a function of correlation shift difference between actual and estimated strength and sample size, n. Estimation quality is external AUC values; y-axis) for weak, lower for strong shifts in correlations which are not medium, and strong correlation shifts, as captured in the shared expectations, whereas milder a function of sample size, n (x-axis). differences result in good estimations. For compari- Whiskers correspond to 25-75 AUC per- son, the difference between internal and actual exter- centiles, over 200 models. nal AUC values is around 0.1 (Table 1). Table 1: Algorithm performance in 5000-unit sim- ulated datasets averaged on 200 sampling death) in ulcerative colitis (UC) patients; estimated repetitions. The estimation error column its performance on the external sample, using limited presents the mean of the absolute values of external statistics; and compared the estimated and errors. DKL , Kullback Leibler divergence observed performance. between the derived and uniform weights, and estimation error increase with stronger correlation shifts. 4.2.1. Clinical Background Internal External Est. UC is a chronic inflammatory bowel condition with σX|AH DKL AUC AUC Error consistently increasing incidence rates in both newly 0.0 (Weak) 0.41 0.841 0.726 0.011 industrialized and developed countries (Benchimol 0.5 (Med.) 1.37 0.850 0.735 0.019 et al., 2014; Windsor and Kaplan, 2019; Kaplan and 1.0 (Strong) 4.04 0.847 0.733 0.043 Windsor, 2021). The increase in its prevalence has a significant impact on healthcare financial burden due to chronically administered medications as well 4.2. Synthetic Data Split: Complications of as hospitalizations and surgical procedures (Windsor Ulcerative Colitis and Kaplan, 2019). Next, we studied the IMRD-UK primary care data UC pathogenesis is not well understood. Presumed and synthetically split it into ”internal” and ”ex- risk factors for a more complicated disease include ternal” sets based on various demographic criteria. younger age at diagnosis, extensive disease, use of Specifically, we trained a model on the internal sam- steroids and immunosupressive drugs, and being a ple to predict the 3-year risk of intestinal surgery (or non-smoker (Koliani-Pace and Siegel, 2019). 5
Estimating Model Performance on External Samples Table 2: Characteristics of internal and external samples, split by age. Internal: individuals > 34 years old, Internal: individuals ≤ 64 years old, External: individuals ≤ 34 years old External: individuals > 64 years old Internal External Internal External n 5577 1933 5616 1894 Townsend deprivation index Score 2.4 (±1.2) 2.6 (±1.3) 2.5 (±1.2) 2.4 (±1.2) Available 4893 (87.7%) 1685 (87.2%) 4913 (87.5%) 1665 (87.9%) Female 2752 (49.3%) 932 (48.2%) 2711 (48.3%) 973 (51.4%) Smoking 1397 (25%) 362 (18.7%) 1393 (24.8%) 366 (19.3%) Steroids 1597 (28.6%) 670 (34.7%) 1666 (29.7%) 601 (31.7%) Body mass index (BMI) Underweight 105 (1.9%) 85 (4.4%) 140 (2.5%) 50 (2.6%) Overweight 1535 (27.5%) 244 (12.6%) 1170 (20.8%) 609 (32.2%) Perianal disease 66 (1.2%) 49 (2.5%) 97 (1.7%) 18 (1%) Complications 900 (16.1%) 141 (7.3%) 457 (8.1%) 584 (30.8%) 4.2.2. Implementation 4.2.3. External Performance Estimation: Ulcerative Colitis, Split by Age The UC onset cohort includes individuals with at least two diagnoses of inflammatory bowel disease (IBD) or with an IBD diagnosis and a prescription In the following experiments, we split the subset of for an IBD medication; who have an ulcerative colitis individuals who live in England by their age. Specif- diagnosis and no Crohn’s disease diagnosis. We set ically, in the first experiment, the internal set con- index (or cohort entry) date to the first IBD diagnosis tained the 75% youngest subjects (≤ 64 years) and or medication prescription and required that individ- the external set – the 25% older ones; and in the uals have a minimum observation of 365 days prior second experiment, the internal set contains the 75% to index date. We excluded subjects with insufficient older individuals (> 34 years) and the internal set – follow-up. the remaining older individuals. In each of these se- For each individual in the ulcerative colitis co- tups we randomly split the internal set to training hort we extracted a set of features, previously re- (75%) and test (25%); we repeated the training-test ported as associated with increased intestinal surgery random split 200 times. Next, we trained a linear risk (Koliani-Pace and Siegel, 2019). These include model as well as a non-linear one, using XGBoost age (and age2 ), sex, smoking, being underweight or (Chen and Guestrin, 2016), computed model’s AUC overweight, presence of perianal disease, and use of on the internal test and external sets, and estimated steroids; and considered sets of predefined features the external AUC using the internal set and the ex- (per OHDSI’s Feature Extraction R library), e.g., pectations of the external one. To maintain positiv- drugs prescribed to a at least 1,000 subjects up to ity and to emulate an environment dependent hidden 90 days after index date. The outcome considers factor, we excluded age from the feature set. The procedure codes for colostomy, colectomy, ileostomy, populations were different in several observed charac- small intestinal resection, stricturoplasty, balloon di- teristics, notably, percentage of women, underweight lation, drainage of perianal abscess, drainage of intra- and overweight; see Table 2 for details. abdominal abscess, or death, within 3 years following index date. Definition of all concept sets and cohorts Overall, the external performance estimations, us- are available at https://atlas-demo.ohdsi.org/. ing either elastic net or XGBoost, are close to the We split the IMRD-UK data into internal and ex- actual ones (Figure 3), notably for external younger ternal sets based on individual age or country of liv- samples, where the difference between the internal ing, as described below. and external performance is large (right panel). 6
Estimating Model Performance on External Samples Internal: individuals > 34 years old, Internal: individuals ≤ 64 years old, External: individuals ≤ 34 years old External: individuals > 64 years old AUC (a) Elastic net (b) XGBoost (c) Elastic net (d ) XGBoost Figure 3: Actual and estimated external performance in England UC cohorts, split by age. Boxes show the external median AUC and inter-quantile range (IQR, 25 and 75 percentiles) over 200 repetitions; solid line represents the median internal AUC and dashed lines represent the IQR. 4.2.4. External Performance Estimation: external samples; and evaluated model performance Ulcerative Colitis, Split by Country on the internal test and external sets. The characteristics of different sub-populations are presented in Table 3; Figure 4 shows the external per- formance evaluation results, attesting to the (much) improved accuracy of the estimated AUC values, compared to internal performance. AUC 4.3. Distinct Datasets: Stroke Risk Models (a) Elastic net (b) XGBoost 4.3.1. Clinical Background Atrial fibrillation is a common cardiac rhythm disor- Figure 4: Actual and estimated performance in ex- der, associated with increased risk of stroke (Sagris ternal, country-based UC samples. Boxes et al., 2021). Risk factors associated with the occur- show the external median AUC and IQR rence of stroke include older age, various comorbidi- over 200 repetitions; solid and dashed lines ties (in particular, hypertension, diabetes, and renal represent the internal median AUC and disease) and smoking (Singer et al., 2013). To guide IQR, respectively. treatment, multiple risk scores have been devised and externally evaluated in several studies (van den Ham et al., 2015). Recently, Reps et al. (2020) replicated Next, we split the UC cohort by country of res- five previously published prognostic models that pre- idence and considered the sub-cohort of individuals dict stroke in females newly diagnosed with atrial fib- living in England as the internal sample and those liv- rillation; and externally validated their performance ing in Scotland, Wales and Northern Ireland as three across nine observational healthcare datasets. Below, distinct external samples. Similarly to the age split we use our proposed algorithm and the limited per- analysis, we split the internal sample into training database statistical characteristics, as it appears in and test sets, repeatedly 200 times; trained a model Reps et al. (2020), to estimate the external perfor- on each training set; extracted expectations for the mance of these risk scores. 7
Estimating Model Performance on External Samples Table 3: Characteristics of ulcerative colitis, country-based sub-cohorts. England Wales Northern Ireland Scotland n 9469 1255 772 1772 Age (years) 48.7 (±18.9) 48.3 (±19.1) 46 (±18.2) 47 (±18.5) Townsend deprivation index Score 2.5 (±1.2) 2.4 (±1.1) 2.9 (±1.3) 3 (±1.2) Available 8265 (87.3%) 900 (71.7%) 634 (82.1%) 1541 (87%) Female 4636 (49%) 602 (48%) 382 (49.5%) 909 (51.3%) Smoking 2230 (23.6%) 313 (24.9%) 221 (28.6%) 484 (27.3%) Steroids 2834 (29.9%) 408 (32.5%) 224 (29%) 668 (37.7%) Body mass index (BMI) Underweight 248 (2.6%) 30 (2.4%) 24 (3.1%) 37 (2.1%) Overweight 2276 (24%) 343 (27.3%) 200 (25.9%) 442 (24.9%) Perianal disease 144 (1.5%) 16 (1.3%) 12 (1.6%) 11 (0.6%) Complications 1315 (13.9%) 203 (16.2%) 123 (15.9%) 244 (13.8%) 4.3.2. Implementation UK data using the proposed algorithm to reproduce the sample’s populations characteristics, as reported We downloaded Reps et al. (2020)’s analysis package in Reps et al. (2020), and computed the score perfor- and applied it to the IMRD-UK data, with the fol- mance for the weighted individual cohort. We com- lowing modifications that adjust the study definitions puted 95% confidence intervals using 1000 bootstrap- to a primary care setting: ping iterations. Target cohorts. We considered ECG-related pro- Population attributes (Reps et al., 2020) include cedures and conditions, in addition to measurements, percentage of individuals in certain age groups (65- within 30 days prior the atrial fibrillation diagnosis, 74 years, 75-85 years and above 85 years), comor- as an optional inclusion criterion. bidities (hypertension, congestive heart failure, con- gestive cardiac failure, coronary heart disease, valvu- Outcome cohort. As stroke, typically not diag- lar heart disease, chronic and end stage renal disease, nosed in a primary care setting, may be poorly proteinuria, diabetes, and rheumatoid arthritis) and recorded for deceased individuals, we added death as being a former smoker. an entry event to the stroke cohort. Feature definitions. We extended the time win- 4.3.3. External Performance Estimation dow for extraction of model features to span the en- tire history of each individual until, and including, A comparison between risk score performance, as re- the date of the first atrial fibrillation event; included ported by Reps et al. (2020), and the estimated per- individuals with estimated glomerular filtration rate formance is shown in Figure 5. For the full cohort (eGFR) lower than 45 mL/min/1.73m2 in the end (top panel), in three out of six datasets, the con- stage renal disease cohort, as originally defined in the fidence interval of the ATRIA estimation overlaps ATRIA risk model (Singer et al., 2013); and defined the actual AUC (Figure 5a); in two other datasets, former smokers as individuals with an observation of the estimation is better than the internal, IMRD-UK smoker, as well as those diagnosed with tobacco de- based performance. Qualitatively similar results are pendence syndrome. observed for the CHADS2 and Q-Stroke risk scores For each individual, the analysis package com- (Figure 5b and c, respectively); as well as for women puted a stroke risk score given her set of features, 65 years or older (bottom panel). as extracted from IMRD-UK; then, calculated score We note that for two additional risk scores, Fram- performance, vis-à-vis recorded stroke (and death) ingham and CHA2 DS2 VASc, and two datasets, Ajou events. To estimate score performance in each ex- University School Of Medicine (AUSOM) and In- ternal sample, we weighted individuals in the IMRD- tegrated Primary Care Information (IPCI), Reps 8
Estimating Model Performance on External Samples Women diagnosed with atrial fibrillation (a) ATRIA (b) CHADS2 (c) Q-Stroke Women 65 or more years old, diagnosed with atrial fibrillation (d ) ATRIA (e) CHADS2 (f ) Q-Stroke Figure 5: Performance estimation for three stroke risk scores across seven external datasets. Blue circles represent the actual AUC value as reported by Reps et al. (2020), red diamonds show the weighted estimations, and whiskers denote 95% confidence intervals. Solid lines represent the internal AUC, as computed in the IMRD-UK cohorts, with dashed lines denoting 95% confidence intervals. 9
Estimating Model Performance on External Samples et al. (2020) do not provide necessary statisti- In future work, we will combine the proposed al- cal characteristics. Additionally, AUC values of gorithm with methods that aim to construct robust IBM MarketScan® Medicare Supplemental Database models such as those that leverage distributionally ro- (MDCR) were not provided for the full atrial fibril- bust optimization (Bühlmann, 2020); study methods lation cohort and those of IBM MarketScan® Com- that exploit the relations between calibration and ro- mercial Database (CCAE) are missing for the older bustness (Wald et al., 2022); and look into decompos- female sub-cohort. Therefore, in all those cases, per- ing AUC (Eban et al., 2017), so it can be optimized formance estimations are not reported. explicitly. Institutional Review Board (IRB) 5. Discussion This study has been approved by IQVIA Scientific We presented an algorithm that estimates the perfor- Review Committee (Reference numbers: 21SRC066, mance of prediction models on external samples from 22SRC002). their limited statistical characteristics; and demon- strated its utility using synthetic data, synthetic split of an ulcerative colitis cohort from a single database Acknowledgments into age groups and by country of living, and a re- We thank Drs Roni Weisshof and Ramit Magen, cent risk model benchmark of stroke risk models on Rambam Health Care Campus, Haifa, Israel, for multiple external samples. Importantly, our proposed their help in defining the ulcerative colitis predictive algorithm can help identifying models that perform model; and Prof Seng Chan You, Yonsei University well across multiple clinical settings and geographies, Health System, Seoul, Republic of Korea, for point- even when detailed test data from such settings is ing us to the stroke external validation study. We are not available. It can thus direct development of ro- also grateful to KI Institute’s researchers and, specif- bust models and accelerate deployment to external ically, to Nir Kalkstein and Yonatan Bilu, for many environments. fruitful discussions. The algorithm relies on two assumptions: one-sided positivity and proximity. Both assumptions cannot be fully tested, but clear violations of the former References one can be detected, for example, when the expected value of a feature is non-zero in the external distribu- Elias Bareinboim and Judea Pearl. Causal inference tion but all the individuals in the internal set have and the data-fusion problem. Proceedings of the a zero value for that feature. Intuitively, proxim- National Academy of Sciences, 113(27):7345–7352, ity is more likely to be plausible when the statisti- July 2016. ISSN 0027-8424, 1091-6490. doi: 10. cal information becomes more detailed. Therefore, 1073/pnas.1510507113. URL https://www.pnas. whereas our preliminary experiments involved only org/content/113/27/7345. Publisher: National marginal statistics of features it may be informative Academy of Sciences Section: Colloquium Paper. to test the performance of the algorithm when more Eric I. Benchimol, Douglas G. Manuel, Astrid detailed statistics are available, for example interac- Guttmann, Geoffrey C. Nguyen, Nassim Mo- tions among features or information available in deep javerian, Pauline Quach, and David R. Mack. characterization studies Burn et al. (2020). Changing Age Demographics of Inflamma- We believe that the proposed methodology can tory Bowel Disease in Ontario, Canada: A serve as a building block in network studies that aim Population-based Cohort Study of Epidemi- to construct robust models across datasets when data ology Trends. Inflammatory Bowel Diseases, sharing is limited, e.g., by regulatory constraints. Al- 20(10):1761–1769, October 2014. ISSN 1078- though federated learning methods may be a promis- 0998. doi: 10.1097/MIB.0000000000000103. ing avenue for such scenarios, it would be interesting URL https://academic.oup.com/ibdjournal/ to explore in which cases the proposed algorithm can article/20/10/1761-1769/4578853. facilitate a one-shot federated learning scheme, that does not require deployment of federated algorithm Peter Bühlmann. Invariance, Causality and clients in all network nodes. Robustness. Statistical Science, 35(3):404– 10
Estimating Model Performance on External Samples 426, August 2020. ISSN 0883-4237, 2168- 1145/2939672.2939785. URL https://doi.org/ 8745. doi: 10.1214/19-STS721. URL 10.1145/2939672.2939785. https://projecteuclid.org/journals/ statistical-science/volume-35/issue-3/ Elad Eban, Mariano Schain, Alan Mackey, Ariel Invariance-Causality-and-Robustness/10. Gordon, Ryan Rifkin, and Gal Elidan. Scal- 1214/19-STS721.full. Publisher: Institute of able Learning of Non-Decomposable Objectives. Mathematical Statistics. In Aarti Singh and Jerry Zhu, editors, Proceed- ings of the 20th International Conference on Ar- Stephen Boyd, Stephen P Boyd, and Lieven Vanden- tificial Intelligence and Statistics, volume 54 of berghe. Convex optimization. Cambridge univer- Proceedings of Machine Learning Research, pages sity press, 2004. 832–840. PMLR, 20–22 Apr 2017. URL https: //proceedings.mlr.press/v54/eban17a.html. Edward Burn, Seng Chan You, Anthony G. Sena, Samuel G. Finlayson, Adarsh Subbaswamy, Karan- Kristin Kostka, Hamed Abedtash, Maria Tereza F. deep Singh, John Bowers, Annabel Kupke, Abrahão, Amanda Alberga, Heba Alghoul, Os- Jonathan Zittrain, Isaac S. Kohane, and Suchi aid Alser, Thamir M. Alshammari, Maria Aragon, Saria. The Clinician and Dataset Shift in Ar- Carlos Areia, Juan M. Banda, Jaehyeong Cho, tificial Intelligence. New England Journal of Aedin C. Culhane, Alexander Davydov, Frank J. Medicine, 385(3):283–286, July 2021. ISSN 0028- DeFalco, Talita Duarte-Salles, Scott DuVall, 4793. doi: 10.1056/NEJMc2104626. URL https: Thomas Falconer, Sergio Fernandez-Bertolin, Wei- //doi.org/10.1056/NEJMc2104626. Publisher: hua Gao, Asieh Golozar, Jill Hardin, George Hripc- Massachusetts Medical Society. sak, Vojtech Huser, Hokyun Jeon, Yonghua Jing, Chi Young Jung, Benjamin Skov Kaas-Hansen, Anqi Fu, Balasubramanian Narasimhan, and Stephen Denys Kaduk, Seamus Kent, Yeesuk Kim, Spy- Boyd. CVXR: An R Package for Disci- ros Kolovos, Jennifer C. E. Lane, Hyejin Lee, plined Convex Optimization. Journal of Sta- Kristine E. Lynch, Rupa Makadia, Michael E. tistical Software, 94(1):1–34, September 2020. Matheny, Paras P. Mehta, Daniel R. Morales, ISSN 1548-7660. doi: 10.18637/jss.v094.i14. Karthik Natarajan, Fredrik Nyberg, Anna Os- URL https://www.jstatsoft.org/index.php/ tropolets, Rae Woong Park, Jimyung Park, Jose D. jss/article/view/v094i14. Number: 1. Posada, Albert Prats-Uribe, Gowtham Rao, Chris- tian Reich, Yeunsook Rho, Peter Rijnbeek, Lisa M. Jens Hainmueller. Entropy Balancing for Causal Schilling, Martijn Schuemie, Nigam H. Shah, Effects: A Multivariate Reweighting Method to Azza Shoaibi, Seokyoung Song, Matthew Spot- Produce Balanced Samples in Observational Stud- nitz, Marc A. Suchard, Joel N. Swerdel, David ies. Political Analysis, 20(1):25–46, 2012. ISSN Vizcaya, Salvatore Volpe, Haini Wen, Andrew E. 1047-1987, 1476-4989. doi: 10.1093/pan/mpr025. Williams, Belay B. Yimer, Lin Zhang, Oleg URL https://www.cambridge.org/core/ Zhuk, Daniel Prieto-Alhambra, and Patrick Ryan. product/identifier/S1047198700012997/ Deep phenotyping of 34,128 adult patients hos- type/journal_article. pitalised with COVID-19 in an international net- work study. Nature Communications, 11(1), Oc- Toby Dylan Hocking. WeightedROC: Fast, Weighted tober 2020. ISSN 2041-1723. doi: 10.1038/ ROC Curves, February 2020. URL https://CRAN. s41467-020-18849-z. URL https://www.nature. R-project.org/package=WeightedROC. com/articles/s41467-020-18849-z. Graham Kalton and Ismael Flores-Cervantes. Weighting methods. 19(2), 2003. Tianqi Chen and Carlos Guestrin. XGBoost: A Scalable Tree Boosting System. In Proceedings Gilaad G. Kaplan and Joseph W. Windsor. The of the 22nd ACM SIGKDD International Con- four epidemiological stages in the global evolu- ference on Knowledge Discovery and Data Min- tion of inflammatory bowel disease. Nature Re- ing, KDD ’16, pages 785–794, New York, NY, views Gastroenterology & Hepatology, 18(1):56–66, USA, August 2016. Association for Computing January 2021. ISSN 1759-5053. doi: 10.1038/ Machinery. ISBN 978-1-4503-4232-2. doi: 10. s41575-020-00360-x. URL https://www.nature. 11
Estimating Model Performance on External Samples com/articles/s41575-020-00360-x. Number: 1 female patients newly diagnosed with atrial fibril- Publisher: Nature Publishing Group. lation. BMC Medical Research Methodology, 20(1): 102, May 2020. ISSN 1471-2288. doi: 10.1186/ Jenna L. Koliani-Pace and Corey A. Siegel. Prog- s12874-020-00991-3. URL https://doi.org/10. nosticating the Course of Inflammatory Bowel 1186/s12874-020-00991-3. Disease. Gastrointestinal Endoscopy Clinics of North America, 29(3):395–404, July 2019. Jenna M. Reps, Chungsoo Kim, Ross D. Williams, ISSN 1052-5157. doi: 10.1016/j.giec.2019.02. Aniek F. Markus, Cynthia Yang, Talita Duarte- 003. URL https://www.sciencedirect.com/ Salles, Thomas Falconer, Jitendra Jonnagad- science/article/pii/S1052515719300133. dala, Andrew Williams, Sergio Fernández-Bertolı́n, Scott L. DuVall, Kristin Kostka, Gowtham Rao, OHDSI. The Book of OHDSI: Observational Health Azza Shoaibi, Anna Ostropolets, Matthew E. Data Sciences and Informatics. OHDSI, 2019. Spotnitz, Lin Zhang, Paula Casajust, Ewout W. ISBN 978-1-08-885519-5. URL https://books. Steyerberg, Fredrik Nyberg, Benjamin Skov Kaas- google.co.il/books?id=JxpnzQEACAAJ. Hansen, Young Hwa Choi, Daniel Morales, Siaw- Teng Liaw, Maria Tereza Fernandes Abrahão, Car- Tetsu Ohnuma and Shigehiko Uchino. Prediction los Areia, Michael E. Matheny, Kristine E. Lynch, models and their external validation studies for Marı́a Aragón, Rae Woong Park, George Hripcsak, mortality of patients with acute kidney injury: Christian G. Reich, Marc A. Suchard, Seng Chan a systematic review. PLoS One, 12(1):e0169341, You, Patrick B. Ryan, Daniel Prieto-Alhambra, 2017. and Peter R. Rijnbeek. Implementation of the COVID-19 Vulnerability Index Across an Interna- Martina Recalde, Elena Roel, Andrea Pistillo, An- tional Network of Health Care Data Sets: Collab- thony G. Sena, Albert Prats-Uribe, Waheed-Ul- orative External Validation Study. JMIR Med- Rahman Ahmed, Heba Alghoul, Thamir M. Al- ical Informatics, 9(4):e21547, April 2021. doi: shammari, Osaid Alser, Carlos Areia, Edward 10.2196/21547. URL https://medinform.jmir. Burn, Paula Casajust, Dalia Dawoud, Scott L. Du- org/2021/4/e21547. Vall, Thomas Falconer, Sergio Fernández-Bertolı́n, Asieh Golozar, Mengchun Gong, Lana Yin Hui Lai, Dominik Rothenhäusler, Nicolai Meinshausen, Pe- Jennifer C. E. Lane, Kristine E. Lynch, Michael E. ter Bühlmann, and Jonas Peters. Anchor re- Matheny, Paras P. Mehta, Daniel R. Morales, gression: Heterogeneous data meet causality. Karthik Natarjan, Fredrik Nyberg, Jose D. Posada, Journal of the Royal Statistical Society: Se- Christian G. Reich, Peter R. Rijnbeek, Lisa M. ries B (Statistical Methodology), 83(2):215–246, Schilling, Karishma Shah, Nigam H. Shah, Vi- 2021. ISSN 1467-9868. doi: 10.1111/rssb. gnesh Subbian, Lin Zhang, Hong Zhu, Patrick 12398. URL https://onlinelibrary.wiley. Ryan, Daniel Prieto-Alhambra, Kristin Kostka, com/doi/abs/10.1111/rssb.12398. and Talita Duarte-Salles. Characteristics and outcomes of 627 044 COVID-19 patients living Marios Sagris, Emmanouil P. Vardas, Panagio- with and without obesity in the United States, tis Theofilis, Alexios S. Antonopoulos, Evangelos Spain, and the United Kingdom. International Oikonomou, and Dimitris Tousoulis. Atrial Fib- Journal of Obesity, 45(11):2347–2357, Novem- rillation: Pathogenesis, Predisposing Factors, and ber 2021. ISSN 1476-5497. doi: 10.1038/ Genetics. International Journal of Molecular Sci- s41366-021-00893-4. URL https://www.nature. ences, 23(1):6, December 2021. ISSN 1422-0067. com/articles/s41366-021-00893-4. doi: 10.3390/ijms23010006. URL https://www. ncbi.nlm.nih.gov/pmc/articles/PMC8744894/. Jenna M. Reps, Ross D. Williams, Seng Chan You, Thomas Falconer, Evan Minty, Alison Callahan, Daniel E. Singer, Yuchiao Chang, Leila H. Borowsky, Patrick B. Ryan, Rae Woong Park, Hong-Seok Margaret C. Fang, Niela K. Pomernacki, Natalia Lim, and Peter Rijnbeek. Feasibility and evalu- Udaltsova, Kristi Reynolds, and Alan S. Go. A new ation of a large-scale external validation approach risk scheme to predict ischemic stroke and other for patient-level prediction in an international data thromboembolism in atrial fibrillation: the ATRIA network: validation of models predicting stroke in study stroke risk score. Journal of the American 12
Estimating Model Performance on External Samples Heart Association, 2(3):e000250, June 2013. ISSN Joseph W. Windsor and Gilaad G. Kaplan. Evolv- 2047-9980. doi: 10.1161/JAHA.113.000250. ing Epidemiology of IBD. Current Gastroenterology Reports, 21(8):40, July 2019. ISSN 1534-312X. doi: Ewout W. Steyerberg and Frank E. Harrell. Pre- 10.1007/s11894-019-0705-6. diction models need appropriate internal, internal- external, and external validation. 69:245–247, Andrew Wong, Erkin Otles, John P. Donnelly, 2016. ISSN 0895-4356. doi: 10.1016/j.jclinepi. Andrew Krumm, Jeffrey McCullough, Olivia 2015.04.005. URL https://www.ncbi.nlm.nih. DeTroyer-Cooley, Justin Pestrue, Marie Phillips, gov/pmc/articles/PMC5578404/. Judy Konye, Carleen Penoza, Muhammad Ghous, and Karandeep Singh. External Validation of a Adam J. Streeter, Nan Xuan Lin, Louise Crathorne, Widely Implemented Proprietary Sepsis Predic- Marcela Haasova, Christopher Hyde, David tion Model in Hospitalized Patients. JAMA In- Melzer, and William E. Henley. Adjusting for un- ternal Medicine, 181(8):1065–1070, August 2021. measured confounding in nonrandomized longitu- ISSN 2168-6106. doi: 10.1001/jamainternmed. dinal studies: a methodological review. 87:23–34, 2021.2626. URL https://doi.org/10.1001/ 2017. ISSN 0895-4356. doi: 10.1016/j.jclinepi.2017. jamainternmed.2021.2626. 04.022. URL https://www.sciencedirect.com/ science/article/pii/S0895435616303341. Adarsh Subbaswamy, Peter Schulam, and Suchi Appendix A. Model-dependent Saria. Preventing Failures Due to Dataset optimization scheme Shift: Learning Predictive Models That Trans- port. In Proceedings of the Twenty-Second In- An upper bound of a model m’s weighted loss l, up ternational Conference on Artificial Intelligence to a finite sample error, can be derived as follows: and Statistics, pages 3118–3127. PMLR, April X 2019. URL https://proceedings.mlr.press/ max wi · l(m(xi ), yi ). w∈W(µ,Z) v89/subbaswamy19a.html. ISSN: 2640-3498. i Adarsh Subbaswamy, Roy Adams, and Suchi Saria. The tightness of the bound may depend on the Evaluating Model Robustness and Stability to number of expectations we consider. Furthermore, as Dataset Shift. In Arindam Banerjee and Kenji z, and consequently µ, may not represent all inter- Fukumizu, editors, Proceedings of The 24th Inter- feature dependencies existing in the data, an addi- national Conference on Artificial Intelligence and tional constraint may yield improved estimations: Statistics, volume 130 of Proceedings of Machine X Learning Research, pages 2611–2619. PMLR, 13– max wi · l(m(xi ), yi ) − λDf (wk1/n). (4) w∈W(µ,Z) i 15 Apr 2021. URL https://proceedings.mlr. press/v130/subbaswamy21a.html. As we increase λ, the bound may become tighter but Hendrika A. van den Ham, Olaf H. Klungel, Daniel E. confidence may decrease. Singer, Hubert G. M. Leufkens, and Tjeerd P. van Staa. Comparative Performance of ATRIA, Appendix B. Model-independent dual CHADS2, and CHA2DS2-VASc Risk Scores Pre- optimization problem dicting Stroke in Patients With Atrial Fibrillation: Results From a National Primary Care Database. Recall that optimization Problem (2) is defined as Journal of the American College of Cardiology, 66 follows: (17):1851–1859, October 2015. ISSN 1558-3597. doi: 10.1016/j.jacc.2015.08.033. minimizew − H(w) (5) such that Z > w = µ, 1> w = 1 Yoav Wald, Amir Feder, Daniel Greenfeld, and Uri Shalit. On Calibration and Out-of-domain Gen- where w ≥ 0. Denoting eralization. arXiv:2102.10395 [cs], January 2022. > URL http://arxiv.org/abs/2102.10395. arXiv: Z µ C= , d= , (6) 2102.10395. 1> 1 13
Estimating Model Performance on External Samples Problem (2) becomes: minimizew − H(w) (7) such that C > w = d Following Equation 5.11 in Boyd et al. (2004) the dual function is: g(ν) = −d> ν − (−H)∗ (−C > ν) where (−H)∗ is the conjugate of the negative-entropy function (Boyd et al. (2004), p. 222): n X (−H)∗ (y) = eyi −1 i=1 Therefore, n X g(ν) = −(µ, 1)> ν − e−1 e−(zi ,1)ν i=1 The Lagrangian of the primal problem is: X L(w; ν) = wi log wi + ν > (Cw − d) (8) i Let ν ∗ be the optimal solution of maxν g(ν). Then, following Section 5.5.3 of Boyd et al. (2004), the solu- tion of the primal problem minimizes the Lagrangian at ν ∗ : ∂L(w; ν ∗ ) = log wi + 1 + (z i , 1) ν ∗ = 0 ∂wi giving ∗ wi = e−1−(zi ,1)ν . This result shows that the optimal weights are nor- malized exponents of a linear function of the data points. 14
Estimating Model Performance on External Samples Appendix C. Supplementary Figures (a) σX,AH = 0 internal (b) σX,AH = 0 external (c) σX,AH = 0.5 internal (d ) σX,AH = 0.5 external (e) σX,AH = 1 internal (f ) σX,AH = 1 external Figure 6: Simulation examples with varying values of σX,AH . Dot colors denote outcome class, diamonds represent class means. The shift in correlation between X1 and X2 , given an outcome class, increases with σX,AH . 15
You can also read