SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.05714 · 2020

OptiLIME: Optimized LIME Explanations for Diagnostic Computer Algorithms

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2006.05714.json · badge: /api/ran/2006.05714.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
giorgiovisani/lime_stability canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
compare_confints Ran
ran on a synthesized input
giorgiovisani/lime_stability/lime_stability/utils.py
code served (permissive licence) · get_code("9a3e18cd1fb48f3a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function expects a list of dictionaries where each dictionary represents
# confidence intervals for features. Each dictionary maps feature names to
# confidence interval tuples (lower_bound, upper_bound).

# Create sample confidence interval dictionaries
# Each dict represents confidence intervals from one WRR call
conf_int_1 = {
    'feature_a': (0.1, 0.5),
    'feature_b': (0.2, 0.6),
    'feature_c': (0.3, 0.7),
    'feature_d': (0.4, 0.8),
}

conf_int_2 = {
    'feature_a': (0.15, 0.55),
    'feature_b': (0.25, 0.65),
    'feature_c': (0.35, 0.75),
    'feature_d': (0.45, 0.85),
}

conf_int_3 = {
    'feature_a': (0.12, 0.52),
    'feature_b': (0.22, 0.62),
    'feature_c': (0.32, 0.72),
    'feature_d': (0.42, 0.82),
}

confidence_intervals = [conf_int_1, conf_int_2, conf_int_3]

ARGS = {
    'confidence_intervals': confidence_intervals,
    'index_verbose': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_WLS_stdevs Ran
ran on a synthesized input
giorgiovisani/lime_stability/lime_stability/utils.py
code served (permissive licence) · get_code("8867941339406d2d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data
n_samples = 10
n_features = 3

# X: explanatory variables (n_samples x n_features)
X = np.random.randn(n_samples, n_features)

# Y: response variable (n_samples,)
Y = np.random.randn(n_samples)

# weights: one weight per sample
weights = np.ones(n_samples)

# alpha: regularization parameter
alpha = 0.1

ARGS = {
    "X": X,
    "Y": Y,
    "weights": weights,
    "alpha": alpha
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, statsmodels — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expected_improvement Ran
ran on a synthesized input
giorgiovisani/lime_stability/OptiLIME/utils.py
code served (permissive licence) · get_code("bf853288857867e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (1,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF

# Create a simple Gaussian Process regressor
# The function calls: gaussian_process.predict(x_to_predict, return_std=True)
gp = GaussianProcessRegressor(kernel=RBF(1.0), random_state=0)

# Train the GP on some dummy data
# Need at least 2 samples for meaningful predictions
X_train = np.array([[0.1], [0.5]])
y_train = np.array([1.0, 2.0])
gp.fit(X_train, y_train)

# Create the arguments
x = np.array([[0.3]])  # Single point to evaluate, shape [1, 1]
evaluated_loss = np.array([1.0, 2.0, 1.5])  # Previous evaluation results
n_params = 1  # Dimension of hyperparameter space
greater_is_better = False

ARGS = {
    'x': x,
    'gaussian_process': gp,
    'evaluated_loss': evaluated_loss,
    'greater_is_better': greater_is_better,
    'n_params': n_params
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (1,) — shape (1,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
interval Ran
ran on a synthesized input
giorgiovisani/lime_stability/OptiLIME/stability_utils.py
code served (permissive licence) · get_code("eb18f8ebe30bdb9f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Interval. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The interval function takes two parameters: middle and deviation
# It constructs an Interval object that checks if a value falls within
# [middle - abs(deviation), middle + abs(deviation)]

# Simple numeric values work well here
middle = 10.0
deviation = 2.5

ARGS = {
    "middle": middle,
    "deviation": deviation,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Interval — a Interval output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Interval output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
refactor_confints_todict Ran
ran on a synthesized input
giorgiovisani/lime_stability/lime_stability/utils.py
code served (permissive licence) · get_code("1409ef40709c3037")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small test data
means = [0.5, 1.2, -0.3, 0.8]
st_devs = [0.1, 0.15, 0.05, 0.2]
feat_names = ['feature_1', 'feature_2', 'feature_3', 'feature_4']

ARGS = {
    'means': means,
    'st_devs': st_devs,
    'feat_names': feat_names
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bayesian_optimisation Not yet run
unverified (harvested, no recorded run)
giorgiovisani/lime_stability/OptiLIME/utils.py
code served (permissive licence) · get_code("0f8e09a99d7b61e2")
How it ran

no invocation recorded.

sample_next_hyperparameter Not yet run
unverified (harvested, no recorded run)
giorgiovisani/lime_stability/OptiLIME/utils.py
code served (permissive licence) · get_code("61a9d87cc5909d81")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Local Interpretable Model-Agnostic Explanations (LIME) is a popular method to perform interpretability of any kind of Machine Learning (ML) model. It explains one ML prediction at a time, by learning a simple linear model around the prediction. The model is trained on randomly generated data points, sampled from the training dataset distribution and weighted according to the distance from the reference point - the one being explained by LIME. Feature selection is applied to keep only the most important variables. LIME is widespread across different domains, although its instability - a single prediction may obtain different explanations - is one of the major shortcomings. This is due to the randomness in the sampling step, as well as to the flexibility in tuning the weights and determines a lack of reliability in the retrieved explanations, making LIME adoption problematic. In Medicine especially, clinical professionals trust is mandatory to determine the acceptance of an explainable algorithm, considering the importance of the decisions at stake and the related legal issues. In this paper, we highlight a trade-off between explanation's stability and adherence, namely how much it resembles the ML model. Exploiting our innovative discovery, we propose a framework to maximise stability, while retaining a predefined level of adherence. OptiLIME provides freedom to choose the best adherence-stability trade-off level and more importantly, it clearly highlights the mathematical properties of the retrieved explanation. As a result, the practitioner is provided with tools to decide whether the explanation is reliable, according to the problem at hand. We extensively test OptiLIME on a toy dataset - to present visually the geometrical findings - and a medical dataset. In the latter, we show how the method comes up with meaningful explanations both from a medical and mathematical standpoint.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2006.05714")
get_code_for_paper("2006.05714")
have("2006.05714")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2006.05714.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2006.05714.svg)](https://syntology.ai/paper/2006.05714)

Connect an agent — have() is free.