SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.10174 · 2018

Superpixel Sampling Networks

arXiv · PDF · Open in the Atlas

Code that ran

3 of 3 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 0 have no contract verdict; 3 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/1807.10174.json · badge: /api/ran/1807.10174.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
perrying/ssn-pytorch reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
FunctionStatusWhere it lives
calc_init_centroid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
perrying/ssn-pytorch/lib/ssn/ssn.py
code served (permissive licence) · get_code("692eadcad32bf886")
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 batch of images with shape (B, C, H, W)
# B=2 (batch size), C=3 (channels), H=8 (height), W=10 (width)
images = torch.randn(2, 3, 8, 10)

# Number of superpixels in width and height dimensions
num_spixels_width = 2
num_spixels_height = 4

ARGS = {
    "images": images,
    "num_spixels_width": num_spixels_width,
    "num_spixels_height": num_spixels_height,
}
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
get_abs_indices Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
perrying/ssn-pytorch/lib/ssn/ssn.py
code served (permissive licence) · get_code("fa8a3696baf4dd80")
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 int, shape (3, 216) 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

torch.manual_seed(0)

# Construct arguments for get_abs_indices
# Parameters needed: init_label_map, num_spixels_width

# init_label_map: shape (b, n_pixel) - batch of label maps
# The function uses it to get batch size b, pixel count n_pixel, device, and treats values as superpixel indices
b = 2
n_pixel = 12
# Create label map with superpixel indices (should be reasonable indices given num_spixels_width)
init_label_map = torch.randint(0, 8, (b, n_pixel), dtype=torch.long)

# num_spixels_width: used to compute relative_spix_indices offsets
# Should be a reasonable superpixel grid width
num_spixels_width = 4

ARGS = {
    "init_label_map": init_label_map,
    "num_spixels_width": num_spixels_width,
}
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 int, shape (3, 216) — shape (3, 216) 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_hard_abs_labels Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
perrying/ssn-pytorch/lib/ssn/ssn.py
code served (permissive licence) · get_code("aa6e4866b100e331")
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 1, dtype family int, 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

torch.manual_seed(0)

# Analyze the function:
# - affinity_matrix: needs .max(1) method, returns tuple with [1] indexable
#   Result is used as index into relative_spix_indices
#   So affinity_matrix should be a 2D tensor
# - init_label_map: tensor that supports addition with another tensor
# - num_spixels_width: integer used in arithmetic

# Create affinity_matrix: shape (batch_size, num_classes)
# max(1)[1] returns indices of max values along dimension 1
# These indices will index into relative_spix_indices which has length 9
# So values should be in range [0, 8]
affinity_matrix = torch.randn(2, 9)

# init_label_map: should be same shape as result of indexing operation
# The indexing relative_spix_indices[relative_label] will have same shape as relative_label
# which is shape (2,) since affinity_matrix.max(1)[1] reduces dimension 1
init_label_map = torch.tensor([10, 20], dtype=torch.float32)

# num_spixels_width: integer parameter used to compute offsets
num_spixels_width = 5

ARGS = {
    "affinity_matrix": affinity_matrix,
    "init_label_map": init_label_map,
    "num_spixels_width": num_spixels_width,
}
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 1, dtype family int, 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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
get_abs_indices 2 other papers
2 later
Zhang_Lightweight_Image_Super-Resolution_with_Superpixel_Token_Interaction_ICCV_2023_paper (2023 (year only))
Lightweight Image Super-Resolution with Superpixel Token Interaction
2407.07307 (2024-07)
Dual-stage Hyperspectral Image Classification Model with Spectral Supertoken
calc_init_centroid 1 other paper
1 later
Zhang_Lightweight_Image_Super-Resolution_with_Superpixel_Token_Interaction_ICCV_2023_paper (2023 (year only))
Lightweight Image Super-Resolution with Superpixel Token Interaction

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

Superpixels provide an efficient low/mid-level representation of image data, which greatly reduces the number of image primitives for subsequent vision tasks. Existing superpixel algorithms are not differentiable, making them difficult to integrate into otherwise end-to-end trainable deep neural networks. We develop a new differentiable model for superpixel sampling that leverages deep networks for learning superpixel segmentation. The resulting "Superpixel Sampling Network" (SSN) is end-to-end trainable, which allows learning task-specific superpixels with flexible loss functions and has fast runtime. Extensive experimental analysis indicates that SSNs not only outperform existing superpixel algorithms on traditional segmentation benchmarks, but can also learn superpixels for other tasks. In addition, SSNs can be easily integrated into downstream deep networks resulting in performance improvements.

For agents

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

get_harvested_code_for_paper("1807.10174")
get_code_for_paper("1807.10174")
have("1807.10174")

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

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

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

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

Connect an agent — have() is free.