SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.09486 · 2023

Unraveling Batch Normalization for Realistic Test-Time Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 10 functions out of this paper's own repositories and ran 8 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
kiwi12138/realistictta canonical 8 of 10
FunctionStatusWhere it lives
build_resnet26 Ran kiwi12138/realistictta/models/resnet26.py
code served (permissive licence) · get_code("74266460a6b98446")
complete_data_dir_path Ran kiwi12138/realistictta/conf.py
code served (permissive licence) · get_code("ecd72bd245fd1a06")
create_file_list Ran kiwi12138/realistictta/datasets/imagenet_subsets.py
code served (permissive licence) · get_code("ae33aa95d68dffd6")
get_augmentation Ran kiwi12138/realistictta/augmentations/transforms_adacontrast.py
code served (permissive licence) · get_code("8d3dc39f1d44b9c0")
get_augmentation_versions Ran kiwi12138/realistictta/augmentations/transforms_adacontrast.py
code served (permissive licence) · get_code("673e36f60eb9d037")
get_num_classes Ran kiwi12138/realistictta/conf.py
code served (permissive licence) · get_code("ad7ee34b3774e46a")
scale_to_mean_std Ran kiwi12138/realistictta/methods/norm.py
code served (permissive licence) · get_code("cdb20267e34f8ba5")
split_results_by_domain Ran kiwi12138/realistictta/utils.py
code served (permissive licence) · get_code("b5803842be7e8357")
create_imagenet_subset Not yet run kiwi12138/realistictta/datasets/imagenet_subsets.py
code served (permissive licence) · get_code("2081ff5a04dad3e5")
get_domain_sequence Not yet run kiwi12138/realistictta/conf.py
code served (permissive licence) · get_code("cfc577ab97377255")

Repositories linked to this paper

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

Abstract

While recent test-time adaptations exhibit efficacy by adjusting batch normalization to narrow domain disparities, their effectiveness diminishes with realistic mini-batches due to inaccurate target estimation. As previous attempts merely introduce source statistics to mitigate this issue, the fundamental problem of inaccurate target estimation still persists, leaving the intrinsic test-time domain shifts unresolved. This paper delves into the problem of mini-batch degradation. By unraveling batch normalization, we discover that the inexact target statistics largely stem from the substantially reduced class diversity in batch. Drawing upon this insight, we introduce a straightforward tool, Test-time Exponential Moving Average (TEMA), to bridge the class diversity gap between training and testing batches. Importantly, our TEMA adaptively extends the scope of typical methods beyond the current batch to incorporate a diverse set of class information, which in turn boosts an accurate target estimation. Built upon this foundation, we further design a novel layer-wise rectification strategy to consistently promote test-time performance. Our proposed method enjoys a unique advantage as it requires neither training nor tuning parameters, offering a truly hassle-free solution. It significantly enhances model robustness against shifted domains and maintains resilience in diverse real-world scenarios with various batch sizes, achieving state-of-the-art performance on several major benchmarks. Code is available at \url{https://github.com/kiwi12138/RealisticTTA}.

For agents

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

get_harvested_code_for_paper("2312.09486")
get_code_for_paper("2312.09486")
have("2312.09486")

Connect an agent — have() is free.