Local Magnification for Data and Feature Augmentation

Kun He, Chang Liu, Stephen Lin, John E. HopcroftarXiv 2022 · DOI

Abstract

Data augmentation is a critical component in training robust deep learning models. While standard techniques like flipping and cropping are ubiquitous, more advanced methods often rely on occluding parts of the image, which can lead to "label ambiguity." This paper introduces Local Magnification (LOMA), a novel augmentation technique that applies local geometric distortions to images and feature maps. By magnifying local regions, LOMA increases data diversity and forces models to learn more generalizable features without losing object identity. Experiments on CIFAR, ImageNet, and PASCAL VOC demonstrate that LOMA consistently improves performance across classification and detection tasks.

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), are prone to overfitting, where they memorize training samples instead of learning generalizable patterns. Data augmentation addresses this by artificially expanding the training set. However, existing methods have limitations. Global transforms often fail to capture local variations, while occlusion-based methods like Cutout or Random Erasing can inadvertently mask the most discriminative parts of an object. For instance, if a cutout covers a bird's head or a car's identifying features, the model might incorrectly associate the remaining background with the object label, introducing noise into the training process.

Occlusion-based methods like Cutout can obscure critical features, potentially leading to label ambiguity.

To overcome these issues, we propose Local Magnification (LOMA). Instead of removing information, LOMA distorts it, acting like a virtual magnifying glass that pushes pixels outward from a central point. This preserves the object's identity while creating challenging "hard" examples for the network to learn from.

Methods

LOMA can be applied in both the image space and the feature space of a neural network.

Image-Space LOMA

In the image space, LOMA selects a random center point and radius. It then applies a coordinate mapping—using either a rhombus or an ellipse shape—to magnify the local area. This process creates geometric dislocations at the boundaries of the magnified region, providing a unique form of regularization.

Local Magnification (LOMA) distorts the image locally, preserving the object's identity while increasing geometric diversity.

Feature-Space LOMA (LOMA_F & FO)

The technique is also extended to intermediate feature maps. LOMA_F applies the same magnification logic to the latent representations. Additionally, we introduce FeatureMap Offset (FO), which shifts feature maps horizontally or vertically, filling the vacated space with zeros. The combined approach, LOMA_IF&FO, provides a multi-level regularization effect that significantly enhances model robustness.

Results and Discussion

We evaluated LOMA on several benchmarks, including CIFAR-10/100, ImageNet, and PASCAL VOC.

Performance Gains

On CIFAR-100 with a WideResNet-28-10, LOMA_IF&FO achieved an accuracy of 82.89%, surpassing Cutout (81.59%) and Random Erasing (82.27%). On the large-scale ImageNet dataset, LOMA_IF&FO reduced the Top-1 error of ResNet-50 to 22.33%, compared to the 23.00% baseline. For object detection on PASCAL VOC 2007, LOMA improved the mean Average Precision (mAP) of Faster R-CNN by 0.7%.

Insights

Visualizations using Class Activation Mapping (CAM) reveal that LOMA forces the network to attend to larger and more relevant portions of the object. Interestingly, models trained with LOMA also show increased robustness to occlusion, despite LOMA not explicitly hiding pixels during training. By learning to recognize distorted local features, the model becomes more adept at identifying objects even when they are partially obscured.

Conclusion

Local Magnification (LOMA) offers a simple, model-free approach to data and feature augmentation. By focusing on local geometric distortions rather than occlusion, it avoids label ambiguity while effectively regularizing deep networks. Future work will explore more complex, non-linear distortions and automated methods for balancing local and global augmentations.

Summary updated

Abstract

In recent years, many data augmentation techniques have been proposed to increase the diversity of input data and reduce the risk of overfitting on deep neural networks. In this work, we propose an easy-to-implement and model-free data augmentation method called Local Magnification (LOMA). Different from other geometric data augmentation methods that perform global transformations on images, LOMA generates additional training data by randomly magnifying a local area of the image. This local magnification results in geometric changes that significantly broaden the range of augmentations while maintaining the recognizability of objects. Moreover, we extend the idea of LOMA and random cropping to the feature space to augment the feature map, which further boosts the classification accuracy considerably. Experiments show that our proposed LOMA, though straightforward, can be combined with standard data augmentation to significantly improve the performance on image classification and object detection. And further combination with our feature augmentation techniques, termed LOMA_IF&FO, can continue to strengthen the model and outperform advanced intensity transformation methods for data augmentation.
BibTeX
@misc{he2022local,
  author = {Kun He and Chang Liu and Stephen Lin and John E. Hopcroft},
  title = {{Local Magnification for Data and Feature Augmentation}},
  year = {2022},
  eprint = {2211.07859},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.07859},
}
Figure