Efficient Augmentation via Data Subsampling

1 INTRODUCTION . Data augmentation is a process in which the training set is expanded by applying class-preserving transformations , such as rotations or crops for images , to the original data points . This process has become an instrumental tool in achieving state-of-the-art accuracy in modern machine learning pipelines . Indeed , for problems in image recognition , data augmentation is a key component in achieving nearly all state-of-the-art results ( Cireşan et al. , 2010 ; Dosovitskiy et al. , 2016 ; Graham , 2014 ; Sajjadi et al. , 2016 ) . Data augmentation is also a popular technique because of its simplicity , particularly in deep learning applications , where applying a set of known invariances to the data is often more straightforward than trying to encode this knowledge directly in the model architecture . However , data augmentation can be an expensive process , as applying a number of transformations to the entire dataset may increase the overall size of the dataset by orders of magnitude . For example , if applying just 3 sets of augmentations ( e.g. , translate , rotate , crop ) , each with 4 possible configurations , the dataset can easily grow by a factor of 12 ( if applied independently ) , all the way to 64x ( if applied in sequence ) . While this may have some benefits in terms of overfitting , augmenting the entire training set can also significantly increase data storage costs and training time , which can scale linearly or superlinearly with respect to the training set size . Further , selecting the optimal set of transformations to apply to a given data point is often a non-trivial task . Applying transformations not only takes processing time , but also frequently requires some amount of domain expertise . Augmentations are often applied heuristically in practice , and small perturbations are expected ( but not proven ) to preserve classes . If more complex augmentations are applied to a dataset , they may have to be verified on a per-sample basis . In this work , we aim to make data augmentation more efficient and user-friendly by identifying subsamples of the full dataset that are good candidates for augmentation . In developing policies for subsampling the data , we draw inspiration from the virtual support vector ( VSV ) method , which has been used for this purpose in the context of SVMs ( Burges & Schölkopf , 1997 ; Decoste & Schölkopf , 2002 ) . The VSV method attempts to create a more robust decision surface by augmenting only the samples that are close to the margin—i.e. , the support vectors . The motivation is intuitive : if a point does not affect the margin , then any small perturbation of that point in data space will likely yield a point that is again too far from the margin to affect it . The method proceeds by applying classpreserving data augmentations ( e.g. , small perturbations ) to all support vectors in the training set . The SVM is then retrained on the support vector dataset concatenated with the augmented dataset , and the end result is a decision surface that has been encoded with transformation invariance while augmenting many fewer samples than found in the full training set . Although proven to be an effective approach for SVMs , methods utilizing support vectors may not generalize well to other classifiers . Therefore , in this work , we aim to develop policies that can effectively reduce the augmentation set size while applying to a much broader class of models . A key step in developing these policies is to determine some metric by which to rank the importance of data points for augmentation . We build policies based on two key metrics . First , we make a natural generalization of the VSV method by measuring the loss induced by a training point . Second , we explore using the influence of a point as an indicator of augmentation potential . Influence functions , originating from robust statistics , utilize more information than loss ( i.e. , residuals ) alone , as they take into account both leverage and residual information . The contributions of this paper are as follows . First , we demonstrate that it is typically unnecessary to augment the entire dataset to achieve high accuracy—for example , we can maintain 99.86 % or more of the full augmentation accuracy while only augmenting 10 % of the dataset in the case of translation augmentations , and we observe similar behavior for other augmentations . Second , we propose several policies to select the subset of points to augment . Our results indicate that policies based off of training loss or model influence are an effective strategy over simple baselines , such as random sampling . Finally , we propose several modifications to these approaches , such as sample reweighting and online learning , that can further improve performance . Our proposed policies are simple and straightforward to implement , requiring only a few lines of code . We perform experiments throughout on common benchmark datasets , such as MNIST ( LeCun et al. , 1998 ) , CIFAR10 ( Krizhevsky , 2009 ) , and NORB ( LeCun et al. , 2004 ) . 2 RELATED WORK . In the domain of image classification , most state-of-the-art pipelines use some form of data augmentation ( Cireşan et al. , 2010 ; Dosovitskiy et al. , 2016 ; Graham , 2014 ; Sajjadi et al. , 2016 ) . This typically consists of applying crops , flips , or small affine transformations to all the data points in the training set , with parameters drawn randomly from hand-tuned ranges . Beyond image classification , various studies have applied data augmentation techniques to modalities such as audio ( Uhlich et al. , 2017 ) and text ( Lu et al. , 2006 ) . The selection of these augmentation strategies can have large performance impacts , and thus can require extensive selection and tuning ( Ratner et al. , 2017 ) . Motivated by the ubiquity of data augmentation and the difficulty in selecting augmentations , there has been a significant amount of work in selecting and tuning the best transformations to use when performing augmentation . For example , Fawzi et al . ( 2016 ) use adaptive data augmentation to choose transformations that maximize loss for the classifier ; Ratner et al . ( 2017 ) propose learning a sequence model of composed transformations ; and Cubuk et al . ( 2018 ) suggest a reinforcement learning approach . In contrast to these works , our aim is instead to select which data points to augment while holding transformations fixed . Our subsampling policies are therefore complementary to many of the described approaches , and in fact , could be quite beneficial for approaches such as reinforcement learning that can quickly become infeasible for large datasets and transformation spaces . Finally , we note that several recent works have proposed augmentation strategies based on adversarial training approaches , such as robust optimization frameworks or generative adversarial networks ( GANs ) ( Goodfellow et al. , 2014 ; Antoniou et al. , 2017 ; Volpi et al. , 2018 ) . These approaches generate artificial points from some target distribution , rather than by directly transforming the original training points . We view these works as orthogonal and complementary approaches to the proposed work , which is designed in concert with more traditional data augmentation strategies . The area of work most closely related to our own is that of the Virtual Support Vector ( VSV ) method ( Burges & Schölkopf , 1997 ; Decoste & Schölkopf , 2002 ) . This method was proposed the support vector machine literature as a way to reduce the set of points for augmentation by limiting transformations to only support vectors . In the context of SVMs , the motivation is straightforward , as points that are far from the margin are unlikely to affect future models if they are transformed via small perturbations . However , to the best of our knowledge , there has been no work extending these ideas to methods beyond SVMs , where the notion of support vectors is not directly applicable . Inspired by the VSV work , we similarly seek ways to downsample the set of candidate points for augmentation , though through metrics beyond support vectors . We begin by generalizing the notion of a support vector by simply measuring the loss at each training point1 . We also explore model influence , which has been rigorously studied in the field of robust statistics as a way to determine which data points are most impactful on the model . Model influence has been studied extensively in the regression literature ( Hoaglin & Welsch , 1978 ; Pregibon , 1981 ; Cook , 1986 ; Walker & Birch , 1988 ) , and more recently , in non-differentiable ( SVMs ) and non-convex ( deep networks ) settings ( Koh & Liang , 2017 ) . We provide additional details on these metrics in Section 4 . Finally , we note that this work is closely related to work in subsampling for general dataset reduction ( i.e. , not in the context of data augmentation ) . For example , works using gradients ( Zhu , 2016 ) , leverage ( Drineas et al. , 2011 ; 2012 ; Ma et al. , 2015 ) , and influence functions ( McWilliams et al. , 2014 ; Ting & Brochu , 2018 ; Wang et al. , 2018 ) have shown better results than uniform sampling of data samples in the original dataset . Our scenario differs from the subsampling scenarios in these works as we ultimately anticipate increasing the size of the dataset through augmentation , rather than decreasing it as is the case with subsampling . Subsampling methods are motivated by being unable to train models on entire datasets due to the datasets being too large . Our motivation is instead that the full augmented dataset may be too large , but the original training set is sufficiently small to be handled without special consideration . We therefore assume it is possible to obtain information ( e.g. , influence , loss , etc . ) by fitting a model to the original data . Further , the interpretation of our scenario differs , as the subsampling is performed with the ultimate aim being to retain the accuracy of some yet-to-be-determined fully augmented dataset , as opposed to the original dataset . 3 MOTIVATION : ON THE EFFECTIVENESS OF SUBSAMPLING . In this work , we seek to make data augmentation more efficient by providing effective policies for subsampling the original training dataset . To motivate the effect of subsampling prior to augmentation , we begin with a simple example . In Table 1 , we report the effect that performing translation augmentations has on the final test accuracy for several datasets ( MNIST , CIFAR10 , NORB ) . In the second column , we provide the final test accuracy assuming none of the training data points are augmented , and in the last column , the final test accuracy after augmenting all of the training data points ( i.e. , our desired test accuracy ) . Note that the test dataset in these examples has also been augmented with translation to better highlight the effect of augmentation ; we provide full experimental details in Section 5 . In columns 3–8 , we report test accuracies from augmenting 5 , 10 , and 25 percent of the data , where these subsamples are either derived using simple random sampling or via our proposed policies ( to be discussed in Section 4 ) . An immediate take-away from these results is that , even in the case of simple random sampling , it is often unnecessary to augment the entire dataset to achieve decent accuracy gains . For example , augmenting just 25 % of the dataset selected at random can yield more than half of the total accuracy gain from full augmentation . However , it is also evident that subsampling can be done more effectively with the appropriate policy . Indeed , as compared to random sampling , when augmenting just 10 % of the data , these optimal policies can achieve almost identical results to full augmentation ( within .1 % for CIFAR10 and higher accuracy than full augmentation for MNIST and NORB ) . These results aim to serve as a starting point for the remaining paper . We describe our proposed policies in detail in Section 4 , and we provide full experiments and experimental details in Section 5 . 1We also investigate a more direct generalization of the VSV method—sampling points according to their distance from the margin—in Appendix F , although this method generally underperforms the other metrics .

Summary: Data augmentation is a useful technique, but can lead to undesirably large data sets. The authors propose to use influence or loss-based methods to select a small subset of points to use in augmenting data sets for training models where the loss is additive over data points, and investigate the performance of their schemes when logistic loss is used over CNN features. Specifically, they propose selecting which data points to augment by either choosing points where the training loss is high, or where the statistical influence score is high (as defined in Koh and Liang 2017). The cost of their method is that of fitting an initial model on the training set, then fitting the final model on the augmented data set.