SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · aaai_35495 · AAAI · 2025

Explanation Bottleneck Models

Shin'ya Yamaguchi, Kosuke Nishida

Open in the Atlas

Code that ran

4 of 6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/aaai_35495.json · badge: /api/ran/aaai_35495.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
salesforce/BLIP canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
interpolate_pos_embed Ran
ran; our contract draft was wrong, not the code
salesforce/BLIP/models/vit.py
code served (permissive licence) · get_code("c6ec173f19f5c34d")
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) and returned Tensor, ndim 3, dtype family float, shape (1, 17, 4) 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 PatchEmbed(nn.Module):
    def __init__(self, num_patches):
        super().__init__()
        self.num_patches = num_patches

class VisualEncoder(nn.Module):
    def __init__(self, num_patches, pos_embed_shape):
        super().__init__()
        self.patch_embed = PatchEmbed(num_patches)
        self.pos_embed = torch.randn(pos_embed_shape)

# Create a visual encoder with 16 patches (4x4 grid)
# pos_embed shape: (1, num_patches + num_extra_tokens, embedding_dim)
num_patches = 16
num_extra_tokens = 1
embedding_size = 4
visual_encoder = VisualEncoder(
    num_patches=num_patches,
    pos_embed_shape=(1, num_patches + num_extra_tokens, embedding_size)
)

# Create pos_embed_checkpoint with original size 2x2 (4 patches) + 1 extra token
# This will trigger interpolation from 2x2 to 4x4
orig_size = 2
orig_num_patches = orig_size * orig_size
pos_embed_checkpoint = torch.randn(1, orig_num_patches + num_extra_tokens, embedding_size)

ARGS = {
    "pos_embed_checkpoint": pos_embed_checkpoint,
    "visual_encoder": visual_encoder,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 3, dtype family float, shape (1, 17, 4) — shape (1, 17, 4) 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
itm_eval Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
salesforce/BLIP/eval_retrieval_video.py
code served (permissive licence) · get_code("e19e22cd7641eb82")
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 numpy as np
import torch

torch.manual_seed(0)

# scores_v2t: shape (num_videos, num_texts) - video to text similarity scores
# scores_t2v: shape (num_texts, num_videos) - text to video similarity scores
# txt2vmg: mapping from text index to video index
# vid2txt: mapping from video index to text index

num_videos = 2
num_texts = 3

# Create score matrices
scores_v2t = np.random.rand(num_videos, num_texts).astype(np.float32)
scores_t2v = np.random.rand(num_texts, num_videos).astype(np.float32)

# Create mappings
# vid2txt[i] tells us which text index corresponds to video i
vid2txt = np.array([1, 2], dtype=np.int64)  # video 0 -> text 1, video 1 -> text 2

# txt2vmg[i] tells us which video index corresponds to text i
txt2vmg = np.array([0, 0, 1], dtype=np.int64)  # text 0 -> video 0, text 1 -> video 0, text 2 -> video 1

ARGS = {
    'scores_v2t': scores_v2t,
    'scores_t2v': scores_t2v,
    'txt2vmg': txt2vmg,
    'vid2txt': vid2txt,
}
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
load_image Ran
ran, honoured the contract we drafted
salesforce/BLIP/predict.py
code served (permissive licence) · get_code("e564057cbee4961d")
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 4, dtype family float, shape (1, 3, 224, 224) 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 tempfile
from PIL import Image
import os

torch.manual_seed(0)

# Create a temporary image file
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple RGB image
pil_image = Image.new('RGB', (64, 64), color=(100, 150, 200))
pil_image.save(temp_image_path)

ARGS = {
    "image": temp_image_path,
    "image_size": 224,
    "device": torch.device("cpu")
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (1, 3, 224, 224) — shape (1, 3, 224, 224) 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
tile Ran
ran; our contract draft was wrong, not the code
salesforce/BLIP/models/blip_vqa.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from timmy-chan/miss, is pointer only (licence: NONE) · get_code("aa5a91226269bf75")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from timmy-chan/miss, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

all_gather_with_grad Not yet run
unverified (harvested, no recorded run)
salesforce/BLIP/models/blip_retrieval.py
code served (permissive licence) · get_code("0ec9fc2025c16f65")
How it ran

no invocation recorded.

concat_all_gather Not yet run
unverified (harvested, no recorded run)
salesforce/BLIP/models/blip_pretrain.py
code served (permissive licence) · get_code("73cecca9f3575f09")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 4 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
concat_all_gather 138 other papers
125 dated earlier, 1 later, 12 same year, order not determinable · 33 only as an assembly brick
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1905.04899 (2019-05)
CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 135 more not named here
all_gather_with_grad 91 other papers
80 dated earlier, 4 later, 7 same year, order not determinable · 2 only as an assembly brick
2206.02967 (2022-06)
Masked Unsupervised Self-training for Label-free Image Classification
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
2302.06605 (2023-02)
UniAdapter: Unified Parameter-Efficient Transfer Learning for Cross-modal Modeling
and 88 more not named here
tile 84 other papers
75 dated earlier, 3 later, 6 same year, order not determinable
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
2210.07795 (2022-10)
EfficientVLM: Fast and Accurate Vision-Language Models via Knowledge Distillation and Modal-adaptive Pruning
2210.08773 (2022-10)
Plug-and-Play VQA: Zero-shot VQA by Conjoining Large Pretrained Models with Zero Training
and 81 more not named here
interpolate_pos_embed 52 other papers
47 dated earlier, 1 later, 4 same year, order not determinable
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2111.09452 (2021-11)
Open Vocabulary Object Detection with Pseudo Bounding-Box Labels
2205.11169 (2022-05)
PEVL: Position-enhanced Pre-training and Prompt Tuning for Vision-language Models
and 49 more not named here
itm_eval 4 other papers
4 dated earlier
2205.10747 (2022-05)
Language Models with Image Descriptors are Strong Few-Shot Video-Language Learners
2308.10402 (2023-08)
Simple Baselines for Interactive Video Retrieval with Questions and Answers
2309.03874 (2023-09)
Box-based Refinement for Weakly Supervised and Unsupervised Localization Tasks
and 1 more not named here
load_image 1 other paper
1 dated earlier
2310.15061 (2023-10)
The BLA Benchmark: Investigating Basic Language Abilities of Pre-Trained Multimodal Models

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-23.

Repositories linked to this paper

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

Abstract

Recent concept-based interpretable models have succeeded in providing meaningful explanations by pre-defined concept sets. However, the dependency on the pre-defined concepts restricts the application because of the limited number of concepts for explanations. This paper proposes a novel interpretable deep neural network called explanation bottleneck models (XBMs). XBMs generate a text explanation from the input without pre-defined concepts and then predict a final task prediction based on the generated explanation by leveraging pre-trained vision-language encoder-decoder models. To achieve both the target task performance and the explanation quality, we train XBMs through the target task loss with the regularization penalizing the explanation decoder via the distillation from the frozen pre-trained decoder. Our experiments, including a comparison to state-of-the-art concept bottleneck models, confirm that XBMs provide accurate and fluent natural language explanations without pre-defined concept sets.

For agents

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

get_harvested_code_for_paper("aaai_35495")
get_code_for_paper("aaai_35495")
have("aaai_35495")

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

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

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

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

Connect an agent — have() is free.