Code evaluation · Research feature

Augmentation Techniques Evaluated for Testing Image Retrieval Systems

A study assesses 50 image augmentation methods as test generators for deep learning image retrieval systems across three datasets and two embedding models.

Adapted from research by Yehan De Silva, Anirudh Sridhar, Armin Lotfy and colleagues.

arXiv preprint revision · 2026-08-27 · Attribution & reuse
In this article
Editorial illustration of linked workflow.

Editor’s introduction

The research evaluates 50 image augmentation techniques through a systematic literature review and large-scale empirical testing. It measures performance across embedding-space similarity, uncertainty, semantic realism using LLaVA, and retrieval failure rates. GAN-based methods show lower realism due to synthetic artifacts, reducing their effectiveness for realistic test inputs. Findings are specific to the tested configurations and embedding models, and may vary under different perturbation levels. The evaluation uses weighted criteria—failure count and realism each at 0.4, stability at 0.2—reflecting their relative importance in identifying model weaknesses. Results are derived from CIFAR-10, ImageNet-1K, and a March Networks dataset, with hyperparameters selected to produce perceptible image changes. The study offers practical guidance for selecting augmentation techniques that balance test diversity and visual plausibility in image retrieval testing.

Introduction

AI-based image search and retrieval systems are increasingly deployed in production environments where input conditions are far from ideal. In surveillance and security applications, cameras are mounted at varying angles, overhead, side-mounted, or oblique, and must operate under challenging environmental conditions including low light, rain, fog, and glare. In industrial inspection and medical imaging, images may be degraded by sensor noise, motion blur, compression artifacts, or resolution loss. In all of these settings, the retrieval system is expected to return semantically correct results regardless of the quality or viewing conditions of the query image. Ensuring this property through manual testing is prohibitively expensive. The combinatorial space of environmental factors, camera perspectives, object dynamics, and image quality degradations is too large to enumerate by hand. An automated strategy is therefore needed to generate large and diverse query inputs; however, automatically judging whether the retrieved results are correct raises an oracle problem. Metamorphic testing addresses this by defining an expected relation between related test inputs and their outputs, removing the need for a manually labelled oracle.

A scalable way to generate such tests is image augmentation — controlled image modifications that we refer to as augmentation techniques (or simply augmentations) throughout this manuscript. Applying transformations such as lighting changes, weather effects, noise, viewpoint shifts, partial occlusion, motion blur, and adversarial perturbations to a query image and submitting the result to the retrieval system probes its robustness across realistic deployment conditions without requiring manual labeling. This instantiates the metamorphic relation used in this study: because a semantics-preserving transformation should not change an image’s category, the system should retrieve images of the same category for both the original and the augmented query, and any deviation is a detected fault. Not every transformation is a valid test generator, however. A useful augmentation must be strong enough to expose weaknesses yet preserve the image’s semantic category. If it destroys that category, a resulting failure cannot be attributed to the model, whereas a transformation too weak to change anything yields only trivial tests.

Together, these metrics provide a complete profile of each augmentation technique from a testing perspective: how hard it is for the model, how the technique causes difficulty, and whether that difficulty reflects realistic deployment scenarios. These metrics directly operationalize the research questions defined in Section V-A.

Despite the wide variety of augmentation techniques available, there is no systematic study that (a) catalogues the full landscape across all major categories and (b) evaluates them through this multi-dimensional testing lens to identify which augmentations are most challenging for embedding-based retrieval models. Existing surveys focus on training-time accuracy improvements and do not study augmentation in the context of automated robustness testing, embedding-space analysis, or semantic realism assessment. Consequently, it remains unclear which augmentation techniques preserve the semantic category while producing sufficiently challenging queries for retrieval evaluation. Fixed corruption benchmarks such as ImageNet-C evaluate classifier robustness against a small set of predefined corruptions applied to a single model, whereas we catalogue the full augmentation landscape and assess each technique as a test generator for embedding-based retrieval, across both open and closed models.

The remainder of this manuscript is structured as follows. Section II describes the SLR protocol and the resulting taxonomy of augmentation techniques. Section III provides background for the remainder of the manuscript. Section IV presents all identified augmentation techniques organized by category. Section V presents the empirical study design, embedding models, datasets, and evaluation metrics. Section VI reports the experimental findings. Section VII discusses threats to validity. Section VIII concludes the paper.

This section reviews relevant articles and delineates the technological principles that support the augmentation methods and assessment framework elaborated in later sections. Several studies have investigated the impact of data augmentation techniques on model training and representation quality. Cui et al. analyzes the influence of different augmentation strategies on self-supervised contrastive learning and characterizes their effects through a mathematical error-bound formulation. Similarly, Huang et al. systematically evaluates multiple augmentation techniques to quantify the sensitivity of different self-supervised learning models to augmentation choices. The studies in further examine the role of augmentation in contrastive self-supervised learning and demonstrate that the selection of augmentation transformations can substantially affect the quality of learned representations. Lee et al. investigates the effect of different augmentation techniques on representation-learning models, while Lai et al. evaluates augmentation techniques within unsupervised sentence-embedding frameworks based on LLMs, with particular emphasis on data diversity and robustness to noise. In addition, Feng et al. studies the impact of textual data augmentation techniques on learned representations.

This study aims to address two research deficiencies by assessing severe augmentation methods and datasets, as well as the absence of integrating other complementing measures. These two elements are crucial for delivering a comprehensive assessment of augmentation efficacy, encompassing facets that have been inadequately explored in earlier research. Moreover, the use of multiple datasets with diverse characteristics enables the analysis to capture augmentation behavior under different data distributions and application contexts, thereby supporting a broader assessment of the obtained findings. Several studies have investigated the impact of data augmentation techniques on model training and representation quality. In the remainder of this section, we discuss the terminology and background required for this work.

Image Transformations An affine transformation is a spatial mapping that preserves collinearity, ensuring that parallel lines remain parallel after the transformation. Flipping, rotating, shearing, and translating are all special cases of affine transformations and form the basis of geometric augmentations. Histogram Equalization (HE) is a contrast-enhancement technique that redistributes pixel intensities to produce a roughly uniform histogram, making full use of the available brightness range.

Deep Learning Architectures Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) are the two dominant image encoders; ViTs apply self-attention over image patches to capture long-range dependencies. CNNs extract hierarchical spatial features through convolutional operations. While CNNs construct visual representations from local patterns to higher-level abstractions using predefined spatial inductive biases, and map them into embedding vectors. The patch embeddings are compared through the self-attention mechanism, which captures their contextual relationships in the learned feature space while positional embeddings preserve spatial information. The resulting representations are then refined by feed-forward networks and propagated through successive Transformer layers to extract increasingly high-level visual features.

Generative Models A Generative Adversarial Network (GAN) trains a generator and a discriminator in competition: applied to images, the generator synthesizes images from random noise while the discriminator tries to distinguish them from real images. At equilibrium the generator produces images the discriminator can no longer reliably tell from real data. Contrastive Language–Image Pretraining (CLIP) trains aligned image and text encoders so that semantically similar visual and textual inputs are positioned closer together in a shared embedding space. OpenCLIP is an open-source reproduction of CLIP trained on the LAION-400M and LAION-2B datasets rather than the proprietary WebImageText corpus used by OpenAI. Denoising Diffusion Probabilistic Models (DDPM) generate images through a forward process that gradually adds Gaussian noise and a learned reverse process that iteratively removes it. Denoising Diffusion Implicit Models (DDIM) extend DDPMs with a non-Markovian diffusion process that enables faster and more computationally efficient generation.

Design of Experiments

The evaluation is conduct a controlled evaluation. To this end, each augmentation technique is applied independently to each dataset. For every augmentation technique, the original images and their corresponding augmented versions are embedded separately using Titan and OpenCLIP. This design allows the effect of each augmentation technique to be analyzed individually and enables a direct comparison between the behavior of the two embedding models under the same testing conditions.

The ImageNet-1K and CIFAR-10 datasets are randomly sampled to reduce bias. For CIFAR-10, 1,000 images are randomly selected for each of the 10 classes, resulting in 10,000 images. For ImageNet-1K, 100 classes are randomly selected, and 300 images are randomly sampled for each selected category, resulting in 30,000 images. A more extensive selection was chosen from ImageNet-1K due to its samples frequently providing higher resolution and increased visual complexity relative to CIFAR-10. This makes ImageNet-1K apriori more suitable for generating demanding test cases. However, CIFAR-10 is employed in this study for two main reasons. First, it enables direct comparison with prior studies because, as discussed in the previous section, CIFAR-10 is one of the most widely used image-classification datasets. Second, its low-resolution images provide a suitable setting for evaluating the robustness of the selected models and their ability to maintain reliable performance when processing images with limited visual detail. The MN dataset consists of 20,000 images. Overall sample sizes were chosen to balance statistical rigor with computational feasibility. Each augmentation technique is applied once to every original image and evaluated independently using the original images together with only the samples generated by that technique. Thus, the resulting dataset contains twice as many samples as the original dataset, with equal numbers of original and augmented images in each category. This approach ensures complete dataset coverage while limiting computational cost.

The queries are constructed using the original photos, and the embedding model must preserve the semantic and visual characteristics to ensure that the returned images including the original and augmented images in each query belong to the same category. The number of retrieved images is set equal to the total number of original and augmented images available in the corresponding semantic category. This setting enables the evaluation to determine whether the retrieved results preserve the semantic category of the query image after augmentation. During the testing process, the statistical evaluation metrics are computed to quantify the retrieval behavior of each model under each augmentation condition. ChromaDB is employed to store the embedding vectors and provide efficient access during the retrieval process. The retrieval operation is performed based on cosine similarity, which is implemented within the database. This setup enables a consistent comparison between Titan and OpenCLIP and supports the systematic analysis of how different augmentation techniques affect the semantic consistency and robustness of the embedding models.

To this end, a mixed-effects logistic regression analysis is performed to quantify the impact of each augmentation strategy to the observed failure count. A mixed-effects logistic regression model is appropriate because the retrieval outcome is binary at the retrieved-image level, indicating whether the retrieved image belongs to the expected semantic class. Since all augmentation techniques are evaluated using the same source-query set and retrieval protocol, the augmentation technique can be modeled as a fixed effect. Dataset category is included as a random effect to account for class-specific variability and the dependence among observations belonging to the same class. Unlike comparisons based only on aggregated failure Counts, this approach uses all retrieval outcomes, accommodates unequal class sizes, and provides adjusted odds ratios and confidence intervals for estimating the effect of each augmentation technique.

The resultant odds ratio measures the relative alteration in the probabilities of retrieval failure caused by each augmentation approach in comparison to the baseline condition. An odds ratio over one signifies that the augmentation elevates the likelihood of retrieval failure, while an odds ratio below one denotes that the augmentation diminishes the likelihood of retrieval failure compared to the original, non-augmented state. Note that the baseline condition retrieves fewer images per query than the augmented configurations, which contain both original and augmented images; odds ratios below one are therefore common across the evaluated techniques. Accordingly, augmentations are compared by the relative ordering of their odds ratios rather than by their position with respect to unity. The mixed-effects odds ratios for all augmentation approaches across the three assessed datasets and embedding models are presented in Table II. These results offer a category-adjusted assessment of the impact of each augmentation strategy on retrieval failure, thereby indicating the degree to which each method diminishes or maintains retrieval performance relative to the baseline.

Evaluation Metrics

The overall ranking is determined using three evaluation criteria: failure count, realism, and stability. These criteria are not assigned equal weights because they represent different levels of importance in the evaluation. failure count and realism are each assigned a weight of 0.4, as they directly measure the ability of an augmentation technique to expose model weaknesses while preserving visually plausible content. Stability is assigned a lower weight of 0.2 because it reflects the consistency of the observed performance rather than the primary effectiveness of the augmentation. The comprehensive ranking of the augmentation taxonomies was derived using the same weighted scoring scheme introduced in the preceding paragraph, in which greater importance was assigned to the failure count and realism score than to performance stability. Specifically, the weighted overall score was first computed for each individual augmentation technique by combining the normalized values of the three evaluation criteria. Subsequently, the category-level score was obtained by averaging the overall scores of all augmentation techniques belonging to the corresponding taxonomy. This aggregation procedure enables a systematic comparison of augmentation categories while accounting for the relative effectiveness of their constituent techniques.

Conclusion

This paper presented a dual contribution toward improving the systematic testing of embedding-based image retrieval systems. First, a systematic literature review of 56 papers on image augmentation published between 2020 and 2025 was conducted, producing a ten-category taxonomy of augmentation techniques that organizes the landscape from simple geometric flips to text-guided diffusion models. Second, a large-scale empirical study evaluated each technique as a source of challenging test inputs for two embedding-based retrieval models, Amazon Titan and OpenCLIP, across three datasets (CIFAR-10, ImageNet-1K, and the March Networks industry-partner dataset), measuring the difficulty each augmentation poses to the model across four complementary metrics: retrieval failure count, embedding-space similarity and diversity, embedding model uncertainty (assessed through four estimators: dispersion, pairwise distance, Mahalanobis distance, and ensemble agreement), and semantic realism (LLaVA).

The key finding is that augmentation categories differ substantially and systematically across all evaluated metrics. At the tested severity level, weather simulation and Dimension Reduction produced the highest embedding uncertainty and failure counts across both models, making them the most effective test generators in terms of raw fault-detection power. Photometric techniques such as brightness adjustment, gamma correction, and color-space manipulation preserved embedding structure to the greatest degree, yielding the lowest failure counts, lowest uncertainty, and highest embedding similarity scores. GAN-based augmentation was among the lowest in realism, indicating that synthetic artifacts impair the visual plausibility of generated test inputs even when failure counts are moderate, highlighting that fault exposure and image quality are distinct and sometimes conflicting objectives. Mixing-based techniques showed a split: CutMix and IP-Mix shifted the embedding representation substantially but did not reliably induce retrieval failures, whereas MixUp offered the most useful middle ground, combining a moderate failure count with reasonable embedding diversity and structurally coherent augmented images. Because each technique was evaluated at a single severity level, these rankings should be read as configuration-specific rather than as severity-independent properties of the techniques; establishing whether they hold across mild, moderate, and severe settings is left to future work.