Abstract
Identifying features that interact to trigger disease, while accounting for heterogeneity across diverse populations, is essential for the development of precision and targeted medicine. Despite the availability of vast and complex health-related datasets, most existing works focus on identifying disease-associated features at the population level or within a few subpopulations, often overlooking individual-level heterogeneity within these groups. To address this limitation, we propose a novel framework that utilizes localized test statistics to identify disease-associated features tailored to individual profiles. Our method leverages the recently developed knockoffs methodology to control the noise level of the selection set so that the results are replicable. Moreover, it allows for the discovery of hidden heterogeneous effects within the data, as demonstrated in an application to single-cell RNA sequencing data for Alzheimer’s disease. By aggregating localized feature selection results, our framework also enables powerful population-level feature selection. Our framework provides a powerful tool for exploratory studies of precision medicine, offering the potential to generate novel hypotheses for confirmatory biological experiments.
Keywords: Precision medicine, localized feature selection, explainable artificial intelligence, false discovery rate, replicability, knockoffs
1. Introduction
Tailoring treatments to patients based on their individual characteristics is a key goal in medical practice. To achieve this goal, one main theme in precision medicine is identifying features that interact to trigger a disease cascade while taking patient heterogeneity into account. The discoveries can provide mechanistic insights and potentially lead to the development of personalized therapy that delivers the optimal treatment to the right patient at the right time.
To date, most studies that tackle heterogeneity focus on the identification of disease-associated features at the level of discrete subpopulations, such as those defined by age, sex, and population ancestry 1-5. However, ignoring heterogeneity within each category can induce significant bias. For example, using self-reported ancestry as a genetic category overlooks the continuous nature of genetic ancestries, which may lead to misleading conclusions, particularly for individuals with uncommon admixed ancestry proportions 6-9. The recent discovery that polygenic score accuracy varies across the continuum of genetic ancestry also highlights the need to shift from discrete genetic ancestry clusters to a continuum of genetic ancestries 10.
Compared to feature selection at the population level, most applications can benefit more from “localized feature selection”. In medical contexts, localized feature selection enables the discovery of disease-associated features tailored to individual profiles or to subgroups derived from high-dimensional data. In the machine learning literature, various localized feature importance scores have been developed to quantify the effect of a feature on the disease outcome in a sophisticated model, referred to as explainable artificial intelligence (XAI), including but not limited to gradient backpropagation methods (e.g. gradients, integrated gradients, expected gradients) and “explaining by removing” methods (e.g. SAGE, SHAP, LIME). While those importance scores do characterize relative localized importance of features, they do not provide a feature selection set with error rate control, which is required for reproducible science.
The framework we introduce in this paper enables localized selection of features whose “importance” may vary across different samples. By leveraging nonlinear models, we construct localized test statistics that utilize information from the entire study sample while emphasizing relationships between explanatory variables and the outcome within a neighborhood of the covariate space. We leverage the recently developed knockoffs methodology to control the noise level of the selection set, improving the replicability of results. Examining how selection sets derived from these test statistics vary across the study sample can uncover hidden population substructures. Moreover, by computing these localized test statistics on new feature values, we can assess feature importance specific to new observations.
Our framework is based on model-X knockoffs 11, a procedure that performs feature selection with rigorous error rate control in high-dimensional settings. Unlike classical approaches that select important features through stagewise model fitting 12-15 or regularization 16-20, model-X knockoffs generates a set of features, called knockoffs, which serve as negative controls. These knockoffs are designed to be statistically indistinguishable from the corresponding original features and are constructed without reference to the response. This, combined with almost any feature importance scores and the knockoffs filter 11, allows the analyst to identify important variables with FDR control. Like model-X knockoffs, our framework is also compatible with a large class of machine learning algorithms, including generalized linear models, random forests, and neural networks with symmetric structures. It can also flexibly integrate recent advances in explainable artificial intelligence (XAI), which provide novel localized feature importance scores to understand the features that drive the predictions. By aggregating the localized scores derived from knockoffs, our method allows for powerful selection of otherwise unrecognized population features. We also develop a derandomization strategy that aggregates selection sets obtained from multiple runs to further improve replicability of the feature selection. The advantages of our framework are demonstrated through various simulations and an application to single-cell RNA sequencing data for Alzheimer’s disease, where applying our procedure manages to identify cell subtypes with different gene importance patterns, which cannot be distinguished by unsupervised embeddings using the feature matrix. This is of note since differential properties and behaviors across cellular subtypes within cell populations are receiving increasing recognition within the context of AD pathology progression 21.
2. Results
A. Overview of the proposed localized feature selection
Consider a dataset that contains individuals, where and represent the features and the response of the -th individual, respectively (). Our goal is to select key features related to the outcome, recognizing that their importance may differ across samples. Specifically, for a given vector of feature values , we aim to find a subset of features that are associated with the outcome while making sure that the error rate is less than a predefined level.
Although various XAI methods have been developed to assess feature contributions (e.g. gradients, SAGE, SHAP, LIME), they often struggle with valid statistical inference and error rate control, hindering replicability. To address this, we adapt model-X knockoffs (11), a method that can filter out unwanted noise in the feature importance and rigorously controls the FDR of the selection set . Figure 1 summarizes the workflow of our proposed method.
Figure 1:
Graphical illustration of the proposed localized feature selection workflow.
For each feature, we construct a set of knockoff data consisting of a set of synthetic controls (Figure 1 (b)). Both the original and knockoff data are input into a machine learning method (Figure 1 (c)). Knockoffs serve as control features during training and subsequently help identify variables that truly explain the response variable.
Once the model is fitted, we use feature importance scores to measure each feature's localized contribution to the response compared to its knockoff copy. A knockoff filter selects features with controlled errors at different target FDR threshold values (e.g. 10%, 20%; Figure 1 (d)). The results across all data points are summarized as an augmented selection matrix (Figure 1 (e)). This matrix can be used in downstream exploratory analyses to uncover hidden data structures. Our framework also supports powerful population feature selection by aggregating localized inference results.
We describe the details, including mathematical formulation, construction of knockoffs, model fitting, localized feature importance calculation, feature selection, and derandomization (knockoffs are randomly generated) in the Method Section (Section 3).
B. Localized feature selection reveals heterogeneous effects
Description of the dataset
We apply our framework to a single-cell RNA sequencing data (scRNA-seq) collected and preprocessed by Stanford/VA/NIA Aging Clinical Research Center (ACRC) 22. This dataset includes single-nucleus transcriptomes from 143,793 cells derived from the hippocampal regions of 17 individuals (8 controls and 9 AD cases) and the cortical regions of 8 individuals (4 controls and 4 AD cases, a subset of the 17 above). For each cell, the scRNA-seq data records transcriptome counts for 23,537 genes. Given the critical role of the microglia cell type in neuroinflammation and its potential involvement in AD pathology 23, 24, we focus on 3,373 microglia, with 2,526 derived from the hippocampus and 847 from the cortex. We then remove genes that are rarely expressed in microglia by filtering out all genes with no more than 5% nonzero counts, resulting in a transcriptome count data for genes across cells. For the -th cell, we define the response as 1 if the cell comes from an AD case and 0 otherwise, resulting in 2,231 AD cells and 1,142 control cells. The goal of this analysis is to characterize heterogeneous effect of genes on AD at individual cell level and uncover hidden patterns in the data. The number of microglia from each individual and brain region is provided in Supplementary Table 1.
Implementation of the method
We first construct knockoffs and apply stringent quality control to ensure that the knockoffs obey the exchangeability property, i.e. they are statistically indistinguishable from the original features (see Section S1.A for details).11,25 After generating knockoffs , we construct localized test statistics by fitting a quadratic regression model between and the concatenated data matrix as detailed in Section 3.C and Section S1.B of the supplementary material.
To enhance the stability and replicability of the analysis, we implement the derandomization strategy described in Section 3.E. Specifically, we perform runs of our procedure with a target FDR level , using the quadratic model (S1) with transcriptome counts of the 2,955 genes, batch indices (a categorical feature with 4 levels), and the original region (a categorical feature with 2 levels) of the cells as features. To assess the benefit of employing a quadratic model over a linear model, we compare the average cross-validation of the fitted quadratic model (0.4011) with the average cross-validation of the fitted lasso linear model (0.3260) over runs. The quadratic model explains 23% more variance in the response , suggesting the presence of nonlinear relations between gene expressions and AD. For each cell , we compute the derandomized selection set and the population-level selection set according to the procedures described in Sections 3.C to 3.E. We generate the augmented selection matrix (as defined in Section 3.E) across all microglia. The genes selected in and their inclusion rates are presented in Supplementary Table 2. To quantify the stability of the sets and , we reapply our procedure with the derandomization strategy for another 30 runs and compute the average Jaccard similarity of and across these runs. As shown in Supplementary Figure 6, the average Jaccard similarities for most exceeds 0.9, while the average Jaccard similarity of reaches 0.909, demonstrating the stability of our method in analyzing the scRNA-seq data.
UMAP analysis of augmented selection matrix vs. existing alternatives
We further analyze the augmented selection matrix , computed as described in Section 3.E, to uncover potential subgroup structures. Specifically, we perform the UMAP (Uniform Manifold Approximation and Projection 39) transformation on and apply -means clustering () on the UMAP embeddings of the 3,373 cells. The UMAP embeddings are displayed in Figure 2 (c). The results reveal a discrete clustering pattern among microglia with at least six distinct groups. We further annotated the cells by their brain regions and found that, without pre-specifying subpopulations, the method discovered that groups 1 and 2 consist exclusively of cortex cells, while groups 3–6 consist exclusively of hippocampus cells. Notably, this separation may reflect differential AD progression established between the two brain regions 21, 26, 27 and is not apparent in the UMAP embeddings of the 3,373 cells using either the original data matrix (Figure 2 (a)) or the knockoff feature importance scores (Figure 2 (b)) as input. While previous studies have identified regional neuronal populations purely via transcriptomic data28-32, this is a novel separation of microglia without pre-hoc information about brain region. This demonstrates that our localized feature selection approach can uncover a distinct and previously hidden clustering structure among microglia.
Figure 2.
(a) UMAP embeddings generated from the data matrix . (b) UMAP embeddings generated from the matrix of localized feature importance scores. (c) UMAP embeddings generated from the augmented selection matrix . (d) Heatmap of the augmented selection matrix , where a light blue grid at the -th row and -th column indicates that .
Exploring analysis results to generate novel scientific hypotheses
Based on the six identified groups, we rearrange the indices of cells according to their group labels and visualize the augmented selection matrix in Figure 2 (d). For better exposition, we present the 56 genes that are included in at least one localized selection set . It is clear that the localized selection sets differ for cells in different groups. Comparing groups 1 and 2 (from the cortex region) with groups 3, 4, 5 and 6 (from the hippocampus region), we observe distinct gene effects for genes such as PCDH9, FLT1, BSG, EGFL7, and transcript FP671120. Interestingly, PCDH9 is reflective of a higher AD feature importance in hippocampal cells than in cortical cells, which agrees with Chen et al 33 who found a PCDH9high microglial subtype that predominantly localized to the hippocampus, having isolated both brain regions separately. Further Chen et al tested the differential expression of these PCDH9high microglia in cortex versus hippocampus and found upregulation of BSG expression in the cortex echoing its higher feature importance in our group 1 & 2 cortical data. Additionally, Young et al 34 had previously identified a FLT1 expressing microglial subtype, associated with cell proliferation and chemotaxis, though they lacked a hippocampal sample for direct comparison.
Even among cells within the same brain region, our method identifies heterogeneous gene effect patterns that are unrecognized by other approaches. For example, although both groups 1 and 2 are from the cortex, our method reveals that the AD feature importance of VTI1A strongly discriminates group 2 cells. VTI1A plays an important role in glial and synaptic vesicular signaling 35, and GWAS loci for VTI1A have been associated with increased glioma risk 36, suggesting possible functional role for this group 2 cortical microglia subpopulation that is AD-relevant. Distinctions among subpopulations 3, 4, 5 and 6 are also evident based on the differential AD feature importance of PKM, a known marker of microglia activation 37, 38. These findings illustrate that our localized feature selection method effectively identifies biologically relevant gene effects in plausible subpopulations of microglia that can be used to further stratify and investigate AD-relevant changes not apparent via conventional transcriptomic analysis without pre-hoc knowledge of regional or functional groupings.
C. Simulation studies
To evaluate the performance of the proposed localized feature selection framework, we conduct extensive simulations to demonstrate:
The FDR control of both the localized selection and the population-level selection.
The ability of the localized selection sets to capture heterogeneous effects.
The power enhancement of the population-level selection by aggregating localized test statistics compared to feature selection based on a linear model.
The improved replicability by derandomizing the selection set.
We simulate features of each individual from the multivariate normal distribution
To emulate the inclusion of demographic covariates that contribute to the heterogeneity of real genomic data, we further simulate three independent features
to mimic two ancestry categories (European American, EUR, if and African American, AFA, if , two sex categories (male if and female if ), and age (equals ). Throughout all simulation experiments, we generate the response from
where is independent of everything else.
We consider four scenarios to investigate the impact of different effect sizes attributed to the covariates (, , ) on the performance of localized feature selection:
Scenario 1: ;
Scenario 2: ;
Scenario 3: ;
Scenario 4: .
By doing so, we simulate scenarios in which features have a stronger impact on the response in certain groups compared to others. For example, scenario 1 highlights the impact of ancestry and sex on the heterogeneity of genetic variants’ contributions to the variation of , while scenario 2 focuses on the age-dependent genetic effect. Throughout all four scenarios, we let 20 randomly selected entries of be 0.38 or −0.38 with equal probability and set the remaining entries to 0. For each scenario, keeping the parameter values fixed, we simulate independently 100 replicates of the dataset , each with a sample size of 1000. We then perform localized feature selection over the features on these datasets. For a comprehensive investigation of how localized selection set captures effect heterogeneity across different neighborhoods, we compute for 2000 evaluation points () in the sample space across all 100 replicates.
D. Simulation results: localized feature selection
We first investigate the performance of our method in controlling FDR and identifying important features under different scenarios. After generating knockoffs , we construct localized test statistics by fitting a quadratic regression model between and the concatenated data matrix as detailed in Section S1.B of the supplementary material. Specifically, for each localized selection set corresponding to an evaluation point , we report the average across 100 replicates of the following quantities:
where are the conditional independence hypotheses:
where records all features except . A non-null means that the -th feature has predictive power beyond that afforded by all the other features. is derived with a target FDR level of . Figure 3 presents the empirical FDR and power of the localized selection sets under different scenarios, where each point corresponds to for one of the 2,000 evaluation points. Under all 4 scenarios, the empirical FDR of all the are under the target level , which validates the FDR control of localized selection sets. Moreover, there are varying patterns in the power of across different scenarios. As shown in Figure 3 (a), under scenario 1, the power of varies among different ancestry and gender profiles (, ) while remaining consistent with respect to age. This is because the impact of an important feature on the response is most significant for AFA women, indicating strong localized evidence against null hypotheses. In contrast, for EUR men (with ), the variation of does not affect the response , resulting in no localized evidence against false hypotheses and, consequently, neglectable power. Under scenario 2, where only age () determines the strength of localized evidence against , Figure 3 (b) shows that the power of varies across individuals of different ages, while no significant power difference exists among different profiles of ancestry and gender profiles (, ). Unlike EUR men (with ), who had no localized evidence against under scenario 1, weak localized evidence against still exists in neighborhoods of where close to 0.2, resulting in non-zero power for the corresponding . Figure 3 (c) presents the power of under scenario 3, where all three covariates impact the strength of localized evidence against false , with larger values of , , corresponding to stronger localized evidence. As with scenarios 1 and 2, the power of is higher for elder AFA women (with and a large ). In scenario 4, shown in Figure 3 (d), where there is no heterogeneity in localized evidence against false among different individuals, the power of does not differ significantly among different .
Figure 3.
Average (across 100 replicates) power and FDP of the localized selection sets (with respect to the target FDR level ) for each of the 2000 evaluation points across the four scenarios. Each dot corresponds to one and it is colored according to the value of the ancestry and sex feature in .
The patterns observed under different scenarios are also reflected in the UMAP visualizations shown in Figure 4. Specifically, we use the augmented selection matrix, obtained by concatenating the augmented selection vectors of the 2000 evaluation points from one replicate, as the input to the UMAP algorithm. Points are colored according to the values of age, ancestry, and sex feature, with different color mappings used in the two displays. In Figure 4 (a), the of different ancestry and gender profiles are clearly separated in the projections, while in Figure 4 (b), the projections align according to age. Scenario 3 (Figure 4 (c)) demonstrates separation based on ancestry, gender, and age, whereas in scenario 4 (Figure 4 (d)), projections of all are well-mixed, consistent with the results in Figure 3. This distinct alignment of UMAP projections suggests that our procedure effectively captures the driving factors of effect heterogeneity.
Figure 4.
UMAP visualization of the augmented selection vectors from one replicate under different scenarios. The upper panel of each subfigure is colored according to ancestry and gender profiles (, ), while the lower panel is colored according to whether the age exceeds 60 (the mean and median of age).
E. Simulation results: population-level feature selection
In addition to generating the localized feature selection sets , our framework also facilitates powerful population-level feature selection by aggregating the localized inference results, as introduced in Section 3.D. Specifically, by summing up from different evaluation points , we effectively summarize evidence against the nulls while accounting for heterogeneous patterns and varying strengths. To illustrate this, we visualize the empirical power and FDR associated with:
, obtained by aggregating across all evaluation points;
, obtained by aggregating across all evaluation points corresponding to EUR men under 60 (, );
, obtained by aggregating across all evaluation points corresponding to AFA women aged above 60 (, );
under different scenarios in Figure 5. For comparison, we also include the empirical power and FDR curves of (obtained via the model-X knockoff filter using the lasso coefficient difference statistic).
Figure 5.
Empirical power and FDR of , obtained by aggregating localized test statistics corresponding to various subsets of evaluation points, under different scenarios.
As shown in S1.D, provided that the subgroups are defined prior to observing the data, all these population selection sets are separately equipped with FDR control. In the first three scenarios, shows superior power to , indicating the advantage of aggregating localized evidence against the false by accounting for individual heterogeneity. Moreover, demonstrates greater power than in the first three settings, which aligns with Figure 3 where of old AFA women exhibited the highest power due to strong localized evidence against the false , whereas young EUR men had the lowest power. Additionally, the power of is comparable to , suggesting that old AFA women have dominating localized evidence against the false . In contrast, generally shows lower power than and has zero power in scenario 1, where there is no localized evidence against the false for young EUR men. In scenario 4, where no subpopulation heterogeneity exists, we observe no significant difference across the power curves.
F. Simulation results: replicability analysis
In this section, we demonstrate how the strategy proposed in Section 3.E enhances the replicability of our method. Along with assessing replicability of our method to return consistent localized selection sets for the same across similar training datasets, we also evaluate the stability of the method by examining its ability to produce stable selection sets across multiple runs on the same training dataset.
For each training dataset of size generated under Scenario 3 from Section 2.C, we implement our procedure, with and without derandomization, 50 times to compute localized feature selection sets for 1000 evaluation points as in Section 2.D. To measure replicability, we compute the average Jaccard similarity of both individual- and population-level selection sets obtained across single runs on the different training datasets (denoted by , , and for individual- and population-level, with and without derandomization, respectively). Similarly, we also measure stability across multiple runs on the same training datasets (denoted by , , , and ). Details on the computation of Jaccard similarities are provided in Section S1.G.
As shown in Figure 6 (a), the proposed replicability-enhancing strategy significantly improves the stability of selection sets produced by the localized feature selection method. Without derandomization, the values are below 0.4 for most localized selection sets, indicating considerable variability in inference results due to the randomness of knockoffs generation. In contrast, with runs and the inclusion-rate-based derandomization strategy introduced in Section 3.E, the values mostly exceed 0.8, reflecting much higher stability. A similar improvement in stability is observed for the population selection set from to , which is higher than most localized selection sets.
Figure 6.
Empirical comparisons between selection sets obtained with (horizontal axis) and without (vertical axis) derandomization across different evaluation measures under the target FDR level 0.10.
Figure 6 (b) further illustrates the enhanced replicability of inference results. Without derandomization, most values are below 0.2, with none exceeding 0.6. In contrast, nearly all values surpass 0.2, with half exceeding 0.6. The population selection set shows a similar improvement, with increase from to , which is higher than most of localized selection sets.
In addition to the improvements in stability and replicability, specific patterns emerge with respect to demographic features. Among the population, localized selection sets for evaluation points with and a large , which correspond to higher power, are the most stable and replicable. In contrast, localized selection sets for evaluation points with and a small exhibit the lowest stability and replicability. This is reasonable as high power of localized selection sets suggests that more important features are consistently selected, leading to both greater stability and replicability.
Finally, Figures 6 (c) and 6 (d) demonstrate that derandomization also improves power at both the individual and population levels while maintaining FDR control at the target level 0.10. This is due to a reduced chance of missing important features across multiple runs, increasing their inclusion in the derandomized selection set.
3. Methods
A. Setting
Consider a dataset that contains individuals, where and represent the features and the response of the -th individual, respectively (). The evaluation of the conditional independence hypotheses below is employed for the selection of significant features.
| (Eq. 1) |
where records all features except . A non-null means that the -th feature has predictive power beyond that afforded by all the other features.
To test these hypotheses, we introduce localized test statistics in Section 3.C that assess the evidence against each , focusing on a neighborhood of the feature space around a given . We use these to construct a collection of rejection sets such that
This error rate control ensures that, on average, at least of the features discovered in are truly significant.
Aggregating the localized test statistics across all individuals in (see details in Section 3.D), i.e., () for , yields an overall discovery set that accounts for heterogeneous signals, such that
Both the localized and the aggregated test statistics are testing the same conditional independence hypotheses . To appreciate their different flavors and provide a prelude to our method, it is useful to think about the many possible departures from the null . If holds, then the distribution of remains unchanged regardless of the value of , implying that
for any given feature values . The localized test statistics, which characterize the localized importance of in a neighborhood of , are tailored to detect localized departures from the null based on an estimate of .
Since different feature values potentially result in different localized selection sets , we refer to this as localized feature selection, distinguishing it from the more commonly studied population feature selection that returns a common subset of features .
B. Localized feature importance scores
Building on the intuition from the previous section, a natural way of quantifying the localized importance of for the response in a neighborhood of is given by
Specifically, this gradient-based measure quantifies how much the expected response would change if the -th feature were perturbed. When (, ) follows a linear model, such a gradient-based measure is a constant throughout the whole population. When (, ) follows a non-linear model, this gradient-based measure is expected to vary across individuals and provide localized information of importance at different feature values. In a genomics example where denotes an outcome and the expression level of a gene, measures the expected rate of change in the outcome when regulating the expression of the gene. This value can be larger for some patients, suggesting that the same increment in the expression level may correspond to different rates of change.
In addition to the gradient, there exist other feature importance scores in the XAI literature that provide localized evidence against the . Examples include the Shapley value 40-42 and the estimated coefficient in localized surrogate models under the LIME framework 43, 44. These alternative feature importance scores can also be employed in our method.
C. Localized feature selection via model-X Knockoffs
Construction of knockoffs as synthetic controls
To perform localized feature selection via model-X knockoffs, the first step is to generate knockoffs that serve as a form of synthetic controls for the observed features . Following the definition in Candès et al. 11, are valid knockoffs of if the following two properties are satisfied: (a) conditional independence: , which states that provides no additional information on ; and (b) distributional exchangeability: the joint distribution of remains unchanged if any pair of columns and are swapped,
Here, the permutation swaps (the -th column of ) with (the -th column of ) for all . Specifically, property (a) is satisfied as long as only the covariate matrix is used when generating knockoffs . Property (b) implies that, with only the information from , the analyst cannot possibly distinguish from . Several approaches have been proposed in the literature for knockoff generation, including second-order knockoffs 11, hidden Markov model knockoffs 45, deep knockoff machines 46, Metropolized knockoff sampler 47, and intertwined probabilistic factors decoupling (IPAD) 25. In this article, we adopt the IPAD procedure to generate knockoffs with details provided in Section S1.A of the supplementary material.
According to property (b), and can only be distinguished via their associations with the response . Based on this interpretation, we can fit a machine learning model on the extended dataset to learn the associations of all and with the response . By comparing the importance of and , we can select a subset of important features for the response with FDR control. The above reasoning is correct and applies to almost any machine learning model used, as long as the generated knockoffs satisfy both properties (a) and (b) and the fitted machine learning model obeys some mild technical requirements detailed below.
Model fitting
Having knockoffs , the next step is to fit a machine learning model on the extended dataset to estimate the conditional expectation .
We then calculate the scores and that measure the importance of and to predict the response . However, to ensure that is a negative control for which is indistinguishable from when is true, the algorithm used to obtain the fitted model needs to be equivariant to any swapping operation applied on . That is to say, and have the same role in the algorithm , no matter whether the algorithm is deterministic or stochastic. The formal definition of this algorithmic symmetry is provided in Section S1.C of the supplementary material. Examples of model fitting methods satisfying this algorithmic symmetry property include fitting generalized linear models, random forests, neural networks in which and are treated symmetrically in the input layer. In Sections 2.B and 2.C, we employ a quadratic regression model detailed in Section S1.B of the supplementary material. We note that our procedure provably controls the FDR at the desired level regardless of the correctness of the fitted model, although a good model generally leads to higher power.
Localized feature selection
We follow the line of thinking in Section 3.B and use the gradient of at to assess the localized evidence against for an individual with features . For any differentiable fitted model , we use the absolute values of derivatives and to calculate the localized importance of and for the response , evaluated at . A detailed discussion about the choice of evaluation data value can be found in Supplementary Materials S1.C and S1.D. We then combine and into a localized test statistic
| (Eq. 2) |
Intuitively, as knockoffs are generated without using the information from , provides no additional information about beyond . Therefore, the gradient is expected to be small, while is expected to be around . As a result, if there is strong evidence against at , we expect to dominate and, therefore, to be large and positive; if is null, then we expect and to be similar. Formally, we show in Section S1.D of the supplementary material that the satisfy the coin-flip property (i.e., signs of for those true are i.i.d. coin flips conditional on all and signs of for those false 11). We apply the knockoff filter 11 on to obtain a subset of features that have strong evidence against at . In short, the procedure to obtain is summarized as follows.
Using the model fitted on the entire data and knockoffs,
Compute the localized importance score and its knockoff and at ;
Combine and into a localized test statistic ;
Under the target FDR level , apply the knockoff filter 11 on to obtain a subset of features that have strong evidence against at ,
As the gradient generally varies across different , implementing the above procedure for different individuals selects different subsets of features, all obeying FDR control at level , see Section S1.D of the supplementary material.
Remark: Here, the FDR control of applies to the hypotheses , which indicate whether each feature has any (conditional) influence on the response in the population. The localized test statistics provide a localized ranking of features based on their impact on in the neighborhood of within the sample space. Since generally varies with , it offers insights how the influence of important features on the response differs across regions of the input space.
In addition to the selection set , assigning priority scores to the features within is also crucial for real-world applications. For example, in designing personalized therapies, it is impractical to simultaneously target all important biomarkers for an individual due to safety or cost constraints. Instead, practitioners typically prioritize biomarkers in a decreasing order of importance. Motivated by this, we propose the augmented selection vector for a generic individual with feature values :
where each is a vector of covariates from the sample. Here, the -th component of is nonzero if and only if , and its value corresponds to the localized test statistic normalized by the maximum across the entire sample. The normalization ensures that no single feature dominates others in subsequent unsupervised analysis tasks. For a set of candidate feature values of interest , we compute the augmented selection matrix , formed by concatenating the augmented selection vectors for all . This matrix can then be used in downstream exploratory analyses to uncover hidden structure in the data.
D. Aggregating localized feature selection for population-level inference
Our framework can also be used in performing powerful population feature selection by aggregating localized inference results. For example, aggregating as
can provide an overall measure of evidence against . The selection set at the population level under the target FDR level can be obtained by applying the knockoff filter 11 to :
We show in Section S1.E of the supplementary material that the obey the coin-flip property and therefore controls the FDR at level . As the localized test statistic measures the strength of evidence against at , the localized feature importance aggregation can capture potential heterogeneous effects, thereby improving statistical power for selecting important features at the population level. In Section S1.E of the supplementary material, several other aggregation methods, including e-value-based aggregation 48 and inclusion-rate-based aggregation 49, are introduced. We recommend using the simple sum as the aggregation function, as it is the most straightforward and empirically powerful option, as demonstrated in Section S2.A.
Finally, we remark that localized feature importance aggregation can also be done at the level of subpopulations that are predefined prior to looking at the data. For example, if a study is interested in health disparity and would like to evaluate heterogeneous effects based on sex, one could aggregate the localized test statistics according to cohorts defined by sex and then apply the knockoff filter respectively.
E. Strategy to improve replicability
Our proposed method enables both localized and population-level feature selection with provable FDR control, ensuring enhanced replicability over existing methods, which generally lack control over the number or proportion of false positives. In this section, we provide an additional strategy to further improve the replicability of our method.
According to National Academies of Sciences, Engineering, and Medicine et al. 50 and Nichols el al. 51, replicability refers to the ability to draw consistent conclusions from replicate studies that use the same inference procedure and address the same scientific question on similar datasets. In the context of localized feature selection, we define replicability as
For any target individual with features , implementing our localized feature selection on similar training datasets generated from the same population would return similar selection sets .
The replicability of the proposed method in returning selection sets is influenced by two factors: (a) the sampling variation of the training dataset , and (b) the stability of our approach, characterized by the randomness in knockoff generation and model fitting (if the fitting algorithm employed is stochastic). While the sampling variation is unavoidable, one can enhance the stability so that repeated runs of our method on the same training dataset yield stable inference results. To achieve this, we propose a derandomization strategy that performs multiple runs of our localized feature selection procedure and aggregates the results from these runs. Specifically, for a target candidate feature value , we obtain selection sets under the FDR level by performing independent runs of our procedure. We then compute the derandomized selection set by applying the inclusion-rate-based procedure 49 to with details in Section S1.F of the supplementary material. The derandomized selection set at the population level can be also obtained in an analogous manner. As shown by the experimental results in Section 2.F, adopting the derandomization strategy improves the stability of our method with decreased variation in the selection sets. It also improves the replicability at both individual and population levels, while empirically controlling the FDR at the desired level.
Analogously to Section 3.C, we define the augmented selection vector corresponding to the derandomized selection set as
where is the average of the localized importance scores among runs of our procedure.
4. Discussion
In this paper, we introduced a novel framework for localized feature selection with false discovery rate control by leveraging model-X knockoffs. Our framework uses localized feature statistics to assess the strength of localized evidence against the conditional independence hypotheses across diverse individuals, yielding heterogeneous localized selection sets . By aggregating the across individuals, the framework combines heterogeneous localized evidence against false to produce a powerful population-level feature selection set with FDR control. Below, we outline several potential directions for future research.
First, it is important to note that while our localized feature selection procedure effectively identifies localized rejection sets for different values of the covariates and captures effect heterogeneity among important features, we are still testing the conditional independence hypotheses at the population level. Specifically, the FDR control for established in this paper is with respect to the population-level hypotheses. This guarantees that most discoveries correspond to truly important variables for the population, which is desirable since the set of important variables at the population level typically encompasses those relevant to specific subgroups. However, our approach does not necessarily ensure error-rate control for localized conditional independence hypotheses, as defined in works such as Sesia and Sun 52 and Gablenz et al. 53. While in applications where localized subgroups and the population share the same important features but with potentially different effect sizes, controlling FDR for population-level conditional independence hypotheses also implies FDR control for localized conditional independence hypotheses, it would be an interesting future work to extend our method within the theoretical framework of Sesia and Sun 52 and Gablenz et al. 53.
Second, the past few decades have witnessed a dramatic surge in the volume and variety of health-related digital information. Beyond electronic clinical data, which capture demographic characteristics (e.g., gender, age) and clinical records (e.g., pathological and physiological history), next-generation sequencing technologies, along with advances in imaging- and fluid-based biomarker approaches {Thal, 2025 #1450}, have generated a wealth of omics data, enabling highly detailed descriptions of individuals 54-56. Future work could apply our framework to infer insights from integrated health information spanning multiple data types. Jointly analyzing the diverse omics data of individuals, potentially from hidden subpopulations, may offer new insights into the heterogeneous biological pathways associated with traits of interest.
Third, while our framework employed a lasso-penalized quadratic regression model, other nonlinear modeling approaches could be explored. For example, developing appropriate deep learning models to capture complex relationships between features and the response might enhance power, particularly for large datasets. Note that the critical requirement of our framework is the symmetric treatment of original variables and their knockoffs. Therefore, in practice, cross-validation can be used to select among multiple models with algorithmic symmetry for estimating without compromising FDR control.
Finally, our framework also raises new research questions beyond localized feature selection. For instance, investigating discoveries with heterogeneous effects across individuals, as revealed by the augmented selection matrix, and probing their underlying biological mechanisms through downstream analyses could provide valuable insights. Such inquiries could advance personalized medicine by informing the development of tailored drugs and therapies. Along these lines, the development of interventions that differentially affect newly identified features would make possible a modeling to experimental testing feedback loop. The detection of previously unrecognized, yet robust, distinct features across a given cell population or subcellular entity, will further advance precision approaches, contribute to cellular context molecular mechanism elucidation and will help to make possible the detection of therapeutic effects that might otherwise be overlooked.
Supplementary Material
Acknowledgments
Z.C. was supported by the Simons Foundation under award 814641. C.S. was supported by the grants NIH R56HG010812 and NSF DMS2210392. E.J.C. was supported by the Office of Naval Research grant N00014-20-1-2157. Z.H. was supported by NIH/NIA award AG089509, AG066206 and AG066515.
Data Availability
The single-cell RNA sequencing (scRNA-seq) dataset analyzed in this study is publicly available from the NCBI GEO database under accession number GSE163577.
Code Availability
The proposed method has been implemented as an efficient R package, available at https://github.com/circustata/LocalizedFeatureSelection.
References
- 1.Naithani N., Sinha S., Misra P., Vasudevan B. & Sahu R. Precision medicine: Concept and tools. medical journal armed forces india 77, 249–257 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Liu Y., Tian H. & Hsu J.C. in Handbook of multiple comparisons 311–338 (Chapman and Hall/CRC, 2021). [Google Scholar]
- 3.Li S., Cai T. & Duan R. Targeting underrepresented populations in precision medicine: A federated transfer learning approach. The Annals of Applied Statistics 17, 2970–2992 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Wang R.C. & Wang Z. Precision medicine: disease subtyping and tailored treatment. Cancers 15, 3837 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Belloy M.E. et al. APOE genotype and Alzheimer disease risk across age, sex, and population ancestry. JAMA neurology 80, 1284–1294 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Brisbin A. et al. PCAdmix: principal components-based assignment of ancestry along each chromosome in individuals with admixed ancestry from two or more populations. Human biology 84, 343 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Chen C.-Y. et al. Improved ancestry inference using weights from external reference panels. Bioinformatics 29, 1399–1406 (2013). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Duello T.M., Rivedal S., Wickland C. & Weller A. Race and genetics versus ‘race’in genetics: a systematic review of the use of African ancestry in genetic studies. Evolution, medicine, and public health 9, 232–245 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Browning S.R., Waples R.K. & Browning B.L. Fast, accurate local ancestry inference with FLARE. The American Journal of Human Genetics 110, 326–335 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Ding Y. et al. Polygenic scoring accuracy varies across the genetic ancestry continuum. Nature 618, 774–781 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Candes E., Fan Y., Janson L. & Lv J. Panning for gold:’model-X’knockoffs for high dimensional controlled variable selection. Journal of the Royal Statistical Society Series B: Statistical Methodology 80, 551–577 (2018). [Google Scholar]
- 12.Efroymson M.A. Multiple regression analysis. Mathematical methods for digital computers, 191–203 (1960). [Google Scholar]
- 13.Hocking R.R. A Biometrics invited paper. The analysis and selection of variables in linear regression. Biometrics, 1–49 (1976). [Google Scholar]
- 14.Draper N. Applied regression analysis. (McGraw-Hill. Inc, 1998). [Google Scholar]
- 15.Tibshirani R.J. A general framework for fast stagewise algorithms. J. Mach. Learn. Res. 16, 2543–2588 (2015). [Google Scholar]
- 16.Tibshirani R. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology 58, 267–288 (1996). [Google Scholar]
- 17.Fan J. & Li R. Variable selection via nonconcave penalized likelihood and its oracle properties. Journal of the American statistical Association 96, 1348–1360 (2001). [Google Scholar]
- 18.Zou H. & Hastie T. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society Series B: Statistical Methodology 67, 301–320 (2005). [Google Scholar]
- 19.Zou H. The adaptive lasso and its oracle properties. Journal of the American statistical association 101, 1418–1429 (2006). [Google Scholar]
- 20.Zhang C.-H. Nearly unbiased variable selection under minimax concave penalty. (2010). [Google Scholar]
- 21.Thal D.R., Poesen K., Vandenberghe R. & De Meyer S. Alzheimer's disease neuropathology and its estimation with fluid and imaging biomarkers. Mol Neurodegener 20, 33 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Yang A.C. et al. A human brain vascular atlas reveals diverse mediators of Alzheimer’s risk. Nature 603, 885–892 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Sarlus H. & Heneka M.T. Microglia in Alzheimer’s disease. The Journal of clinical investigation 127, 3240–3249 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Keren-Shaul H. et al. A unique microglia type associated with restricting development of Alzheimer’s disease. Cell 169, 1276–1290. e1217 (2017). [DOI] [PubMed] [Google Scholar]
- 25.Fan Y., Lv J., Sharifvaghefi M. & Uematsu Y. IPAD: stable interpretable forecasting with knockoffs inference. Journal of the American Statistical Association 115, 1822–1834 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Murray M.E. et al. Neuropathologically defined subtypes of Alzheimer's disease with distinct clinical characteristics: a retrospective study. Lancet Neurol 10, 785–796 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Sabuncu M.R. et al. The dynamics of cortical and hippocampal atrophy in Alzheimer disease. Arch Neurol 68, 1040–1048 (2011). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Tan Y.L., Yuan Y. & Tian L. Microglial regional heterogeneity and its role in the brain. Mol Psychiatry 25, 351–367 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Martins-Ferreira R. et al. The Human Microglia Atlas (HuMicA) unravels changes in disease-associated microglia subsets across neurodegenerative conditions. Nat Commun 16, 739 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.Sun N. et al. Human microglial state dynamics in Alzheimer's disease progression. Cell 186, 4386–4403 e4329 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Yao Z. et al. A high-resolution transcriptomic and spatial atlas of cell types in the whole mouse brain. Nature 624, 317–332 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Yao Z. et al. A taxonomy of transcriptomic cell types across the isocortex and hippocampal formation. Cell 184, 3222–3241 e3226 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Chen X. et al. A brain cell atlas integrating single-cell transcriptomes across human brain regions. Nat Med 30, 2679–2691 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Young A.M.H. et al. A map of transcriptional heterogeneity and regulatory variation in human microglia. Nat Genet 53, 861–868 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Tang F. et al. The Role of Vti1a in Biological Functions and Its Possible Role in Nervous System Disorders. Front Mol Neurosci 15, 918664 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Wang N. et al. Additional evidence supports association of common genetic variants in VTI1A and ETFA with increased risk of glioma susceptibility. J Neurol Sci 375, 282–288 (2017). [DOI] [PubMed] [Google Scholar]
- 37.Zhang Q., Wang S.S., Zhang Z. & Chu S.F. PKM2-mediated metabolic reprogramming of microglia in neuroinflammation. Cell Death Discov 11, 149 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Zhang X., Lei Y., Zhou H., Liu H. & Xu P. The Role of PKM2 in Multiple Signaling Pathways Related to Neurological Diseases. Mol Neurobiol 61, 5002–5026 (2024). [DOI] [PubMed] [Google Scholar]
- 39.McInnes L., Healy J. & Melville J. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426 (2018). [Google Scholar]
- 40.Lipovetsky S. & Conklin M. Analysis of regression in game theory approach. Applied stochastic models in business and industry 17, 319–330 (2001). [Google Scholar]
- 41.Štrumbelj E. & Kononenko I. Explaining prediction models and individual predictions with feature contributions. Knowledge and information systems 41, 647–665 (2014). [Google Scholar]
- 42.Williamson B. & Feng J. in International conference on machine learning 10282–10291 (PMLR, 2020). [Google Scholar]
- 43.Ribeiro M.T., Singh S. & Guestrin C. in Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining 1135–1144 (2016). [Google Scholar]
- 44.Zafar M.R. & Khan N. Deterministic local interpretable model-agnostic explanations for stable explainability. Machine Learning and Knowledge Extraction 3, 525–541 (2021). [Google Scholar]
- 45.Sesia M., Sabatti C. & Candès E.J. Gene hunting with hidden Markov model knockoffs. Biometrika 106, 1–18 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Romano Y., Sesia M. & Candès E. Deep knockoffs. Journal of the American Statistical Association 115, 1861–1872 (2020). [Google Scholar]
- 47.Bates S., Candès E., Janson L. & Wang W. Metropolized knockoff sampling. Journal of the American Statistical Association 116, 1413–1427 (2021). [Google Scholar]
- 48.Ren Z. & Barber R.F. Derandomised knockoffs: leveraging e-values for false discovery rate control. Journal of the Royal Statistical Society Series B: Statistical Methodology 86, 122–154 (2024). [Google Scholar]
- 49.Dai C., Lin B., Xing X. & Liu J.S. False discovery rate control via data splitting. Journal of the American Statistical Association 118, 2503–2520 (2023). [Google Scholar]
- 50.Sciences, N.A.o. et al. Reproducibility and replicability in science. (National Academies Press, 2019). [PubMed] [Google Scholar]
- 51.Nichols J.D., Oli M.K., Kendall W.L. & Boomer G.S. A better approach for dealing with reproducibility and replicability in science. Proceedings of the National Academy of Sciences 118, e2100769118 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.Sesia M. & Sun T. Individualized conditional independence testing under model-X with heterogeneous samples and interactions. arXiv preprint arXiv:2205.08653 (2022). [Google Scholar]
- 53.Gablenz P., Sesia M., Sun T. & Sabatti C. Searching for local associations while controlling the false discovery rate. arXiv preprint arXiv:2412.02182 (2024). [Google Scholar]
- 54.Hasin Y., Seldin M. & Lusis A. Multi-omics approaches to disease. Genome biology 18, 1–15 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 55.Olivier M., Asmis R., Hawkins G.A., Howard T.D. & Cox L.A. The Need for Multi-Omics Biomarker Signatures in Precision Medicine. International Journal of Molecular Sciences 20, 4781 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 56.Baysoy A., Bai Z., Satija R. & Fan R. The technological landscape and applications of single-cell multi-omics. Nature Reviews Molecular Cell Biology 24, 695–713 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 57.Bai J. Inferential theory for factor models of large dimensions. Econometrica 71, 135–171 (2003). [Google Scholar]
- 58.Vovk V. & Wang R. E-values: Calibration, combination and applications. The Annals of Statistics 49, 1736–1754 (2021). [Google Scholar]
- 59.Wang R. & Ramdas A. False discovery rate control with e-values. Journal of the Royal Statistical Society Series B: Statistical Methodology 84, 822–852 (2022). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The single-cell RNA sequencing (scRNA-seq) dataset analyzed in this study is publicly available from the NCBI GEO database under accession number GSE163577.
The proposed method has been implemented as an efficient R package, available at https://github.com/circustata/LocalizedFeatureSelection.






