Cyclic Test Time Augmentation with Entropy Weight Method

Sewhan Chun, Jae Young Lee, Junmo Kim

Abstract

In the recent studies of data augmentation of neural networks, the application of test time augmentation has been studied to extract optimal transformation policies to enhance performance with minimum cost. The policy search method with the best level of input data dependency involves training a loss predictor network to estimate suitable transformations for each of the given input image in independent manner, resulting in instance-level transformation extraction. In this work, we propose a method to utilize and modify the loss prediction pipeline to further improve the performance with the cyclic search for suitable transformations and the use of the entropy weight method. The cyclic usage of the loss predictor allows refining each input image with multiple transformations with a more flexible transformation magnitude. For cases where multiple augmentations are generated, we implement the entropy weight method to reflect the data uncertainty of each augmentation to force the final result to focus on augmentations with low uncertainty. The experimental result shows convincing qualitative outcome and robust performance for the corrupted conditions of data.

Introduction

Deep learning models are notoriously brittle when faced with environmental corruptions such as snow, blur, or digital noise. Test Time Augmentation (TTA) is a common defense strategy where a model aggregates predictions from multiple "views" of the same image (e.g., flipped, cropped, or rotated) to improve robustness. However, traditional TTA approaches suffer from two major limitations: computational inefficiency due to redundant augmentations and a lack of flexibility, as they typically apply a "global" policy to every image regardless of its specific content.

Previous research introduced instance-level TTA, which uses a lightweight "loss predictor" network to select the single best transformation for a given image. While an improvement, a single transformation often fails to sufficiently recover heavily corrupted images. This paper, originally presented at UAI 2022, addresses these gaps by introducing a Cyclic TTA framework and an Entropy Weight Method (EWM) for superior prediction aggregation.

Methodology

1. Cyclic Loss Prediction

Instead of selecting a single transformation, the proposed framework treats TTA as an iterative refinement process. An input image is first processed by a lightweight Loss Predictor (e.g., based on EfficientNet-B0). The predictor suggests a specific transformation, such as a rotation or zoom, which is then applied to the image. This transformed image is fed back into the predictor for further refinement.

The Cyclic TTA framework illustrates the iterative process where an image is refined over multiple steps ($t=1, 2, \dots$) until the predictor suggests an identity transformation.

This cycle continues until the predictor suggests an "Identity" transformation—indicating the image is optimized—or a maximum iteration limit is reached. This approach effectively expands the search space for transformations without requiring a massive library of predefined policies, allowing for more precise, adaptive pre-processing that "undoes" corruptions before the main classifier sees the image.

2. Entropy Weight Method (EWM)

Standard TTA typically averages the softmax outputs of multiple augmentations. However, some transformations may leave an image in a more ambiguous state than others. To account for this, the authors implement the Entropy Weight Method (EWM). By calculating the entropy of each prediction, the system can quantify the model's uncertainty. Predictions with lower entropy (higher certainty) are given more weight in the final voting process, forcing the model to prioritize the most reliable "views" of the data.

Experimental Results

The researchers evaluated the proposed methods on ImageNet (ILSVRC 2012) and ImageNet-C, the latter containing 19 types of corruptions across five severity levels. The target classifier used was a ResNet-50.

Table 1: Performance comparison on ImageNet-C. Cyclic TTA and EWM consistently reduce the mean Corruption Error (mCE) across both standard and Augmix-trained models.

As shown in the results, Cyclic TTA consistently outperforms single-shot TTA methods. For a standard ResNet-50, the mean Corruption Error (mCE) improved from 74.14 (Single) to 72.74 (Cyclic) at a comparable computational cost. Furthermore, the integration of EWM provided additional gains; for instance, applying EWM to a 10-crop TTA strategy reduced mCE from 73.57 to 73.34. The method also showed strong synergy with models already trained for robustness, such as those using Augmix, pushing the mCE down to 62.76.

Discussion and Conclusion

The proposed Cyclic TTA framework demonstrates that treating augmentation as an adaptive, iterative pre-processing step significantly enhances model robustness. By using the "Identity" transformation as an exit signal, the system maintains efficiency by avoiding unnecessary computations on clean data. While the method currently relies on predefined transformation types and the accuracy of the loss predictor, it sets a new benchmark for instance-level test-time defense. Future work may explore the use of generative models to provide even more fluid image restoration beyond fixed transformation sets.

Summary updated

BibTeX
@inproceedings{chun2022cyclic,
  author = {Sewhan Chun and Jae Young Lee and Junmo Kim},
  title = {{Cyclic Test Time Augmentation with Entropy Weight Method}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=rKZlJUIj5lc},
}
Figure