SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.10108 · NeurIPS · 2022

ViTAEv2: Vision Transformer Advanced by Exploring Inductive Bias for Image Recognition and Beyond

Dacheng Tao, Jing Zhang, Yufei Xu, Qiming Zhang, Mr Zhang

arXiv · PDF · Open in the Atlas

Code that ran

22 of 25 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 14 have no contract verdict; 7 failures of our instrument; 3 no recorded run); 3 of them were also run on the host, not in the jail, by the peer-agreement lane that set their 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/2202.10108.json · badge: /api/ran/2202.10108.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
tamer-saleh/s1gflood-detection community (classifier label)
classifier basis not recorded on the link
11 ran · 0 no recorded run
yangyucheng000/papercode-2 community
Papers with Code archive
9 ran · 3 no recorded run
ViTAE-Transformer/ViTAE-VSA extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ViTAE-Transformer/ViTAE-VSA/Object-Detection/mmdet/models/backbones/vitaev2_vsa_modules/window.py
pointer only (licence: NONE) · get_code("61c027be5178a479")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ViTAE-Transformer/ViTAE-VSA 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.

window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tamer-saleh/s1gflood-detection/swin.py
code served (permissive licence) · get_code("144d10b49baeb8a6")
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 4, dtype family float, shape (8, 4, 4, 4) 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-04T22:38:58Z). 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 a tensor with shape (B, H, W, C)
# B=2 (batch), H=8 (height), W=8 (width), C=4 (channels)
# Using distinct sizes: 2, 8, 8, 4
x = torch.randn(2, 8, 8, 4)

# window_size must divide both H and W evenly
# H=8, W=8, so window_size=4 works (8 // 4 = 2)
window_size = 4

ARGS = {
    "x": x,
    "window_size": window_size,
}
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 4, dtype family float, shape (8, 4, 4, 4) — shape (8, 4, 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
window_reverse Ran
ran; our contract draft was wrong, not the code
ViTAE-Transformer/ViTAE-VSA/Object-Detection/mmdet/models/backbones/vitaev2_vsa_modules/window.py
pointer only (licence: NONE) · get_code("5e2dbd713ec13547")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ViTAE-Transformer/ViTAE-VSA 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.

Attention Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("3fefa875010c6edf")
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 an instance of its own class, Attention: the run constructed the object and did not call it, so no result was computed. 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 = {
    'dim': 8,
    'window_size': None,
    'num_heads': 2,
    'qkv_bias': False,
    'qk_scale': None,
    'attn_drop': 0.0,
    'proj_drop': 0.0
}
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 Attention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Attention 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
Fold Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("a74921de2215fc04")
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 an instance of its own class, Fold: the run constructed the object and did not call it, so no result was computed. 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 Fold class only takes kernel_size as a parameter in __init__
# Looking at the forward method, it takes x as input
# x should be a 4D tensor with shape (b, c, h, w)
# where c (channels) should equal kernel_size ** 2

kernel_size = 3
channels = kernel_size ** 2  # 9 channels for kernel_size=3

# Create a small input tensor: (batch=2, channels=9, height=4, width=3)
x = torch.randn(2, channels, 4, 3)

ARGS = {
    'kernel_size': kernel_size,
}
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 Fold — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Fold 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
LayerNorm2d Ran
ran on a synthesized input
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("48cf1b51f86c6f57")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn

class LayerNorm2d(nn.Module):

    def __init__(self, dim):
        super().__init__()
        self.norm = nn.LayerNorm(dim, eps=1e-06)

    def forward(self, x):
        return self.norm(x.permute(0, 2, 3, 1).contiguous()).permute(0, 3, 1, 2).contiguous()


INIT_ARGS = {
    'dim': 4
}

ARGS = {
    'x': torch.randn(2, 4, 3, 5)
}

if __name__ == '__main__':
    model = LayerNorm2d(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Input shape: {ARGS['x'].shape}")
    print(f"Output shape: {output.shape}")
    print(f"Output:\n{output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Mlp Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("5a8382845c81cc22")
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 an instance of its own class, Mlp: the run constructed the object and did not call it, so no result was computed. 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_features": 4,
    "hidden_features": 8,
    "out_features": 4,
    "act_layer": nn.GELU,
    "drop": 0.1,
    "conv_pos": True,
    "downsample": False,
    "kernel_size": 5,
}
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 Mlp — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Mlp 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
PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("dedd2d6dd673cc46")
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 an instance of its own class, PatchEmbed: the run constructed the object and did not call it, so no result was computed. 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_channels': 3,
    'out_channels': 64,
}
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 PatchEmbed — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PatchEmbed 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
PatchMerging Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("e8f2f05db5500fa5")
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 an instance of its own class, PatchMerging: the run constructed the object and did not call it, so no result was computed. 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)

# PatchMerging.__init__ takes in_channels and out_channels
# PatchMerging.forward takes x (a tensor)
# The forward method applies a Conv2d with stride=2, so we need a reasonable input tensor

ARGS = {
    'in_channels': 3,
    'out_channels': 4,
}
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 PatchMerging — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PatchMerging 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
ResDWC Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("b07535c6bcc4574f")
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 an instance of its own class, ResDWC: the run constructed the object and did not call it, so no result was computed. 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 = {
    "dim": 4,
    "kernel_size": 3,
}
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 ResDWC — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResDWC 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
StokenAttention Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("20466726ccd0930d")
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 an instance of its own class, StokenAttention: the run constructed the object and did not call it, so no result was computed. 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 = {
    "dim": 4,
    "stoken_size": (2, 2),
    "n_iter": 1,
    "refine": True,
    "refine_attention": True,
    "num_heads": 2,
    "qkv_bias": False,
    "qk_scale": None,
    "attn_drop": 0.0,
    "proj_drop": 0.0,
}
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 StokenAttention — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a StokenAttention 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
Unfold Ran
ran on a synthesized input · constructed an object; no result was computed
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("08e6e488af05edb9")
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 an instance of its own class, Unfold: the run constructed the object and did not call it, so no result was computed. 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 Unfold class takes kernel_size as its only parameter
# Looking at the forward method, it uses kernel_size to:
# 1. Create weights of shape (kernel_size**2, 1, kernel_size, kernel_size)
# 2. Use kernel_size // 2 as padding
# 3. Reshape output to (b, c * 9, h * w) which assumes kernel_size=3

# Create a small input tensor for testing
# Shape: (batch=2, channels=4, height=5, width=5)
x = torch.randn(2, 4, 5, 5)

ARGS = {
    "kernel_size": 3
}
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 Unfold — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Unfold 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
ViTAE_Window_NoShift_12_basic_stages4_14 Ran
ran on a synthesized input
tamer-saleh/s1gflood-detection/models.py
code served (permissive licence) · get_code("1b9001750c072436")
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 ViTAE_Window_NoShift_basic. 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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create a minimal ViTAE_Window_NoShift_basic model stand-in
class ViTAE_Window_NoShift_basic(nn.Module):
    def __init__(self, RC_tokens_type=None, NC_tokens_type=None, stages=4, 
                 embed_dims=None, token_dims=None, downsample_ratios=None,
                 NC_depth=None, NC_heads=None, RC_heads=None, mlp_ratio=4.0,
                 NC_group=None, RC_group=None, **kwargs):
        super().__init__()
        self.num_classes = 1000
        self.RC_tokens_type = RC_tokens_type or []
        self.NC_tokens_type = NC_tokens_type or []
        self.stages = stages
        self.embed_dims = embed_dims or [64, 64, 128, 256]
        self.token_dims = token_dims or [64, 128, 256, 512]
        self.downsample_ratios = downsample_ratios or [4, 2, 2, 2]
        self.NC_depth = NC_depth or [2, 2, 8, 2]
        self.NC_heads = NC_heads or [1, 2, 4, 8]
        self.RC_heads = RC_heads or [1, 1, 2, 4]
        self.mlp_ratio = mlp_ratio
        self.NC_group = NC_group or [1, 32, 64, 128]
        self.RC_group = RC_group or [1, 16, 32, 64]
        # Add a simple linear layer for the head
        self.head = nn.Linear(256, 1000)
    
    def forward(self, x):
        # Minimal forward pass
        return self.head(x.mean(dim=(2, 3)))

# Patch the module into the namespace for the function to use
import sys
current_module = sys.modules[__name__]
current_module.ViTAE_Window_NoShift_basic = ViTAE_Window_NoShift_basic

ARGS = {
    'pretrained': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ViTAE_Window_NoShift_basic — a ViTAE_Window_NoShift_basic output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ViTAE_Window_NoShift_basic 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
tamer-saleh/s1gflood-detection/resnet.py
pointer only (licence: CC0-1.0); the stored copy get_code serves, from guanyuezhen/ufcd, is pointer only (licence: NONE) · get_code("6ef392f365cc5703")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (CC0-1.0), but get_code serves the stored copy, first harvested from guanyuezhen/ufcd, 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
tamer-saleh/s1gflood-detection/resnet.py
pointer only (licence: CC0-1.0); the stored copy get_code serves, from lewandofskee/MambaAD, is pointer only (licence: NONE) · get_code("794a2ed91a5175bd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (CC0-1.0), but get_code serves the stored copy, first harvested from lewandofskee/MambaAD, 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_norm_layer Ran
ran; our contract draft was wrong, not the code
tamer-saleh/s1gflood-detection/networks.py
code served (permissive licence) · get_code("5030170039952082")
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 partial. 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 functools

torch.manual_seed(0)

class Identity(nn.Module):
    def forward(self, x):
        return x

def get_norm_layer(norm_type='instance'):
    if norm_type == 'batch':
        norm_layer = functools.partial(nn.BatchNorm2d, affine=True, track_running_stats=True)
    elif norm_type == 'instance':
        norm_layer = functools.partial(nn.InstanceNorm2d, affine=False, track_running_stats=False)
    elif norm_type == 'none':
        norm_layer = lambda x: Identity()
    else:
        raise NotImplementedError('normalization layer [%s] is not found' % norm_type)
    return norm_layer

ARGS = {
    'norm_type': 'instance'
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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_scheduler Ran
ran on a synthesized input
tamer-saleh/s1gflood-detection/networks.py
code served (permissive licence) · get_code("5fd6b26c18104c25")
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 LambdaLR. 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
from torch.optim import Adam

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

model = SimpleModel()
optimizer = Adam(model.parameters(), lr=0.001)

# Create args object with required attributes
class Args:
    def __init__(self):
        self.lr_policy = 'linear'
        self.max_epochs = 100

args = Args()

ARGS = {
    'optimizer': optimizer,
    'args': args
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_sinusoid_encoding Ran
ran, honoured the contract we drafted
tamer-saleh/s1gflood-detection/NormalCell.py
code served (permissive licence) · get_code("2c3dfd32c766d157")
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 3, dtype family float, shape (1, 8, 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 numpy as np

torch.manual_seed(0)

ARGS = {
    "n_position": 8,
    "d_hid": 4
}
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 3, dtype family float, shape (1, 8, 4) — shape (1, 8, 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
init_net Ran
ran on a synthesized input
tamer-saleh/s1gflood-detection/networks.py
code served (permissive licence) · get_code("2009bbd28575495d")
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 SimpleNet. 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 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
from torch import nn
import torch.nn.init as init

torch.manual_seed(0)

# Create a simple neural network model
class SimpleNet(nn.Module):
    def __init__(self):
        super(SimpleNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3)
        self.bn1 = nn.BatchNorm2d(16)
        self.linear1 = nn.Linear(16, 8)
        
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        return x

net = SimpleNet()

ARGS = {
    'net': net,
    'init_type': 'normal',
    'init_gain': 0.02,
    'gpu_ids': []
}
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 SimpleNet — a SimpleNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleNet 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
test_path Ran
ran on a synthesized input
tamer-saleh/s1gflood-detection/utils/dataloaders.py
code served (permissive licence) · get_code("d0814d9bf3797cb1")
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 dict. 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
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
test_dir = os.path.join(temp_dir, 'test')
os.makedirs(os.path.join(test_dir, 'A'), exist_ok=True)
os.makedirs(os.path.join(test_dir, 'GT'), exist_ok=True)

# Create some dummy test files
for i in range(3):
    open(os.path.join(test_dir, 'A', f'image_{i}.jpg'), 'w').close()
    open(os.path.join(test_dir, 'GT', f'image_{i}.jpg'), 'w').close()

# Add a hidden file that should be filtered out
open(os.path.join(test_dir, 'A', '.hidden'), 'w').close()

data_dir = temp_dir + '/'

ARGS = {
    'data_dir': data_dir
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
train_path Ran
ran on a synthesized input
tamer-saleh/s1gflood-detection/utils/dataloaders.py
code served (permissive licence) · get_code("1203a926bfe91b55")
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 os
import tempfile
import shutil

# Create a temporary directory structure for the function to work with
temp_dir = tempfile.mkdtemp()
data_dir = temp_dir + '/'

# Create the required directory structure
os.makedirs(data_dir + 'train/A/', exist_ok=True)
os.makedirs(data_dir + 'train/GT/', exist_ok=True)
os.makedirs(data_dir + 'val/A/', exist_ok=True)
os.makedirs(data_dir + 'val/GT/', exist_ok=True)

# Create some dummy files
for i in range(3):
    open(data_dir + 'train/A/image_' + str(i) + '.jpg', 'w').close()
    open(data_dir + 'train/GT/image_' + str(i) + '.jpg', 'w').close()

for i in range(2):
    open(data_dir + 'val/A/image_' + str(i) + '.jpg', 'w').close()
    open(data_dir + 'val/GT/image_' + str(i) + '.jpg', 'w').close()

ARGS = {
    'data_dir': data_dir
}
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 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
window_reverse Ran
ran; our contract draft was wrong, not the code
tamer-saleh/s1gflood-detection/swin.py
code served (permissive licence) · get_code("61bf152e6a42a184")
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 Tensor, ndim 4, dtype family float, shape (2, 8, 12, 3) 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)

# Parameters for window_reverse
# windows: (num_windows*B, window_size, window_size, C)
# The function expects windows to be partitioned from an image of size (B, H, W, C)
# where the image is divided into non-overlapping windows of size window_size x window_size

B = 2  # batch size
H = 8  # image height
W = 12  # image width
window_size = 4  # window size
C = 3  # number of channels

# Calculate number of windows
num_windows_h = H // window_size  # 2
num_windows_w = W // window_size  # 3
num_windows = num_windows_h * num_windows_w  # 6

# windows shape: (num_windows*B, window_size, window_size, C)
# = (6*2, 4, 4, 3) = (12, 4, 4, 3)
windows = torch.randn(num_windows * B, window_size, window_size, C)

ARGS = {
    "windows": windows,
    "window_size": window_size,
    "H": H,
    "W": W,
}
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 4, dtype family float, shape (2, 8, 12, 3) — shape (2, 8, 12, 3) 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
BasicLayer Not yet run
unverified (harvested, no recorded run)
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("6ff0493f05a12074")
How it ran

no invocation recorded.

STViT Not yet run
unverified (harvested, no recorded run)
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("b1693bc0a5bf9e5b")
How it ran

no invocation recorded.

StokenAttentionLayer Not yet run
unverified (harvested, no recorded run)
yangyucheng000/papercode-2/STViT-Mindspore-main/models/stvit.py
code served (permissive licence) · get_code("6db1322f923dc42b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 25 samples lifted from this paper's linked repositories, 25 carry a function identity and 0 do not. Of the 25 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 4 the same month, 6 later) and 17 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
169 dated earlier, 4 the same month, 246 later, 11 same year, order not determinable, 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
103 dated earlier, 2 the same month, 197 later, 9 same year, order not determinable, 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
window_reverse 227 other papers
30 dated earlier, 2 the same month, 193 later, 2 same year, order not determinable · 34 only as an assembly brick
1608.03983 (2016-08)
SGDR: Stochastic Gradient Descent with Warm Restarts
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 224 more not named here
window_partition 223 other papers
28 dated earlier, 2 the same month, 191 later, 2 same year, order not determinable · 32 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1711.10925 (2017-11)
Deep Image Prior
2003.13678 (2020-03)
Designing Network Design Spaces
and 220 more not named here
get_sinusoid_encoding 12 other papers
6 dated earlier, 6 later · 1 only as an assembly brick
2101.11986 (2021-01)
Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
2104.12099 (2021-04)
Visual Saliency Transformer
2106.03746 (2021-06)
Efficient Training of Visual Transformers with Small Datasets
and 9 more not named here
get_norm_layer 8 other papers
6 dated earlier, 1 later, 1 same year, order not determinable
1406.2661 (2014-06)
Generative Adversarial Networks
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1907.04312 (2019-07)
Positional Normalization
and 5 more not named here
window_partition 1 other paper
1 dated earlier
2106.03348 (2021-06)
ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive Bias
window_reverse 1 other paper
1 dated earlier
2106.03348 (2021-06)
ViTAE: Vision Transformer Advanced by Exploring Intrinsic Inductive Bias

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

Vision transformers have shown great potential in various computer vision tasks owing to their strong capability to model long-range dependency using the self-attention mechanism. Nevertheless, they treat an image as a 1D sequence of visual tokens, lacking an intrinsic inductive bias (IB) in modeling local visual structures and dealing with scale variance, which is instead learned implicitly from large-scale training data with longer training schedules. In this paper, we leverage the two IBs and propose the ViTAE transformer, which utilizes a reduction cell for multi-scale feature and a normal cell for locality. The two kinds of cells are stacked in both isotropic and multi-stage manners to formulate two families of ViTAE models, i.e., the vanilla ViTAE and ViTAEv2. Experiments on the ImageNet dataset as well as downstream tasks on the MS COCO, ADE20K, and AP10K datasets validate the superiority of our models over the baseline and representative models. Besides, we scale up our ViTAE model to 644M parameters and obtain the state-of-the-art classification performance, i.e., 88.5% Top-1 classification accuracy on ImageNet validation set and the best 91.2% Top-1 classification accuracy on ImageNet Real validation set, without using extra private data. It demonstrates that the introduced inductive bias still helps when the model *Q. Zhang and Y. Xu contribute equally to this work.

For agents

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

get_harvested_code_for_paper("2202.10108")
get_code_for_paper("2202.10108")
have("2202.10108")

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

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

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

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

Connect an agent — have() is free.