SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.14508 · CVPR · 2022

Stratified Transformer for 3D Point Cloud Segmentation

Liwei Wang, Mit, Xiaojuan Qi, Hengshuang Zhao, Jiaya Jia, Li Jiang, Jianhui Liu, Xin Lai, Shu Liu, Smartmore, Mpi Informatics

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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; 1 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 5 failures of our instrument; 3 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/2203.14508.json · badge: /api/ran/2203.14508.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
dvlab-research/stratified-transformer canonical (classifier label)
classifier basis not recorded on the link
9 ran · 3 no recorded run
FunctionStatusWhere it lives
collate_fn_limit Ran
ran on a synthesized input
dvlab-research/stratified-transformer/util/data_util.py
code served (permissive licence) · get_code("f37c5536599dc365")
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 logging

torch.manual_seed(0)

# Create a simple logger
logger = logging.getLogger("test_logger")
logger.setLevel(logging.WARNING)

# Create batch items: each item is a tuple of (coord, feat, label)
# coord: tensor of shape (num_points, 3)
# feat: tensor of shape (num_points, 4)
# label: tensor of shape (num_points,)

batch_item_1 = (
    torch.randn(5, 3),  # coord: 5 points, 3D coordinates
    torch.randn(5, 4),  # feat: 5 points, 4D features
    torch.randint(0, 2, (5,))  # label: 5 labels
)

batch_item_2 = (
    torch.randn(3, 3),  # coord: 3 points, 3D coordinates
    torch.randn(3, 4),  # feat: 3 points, 4D features
    torch.randint(0, 2, (3,))  # label: 3 labels
)

batch_item_3 = (
    torch.randn(4, 3),  # coord: 4 points, 3D coordinates
    torch.randn(4, 4),  # feat: 4 points, 4D features
    torch.randint(0, 2, (4,))  # label: 4 labels
)

batch = [batch_item_1, batch_item_2, batch_item_3]

ARGS = {
    "batch": batch,
    "max_batch_points": 10,
    "logger": logger
}
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
collate_fn_limit_mix3d Ran
ran on a synthesized input
dvlab-research/stratified-transformer/util/data_util.py
code served (permissive licence) · get_code("409b9551202d48f6")
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 random

torch.manual_seed(0)
random.seed(0)

# Create a simple logger mock that has a warning method
class SimpleLogger:
    def warning(self, msg):
        print(f"WARNING: {msg}")

# Create batch items: (coord, feat, label) tuples
# coord: point coordinates, shape (num_points, 3)
# feat: features, shape (num_points, 4)
# label: labels, shape (num_points,)

batch = [
    (torch.randn(5, 3), torch.randn(5, 4), torch.randint(0, 2, (5,))),
    (torch.randn(6, 3), torch.randn(6, 4), torch.randint(0, 2, (6,))),
    (torch.randn(4, 3), torch.randn(4, 4), torch.randint(0, 2, (4,))),
    (torch.randn(7, 3), torch.randn(7, 4), torch.randint(0, 2, (7,))),
]

logger = SimpleLogger()
max_batch_points = 20
p = 0.5

ARGS = {
    "batch": batch,
    "max_batch_points": max_batch_points,
    "logger": logger,
    "p": p,
}
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
colorize Ran
ran, honoured the contract we drafted
dvlab-research/stratified-transformer/util/common_util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("1dad93b61e98c32e")
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 Cavendish518/SFPNet, 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.

get_indice_pairs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dvlab-research/stratified-transformer/model/stratified_transformer.py
code served (permissive licence) · get_code("92a89e85291de713")
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 2, dtype family int; 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

torch.manual_seed(0)

# Construct tensors and parameters for get_indice_pairs
# The function works with point-to-voxel mappings and spatial coordinates

# Basic dimensions
batch_size = 12  # number of points
num_voxels = 3   # number of voxels
max_points_per_voxel = 4  # k dimension
coord_dim = 3    # spatial coordinates are 3D

# p2v_map: maps points to voxel indices (batch_size, max_points_per_voxel)
p2v_map = torch.randint(0, num_voxels, (batch_size, max_points_per_voxel))

# counts: number of valid points in each voxel (batch_size,)
counts = torch.randint(1, max_points_per_voxel + 1, (batch_size,))

# new_p2v_map: similar mapping for downsampled level (smaller batch)
new_batch_size = 8
new_p2v_map = torch.randint(0, num_voxels, (new_batch_size, max_points_per_voxel))

# new_counts: counts for downsampled level
new_counts = torch.randint(1, max_points_per_voxel + 1, (new_batch_size,))

# downsample_idx: indices of points that were downsampled (subset of batch_size)
downsample_idx = torch.randint(0, batch_size, (6,))

# batch: batch assignment for each point (which batch/scene each point belongs to)
batch = torch.randint(0, 2, (batch_size,))

# xyz: spatial coordinates of all points (batch_size, coord_dim)
xyz = torch.randn(batch_size, coord_dim)

# window_size: scalar for voxel grid spacing
window_size = 0.5

# i: iteration index
i = 0

ARGS = {
    'p2v_map': p2v_map,
    'counts': counts,
    'new_p2v_map': new_p2v_map,
    'new_counts': new_counts,
    'downsample_idx': downsample_idx,
    'batch': batch,
    'xyz': xyz,
    'window_size': window_size,
    'i': i
}
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 2, 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
get_logger Ran
ran; our contract draft was wrong, not the code
dvlab-research/stratified-transformer/util/logger.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("e985f384ed063aef")
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 Cavendish518/SFPNet, 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.

initialize_scheduler Ran
ran; our contract draft was wrong, not the code
dvlab-research/stratified-transformer/util/lr.py
pointer only (licence: MIT); the stored copy get_code serves, from RikkiXu/NCD_PC, is pointer only (licence: NONE) · get_code("1cfda515a69f8682")
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 RikkiXu/NCD_PC, 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.

intersectionAndUnion Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
dvlab-research/stratified-transformer/util/common_util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("2a66f4ab6863908c")
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 Cavendish518/SFPNet, 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.

load_cfg_from_cfg_file Ran
ran; our contract draft was wrong, not the code
dvlab-research/stratified-transformer/util/config.py
code served (permissive licence) · get_code("277a13798d6d6981")
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 CfgNode. 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 tempfile
import os
import yaml

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_file = os.path.join(temp_dir, "config.yaml")

# Create a valid YAML config file with the expected structure
config_data = {
    "model": {
        "name": "test_model",
        "layers": 3,
        "hidden_dim": 64
    },
    "training": {
        "learning_rate": 0.001,
        "batch_size": 32,
        "epochs": 10
    },
    "data": {
        "dataset": "cifar10",
        "split": 0.8
    }
}

with open(yaml_file, 'w') as f:
    yaml.dump(config_data, f)

ARGS = {
    "file": yaml_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CfgNode — a CfgNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CfgNode 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
make_dataset Ran
ran on a synthesized input
dvlab-research/stratified-transformer/util/dataset.py
code served (permissive licence) · get_code("3f438ed83e10fc4e")
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 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 os
import tempfile

# Create a temporary directory and a temporary data list file
temp_dir = tempfile.mkdtemp()
data_root = temp_dir
data_list_path = os.path.join(temp_dir, 'data_list.txt')

# Create a sample data list file with some dummy entries
with open(data_list_path, 'w') as f:
    f.write('sample1.txt\n')
    f.write('sample2.txt\n')
    f.write('sample3.txt\n')

ARGS = {
    'split': 'train',
    'data_root': data_root,
    'data_list': data_list_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 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
grid_sample Not yet run
unverified (harvested, no recorded run)
dvlab-research/stratified-transformer/model/stratified_transformer.py
code served (permissive licence) · get_code("9905bbf6a1511afe")
How it ran

no invocation recorded.

intersectionAndUnionGPU Not yet run
unverified (harvested, no recorded run)
dvlab-research/stratified-transformer/util/common_util.py
pointer only (licence: MIT); the stored copy get_code serves, from Cavendish518/SFPNet, is pointer only (licence: NOASSERTION) · get_code("136834d66336e6b9")
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 Cavendish518/SFPNet, 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. No invocation recorded.

merge_cfg_from_list Not yet run
unverified (harvested, no recorded run)
dvlab-research/stratified-transformer/util/config.py
code served (permissive licence) · get_code("4efe685c6fb1ec11")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 10 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 10 later) and 2 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
merge_cfg_from_list 23 other papers
3 dated earlier, 1 the same month, 19 later
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 20 more not named here
load_cfg_from_cfg_file 22 other papers
3 dated earlier, 1 the same month, 18 later
2003.13328 (2020-03)
Strip Pooling: Rethinking Spatial Pooling for Scene Parsing
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2111.15174 (2021-11)
CRIS: CLIP-Driven Referring Image Segmentation
and 19 more not named here
intersectionAndUnion 11 other papers
3 dated earlier, 2 the same month, 6 later
2004.01658 (2020-04)
PointGroup: Dual-Set Point Grouping for 3D Instance Segmentation
Huang_PrimitiveNet_Primitive_Instance_Segmentation_With_Local_Primitive_Embedding_Under_Adversarial_ICCV_2021_paper (2021 (year only))
PrimitiveNet: Primitive Instance Segmentation with Local Primitive Embedding under Adversarial Metric
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
and 8 more not named here
intersectionAndUnionGPU 9 other papers
1 dated earlier, 8 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2210.06780 (2022-10)
Intermediate Prototype Mining Transformer for Few-Shot Semantic Segmentation
2212.02011 (2022-12)
PointCaM: Cut-and-Mix for Open-Set Point Cloud Learning
and 6 more not named here
colorize 4 other papers
1 dated earlier, 3 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2210.06780 (2022-10)
Intermediate Prototype Mining Transformer for Few-Shot Semantic Segmentation
2303.12766 (2023-03)
Spherical Transformer for LiDAR-based 3D Recognition
and 1 more not named here
get_logger 2 other papers
2 later
2303.12766 (2023-03)
Spherical Transformer for LiDAR-based 3D Recognition
2407.11569 (2024-07)
SFPNet: Sparse Focal Point Network for Semantic Segmentation on General LiDAR Point Clouds
grid_sample 2 other papers
2 later
Chen_LargeKernel3D_Scaling_Up_Kernels_in_3D_Sparse_CNNs_CVPR_2023_paper (2023 (year only))
LargeKernel3D: Scaling up Kernels in 3D Sparse CNNs
2403.00592 (2024-03)
Rethinking Few-shot 3D Point Cloud Semantic Segmentation
initialize_scheduler 2 other papers
2 later
2303.12766 (2023-03)
Spherical Transformer for LiDAR-based 3D Recognition
2407.12489 (2024-07)
Dual-level Adaptive Self-Labeling for Novel Class Discovery in Point Cloud Segmentation
collate_fn_limit 1 other paper
1 later
Chen_LargeKernel3D_Scaling_Up_Kernels_in_3D_Sparse_CNNs_CVPR_2023_paper (2023 (year only))
LargeKernel3D: Scaling up Kernels in 3D Sparse CNNs
get_indice_pairs 1 other paper
1 later
2505.09262 (2025-05)
EDBench: Large-Scale Electron Density Data for Molecular Modeling

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

3D point cloud segmentation has made tremendous progress in recent years. Most current methods focus on aggregating local features, but fail to directly model longrange dependencies. In this paper, we propose Stratified Transformer that is able to capture long-range contexts and demonstrates strong generalization ability and high performance. Specifically, we first put forward a novel key sampling strategy. For each query point, we sample nearby points densely and distant points sparsely as its keys in a stratified way, which enables the model to enlarge the effective receptive field and enjoy long-range contexts at a low computational cost. Also, to combat the challenges posed by irregular point arrangements, we propose first-layer point embedding to aggregate local information, which facilitates convergence and boosts performance. Besides, we adopt contextual relative position encoding to adaptively capture position information. Finally, a memory-efficient implementation is introduced to overcome the issue of varying point numbers in each window. Extensive experiments demonstrate the effectiveness and superiority of our method on S3DIS, ScanNetv2 and ShapeNetPart datasets. Code is available at https:// github.com/ dvlab-research/ Stratified-Transformer.

For agents

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

get_harvested_code_for_paper("2203.14508")
get_code_for_paper("2203.14508")
have("2203.14508")

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

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

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

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

Connect an agent — have() is free.