Abstract
Clinical machine learning applications are often plagued with confounders that can impact the generalizability and predictive performance of the learners. Confounding is especially problematic in remote digital health studies where the participants self-select to enter the study, thereby making it challenging to balance the demographic characteristics of participants. One effective approach to combat confounding is to match samples with respect to the confounding variables in order to balance the data. This procedure, however, leads to smaller datasets and hence impact the inferences drawn from the learners. Alternatively, confounding adjustment methods that make more efficient use of the data (e.g., inverse probability weighting) usually rely on modeling assumptions, and it is unclear how robust these methods are to violations of these assumptions. Here, rather than proposing a new approach to control for confounding, we develop novel permutation based statistical methods to detect and quantify the influence of observed confounders, and estimate the unconfounded performance of the learner. Our tools can be used to evaluate the effectiveness of existing confounding adjustment methods. We illustrate their application using real-life data from a Parkinson's disease mobile health study collected in an uncontrolled environment.
Introduction
In the burgeoning field of digital health, researchers increasingly rely on smartphone sensors and remote monitoring to collect large-scale clinical datasets. However, these studies often suffer from significant "self-selection" bias. For instance, in a study investigating Parkinson’s disease (PD) through gait analysis, the cohort of individuals with PD might be systematically older than the healthy control group.
If a machine learning model is trained on such data, it risks becoming a "confounder detector" rather than a disease detector. A model might achieve high accuracy simply by identifying the age or gender of the participant rather than the subtle tremors associated with PD. This phenomenon, known as confounding, leads to models that perform exceptionally well on biased training data but collapse when deployed in balanced, real-world populations. While techniques like matching or Inverse Probability Weighting (IPW) exist to mitigate this, researchers have lacked a rigorous statistical framework to quantify exactly how much a model's performance is driven by confounding variables.
Methodology: Restricted Permutations
To address this diagnostic gap, we propose a framework based on Restricted Permutations. In a standard permutation test, labels (e.g., "Control" vs. "PD") are shuffled randomly across the entire dataset to establish a null distribution of performance. Our approach shuffles labels only within specific levels or "buckets" of the confounding variable.
By shuffling within groups (e.g., shuffling labels among only young participants, then separately among senior participants), we destroy the direct link between the features and the disease while preserving the statistical link between the confounder and the disease. If a model still achieves better-than-random performance on this restricted null data, it provides definitive proof that the model is leveraging the confounding signal.
Furthermore, we developed a formula to map observed performance (such as AUC) back to a theoretical "unconfounded" value. This allows for a formal hypothesis test ($H_0$: the algorithm has not learned the confounding signal) and provides researchers with an estimate of the model's true utility in a balanced population.
Key Results and Application
We applied this framework to data from the mPower study, a large-scale remote PD study. We analyzed features extracted from smartphone inertial sensors during 30-second walking tasks.
Baseline Bias and Model "Cheating"
Initial results showed that both Logistic Regression and Random Forest models appeared to perform excellently, with AUCs exceeding 0.81. However, our restricted permutation test revealed heavy reliance on age and gender. The "unconfounded" AUC was estimated to be significantly lower, approximately 0.66. As shown in the figure below, the restricted null distribution (blue histogram) for unadjusted models is shifted far to the right of the standard null (red curve), indicating a strong confounding signal available for the models to exploit.
Evaluating Adjustment Methods
Our framework allowed us to evaluate the effectiveness of common adjustment strategies:
- Matching: By balancing the groups (discarding data to ensure age/gender parity), we successfully removed confounding (p-values > 0.5). However, this resulted in much smaller datasets and wider confidence intervals.
- Approximate IPW: While IPW is intended to weight samples to simulate a balanced population, our tests showed it often fails to fully eliminate confounding (p < $10^{-16}$). This suggests that the weighting models (often simple logistic regressions) may not capture the complex, non-linear ways machine learning models like Random Forests exploit confounders.
Discussion and Limitations
The location of the restricted null distribution serves as a direct measure of the "confounding signal" present in a dataset. Our findings highlight that IPW is a fragile method that relies heavily on the accuracy of the underlying propensity model.
A key limitation of the restricted permutation method is its reliance on categorical or ordinal confounders. When dealing with continuous variables like age, the granularity of discretization is critical; we found that using too few age groups (e.g., just "young" vs. "old") can lead to underestimating the bias. Future work will focus on expanding this diagnostic framework to evaluate a broader range of adjustment methods and applying it to other domains where self-selection bias is prevalent.
Summary updated