SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.07853 · 2020

Axial-DeepLab: Stand-Alone Axial-Attention for Panoptic Segmentation

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 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; 3 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2003.07853.json · badge: /api/ran/2003.07853.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
csrhddlam/axial-deeplab community (classifier label)
classifier basis not recorded on the link
8 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
0 ran · 1 no recorded run
FunctionStatusWhere it lives
cross_entropy_for_onehot Ran
ran; our contract draft was wrong, not the code
csrhddlam/axial-deeplab/lib/utils.py
code served (permissive licence) · get_code("e4df01238c9e5ba5")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T03:10:52Z). 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.functional as F

torch.manual_seed(0)

# Create small tensors for the function
# pred: logits tensor, shape (batch_size, num_classes)
# target: one-hot encoded targets, shape (batch_size, num_classes)

batch_size = 2
num_classes = 4

pred = torch.randn(batch_size, num_classes)
target = torch.zeros(batch_size, num_classes)
# Create one-hot encoded targets
target[0, 0] = 1.0
target[1, 2] = 1.0

ARGS = {
    "pred": pred,
    "target": target,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 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
adjust_learning_rate Ran
ran on a synthesized input
csrhddlam/axial-deeplab/lib/utils.py
code served (permissive licence) · get_code("9d1a2a8f3cd2f263")
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 torch
import torch.nn as nn
import torch.optim as optim
import math

torch.manual_seed(0)

# Create a minimal args object
class Args:
    def __init__(self):
        self.warmup_epochs = 5
        self.epochs = 100
        self.lr = 0.1

args = Args()

# Create a minimal model and optimizer
model = nn.Linear(4, 3)
optimizer = optim.SGD(model.parameters(), lr=args.lr)

# Set up parameters for the function
epoch = 10
batch_idx = 5
data_nums = 128
type_schedule = 'cosine'

ARGS = {
    'args': args,
    'optimizer': optimizer,
    'epoch': epoch,
    'batch_idx': batch_idx,
    'data_nums': data_nums,
    'type': type_schedule
}
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 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
build_optimizer Ran
ran on a synthesized input
csrhddlam/axial-deeplab/lib/build_optimizer.py
code served (permissive licence) · get_code("57c57f81551ed227")
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 SGD. 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 torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Build a minimal model with parameters
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = MinimalModel()

# Build args object with all required attributes
class Args:
    def __init__(self):
        self.optim = 'sgd'
        self.lr = 0.01
        self.momentum = 0.9
        self.weight_decay = 1e-4
        self.nesterov = True

args = Args()

ARGS = {
    'args': args,
    'model': model
}
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 SGD — a SGD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SGD 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
csrhddlam/axial-deeplab/lib/models/axialnet.py
code served (permissive licence) · get_code("d9def42110729a85")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
csrhddlam/axial-deeplab/lib/models/resnet.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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 Conv2d. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d 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
imagenet1k Ran
ran on a synthesized input
csrhddlam/axial-deeplab/lib/datasets/imagenet1k.py
code served (permissive licence) · get_code("d951f27a92264740")
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 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 tempfile
import os
from pathlib import Path
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Create temporary directories with fake ImageFolder structure
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val')

# Create class directories and dummy images
for split_dir in [train_dir, val_dir]:
    for class_idx in range(2):
        class_dir = os.path.join(split_dir, f'class_{class_idx}')
        os.makedirs(class_dir, exist_ok=True)
        # Create 2 dummy images per class
        for img_idx in range(2):
            img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
            img = Image.fromarray(img_array)
            img_path = os.path.join(class_dir, f'image_{img_idx}.jpg')
            img.save(img_path)

# Create args object
class Args:
    def __init__(self):
        self.train_dirs = train_dir
        self.val_dirs = val_dir
        self.batch_size = 2
        self.val_batch_size = 2
        self.num_workers = 0
        self.color_jitter = True

ARGS = {
    'args': Args(),
    'distributed': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — 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 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
label_smoothing Ran
ran on a synthesized input
csrhddlam/axial-deeplab/lib/utils.py
code served (permissive licence) · get_code("5c9e8b037a72dcd8")
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

torch.manual_seed(0)

# Create prediction tensor: batch_size=2, n_classes=4
pred = torch.randn(2, 4)

# Create target tensor: batch_size=2 with class indices in range [0, 3]
target = torch.tensor([1, 3])

# eta parameter for label smoothing
eta = 0.1

ARGS = {
    "pred": pred,
    "target": target,
    "eta": eta,
}
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
resnet18 Ran
ran; our contract draft was wrong, not the code
csrhddlam/axial-deeplab/lib/models/resnet.py
code served (permissive licence) · get_code("72e76034eb3a8502")
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 ResNet. 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 torch.nn as nn

torch.manual_seed(0)

# Define the ResNet function signature based on the incomplete code
def resnet18(pretrained=False, progress=True, **kwargs):
    """Constructs a ResNet-18 model."""
    return ResNet(BasicBlock, [2, 2, 2, 2], **kwargs)

# Build ARGS dictionary with all parameters for resnet18
ARGS = {
    'pretrained': False,
    'progress': 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 ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
axial26s Not yet run
unverified (harvested, no recorded run)
csrhddlam/axial-deeplab/lib/models/axialnet.py
code served (permissive licence) · get_code("67a7daffbe6a2857")
How it ran

no invocation recorded.

axial50s Not yet run
unverified (harvested, no recorded run)
csrhddlam/axial-deeplab/lib/models/axialnet.py
code served (permissive licence) · get_code("33a7ebf42fab13a5")
How it ran

no invocation recorded.

prepare_data Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from MartinGer/Stand-Alone-Self-Attention-in-Vision-Models
pointer only; the stored copy get_code serves, from MartinGer/Stand-Alone-Self-Attention-in-Vision-Models, is pointer only (licence: NONE) · get_code("10b86d2ef7ff73c5")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 11 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 0 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
conv1x1 431 other papers
59 dated earlier, 12 the same month, 359 later, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
30 dated earlier, 8 the same month, 273 later, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 more not named here
resnet18 95 other papers
5 dated earlier, 4 the same month, 85 later, 1 undated
1805.00907 (2018-05)
Glow: Graph Lowering Compiler Techniques for Neural Networks
1902.08153 (2019-02)
Learned Step Size Quantization
1904.01355 (2019-04)
FCOS: Fully Convolutional One-Stage Object Detection
and 92 more not named here
cross_entropy_for_onehot 4 other papers
1 dated earlier, 3 later
1906.08935 (2019-06)
Deep Leakage from Gradients
2010.02772 (2020-10)
InstaHide: Instance-hiding Schemes for Private Distributed Learning *
2021.emnlp-main.154 (2021 (year only))
Reconstruction Attack on Instance Encoding for Language Understanding
and 1 more not named here
prepare_data 2 other papers
2 dated earlier
1904.09925 (2019-04)
Attention Augmented Convolutional Networks
1906.05909 (2019-06)
Stand-Alone Self-Attention in Vision Models
adjust_learning_rate 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
axial26s 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
axial50s 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
build_optimizer 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
imagenet1k 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network
label_smoothing 1 other paper
1 later
2203.04967 (2022-03)
UNeXt: MLP-based Rapid Medical Image Segmentation Network

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

Convolution exploits locality for efficiency at a cost of missing long range context. Self-attention has been adopted to augment CNNs with non-local interactions. Recent works prove it possible to stack self-attention layers to obtain a fully attentional network by restricting the attention to a local region. In this paper, we attempt to remove this constraint by factorizing 2D self-attention into two 1D self-attentions. This reduces computation complexity and allows performing attention within a larger or even global region. In companion, we also propose a position-sensitive self-attention design. Combining both yields our position-sensitive axial-attention layer, a novel building block that one could stack to form axial-attention models for image classification and dense prediction. We demonstrate the effectiveness of our model on four large-scale datasets. In particular, our model outperforms all existing stand-alone self-attention models on ImageNet. Our Axial-DeepLab improves 2.8% PQ over bottom-up state-of-the-art on COCO test-dev. This previous state-of-the-art is attained by our small variant that is 3.8x parameter-efficient and 27x computation-efficient. Axial-DeepLab also achieves state-of-the-art results on Mapillary Vistas and Cityscapes.

For agents

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

get_harvested_code_for_paper("2003.07853")
get_code_for_paper("2003.07853")
have("2003.07853")

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

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

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

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

Connect an agent — have() is free.