SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1610.02391 · International Journal of Computer Vision · 2016

Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization

Abhishek Das, Ramakrishna Vedantam, Dhruv Batra, Devi Parikh, Ramprasaath Selvaraju, Michael Cogswell

arXiv · PDF · Open in the Atlas

Code that ran

90 of 141 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (32 of them constructed an object rather than computing a result; 6 honoured the contract we drafted, 4 violated it and 52 have no contract verdict; 28 failures of our instrument; 51 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/1610.02391.json · badge: /api/ran/1610.02391.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
tarolangner/mri-biometry community (classifier label)
classifier basis not recorded on the link
10 ran · 4 no recorded run
frgfm/torch-cam reimplementation (classifier label)
classifier basis: classifier_2025
5 ran · 3 no recorded run
olivesgatech/introspective-learning application (classifier label)
classifier basis: classifier_2025
5 ran · 2 no recorded run
tanjimin/grad-cam-pytorch-light reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 1 no recorded run
yaleCat/Grad-CAM-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
RuoyuChen10/objectdetection-saliency-maps extension (classifier label)
classifier basis: classifier_2025
4 ran · 0 no recorded run
FrancescoSaverioZuppichini/A-journey-into-Convolutional-Neural-Network-visualization- educational (classifier label)
classifier basis: classifier_2025
3 ran · 2 no recorded run
xn1997/pytorch-grad-cam reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
yiskw713/RISE reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
bill86416/trojan_attack application (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
Jmak12/Iris1 application (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
rshah240/conv_visualiser reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
sicara/tf-explain reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
shucheng-liu/TensorFlow_CAM reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
shyhyawJou/GradCAM-Tensorflow reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
shyhyawJou/Grad-CAM-pytorch alias (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
yiskw713/ClassActivationMapping reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
CMU-CREATE-Lab/deep-smoke-machine application (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
idiap/fullgrad-saliency reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
chenbys/GradCAM reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
betashort/ClassActivationMappings reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
rayanramoul/GradCAM alias (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
kalelpark/Mixture-of-Granularity-Specific-Experts-for-Fine-Grained-Categorization alias (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
hs2k/pytorch-smoothgrad alias (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
meliketoy/gradcam.pytorch alias (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
Base Ran
ran on a synthesized input · constructed an object; no result was computed
FrancescoSaverioZuppichini/A-journey-into-Convolutional-Neural-Network-visualization-/visualisation/core/GradCam.py
code served (permissive licence) · get_code("099574e8240176e2")
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 an instance of its own class, Base: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn

torch.manual_seed(0)

class SimpleModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

module = SimpleModule()
device = torch.device('cpu')

ARGS = {
    'module': module,
    'device': device
}
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 Base — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Base 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
CAM Ran
ran on a synthesized input · constructed an object; no result was computed
shyhyawJou/GradCAM-Tensorflow/cam.py
pointer only (licence: GPL-3.0) · get_code("b40654fd28e4f6f7")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/GradCAM-Tensorflow, is not in the permissive set Syntology serves inline. 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.

CAM Ran
ran on a synthesized input · constructed an object; no result was computed
yiskw713/RISE/cam.py
pointer only (licence: NONE) · get_code("ccbf7e877ee30c75")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/RISE 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.

CAM Ran
ran on a synthesized input · constructed an object; no result was computed
shyhyawJou/Grad-CAM-pytorch/cam.py
pointer only (licence: GPL-3.0) · get_code("2c487f5bd7a8571c")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/Grad-CAM-pytorch, is not in the permissive set Syntology serves inline. 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.

CAM Ran
ran on a synthesized input · constructed an object; no result was computed
yiskw713/ClassActivationMapping/cam.py
pointer only (licence: NONE) · get_code("8f0d006a8f574739")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/ClassActivationMapping 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.

CamExtractor Ran
ran on a synthesized input · constructed an object; no result was computed
CMU-CREATE-Lab/deep-smoke-machine/back-end/www/grad_cam_viz.py
code served (permissive licence) · get_code("ba9329f64192b8be")
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 an instance of its own class, CamExtractor: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
from torch.nn.parallel import DistributedDataParallel as DDP

torch.manual_seed(0)

class SimpleModel(nn.Module):
    """Minimal model that implements the required methods"""
    
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.linear = nn.Linear(8 * 4 * 4, 10)
    
    def extract_conv_output(self, x):
        """Extract convolutional output"""
        return self.conv(x)
    
    def conv_output_to_model_output(self, x):
        """Convert conv output to final model output"""
        x = x.view(x.size(0), -1)
        return self.linear(x)

model = SimpleModel()

ARGS = {
    "model": model
}
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 CamExtractor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CamExtractor 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
ExtractActiv Ran
ran on a synthesized input
rayanramoul/GradCAM/gradcam_detection.py
pointer only (licence: NONE) · get_code("f13b995ab6e30681")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rayanramoul/GradCAM 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.

FeatureExtractor Ran
ran on a synthesized input · constructed an object; no result was computed
bill86416/trojan_attack/gradcam.py
pointer only (licence: NONE) · get_code("10d20b57109d9ae7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bill86416/trojan_attack 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.

FeatureExtractor Ran
ran on a synthesized input
hs2k/pytorch-smoothgrad/lib/gradients.py
code served (permissive licence) · get_code("89dd77c495cb7992")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch.nn as nn

# Create a simple model with features and classifier
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 4, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.Conv2d(4, 8, kernel_size=3, padding=1),
            nn.ReLU(),
        )
        self.classifier = nn.Linear(8 * 4 * 4, 10)
    
    def forward(self, x):
        x = self.features(x)
        x = x.view(x.size(0), -1)
        x = self.classifier(x)
        return x

class FeatureExtractor(object):

    def __init__(self, model, target_layers):
        self.model = model
        self.features = model.features
        self.target_layers = target_layers
        self.gradients = []

    def __call__(self, x):
        target_activations, output = self.extract_features(x)
        output = output.view(output.size(0), -1)
        output = self.model.classifier(output)
        return (target_activations, output)

    def get_gradients(self):
        return self.gradients

    def save_gradient(self, grad):
        self.gradients.append(grad)

    def extract_features(self, x):
        outputs = []
        for name, module in self.features._modules.items():
            x = module(x)
            if name in self.target_layers:
                x.register_hook(self.save_gradient)
                outputs += [x]
        return (outputs, x)


model = SimpleModel()

INIT_ARGS = {
    'model': model,
    'target_layers': ['0', '2']
}

ARGS = {
    'x': torch.randn(2, 3, 4, 4)
}

extractor = FeatureExtractor(**INIT_ARGS)
target_activations, output = extractor(**ARGS)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FeatureExtractor Ran
ran on a synthesized input · constructed an object; no result was computed
Jmak12/Iris1/visualize.py
pointer only (licence: NONE) · get_code("07c7c47cddac61e9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jmak12/Iris1 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.

FeatureExtractor Ran
ran on a synthesized input
yaleCat/Grad-CAM-pytorch/grad_cam.py
pointer only (licence: NONE) · get_code("9300fa71da6a03fa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yaleCat/Grad-CAM-pytorch 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.

FeatureExtractor Ran
ran on a synthesized input
xn1997/pytorch-grad-cam/gradcam.py
code served (permissive licence) · get_code("c1454f1aedec4ea7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch.nn as nn

# Create a simple model to use with FeatureExtractor
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.layer2 = nn.ReLU()
        self.layer3 = nn.Conv2d(8, 16, kernel_size=3, padding=1)
        self.layer4 = nn.ReLU()
        self.layer5 = nn.AdaptiveAvgPool2d((1, 1))
        
    def _modules_items(self):
        return [
            ('layer1', self.layer1),
            ('layer2', self.layer2),
            ('layer3', self.layer3),
            ('layer4', self.layer4),
            ('layer5', self.layer5)
        ]

# Monkey-patch to make _modules behave like expected
model = SimpleModel()
model._modules = {
    'layer1': model.layer1,
    'layer2': model.layer2,
    'layer3': model.layer3,
    'layer4': model.layer4,
    'layer5': model.layer5
}

INIT_ARGS = {
    'model': model,
    'target_layers': ['layer3']
}

ARGS = {
    'x': torch.randn(2, 3, 8, 8)
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GRAD_CAM Ran
ran on a synthesized input · constructed an object; no result was computed
rshah240/conv_visualiser/cnn_visualiser/grad_cam.py
pointer only (licence: NONE) · get_code("fea7face990c0028")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rshah240/conv_visualiser 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
meliketoy/gradcam.pytorch/3_detector/grad_cam.py
code served (permissive licence) · get_code("171107b0fabeabec")
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 an instance of its own class, GradCAM: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
from collections import OrderedDict

torch.manual_seed(0)

# Create a minimal model that satisfies how GradCAM uses it
class SimpleModel(nn.Module):
    def __init__(self):
        super(SimpleModel, self).__init__()
        # Conv layer that will be hooked
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        # Fully connected layers for classification
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(8, 10)  # 10 classes
    
    def forward(self, x):
        x = self.conv1(x)
        x = torch.relu(x)
        x = self.pool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

# Instantiate model
model = SimpleModel()

ARGS = {
    "model": model,
    "cuda": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradCAM — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradCAM 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
GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
shyhyawJou/GradCAM-Tensorflow/cam.py
pointer only (licence: GPL-3.0) · get_code("4485b0cfe81a119d")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/GradCAM-Tensorflow, is not in the permissive set Syntology serves inline. 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
RuizhiZhang/MManGoCam/main-cascadedRCNN.py
code served (permissive licence) · get_code("3c3330e2987470a0")
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 an instance of its own class, GradCAM: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np

torch.manual_seed(0)

class SimpleAnchorGenerator(nn.Module):
    def __init__(self):
        super().__init__()
    
    def grid_anchors(self, featmap_sizes, device):
        # Return anchors for each level
        mlvl_anchors = []
        for size in featmap_sizes:
            h, w = size
            anchors = torch.zeros((h * w, 4), device=device)
            mlvl_anchors.append(anchors)
        return mlvl_anchors

class SimpleRPNHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.anchor_generator = SimpleAnchorGenerator()
        self.test_cfg = {'nms_pre': 2000, 'max_per_img': 1000}
    
    def forward(self, x):
        # Return cls_scores and bbox_preds
        cls_scores = [torch.randn(2, 3, 4, 5) for _ in range(2)]
        bbox_preds = [torch.randn(2, 12, 4, 5) for _ in range(2)]
        return (cls_scores, bbox_preds)
    
    def _get_bboxes_single(self, cls_score_list, bbox_pred_list, mlvl_anchors, 
                          img_shape, scale_factor, test_cfg, rescale):
        # Return some proposals
        return torch.randn(10, 5)

class SimpleBBoxHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc_cls = nn.Linear(256, 81)
        self.fc_bbox = nn.Linear(256, 320)
    
    def get_bboxes(self, rois, cls_score, bbox_pred, img_shape, scale_factor, 
                   rescale=True, cfg=None):
        # Return det_bboxes and det_labels
        num_proposals = rois.shape[0]
        det_bboxes = torch.randn(num_proposals, 5)
        det_labels = torch.randint(0, 80, (num_proposals,))
        return det_bboxes, det_labels

class SimpleRoIHead(nn.Module):
    def __init__(self):
        super().__init__()
        self.bbox_head = nn.ModuleList([SimpleBBoxHead() for _ in range(3)])
    
    def _bbox_forward(self, stage, x, rois):
        # Return bbox results with cls_score and bbox_pred
        batch_size = 2
        num_proposals = rois.shape[0]
        cls_score = torch.randn(num_proposals, 81)
        bbox_pred = torch.randn(num_proposals, 320)
        return {
            'cls_score': cls_score,
            'bbox_pred': bbox_pred
        }

class SimpleDetector(nn.Module):
    def __init__(self):
        super().__init__()
        self.backbone = nn.Linear(3, 256)
        self.rpn_head = SimpleRPNHead()
        self.roi_head = SimpleRoIHead()
        self.test_cfg = {
            'rpn': {'nms_pre': 2000, 'max_per_img': 1000},
            'rcnn': {'score_thr': 0.05, 'nms': {'type': 'nms', 'iou_threshold': 0.5}}
        }
    
    def extract_feat(self, img):
        # Return multi-level features
        batch_size = img.shape[0]
        features = [torch.randn(batch_size, 256, 4, 5) for _ in range(2)]
        return features
    
    def forward(self, x):
        return x

def bbox2roi(bbox_list):
    # Convert bbox list to rois tensor
    all_bboxes = []
    for i, bboxes in enumerate(bbox_list):
        if bboxes.numel() > 0:
            roi_indices = torch.full((bboxes.shape[0], 1), i, dtype=torch.float32)
            rois = torch.cat([roi_indices, bboxes[:, :4]], dim=1)
            all_bboxes.append(rois)
    if all_bboxes:
        return torch.cat(all_bboxes, dim=0)
    else:
        return torch.zeros((0, 5))

net = SimpleDetector()

img = torch.randn(2, 3, 64, 80)
img_metas = [
    {'img_shape': (64, 80), 'scale_factor': 1.0},
    {'img_shape': (64, 80), 'scale_factor': 1.0}
]

inputs = {
    'img': [img],
    'img_metas': img_metas
}

ARGS = {
    'net': net,
    'layer_name': 'backbone'
}
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 GradCAM — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradCAM 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
GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
fcUalberta/UAlberta-Multimedia-Masters-Program-Interpretable-AI-Part_1_2/code/cam.py
pointer only (licence: AGPL-3.0) · get_code("7b7f3def3eefc7ba")
How it ran

The body of this sample is withheld: AGPL-3.0, as GitHub detects it on this paper's repository, fcUalberta/UAlberta-Multimedia-Masters-Program-Interpretable-AI-Part_1_2, is not in the permissive set Syntology serves inline. 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
idiap/fullgrad-saliency/saliency/gradcam.py
pointer only (licence: NOASSERTION) · get_code("87c8a68573192f7d")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, idiap/fullgrad-saliency (NOASSERTION). 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.

GradCAM Ran
ran; our contract draft was wrong, not the code
Wordbe/GradCAM3D/gradCAM.py
pointer only (licence: NONE) · get_code("79d43280865942df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Wordbe/GradCAM3D 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
yiskw713/RISE/cam.py
pointer only (licence: NONE) · get_code("8d916093e389e03d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/RISE 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
shyhyawJou/Grad-CAM-pytorch/cam.py
pointer only (licence: GPL-3.0) · get_code("ce5d79c87df1bb90")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, shyhyawJou/Grad-CAM-pytorch, is not in the permissive set Syntology serves inline. 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
TooTouch/WhiteBox-Part1/code/saliency/attribution_methods.py
code served (permissive licence) · get_code("adb4a049c6347e37")
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 an instance of its own class, GradCAM: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np
from collections import OrderedDict

torch.manual_seed(0)

# Create a minimal model that satisfies GradCAM's usage
class MinimalModel(nn.Module):
    def __init__(self):
        super(MinimalModel, self).__init__()
        # GradCAM looks for self.model._modules.get(self.seq_name)
        # Default seq_name is 'features'
        self.features = nn.Sequential(
            nn.Conv2d(3, 8, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.Conv2d(8, 16, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(16, 32, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(64, 128, kernel_size=3, padding=1),
            nn.ReLU(),
        )
        self.classifier = nn.Sequential(
            nn.AdaptiveAvgPool2d((1, 1)),
            nn.Flatten(),
            nn.Linear(128, 10)
        )
    
    def forward(self, x):
        x = self.features(x)
        x = self.classifier(x)
        return x

model = MinimalModel()

ARGS = {
    'model': model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, cv2, h5py, numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradCAM — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradCAM 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
GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
yiskw713/ClassActivationMapping/cam.py
pointer only (licence: NONE) · get_code("c82843c1e2f6fb2d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/ClassActivationMapping 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.

GradCAM Ran
ran on a synthesized input · constructed an object; no result was computed
priyavrat-misra/xrays-and-gradcam/grad_cam.py
code served (permissive licence) · get_code("c62735404ddccf93")
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 an instance of its own class, GradCAM: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import numpy as np
import cv2

torch.manual_seed(0)

# Build a minimal model that satisfies GradCAM's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 8, kernel_size=3, padding=1)
        self.fc = nn.Linear(8 * 4 * 4, 10)
    
    def forward(self, x):
        x = self.conv1(x)
        x = torch.relu(x)
        x = torch.nn.functional.avg_pool2d(x, 2)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

model = SimpleModel()
target_layer = model.conv1

# Create a small test image tensor (batch_size=1, channels=3, height=8, width=8)
# The model's forward pass expects this shape and outputs will be pooled to 4x4
image = torch.randn(1, 3, 8, 8)

ARGS = {
    'model': model,
    'target_layer': target_layer
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradCAM — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradCAM 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
GradCAM Ran
ran on a synthesized input
yiskw713/scorecam/cam.py
pointer only (licence: NONE) · get_code("959290cf8e14b7e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/scorecam 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.

GradCAMExtractor Ran
ran on a synthesized input · constructed an object; no result was computed
idiap/fullgrad-saliency/saliency/gradcam.py
pointer only (licence: NOASSERTION) · get_code("fa8c8b570257fbdc")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, idiap/fullgrad-saliency (NOASSERTION). 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.

GradCam Ran
ran on a synthesized input · constructed an object; no result was computed
bill86416/trojan_attack/gradcam.py
pointer only (licence: NONE) · get_code("df5909def3af773a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bill86416/trojan_attack 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.

GradCam Ran
ran on a synthesized input · constructed an object; no result was computed
CMU-CREATE-Lab/deep-smoke-machine/back-end/www/grad_cam_viz.py
code served (permissive licence) · get_code("6d284ca43a9b5dd9")
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 an instance of its own class, GradCam: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch.nn as nn
import numpy as np
from torch.nn.parallel import DistributedDataParallel as DDP

torch.manual_seed(0)

class SimpleConvModel(nn.Module):
    """Minimal model that implements the required methods for GradCam"""
    def __init__(self):
        super().__init__()
        self.conv_layers = nn.Sequential(
            nn.Conv3d(3, 8, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.Conv3d(8, 16, kernel_size=3, padding=1),
            nn.ReLU()
        )
        self.classifier = nn.Linear(16 * 4 * 3 * 2, 10)
    
    def extract_conv_output(self, x):
        """Extract conv output - returns intermediate conv features"""
        return self.conv_layers(x)
    
    def conv_output_to_model_output(self, x):
        """Convert conv output to final model output"""
        batch_size = x.shape[0]
        x = x.view(batch_size, -1)
        return self.classifier(x)

model = SimpleConvModel()
model.eval()

input_tensor = torch.randn(2, 3, 4, 3, 2, requires_grad=True)

ARGS = {
    "model": model,
    "use_cuda": False,
    "normalize": True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GradCam — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradCam 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
GradCam Ran
ran on a synthesized input · constructed an object; no result was computed
chenbys/GradCAM/grad-cam.py
pointer only (licence: NONE) · get_code("8fb5d356c50f1968")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, chenbys/GradCAM 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.

GradCam Ran
ran on a synthesized input · constructed an object; no result was computed
betashort/ClassActivationMappings/Grad-CAM/grad_cam_resnet.py
pointer only (licence: NONE) · get_code("ec189ee1d711ec6d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, betashort/ClassActivationMappings 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.

GradCam Ran
ran on a synthesized input · constructed an object; no result was computed
Jmak12/Iris1/visualize.py
pointer only (licence: NONE) · get_code("9184359e1be56200")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jmak12/Iris1 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.

GradCam Ran
ran on a synthesized input
kalelpark/Mixture-of-Granularity-Specific-Experts-for-Fine-Grained-Categorization/models/grad_cam.py
code served (permissive licence) · get_code("a38a20a9c992fde8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
import torch
import torch.nn as nn
import torch.nn.functional as F

# Define a simple model with feature_extractor and classifier
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 4, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.Conv2d(4, 8, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
        )
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
        self.classifier = nn.Linear(8, 2)
    
    def forward(self, x):
        x = self.features(x)
        x = self.pool(x).squeeze()
        if x.dim() == 1:
            x = x.unsqueeze(0)
        x = self.classifier(x)
        return x

model = SimpleModel()
feature_extractor = model.features
classifier = model.classifier
target_layers = ['1']

INIT_ARGS = {
    'model': model,
    'feature_extractor': feature_extractor,
    'classifier': classifier,
    'target_layer_names': target_layers,
    'use_cuda': False,
}

# Create input tensor: batch_size=2, channels=3, height=4, width=4
input_tensor = torch.randn(2, 3, 4, 4, requires_grad=True)

ARGS = {
    'input': input_tensor,
    'index': None,
}

METHOD = '__call__'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GradCam Ran
ran on a synthesized input
yaleCat/Grad-CAM-pytorch/grad_cam.py
pointer only (licence: NONE) · get_code("1027db430e6c0383")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yaleCat/Grad-CAM-pytorch 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.

GradCam Ran
ran on a synthesized input
xn1997/pytorch-grad-cam/gradcam.py
code served (permissive licence) · get_code("efd3cde45d4d1d95")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned ndarray, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch
import torch.nn as nn
import numpy as np

# Create a simple CNN model to use with GradCam
class SimpleCNN(nn.Module):
    def __init__(self):
        super(SimpleCNN, self).__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 8, kernel_size=3, padding=1),
            nn.ReLU(),
            nn.Conv2d(8, 16, kernel_size=3, padding=1),
            nn.ReLU()
        )
        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.classifier = nn.Linear(16, 5)
    
    def forward(self, x):
        x = self.features(x)
        x = self.avgpool(x)
        x = x.view(x.size(0), -1)
        x = self.classifier(x)
        return x

# Instantiate the model
model = SimpleCNN()

# Get the feature module (the part we want to extract features from)
feature_module = model.features

# Target layer names - these are the keys in the feature_module._modules dict
target_layer_names = ['1']  # This corresponds to the first ReLU layer

# Create input tensor
input_tensor = torch.randn(1, 3, 8, 6)

INIT_ARGS = {
    'model': model,
    'feature_module': feature_module,
    'target_layer_names': target_layer_names,
    'use_cuda': False
}

ARGS = {
    'input': input_tensor,
    'index': None
}

METHOD = '__call__'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
GradCamUtils Ran
ran on a synthesized input · constructed an object; no result was computed
sauravmishra1710/EXPLAINABLE-AI---Skin-Cancer-Detection-explained-with-GRADCAM/GradCamUtility.py
pointer only (licence: NONE) · get_code("537d0382e6ee2d24")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, sauravmishra1710/EXPLAINABLE-AI---Skin-Cancer-Detection-explained-with-GRADCAM 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.

GradCamUtils Ran
ran on a synthesized input
sauravmishra1710/Malaria-Detection-Using-Deep-Learning-Techniques/Code Files/GradCamUtility.py
pointer only (licence: CC-BY-SA-4.0) · get_code("f9557c99ffcc4fe4")
How it ran

The body of this sample is withheld: CC-BY-SA-4.0, as GitHub detects it on this paper's repository, sauravmishra1710/Malaria-Detection-Using-Deep-Learning-Techniques, is not in the permissive set Syntology serves inline. 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.

GradVisualiser Ran
ran on a synthesized input · constructed an object; no result was computed
rshah240/conv_visualiser/cnn_visualiser/grad_cam.py
pointer only (licence: NONE) · get_code("11b36dd0fac78bfe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, rshah240/conv_visualiser 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.

GradientLocalizaton Ran
ran on a synthesized input · constructed an object; no result was computed
teddykoker/image-forensics/grad_loc.py
pointer only (licence: NONE) · get_code("66d0839a1bc10905")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, teddykoker/image-forensics 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.

InfoHolder Ran
ran on a synthesized input · constructed an object; no result was computed
tanjimin/grad-cam-pytorch-light/grad_cam.py
pointer only (licence: GPL-3.0) · get_code("163c1dfc0dabe49e")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, tanjimin/grad-cam-pytorch-light, is not in the permissive set Syntology serves inline. 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.

ModelOutputs Ran
ran on a synthesized input
bill86416/trojan_attack/gradcam.py
pointer only (licence: NONE) · get_code("b34263130eb4f785")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, bill86416/trojan_attack 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.

ModelOutputs Ran
ran on a synthesized input · constructed an object; no result was computed
betashort/ClassActivationMappings/Grad-CAM/grad_cam_resnet.py
pointer only (licence: NONE) · get_code("31e1dad8a599d167")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, betashort/ClassActivationMappings 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.

ModelOutputs Ran
ran on a synthesized input · constructed an object; no result was computed
Jmak12/Iris1/visualize.py
pointer only (licence: NONE) · get_code("9a94fa7ebd53e4ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Jmak12/Iris1 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.

Net Ran
ran on a synthesized input
tarolangner/mri-biometry/cnn/models/net_resnet.py
code served (permissive licence) · get_code("0880f9ea06216a02")
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 ResNet. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_classes': 1,
    'num_channels': 1,
    'dim': 1,
}
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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
Net Ran
ran on a synthesized input
tarolangner/mri-biometry/cnn/models/net_vgg.py
code served (permissive licence) · get_code("71daed23b5edccf2")
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 VGG. 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 torch.nn as nn

torch.manual_seed(0)

# Define arguments for Net function
ARGS = {
    'num_classes': 1,
    'num_channels': 1,
    'dim': (32, 32)  # tuple of spatial dimensions; will be divided by 2^5 in classifier
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
SaveValues Ran
ran on a synthesized input · constructed an object; no result was computed
yiskw713/RISE/cam.py
pointer only (licence: NONE) · get_code("91be23c9a93de964")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yiskw713/RISE 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.

_BaseWrapper Ran
ran on a synthesized input
kazuto1011/grad-cam-pytorch/grad_cam.py
code served (permissive licence) · get_code("d07cabecb23b2d3d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned sort. 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 torch.nn as nn
from torch.nn import functional as F

class _BaseWrapper(object):

    def __init__(self, model):
        super(_BaseWrapper, self).__init__()
        self.device = next(model.parameters()).device
        self.model = model
        self.handlers = []

    def _encode_one_hot(self, ids):
        one_hot = torch.zeros_like(self.logits).to(self.device)
        one_hot.scatter_(1, ids, 1.0)
        return one_hot

    def forward(self, image):
        self.image_shape = image.shape[2:]
        self.logits = self.model(image)
        self.probs = F.softmax(self.logits, dim=1)
        return self.probs.sort(dim=1, descending=True)

    def backward(self, ids):
        """
        Class-specific backpropagation
        """
        one_hot = self._encode_one_hot(ids)
        self.model.zero_grad()
        self.logits.backward(gradient=one_hot, retain_graph=True)

    def generate(self):
        raise NotImplementedError

    def remove_hook(self):
        """
        Remove all the forward/backward hook functions
        """
        for handle in self.handlers:
            handle.remove()


class SimpleModel(nn.Module):
    def __init__(self, in_channels=3, num_classes=5):
        super(SimpleModel, self).__init__()
        self.conv = nn.Conv2d(in_channels, 8, kernel_size=3, padding=1)
        self.pool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(8, num_classes)
    
    def forward(self, x):
        x = self.conv(x)
        x = F.relu(x)
        x = self.pool(x)
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x


model = SimpleModel(in_channels=3, num_classes=5)

INIT_ARGS = {
    'model': model
}

ARGS = {
    'image': torch.randn(2, 3, 8, 6)
}

METHOD = 'forward'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type sort — a sort 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
_resolve_targets Ran
ran; our contract draft was wrong, not the code
frgfm/torch-cam/torchcam/methods/gradient.py
code served (permissive licence) · get_code("76f79dc2ac020f54")
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 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 torch
import torch.nn as nn
from typing import Any, Callable

torch.manual_seed(0)

# Define OutputTarget type
OutputTarget = Callable[[Any], torch.Tensor]

# Create simple callable targets
def target_fn_1(x: Any) -> torch.Tensor:
    return torch.tensor([1.0, 2.0, 3.0, 4.0])

def target_fn_2(x: Any) -> torch.Tensor:
    return torch.tensor([5.0, 6.0, 7.0, 8.0])

def target_fn_3(x: Any) -> torch.Tensor:
    return torch.tensor([9.0, 10.0, 11.0, 12.0])

# Test case 1: single callable target with batch_size=2
# Test case 2: list of callables matching batch_size=3

ARGS = {
    "targets": target_fn_1,
    "batch_size": 2
}
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 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
_target_scores Ran
ran; our contract draft was wrong, not the code
frgfm/torch-cam/torchcam/methods/gradient.py
code served (permissive licence) · get_code("46de4ec745801979")
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 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
from torch import Tensor, nn
from collections.abc import Callable
from typing import Any

torch.manual_seed(0)

# Define a simple target function that takes a sample and returns a scalar tensor
def target_fn_1(sample: Any) -> Tensor:
    if isinstance(sample, Tensor):
        return torch.tensor(sample.sum(), dtype=torch.float32)
    return torch.tensor(1.0, dtype=torch.float32)

def target_fn_2(sample: Any) -> Tensor:
    if isinstance(sample, Tensor):
        return torch.tensor(sample.mean(), dtype=torch.float32)
    return torch.tensor(2.0, dtype=torch.float32)

# Create a batch of tensor outputs (batch_size=2, feature_dim=4)
output = torch.randn(2, 4)

# Test case 1: single callable target (will be replicated for batch_size)
targets_single = target_fn_1

# Test case 2: list of callables matching batch size
targets_list = [target_fn_1, target_fn_2]

ARGS = {
    "output": output,
    "targets": targets_single
}
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 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
calculateFractions Ran
ran on a synthesized input
tarolangner/mri-biometry/dicomToProjection/convertDicoms.py
code served (permissive licence) · get_code("14b78cd49b30e9b5")
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, ndim 4, 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
from skimage import filters

# Create small test volumes
# volume_w and volume_f should be 3D arrays (z, y, x) based on indexing in the function
# The function accesses volume_sum[:, i, :] in a loop over range(volume_sum.shape[1])
# This suggests shape is (z_dim, y_dim, x_dim)

np.random.seed(0)

# Create small 3D volumes with shape (4, 3, 5)
# Dimension 0: z-axis (4)
# Dimension 1: y-axis (3) - the one being iterated over
# Dimension 2: x-axis (5)
volume_w = np.random.rand(4, 3, 5).astype(np.float32) * 100
volume_f = np.random.rand(4, 3, 5).astype(np.float32) * 100

ARGS = {
    'volume_w': volume_w,
    'volume_f': volume_f,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
tarolangner/mri-biometry/cnn/models/net_resnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
tarolangner/mri-biometry/cnn/models/net_resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, 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.

correspond_box Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
RuoyuChen10/objectdetection-saliency-maps/version2.25.2/PointGame-GradCAM.py
pointer only (licence: NONE) · get_code("c7da5b997db565f5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, RuoyuChen10/objectdetection-saliency-maps 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.

deprocess_image Ran
ran, violated the contract we drafted
yaleCat/Grad-CAM-pytorch/grad_cam.py
pointer only (licence: NONE) · get_code("672d3d84a89bbafa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, yaleCat/Grad-CAM-pytorch 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.

find_alexnet_layer Ran
ran; our contract draft was wrong, not the code
olivesgatech/introspective-learning/Introspective Explanations/methods.py
code served (permissive licence) · get_code("d62f440cb30418f7")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal AlexNet-like architecture with features and classifier
class MinimalAlexNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 8, kernel_size=3, stride=1, padding=1),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=2, stride=2),
            nn.Conv2d(8, 16, kernel_size=3, stride=1, padding=1),
            nn.ReLU(inplace=True),
        )
        self.classifier = nn.Sequential(
            nn.Linear(16 * 2 * 2, 32),
            nn.ReLU(inplace=True),
            nn.Linear(32, 10),
        )
    
    def forward(self, x):
        x = self.features(x)
        x = x.view(x.size(0), -1)
        x = self.classifier(x)
        return x

# Instantiate the model
arch = MinimalAlexNet()

# The function uses target_layer_name by splitting it on '_'
# and accessing arch.features, then optionally indexing into it
target_layer_name = 'features_0'

ARGS = {
    'arch': arch,
    'target_layer_name': target_layer_name,
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
find_densenet_layer Ran
ran; our contract draft was wrong, not the code
olivesgatech/introspective-learning/Introspective Explanations/methods.py
code served (permissive licence) · get_code("c7177db10d417c6e")
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 BatchNorm2d. 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal DenseNet-like architecture that supports the hierarchical layer access
class MinimalDenseLayer(nn.Module):
    def __init__(self):
        super().__init__()
        self.norm1 = nn.BatchNorm2d(4)
        self.conv1 = nn.Conv2d(4, 4, 3, padding=1)
    
    def forward(self, x):
        return self.conv1(self.norm1(x))

class MinimalDenseBlock(nn.Module):
    def __init__(self):
        super().__init__()
        self.denselayer1 = MinimalDenseLayer()
        self.denselayer12 = MinimalDenseLayer()
    
    def forward(self, x):
        return x

class MinimalTransition(nn.Module):
    def __init__(self):
        super().__init__()
        self.norm = nn.BatchNorm2d(4)
        self.conv = nn.Conv2d(4, 4, 1)
    
    def forward(self, x):
        return self.conv(self.norm(x))

class MinimalDenseNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential()
        self.features._modules['transition1'] = MinimalTransition()
        self.features._modules['denseblock2'] = MinimalDenseBlock()
        self.classifier = nn.Linear(4, 10)
    
    def forward(self, x):
        x = self.features(x)
        return self.classifier(x.mean(dim=[2, 3]))

# Create the model
arch = MinimalDenseNet()

# Test various target layer names based on the docstring examples
target_layer_name = 'features_denseblock2_denselayer12_norm1'

ARGS = {
    'arch': arch,
    'target_layer_name': target_layer_name
}
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 BatchNorm2d — a BatchNorm2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a BatchNorm2d 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
find_resnet_layer Ran
ran; our contract draft was wrong, not the code
olivesgatech/introspective-learning/Introspective Explanations/methods.py
code served (permissive licence) · get_code("949ba457479a122e")
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 ReLU. 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 torch.nn as nn

# Create a minimal ResNet-like architecture
class BasicBlock(nn.Module):
    def __init__(self, in_channels, out_channels):
        super().__init__()
        self.conv1 = nn.Conv2d(in_channels, out_channels, 3, padding=1)
        self.relu = nn.ReLU(inplace=True)
        self.conv2 = nn.Conv2d(out_channels, out_channels, 3, padding=1)
        
    def forward(self, x):
        out = self.conv1(x)
        out = self.relu(out)
        out = self.conv2(out)
        return out

class Bottleneck(nn.Module):
    def __init__(self, in_channels, out_channels):
        super().__init__()
        self.conv1 = nn.Conv2d(in_channels, out_channels // 4, 1)
        self.conv2 = nn.Conv2d(out_channels // 4, out_channels // 4, 3, padding=1)
        self.conv3 = nn.Conv2d(out_channels // 4, out_channels, 1)
        self.relu = nn.ReLU(inplace=True)
        self.downsample = nn.Sequential(
            nn.Conv2d(in_channels, out_channels, 1),
            nn.BatchNorm2d(out_channels)
        )
        
    def forward(self, x):
        return x

class MinimalResNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 64, 7, stride=2, padding=3)
        self.layer1 = nn.ModuleList([
            BasicBlock(64, 64),
            BasicBlock(64, 64),
        ])
        self.layer2 = nn.ModuleList([
            Bottleneck(64, 128),
            Bottleneck(128, 128),
        ])
        self.layer3 = nn.ModuleList([
            BasicBlock(128, 128),
        ])
        self.layer4 = nn.ModuleList([
            BasicBlock(128, 128),
        ])
        self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
        self.fc = nn.Linear(128, 10)
        
    def forward(self, x):
        x = self.conv1(x)
        return x

torch.manual_seed(0)
arch = MinimalResNet()

ARGS = {
    'arch': arch,
    'target_layer_name': 'layer1_basicblock0_relu'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
find_squeezenet_layer Ran
ran; our contract draft was wrong, not the code
olivesgatech/introspective-learning/Introspective Explanations/methods.py
code served (permissive licence) · get_code("18f9737b8f4e080c")
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 ReLU. 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 torch.nn as nn

torch.manual_seed(0)

class SqueezeNetMock(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 64, 3),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(64, 64, 3),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(64, 128, 3),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(128, 128, 3),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(2, 2),
            nn.Conv2d(128, 256, 3),
            nn.ReLU(inplace=True),
        )
        
        self.features._modules['12'] = nn.Sequential(
            nn.Conv2d(256, 128, 1),
            nn.ReLU(inplace=True),
            nn.Conv2d(128, 256, 3, padding=1),
            nn.ReLU(inplace=True),
        )
        self.features._modules['12']._modules['expand3x3'] = nn.Conv2d(128, 256, 3, padding=1)
        self.features._modules['12']._modules['expand3x3_activation'] = nn.ReLU(inplace=True)

arch = SqueezeNetMock()

ARGS = {
    'arch': arch,
    'target_layer_name': 'features_12_expand3x3_activation',
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
find_vgg_layer Ran
ran; our contract draft was wrong, not the code
olivesgatech/introspective-learning/Introspective Explanations/methods.py
code served (permissive licence) · get_code("3cc30f5dcbd33349")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal VGG-like architecture
class MinimalVGG(nn.Module):
    def __init__(self):
        super().__init__()
        self.features = nn.Sequential(
            nn.Conv2d(3, 16, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.Conv2d(16, 32, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
            nn.MaxPool2d(kernel_size=2, stride=2),
            nn.Conv2d(32, 64, kernel_size=3, padding=1),
            nn.ReLU(inplace=True),
        )
        self.classifier = nn.Sequential(
            nn.Linear(64 * 112 * 112, 128),
            nn.ReLU(inplace=True),
            nn.Linear(128, 10),
        )

arch = MinimalVGG()

# Test cases for different target_layer_name patterns
ARGS = {
    "arch": arch,
    "target_layer_name": "features_2"
}
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 Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
formatSliceFF Ran
ran on a synthesized input
tarolangner/mri-biometry/dicomToProjection/convertDicoms.py
code served (permissive licence) · get_code("f016cebab14589d7")
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 int, shape (1, 176, 376) 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
import cv2

# Create valid arguments for formatSliceFF function
# The function expects:
# - volume: 3D numpy array (shape: D x H x W)
# - mask: 3D numpy array (shape: D x H x W, binary mask)

# Create a 3D volume with shape (5, 30, 4)
# Dimensions: depth=5, height=30, width=4
volume = np.random.randint(100, 600, size=(5, 30, 4)).astype(np.float32)

# Create a corresponding 3D mask with shape (5, 30, 4)
# The mask should have some nonzero values for the function to work properly
mask = np.zeros((5, 30, 4), dtype=np.uint8)
# Add some nonzero values to the mask in various regions
mask[1:4, 5:20, 1:3] = 1  # Add foreground region
mask[0:2, 10:15, :] = 1   # Add another region for sag computation

ARGS = {
    "volume": volume,
    "mask": mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 int, shape (1, 176, 376) — shape (1, 176, 376) 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
gen_cam Ran
ran, honoured the contract we drafted
RuoyuChen10/objectdetection-saliency-maps/version2.25.2/gradcam-retinanet.py
pointer only (licence: NONE) · get_code("caa80e41718ce829")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, RuoyuChen10/objectdetection-saliency-maps 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.

Showing the first 60. An agent gets every one from get_harvested_code_for_paper("1610.02391").

Also present in other papers' code

Of 141 samples lifted from this paper's linked repositories, 141 carry a function identity and 0 do not. Of the 140 distinct functions with an identity, 16 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 1 the same month, 16 later) and 124 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
conv3x3 686 other papers
15 dated earlier, 1 the same month, 670 later · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
conv1x1 431 other papers
7 dated earlier, 423 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
vgg11 10 other papers
10 later
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
136780474 (2022 (year only))
Hourglass Attention Network for Image Inpainting
and 7 more not named here
swin_reshape_transform 5 other papers
1 dated earlier, 4 later
1512.04150 (2015-12)
Learning Deep Features for Discriminative Localization
1710.11063 (2017-10)
Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks
1908.01224 (2019-08)
Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models
and 2 more not named here
vit_reshape_transform 5 other papers
1 dated earlier, 4 later
1512.04150 (2015-12)
Learning Deep Features for Discriminative Localization
1710.11063 (2017-10)
Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks
1908.01224 (2019-08)
Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models
and 2 more not named here
relu 3 other papers
3 later
1802.09419 (2018-02)
Stochastic Hyperparameter Optimization through Hypernetworks
1811.00145 (2018-11)
Scalable End-to-End Autonomous Vehicle Testing via Rare-event Simulation
2102.10058 (2021-02)
Principled Simplicial Neural Networks for Trajectory Prediction
preprocess_image 2 other papers
2 later
2008.02312 (2020-08)
Axiom-based Grad-CAM: Towards Accurate Visualization and Explanation of CNNs
ijcai2022_0442 (2022 (year only))
Libra-CAM: An Activation-Based Attribution Based on the Linear Approximation of Deep Neural Nets and Threshold Calibration
correspond_box 1 other paper
1 later
2006.03204 (2020-06)
Black-box Explanation of Object Detectors via Saliency Maps
deprocess_image 1 other paper
1 later
2211.03064 (2022-11)
ViT-CX: Causal Explanation of Vision Transformers
grad_cam
brick of this paper's assembly: entry
1 other paper
1 later
1710.11063 (2017-10)
Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks
iou 1 other paper
1 later
2006.03204 (2020-06)
Black-box Explanation of Object Detectors via Saliency Maps
maximum_point 1 other paper
1 later
2006.03204 (2020-06)
Black-box Explanation of Object Detectors via Saliency Maps
module2traced
brick of this paper's assembly: helper
1 other paper
1 later
2105.14944 (2021-05)
The effectiveness of feature attribution methods and its correlation with automatic evaluation scores
normalize 1 other paper
1 later
1710.07557 (2017-10)
Real-time Convolutional Neural Networks for Emotion and Gender Classification
preprocess_image 1 other paper
1 later
2106.03511 (2021-06)
Task-driven Semantic Coding via Reinforcement Learning
target_category_loss_output_shape 1 other paper
1 later
1710.07557 (2017-10)
Real-time Convolutional Neural Networks for Emotion and Gender Classification

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

More are linked than shown here.

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

Abstract

We propose a technique for producing 'visual explanations' for decisions from a large class of Convolutional Neural Network (CNN)-based models, making them more transparent and explainable. Our approach -Gradient-weighted Class Activation Mapping (Grad-CAM), uses the gradients of any target concept (say 'dog' in a classification network or a sequence of words in captioning network) flowing into the final convolutional layer to produce a coarse localization map highlighting the important regions in the image for predicting the concept. Unlike previous approaches, Grad-CAM is applicable to a wide variety of CNN model-families: (1) CNNs with fullyconnected layers (e.g. VGG), (2) CNNs used for structured outputs (e.g. captioning), (3) CNNs used in tasks with multimodal inputs (e.g. visual question answering) or reinforcement learning, all without architectural changes or re-training. We combine Grad-CAM with existing fine-grained visualizations to create a high-resolution class-discriminative vi-

For agents

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

get_harvested_code_for_paper("1610.02391")
get_code_for_paper("1610.02391")
have("1610.02391")

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

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

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

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

Connect an agent — have() is free.