SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.10074 · NeurIPS · 2023

SoTTA: Robust Test-Time Adaptation on Noisy Data Streams

Taesik Gong, Yewon Kim, Sung-Ju Lee, Taeckyung Lee, Sorn Chottananurak

arXiv · PDF · Open in the Atlas

Code that ran

8 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 3 failures of our instrument; 5 no recorded run), measured 2026-11-22; 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/2310.10074.json · badge: /api/ran/2310.10074.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
taeckyung/SoTTA canonical (classifier label)
classifier basis: classifier_2025
8 ran · 5 no recorded run
FunctionStatusWhere it lives
CSTU Ran
ran on a synthesized input · constructed an object; no result was computed
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("37954f9b076ab80e")
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, CSTU: 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 math

torch.manual_seed(0)

class MemoryItem:
    def __init__(self, data=None, uncertainty=0, age=0):
        self.data = data
        self.uncertainty = uncertainty
        self.age = age

    def increase_age(self):
        if not self.empty():
            self.age += 1

    def get_data(self):
        return (self.data, self.uncertainty, self.age)

    def empty(self):
        return self.data == 'empty'

class CSTU:
    def __init__(self, capacity, num_class, lambda_t=1.0, lambda_u=1.0):
        self.capacity = capacity
        self.num_class = num_class
        self.per_class = self.capacity / self.num_class
        self.lambda_t = lambda_t
        self.lambda_u = lambda_u
        self.data = [[] for _ in range(self.num_class)]

    def set_memory(self, state_dict):
        self.capacity = state_dict['capacity']
        self.num_class = state_dict['num_class']
        self.per_class = state_dict['per_class']
        self.lambda_t = state_dict['lambda_t']
        self.lambda_u = state_dict['lambda_u']
        self.data = [ls[:] for ls in state_dict['data']]

    def save_state_dict(self):
        dic = {}
        dic['capacity'] = self.capacity
        dic['num_class'] = self.num_class
        dic['per_class'] = self.per_class
        dic['lambda_t'] = self.lambda_t
        dic['lambda_u'] = self.lambda_u
        dic['data'] = [ls[:] for ls in self.data]
        return dic

    def get_occupancy(self):
        occupancy = 0
        for data_per_cls in self.data:
            occupancy += len(data_per_cls)
        return occupancy

    def per_class_dist(self):
        per_class_occupied = [0] * self.num_class
        for cls, class_list in enumerate(self.data):
            per_class_occupied[cls] = len(class_list)
        return per_class_occupied

    def add_instance(self, instance):
        assert len(instance) == 3
        x, prediction, uncertainty = instance
        new_item = MemoryItem(data=x, uncertainty=uncertainty, age=0)
        new_score = self.heuristic_score(0, uncertainty)
        if self.remove_instance(prediction, new_score):
            self.data[prediction].append(new_item)
        self.add_age()

    def remove_instance(self, cls, score):
        class_list = self.data[cls]
        class_occupied = len(class_list)
        all_occupancy = self.get_occupancy()
        if all_occupancy < self.capacity:
            return True
        if class_occupied < self.per_class:
            majority_classes = self.get_majority_classes()
            return self.remove_from_classes(majority_classes, score)
        else:
            return self.remove_from_classes([cls], score)

    def remove_from_classes(self, classes, score_base):
        max_class = None
        max_index = None
        max_score = None
        for cls in classes:
            for idx, item in enumerate(self.data[cls]):
                uncertainty = item.uncertainty
                age = item.age
                score = self.heuristic_score(age=age, uncertainty=uncertainty)
                if max_score is None or score >= max_score:
                    max_score = score
                    max_index = idx
                    max_class = cls
        if max_class is not None:
            if max_score > score_base:
                self.data[max_class].pop(max_index)
                return True
            else:
                return False
        else:
            return True

    def get_majority_classes(self):
        per_class_dist = self.per_class_dist()
        max_occupied = max(per_class_dist)
        classes = []
        for i, occupied in enumerate(per_class_dist):
            if occupied == max_occupied:
                classes.append(i)
        return classes

    def heuristic_score(self, age, uncertainty):
        return self.lambda_t * 1 / (1 + math.exp(-age / self.capacity)) + self.lambda_u * uncertainty / math.log(self.num_class)

    def add_age(self):
        for class_list in self.data:
            for item in class_list:
                item.increase_age()
        return

    def get_memory(self):
        tmp_data = []
        tmp_age = []
        for class_list in self.data:
            for item in class_list:
                tmp_data.append(item.data)
                tmp_age.append(item.age)
        tmp_age = [x / self.capacity for x in tmp_age]
        return (tmp_data, tmp_age)

ARGS = {
    'capacity': 100,
    'num_class': 5,
    'lambda_t': 1.0,
    'lambda_u': 1.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 CSTU — 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 CSTU 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
ConfFIFO Ran
ran on a synthesized input · constructed an object; no result was computed
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("e8b803dc0956626a")
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, ConfFIFO: 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 numpy as np

torch.manual_seed(0)

ARGS = {
    "capacity": 10,
    "threshold": 0.5
}
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 ConfFIFO — 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 ConfFIFO 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
FIFO Ran
ran on a synthesized input · constructed an object; no result was computed
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("e2796dd5351a82a0")
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, FIFO: 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 numpy as np

torch.manual_seed(0)

# FIFO class stores a list of instances, each with 3 components
# The capacity parameter controls max size of the FIFO buffer
# Instances are 3-tuples that get appended to self.data (3 separate lists)

capacity = 5

ARGS = {
    'capacity': capacity
}
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 FIFO — 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 FIFO 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
HLoss Ran
ran on a synthesized input · constructed an object; no result was computed
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("cb6c1ea449710403")
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, HLoss: 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
from torch import nn

torch.manual_seed(0)

# HLoss takes two parameters in __init__:
# 1. temp_factor (float, default=1.0)
# The forward method takes:
# 1. x (tensor) - logits that get softmaxed

# Create a small tensor for x
# Shape should be (batch_size, num_classes)
# Using batch=2, num_classes=4 for tiny but distinct dimensions
x = torch.randn(2, 4)

ARGS = {
    "temp_factor": 1.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 HLoss — 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 HLoss 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
MemoryItem Ran
ran on a synthesized input · constructed an object; no result was computed
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("a829fc46b04e2042")
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, MemoryItem: 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 numpy as np

torch.manual_seed(0)

# MemoryItem.__init__ takes three parameters: data, uncertainty, age
# Looking at the body:
# - data is used in empty() which checks if data == 'empty', so it can be a string
# - uncertainty is a numeric value (compared/stored)
# - age is a numeric value (incremented in increase_age)

# Create valid arguments
ARGS = {
    "data": "test_data",
    "uncertainty": 0.5,
    "age": 2
}
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 MemoryItem — 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 MemoryItem 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
calc_energy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("fc962c3df9bd26ac")
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 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

torch.manual_seed(0)

# Create a small tensor with shape (batch_size=2, dim=4)
x = torch.randn(2, 4)

# Set temperature factor
temp_factor = 1.0

# Construct the arguments dictionary
ARGS = {
    "x": x,
    "temp_factor": temp_factor,
}
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 1, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
sam_collect_params Ran
ran; our contract draft was wrong, not the code
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("bde04657eba9f1f5")
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
from torch import nn
import numpy as np

torch.manual_seed(0)

# Build a small model with normalization layers
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Create a model with various norm layers
        self.conv1 = nn.Conv2d(3, 4, 3)
        self.bn1 = nn.BatchNorm2d(4)
        self.layer1 = nn.Sequential(
            nn.Conv2d(4, 8, 3),
            nn.BatchNorm2d(8)
        )
        self.layer4 = nn.Sequential(
            nn.Conv2d(8, 16, 3),
            nn.BatchNorm2d(16)
        )
        self.fc = nn.Linear(16, 10)
        self.norm = nn.LayerNorm(10)
        
        # Add GroupNorm for variety
        self.gn = nn.GroupNorm(2, 8)
        
    def forward(self, x):
        x = self.conv1(x)
        x = self.bn1(x)
        x = self.layer1(x)
        x = self.layer4(x)
        return x

model = SimpleModel()

ARGS = {
    'model': model,
    'freeze_top': 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 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
softmax_entropy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("a9edd84f4eedeec8")
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 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

torch.manual_seed(0)

# Create a small batch of logits
# Shape: (batch_size=2, num_classes=4)
x = torch.randn(2, 4)

ARGS = {
    "x": x,
}
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 1, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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
DNN Not yet run
unverified (harvested, no recorded run)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("d2cf21a1fafc8cca")
How it ran

no invocation recorded.

HUS Not yet run
unverified (harvested, no recorded run)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("7c10fe54b79944cb")
How it ran

no invocation recorded.

SoTTA Not yet run
unverified (harvested, no recorded run)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("d02457bfc418d32b")
How it ran

no invocation recorded.

load_cache Not yet run
unverified (harvested, no recorded run)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("59771617b119cc63")
How it ran

no invocation recorded.

save_cache Not yet run
unverified (harvested, no recorded run)
taeckyung/SoTTA/learner/sotta.py
code served (permissive licence) · get_code("88a3a9b822c1f39f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 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
MemoryItem
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2603.03796 (2026-03)
When and Where to Reset Matters for Long-Term Test-Time Adaptation
calc_energy
brick of this paper's assembly: helper
1 other paper
1 later
2404.01351 (2024-04)
AETTA: Label-Free Accuracy Estimation for Test-Time Adaptation
softmax_entropy
brick of this paper's assembly: helper
1 other paper
1 later
2404.01351 (2024-04)
AETTA: Label-Free Accuracy Estimation for Test-Time Adaptation

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

Test-time adaptation (TTA) aims to address distributional shifts between training and testing data using only unlabeled test data streams for continual model adaptation. However, most TTA methods assume benign test streams, while test samples could be unexpectedly diverse in the wild. For instance, an unseen object or noise could appear in autonomous driving. This leads to a new threat to existing TTA algorithms; we found that prior TTA algorithms suffer from those noisy test samples as they blindly adapt to incoming samples. To address this problem, we present Screening-out Test-Time Adaptation (SoTTA), a novel TTA algorithm that is robust to noisy samples. The key enabler of SoTTA is two-fold: (i) inputwise robustness via high-confidence uniform-class sampling that effectively filters out the impact of noisy samples and (ii) parameter-wise robustness via entropysharpness minimization that improves the robustness of model parameters against large gradients from noisy samples. Our evaluation with standard TTA benchmarks with various noisy scenarios shows that our method outperforms state-of-the-art TTA methods under the presence of noisy samples and achieves comparable accuracy to those methods without noisy samples. The source code is available at https://github.com/taeckyung/SoTTA.

For agents

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

get_harvested_code_for_paper("2310.10074")
get_code_for_paper("2310.10074")
have("2310.10074")

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

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

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

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

Connect an agent — have() is free.