SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.10232 · 2021

Test time Adaptation through Perturbation Robustness

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 2 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 1 failure of our instrument; 0 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/2110.10232.json · badge: /api/ran/2110.10232.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
prabhuteja12/pest community (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
FunctionStatusWhere it lives
copy_model_and_optimizer Ran
ran; our contract draft was wrong, not the code
prabhuteja12/pest/utils/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yuyongcan/stamp, is pointer only (licence: NONE) · get_code("d203451c6493f65d")
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 yuyongcan/stamp, 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.

entropy Ran
ran on a synthesized input
prabhuteja12/pest/utils/loss.py
code served (permissive licence) · get_code("3f26b332f594df3e")
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 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

torch.manual_seed(0)

# The function expects a tensor with logits
# It calls .softmax(1), .log_softmax(1), .sum(), and .size(0)
# So we need a 2D tensor (batch_size, num_classes)
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits
}
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 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
float_parameter Ran
ran, honoured the contract we drafted
prabhuteja12/pest/dataset/augmix.py
code served (permissive licence) · get_code("d22d7853c949aa23")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function: float_parameter(level, maxval)
# - level: numeric value between [0, PARAMETER_MAX], used in arithmetic
# - maxval: numeric value used in arithmetic
# - Returns: float result from scaling maxval according to level
# The function performs: float(level) * maxval / 10.0

# Create test arguments
level = 5  # A level value between 0 and PARAMETER_MAX (assuming PARAMETER_MAX=10)
maxval = 100.0  # Maximum value to be scaled

ARGS = {
    "level": level,
    "maxval": maxval
}
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 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
forward_and_adapt Ran
ran on a synthesized input
prabhuteja12/pest/adaptation_methods/noise_robustness.py
code served (permissive licence) · get_code("b82f06e6139d5f59")
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 (6, 15) 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)

# Build a minimal model that takes input and returns 3 sets of logits
class MinimalModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=5):
        super().__init__()
        self.fc = nn.Linear(input_dim, output_dim * 3)
    
    def forward(self, x):
        # Returns concatenated logits for 3 augmentations
        return self.fc(x)

# Build a minimal criterion that accepts 3 logit tensors
class MinimalCriterion(nn.Module):
    def forward(self, logits_aug1, logits_aug2, logits_clean):
        # Simple loss: MSE between augmentations and clean
        loss1 = torch.nn.functional.mse_loss(logits_aug1, logits_clean)
        loss2 = torch.nn.functional.mse_loss(logits_aug2, logits_clean)
        return loss1 + loss2

# Create instances
x = torch.randn(6, 4)  # batch_size=6 (will be split into 3 parts of 2)
criterion = MinimalCriterion()
model = MinimalModel(input_dim=4, output_dim=5)
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

ARGS = {
    'x': x,
    'criterion': criterion,
    'model': model,
    'optimizer': optimizer
}
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 (6, 15) — shape (6, 15) 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
forward_and_adapt Ran
ran on a synthesized input
prabhuteja12/pest/adaptation_methods/tent.py
code served (permissive licence) · get_code("b091215b926074c2")
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, 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
import torch.nn as nn

torch.manual_seed(0)

# Create a small model that takes input and produces output
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a criterion that takes model outputs and returns a scalar loss
class EntropyCriterion(nn.Module):
    def __init__(self):
        super().__init__()
    
    def forward(self, outputs):
        # Compute entropy loss from model outputs
        probs = torch.softmax(outputs, dim=1)
        entropy = -(probs * torch.log(probs + 1e-8)).sum(dim=1).mean()
        return entropy

# Create input tensor (batch_size=2, feature_dim=4)
x = torch.randn(2, 4)

# Create criterion
criterion = EntropyCriterion()

# Create model
model = SimpleModel()

# Create optimizer
optimizer = torch.optim.SGD(model.parameters(), lr=0.01)

# Define arguments dict
ARGS = {
    "x": x,
    "criterion": criterion,
    "model": model,
    "optimizer": optimizer
}
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, 3) — shape (2, 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
freeze_except_bn Ran
ran on a synthesized input
prabhuteja12/pest/utils/model_utils.py
code served (permissive licence) · get_code("779a20a92e4145da")
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 SimpleModel. 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)

# Build a small model with BatchNorm2d layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 16, 3)
        self.bn1 = nn.BatchNorm2d(16)
        self.conv2 = nn.Conv2d(16, 32, 3)
        self.bn2 = nn.BatchNorm2d(32)
        self.linear = nn.Linear(32, 10)
    
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.conv2(x)
        x = self.bn2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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_loss_function Ran
ran on a synthesized input
prabhuteja12/pest/utils/loss.py
code served (permissive licence) · get_code("855f88e3868b6d5d")
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 EntropyJSD. 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 small sample tensors for testing
batch_size = 2
num_classes = 4

logits_aug_1 = torch.randn(batch_size, num_classes)
logits_aug_2 = torch.randn(batch_size, num_classes)
logits_clean = torch.randn(batch_size, num_classes)

ARGS = {
    'name': 'entropyjsd',
    'loss_lambda': 0.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 EntropyJSD — a EntropyJSD output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a EntropyJSD 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
int_parameter Ran
ran, honoured the contract we drafted
prabhuteja12/pest/dataset/augmix.py
code served (permissive licence) · get_code("f0217da1d26e045b")
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 numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - level: should be between 0 and PARAMETER_MAX (which is 10 based on the division)
# - maxval: maximum value to scale

ARGS = {
    "level": 5,
    "maxval": 100
}
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
to_numpy Ran
ran on a synthesized input
prabhuteja12/pest/dataset/augmix.py
code served (permissive licence) · get_code("6deb98749be43fc8")
How it ran

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

from PIL import Image
import numpy as np

# Create a small PIL Image object
pil_img = Image.new('RGB', (4, 3), color=(255, 0, 0))

ARGS = {
    'pil_img': pil_img
}
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 ndarray, ndim 3, dtype family int, shape (3, 4, 3) — shape (3, 4, 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 2 the same month, 3 later) and 6 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
float_parameter 19 other papers
5 dated earlier, 2 the same month, 11 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
int_parameter 19 other papers
5 dated earlier, 2 the same month, 11 later, 1 same year, order not determinable · 2 only as an assembly brick
1912.02781 (2019-12)
AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty
2006.16241 (2020-06)
The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
2009.09238 (2020-09)
EfficientDeRain: Learning Pixel-wise Dilation Filtering for High-Efficiency Single-Image Deraining
and 16 more not named here
copy_model_and_optimizer 8 other papers
2 dated earlier, 6 later · 4 only as an assembly brick
2006.10726 (2020-06)
TENT: FULLY TEST-TIME ADAPTATION BY ENTROPY MINIMIZATION
2105.08714 (2021-05)
Fighting Gradients with Gradients: Dynamic Defenses against Adversarial Attacks
2302.12400 (2023-02)
Towards Stable Test-Time Adaptation in Dynamic Wild World
and 5 more not named here

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

Data samples generated by several real world processes are dynamic in nature \textit{i.e.}, their characteristics vary with time. Thus it is not possible to train and tackle all possible distributional shifts between training and inference, using the host of transfer learning methods in literature. In this paper, we tackle this problem of adapting to domain shift at inference time \textit{i.e.}, we do not change the training process, but quickly adapt the model at test-time to handle any domain shift. For this, we propose to enforce consistency of predictions of data sampled in the vicinity of test sample on the image manifold. On a host of test scenarios like dealing with corruptions (CIFAR-10-C and CIFAR-100-C), and domain adaptation (VisDA-C), our method is at par or significantly outperforms previous methods.

For agents

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

get_harvested_code_for_paper("2110.10232")
get_code_for_paper("2110.10232")
have("2110.10232")

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

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

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

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

Connect an agent — have() is free.