SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.18514 · ICML · 2025

Test-Time Adaptation with Binary Feedback

Jinwoo Shin, Junsu Kim, Taesik Gong, Sung-Ju Lee, Taeckyung Lee, Sorn Chottananurak, Unsupervised Entropy

arXiv · PDF · Open in the Atlas

Code that ran

13 of 13 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; 1 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2505.18514.json · badge: /api/ran/2505.18514.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/BiTTA canonical (classifier label)
classifier basis not recorded on the link
13 ran · 0 no recorded run
FunctionStatusWhere it lives
ResNet18 Ran
ran on a synthesized input
taeckyung/BiTTA/models/ResNet.py
code served (permissive licence) · get_code("dfdeebd2ab319782")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "filter": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ResNet34 Ran
ran on a synthesized input
taeckyung/BiTTA/models/ResNet.py
code served (permissive licence) · get_code("0db2a6b94d888b0e")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "filter": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ResNet50 Ran
ran on a synthesized input
taeckyung/BiTTA/models/ResNet.py
code served (permissive licence) · get_code("e4bc08da680e42e6")
How it ran

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

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "filter": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_arguments_from_file Ran
ran on a synthesized input
taeckyung/BiTTA/compare_arguments.py
code served (permissive licence) · get_code("b5d3af53cad842fb")
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 re
from typing import Dict, List, Set, Tuple
import tempfile
import os

# Create a temporary file with sample add_argument calls
temp_file_content = '''
import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--learning_rate', type=float, default=0.001, help='Learning rate for optimizer')
parser.add_argument('--batch_size', type=int, default=32, help='Batch size for training')
parser.add_argument('--epochs', type=int, default=100, help='Number of training epochs')
parser.add_argument('--output_dir', type=str, default='/tmp/output', help='Output directory path')
parser.add_argument('--use_cuda', action='store_true', help='Enable CUDA training')
parser.add_argument('--model_name', default='bert-base', help='Model name to use')
'''

# Write to a temporary file
temp_fd, temp_path = tempfile.mkstemp(suffix='.py', text=True)
try:
    with os.fdopen(temp_fd, 'w') as f:
        f.write(temp_file_content)
    
    # Define ARGS with the filepath parameter
    ARGS = {
        'filepath': temp_path
    }
finally:
    # Clean up the temp file after execution
    pass
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
extract_default Ran
ran on a synthesized input
taeckyung/BiTTA/compare_arguments.py
code served (permissive licence) · get_code("6510eca45388fb0f")
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 str. 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 re

def extract_default(arg_block: str) -> str:
    """Extract default value from add_argument block"""
    default_match = re.search('default\\s*=\\s*([^,\\)]+)', arg_block)
    return default_match.group(1).strip() if default_match else 'None'

# Test case 1: arg_block with default value
arg_block_with_default = "add_argument('--learning_rate', type=float, default=0.001, help='Learning rate')"

ARGS = {
    'arg_block': arg_block_with_default
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
extract_type Ran
ran on a synthesized input
taeckyung/BiTTA/compare_arguments.py
code served (permissive licence) · get_code("3da48796a1ca07b5")
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 str. 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 re

def extract_type(arg_block: str) -> str:
    """Extract argument type from add_argument block"""
    type_match = re.search('type\\s*=\\s*(\\w+)', arg_block)
    return type_match.group(1) if type_match else 'str'

# Test cases for arg_block
arg_block_with_type = "add_argument('--count', type=int, help='number of items')"
arg_block_without_type = "add_argument('--name', help='your name')"
arg_block_complex = "add_argument('--value',    type    =    float, default=1.0)"

ARGS = {
    'arg_block': arg_block_with_type
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_avg_online_acc Ran
ran on a synthesized input
taeckyung/BiTTA/print_acc.py
code served (permissive licence) · get_code("63b9f4d0c7cc2cc4")
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 json
import numpy as np
import tempfile
import os

# Create a temporary JSON file with the required structure
temp_dir = tempfile.mkdtemp()
file_path = os.path.join(temp_dir, "test_data.json")

# For random_setting=False case
json_data_false = {
    "accuracy": [0.5, 0.6, 0.7, 0.85]
}

with open(file_path, 'w') as f:
    json.dump(json_data_false, f)

# For random_setting=True case, create another file
file_path_random = os.path.join(temp_dir, "test_data_random.json")
json_data_true = {
    "pred": [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3],
    "gt": [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
}

with open(file_path_random, 'w') as f:
    json.dump(json_data_true, f)

ARGS = {
    "file_path": file_path,
    "random_setting": False
}
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 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
get_dirnames Ran
ran; our contract draft was wrong, not the code
taeckyung/BiTTA/process_cifar.py
code served (permissive licence) · get_code("7d3f76502e1e286c")
How it ran

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

import torch

ARGS = {
    'dataset': 'cifar-10c'
}
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, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_data Ran
ran; our contract draft was wrong, not the code
taeckyung/BiTTA/process_cifar.py
pointer only (licence: MIT); the stored copy get_code serves, from dmn-sjk/ar-tta, is pointer only (licence: NONE) · get_code("8e952e7f9820216a")
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 dmn-sjk/ar-tta, 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.

load_image Ran
ran, honoured the contract we drafted
taeckyung/BiTTA/data_loader/DOMAINNET126Dataset.py
pointer only (licence: MIT); the stored copy get_code serves, from DianCh/AdaContrast, is pointer only (licence: NONE) · get_code("d41e65573feeba36")
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 DianCh/AdaContrast, 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.

process_path Ran
ran on a synthesized input
taeckyung/BiTTA/print_acc.py
code served (permissive licence) · get_code("1ba2c7237a527239")
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 json
import os
import re
import pandas as pd
import numpy as np
import tempfile
from pathlib import Path

# Create a temporary directory structure with mock data
temp_dir = tempfile.mkdtemp()

# Create mock online_eval.json files
def create_mock_json(file_path, random_setting=False):
    os.makedirs(os.path.dirname(file_path), exist_ok=True)
    if random_setting:
        data = {
            'pred': [0, 1, 0, 1, 0, 1, 0, 1],
            'gt': [0, 1, 0, 1, 0, 1, 0, 1]
        }
    else:
        data = {
            'accuracy': [0.5, 0.6, 0.7, 0.8]
        }
    with open(file_path, 'w') as f:
        json.dump(data, f)

# Create directory structure for pacs dataset with multiple seeds and corruptions
dataset_path = os.path.join(temp_dir, 'pacs_results')
os.makedirs(dataset_path, exist_ok=True)

for seed in [42, 123]:
    for corruption in ['art_painting', 'cartoon', 'sketch']:
        for method_name in ['test_method']:
            dir_path = os.path.join(
                dataset_path,
                corruption,
                'subdir',
                f'test_method_{seed}_dist1_exp1'
            )
            os.makedirs(dir_path, exist_ok=True)
            create_mock_json(os.path.join(dir_path, 'online_eval.json'), random_setting=False)

# Create a simple args class
class Args:
    def __init__(self):
        self.dataset = 'pacs'
        self.seed = [42, 123]
        self.prefix = 'test_method'
        self.dist = 1
        self.cont = False
        self.random_setting = False

args = Args()

ARGS = {
    'args': args,
    'path': dataset_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — 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
reshape Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
taeckyung/BiTTA/process_cifar.py
pointer only (licence: MIT); the stored copy get_code serves, from dmn-sjk/ar-tta, is pointer only (licence: NONE) · get_code("92bc8db96a48bcb0")
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 dmn-sjk/ar-tta, 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.

stage_path Ran
ran; our contract draft was wrong, not the code
taeckyung/BiTTA/download_pacs.py
code served (permissive licence) · get_code("c631ff42fed59f21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned str. 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 tempfile
import os

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

ARGS = {
    'data_dir': temp_dir,
    'name': 'test_stage'
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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

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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 8 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
stage_path 5 other papers
5 dated earlier
1710.03077 (2017-10)
Deeper, Broader and Artier Domain Generalization
2106.03721 (2021-06)
OoD-Bench: Quantifying and Understanding Two Dimensions of Out-of-Distribution Generalization
2111.13839 (2021-11)
Towards Principled Disentanglement for Domain Generalization
and 2 more not named here
load_data 2 other papers
2 dated earlier
2309.10109 (2023-09)
AR-TTA: A Simple Method for Real-World Continual Test-Time Adaptation
2404.01351 (2024-04)
AETTA: Label-Free Accuracy Estimation for Test-Time Adaptation
load_image 2 other papers
2 dated earlier
1904.06487 (2019-04)
Semi-supervised Domain Adaptation via Minimax Entropy
2204.10377 (2022-04)
Contrastive Test-Time Adaptation
reshape 2 other papers
2 dated earlier
2309.10109 (2023-09)
AR-TTA: A Simple Method for Real-World Continual Test-Time Adaptation
2404.01351 (2024-04)
AETTA: Label-Free Accuracy Estimation for Test-Time Adaptation
get_dirnames 1 other paper
1 dated earlier
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-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Deep learning models perform poorly when domain shifts exist between training and test data. Test-time adaptation (TTA) is a paradigm to mitigate this issue by adapting pre-trained models using only unlabeled test samples. However, existing TTA methods can fail under severe domain shifts, while recent active TTA approaches requiring full-class labels are impractical due to high labeling costs. To address this issue, we introduce a new setting of TTA with binary feedback. This setting uses a few binary feedback inputs from annotators to indicate whether model predictions are correct, thereby significantly reducing the labeling burden of annotators. Under the setting, we propose BiTTA, a novel dual-path optimization framework that leverages reinforcement learning to balance binary feedback-guided adaptation on uncertain samples with agreementbased self-adaptation on confident predictions. Experiments show BiTTA achieves 13.3%p accuracy improvements over state-of-the-art baselines, demonstrating its effectiveness in handling severe distribution shifts with minimal labeling effort. The source code is available at https: //github.com/taeckyung/BiTTA.

For agents

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

get_harvested_code_for_paper("2505.18514")
get_code_for_paper("2505.18514")
have("2505.18514")

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

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

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

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

Connect an agent — have() is free.