SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · ijcai2021_0082 · IJCAI · 2021

Explaining Self-Supervised Image Representations with Visual Probing

Witold Oleszkiewicz, Tomasz Trzci Ński, Bartosz Zieli Ński, Dominika Basaj, Igor Sieradzki, Michał Górszczak, Barbara Rychalska

Open in the Atlas

Code that ran

9 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 1 failure of our instrument; 6 no recorded run), measured 2026-11-24; 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/ijcai2021_0082.json · badge: /api/ran/ijcai2021_0082.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
BioNN-InfoTech/visual-probes canonical (classifier label)
classifier basis: census
9 ran · 6 no recorded run
FunctionStatusWhere it lives
calculate_concept_pixels Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/prep_smaller_char_bin.py
code served (permissive licence) · get_code("d0a1e370656de7c0")
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 1, dtype family int; 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.

from PIL import Image
import numpy as np

# Create a small test image with PIL
# The function calls image.getdata() which returns pixel data
# We need to create an image where some pixels are (117, 117, 117) and others are not

# Create a 4x3 RGB image
img_array = np.zeros((3, 4, 3), dtype=np.uint8)

# Set some pixels to (117, 117, 117)
img_array[0, 0] = [117, 117, 117]
img_array[1, 1] = [117, 117, 117]

# Set other pixels to different values
img_array[0, 1] = [100, 150, 200]
img_array[0, 2] = [50, 75, 100]
img_array[0, 3] = [200, 200, 200]
img_array[1, 0] = [10, 20, 30]
img_array[1, 2] = [255, 0, 0]
img_array[1, 3] = [0, 255, 0]
img_array[2, 0] = [0, 0, 255]
img_array[2, 1] = [128, 128, 128]
img_array[2, 2] = [64, 64, 64]
img_array[2, 3] = [200, 100, 50]

# Convert numpy array to PIL Image
# Need to transpose from (H, W, C) to proper format
image = Image.fromarray(img_array.astype(np.uint8), mode='RGB')

ARGS = {
    'image': image
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — 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
edge Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/poisson.py
code served (permissive licence) · get_code("6b11b5e75fc582ed")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# The function 'edge' takes two parameters:
# 1. index: a tuple (i, j) representing coordinates
# 2. mask: a 2D array/tensor that supports indexing with mask[index]

# Create a small mask - a 2D array with 1s and 0s
mask = np.array([
    [1, 1, 0],
    [1, 0, 1],
    [0, 1, 1]
])

# Create an index that is on the edge of omega
# index (0, 0) has value 1, and neighbors (1, 0) and (0, 1) have values 1 and 1
# So it's not an edge. Let's use (0, 1) which has value 1 and neighbor (0, 2) has value 0
index = (0, 1)

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

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

import os

# Construct a valid target_path that mimics TCAV results folder structure
# The function expects a path like: .../concept_name/some_folder/some_file_123.png
# where the number after the underscore is extracted and incremented

target_path = "/home/user/tcav_results/striped/activations/image_42.png"

ARGS = {
    "target_path": target_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_patch_path Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/generate_somo.py
code served (permissive licence) · get_code("e1bd32070eeac928")
How it ran

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

# The function manipulates a file path string, transforming it from a superpixels
# directory structure to a patches directory structure.
# We need to provide a valid SP_path string that contains:
# - At least 2 path components separated by '/'
# - A filename with at least 2 underscore-separated parts
# - The word 'superpixels' in the path

ARGS = {
    'SP_path': '/data/superpixels/image_001_sp_0001.npy'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_patch_path Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/somo_utils.py
code served (permissive licence) · get_code("d37130542e738830")
How it ran

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

import os

def get_patch_path(target_path: str) -> str:
    """Returns path to a `patch` images in TCAV results folder structure base in concept path"""
    base_dir = '/'.join(target_path.split('/')[:-2])
    concept_dir, file_name = target_path.split('/')[-2:]
    patch_dir = concept_dir + '_patches'
    return os.path.join(base_dir, patch_dir, file_name)

ARGS = {
    'target_path': '/home/user/tcav_results/concept_1/image_001.jpg'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
in_omega Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/poisson.py
code served (permissive licence) · get_code("d93e429776dda1b6")
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 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 torch
import numpy as np

torch.manual_seed(0)

# The function accesses mask[index] and compares to 1
# So mask needs to be indexable (list, array, or tensor)
# and index needs to be a valid index

index = 0
mask = torch.tensor([1, 0, 1, 0])

ARGS = {
    "index": index,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
parse_arguments Ran
ran; our contract draft was wrong, not the code
BioNN-InfoTech/visual-probes/ACE/ace_run.py
code served (permissive licence) · get_code("bf9ed01f6e964a95")
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 Namespace. 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 argparse

ARGS = {
    'argv': [
        '--source_dir', './ImageNet',
        '--working_dir', './ACE',
        '--model_to_run', 'GoogleNet',
        '--model_path', './tensorflow_inception_graph.pb',
        '--labels_path', './imagenet_labels.txt',
        '--target_class', 'zebra',
        '--bottlenecks', 'mixed4c',
        '--num_random_exp', '20',
        '--max_imgs', '40',
        '--min_imgs', '40',
        '--num_parallel_workers', '0',
    ]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
point_location Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/poisson.py
code served (permissive licence) · get_code("e4fbd2cd1d7db168")
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 int, ndim 0, dtype family int, 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 torch
import numpy as np

torch.manual_seed(0)

# The function point_location takes:
# - index: a tuple (i, j) representing a 2D coordinate
# - mask: a 2D array/tensor where values can be checked via indexing

# Create a small 2D mask
# Using values: 1 for OMEGA region, 0 for outside
mask = np.array([
    [0, 0, 0, 0],
    [0, 1, 1, 0],
    [0, 1, 1, 0],
    [0, 0, 0, 0]
], dtype=np.int32)

# Choose an index that's on the edge of the omega region
# Point (1, 1) is inside omega, (1, 0) is outside, (1, 2) is inside
# So (1, 1) should be detected as an edge point since it has outside neighbors
index = (1, 1)

ARGS = {
    "index": index,
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
prepare_result_filename Ran
ran on a synthesized input
BioNN-InfoTech/visual-probes/generate_somo.py
code served (permissive licence) · get_code("799d655350780704")
How it ran

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

# Looking at the function, it only uses string operations on the paths
# It splits by '/' and '_', and accesses specific indices
# We need two file paths that follow the expected directory/filename structure

target_SP_path = "path/to/target_label/prefix_123_456.npy"
source_SP_path = "path/to/source_label/prefix_789_012.npy"

ARGS = {
    "target_SP_path": target_SP_path,
    "source_SP_path": source_SP_path,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_if_done Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/generate_somo.py
code served (permissive licence) · get_code("3af1e802f09dc591")
How it ran

no invocation recorded.

create_concept_labels Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/generate_data_for_probings.py
code served (permissive licence) · get_code("f7babf0c9685ebe1")
How it ran

no invocation recorded.

load_all_representations Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/run_sentence_length.py
code served (permissive licence) · get_code("7f97bbaea7dd1827")
How it ran

no invocation recorded.

load_image_from_file Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/ACE/ace_helpers.py
code served (permissive licence) · get_code("f6a9f7413c15745b")
How it ran

no invocation recorded.

load_images_from_files Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/ACE/ace_helpers.py
code served (permissive licence) · get_code("6815ea1740b108a7")
How it ran

no invocation recorded.

load_img Not yet run
unverified (harvested, no recorded run)
BioNN-InfoTech/visual-probes/somo_utils.py
code served (permissive licence) · get_code("056b8ba133130ab0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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
parse_arguments 1 other paper
1 dated earlier
1902.03129 (2019-02)
Towards Automatic Concept-based Explanations

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

Repositories linked to this paper

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

Abstract

Recently introduced self-supervised methods for image representation learning provide on par or superior results to their fully supervised competitors, yet the corresponding efforts to explain the selfsupervised approaches lag behind. Motivated by this observation, we introduce a novel visual probing framework for explaining the self-supervised models by leveraging probing tasks employed previously in natural language processing. The probing tasks require knowledge about semantic relationships between image parts. Hence, we propose a systematic approach to obtain analogs of natural language in vision, such as visual words, context, and taxonomy. We show the effectiveness and applicability of those analogs in the context of explaining self-supervised representations. Our key findings emphasize that relations between language and vision can serve as an effective yet intuitive tool for discovering how machine learning models work, independently of data modality. Our work opens a plethora of research pathways towards more explainable and transparent AI.

For agents

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

get_harvested_code_for_paper("ijcai2021_0082")
get_code_for_paper("ijcai2021_0082")
have("ijcai2021_0082")

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

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

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

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

Connect an agent — have() is free.