Papers › OptiLIME: Optimized LIME Explanations for Diagnostic Computer Algorithms

OptiLIME: Optimized LIME Explanations for Diagnostic Computer Algorithms

10 Jun 2020arXiv:2006.05714archive 2025-07-28

Giorgio Visani, Enrico Bagli, Federico Chesani

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2006.05714")

Code

Syntology Ran 0 of 7 code samples harvested from 1 repository linked to this paper; 7 have no recorded run.

By repository: official repository: 7 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

giorgiovisani/lime_stability officialmentioned in paperBSD-2-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

7 samples harvested; 0 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

7unverified

Licence: 0 of the 7 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from giorgiovisani/lime_stability. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

bayesian_optimisation giorgiovisani/lime_stability/OptiLIME/utils.py official repository unverified BSD-2-Clause (permissive) · 0f8e09a99d7b61e2 · report
compare_confints giorgiovisani/lime_stability/lime_stability/utils.py official repository unverified BSD-2-Clause (permissive) · 9a3e18cd1fb48f3a · report
compute_WLS_stdevs giorgiovisani/lime_stability/lime_stability/utils.py official repository unverified BSD-2-Clause (permissive) · 8867941339406d2d · report
expected_improvement giorgiovisani/lime_stability/OptiLIME/utils.py official repository unverified BSD-2-Clause (permissive) · bf853288857867e6 · report
interval giorgiovisani/lime_stability/OptiLIME/stability_utils.py official repository unverified BSD-2-Clause (permissive) · eb18f8ebe30bdb9f · report
refactor_confints_todict giorgiovisani/lime_stability/lime_stability/utils.py official repository unverified BSD-2-Clause (permissive) · 1409ef40709c3037 · report
sample_next_hyperparameter giorgiovisani/lime_stability/OptiLIME/utils.py official repository unverified BSD-2-Clause (permissive) · 61a9d87cc5909d81 · report

Tasks

Diagnosticfeature selection

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Feature SelectionInterpretabilityLIME

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections