Papers
Topics
Authors
Recent
Search
2000 character limit reached

SLIME: Supralocal Model-Agnostic Explanations

Updated 28 February 2026
  • SLIME is a family of post hoc explanation techniques that extend LIME’s local sampling using supralocal strategies for enhanced stability and fidelity.
  • It introduces sequential hypothesis testing based on the Central Limit Theorem to deliver statistically reliable, sparse linear surrogates across various data modalities.
  • Practical adaptations, including structured sampling and error tolerance, enable improved local fidelity and consistent model-agnostic explanations in complex ML scenarios.

Supralocal Interpretable Model-Agnostic Explanations (SLIME), often referred to as s-LIME or S-LIME, are a family of post hoc explanation techniques designed to address known deficiencies in standard Locally Interpretable Model-agnostic Explanations (LIME). SLIME variants seek to provide faithful, statistically stable, and meaningful local explanations for black-box machine learning models by rethinking the locality, sampling, and statistical guarantees of the surrogate models used for attribution. The term "supralocal" denotes sampling and fitting strategies that extend or refine LIME’s locality principle, while retaining model-agnosticism.

1. Theoretical Motivation and Limitations of Standard LIME

The original LIME framework constructs a surrogate linear model around a specific input instance by generating a neighborhood of perturbed examples and weighting them according to their proximity (via a kernel with bandwidth parameter σ\sigma) (Choudhary et al., 2022, Gaudel et al., 2022). Explanations are derived from the coefficients of a linear regression fit to this weighted set.

However, LIME suffers from two substantial limitations:

  • Instability due to Sampling Variability: The randomized sampling of perturbations leads to explanation weights that can vary dramatically across runs, even on the same input. Empirical studies and adversarial constructions demonstrate that, absent a large number of samples, LIME’s attribution may be inconsistent, undermining user trust and the method’s reliability (Choudhary et al., 2022).
  • Degeneracy at Extreme Locality: As σ0\sigma \to 0, the kernel weights concentrate all mass on the target instance, effectively reducing the regression to a single-point fit. This "kernel-degeneracy" produces trivial or spurious explanations—coefficients collapse to zero and local fidelity R20R^2 \to 0, even for smooth models (Gaudel et al., 2022).

These issues motivate SLIME approaches that introduce principled statistical stopping rules and supralocal sampling strategies to yield stable and faithful explanations.

2. Hypothesis-Testing and Statistical Guarantees in Stabilized LIME

S-LIME (Stabilized LIME) addresses LIME’s instability by introducing a sequential hypothesis-testing framework based on the Central Limit Theorem (CLT). Feature-importance estimates w^j\hat w_j are modeled as random variables, and confidence intervals are constructed around their means μ^j(n)\hat\mu_j(n) and variances σ^j2(n)\hat\sigma_j^2(n) as new perturbation samples are accumulated.

The sequential procedure is governed by the inequality:

n(z1β/2σ^j(n)τ)2n \geq \left(\frac{z_{1-\beta/2}\,\hat\sigma_j(n)}{\tau}\right)^2

where z1β/2z_{1-\beta/2} is the normal quantile, τ\tau is a user-defined error tolerance, and 1β1-\beta is the desired confidence level. Sampling proceeds in batches until the confidence interval for each feature’s weight is within the requested tolerance, guaranteeing that explanations achieve specified stability (Choudhary et al., 2022).

This CLT-based methodology transforms the ad hoc sample-size choice in standard LIME into a statistically grounded stopping rule. It applies to any model-agnostic scenario, requiring only repeated surrogate fitting over successive random samples, and provides explicit quantification of explanation uncertainty.

3. Supralocal Sampling and the s-LIME Family

The s-LIME (“Reconciling Locality and Fidelity in Linear Explanations”) variant identifies a degeneracy in LIME’s kernel-weighted neighborhood sampling framework. When σ\sigma is small, LIME’s reweighting collapses the regression neighborhood, whereas s-LIME directly samples from a supralocal distribution νσ\nu_\sigma concentrated in the relevant vicinity but ensuring variance in generated instances.

Typical choices for νσ\nu_\sigma include:

  • Tabular Data: νσ=N(0,σ2I)\nu_\sigma = \mathcal{N}(0, \sigma^2 I) on Rd^\mathbb{R}^{\hat d}, generating neighbors at Euclidean radius σ\sigma
  • Structured Data (images, time-series): Uniform sampling from [1σ,1]d^[1-\sigma, 1]^{\hat d}, creating local variants in contiguous segments

The s-LIME objective minimizes the unweighted mean squared error over nn samples from νσ\nu_\sigma, enforcing a sparsity constraint:

minα0,α:α0ki=1n(y(i)α0αz~(i))2+λΩ(α)\min_{\alpha_0,\,\alpha:\, \|\alpha\|_0 \leq k} \sum_{i=1}^n \left(y^{(i)} - \alpha_0 - \alpha^\top \tilde{z}^{(i)}\right)^2 + \lambda \Omega(\alpha)

where Ω\Omega is a regularizer, typically L1L_1 or L2L_2 (Gaudel et al., 2022). By separating the locality mechanism from degeneracy-prone kernel reweighting, s-LIME ensures that the regression design matrix remains full-rank even for small σ\sigma.

4. Algorithmic Procedures and Surrogate Fitting

Both S-LIME and s-LIME fit sparse linear surrogates over samples drawn in the local region of the point being explained, but differ in their stopping criteria and sampling mechanisms.

Stabilized LIME (S-LIME):

  • Iteratively sample perturbed neighbors
  • For each feature, compute running mean μ^j\hat\mu_j and variance σ^j2\hat\sigma_j^2
  • Stop sampling for each feature when the half-width hj=z1β/2σ^j/njh_j = z_{1-\beta/2}\hat\sigma_j/\sqrt{n_j} meets the tolerance hjτh_j \leq \tau
  • Output feature attributions μ^j\hat\mu_j with confidence intervals

s-LIME (Supralocal LIME):

  • Sample nn neighbors from νσ\nu_\sigma
  • For each sample, evaluate the black-box ff and convert perturbations to the original input space
  • Fit sparsity-constrained or regularized linear regression on the sampled points
  • Return top-kk feature coefficients as local attributions (Gaudel et al., 2022)

The supralocal approach can be viewed as a generalization of LIME: for appropriate discrete νσ\nu_\sigma and weighting, standard LIME is recovered as a special case.

5. Empirical Evidence and Evaluation Metrics

Empirical evaluations for S-LIME utilize benchmarks in text (IMDB, AG news, Yelp), comparing stabilized explanation stability (variance of importance weights, Jaccard similarity of top-kk tokens) to standard and deterministic LIME:

  • S-LIME achieves 95%95\%99%99\% top-kk feature stability, whereas standard LIME can drop below Jaccard $0.5$ even with 1000 samples
  • S-LIME requires fewer perturbations (commonly $200$–$300$ for τ=0.05\tau=0.05, β=0.05\beta=0.05) versus $1000+$ for comparable confidence in standard LIME

For s-LIME, benchmarks span tabular, image, and time-series domains with both smooth and piecewise-constant black boxes. s-LIME yields:

  • Substantially better local fidelity (R2R^2) as σ0\sigma \to 0 for smooth models
  • Near-perfect recall when relevant features are known, outperforming standard LIME, especially when σ\sigma is not optimally tuned
  • Superior semantic agreement and stability of attributions for both interpretable and complex deep models (Choudhary et al., 2022, Gaudel et al., 2022)

6. Practical Guidelines and Implementation Recommendations

  • Confidence Level (β\beta): Typical choices like β=0.05\beta = 0.05 (95% coverage) balance precision and sample requirements; smaller β\beta demands more samples.
  • Error Tolerance (τ\tau): Chosen to match desired attribution accuracy (e.g., τ=0.05\tau=0.05 for ±0.05\pm0.05 weight error).
  • Batch Size (bb): Balances computational granularity; b=50b=50–$100$ is common.
  • Parallelization and Caching: Model queries and surrogate fits can be parallelized over perturbations; perturbed inputs support shared model calls across features.
  • Feature Filtering: Exclude features with near-zero weights to reduce multiplicity in hypothesis testing.
  • Bandwidth Tuning (σ\sigma): s-LIME recommends per-instance selection of σ\sigma by maximizing local R2R^2 (Gaudel et al., 2022).

7. Strengths, Limitations, and Theoretical Properties

Strengths:

  • Statistical Guarantees: S-LIME delivers formal guarantees on explanation instability, quantifying uncertainty (Choudhary et al., 2022).
  • Fidelity under Locality: s-LIME avoids kernel-degeneracy, ensuring linear surrogates remain meaningful under vanishing σ\sigma (Gaudel et al., 2022).
  • Model-Agnosticism and Adaptivity: Both families apply to any black-box classifier, adaptively halting sampling upon reaching desired stability.

Limitations:

  • Surrogate Linearity: Both approaches inherit LIME’s linearization, which may be inadequate for highly non-linear local boundaries.
  • Computational Overhead: Ensuring tight error bounds can be costly for high-dimensional or noisy settings.
  • Multiple Testing: The stability guarantee applies per-feature; controlling overall error across many features may require adjustments (e.g., Bonferroni correction).

Theoretical Properties (s-LIME):

  • As σ0\sigma \to 0 and in the full-rank limit, s-LIME’s regression solution converges to the instantaneous gradient of the black-box, providing a natural local explanation for differentiable models.
  • There exists a coupling to LIME’s weighted MSE for appropriate νσ\nu_\sigma, hence s-LIME generalizes standard LIME (Gaudel et al., 2022).

Potential Extensions:

Suggestions include non-linear surrogates with analogous hypothesis testing, variance-reduction in sampling, automatic tolerance tuning via human studies, and joint control of family-wise error in reporting top-kk features.


For comprehensive integration of local attribution quality and statistical rigor, SLIME and its supralocal variants establish a new paradigm for faithful, stable, and interpretable model-agnostic explanations, addressing foundational limitations in standard LIME approaches (Choudhary et al., 2022, Gaudel et al., 2022).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Supralocal Interpretable Model-Agnostic Explanations (SLIME).