SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.05122 · EMNLP · 2020

The Language Interpretability Tool: Extensible, Interactive Visualizations and Analysis for NLP Models

Ian Tenney, Jasmijn Bastings, Ann Yuan, Andy Coenen, Sebastian Gehrmann, James Wexler, Emily Reif, Tolga Bolukbasi, Ellen Jiang, Carey Radebaugh, Mahima Pushkarna

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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 8 have no contract verdict; 0 failures of our instrument; 1 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/2008.05122.json · badge: /api/ran/2008.05122.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
PAIR-code/lit canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_image_str_to_array Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/image_utils.py
code served (permissive licence) · get_code("888e69db32c7d86e")
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 3, dtype family float, shape (32, 48, 3) 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 base64
import io
import numpy as np
from PIL import Image as PILImage

# Create a small test image and encode it as base64
def create_test_image_str(height=32, width=48, channels=3):
    """Create a small RGB image and encode it as base64 data URL."""
    # Create a simple RGB image
    img_array = np.random.randint(0, 256, (height, width, channels), dtype=np.uint8)
    img = PILImage.fromarray(img_array, mode='RGB')
    
    # Convert to base64
    buffered = io.BytesIO()
    img.save(buffered, format='PNG')
    img_bytes = buffered.getvalue()
    encoded = base64.b64encode(img_bytes).decode()
    
    # Return as data URL with base64 prefix
    return f"data:image/png;base64,{encoded}"

# Create test image string
image_str = create_test_image_str(height=32, width=48, channels=3)

ARGS = {
    'image_str': image_str,
    'shape': (32, 48, 3),
    'mode': 'RGB',
    'normalize': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (32, 48, 3) — shape (32, 48, 3) 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
convert_image_str_to_pil Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/image_utils.py
code served (permissive licence) · get_code("9c66e35bcd1c031f")
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 PngImageFile. 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 base64
import io
from PIL import Image as PILImage

# Create a simple test image and encode it as base64 data URL
test_image = PILImage.new('RGB', (10, 10), color='red')
img_byte_arr = io.BytesIO()
test_image.save(img_byte_arr, format='PNG')
img_byte_arr.seek(0)
img_base64 = base64.b64encode(img_byte_arr.read()).decode()

# Construct the image_str as a data URL with base64 encoding
image_str = f"data:image/png;base64,{img_base64}"

ARGS = {
    "image_str": image_str
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 3 and dtype family int 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
convert_pil_to_image_str Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/image_utils.py
code served (permissive licence) · get_code("2df4c67320c518f2")
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 base64
import io
from PIL import Image as PILImage
import numpy as np

# Create a small PIL image for testing
img_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
pil_image = PILImage.fromarray(img_array, mode='RGB')

ARGS = {
    'pil_image': pil_image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — 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
fake_projection_input Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/testing_utils.py
code served (permissive licence) · get_code("7b3b78a43adecb11")
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

# Read the function signature and body
# Parameters: n (int), num_dims (int)
# The function generates n dictionaries, each with key 'x' containing a random array of shape (num_dims,)

ARGS = {
    'n': 2,
    'num_dims': 4,
}
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 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
filename_fom_url Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/file_cache.py
code served (permissive licence) · get_code("1f6a0c8f18a96377")
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 hashlib
import os
from typing import BinaryIO, Optional
from urllib import parse as urllib_parse

# Setup code to construct valid arguments for filename_fom_url

ARGS = {
    'url': 'https://example.com/path/to/model.bin',
    'etag': 'abc123def456'
}
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
get_available_keywords Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/dev_server.py
code served (permissive licence) · get_code("8cde0ab0d453d43f")
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 inspect

def get_available_keywords(func):
    """Get names of keyword arguments to a function."""
    sig = inspect.signature(func)
    return [p.name for p in sig.parameters.values() if p.kind == p.POSITIONAL_OR_KEYWORD or p.kind == p.KEYWORD_ONLY]

# The function takes a single parameter: func
# func should be a callable that we can inspect

def sample_function(a, b, *, c, d=5):
    """Sample function with various parameter types."""
    return a + b + c + d

ARGS = {
    "func": sample_function
}
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 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
is_remote Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/lib/file_cache.py
code served (permissive licence) · get_code("91b69ed843e76677")
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 bool, ndim 0, dtype family float, shape () 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.

from urllib import parse as urllib_parse

# The function is_remote takes a single parameter: url_of_filepath (a string)
# It checks if the URL scheme is 'http' or 'https' to determine if it's remote
# We need to provide a string argument

ARGS = {
    'url_of_filepath': 'https://example.com/path/to/file.txt'
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
maybe_copy_np Ran
ran on a synthesized input
PAIR-code/lit/lit_nlp/api/model.py
code served (permissive licence) · get_code("9443625e19d35081")
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 (5,) 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

# Case 1: Test with a standalone array (arr.base is None)
standalone_array = np.array([1, 2, 3, 4], dtype=np.float32)

# Case 2: Test with a view into a larger array (arr.base is not None)
large_array = np.arange(20, dtype=np.float32).reshape(5, 4)
view_array = large_array[0, :]  # This creates a view where arr.base points to large_array

# Case 3: Test with a non-ndarray object
non_array = [1, 2, 3]

# Case 4: Test with a view where base.ndim > 1 and prod(base.shape[1:]) > prod(arr.shape)
large_2d_array = np.arange(100, dtype=np.float32).reshape(10, 10)
small_view = large_2d_array[0, :]  # Shape (10,), base shape (10, 10), prod(base[1:])=10 > prod(arr)=10, but equal

# Case 5: Test with a view where base.ndim > 1 and prod(base.shape[1:]) > prod(arr.shape) - truly larger
very_large_array = np.arange(200, dtype=np.float32).reshape(10, 20)
small_view_2 = very_large_array[0, :5]  # Shape (5,), base shape (10, 20), prod(base[1:])=20 > prod(arr)=5

ARGS = {
    "arr": small_view_2
}
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 ndarray, ndim 1, dtype family float, shape (5,) — shape (5,) 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
cached_path Not yet run
unverified (harvested, no recorded run)
PAIR-code/lit/lit_nlp/lib/file_cache.py
code served (permissive licence) · get_code("e54561e175a94dcf")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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 present the Language Interpretability Tool (LIT), an open-source platform for visualization and understanding of NLP models. We focus on core questions about model behavior: Why did my model make this prediction? When does it perform poorly? What happens under a controlled change in the input? LIT integrates local explanations, aggregate analysis, and counterfactual generation into a streamlined, browser-based interface to enable rapid exploration and error analysis. We include case studies for a diverse set of workflows, including exploring counterfactuals for sentiment analysis, measuring gender bias in coreference systems, and exploring local behavior in text generation. LIT supports a wide range of models-including classification, seq2seq, and structured predictionand is highly extensible through a declarative, framework-agnostic API. LIT is under active development, with code and full documentation available at https://github.com/ pair-code/lit. 1 * Equal contribution. 1 A video walkthrough is available at https://youtu. be/j0OfBWFUqIE.

For agents

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

get_harvested_code_for_paper("2008.05122")
get_code_for_paper("2008.05122")
have("2008.05122")

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

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

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

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

Connect an agent — have() is free.