SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.04528 · ICLR · 2021

EVALUATION OF SIMILARITY-BASED EXPLANATIONS

Kazuaki Hanawa, Sho Yokoi, Satoshi Hara, Kentaro Inui

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 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 11 have no contract verdict; 0 failures of our instrument; 5 no recorded run), measured 2026-11-21; 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.04528.json · badge: /api/ran/2006.04528.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
k-hanawa/criteria_for_instance_based_explanation canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
rbitr/pytkml community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
RandomSubsetLoader Ran
ran on a synthesized input
rbitr/pytkml/pytkml/core/dataloaders.py
code served (permissive licence) · get_code("b4fab1a9ec540acb")
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 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 torch
from torch.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, size=10):
        self.size = size
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        x = torch.randn(4)
        y = torch.tensor(idx % 2)
        return x, y

dataset = SimpleDataset(size=10)
num = 6
batch_size = 2
seed = 0

ARGS = {
    'dataset': dataset,
    'num': num,
    'batch_size': batch_size,
    'seed': seed
}
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 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
argmax_reducer Ran
ran on a synthesized input
rbitr/pytkml/pytkml/core/processors.py
code served (permissive licence) · get_code("95ddf503955b614b")
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 Tensor, ndim 1, dtype family int, shape (2,) 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 torch

torch.manual_seed(0)

# The function takes a single parameter 'x' and calls torch.argmax(x, dim=1)
# This expects x to be a tensor with at least 2 dimensions
# We'll create a small 2D tensor (batch_size=2, features=4)

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 Tensor, ndim 1, dtype family int, shape (2,) — shape (2,) 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
arrayToBase64IM Ran
ran on a synthesized input
rbitr/pytkml/pytkml/misc/logging.py
code served (permissive licence) · get_code("e5f4ff718f6859ca")
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 str. 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)

# The function takes a single parameter 'samp' which should be a numpy array or torch tensor
# with shape (channels, height, width) where channels is either 1 or 3
# Looking at the function body:
# - samp.shape[0] is accessed to get channels
# - For channels==1: samp.squeeze(0) is called
# - For channels==3: torch.Tensor(samp).permute([1, 2, 0]) is called
# So samp needs to be array-like with shape (C, H, W)

# Create a small 3-channel image sample (most common case)
samp_3channel = np.random.rand(3, 4, 5).astype(np.float32)

ARGS = {
    "samp": samp_3channel
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
cossim Ran
ran on a synthesized input
k-hanawa/criteria_for_instance_based_explanation/src/metrics.py
code served (permissive licence) · get_code("fe4a8d068a98b3cb")
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 float64, ndim 0, 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 cossim takes two parameters: a and b
# It expects them to be numpy arrays (or array-like)
# It converts them to float64, computes norms, and returns cosine similarity

# Create two small numpy arrays with distinct shapes for clarity
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([2.0, 1.0, 4.0, 3.0])

ARGS = {
    "a": a,
    "b": b
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
first_element_reducer Ran
ran on a synthesized input
rbitr/pytkml/pytkml/core/processors.py
code served (permissive licence) · get_code("a1a1dfb1820e0b9f")
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 Tensor, ndim 1, dtype family float, shape (2,) 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 torch

torch.manual_seed(0)

# The function expects x to be an iterable of items where each item
# is indexable (supports x[0]). The function iterates over x and
# extracts the first element from each item, then constructs a Tensor.

# Create a simple list of tensors/lists where each element has a first item
x = [
    torch.tensor([1.0, 2.0, 3.0, 4.0]),
    torch.tensor([5.0, 6.0, 7.0, 8.0])
]

ARGS = {
    "x": x
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
flatten Ran
ran on a synthesized input
k-hanawa/criteria_for_instance_based_explanation/src/torch/mobilenetv2.py
code served (permissive licence) · get_code("e19548528043a985")
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 Tensor, ndim 1, dtype family float, shape (8,) 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 torch

torch.manual_seed(0)

# The flatten function takes a tensor x and calls x.view(-1) on it
# view(-1) flattens the tensor into a 1D tensor
# We need to provide a tensor with at least 2 dimensions to make flattening meaningful

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 Tensor, ndim 1, dtype family float, shape (8,) — shape (8,) 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
get_entries Ran
ran on a synthesized input
rbitr/pytkml/pytkml/misc/logging.py
code served (permissive licence) · get_code("6b8474e9877e3a4b")
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. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-26T22:17:14Z. 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 json
from typing import List

# Construct test data for get_entries function
# The function expects lines that contain " - " followed by JSON
# It attempts to parse the JSON and collect valid entries

lines = [
    "timestamp - " + json.dumps({"key1": "value1", "key2": 123}),
    "timestamp - " + json.dumps({"data": "test", "number": 456}),
    "timestamp - this is not json at all",
    "no delimiter here but valid json",
    "timestamp - " + json.dumps({"nested": {"obj": "value"}}),
]

ARGS = {
    "lines": lines
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
influence_dot Ran
ran on a synthesized input
k-hanawa/criteria_for_instance_based_explanation/src/metrics.py
code served (permissive licence) · get_code("1918e0892fcf567b")
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 Tensor, ndim 2, dtype family float, shape (3, 2) 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 torch
import torch.nn as nn


torch.manual_seed(0)


class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)
    
    def get_relevance_by_grad(self, target_data, train, convert, force_refresh=False, approx_params=None, matrix=None):
        """
        Mock implementation of get_relevance_by_grad.
        Returns a tensor of influence scores.
        """
        batch_size = len(target_data)
        num_train_samples = len(train)
        predicted_loss_diffs = torch.randn(num_train_samples, batch_size)
        return predicted_loss_diffs


def mock_convert(x):
    """Mock convert function that processes data"""
    if isinstance(x, torch.Tensor):
        return x
    return torch.tensor(x)


target_data = [
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1))
]

train = [
    (torch.randn(4), torch.tensor(0)),
    (torch.randn(4), torch.tensor(1)),
    (torch.randn(4), torch.tensor(0))
]

model = SimpleModel()

convert = mock_convert

ARGS = {
    'target_data': target_data,
    'train': train,
    'model': model,
    'convert': convert
}
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 Tensor, ndim 2, dtype family float, shape (3, 2) — shape (3, 2) 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
l2sim Ran
ran on a synthesized input
k-hanawa/criteria_for_instance_based_explanation/src/metrics.py
code served (permissive licence) · get_code("5559c3b944f881f0")
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 float64, ndim 0, 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

# Create two small numpy arrays with distinct shapes for testing
a = np.array([1.0, 2.0, 3.0, 4.0])
b = np.array([1.5, 2.5, 3.5, 4.5])

ARGS = {
    "a": a,
    "b": b
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
make_dataloaders Ran
ran on a synthesized input
k-hanawa/criteria_for_instance_based_explanation/src/torch/mobilenetv2.py
code served (permissive licence) · get_code("9967ce3a4eaa3100")
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. 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 torchvision
import torchvision.transforms as transforms
import numpy as np
import random
from unittest.mock import Mock, MagicMock
import tempfile
import os

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

# Create a temporary directory for the dataset path
temp_dir = tempfile.mkdtemp()

# Create minimal mock CIFAR10 dataset
class MockCIFAR10(torchvision.datasets.CIFAR10):
    def __init__(self, root, train=True, transform=None, target_transform=None, download=False):
        self.root = root
        self.train = train
        self.transform = transform
        self.target_transform = target_transform
        # Create minimal mock data: 10 samples for simplicity
        self.data = np.random.randint(0, 256, (10, 32, 32, 3), dtype=np.uint8)
        self.targets = [i % 10 for i in range(10)]
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        img = self.data[idx]
        target = self.targets[idx]
        
        if self.transform:
            img = self.transform(img)
        if self.target_transform:
            target = self.target_transform(target)
        
        return img, target

# Monkey patch torchvision.datasets.CIFAR10 to use our mock
original_cifar10 = torchvision.datasets.CIFAR10
torchvision.datasets.CIFAR10 = MockCIFAR10

# Define ARGS dict with all required parameters
ARGS = {
    'params': {
        'path': temp_dir,
        'batch_size': 2,
    },
    'raw': False,
    'train': True,
    'merge': False,
    'permutate': False,
    'train_size': 1,
    'map_dic': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — 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
renderLogAsHTML Ran
ran on a synthesized input
rbitr/pytkml/pytkml/misc/logging.py
code served (permissive licence) · get_code("f6502b235ea0f868")
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 str. 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 json
import tempfile
import os

# Create a temporary log file with valid JSON entries
temp_dir = tempfile.mkdtemp()
logfile_path = os.path.join(temp_dir, "test_log.txt")

# Create sample base64-encoded image data (tiny valid PNG)
sample_image = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="

# Create log entries with the required pattern
log_entries = [
    'prefix - ' + json.dumps({
        'true_label': 0,
        'pred_label': 1,
        'sample': sample_image,
        'confidence': 0.85,
        'closest_label': [0, 2],
        'closest_sample': [sample_image, sample_image]
    }),
    'prefix - ' + json.dumps({
        'true_label': 2,
        'pred_label': 2,
        'sample': sample_image,
        'confidence': 0.92,
        'closest_label': [2, 1],
        'closest_sample': [sample_image, sample_image]
    }),
    'invalid json line that should be skipped',
    'prefix - ' + json.dumps({
        'true_label': 1,
        'pred_label': 1,
        'sample': sample_image,
        'confidence': 0.78,
        'closest_label': [1],
        'closest_sample': [sample_image],
        'extra_field': 'this is ignored'
    })
]

# Write to temporary file
with open(logfile_path, 'w') as f:
    for entry in log_entries:
        f.write(entry + '\n')

ARGS = {
    'logfile': logfile_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
first_element_reducerInt Not yet run
unverified (harvested, no recorded run)
rbitr/pytkml/pytkml/core/processors.py
code served (permissive licence) · get_code("1e772e343910909d")
How it ran

no invocation recorded.

get_cifar10_data Not yet run
unverified (harvested, no recorded run)
k-hanawa/criteria_for_instance_based_explanation/src/get_dataset.py
code served (permissive licence) · get_code("d79d6438697e1ed3")
How it ran

no invocation recorded.

get_mnist_data Not yet run
unverified (harvested, no recorded run)
k-hanawa/criteria_for_instance_based_explanation/src/get_dataset.py
code served (permissive licence) · get_code("806006ec6b9a7c95")
How it ran

no invocation recorded.

get_trec_data Not yet run
unverified (harvested, no recorded run)
k-hanawa/criteria_for_instance_based_explanation/src/get_dataset.py
code served (permissive licence) · get_code("fbab2ae0bfd9ace7")
How it ran

no invocation recorded.

mobilenet_v2 Not yet run
unverified (harvested, no recorded run)
k-hanawa/criteria_for_instance_based_explanation/src/torch/mobilenetv2.py
code served (permissive licence) · get_code("d1bf41dee7f45a7f")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Explaining the predictions made by complex machine learning models helps users to understand and accept the predicted outputs with confidence. One promising way is to use similarity-based explanation that provides similar instances as evidence to support model predictions. Several relevance metrics are used for this purpose. In this study, we investigated relevance metrics that can provide reasonable explanations to users. Specifically, we adopted three tests to evaluate whether the relevance metrics satisfy the minimal requirements for similarity-based explanation. Our experiments revealed that the cosine similarity of the gradients of the loss performs best, which would be a recommended choice in practice. In addition, we showed that some metrics perform poorly in our tests and analyzed the reasons of their failure. We expect our insights to help practitioners in selecting appropriate relevance metrics and also aid further researches for designing better relevance metrics for explanations.

For agents

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

get_harvested_code_for_paper("2006.04528")
get_code_for_paper("2006.04528")
have("2006.04528")

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

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

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

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

Connect an agent — have() is free.