Adversarial Auto-Augment with Label Preservation: A Representation Learning Principle Guided Approach
Abstract
Data augmentation is a critical contributing factor to the success of deep learning but heavily relies on prior domain knowledge which is not always available.
Recent works on automatic data augmentation learn a policy to form a sequence of augmentation operations, which are still pre-deﬁned and restricted to limited options.
In this paper, we show that a prior-free autonomous data augmentation’s objective can be derived from a representation learning principle that aims to preserve the minimum sufﬁcient information of the labels.
Given an example, the objective aims at creating a distant “hard positive example” as the augmentation, while still preserving the original label.
We then propose a practical surrogate to the objective that can be optimized efﬁciently and integrated seamlessly into existing methods for a broad class of machine learning tasks, e.g., supervised, semi-supervised, and noisy-label learning.
Unlike previous works, our method does not require training an extra generative model but instead leverages the intermediate layer representations of the end-task model for generating data augmentations.
In experiments, we show that our method consistently brings non-trivial improvements to the three aforementioned learning tasks from both efﬁciency and ﬁnal performance, either or not combined with strong pre-deﬁned augmentations, e.g., on medical images when domain knowledge is unavailable and the existing augmentation techniques perform poorly.
Code is available at: https://github.com/kai-wen-yang/LPA3.
Introduction
Data augmentation has emerged as an effective data pre-processing or data transformation step to mitigate overﬁtting [31], to encourage local smoothness [57], and to improve generalization [6] in machine learning pipelines such as deep neural networks.
Notably, effective data augmentation, which incorporates class-related data invariance and enriches the in-class sample, is one of the key contributing factors for representation learning with weak or self supervision [9, 23].
Given a task, we aim to generate “good” augmentations efﬁciently.
As part of the machine learning model pipeline, an autonomous domain-agnostic but task-informed data augmentation mechanism is desirable.
However, a number of challenges exist.
(1) Existing augmentation operators are usually hand-crafted based on domain expert knowledge, which is not always available in some domain [49].
For example, widely used augmentations for natural images are not effective on medical images.
Moreover, the performance of those machine learning pipelines drastically varies with different choices of data augmentations.
Existing few autonomous augmentation approaches developed lately are neither fully autonomous nor universally applicable to varying domains.
Although a few autonomous data augmentation approaches have been developed in recent years [14, 12], they train policies to produce a sequence of pre-deﬁned augmentation operations and thus are not fully automated and are limited to a few domains.
(3) Existing augmentations usually do not fully utilize the task feedback (i.e., task-agnostic) and may be sub-optimal for the targeted task.
A class of automated data augmentation methods train an extra data generative model to generate new augmentations from scratch given a real-world example [2].
However, they require training a generative model, which is a non-trivial task in practice that may either relies on strong prior knowledge or a substantial increased number of training examples.
In this paper, we ﬁrst investigate the conditions required to generate domain-agnostic but taskinformed data augmentations.
Consider a representation learning pipeline, we started from a probabilistic graphical model that describes the relations among the label Y , the nuisance N , the example
X , its augmentation X (cid:48) , and the latent representations Z .
We argue that a minimum-sufﬁcient representation for the task preserves the label information but excludes other distractive information from the nuisance.
We then investigate the conditions for an augmentation X (cid:48) that results in learning such preferred representations.
These conditions motivate an optimization objective that can be used to produce automated domain-agnostic but task-informed data augmentations for each example, without replying on pre-deﬁned augmentation operators or speciﬁc domain knowledge.
Consequently, our proposed optimization objective addresses all aforementioned challenges.
For practicality, we further propose a surrogate of the derived objective that can be efﬁciently computed from the intermediate-layer representations of the model-in-training.
The surrogate is built upon the data likelihood estimation through perceptual distance [24] deﬁned on the intermediate layers’ representations.
Speciﬁcally, our proposed surrogate objective maximizes the perceptual distance between X and X (cid:48) , under a label preserving constraint on the model prediction of X (cid:48) .
This problem can be efﬁciently solved by optimizing its Lagaragian relaxation.
Thereby, given X and its label Y , the solution to our surrogate objective generates “hard positive examples” for X without loosing its label information.
Once generated, X (cid:48) is used to train the model towards producing the minimum-sufﬁcient representation Z for the targeted task.
Our proposed method, named LabelPreserving Adversarial Auto-Augment ( LP-A3 ) , does not require any extra generative models such as Generative Adversarial Networks, unlike previous automated augmentation methods [40].
We further propose a sharpness-aware criterion selecting only the most informative examples to apply our auto-augmentation on so it does not cause expensive extra computation.
Our proposed LP-A3 is a general and autonomous data augmentation technique applicable to a variety of machine learning tasks, such as supervised, semi-supervised and noisy-label learning.
Moreover, we demonstrate that it can be seamlessly integrated with existing algorithms for these tasks and consistently improve their performance.
In experiments on the three learning tasks, we equip LP-A with existing methods and obtain signiﬁcant improvement on both the learning efﬁciency and the ﬁnal performance.
The generated augmentations are optimized for the model-in-training in a target-taskaware manner and thus notably accelerate the slow convergence in computationally intensive tasks such as semi-supervised learning.
It is worth noting that our augmentation can consistently bring improvement to tasks without domain knowledge or strong pre-deﬁned augmentations such as medical image classiﬁcation, on which previous image augmentations lead to performance degeneration.
Related work
Hand-crafted vs. Autonomous Data Augmentations.
Most of the existing widely used data augmentations are hand-crafted based on domain expert knowledge [30, 39, 29, 9, 13].
For example,
MoCo [16] and InstDis [47] create augmentations by applying a stochastic but pre-deﬁned data augmentation function to the input.
CMC [39] splits images across color channels.
PIRL [29] generates data augmentations through random JigSaw Shufﬂing.
CPC [30] renders strong data augmentations by utilizing RandAugment [12], which learns a policy producing a sequence of pre-deﬁned augmentation operations selected from a pool [14].
AdvAA [60] designs a adversarial objective to learn the augmentation policy.
[12, 14, 60] are all based on pre-deﬁned operations which is not available in certain domains, and their objective cannot guarantee the label-preserving of the generated data which may lead to suboptimal performance.
“InfoMin” principle of data augmentation is proposed [40] to minimize the mutual information between different views (equivalent to min I ( X , X (cid:48) ) ).
However, their theory depends on access to a minimal sufﬁcient encoder which may be difﬁcult to obtain.
In contrast, we not only consider how to generate optimal views or augmentations, but also consider generating the minimal sufﬁcient representation.
The algorithm [40] deploys a generator to render augmentation (which may be costly to train especially on non-natural image domains), while we directly learn the augmentation through gradient descent w.r.t.
the input.
Information Theory for Representation Learning.
Information theory is introduced in deep learning to measure the quality of representations [42, 1].
The key idea is to use information bottleneck methods [41, 42] to encourage the learned representation being minimal sufﬁcient.
Mutual information objectives are commonly used in self-supervised learning.
For example, InfoMax principle [27] used by many works aims to maximize the mutual information between the representation and the input [39, 4, 46].
But simply maximizing the mutual information does not always lead to a better representation in practice [43].
In contrast, InfoMin principle [40] minimizes the mutual information between different views.
Both InfoMax and the InfoMin principles can be associated with our proposed representation learning criteria in Section 4, as they lead to sufﬁciency and minimality of the learned representation, respectively.
Augmentation in Self-supervised Contrastive Learning.
Self-supervised Contrastive Representation Learning [30, 18, 47, 39, 35, 9] learn representation through optimization of a contrastive loss which pulls similar pairs of examples closer while pushing dissimilar example pairs apart.
Creating multiple views of each example is crucial for the success of self-supervised contrastive learning.
However, most of the data augmentation methods used in generating views, although sophisticated, are hand-crafted or not learning-based.
Some use luminance and chrominance decomposition [39], while others use random augmentation from a pool of augmentation operators [47, 9, 4, 16, 53, 37, 62, 65].
Recently, adversarial perturbation based augmentation has been proposed to generate more challenging positives/negatives for contrastive learning [51, 19].
Augmentation in Semi-supervised Learning.
Data augmentation plays an important role in semisupervised learning, e.g., (1) consistency regularization [33, 34] enforces the model to produce similar outputs for a sample and its augmentations; (2) pseudo labeling [25] trains a model using conﬁdent predictions produced by itself [38] for unlabeled data.
Data augmentations are critical [23, 7] because they determine both the output targets and input signals: (1) accurate pseudo labels are achieved by averaging the predictions over multiple augmentations; (2) weak augmentations (e.g., ﬂip-and-shift) are important to produce conﬁdent pseudo labels, while strong augmentations [14, 12]) are used to train the model and expand the conﬁdence regions (so more conﬁdent pseudo labels can be collected later).
Data selection [55, 63] for high-quality pseudo labels is also critical and its criterion is estimated on augmentations, e.g., the conﬁdence [8] or time-consistency [63] of each sample.
Augmentation in Noisy-label Learning Two primary challenges in noisy-label learning is clean label detection [28, 15, 20] and noisy label correction by pseudo labels [32, 3, 26].
Both signiﬁcantly depend on the choices of data augmentations since the former usually relies on conﬁdence thresholding and augmentations help rule out the overconﬁdent samples, while the latter relies on the quality of semi-supervised learning.
Moreover, as shown in previous works [26, 64], removing strong augmentations such as RandAugment can considerably degenerate the noisy label learning performance.
Preliminaries
Basics of Information Theory Our analyses make frequent use of information theoretical quantities [11].
Given a joint distribution P X , Y and its marginal distributions P X , P Y , we deﬁne their entropy as H ( X , Y ) =
E X , Y [ − log P ( x, y )] , H ( X ) =
E X [ − log P ( x )] , and H ( Y ) =
E Y [ − log P ( y )] .
Furthermore, we deﬁne the conditional entropy of X given Y as H ( X | Y ) =
E Y [ − log H ( X | y )]
=
H ( X , Y ) − H ( Y ) .
Finally, we deﬁne the mutual information between X and
Y as I ( X ∧ Y ) =
H ( X ) − H
( X | Y ) =
H ( X ) + H ( Y ) − H
( X , Y ) .
Notations and Problem Setup.
In this paper, we use bold capital letters (e.g., X , Y ) to denote random variables, lowercase letters (e.g., x, y ) to denote their realizations, and curly capital letters (e.g., X , Y ) to denote the corresponding sample spaces.
Since we mainly consider supervised and semi-supervised problems, we deﬁne Let P X , Y be the joint distribution of data observation X and label Y , where X is a random vector taking values on a ﬁnite observation space X (e.g., images) and Y is a discrete random variable taking values on the label space Y
(e.g., classes).
Our goal is to learn a classiﬁer to predict y ∈ Y from an observation x ∈ X .
[Figure]
Task-nuisance Decomposition.
To advance the analysis, we decouple the randomness in X into two parts, one pertaining to the label and another independent to the label.
Concretely, we deﬁne a random variable nuisance N such that 1) the nuisance N is independent to the label Y , i.e., N ⊥⊥ Y ; and 2) the observation X is a deterministic function of the nuisance N and the label Y , i.e., X =
g ( Y , N ) for some g .
Lemma 3.1 demonstrates that such a random variable always exists.
Lemma 3.1 (Task-nuisance Decomposition [1]) .
Given a joint distribution P X , Y , where Y is a discrete random variable, we can always ﬁnd a random variable N independent of Y such that
X =
d ( Y , N ) , for some deterministic function d .
Remarks.
We can rewrite the conditions of task-nuisance decomposition in terms of information theory.
1) Since the nuisance N is independent to the label Y , we have I ( Y ∧ N ) = 0 ; and 2) Since the nuisance N and the label Y determines the observation X , we have H ( X | Y , N ) = 0 .
Principles of Representation Learning: Theoretical Interpretation 4.1 What Is A Good Representation?
In real-world applications, the observation X is usually complex in a high-dimensional space X , making it hard to directly learn a good classiﬁer for Y .
To remedy this curse of dimensionality, it is important to learn a good representation of X , i.e., learn an encoder E ( · ) that maps the highdimensional observation X into a low-dimensional representation Z .
We illustrate the process of data generation and representation learning by a probabilistic graphical model as shown in Figure 1a.
An ideal encoder should keep the important information from X (e.g. label-relevant information) and maximally discard the noise or nuisance of X , such that it is much easier to learn a classiﬁer from Z than from X .
Based on the above intuition, we deﬁne an (cid:15) -optimal representation of X , which has sufﬁcient information for classifying w.r.t.
Y , while remaining little information of the nuisance.
Deﬁnition 4.0.1 ( (cid:15) -Minimal Sufﬁcient Representation ( (cid:15) -Optimal Representation)) .
For a Markov chain Y → X → Z , we say thata representation Z of X is sufﬁcient for Y if I ( Z ∧ Y )
=
I ( X ∧ Y ) , and Z is (cid:15) -minimal sufﬁcient for Y if Z is sufﬁcient and I ( Z ∧ X ) ≤ I (˜ Z ∧ X )+ (cid:15) for all ˜ Z satisfying
I (˜ Z ∧ Y ) =
I ( X ∧ Y ) .
Remark.
Due to the property of mutual information, we have 0 ≤ (cid:15) ≤ H ( X ) .
The lower (cid:15) is, the more “minimal” the representation is.
When (cid:15) = 0 , the representation is minimal sufﬁcient, which is a desirable property as characterized by many prior works [42, 1].
Deﬁnition 4.0.1 characterizes how good a sufﬁcient representation is, based on how much redundant information is remained.
Recall that X comes from a deterministic function of label Y and nuisance
N .
The redundancy of Z can also be measured by the mutual information between Z and N .
Achille et al.
[1] prove that if a representation Z is sufﬁcient and is invariant to nuisance N , i.e.,
I ( Z ∧ N ) = 0 , then Z is also minimal.
However, since N is not known, it is hard to directly encourage the representation to be invariant to N .
Can we learn an (cid:15) -minimal sufﬁcient representation in a principled way?
Inspired by the recent success of data augmentation techniques in self-supervised learning and semi-supervised learning, we ﬁnd that data augmentation can implicitly encourage the representation to be invariant to the nuisance
N .
However, most augmentation methods are driven by pre-deﬁned transformations, which do not necessarily render a minimal sufﬁcient representation.
In the next section, we will analyze the effects of data augmentation in representation learning in details.
4.2 Proper Data Augmentation Leads to (Near-)Optimal Representation
In this section, we investigate the role of data augmentation for learning good representations.
We ﬁrst make the following mild assumption on the underlying relationship between X and Y .
Assumption 4.1.
There exists a deterministic function π : X → Y , i.e., H ( Y | X ) = 0 .
Assumption 4.1 requires that there exists a “perfect classiﬁer” that identiﬁes the label y of the observation x with no error, which is common in practice.
Note that for data with ambiguity, a tie breaker can be used to map each observation to a unique label.
Therefore, Assumption 4.1 is realistic.
Let g be a deterministic augmentation function such that X (cid:48) :
= g ( X , A ) is the augmented data, where A is a random variable denoting the augmentation selection.
For example, if X = x is an image sample,
A = a is the augmentation “rotate by 90 degree”, then X (cid:48) = x (cid:48) is the corresponding rotated image sample.
We learn an encoder E ( · ) that maps the augmented data X (cid:48) to a representation
Z (cid:48) .
With this augmentation processes, the graphical model in Figure 1a is updated to Figure 1b.
We show in the theorem below that if the augmentation process preserves the information of Y , Z (cid:48) can be sufﬁcient for Y .
Furthermore, if the augmented data X (cid:48) contains no information of the original nuisance N , Z (cid:48) will be invariant to N and thus will become a minimal sufﬁcient representation.
Theorem 4.2.
Consider label variable Y , observation variable X and nuisance variable N satisfying
Assumption 4.1.
Let A be the augmentation variable, X (cid:48) be the augmented data, and Z ∗ be the solution to
[Equation]
Then, Z ∗ is a (cid:15) -minimal sufﬁcient representation of X for label Y if the following conditions hold:
Condition (a) : I ( X (cid:48) ∧ Y ) =
I ( X ∧ Y ) ( X (cid:48) is an in-class augmentation) and
Condition (b) : I ( X (cid:48)
∧ N ) ≤ (cid:15)
( X (cid:48) does not remain much information about N ).
Remarks.
(1) The objective of learning Z ∗ can be either task-independent (maximizing I ( Z (cid:48)
∧ X (cid:48) ) ), or task-dependent (maximizing I ( Z (cid:48) ∧ Y ) ).
The former matches the “InfoMax” principle commonly used in self-supervised learning works [27, 18], while the latter can be achieved by supervised training (e.g., learning a classiﬁer of Z for Y with cross-entropy loss).
(2) When Condition (b) holds for (cid:15) = 0 , representation Z (cid:48) is optimal (minimal sufﬁcient).
Theorem 4.2, proved in Appendix B.1, shows that if we have a good augmentation that maximally perturbs the label-irrelevant information while keeps the label-relevant information, then the representation learned on the augmented data can be minimal sufﬁcient.
Theorem 4.2 serves as a principle of constructing augmentation.
Based on this principle, we propose an auto-augment algorithm in
Section 5, and verify the algorithm in a wide range tasks in Section 6.
Proposed Methods
In this section, we introduce our data augmentation and how to obtain the augmentation using the representation learning network F ( · ) .
Then we show how to plug our augmentation into the representation learning procedure of F ( · ) .
5.1 Label-Preserving Adversarial Auto-Augment ( LP-A3 )
As illustrated in the previous section, an ideal data augmentation X (cid:48) for representation learning should contain as little information about nuisance N as possible while still keeping all the information about class Y .
Since N is not observed, we transfer the objective min X (cid:48)
I ( X (cid:48)
∧ N ) into min X (cid:48)
I ( X (cid:48)
∧ X ) since I ( X (cid:48) ∧ X )
=
I ( X (cid:48) ∧ N ) + I ( X (cid:48)
∧ Y )
and I ( X (cid:48) ∧ Y ) is a constant under the constraint
I ( X (cid:48) ∧ Y ) =
I ( X ∧ Y ) .
Thus the optimization problem is:
[Equation]
Implementation of Mutual Information.
To solve Equation (2), computing the mutual information terms I ( X (cid:48) ∧ X ) , I ( X (cid:48) ∧ Y ) and I ( X ∧ Y ) is required.
Next, we will show how to compute these terms using a neural net classiﬁer F ( · ; θ ) , parameterized by θ , that consists of two components: a representation encoder E ( · ) and a predictor M ( · ) .
Speciﬁcally, F ( · ; θ ) =
M ( E ( · )) , where the representation encoder E ( · ) maps input X into representation Z , and the predictor M ( · ) predicts the class of Z .
This is demonstrated in Figure 2.
Constraint implementation.
Since I ( X (cid:48) ∧ Y ) =
H ( Y ) − H
( Y | X (cid:48) ) and I ( X ∧ Y ) =
H ( Y ) − H
( Y | X ) , we can remove the H ( Y ) term in both sides and turn the constraint into
H ( Y | X ) =
H ( Y | X (cid:48) ) .
Thus we only need to compute the conditional entropy of Y given X or X (cid:48) , which can be approximated through the neural net classiﬁer: H ( Y | X ) =
E X , Y [ − log P ( y | x )] ≈
E X , Y [ − log( F ( x ; θ )
[ y ])] , where we use softmax class probability F ( x ; θ )
[ y ] to approximate the likelihood P ( y | x ) .
And H ( Y | X (cid:48) ) can be computed similarly.
Objective implementation.
Then we show how to compute the objective I ( X (cid:48) ∧ X ) .
Since I ( X (cid:48) ∧
X )
=
H ( X ) − H
( X | X (cid:48) )
where H ( X ) is not related to X (cid:48) and thus can be neglected, we only need to compute H ( X | X (cid:48) )
=
E X , X (cid:48)
[ − log P ( x | x (cid:48) )] .
We use the Learned Perceptual Image Patch
Similarity (LPIPS) [59] between x and x (cid:48) to compute the data likelihood P ( x | x (cid:48) ) since LPIPS distance is a widely used metric to measure the data similarity in data generative model ﬁeld [21, 58] and many previous work has shown that LPIPS distance is the best surrogate for human comparisons of similarity [59, 24], compared with any other distance including (cid:96) 2 and (cid:96) ∞ distance.
Although such surrogate may have error, it worth noting that Theorem 4.2 allows the surrogate to have (cid:15) error.
The
LPIPS distance is deﬁned by the (cid:96) 2 distance of stacked feature maps from a neural network.
Here we use F ( · ; θ ) to compute the LPIPS distance.
Let F ( · ; θ ) has L layers and (cid:98) F l ( · ; θ ) denotes these channel-normalized activations at the l -th layer of the network.
Next, the activations are normalized again by layer size and ﬂattened into a single vector φ ( x ) (cid:44) ( (cid:99) F 1 ( x ; θ ) √ w 1 h 1 , ..., (cid:99) F L ( x ; θ ) √ w L h L ) , where w l and h l are the width and height of the activations in layer l , respectively.
The LPIPS distance between input x and the augmentation x (cid:48) is then deﬁned as:
[Equation]
Constraint Relaxation for Efﬁciency.
Now, given an input x , its data augmentation x (cid:48) can be computed by solving the following optimization problem using the neural network F ( · ; θ ) in practice:
[Equation]
The equality constraint in Equation (4) is too strict to solve since it may be inefﬁcient to search for an x (cid:48) that exactly satisﬁes log F ( x (cid:48) ; θ )
[ y ] = log F ( x ; θ )
[ y ] .
Thus we relax the constraint with a small σ and change the constaint into: log F ( x (cid:48) ; θ )[ y ] ≥ log F ( x ; θ )
[ y ] − σ .
It’s worth noting that if σ is sufﬁciently small, the label is still well preserved.
There is a trade-off to the value of σ , we search σ to ﬁnd a sweet spot where the problem is practical to solve and meanwhile the label is well preserved.
There are many off-the-shelf methods that solve Equation (4), and here we apply the Fast Lagrangian
Attack Method [24] as a demonstration.
We initialize x (cid:48) by x plus a uniform noise.
And we ﬁnd the optimal x (cid:48) by solving the following the Lagrangian multiplier function and gradually scheduling the value of the multiplier λ :
[Equation]
The detailed procedure of the algorithm can be found in Appendix 2.
The algorithm has a similar form as adversarial attack [61, 52] in that they both ﬁnd an optimal augmentation x (cid:48) by adding perturbations to the original image x .
However, the difference is that we aim to generate hard augmentation that preserves the label, while adversarial attack aims to change the class label.
5.2 Plugging LP-A3 into a Representation Learning Task
One primary advantage of LP-A3 is that it only requires a neural net F ( · ; θ ) to produce the augmentation and F ( · ; θ ) can be the current representation learning model, so we can plug LP-A3 into any representation learning procedure requiring no additional parameters, which is plug-and-play and parameter-free.
At each step, we ﬁrst ﬁx F ( · ; θ ) to generate the augmentation x (cid:48) by solving
Equation (5) using Algorithm 2.
And then we train F ( · ; θ ) by running the original representation learning algorithm using our augmentation x (cid:48) .
Data selection.
It is not necessary to ﬁnd hard positives for every sample.
To save more computation, we can apply a sharpness-aware criterion, i.e., time-consistency (TCS) [63], to select the most informative data ( τ % data with the lowest TCS in Algorithm 1) that have sharp loss landscapes, which indicate the existence of nearby hard positives, and we only apply LP-A3 to them.
It reduces the computational cost without degrading the performance because (1) the improvement brought by augmentations is limited for examples whose loss already reaches a ﬂat minimum, while the model does not generalize well near examples with a sharp loss landscapes; and (2) the hard positives for examples with ﬂat loss landscape are distant from the original ones and might introduce extra bias to the training.
LP-A3 is compatible with any representation learning task minimizing a loss L : X ×Y ×W → R + , which takes in a data batch and a model to output a loss value.
Y here denotes the groundtruth label for labeled data and pseudo label for unlabeled data.
The pseudo-code of plugging LP-A3 into the representation learning procedure with TCS-based data selection is provided in Algorithm 1.
Experiments
In this section, we apply LP-A3 as a data augmentation method to several popular methods for three different learning tasks, i.e., (1) semi-supervised classiﬁcation; (2) noisy-label learning and (3) medical image classiﬁcation.
In all the experiments, LP-A3 can (1) consistently improve the convergence and test accuracy of existing methods and (2) autonomously produce augmentations that bring non-trivial improvement even without any domain knowledge available.
A walk-clock time comparison is given in the Appendix, showing LP-A3 effectively reduces the computational cost.
In addition, we conduct a thorough sensitivity study of LP-A3 by changing (1) label-preserving margin and (2) data selection ratio on the three tasks.
More experimental details can be found in the Appendix.
[Figure]
[Figure]
6.1 Medical Image Augmentations produced by LP-A3 vs. RandAugment
We visualize data augmentations generated by LP-A3 and RandAugment [12] on the testset of
DermaMnist [50] with a ResNet-18 classiﬁer and its conﬁdence on the groundtruth class in Fig.
We also use ScoreCAM [44] as an interpretation method to highlight the area in each image that the classiﬁer relies on to make the prediction.
we ﬁnd that LP-A3 preserves relevant derma areas highlighted by ScoreCAM and they are consistent with those in the original image.
On the contrary, RandAugment changes the color or occludes those derma areas, resulting in highly different
ScoreCAM heatmaps and hence wrong predictions (red bounding box in Fig. 3).
Instead, LP-A3 can preserve the class information and mainly perturb the class-unrelated area in the original image.
6.2 Applying LP-A3 to Three Different Representation Learning Tasks
Here we apply LP-A3 to three different tasks by pluging LP-A3 to existing baselines of each task.
Fig.
4 shows that LP-A3 greatly speeds up the convergence of each baseline.
Semi-supervised learning
To evaluate how LP-A3 improves the learning without sufﬁcient labeled data, we conduct experiments on semi-supervised classiﬁcation on standard benchmarks including CIFAR [22] and STL-10 [10] where only a very small amount of labels are revealed.
We apply LP-A3 in
FixMatch [36] and compare it with the original FixMatch and InfoMin [40], a learnable augmentation method for semi-supervised learning.
Their results are reported in Table 1, where LP-A3 consistently improves FixMatch and the improvement becomes more signiﬁcant if reducing the labeled data.
It’s worth noting that the original FixMatch already employs a carefully designed set of pre-deﬁned augmentations [13] that have been tuned to achieve the best performance, indicating that LP-A3 is complementary to existing data augmentations.
Moreover, LP-A3 also outperforms InfoMin by a large margin ( > 5% ), which indicates that LP-A3 is also superior to existing learnable augmentations. [Table] [Figure]
[Table]
Noisy-label Learning
Data augmentation is critical to noisy-label learning by providing different views of data to prevent neural nets from overﬁtting to noisy labels.
We apply LP-A3 to two state-ofthe-art methods DivideMix [26] and PES [5] on CIFAR with different ratios of noise labels.
LP-A can consistently improve the performance of these two SoTA methods and the improvement is more signiﬁcant in more challenging cases with higher noise ratios, e.g., on CIFAR100 with 90% of labels to be noisy, LP-A3 improves PES by ≥ 15% (Table 2).
Medical Image Classiﬁcation To evaluate the performance in speciﬁc areas without domain knowledge, we compare LP-A3 with existing data augmentations on medical image classiﬁcation tasks from MedMNIST [50], which is composed of several sub-dataset with various styles of medical images.
We compare our LP-A3 with RandAugment [13] on training ResNet-18 and ResNet-50 [17].
We report the results in Table 3, where RandAugment designed for natural images fails to improve
[Table] [Table]
the performance in this scenario.
In contrast, LP-A3 does not rely on any domain knowledge brings improvement to all the datasets, especially for OctMNIST where the improvement is over 1% .
The results indicate that hand-crafted strong data augmentations do not generalize to all domains but LP-A3 can autonomously produce augmentations guided by our representation learning principle without relying on any domain knowledge
[Table]
[Figure]
6.3 Sensitivity Analysis of Hyperparameters
Label preserving margin σ : We evaluate how LP-A3 performs with different label preserving margin σ on the three tasks.
The results are presented in Fig.
5, where a reverse U-shape is observed.
And LP-A3 using all the evaluated σ outperforms baselines, which indicates LP-A3 is robust to σ .
Data selection ratio: We evaluate the performance of LP-A3 with different amount of data selected on the three tasks.
As shown in Fig.
5, selecting all the data does not perform the best since some data’ augmentations are useless to apply data augmentation.
Moreover, selecting only 30% data to apply LP-A3 can outperform all baselines by a large margin, especially on MedMNIST where the improvement is ≥ 2% , which veriﬁes the effectiveness of LP-A3 and our data selection method.
Conclusion
In this paper, we study how to automatically generate domain-agnostic but task-informed data augmentations.
We ﬁrst investigate the conditions required for augmentations leading to representations that preserves the task (label) information and then derive an optimization objective for the augmentations.
For practicality, we further propose a surrogate of the derived objective that can be efﬁciently computed from the intermediate-layer representations of the model-in-training.
The surrogate is built upon the data likelihood estimation through perceptual distance.
This leads to LP-A3 , a general and autonomous data augmentation technique applicable to a variety of machine learning tasks, such as supervised, semi-supervised and noisy-label learning.
In experiments, we demonstrate that LP-A3 can consistently bring improvement to SoTA methods for different tasks even without domain knowledge.
In future work, we will extend LP-A3 to more learning tasks and further improve its efﬁciency.
Acknowledgements
This work was supported by, the Major Science and Technology Innovation 2030 “New Generation Artiﬁcial Intelligence” key project under Grant 2021ZD0111700, NSFC No. 61872329, No. 62222117, and the Fundamental Research Funds for the Central Universities under contract WK3490000005.
Huang, Sun and Su are supported by NSF-IIS-FAI program, DOD-ONR-Ofﬁce of Naval Research,
DOD-DARPA-Defense Advanced Research Projects Agency
Guaranteeing AI Robustness against
Deception (GARD).
Huang is also supported by Adobe, Capital One and JP Morgan faculty fellowships.
We acknowledge the support of GPU cluster built by MCC Lab of Information Science and
Technology Institution, USTC.
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[No] (c) Did you discuss any potential negative societal impacts of your work?
[N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] See Sec.
(b) Did you include complete proofs of all theoretical results?
[Yes] See Appendix B 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[No] Will open source later (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Aappendix C (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[No] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[No] 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] (b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[N/A] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[-= 
-]
[N/A]