SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.11301 · 2024

ReViT: Enhancing Vision Transformers Feature Diversity with Attention Residual Connections

arXiv · PDF · Open in the Atlas

Code that ran

22 of 24 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; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 17 failures of our instrument; 2 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/2402.11301.json · badge: /api/ran/2402.11301.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
adiko1997/revit canonical (classifier label)
classifier basis: census
22 ran · 2 no recorded run
FunctionStatusWhere it lives
GetEntities Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/data.py
code served (permissive licence) · get_code("a3eebab667e1ae7d")
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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
os.makedirs(train_dir)

# Create some class subdirectories
os.makedirs(os.path.join(train_dir, 'class_a'))
os.makedirs(os.path.join(train_dir, 'class_b'))
os.makedirs(os.path.join(train_dir, 'class_c'))

ARGS = {
    'data_dir': temp_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 — 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
MapClasses Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/data.py
code served (permissive licence) · get_code("6862b0bd0e344d92")
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

# Create a temporary directory and mapping file for testing
temp_dir = tempfile.mkdtemp()

# Create a sample mapping file with tab-separated code and class names
mapping_content = "code1\tclass_name_1\ncode2\tclass_name_2\ncode3\tclass_name_3\n"
mapping_file_path = os.path.join(temp_dir, "mapping.txt")
with open(mapping_file_path, "w") as f:
    f.write(mapping_content)

ARGS = {
    "data_dir": temp_dir,
    "mapping_file": "mapping.txt"
}
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
SampleList Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/data.py
code served (permissive licence) · get_code("1c7c19cf255af8b5")
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()

# Create the directory structure
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val')

# Create training directories
class_names = ['class_a', 'class_b']
for cls in class_names:
    cls_img_dir = os.path.join(train_dir, cls, 'images')
    os.makedirs(cls_img_dir, exist_ok=True)
    # Create dummy image files
    with open(os.path.join(cls_img_dir, f'{cls}_img1.jpg'), 'w') as f:
        f.write('')
    with open(os.path.join(cls_img_dir, f'{cls}_img2.jpg'), 'w') as f:
        f.write('')

# Create validation directory
val_img_dir = os.path.join(val_dir, 'images')
os.makedirs(val_img_dir, exist_ok=True)
# Create dummy validation image files
with open(os.path.join(val_img_dir, 'val_img1.jpg'), 'w') as f:
    f.write('')
with open(os.path.join(val_img_dir, 'val_img2.jpg'), 'w') as f:
    f.write('')

# Define arguments
ARGS = {
    'data_dir': temp_dir,
    'entities': ['class_a', 'class_b'],
    'cls_to_idx': {'class_a': 0, 'class_b': 1},
    'val_maps': {'val_img1.jpg': 'class_a', 'val_img2.jpg': 'class_b'},
    'mode': 'train'
}
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
attention_pool Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
adiko1997/revit/model/attention.py
code served (permissive licence) · get_code("f118f90404a2705d")
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 torch.nn as nn

torch.manual_seed(0)

# Create a minimal pooling module that the function will call
class MinimalPool(nn.Module):
    def forward(self, x):
        # x shape: (B, C, H, W)
        # Apply a simple 2x2 average pooling
        return nn.functional.avg_pool2d(x, kernel_size=2, stride=2)

# Create a minimal norm module
class MinimalNorm(nn.Module):
    def forward(self, x):
        # x shape: (B, N, L, C)
        # Just return as-is for this stand-in
        return x

# Construct arguments
pool_module = MinimalPool()
norm_module = MinimalNorm()

# Create a tensor with shape (B, N, L, C) = (2, 1, 5, 4)
# This includes a cls token (1 token) + 4 spatial tokens
# For spatial tokens: H=2, W=2 (so 4 tokens total)
tensor = torch.randn(2, 1, 5, 4)

# hw_shape should be [H, W] for the spatial dimensions
hw_shape = [2, 2]

ARGS = {
    "tensor": tensor,
    "pool": pool_module,
    "hw_shape": hw_shape,
    "has_cls_embed": True,
    "norm": norm_module
}
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
construct_optimizer Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/model/optimizer.py
code served (permissive licence) · get_code("6e8d64ae2c5f0678")
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

torch.manual_seed(0)

# Create a minimal config object with all required attributes
class Config:
    def __init__(self):
        self.DEVICE = type('obj', (object,), {'num_gpu': 1})()
        self.SOLVER = type('obj', (object,), {
            'optimizing_method': 'sgd',
            'base_lr': 0.01,
            'momentum': 0.9,
            'weight_decay': 1e-4,
            'dampening': 0.0,
            'nesterov': True,
            'zero_wd_1D_param': True
        })()

# Create a minimal model with batch norm and regular layers
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Add batch norm layer (will go to bn_parameters)
        self.bn = nn.BatchNorm1d(3)
        # Add linear layer with weights (will go to non_bn_parameters)
        self.fc1 = nn.Linear(4, 3)
        # Add another linear layer (will go to zero_parameters due to 1D bias)
        self.fc2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.bn(x)
        x = self.fc1(x)
        x = self.fc2(x)
        return x

# Instantiate model and config
model = MinimalModel()
cfg = Config()

ARGS = {
    'model': model,
    'cfg': cfg
}
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
convert_to_one_hot Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/mixup.py
code served (permissive licence) · get_code("c1d7ffe2c3f88e99")
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 small target tensor with class indices
# Using batch size 2, with class indices in range [0, 3]
targets = torch.tensor([0, 2], dtype=torch.long)

# Number of classes
num_classes = 4

# On and off values for one-hot encoding
on_value = 1.0
off_value = 0.0

ARGS = {
    "targets": targets,
    "num_classes": num_classes,
    "on_value": on_value,
    "off_value": off_value,
}
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
downsample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
adiko1997/revit/model/attention.py
code served (permissive licence) · get_code("07d1986e7f19e873")
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 4, dtype family float, shape (2, 3, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Construct valid arguments for downsample function
# attn_res: shape [B, n_heads, num_patches_W_2, num_patches_H_2]
# The function expects num_patches_W_2 and num_patches_H_2 to be perfect squares
# Let's use 4x4 = 16 patches squared for both dimensions initially

B = 2
n_heads = 3
num_patches_W_2 = 16  # This will be interpreted as 4x4
num_patches_H_2 = 16  # This will be interpreted as 4x4

attn_res = torch.randn(B, n_heads, num_patches_W_2, num_patches_H_2)

# q_W and q_H are the target query dimensions
# They should be smaller than or equal to the current dimensions for pooling to work
q_W = torch.tensor(4)  # Target width patches (smaller than current 4)
q_H = torch.tensor(4)  # Target height patches (smaller than current 4)

ARGS = {
    "attn_res": attn_res,
    "q_W": q_W,
    "q_H": q_H,
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 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
drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
adiko1997/revit/model/common.py
code served (permissive licence) · get_code("314973a77b15948e")
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 a small tensor with batch size 2 and feature dimension 4
x = torch.randn(2, 4, dtype=torch.float32)

# Set drop probability to a value between 0 and 1
drop_prob = 0.5

# Set training flag to True to enable stochastic depth
training = True

ARGS = {
    "x": x,
    "drop_prob": drop_prob,
    "training": training,
}
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
get_loss_func Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/model/loss.py
code served (permissive licence) · get_code("345d213a14918073")
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 SoftTargetCrossEntropy. 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.nn.functional as F

class SoftTargetCrossEntropy(nn.Module):
    """
    Cross entropy loss with soft target.
    """

    def __init__(self, reduction='mean'):
        """
        Args:
            reduction (str): specifies reduction to apply to the output. It can be
                "mean" (default) or "none".
        """
        super(SoftTargetCrossEntropy, self).__init__()
        self.reduction = reduction

    def forward(self, x, y):
        loss = torch.sum(-y * F.log_softmax(x, dim=-1), dim=-1)
        if self.reduction == 'mean':
            return loss.mean()
        elif self.reduction == 'none':
            return loss
        else:
            raise NotImplementedError

_LOSSES = {'cross_entropy': nn.CrossEntropyLoss(), 'bce': nn.BCELoss(), 'bce_logit': nn.BCEWithLogitsLoss(), 'soft_cross_entropy': SoftTargetCrossEntropy()}

def get_loss_func(loss_name):
    """
    Retrieve the loss given the loss name.
    Args (int):
        loss_name: the name of the loss to use.
    """
    if loss_name not in _LOSSES.keys():
        raise NotImplementedError('Loss {} is not supported'.format(loss_name))
    return _LOSSES[loss_name]

torch.manual_seed(0)

ARGS = {
    'loss_name': 'soft_cross_entropy'
}
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 SoftTargetCrossEntropy — a SoftTargetCrossEntropy output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SoftTargetCrossEntropy 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_param_groups Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/model/optimizer.py
code served (permissive licence) · get_code("e41a84c48e4dfc26")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal config object with the required attributes
class Config:
    def __init__(self):
        self.DEVICE = type('obj', (object,), {'num_gpu': 1})()
        self.SOLVER = type('obj', (object,), {
            'weight_decay': 0.01,
            'zero_wd_1D_param': True
        })()

# Build a minimal model with various parameter types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # BatchNorm layer (bn_parameters)
        self.bn = nn.BatchNorm1d(4)
        # Regular conv layer (non_bn_parameters)
        self.conv = nn.Conv2d(3, 4, 3)
        # Bias layer (zero_parameters when zero_wd_1D_param=True)
        self.linear = nn.Linear(4, 2)
        # Parameter with requires_grad=False (no_grad_parameters)
        self.register_parameter('frozen', nn.Parameter(torch.randn(4)))
        self.frozen.requires_grad = False
    
    def forward(self, x):
        return x

# Create instances
model = SimpleModel()
cfg = Config()

ARGS = {
    'model': model,
    'cfg': cfg
}
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 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
get_relative_position_index Ran
ran, honoured the contract we drafted
adiko1997/revit/model/reswin.py
code served (permissive licence) · get_code("6c1b7082e865f0e0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family int, shape (12, 12) 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)

# The function takes two integer parameters: win_h and win_w
# These represent window height and width for computing relative position indices
# The function uses them as:
# - Arguments to torch.arange()
# - Arithmetic operations (win_h - 1, win_w - 1, 2 * win_w - 1)
# So we need positive integers

ARGS = {
    "win_h": 4,
    "win_w": 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 Tensor, ndim 2, dtype family int, shape (12, 12) — shape (12, 12) 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
lr_func_cosine Ran
ran, honoured the contract we drafted
adiko1997/revit/model/lr_policy.py
code served (permissive licence) · get_code("96179ff95fbfb203")
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 math

class CfgNode:
    def __init__(self):
        self.SOLVER = SolverConfig()

class SolverConfig:
    def __init__(self):
        self.warmup_epochs = 5
        self.cosine_after_warmup = True
        self.cosine_end_lr = 0.0001
        self.base_lr = 0.1
        self.max_epochs = 100

cfg = CfgNode()
cur_epoch = 25.0

ARGS = {
    "cfg": cfg,
    "cur_epoch": cur_epoch
}
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 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
lr_func_steps_with_relative_lrs Ran
ran, honoured the contract we drafted
adiko1997/revit/model/lr_policy.py
code served (permissive licence) · get_code("099da579c821206a")
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
from types import SimpleNamespace

torch.manual_seed(0)

# Create a minimal config object with the required SOLVER attributes
cfg = SimpleNamespace()
cfg.SOLVER = SimpleNamespace()

# Set up the learning rate schedule parameters
cfg.SOLVER.steps = [10, 20, 30]  # Epochs at which to change learning rate
cfg.SOLVER.max_epochs = 40  # Maximum number of epochs
cfg.SOLVER.lrs = [1.0, 0.1, 0.01, 0.001]  # Relative learning rates for each step (need one more than steps)
cfg.SOLVER.base_lr = 0.1  # Base learning rate

# Test epoch - should be in one of the steps
cur_epoch = 15.5

ARGS = {
    "cfg": cfg,
    "cur_epoch": cur_epoch
}
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
mixup_target Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/mixup.py
code served (permissive licence) · get_code("0f31beff332194d6")
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 a small batch of class labels (targets)
# Using a batch size of 2, with class indices in range [0, 3]
target = torch.tensor([0, 2], dtype=torch.long)

# Number of classes
num_classes = 4

# Lambda value for mixup (probability weight)
lam = 0.7

# Label smoothing value
smoothing = 0.1

ARGS = {
    "target": target,
    "num_classes": num_classes,
    "lam": lam,
    "smoothing": smoothing,
}
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
params_count Ran
ran, honoured the contract we drafted
adiko1997/revit/utils/model_stats.py
code served (permissive licence) · get_code("18037498e45c3930")
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 int, ndim 0, dtype family int, 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 numpy as np

torch.manual_seed(0)

# Create a small model with various layer types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv3d(3, 16, kernel_size=3, padding=1)
        self.bn1 = nn.BatchNorm3d(16)
        self.linear1 = nn.Linear(16, 8)
        self.linear2 = nn.Linear(8, 4)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

model = SimpleModel()

ARGS = {
    "model": model,
    "ignore_bn": False
}
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 int, ndim 0, dtype family int, 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
rand_bbox Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/mixup.py
code served (permissive licence) · get_code("1d66bc560c9e0685")
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 int; 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 numpy as np

np.random.seed(0)

ARGS = {
    'img_shape': (1, 3, 32, 24),
    'lam': 0.4,
    'margin': 0.1,
    'count': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — 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 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
round_width Ran
ran, honoured the contract we drafted
adiko1997/revit/model/common.py
code served (permissive licence) · get_code("942ad4676769ca5e")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

ARGS = {
    "width": 64,
    "multiplier": 1.5,
    "min_width": 8,
    "divisor": 8,
    "verbose": False,
}
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 int, ndim 0, dtype family int, 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
shear_x Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/rand_augment.py
code served (permissive licence) · get_code("e866e1196986f728")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image object
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_x
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
shear_y Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/rand_augment.py
code served (permissive licence) · get_code("7b2503c99c9447fb")
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 Image. 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 random
import PIL
from PIL import Image, ImageEnhance, ImageOps

# Create a simple PIL Image for testing
img = Image.new('RGB', (100, 100), color='red')

# Define ARGS dict with all parameters for shear_y function
ARGS = {
    'img': img,
    'factor': 0.5,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
translate_x_rel Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/dataset/rand_augment.py
code served (permissive licence) · get_code("323759f906fbb394")
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 Image. 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 random
import PIL
from PIL import Image
import numpy as np

# Create a small PIL Image object for testing
# The function uses img.size[0] and img.transform()
test_img = Image.new('RGB', (100, 80), color='red')

# Define ARGS dict with all parameters for translate_x_rel
ARGS = {
    'img': test_img,
    'pct': 0.2,
    'resample': Image.BILINEAR,
    'fillcolor': (255, 255, 255)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
adiko1997/revit/model/reswin.py
pointer only (licence: MIT); the stored copy get_code serves, from heekhero/DTL, is pointer only (licence: NONE) · get_code("993ae96666b00cb5")
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 heekhero/DTL, 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.

window_reverse Ran
ran; our contract draft was wrong, not the code
adiko1997/revit/model/reswin.py
code served (permissive licence) · get_code("265c72d3ccc64544")
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 4, dtype family float, shape (2, 8, 8, 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 = 8  # image width
window_size = 4  # window size
C = 3  # number of channels

# Calculate num_windows per batch: (H/window_size) * (W/window_size)
num_windows_per_batch = (H // window_size) * (W // window_size)  # (8/4) * (8/4) = 4
num_windows_total = num_windows_per_batch * B  # 4 * 2 = 8

# Create windows tensor with shape (num_windows*B, window_size, window_size, C)
# Shape: (8, 4, 4, 3)
windows = torch.randn(num_windows_total, 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, 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 4, dtype family float, shape (2, 8, 8, 3) — shape (2, 8, 8, 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
cal_rel_pos_spatial Not yet run
unverified (harvested, no recorded run)
adiko1997/revit/model/attention.py
code served (permissive licence) · get_code("5de56fec3ce10382")
How it ran

no invocation recorded.

get_lr_at_epoch Not yet run
unverified (harvested, no recorded run)
adiko1997/revit/model/lr_policy.py
code served (permissive licence) · get_code("0fd362a779c37232")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 14 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 10 later) and 10 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
window_partition 31 other papers
18 dated earlier, 9 later, 4 same year, order not determinable
2111.11418 (2021-11)
MetaFormer Is Actually What You Need for Vision
2203.12119 (2022-03)
Visual Prompt Tuning
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
and 28 more not named here
shear_x 27 other papers
17 dated earlier, 10 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
shear_y 27 other papers
17 dated earlier, 10 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 24 more not named here
translate_x_rel 26 other papers
17 dated earlier, 9 later
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2109.06165 (2021-09)
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
and 23 more not named here
rand_bbox 14 other papers
13 dated earlier, 1 later
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2206.13559 (2022-06)
ST-Adapter: Parameter-Efficient Image-to-Video Transfer Learning
and 11 more not named here
window_reverse 14 other papers
8 dated earlier, 5 later, 1 same year, order not determinable
1706.03762 (2017-06)
Attention Is All You Need
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
2210.04135 (2022-10)
VoLTA: Vision-Language Transformer with Weakly-Supervised Local-Feature Alignment
and 11 more not named here
get_loss_func 13 other papers
11 dated earlier, 2 later
1812.03982 (2018-12)
SlowFast Networks for Video Recognition
2105.11731 (2021-05)
ST-HOI: A Spatial-Temporal Baseline for Human-Object Interaction Detection in Videos
2106.09703 (2021-06)
MaCLR: Motion-aware Contrastive Learning of Representations for Videos
and 10 more not named here
attention_pool 3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2302.04869 (2023-02)
Reversible Vision Transformers
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression
2601.22674 (2026-01)
VisionTrim: Unified Vision Token Compression for Training-Free MLLM Acceleration
cal_rel_pos_spatial 3 other papers
1 dated earlier, 2 later · 1 only as an assembly brick
2302.04869 (2023-02)
Reversible Vision Transformers
2406.20092 (2024-06)
Efficient Large Multi-modal Models via Visual Context Compression
2601.22674 (2026-01)
VisionTrim: Unified Vision Token Compression for Training-Free MLLM Acceleration
convert_to_one_hot 3 other papers
3 dated earlier
2206.13559 (2022-06)
ST-Adapter: Parameter-Efficient Image-to-Video Transfer Learning
2302.04869 (2023-02)
Reversible Vision Transformers
2306.07703 (2023-06)
E2E-LOAD: End-to-End Long-form Online Action Detection
mixup_target 2 other papers
2 dated earlier
2206.13559 (2022-06)
ST-Adapter: Parameter-Efficient Image-to-Video Transfer Learning
2302.04869 (2023-02)
Reversible Vision Transformers
drop_path 1 other paper
1 later
2407.02309 (2024-07)
Semantically Guided Representation Learning For Action Anticipation
get_relative_position_index 1 other paper
1 dated earlier
2311.05589 (2023-11)
A Coefficient Makes SVRG Effective
params_count 1 other paper
1 dated earlier
2310.19060 (2023-10)
TESTA: Temporal-Spatial Token Aggregation for Long-form Video-Language Understanding

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 Transformer (ViT) self-attention mechanism is characterized by feature collapse in deeper layers, resulting in the vanishing of low-level visual features. However, such features can be helpful to accurately represent and identify elements within an image and increase the accuracy and robustness of vision-based recognition systems. Following this rationale, we propose a novel residual attention learning method for improving ViT-based architectures, increasing their visual feature diversity and model robustness. In this way, the proposed network can capture and preserve significant low-level features, providing more details about the elements within the scene being analyzed. The effectiveness and robustness of the presented method are evaluated on five image classification benchmarks, including ImageNet1k, CIFAR10, CIFAR100, Oxford Flowers-102, and Oxford-IIIT Pet, achieving improved performances. Additionally, experiments on the COCO2017 dataset show that the devised approach discovers and incorporates semantic and spatial relationships for object detection and instance segmentation when implemented into spatial-aware transformer models.

For agents

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

get_harvested_code_for_paper("2402.11301")
get_code_for_paper("2402.11301")
have("2402.11301")

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

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

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

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

Connect an agent — have() is free.