arXiv:2610.35740cs.LGOct 2026

Manuscript Offprint

arXiv:2610.35740

LUCID: Local Understanding of Covariate Importance with Conditional Density Estimation

Yixiao Wang, Srikar Katta, Jon Donnelly, Emanuele Borgonovo, Cynthia Rudin

Abstract

Computing local-level variable importance (VI) is critical for understanding machine learning models. Local permutation-based VI metrics offer a simple yet powerful approach, measuring how much a model's output changes when perturbing its inputs. However, existing perturbation strategies often ignore feature dependence or account for it only through restricted approximations. Perturbing a feature without fully respecting this dependence can generate unrealistic counterfactuals, thereby evaluating the model in regions unsupported by the observed data distribution. We address this gap by introducing a new model-agnostic local VI metric and estimator, Local Understanding of Covariate Importance with conditional Density estimation (LUCID). LUCID perturbs features of interest using plausible values drawn from the full conditional distribution given the remaining observed features. We establish theoretical connections between LUCID and existing VI measures, and provide an estimator with convergence guarantees and uncertainty quantification. Finally, we demonstrate LUCID's stable performance and practical utility across simulated and real-world examples.

1 Introduction

Variable importance (VI) is a fundamental tool for interpreting machine learning models, enabling the characterization of features' usage and their effects on the model's predictions. VI is particularly useful for probing the otherwise opaque behavior of black-box machine learning systems (Guidotti et al., 2018; Casalicchio et al., 2019; Fisher et al., 2019). Most established VI methods summarize each feature with a single population-level score or ranking (Breiman, 2001; Gregorutti et al., 2015). However, a feature may strongly influence the model in one region of the covariate space while being irrelevant in another, so averaging importance across the population can obscure when, where, and for which observations a feature matters. For example, in the Bike Sharing dataset (Fanaee-T and Gama, 2014), the importance of temperature and humidity changes substantially over the course of a day, while their global VI scores, shown as dashed lines, collapse this variation into single values and obscure the underlying heterogeneity (Figure 1(a)). More fundamentally, distinct local importance patterns can share the same population average, meaning that global importance alone cannot identify how importance is distributed across observations. This motivates local VI and its accurate estimation, which makes observation-level feature usage accessible and characterizes heterogeneous feature usage across individual predictions.

A central challenge for local VI is determining how to perturb the feature. Existing lo-

(a) Weather importance changes over the day

Figure

Hour of day

(b) Conditional densities vary by season

Season

Figure 1: Two motivations for LUCID on the Bike Sharing dataset (Fanaee-T and Gama, 2014). (a) LUCID values for ■ temperature and ■ humidity LUCID (solid lines) vary substantially across hours, while their corresponding global VI values (dashed lines) obscure this heterogeneity. (b) For temperature, each split violin compares the estimated ■ conditional replacement distribution from DR-BART (left; Orlandi et al., 2021) with the ■ marginal replacement distribution (right). Conditional densities adapt across seasons, whereas the marginal distribution does not.

cal perturbation-based approaches typically sample counterfactuals from the marginal distribution of the feature of interest (Casalicchio et al., 2019; Bladen et al., 2026), which can break feature dependence and generate implausible counterfactuals. For example, in the Bike Sharing data, plausible temperature values vary across seasons, whereas marginal permutation draws replacements from the same pool regardless of the remaining covariates (Fig. 1(b)). Although global conditional importance methods provide dependence-aware alternatives, their perturbation schemes often rely on restricted approximations whose validity requires additional assumptions (Fisher et al., 2019; Chamma et al., 2023; Borgonovo et al., 2026; Strobl et al., 2008; Debeer and Strobl, 2020; Molnar et al., 2024; Blesch et al., 2025). Such schemes can recover population-average importance while producing systematically biased local scores, because errors across observations may cancel after averaging (Section 5.1 DGP 3). Accurate local estimation therefore requires capturing the observation-specific conditional structure. This motivates flexible estimation of the full conditional distribution, which existing perturbation schemes may struggle to capture, particularly under heteroskedasticity, multimodality, high dimensionality, or complex interactions.

In this work, we introduce Local Understanding of Covariate Importance with conditional Density estimation (LUCID), a model-agnostic framework for measuring feature importance at the observation level. For a fixed predictive model, LUCID replaces a feature of interest with plausible values drawn from its conditional density given the remaining observed features, and measures the resulting change in model behavior. Our main contributions are:

• We establish an interpretable decomposition of LUCID that captures local leave-one-covariate-out (LOCO) importance without refitting the predictive model and additionally quantifies conditional prediction variability omitted by local LOCO.

• We develop a flexible estimation framework for LUCID that accommodates modern conditional density estimators (CDEs), establish convergence guarantees, and provide a Bayesian implementation with posterior uncertainty quantification.

• We extend LUCID to explain feature groups, enabling observation-level assessment of their joint importance conditional on the observed covariates outside the group.

• Through extensive synthetic and real-data experiments, we demonstrate LUCID’s ability to capture heterogeneous local importance under complex covariate dependence, together with the high accuracy, robustness, and computational scalability of our implementation.

References (100)

Couldn't load all references. Reload the page to try again.