SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1806.08049 · 2018

On the Robustness of Interpretability Methods

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 3 failures of our instrument; 0 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/1806.08049.json · badge: /api/ran/1806.08049.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
viggotw/robustness-of-interpretability-methods reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
explainer_func_wrapper Ran
ran; our contract draft was wrong, not the code
viggotw/robustness-of-interpretability-methods/lipschitz_metric.py
code served (permissive licence) · get_code("7ff3fa2ba3fff337")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned function. 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 numpy as np
from typing import List, Tuple, Callable, Literal
from numpy.typing import ArrayLike

# Create a simple predict function (classifier that returns probabilities)
class SimpleModel:
    def predict_proba(self, X):
        # Returns probabilities for 3 classes
        n_samples = X.shape[0]
        # Simple deterministic prediction based on input
        probs = np.zeros((n_samples, 3))
        for i in range(n_samples):
            probs[i] = np.array([0.2, 0.5, 0.3]) + 0.1 * np.sum(X[i]) % 0.3
            probs[i] = probs[i] / probs[i].sum()
        return probs

model = SimpleModel()
predict_fn = model.predict_proba

# Create a mock LIME explainer handle
class MockLimeExplainer:
    def __init__(self):
        pass
    
    def explain_instance(self, data_row, predict_fn, **kwargs):
        # Returns a mock explanation object
        return MockExplanation(data_row)

class MockExplanation:
    def __init__(self, data_row):
        self.data_row = data_row
        self.n_features = len(data_row)
    
    def as_list(self):
        # Returns list of (feature_name, importance_value) tuples
        # For simplicity, return feature index as string and random importance
        result = []
        for i in range(self.n_features):
            feature_name = f"feature_{i}"
            importance = np.random.randn() * 0.1 + self.data_row[i] * 0.05
            result.append((feature_name, importance))
        return result

explainer_handle = MockLimeExplainer()

# Additional args and kwargs for the explainer
# These will be passed to explain_instance
additional_args = []
additional_kwargs = {
    'num_features': 5,
    'num_samples': 100
}

ARGS = {
    'predict_fn': predict_fn,
    'explainer_handle': explainer_handle,
    'explainer': 'lime',
    'args': additional_args,
    'kwargs': additional_kwargs
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_perturbations Ran
ran; our contract draft was wrong, not the code
viggotw/robustness-of-interpretability-methods/lipschitz_metric.py
code served (permissive licence) · get_code("d56459ad1ce86e13")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. 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 numpy as np
from typing import List, Tuple, Callable, Literal
from numpy.typing import ArrayLike

# Define a simple function that takes numpy arrays and returns numpy arrays
def example_func(x: ArrayLike) -> ArrayLike:
    """
    A simple function that maps (P, num_features) -> (P, num_labels)
    For example, a linear transformation followed by some nonlinearity
    """
    x = np.array(x)
    # Map from num_features=5 to num_labels=3
    weight = np.array([[1.0, 0.5, -0.3],
                       [0.2, 1.0, 0.4],
                       [-0.5, 0.3, 1.0],
                       [0.8, -0.2, 0.6],
                       [0.1, 0.9, -0.4]])
    return x @ weight

# Create a point of interest with 5 features
x0 = np.array([0.5, 1.0, -0.5, 0.3, 0.8])

# Define input space as list of tuples (min, max) for each feature
input_space = [
    (-1.0, 1.0),   # feature 1 range
    (0.0, 2.0),    # feature 2 range
    (-2.0, 0.0),   # feature 3 range
    (-0.5, 1.5),   # feature 4 range
    (0.0, 1.0)     # feature 5 range
]

# Number of perturbations to generate
num_perturbations = 10

# Perturbation factor as percentage of range
pct_perturbation_factor = 0.05

# input_perturbations is None since we're using input_space
input_perturbations = None

ARGS = {
    'func': example_func,
    'x0': x0,
    'input_space': input_space,
    'input_perturbations': input_perturbations,
    'num_perturbations': num_perturbations,
    'pct_perturbation_factor': pct_perturbation_factor
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
lipschitz_metric Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
viggotw/robustness-of-interpretability-methods/lipschitz_metric.py
code served (permissive licence) · get_code("d8c6a9cd6d06c3c4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned tuple. 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 numpy as np

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

# Define dimensions
N = 3  # number of inputs
M = 4  # number of outputs
P = 5  # number of perturbations

# Create x0: input vector with shape (1, N)
x0 = np.array([[1.0, 2.0, 3.0]])

# Create y0: output vector with shape (1, M)
y0 = np.array([[0.5, 1.5, 2.5, 3.5]])

# Create x_perturbations: perturbed inputs with shape (P, N)
x_perturbations = np.array([
    [1.1, 2.1, 3.1],
    [0.9, 1.9, 2.9],
    [1.2, 2.2, 3.2],
    [0.8, 1.8, 2.8],
    [1.05, 2.05, 3.05]
])

# Create y_perturbations: outputs from perturbed inputs with shape (P, M)
y_perturbations = np.array([
    [0.6, 1.6, 2.6, 3.6],
    [0.4, 1.4, 2.4, 3.4],
    [0.7, 1.7, 2.7, 3.7],
    [0.3, 1.3, 2.3, 3.3],
    [0.55, 1.55, 2.55, 3.55]
])

# Create x_range: scaling for inputs (N tuples)
x_range = [(0.0, 5.0), (-10.0, 10.0), (0.0, 10.0)]

# Create y_range: scaling for outputs (M tuples)
y_range = [(0.0, 5.0), (0.0, 10.0), (0.0, 10.0), (0.0, 10.0)]

ARGS = {
    'x0': x0,
    'y0': y0,
    'x_perturbations': x_perturbations,
    'y_perturbations': y_perturbations,
    'x_range': x_range,
    'y_range': y_range
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 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 3 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

We argue that robustness of explanations---i.e., that similar inputs should give rise to similar explanations---is a key desideratum for interpretability. We introduce metrics to quantify robustness and demonstrate that current methods do not perform well according to these metrics. Finally, we propose ways that robustness can be enforced on existing interpretability approaches.

For agents

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

get_harvested_code_for_paper("1806.08049")
get_code_for_paper("1806.08049")
have("1806.08049")

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

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

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

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

Connect an agent — have() is free.