SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.05853 · 2022

DeepCut: Unsupervised Segmentation using Graph Neural Networks Clustering

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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 4 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2212.05853.json · badge: /api/ran/2212.05853.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
sampl-weizmann/deepcut community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
create_adj Ran
ran on a synthesized input
sampl-weizmann/deepcut/util.py
code served (permissive licence) · get_code("57e7ea042721ced7")
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 (4, 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)

# F is used in matrix multiplication: F @ F.T
# So F should be a 2D tensor (matrix)
# Let's make it shape (4, 3) so F @ F.T gives (4, 4)
F = torch.randn(4, 3)

# cut is used in an if/else condition to determine processing mode
# It's compared to 0, so it should be a numeric value
cut = 0

# alpha is used in division: W.max() / alpha
# It's a numeric parameter with default value 1
alpha = 1

ARGS = {
    "F": F,
    "cut": cut,
    "alpha": alpha,
}
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 (4, 4) — shape (4, 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
deep_features Ran
ran on a synthesized input
sampl-weizmann/deepcut/features_extract.py
code served (permissive licence) · get_code("97f05e1bca597f48")
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 2, dtype family float, shape (24, 768) as a later run recorded it. 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, 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
import torch.nn as nn

torch.manual_seed(0)

class MockExtractor(nn.Module):
    """Mock extractor that simulates DINO model descriptor extraction"""
    def __init__(self):
        super().__init__()
    
    def extract_descriptors(self, image_tensor, layer, facet, bin, include_cls):
        # image_tensor shape: (batch, height, width)
        # Return shape: (batch, 1, height*width, descriptor_dim)
        batch, height, width = image_tensor.shape
        descriptor_dim = 768
        descriptors = torch.randn(batch, 1, height * width, descriptor_dim)
        return descriptors

# Create mock extractor
extractor = MockExtractor()

# Create image tensor: (batch=2, height=4, width=3)
image_tensor = torch.randn(2, 4, 3)

# Define other parameters
layer = 11
facet = "key"
bin_param = False
include_cls_param = False
device_param = "cpu"

ARGS = {
    "image_tensor": image_tensor,
    "extractor": extractor,
    "layer": layer,
    "facet": facet,
    "bin": bin_param,
    "include_cls": include_cls_param,
    "device": device_param
}
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 ndarray, ndim 2, dtype family float, shape (24, 768) — shape (24, 768) 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
discr_ncut Ran
ran on a synthesized input
sampl-weizmann/deepcut/util.py
code served (permissive licence) · get_code("32039f99241f69da")
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

# Create a small adjacency matrix (5x5 graph)
W = np.array([
    [0, 1, 1, 0, 0],
    [1, 0, 1, 1, 0],
    [1, 1, 0, 1, 1],
    [0, 1, 1, 0, 1],
    [0, 0, 1, 1, 0]
], dtype=np.float64)

# Calculate degrees for each node
deg = np.array([2, 3, 4, 3, 2], dtype=np.float64)

# First cluster: nodes [0, 1]
A = (np.array([0, 1], dtype=np.int64),)

# Second cluster: nodes [2, 3, 4]
B = (np.array([2, 3, 4], dtype=np.int64),)

ARGS = {
    "A": A,
    "B": B,
    "deg": deg,
    "W": W
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numba, 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sampl-weizmann/deepcut/vision_transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("55120f2026b56aa2")
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 gladzhang/Xformer, 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.

get_valid_idx Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sampl-weizmann/deepcut/bilateral_solver.py
pointer only (licence: MIT); the stored copy get_code serves, from jiahao000/mosaicfusion, is pointer only (licence: NOASSERTION) · get_code("04c4101fccb5c55b")
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 jiahao000/mosaicfusion, and GitHub could not classify the licence of that repository (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.

graph_to_mask Ran
ran on a synthesized input
sampl-weizmann/deepcut/util.py
code served (permissive licence) · get_code("8df1b6ec8f138441")
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
import numpy as np
import cv2

torch.manual_seed(0)

# Create a small segmentation tensor output
# The function reshapes S based on stride and image_tensor dimensions
# For stride=4: shape should be (H//4 - 1, W//4 - 1)
# For stride=2: shape should be (H//2, W//2)
# Let's use stride=2 with image_tensor of shape (1, 3, 8, 8)
# So S after reshape should be (4, 4), meaning S as input should have 16 elements

S = torch.randn(16)

# image_tensor: used to get shape[2] and shape[3], reshaped based on stride
# Let's make it (batch=1, channels=3, height=8, width=8)
image_tensor = torch.randn(1, 3, 8, 8)

# image: a numpy array with shape (height, width, channels)
# The function uses image[:, :, 0].shape to get dimensions
# Let's make it (6, 5, 3) - distinct dimensions for clarity
image = np.random.rand(6, 5, 3).astype(np.float32)

# cc: boolean flag for whether to apply connected components
cc = False

# stride: either 2 or 4 (function has different behavior for each)
stride = 2

ARGS = {
    "S": S,
    "cc": cc,
    "stride": stride,
    "image_tensor": image_tensor,
    "image": image
}
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 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
rgb2yuv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sampl-weizmann/deepcut/bilateral_solver.py
pointer only (licence: MIT); the stored copy get_code serves, from jiahao000/mosaicfusion, is pointer only (licence: NOASSERTION) · get_code("ec22a04e890fb286")
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 jiahao000/mosaicfusion, and GitHub could not classify the licence of that repository (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.

yuv2rgb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
sampl-weizmann/deepcut/bilateral_solver.py
pointer only (licence: MIT); the stored copy get_code serves, from jiahao000/mosaicfusion, is pointer only (licence: NOASSERTION) · get_code("5d9850cf710de517")
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 jiahao000/mosaicfusion, and GitHub could not classify the licence of that repository (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.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 4 the same month, 4 later) and 4 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
drop_path 224 other papers
62 dated earlier, 1 the same month, 158 later, 2 same year, order not determinable, 1 undated · 38 only as an assembly brick
2003.12039 (2020-03)
RAFT: Recurrent All-Pairs Field Transforms for Optical Flow
2007.09384 (2020-07)
Multi-Scale Positive Sample Refinement for Few-Shot Object Detection
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
and 221 more not named here
get_valid_idx 4 other papers
1 dated earlier, 1 the same month, 2 later
1905.02722 (2019-05)
Inverse Rendering for Complex Indoor Scenes: Shape, Spatially-Varying Lighting and SVBRDF from a Single Image
2212.07834 (2022-12)
Unsupervised Object Localization: Observing the Background to Discover Objects
2309.13042 (2023-09)
MosaicFusion: Diffusion Models as Data Augmenters for Large Vocabulary Instance Segmentation
and 1 more not named here
rgb2yuv 3 other papers
1 dated earlier, 1 the same month, 1 later
1905.02722 (2019-05)
Inverse Rendering for Complex Indoor Scenes: Shape, Spatially-Varying Lighting and SVBRDF from a Single Image
2212.07834 (2022-12)
Unsupervised Object Localization: Observing the Background to Discover Objects
2309.13042 (2023-09)
MosaicFusion: Diffusion Models as Data Augmenters for Large Vocabulary Instance Segmentation
yuv2rgb 3 other papers
1 dated earlier, 1 the same month, 1 later
1905.02722 (2019-05)
Inverse Rendering for Complex Indoor Scenes: Shape, Spatially-Varying Lighting and SVBRDF from a Single Image
2212.07834 (2022-12)
Unsupervised Object Localization: Observing the Background to Discover Objects
2309.13042 (2023-09)
MosaicFusion: Diffusion Models as Data Augmenters for Large Vocabulary Instance Segmentation

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

Repositories linked to this paper

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

Abstract

Image segmentation is a fundamental task in computer vision. Data annotation for training supervised methods can be labor-intensive, motivating unsupervised methods. Current approaches often rely on extracting deep features from pre-trained networks to construct a graph, and classical clustering methods like k-means and normalized-cuts are then applied as a post-processing step. However, this approach reduces the high-dimensional information encoded in the features to pair-wise scalar affinities. To address this limitation, this study introduces a lightweight Graph Neural Network (GNN) to replace classical clustering methods while optimizing for the same clustering objective function. Unlike existing methods, our GNN takes both the pair-wise affinities between local image features and the raw features as input. This direct connection between the raw features and the clustering objective enables us to implicitly perform classification of the clusters between different graphs, resulting in part semantic segmentation without the need for additional post-processing steps. We demonstrate how classical clustering objectives can be formulated as self-supervised loss functions for training an image segmentation GNN. Furthermore, we employ the Correlation-Clustering (CC) objective to perform clustering without defining the number of clusters, allowing for k-less clustering. We apply the proposed method for object localization, segmentation, and semantic part segmentation tasks, surpassing state-of-the-art performance on multiple benchmarks.

For agents

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

get_harvested_code_for_paper("2212.05853")
get_code_for_paper("2212.05853")
have("2212.05853")

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

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

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

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

Connect an agent — have() is free.