SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.04800 · ECCV · 2022

The Abduction of Sherlock Holmes: A Dataset for Visual Abductive Reasoning

Chandra Bhagavatula, Rowan Zellers, Yejin Choi, Kate Saenko, Anna Rohrbach, Jae Park, Jack Hessel, Jena Hwang

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2202.04800.json · badge: /api/ran/2202.04800.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
lunaproject22/rpa community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
FunctionStatusWhere it lives
autocontrast_func Ran
ran on a synthesized input
lunaproject22/rpa/images/randaugment.py
code served (permissive licence) · get_code("480e30b5df38e0fc")
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 (8, 12, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np

# Create a small test image with 3 channels (BGR format for OpenCV)
# Using uint8 dtype as required by cv2.calcHist and cv2.split
test_img = np.random.randint(0, 256, (8, 12, 3), dtype=np.uint8)

# Create an optional mask with same spatial dimensions
test_mask = np.ones((8, 12), dtype=np.uint8)

ARGS = {
    "img": test_img,
    "cutoff": 0,
    "mask": None,
}
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 (8, 12, 3) — shape (8, 12, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clip_forward Ran
ran on a synthesized input
lunaproject22/rpa/leaderboard_eval/clip_leaderboard/clip_inference_iterator.py
code served (permissive licence) · get_code("bd5fff3dc2dc17b2")
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 3, 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

torch.manual_seed(0)

class MockCLIPModel(nn.Module):
    def __init__(self, image_feat_dim=4, text_feat_dim=4):
        super().__init__()
        self.image_feat_dim = image_feat_dim
        self.text_feat_dim = text_feat_dim
        self.logit_scale = nn.Parameter(torch.tensor(1.0))
    
    def encode_image(self, image):
        # image: (batch, channels, height, width) or similar
        batch_size = image.shape[0]
        return torch.randn(batch_size, self.image_feat_dim)
    
    def encode_text(self, text):
        # text: token indices or embeddings
        batch_size = text.shape[0]
        return torch.randn(batch_size, self.text_feat_dim)

model = MockCLIPModel(image_feat_dim=4, text_feat_dim=4)

# Test with 4D image tensor (batch, channels, height, width)
image_4d = torch.randn(2, 3, 8, 8)

# Test with text tensor (batch, seq_len)
text = torch.randint(0, 100, (2, 5))

ARGS = {
    "model": model,
    "image": image_4d,
    "text": text,
    "only_features": True
}
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 tuple, ndim 3, 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
clip_forward_image Ran
ran on a synthesized input
lunaproject22/rpa/leaderboard_eval/clip_leaderboard/clip_inference_iterator.py
code served (permissive licence) · get_code("a456fba9a4b4a6b2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockCLIPModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.projection = nn.Linear(8, 4)
    
    def encode_image(self, image):
        # image shape: (batch, 3, height, width) or similar
        # return encoded features of shape (batch, 4)
        batch_size = image.shape[0]
        # Simple mock: just project to feature dimension
        features = torch.randn(batch_size, 4)
        return features

model = MockCLIPModel()

# Test case 1: 4D image tensor (batch, channels, height, width)
image_4d = torch.randn(2, 3, 8, 8)

# Test case 2: 5D image tensor (batch, 2, channels, height, width)
image_5d = torch.randn(2, 2, 3, 8, 8)

# Use 5D image to exercise both branches
image = image_5d

ARGS = {
    "model": model,
    "image": image,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clip_forward_text Ran
ran on a synthesized input
lunaproject22/rpa/leaderboard_eval/clip_leaderboard/clip_inference_iterator.py
code served (permissive licence) · get_code("5ab00467725c0903")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockCLIPModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.text_projection = nn.Linear(4, 3)
    
    def encode_text(self, text):
        # text is a tensor of shape (batch_size, seq_len) or similar
        # return encoded features of shape (batch_size, feature_dim)
        if isinstance(text, torch.Tensor):
            batch_size = text.shape[0]
        else:
            batch_size = 2
        return self.text_projection(torch.randn(batch_size, 4))

model = MockCLIPModel()
text = torch.randint(0, 100, (2, 5))

ARGS = {
    "model": model,
    "text": text,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
equalize_func Ran
ran on a synthesized input
lunaproject22/rpa/images/randaugment.py
code served (permissive licence) · get_code("6686455a295a4e15")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import cv2
import numpy as np

# Create a small test image
# The function expects a multi-channel image (like BGR from cv2)
# Using shape (4, 3, 3) - height=4, width=3, channels=3
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create a mask with the same spatial dimensions
mask = np.random.randint(0, 2, size=(4, 3), dtype=np.uint8)

ARGS = {
    "img": img,
    "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 tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
identity_func Ran
ran on a synthesized input
lunaproject22/rpa/images/randaugment.py
code served (permissive licence) · get_code("79b8769b61433979")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small image tensor (batch=2, channels=3, height=4, width=4)
img = torch.randn(2, 3, 4, 4)

# Create a small mask tensor (batch=2, height=4, width=4)
mask = torch.randint(0, 2, (2, 4, 4))

ARGS = {
    "img": img,
    "mask": mask,
}
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 tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pairwise_acc Ran
ran on a synthesized input
lunaproject22/rpa/leaderboard_eval/score_comparison.py
code served (permissive licence) · get_code("a1f80d0c1ee2b1e6")
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 float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Construct model_pred: a 1D numpy array of predictions
model_pred = np.array([0.1, 0.3, 0.7, 0.5, 0.2])

# Construct label: a 1D numpy array of labels with distinct values
# Using values that create pairwise comparisons
label = np.array([1, 2, 3, 2, 1])

# Construct seed parameter
seed = 42

ARGS = {
    "model_pred": model_pred,
    "label": label,
    "seed": seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Humans have remarkable capacity to reason abductively and hypothesize about what lies beyond the literal content of an image. By identifying concrete visual clues scattered throughout a scene, we almost can't help but draw probable inferences beyond the literal scene based on our everyday experience and knowledge about the world. For example, if we see a "20 mph" sign alongside a road, we might assume the street sits in a residential area (rather than on a highway), even if no houses are pictured. Can machines perform similar visual reasoning? We present Sherlock, an annotated corpus of 103K images for testing machine capacity for abductive reasoning beyond literal image contents. We adopt a free-viewing paradigm: participants first observe and identify salient clues within images (e.g., objects, actions) and then provide a plausible inference about the scene, given the clue. In total, we collect 363K (clue, inference) pairs, which form a first-of-its-kind abductive visual reasoning dataset. Using our corpus, we test three complementary axes of abductive reasoning. We evaluate the capacity of models to: i) retrieve relevant inferences from a large candidate corpus; ii) localize evidence for inferences via bounding boxes, and iii) compare plausible inferences to match human judgments on a newlycollected diagnostic corpus of 19K Likert-scale judgments. While we find that fine-tuning CLIP-RN50x64 with a multitask objective outperforms strong baselines, significant headroom exists between model performance and human agreement. Data, models, and leaderboard available at http://visualabduction.com/. You know my method. It is founded upon the observation of trifles. "The Boscombe Valley Mystery", by A. C. Doyle 5 While Holmes rarely makes mistakes, he frequently misidentifies his mostly abductive process of reasoning as "deductive." [39,8] 6 The correctness of abductive reasoning is certainly not guaranteed. Our goal is to study perception and reasoning without endorsing specific inferences (see §3.1).

For agents

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

get_harvested_code_for_paper("2202.04800")
get_code_for_paper("2202.04800")
have("2202.04800")

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

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

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

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

Connect an agent — have() is free.