R OBUST A CTIVE D ISTILLATION
Cenk Baykal, Khoa Trinh, Fotis Iliopoulos, Gaurav Menghani, Erik Vee
Google Research {baykalc,khoatrinh,fotisi,gmenghani,erikvee}@google.com
A BSTRACT
Distilling knowledge from a large teacher model to a lightweight one is a widely successful approach for generating compact, powerful models in the semi-supervised learning setting where a limited amount of labeled data is available.
In large-scale applications, however, the teacher tends to provide a large number of incorrect soft-labels that impairs student performance.
The sheer size of the teacher additionally constrains the number of soft-labels that can be queried due to prohibitive computational and/or ﬁnancial costs.
The difﬁculty in achieving simultaneous efﬁciency (i.e., minimizing soft-label queries) and robustness (i.e., avoiding student inaccuracies due to incorrect labels) hurts the widespread application of knowledge distillation to many modern tasks.
In this paper, we present a parameter-free approach with provable guarantees to query the soft-labels of points that are simultaneously informative and correctly labeled by the teacher.
At the core of our work lies a game-theoretic formulation that explicitly considers the inherent trade-off between the informativeness and correctness of input instances.
We establish bounds on the expected performance of our approach that hold even in worst-case distillation instances.
We present empirical evaluations on popular benchmarks that demonstrate the improved distillation performance enabled by our work relative to that of state-of-the-art active learning and active distillation methods.
I NTRODUCTION
Deep neural network models have been unprecedentedly successful in many high-impact application areas such as Natural Language Processing (Ramesh et al., 2021;
Brown et al., 2020) and Computer
Vision (Ramesh et al., 2021; Niemeyer & Geiger, 2021).
However, this has come at the cost of using increasingly large labeled data sets and high-capacity network models that tend to contain billions of parameters (Devlin et al., 2018).
These models are often prohibitively costly to use for inference and require millions of dollars in compute to train (Patterson et al., 2021).
Their sheer size also precludes their use in time-critical applications where fast decisions have to be made, e.g., autonomous driving, and deployment to resource-constrained platforms, e.g., mobile phones and small embedded systems (Baykal et al., 2022).
To alleviate these issues, a vast amount of recent work in machine learning has focused on methods to generate compact, powerful network models without the need for massive labeled data sets.
Knowledge Distillation (KD) (Buciluˇa et al., 2006; Hinton et al., 2015; Gou et al., 2021; Beyer et al., 2021) is a general purpose approach that has shown promise in generating lightweight powerful models even when a limited amount of labeled data is available (Chen et al., 2020).
The key idea is to use a large teacher model trained on labeled examples to train a compact student model so that its predictions imitate those of the teacher.
The premise is that even a small student is capable enough to represent complicated solutions, even though it may lack the inductive biases to appropriately learn representations from limited data on its own (Stanton et al., 2021; Menon et al., 2020).
In practice, KD often leads to signiﬁcantly more predictive models than otherwise possible with training in isolation (Chen et al., 2020; Xie et al., 2020; Gou et al., 2021; Cho & Hariharan, 2019).
Knowledge Distillation has recently been used to obtain state-of-the-art results in the semi-supervised setting where a small number of labeled and a large number of unlabeled examples are available (Chen et al., 2020; Pham et al., 2021; Xie et al., 2020).
Semi-supervised KD entails training a teacher model on the labeled set and using its soft labels on the unlabeled data to train the student.
The teacher is often a pre-trained model and may also be a generic large model such as GPT-3 (Brown et al., 2020) or PaLM (Chowdhery et al., 2022).
The premise is that a large teacher model can more aptly extract knowledge and learn from a labeled data set, which can subsequently be distilled into a small student.
Despite its widespread success, KD generally suffers from various degrees of conﬁrmation bias and inefﬁciency in modern applications to semi-supervised learning.
Conﬁrmation bias (Pham et al., 2021; Liu & Tan, 2021; Arazo et al., 2020; Beyer et al., 2021) is the phenomenon where the student exhibits poor performance due to training on noisy or inaccurate teacher soft-labels.
Here, inaccuracy refers to the inconsistency between the teacher’s predictions for the unlabeled inputs and their groundtruth labels.
Feeding the student inaccurate soft-labels leads to increased conﬁdence in incorrect predictions, which consequently produces a model that tends to resist new changes and perform poorly overall (Liu & Tan, 2021; Arazo et al., 2020).
At the same time, large-scale applications often require the teacher’s predictions for billions of unlabeled points.
For instance, consider distilling knowledge from GPT-3 to train a powerful student model.
As of this writing,
OpenAI charges 6c per 1k token predictions (OpenAI, 2022).
Assuming just 1M examples to label and an average of 100 tokens per example leads to a total cost of $6 M.
Hence, it is highly desirable to acquire the most helpful – i.e., informative and correct – soft-labels subject to a labeling budget (GPT-3 API calls) to obtain the most powerful student model for the target application.
Thus, it has become increasingly important to develop KD methods that are both query-efﬁcient and robust to labeling inaccuracies.
Prior work in this realm is limited to tackling either distillation efﬁciency (Liang et al., 2022;
Xu et al., 2020), by combining mix-up (Zhang et al., 2017) and uncertainty-based sampling (Roth & Small, 2006), or robustness (Pham et al., 2021; Liu & Tan, 2021;
Arazo et al., 2020; Zheng et al., 2021; Zhang et al., 2020), through clever training and weighting strategies, but not both of these objectives at the same time .
In this paper, we present a simple-toimplement method that ﬁnds a sweet spot and improves over standard techniques.
Relatedly, there has been prior work in learning under label noise (see Song et al.
for a survey), however, these works generally assume that the noisy labels are available (i.e., no active learning component) or impose assumptions on the type of label noise (Younesian et al., 2021).
In contrast, we assume that the label noise can be fully adversarial and that we do not have full access to even the noisy labels.
To the best of our knowledge, this work is the ﬁrst to consider the problem of importance sampling for simultaneous efﬁciency and robustness in knowledge distillation.
To bridge this research gap, we present an efﬁcient algorithm with provable guarantees to identify unlabeled points with soft-labels that tend to be simultaneously informative and accurate.
Our approach is parameter-free, imposes no assumptions on the problem setting, and can be widely applied to any network architecture and data set.
At its core lies the formulation of an optimization problem that simultaneously captures the objectives of efﬁciency and robustness in an appropriate way.
In particular, this paper contributes:
A mathematical problem formulation that captures the joint objective of training on informative soft-labels that are accurately labeled by the teacher in a query-efﬁcient way 2.
A near linear time, parameter-free algorithm to optimally solve it 3.
Empirical results on benchmark data sets and architectures with varying conﬁgurations that demonstrate the improved effectiveness of our approach relative to the state-of-the-art 4.
Extensive empirical evaluations that support the widespread applicability and robustness of our approach to varying scenarios and practitioner-imposed constraints.
P ROBLEM S TATEMENT
We consider the semi-supervised classiﬁcation setting where we are given a small labeled set X L – typically tens or hundreds of thousands of examples – together with a large unlabeled set X U , typically on the order of millions or billions.
The goal is to leverage both the labeled and unlabeled sets to efﬁciently and reliably train a compact, powerful model θ student .
To do so, we use knowledge distillation (Xie et al., 2020; Liang et al., 2020) where the labeled points are used to train a larger, (often pre-trained) teacher model that can then be used to educate a small model (the student ).
We emphasize that the teacher may be a pre-trained model, however, it is not trained on the unlabeled set X U .
The distillation process entails using the soft-labels of the teacher for the unlabeled points.
The student is then trained on these soft-labeled points along with the original labeled data set.
The key insight is that the large, pre-trained teacher model can more aptly learn representations from the limited data, which can then be imitated by the student.
Somewhat more formally, we are given two input sets X L , X U independently and randomly drawn from the input space X ⊆ R d .
We assume that we have access to the hard labels Y L ∈ { 0 , 1 } k for the instances in X L , but not those in X U and that |X L | (cid:28)
|X
U | .
Consistent with modern ML applications, we assume that a validation data set of labeled points is available.
We will use a slight abuse in notation and refer to the set of labeled data points as ( X L , Y L ) to denote the set of ( x, y ) labeled pairs.
We assume large-scale applications of KD where the teacher is exceedingly large to the extent that querying the teacher soft-label
f θ teacher ( x ) ∈ [0 , 1] k for an unlabeled point x ∈ X U is costly and soft-labeling all of X
U is infeasible.
In the following, we introduce and motivate robust active distillation to conduct this process efﬁciently and reliably
. 2. A CTIVE D ISTILLATION
The objective of active distillation is to query the minimum number of teacher soft-labels for points in X U in order to train a high-performing student model θ student in a computationally and ﬁnanciallyefﬁcient way.
This process is shown in Alg.
Here, we conduct T active distillation iterations after training the student and the teacher models on the training set P , which initially only includes the set of hard-labeled points.
On Line 8 and throughout, f θ ( x ) ∈ [0 , 1] k denotes the softmax output of a neural network model θ with respect to input x .
At each iteration (Lines 5-10, Alg. 1), we use a given querying algorithm, S ELECT , to identify the most helpful b unlabeled points to soft-label by the teacher based on the most up-to-date student model θ t − 1 (Line 6).
The selected points are then soft-labeled by the teacher and added to the (expanding) training set P .
Subsequently, the student is trained using the Kullback-Leibler (KL) Divergence (Hinton et al., 2015) as the loss function on the training set P which includes both the hard-labeled points ( X L , Y L ) and the accumulated soft-labeled ones.
We follow the standard convention in active learning (Ren et al., 2021) and efﬁcient distillation (Liang et al., 2020; Xu et al., 2020) and train the student model from scratch on Line 9. [Table] [Table]
The active distillation problem is deeply related to the problem of active learning , where the objective is to query the labels of only the most informative points in order to minimize labeling costs.
To this end, prior approaches in efﬁcient KD (Xu et al., 2020; Liang et al., 2020) have proposed methods inspired by margin-based sampling (Balcan et al., 2007; Roth & Small, 2006), a popular and widely used active learning algorithm
(Ren et al., 2021).
Margin-based sampling is one example of uncertainty-based sampling, other examples are clustering-based selection (Sener & Savarese, 2017;
Ash et al., 2019), model uncertainty (Gal et al., 2017), and adversarial proximity (Ducoffe & Precioso, 2018) (see (Ren et al., 2021) for a survey).
In the following, we consider margin-based sampling due to its simplicity and prior application to efﬁcient distillation by related work (Liang et al., 2020; Xu et al., 2020).
Margin-based sampling for KD is an intuitive and simple-to-implement idea where the teacher predictions for inputs that the student is most uncertain about are queried.
For an input x and prediction i ∗ = argmax i ∈
[ k ] f θ student ( x ) i , the uncertainty is measured in terms of the margin between the top-2 highest probability entries, i.e., margin( x ) =
f θ student ( x ) i ∗ − max i ∈
[ k ] \ i ∗ f θ student ( x ) i .
2. R ESEARCH G AP
Despite the widespread success of margin-based sampling in active learning, we claim that it is generally ill-suited for knowledge distillation due to its tendency to amplify conﬁrmation bias, leading to poor student performance.
To observe this, note that the objective of margin-based sampling – and more generally, other uncertainty-based query methods – is to query the soft-labels of inputs for which the student is most uncertain about ("hard" instances).
However, hard instances for the student are often hard to predict correctly by the teacher.
Hence, the soft-labels for these points are more likely to be incorrect with respect to the groundtruth labels, leading to misleading student training.
Fig.
1 shows an instance of this phenomenon for CIFAR10 with ResNet student-teacher architectures of varying depth.
As the ﬁgure depicts, the teacher tends to predict incorrect labels for points with low student margin (hard instances), and conversely, tends to be highly accurate on points with high margin (easy instances).
This suggests that there is an inherent trade-off between efﬁciency (minimizing queries) and robustness (mitigating conﬁrmation bias) that needs to be considered.
That is, we would like to pick informative points for the student for efﬁciency, but these informative points tend to be incorrectly classiﬁed by the student which leads to misguided training and poor performance.
Is it possible to simultaneously achieve both in a principled way?
We label this problem
Robust Active Distillation and propose a method to solve it in the following section.
R OBUST A CTIVE D ISTILLATION (RAD) 3. B ACKGROUND
The margin algorithm (Liang et al., 2020; Roth & Small, 2006) selects the b points with the lowest margin scores margin( x ) , where b is our soft-label budget.
Let margin i be shorthand for the margin of each unlabeled input margin( x i ) and observe that its gain or informativeness can be quantiﬁed as g i = 1 − margin i .
Given a budget b , note that the margin-sampling algorithm corresponds to the optimal solution of the following optimization problem where the objective is to generate a probability distribution that maximizes the expected sum of gains,
[Equation]
As discussed previously, this formulation solely focuses on the informativeness of the points and does not consider the increased likelihood of mislabeling by the teacher.
Robust Distillation To extend (1) so that it is robust to possible teacher mislabeling, consider the masks c i
= 1 { teacher labels point i correctly } for each i ∈ [ n ] where 1 { x } =
if x is true andotherwise.
Equipped with this additional variable, one way to explicitly mitigate conﬁrmation bias and simultaneously pick informative samples is to reward points that are correctly labeled by the teacher by assigning gains as before, but penalize those that are incorrectly labeled via losses.
This can be done by using the modiﬁed gains in the context of (1)
[Equation]
if teacher labels point i correctly − (cid:96) i , otherwise ∀ i ∈ [ n ] .
In words, this means that if the point i is correctly labeled by the teacher we assign the standard margin-based gain
g i =
(1 − margin i ) as before; otherwise, we penalize the selection by assigning − (cid:96) i for some loss (cid:96) i ≥ 0 .
This leads to the following general problem of robust distillation
[Equation]
The optimal solution to problem (2) corresponds to picking the b most informative (highest gain) points among those that are predicted correctly by the teacher , i.e., those points i ∈
[ n ] with highest g i subject to c i = 1 .
This approach is shown as Robust Distillation (Oracle) in Fig.
1 (right).
Fig.exempliﬁes the effect of inaccurate examples on student training (see also (Pham et al., 2021)).
If we had knowledge of ( c i ) i ∈ [ n ] , then we could optimally solve (2) to obtain signiﬁcant improvements over the standard margin algorithm.
Unfortunately, perfect knowledge of whether the teacher labels each point correctly or not, i.e., ( c i ) i ∈ [ n ] , is not possible in the semi-supervised setting.
3. O UR A PPROACH
We consider a general and robust approach that simultaneously leverages instance-speciﬁc knowledge without having to know the masks ( c i ) i ∈ [ n ] individually.
Suppose that we only know that the teacher mislabels m points out of the n unlabeled inputs X B instead.
Can we generate a sampling distribution so that no matter which of the m points are labeled incorrectly by the teacher, our expected gain is high?
Assuming b = 1 for simplicity, we arrive at the extension of the formulation in (2)
[Equation]
i ] , where ∆ k = { q ∈ [0 , 1] n : (cid:88)
[Equation]
[Equation]
Problem (3) has the following game theoretic interpretation.
We go ﬁrst and pick a sampling distribution p over the points.
In response, an adversary decides which points are misclassiﬁed (i.e, c i = 0 ) by the teacher subject to the constraint that it can set c i =
for at most m ≤ n of them since c ∈ ∆ n − m .
Given the linear structure of the problem, it turns out that we can invoke von Neumann’s
Minimax Theorem (Neumann, 1928) which states that the equilibrium point is the same regardless of whether we go ﬁrst and pick the probability distribution p ∈ ∆ 1 or the adversary goes ﬁrst and picks ( c i ) i ∈
[ n ] .
By exploiting this connection, we obtain a closed form solution as formalized below.
Theorem 1.
Suppose g 1 ≥ g 2 ≥ · · · ≥ g n > 0 , and deﬁne G k = (cid:80) i
≤ k g i / ( g i + (cid:96) i ) and
H k = (cid:80) i ≤ k 1 / ( g i + (cid:96) i ) .
For G n ≥ m , an optimal solution p ∗ ∈ ∆ 1 to (3) is given by p ∗ i =
H k ∗ ( g i + (cid:96) i ) if i ≤ k ∗ and p ∗ i =
otherwise, where k ∗ = argmax k ∈ [ n ] G k − m H k .
The distribution can be computed in linear time (assuming sorted g ) and achieves an objective value of OPT ( k ∗ ) :
= G k ∗ − m H k ∗ .
We sketch the proof here.
The full proof can be found in the Appendix (Sec. C).
Proof sketch.
Let
[Equation]
Substituting p ∗ from Thm. 1 and considering a minimizing value for c ∈ ∆ n − m , it is possible to show that p ∗ ∈ ∆ 1 and
[Equation]
On the other hand, let c ∗ i = min (cid:0) 1 , OPT ( k ∗ )
+ (cid:96) i g i
+ (cid:96) i (cid:1) .
With a little more work, using the fact that g k ∗ ≥ OPT ( k ∗ ) ≥ g k ∗ +1 , we can show similarly that c ∗ ∈ ∆ n − m and
[Equation]
With these inequalities in hand, we apply the Minimax Theorem (Neumann, 1928), which yields
[Equation]
Hence, p ∗ does indeed obtain the optimal value, OPT ( k ∗ ) .
RAD Loss Equipped with Theorem 1, all that remains is to specify the losses in (3).
Prior work on conﬁrmation bias has shown that even a small number misguided soft-labels can derail the student’s performance and signiﬁcantly impact its predictive capability (Liu & Tan, 2021).
Additionally, the harm of an incorrectly labeled point may be even more pronounced when the student is uncertain about that point.
To model this, we consider instantiating our general problem formulation (3) with losses that are relative to the gain (cid:96)
i = − wg i for each i ∈ [ n ] where w ∈ [0 , 1] is a weight parameter that controls the magnitude of the penalization.
This formulation purposefully leads to higher penalties for misclassiﬁed points that the student is already unsure about (high gain) to mitigate conﬁrmation bias, and leads to the following optimization problem which is the focus of this paper
[Equation]
Invoking Thm.
1 with the relative gain losses as described above immediately leads to the following, which, along with the choice of w below, describes the algorithm R AD that we propose in this paper.
Corollary 1.
An optimal solution p ∗ ∈ ∆ 1 to (4) has k non-zero entries I k ∗ ⊆
[ n ] corresponding to the k ∗ indices of the largest entries of g , with
[Equation]
where k ∗ = argmax k
[Equation]
n [Equation] [Equation] j
[Equation]
g [Equation] The distribution p ∗ can be computed in Θ( n log n ) time, with OPT ( k ∗ ) =
( k ∗ − (1+ w ) m ) / (cid:80) j ∈I k ∗ g − 1 j .
Choice of w
Although R AD can be applied with any user-speciﬁed choice of w , we use the theoretically-motivated weight of w = (1 − m/n ) as the relative penalization constant in our experiments.
This choice of w guarantees that the optimal value (expected gain) of (4) (see Corollary (1)) is non-negative — if the expected gain were negative, we would be better off not sampling at all.
This default value for w makes R AD parameter-free.
Extensive empirical evaluations with varying values of w are presented in Sec.
D.5 of the Appendix.
We observe several favorable properties of R AD ’s sampling distribution in Fig. 2, which depicts the computed distribution on a synthetic scenario with gains drawn uniformly at random from [0 , 1] .
For one, the sampling distribution tends to allocate less probability mass to the highest gain items.
As prior work has shown, this is desirable because the hardest (highest gain) examples tend to be outliers or points with noisy labels (Mindermann et al., 2022; Ren et al., 2018).
In fact, robust learning approaches typically downweight hard examples for this reason (Kumar et al., 2010), analogous to RAD’s sampling behavior.
At the same time, Paul et al.
(2021) show that the easiest (lowest gain) examples tend to be truly uninformative and the best strategy is to ignore a certain fraction of the highest and lowest gain points.
This strategy parallels R AD ’s computed distribution, where a number of low gain points are ignored and the probability peaks around a region inbetween (see
Fig. 2).
A prominent beneﬁt of R AD is that this region is computed in a fully automated way as a function of the teacher’s accuracy (i.e., amount of label noise).
If the teacher is highly accurate, the distribution accordingly concentrates on the highest gain points (blue, Fig. 2); otherwise, it spreads out the probabilities over a larger portion of the points and purposefully assigns lower sampling probability to the highest gain points which are likely to be noisy (e.g., brown, Fig. 2).
3. I MPLEMENTATION D ETAILS
We conclude this section by outlining the practical details of R AD .
We follow the setting of this section and set g i = 1 − margin i to deﬁne the gains of each point (see Sec.
D.6 of the Appendix for evaluations with a differing gain deﬁnition).
In practice, we use the distribution q = min { bp, 1 } when sampling a set of b points, where p is from Corollary 1.
This is optimal as long as the probabilities from Corollary 1 (or more generally, Theorem 1) are not heavily concentrated on a few points (i.e., max i ∈ [ n ] p i ≤ 1 /b ).
As exempliﬁed in Fig.
2 and experimentally veriﬁed in Sec.
4 in all of the evaluated scenarios, we found this to virtually always be the case.
Alternatively, the acquisition size b can be adjusted after the single-sample probability distribution is computed so that b ≤ min i ∈ [ n ] 1 /p i .
Since the number of mistakes the teacher makes on X B , m , is not known to us in the semi-supervised setting, we approximate this quantity by ﬁrst taking the sample mean inaccuracy of a small uniform random sample of b uniform (see Appendix, Sec.
D.1) points as a way to approximate m and bootstrap our approach.
We then use our approach with b (cid:48)
=
b − b uniform as described above.
By Bernstein’s inequality (Bernstein, 1924), this weighted estimate tightly concentrates around the mean, which in turn implies a high-quality approximation of m .
We theoretically analyze the effect of an approximate m on the quality of the optimal solution in Sec.
C of the Appendix (see Lemmas 4 and 5).
R ESULTS
We apply our sample selection algorithm, R AD , to benchmark vision data sets and evaluate its performance in generating high-performance student models on a diverse set of knowledge distillation scenarios.
We compare the performance of R AD to the following: (i) M ARGIN
(Balcan et al., 2007;
Roth & Small, 2006) as described in Sec. 3, (ii) U NIFORM , (iii) C LUSTER M ARGIN (labeled CM), a state-of-the-art active learning technique (Citovsky et al., 2021), (iv) C ORESET , a popular clusteringbased active learning algorithm
(Sener & Savarese, 2017), (v) E NTROPY , a greedy approach that picks the points with highest student prediction entropy (Holub et al., 2008), and (vi) UNIXKD (Xu et al., 2020), a state-of-the-art active distillation approach based on mix-up (Zhang et al., 2017).
We implemented all algorithms in Python and used the TensorFlow (Abadi et al., 2015) deep learning library.
We used the hyperparameters speciﬁed in the respective papers for all of the compared approaches.
For R AD , we use the theoretically-derived setting of w = 1 − m/n as speciﬁed in Sec.and emphasize that this makes R AD fully parameter-free.
In Sec.
D of the Appendix, we present: the full set of hyper-parameters and experimental details (Sec. D.1); additional evaluations that report statistics beyond test accuracy (Sec. D.3); applications of R AD to the standard active learning setting and comparisons to SOTA approaches (Sec. D.4); experiments with varying w and gain deﬁnition to evaluate the robustness of R AD
(Sec.
D.5 and D.6, respectively)
; comparisons on a diverse set of knowledge distillation conﬁgurations (Sec. D.7).
Overall, our empirical evaluations show that R AD uniformly improves on state-of-the-art baselines and demonstrate its off-the-shelf effectiveness without the need to tune or change any hyperparameters.
4. CIFAR10, CIFAR100, & SVHN
Setup We use ResNet (He et al., 2015), ResNetV2- { 11 , 20 , 29 } (He et al., 2016), or MobileNet (Howard et al., 2017) with a depth multiplier of 1 as the student and ResNet-50, ResNetV2- { 56 , 110 } , or MobileNet with a depth multiplier of 2 as the teacher model.
We considered the
CIFAR10/CIFAR100 (Krizhevsky et al., 2009), SVHN (Netzer et al., 2011), and ImageNet (Deng et al., 2009) data sets.
Unless otherwise speciﬁed, we use the Adam optimizer (Kingma & Ba, 2014) with a batch size of 128 with data set speciﬁc learning rate schedules.
We follow the active distillation setting shown in Alg. 1 with various conﬁgurations.
We use 64 Cloud TPU v4s each with two cores.
The full set of hyper-parameters and experimental details can be found in Sec.
D of the Appendix.
Conﬁgurations We experimented with a diverse set of conﬁgurations for the knowledge distillation task.
We reported the speciﬁc conﬁguration for each plot as part of the plot’s title (e.g., see Fig. 3).
In context of the variables in the plot heading, we varied the number of epochs that the student is trained for (denoted as e ), the size of the initial set of labeled points ( | A | ), the number of soft-labels to query per iteration ( b ), and the teacher model ( t ); resnet in the conﬁguration refers to ResNetV2-20 as the student and ResNet-50 as the teacher unless otherwise speciﬁed.
All results were averaged over trials unless otherwise stated.
For each trial, we reshufﬂed the entire data set and picked a random portion (of size | A | ) to be the labeled data set X L , and considered the rest to be the unlabeled set X U .
In the ﬁrst set of experiments, we evaluate the effectiveness of each method in generating highaccuracy student models subject to a soft-labeling budget on CIFAR10, CIFAR100, and SVHN data sets with ResNet(v2) and MobileNet architectures of varying sizes.
CIFAR10 contains 50 ,images of size 32 × 32 with 10 categories, CIFAR100 has 50 , 000 32 × 32 images with 1000 labels, and SVHN consists of 73 , 257 real-world images ( 32 × 32 ) taken from Google Street View.
Fig.depicts the results of our evaluations on a diverse set of knowledge distillation scenarios with varying conﬁgurations.
We observe a consistent and marked improvement in the student model’s predictive performance when our approach is used to actively select the points to be soft-labeled by the teacher.
This improvement is often present from the ﬁrst labeling iteration and persists continuously over the active distillation iterations.
We observe that R AD performs particularly well relative to baselines regardless of the teacher’s accuracy.
For instance, we see signiﬁcant improvements with R AD when distilling from a MobileNet teacher on CIFAR100, which has relatively low accuracy (see corresponding plots in Fig. 3).
This observation suggests that the explicit consideration of possible teacher inaccuracy is indeed helpful when distilling from a teacher that may be prone to making mistakes.
At the same time, we observe that R AD outperforms state-of-the-art active learning algorithms such as Cluster Margin (CM) and others (M ARGIN , E NTROPY ) – which do not explicitly consider label noise in the form of incorrect teacher soft-labels – even in instances where the teacher accuracy is as high as ≈ 92% (see SVHN plots in Fig. 3).
These observations support R AD ’s ability to automatically adapt its sampling distribution to the applied scenario based on the approximated teacher inaccuracy.
4. I MAGE N ET E XPERIMENTS
Here, we report the results of our evaluations with ResNet architectures trained on the ImageNet data set I , which contains nearly 1 .
3 million images spanning 1000 categories (Deng et al., 2009).
We exclude the U NIX KD and C ORESET methods due to resource constraints and the fact that CM supersedes C ORESET (Citovsky et al., 2021) and U NIX KD consistently performed poorly on the conﬁgurations in the previous subsection.
This highlights an additional advantage of our approach: it merely requires a sort ( O ( n log n ) total time).
This is in contrast to computation- and memoryexpensive methods like C ORESET and CM that require clustering (see Sec.
D.2 for details).
Fig.depicts the results of our evaluations, where our method consistently improves upon the compared approaches across all training epochs.
Here the teacher is a ResNet50 model and the student is a
ResNet18 model.
The teacher is trained on the initial labeled dataset A with | A | = 10% | I | .
For each choice of the budget b ∈ { 3% | I | , 5% | I | , 7% | I | , 9% | I | , 11% | I |} , we run 3 trials.
In the rightmost plot we observe that the gain of our approach (w.r.t.
g i = 1 − margin i ) is higher than that of the competing approaches, and that the gain correlates well with the test accuracy of the student, which reafﬁrms the practical validity of our formulation (Sec. 3).
C ONCLUSION
In this paper, we considered the problem of efﬁcient and robust knowledge distillation in the semisupervised learning setting with a limited amount of labeled data and a large amount of unlabeled data.
We formulated the problem of robust active distillation and presented a near linear-time algorithm with provable guarantees to solve it optimally.
To the best of our knowledge, our work is the ﬁrst to consider importance sampling for informative and correctly labeled soft-labels to enable efﬁciency and robustness in large-scale knowledge distillation tasks.
Our method is parameter-free and simpleto-implement.
Our experiments on popular benchmark data sets with a diverse set of conﬁgurations showed a consistent and notable improvement in the test accuracy of the generated student model relative to those generated by state-of-the-art methods.
Limitations and future work In future work, we plan to establish a deeper theoretical understanding on the trade-offs of the various instantiations of our general framework, (3) in Sec. 3, on the test accuracy of the student model.
For example, it is not clear whether deﬁning the gain as g i = 1 − margin
i or g i = exp( − margin i ) is more appropriate, even though both deﬁnitions lead to gains that are monotonically increasing with the uncertainty of the student.
Besides considering teacher accuracy in the robust formulation, we plan to also consider other relevant metrics such as student-teacher disagreement to construct more informed distributions.
Overall, we envision that our approach can be used in high-impact applications to generate powerful student models by efﬁciently distilling the knowledge of large teachers in the face of limited labeled data.
R EPRODUCIBILITY S TATEMENT
Our algorithm is fully-speciﬁed (Corollary 1), simple-to-implement, and parameter-free (Sec. 3).
We provide the full details and hyperparameters required to reproduce our results in Sec. 4 and Sec.
D. of the Appendix.
We specify descriptions of how the competing algorithms were implemented, including the hyperparameter settings.
We provide precise theoretical results (Sec. 3 in the main body and Sec.
C of the Appendix) that clearly specify the assumptions and provide full proofs and additional helper lemmas in the Appendix (Sec C).
Our evaluations use publicly available and easily accessible data sets and models
A A PPENDIX
In this supplementary material, we provide the details of batch sampling (in Sec. B), full proofs of the results in Sec.
3 and additional theoretical results (in Sec. C), and details of experiments in Sec.and additional evaluations (in Sec.
D).
B I MPLEMENTATION D ETAILS
To supplement our discussion in Sec. 3, we provide additional details regarding the batch sampling procedure.
One approach is to iterate over the points i ∈ [ n ] and pick each point with probability q i .
If (cid:80) i ∈ [ n ] q i = b , then this procedure samples b points in expectation.
A more principled approach is to use randomized dependent rounding (Chekuri et al., 2009) which samples exactly b points given a distribution that sums to b .
This procedure is shown as Alg. 2, and an efﬁcient implementation of it runs in O ( n ) time (Chekuri et al., 2009).
Algorithm
Inputs : Probabilities p ∈ [0 , 1] n such that (cid:80) i ∈ [ n ] p i =
b
Output: set of indices I ⊂ [ n ] with |I| =
b 1: while ∃ i ∈ [ n ] such that 0 < p i < 1 do 2:
Pick i, j ∈ [ n ] with i (cid:54) =
j , 0 < p i < 1 , and 0 < p j
<3: α ← min(1 − p i , p j ) 4: β ← min( p i , 1 − p j ) 5:
Update p i and p j ( p i , p j ) =
(cid:40) ( p i + α, p j − α ) with probability βα + β , ( p i − β, p j + β ) with probability 1 − βα + β .
6: end while 7: I ← { i ∈ [ n ] : p i = 1 } return I
C P ROOFS & A DDITIONAL A NALYSIS C. P ROOF OF T HEOREM
Theorem 1.
Suppose g 1 ≥ g 2 ≥ · · · ≥ g n > 0 , and deﬁne G k = (cid:80) i
≤ k g i / ( g i + (cid:96) i ) and
H k = (cid:80) i ≤ k 1 / ( g i + (cid:96) i ) .
For G n ≥ m , an optimal solution p ∗ ∈ ∆ 1 to (3) is given by p ∗ i =
H k ∗ ( g i + (cid:96) i ) if i ≤ k ∗ and p ∗ i =
otherwise, where k ∗ = argmax k ∈ [ n ] G k − m H k .
The distribution can be computed in linear time (assuming sorted g ) and achieves an objective value of OPT ( k ∗ ) :
= G k ∗ − m H k ∗ .
Proof.
The proof relies on the the Minimax Theorem (Neumann, 1928), which yields
[Equation]
We will further use two claims, which we’ll prove shortly.
Claim 2.
Let p ∗ , k ∗ , and N ( k ) be deﬁned as in the statement of the lemma.
Then p ∗ ∈ ∆ 1 and
N ( k ∗ ) = min c ∈ ∆ n − m f ( p ∗ , c ) .
Claim 3.
Let k ∗ and N ( k ) be deﬁned as in the statement of the lemma.
Further, deﬁne
[Equation]
if i ≤ k [Equation] 1 otherwise
Then c ∗ ∈ ∆ n − m and N ( k ∗ )
=
max p ∈ ∆ 1 f ( p, c ∗ ) .
Given the claims, we see
[Equation]
That is, p ∗ attains the maximum, which is N ( k ∗ ) , as we wanted.
We now prove the claims.
Before beginning, we will ﬁrst simplify f ( p, c ) somewhat, ﬁnding
[Equation]
Proof of Claim 2.
We ﬁrst show p ∗ ∈ ∆ 1 .
We have (cid:88) i ≤ n p ∗
[Equation]
And since p ∗ i ≥ 0 for all i , it immediately follows that p ∗ i ≤ 1 as well.
We now show N ( k ∗ )
= min c ∈ ∆ n − m f
( p ∗ , c ) .
To this end, f
[Equation]
p ∗
[Equation]
i ≤ n
[Equation]
g
[Equation]
(cid:96) i )
[Equation]
(cid:96) i ) p i = (cid:88) i ≤ k ∗
[Equation]
( g
[Equation]
(cid:96)
[Equation]
− (cid:96)
i
[Equation]
i
[Equation]
= (cid:88) i ≤ k ∗ c i ( g i + (cid:96) [Equation]
[Equation]
(cid:96)
[Equation]
− (cid:88) [Equation] [Equation] (cid:88)
[Equation]
H k
[Equation]
(cid:88)
[Equation] ≤
[Equation]
G
[Equation]
H k
[Equation]
Clearly, for c ∗ ∈ ∆ n − m , this expression is minimized when c i = 1 for i > k ∗ and (cid:80) i ≤ k ∗ c i =
k ∗ − m .
So we have
[Equation]
as claimed.
We now prove our second claim.
Proof of Claim 3.
We ﬁrst show that N ( k ∗ ) ≥ g i for i > k ∗ .
1 Observe that if a b ≥ a + c b + d , then a b ≥ c d for non-negative values (and b > 0 , d > 0 ).
Notice
[Equation]
By our observation,
[Equation]
Similarly, we show N ( k ∗ ) ≤ g i for i ≤ k ∗ , using the observation that if a − c b − d ≤ ab , then ab ≤ cd for non-negative values (and b − d > 0 and d > 0 ).
Notice
[Equation]
And again, by our observation,
[Equation]
Now we’re ready to prove the claim.
We ﬁrst show c ∗ ∈ ∆ n − m .
Since N ( k ∗ ) ≤ g i for i ≤ k ∗ , we see c ∗ i = N ( k ∗ )
+ (cid:96) i g i
+ (cid:96) i ≤ 1 for i ≤ k ∗ .
So c ∗ i ∈ [0 , 1] .
Further, (cid:88) i ≤
[Equation] [Equation]
∗
[Equation]
That is, c ∗ ∈ ∆ n − m .
Finally, we show N ( k ∗ ) = max p ∈ ∆ 1 f ( p, c ∗ ) .
Note that c ∗
i ( g i + (cid:96) i ) − (cid:96) i
=
N ( k ∗ ) for i ≤ k ∗ , while c ∗ i ( g i + (cid:96) i ) − (cid:96) i
= g
i for i > k ∗ .
We have
[Equation]
From above, N ( k ∗ ) ≥ g i for i > k ∗ .
So the expression is maximized for p ∈ ∆ 1 when p i = 0 for i > k ∗ and (cid:80) i ≤ k ∗ p i = 1 .
Hence,
[Equation]
as we wanted.
C. E FFECT OF APPROXIMATING M
Here, we prove that an approximately optimal solution can be obtained even if an approximate value of m is used (e.g., via a validation data set).
For sake of simplicity, the following lemma considers the case where the losses are 0 in the context of Theorem 1, however, its generalization to general gains and losses – including the relative error formulation that we study in this paper – follows by rescaling the error parameter ε appropriately.
2 Our main result is that if we have an approximation ˆ m ∈ (1 ± ε ) m , then we can use this approximate m to obtain an (1 − 2 εm/ (2 εm +(1+ ε )) -competitive solution.
Lemma 4.
Let m ∈ [ n ] be the groundtruth value of the number of incorrect examples in X B and let k m be the optimal solution with respect to m .
Assume g 1 ≥ · · · ≥ g n and let α = g k m and β
= α 2(2 − α ) .
Suppose that we have an approximation ˆ m of m such that
[Equation]
then the solution k ˜ m with respect to ˜ m
= ˆ m/ (1 + ε ) is (1 − 2 εm/ (2 εm
+ (1 + ε ))
-competitive with the optimal solution, i.e., it satisﬁes
[Equation]
where O BJ ( k, m ) = k − mH k = max k
(cid:48) ∈ [ n ] k (cid:48)
− m H k
[Equation]
Proof.
For sake of notational brevity, we let k and k ∗ denote k ˜ m and k m , respectively.
First, observe that by the assumption of the lemma, we have
[Equation]
Note that since k ≥ ˜ m by the optimality of k with respect to ˜ m , we have k ≥ (1 − ε ) m (1+ ε )(1 − α ) > m which follows from the optimality condition from the proof of Theorem 1,
[Equation]
and ε ≤ α 2(2 − α ) .
Since k and m are integral, we have k ≥ m + 1 ≥ ˜ m
+ 1 .
Finally, by the optimality of k with respect to ˜ m , we have
[Equation]
Putting all of the above together,
[Equation]
where the ﬁrst inequality is by the inequality on the lower bound 1 /H
k and k ≥ m
+ 1 , the second by m ≥ ˜ m , the third by k ≥ m + 1 , and the fourth by
[Equation]
and rearrangment.
C. A PPROXIMATING m
Next, we show how to estimate m using a validation data set T .
To do so, we deﬁne
[Equation]
where f θ ( · ) ∈ [ k ] corresponds to the label prediction of network θ .
Note here that
[Equation]
where P B corresponds to the points in dataset B.
Lemma 5.
For any δ ∈ (0 , 1) , if we use a validation set T of size k to obtain an approximation ˆ m = err( T , f θ )
|P
B | for m = err( P B , f θ )
|P
B | , then with probability at least 1 − δ , | m − ˆ m
[Equation]
where p =
P
( x,y )
∼D ( f θ ( x ) (cid:54) =
y ) is the probability of mislabeling for network f θ ( · ) .
Proof.
Let T = { ( x 1 , y 1 ) , . . .
, ( x |T | , y |T | ) } be a set of |T | i.i.d.
points from the data distribution D and deﬁne X
i = 1 { f θ ( x i ) (cid:54) =
y i } for each i ∈ |T
| .
Letting X = 1 |T | (cid:80)
i X i , we observe that
[Equation]
Since we have a sum of k = |T | independent random variables each bounded by 1 with variance
Var ( X i ) =
p (1 − p ) , we invoke Bernstein’s inequality (Bernstein, 1924) to obtain
[Equation]
setting the above to δ/ 2 and solving for ε T yields
[Equation]
(cid:114)
[Equation]
4 /δ )
k , with probability at least 1 − δ/ 2 .
Similarly, we can deﬁne the random variables Y 1 , . . .
Y |P B | so that
Y i =
1 { f θ ( x i ) (cid:54) =
y i } for each ( x i , y i )
∈ P B .
Letting Y =
|P B | (cid:80) i Y i and observing that E
[ Y ] =
p as before, we invoke Bernstein’s inequality again to obtain that with probability at least 1 − δ/ 2 ,
[Equation]
The statement follows by the triangle inequality | Y − X | ≤ | Y − p | + | X − p | and the union bound.
D A DDITIONAL E VALUATIONS & E XPERIMENTAL D ETAILS
Here, we describe the experimental details and hyperparameters used in our evaluations and provide additional empirical results that supplement the ones presented in the paper.
Our additional evaluations support the robustness and widespread applicability of our approach.
D. E XPERIMENTAL D ETAILS
We conduct our evaluations on 64 TPU v4s each with two cores.
We used a validation data set of size 1 , 000 for the CIFAR10, CIFAR100, and SVHN data sets, and used a validation data set of size 10 , 000 for ImageNet, respectively, to estimate m .
The hyper-parameters used with respect to each architecture and corresponding data set(s) are as follows.
MobileNet (CIFAR10, CIFAR100, SVHN For the experiments involving MobileNet (Howard et al., 2017), whenever MobileNet was used as a student architecture it was initialized with a width paramater of 1, and whenever it was used as a teacher, it was initialized with a width parameter of 2.
We used the Adam optimizer (Kingma & Ba, 2014) with default parameters (learning rate: 1e − 3 ) and trained for either 100 or 200 epochs depending on the experimental conﬁguration.
We did not use data augmentation or weight regularization.
ResNets and ResNetv2s (CIFAR10, CIFAR100, SVHN We used the Adam optimizer (Kingma & Ba, 2014) with the default parameters except for the learning rate schedule which was as follows.
For a given number of epochs n epochs ∈ { 100 , 200 } , we used 1e − 3 as the learning rate for the ﬁrst (2 / 5) n epochs , then used 1e − 4 until (3 / 5) n epochs , 1e − 5 until (4 / 5) n epochs , 1e − 6 until (9 / 10) n epochs , and ﬁnally 5e − 7 until then end.
We used rounded values for the epoch windows that determine the learning rate schedule to integral values whenever necessary.
We did not use data augmentation or weight regularization.
D. I MAGE N ET
Setup We used a ResNet-18 student and ResNet-50 teacher model for the ImageNet experiments.
We train the student model for 100 epochs using SGD with momentum ( = 0 . 9 ) with batch sizeand a learn rate schedule as follows.
For the ﬁrst 5 epochs, we linearly increase the learning rate from 0 to 0 .
1 , the next 30 epochs we use a learning rate of 0 . 1 , the next 30 after that, we use a learning rate of 0 .
01 , the next 20 we use a learning rate of 0 .
001 , and use a learning rate of 0 . 0001 for the remaining epochs.
We use random horizontal ﬂips as our data augmentation.
Methods The implementations of RAD, M ARGIN , E NTROPY , and U NIFORM are the same as in our evaluations of CIFAR10/100 and SVHN in Sec 4.
However, the Cluster Margin (CM) (Citovsky et al., 2021) and C ORESET (Sener & Savarese, 2017) algorithms require expensive clustering operations and were inapplicable to ImageNet off-the-shelf due to memory and computational constraints.
Nevertheless, we implemented an approximate version of CM for completeness.
We choose CM over C ORESET because it is currently the state-of-the-art and Citovsky et al.
(2021) have already demonstrated that it outperforms C ORESET on large-scale settings.
For our approximate version of
CM, we partition the ≈ 1 .
1 M images into buckets of size 10 , 000 and run HAC clustering in each bucket.
We stop when the number of generated clusters reaches 500 .
This leads to 56 , 000 clusters total, after which we apply the CM algorithm in its usual way.
D. B EYOND T EST A CCURACY & C OMPARISON TO G REEDY
We investigate the performance of the student model beyond the ﬁnal reported test accuracy and verify the validity our problem formulation.
In particular, we question (i) whether our method also leads to improved student accuracy across all epochs during training and (ii) whether it actually achieves a higher gain with respect to the robust distillation formulation ((4), Sec. 3) compared to using the (greedy) S TANDARD M ARGIN algorithm that simply picks the highest gain points and
U NIFORM sampling.
To this end, we conduct evaluations on CIFAR10, CIFAR100, and SVHN data sets similar to those in Sec. 4, and additionally report the test accuracy over each epoch for the last knowledge distillation iteration and the realized gain over the active distillation iterations.
Fig.
5 summarizes the results of our experiments for various knowledge distillation conﬁgurations.
From the ﬁgures, we observe that our approach simultaneously achieves a higher ﬁnal test accuracy (ﬁrst column) and generally higher test accuracy over the entire training trajectory (second column).
This suggests that the improvements we obtain from our approach are consistent and present regardless of when the student training is terminated.
In the third column of Fig.
5, we also observe that our approach achieves the highest realized gain among the evaluated methods and that this gain tends to be a good predictor of the method’s performance.
This sheds light into why the greedy variant (S TANDARD M ARGIN ) that simply picks the points with the lowest margin (highest gain) is not consistently successful in practice: the high gain points are often mislabeled by the teacher, further confusing the student.
This further motivates our robust formulation in Sec. 3 and supports its practicality.
D. A PPLYING RAD TO S TANDARD A CTIVE L EARNING
Here, we demonstrate the applicability of RAD to standard active learning settings and compare its performance to SOTA strategies.
This is motivated by recent work that has demonstrated that selecting the most difﬁcult or informative – with respect to a proxy metric – samples may in fact hinder training of the model (Paul et al., 2022; 2021).
For example, on CIFAR10, choosing the most difﬁcult instances was observed to hurt training, and the best strategy was found to be one where moderately difﬁcult points were picked (Paul et al., 2022; 2021).
This is method of sampling is reminiscent of the sampling probabilities generated by RAD as depicted in Fig.
The results of the experiments are shown in Fig.
R AD matches or improves on the performance of state-of-the-art techniques.
The results of the active learning experiments are shown in Fig.
Since there is no teacher model involved, we instantiate RAD with m = 0 .
05 n for the number of teacher mistakes.
This is based on the empirical studies showing that around 5% of the data points are inherently too difﬁcult (Paul et al., 2022; 2021) or outliers which may impair training.
Setting the appropriate value for m when applying RAD to the standard active learning setting remains an open question, and is an interesting direction for future work.
The results in Fig.
6 show that RAD is competitive with state-of-the-art active learning algorithms in the evaluated scenarios and matches or improves the performance of the best-performing active learning technique.
We emphasize that, in contrast to existing clustering-based approaches such as CM or Coreset, RAD achieves this performance in a computationally-efﬁcient and fully parameter-free way for a given m .
D. R OBUSTNESS TO THE C HOICE OF w
In this subsection, we evaluate the robustness of RAD by evaluating the performance of the algorithm with various instantiations for the w parameter on a wide range of distillation scenarios spanning
CIFAR10, CIFAR100, and SVHN datasets and various resnet student-teacher architectures.
The results of experiments comparing RAD with the default setting of w = 1 − m/n as described in
Sec.
(Ours) to RAD variants with w ∈ { 0 . 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 1 . 0 } are shown in Fig.
The results were averaged over 5 trials.
As we can see from the ﬁgure, the performance of RAD remains relatively consistent (generally within one standard deviation) over varying choices of w .
Moreover, the theoretically-derived choice of w = 1 − m/n consistently performs well across the evaluated scenarios – it is always within one standard deviation of the best-performing w for each scenario.
D. R OBUSTNESS TO THE C HOICE OF G AIN
In our empirical evaluations, we had so far only considered a speciﬁc deﬁnition of gains with respect to the student’s margin as described in Sec.
3, i.e., g i = 1 − margin i .
Since RAD can generally be used with any user-speciﬁed notion of gain, in this section we investigate the performance of RAD when the entropy of the student’s softmax prediction f student ( x i ) ∈ [0 , 1] k is used to deﬁne the gains, i.e.,
[Equation]
We label this algorithm RAD E NTROPY and compare its performance to our variant that uses the student margins.
Fig.
8 shows the results of our comparisons with varying distillation conﬁgurations, architectures, and data sets averaged over 5 trials.
Overall, we observe that the change in the deﬁnition of gain does not lead to a signiﬁcant change ( > one standard deviation) in performance.
D. R OBUSTNESS TO V ARYING C ONFIGURATIONS
In this section, we consider the robustness of our algorithm to varying conﬁgurations on a ﬁxed data set .
In particular, we consider the SVHN (Netzer et al., 2011)
data set and consider the performance with varying size of the student model (ResNetv2-{11, 20, 29}), the size of the teacher (ResNetv2-{56, 110}), | A | ∈ { 5000 , 10000 , 20000 } , b ∈ { 1000 , 2000 , 5000 } , and number of epochs e = { 100 , 200 } .
Due to resource constraints, we conduct the extensive comparisons against the top-2 best performing algorithms from the main body of the paper (Sec. 4): (S TANDARD )
M ARGIN and U NIFORM .
The results of the evaluations show that our method uniformly performs better or at least as well as well as the competing approaches.
D. E XPERIMENTS WITH P RE - TRAINED T EACHER M ODELS
In this section, we present evaluations with ResNet50 and ResNet101 teacher models that are pretrained on ImageNet and ﬁne-tuned on the labeled data that is available for the academic data sets we consider.
Fig.
17 depicts the results of our evaluations on CIFAR100 and SVHN datasets.
Consistent with the trend of our results in Sec. 4, RAD uniformly outperforms or matches the performance of the best performing comparison method across all scenarios.
D. NLP E VALUATIONS
We conclude the supplementary results by presenting evaluations on a Natural Language Processing (NLP) task on the IMDB Reviews (Maas et al., 2011) dataset with a pretrained BERT teacher model.
The IMDB dataset has 25,000 training and 25,000 testing data points, where each data point is a movie review.
The task is to classify each review as either positive or negative.
We used a pre-trained, 12-layer SmallBERT (Turc et al., 2019) with hidden dimension 768 as the teacher model and a randomly initialized 2-layer SmallBERT with hidden dimension 128 as the student.
From Fig.we that the improved effectiveness of RAD relative to the compared approaches persists on the NLP task, consistent with our evaluations on the vision datasets.
RAD is particularly effective in the small sample regime, where the number of soft-labeled points is small relative to the size of the unlabeled dataset.