Patient Knowledge Distillation for BERT Model Compression
Paper · 2019 · Siqi Sun, Yu Cheng, Zhe Gan et al.
Summary
A pretrained BERT encoder can be adapted to recognize a paraphrase or judge whether a passage supports an answer. Even when the task calls for a simple decision, the encoder still runs through its full stack of layers. Patient Knowledge Distillation asks how much of that stack a smaller network can give up and still perform the task well. The authors start with a teacher already adapted to the task and train a shallower student. The student learns from the annotated answers, the probabilities the teacher assigns to possible answers, and selected representations from inside the teacher.
The added supervision concerns the hidden state of [CLS], the special input token whose final representation feeds BERT’s classifier. At selected layers, the authors scale the teacher’s and student’s [CLS] vectors to unit length and penalize the distance between them. PKD-Last takes its targets from layers near the teacher’s output. PKD-Skip chooses layers at intervals through the stack. Both preserve the usual distillation objective, which gives the student information about the teacher’s preferences across answers. The hidden targets add guidance about what the student should compute along the way.
The main experiments use a BERT-Base teacher with 12 layers and students with 6 or 3. On the GLUE test server, patient distillation usually improves on direct fine-tuning and distillation from predictions alone. The Microsoft Research Paraphrase Corpus, or MRPC, is the exception singled out by the authors. PKD-Skip fares slightly better overall than PKD-Last in their comparison. On the RACE reading-comprehension test, adding patient supervision gives a reported improvement of 1.6% beyond ordinary distillation for the 6-layer student. The paper omits the 3-layer RACE scores because that student trails the teacher by a large margin.
Shallower students also take less time to run. In a batched GPU experiment on QNLI training examples, the authors report inference speedups of 1.94 times for 6 layers and 3.73 times for 3 layers relative to the full encoder. They report memory savings of 1.64 and 2.4 times, respectively. The embeddings are shared across depths, so the reduction comes from the Transformer stack. Experiments with BERT-Large also show that increasing teacher size brings mixed results for a fixed student. The paper’s strongest finding is that supervision from inside compatible BERT encoders can help a cheaper student retain more task performance than it would learn from final predictions alone.
Deep dive: Patient Knowledge Distillation for BERT Model Compression
Patient Knowledge Distillation trains a smaller BERT to imitate a larger network’s predictions and hidden layers, preserving much of its task accuracy. · about 37 minutes to read
The problem and its context
What a downstream task inherits from pretraining
The paper starts from the success of reuse. A large encoder can learn from text without requiring the labels of a particular application. The resulting weights then give the application a starting point. A sentiment classifier can adapt those weights to its annotations, while an inference system can start from the same weights and adapt them to judgments about relationships between sentences. Each application gains access to computations learned before its own labeled examples enter training.
Using those computations carries a cost. BERT-Base has 12 Transformer layers and 110 million parameters. BERT-Large increases those figures to 24 layers and 330 million parameters. The introduction illustrates the size of the initial investment by noting that training BERT-Base from scratch usually takes four days using between 4 and 16 Cloud TPUs. It also says that an epoch of task adaptation can take several hours. The paper treats access to pretrained weights and the cost of using the resulting architecture as distinct practical issues.
The expense matters at inference as well as during adaptation. A task with a small output space can make an expensive computation on every input. Predicting sentiment, for instance, ultimately requires choosing between positive and negative, but the classifier receives its input only after the encoder processes the review. The size of the answer space gives little guidance about how many stages of contextual processing are necessary to produce a good answer.
This sets up two parts of the research problem. The architectural part is to choose a cheaper network, here by giving it fewer blocks. The learning part is to recover as much task performance as possible with that reduced depth. Discarding layers specifies the architecture, while the training objective determines which aspects of the full network’s behavior the remaining layers are encouraged to recover. The paper investigates the second part through a comparison of different sources of supervision for a shallow student.
Two ways of using language representations
The authors organize the earlier pretraining literature around how downstream systems use what has been learned. Feature-based work provides representations that can be used in a task system. Some methods give a word a representation independent of its context, as in word2vec, GloVe, and FastText. The paper also identifies work that learns representations for whole sentences and work that gives the same word different representations depending on its surroundings.
The authors use ELMo to illustrate the contextual feature approach. A bidirectional language system supplies vectors that can be used in a downstream system for natural-language understanding. The important distinction is where adaptation takes place. A task can consume learned features, or it can take over the pretrained encoder and adjust its parameters for the labeled problem.
The paper puts GPT and BERT in the adaptation tradition. It describes BERT’s pretraining in terms of masked language modeling and predicting whether one sentence follows another. The former trains the encoder to recover missing text from context. The latter gives it a prediction problem involving a pair of sentences. The authors cite GLUE and SQuAD as examples of benchmarks on which this kind of pretraining supports downstream performance.
BERT’s blocks come from the architecture introduced in Attention Is All You Need. The stack provides a natural axis for compression because depth is a property the authors can vary explicitly. It also provides a set of intermediate states that can be observed while the encoder processes an example. The same architecture that motivates removing computation therefore offers additional information about what the removed computation was doing on the training inputs.
Compression and transfer before Patient-KD
The prior work discussed in the paper offers several ways to exploit redundancy in a trained network. Pruning removes or sparsifies connections. Quantization restricts the possible values of the weights so that lower-bit representations become available. The authors point out that much of the earlier work they review concerns convolutional networks. They also cite stochastic depth in their discussion of efforts to reduce training time. Patient-KD addresses a specific transfer problem within this broader study of efficiency. It constructs a shallower BERT and specifies what that architecture should learn from a larger one.
The ordinary distillation baseline comes from Distilling the Knowledge in a Neural Network. A trained teacher provides a distribution over possible predictions, and the student learns to approximate it. The distribution gives information that an annotation by itself leaves unspecified. On an inference example labeled entailment, the annotation identifies the correct class. The teacher can additionally express whether the example looks closer to neutral or to contradiction. From the student’s point of view, those graded preferences are part of the training target even when both alternatives lose to entailment.
There was also a precedent for looking inside a teacher. FitNets used intermediate representations as hints for training a compact network. The authors discuss other forms of transfer, including using an existing network to help construct a deeper or wider one, teaching a single network from an ensemble, and applying distillation to multilingual translation. These examples establish that a teacher can serve several purposes. In this paper the recipient is a shallow BERT, and the main design choice is how to draw supervision from several depths of a task-adapted teacher.
That design choice follows from a distinction between an answer and the computation that supports it. An output distribution describes the task decision. Internal representations retain more coordinates than are visible in that distribution and can vary even when two examples elicit similar probabilities. The authors ask whether giving the student access to some of those representations helps it learn a useful sequence of transformations with fewer stages available. The comparison between upper and spaced layers makes the location of those teaching signals an experimental question.
The method, step by step
What the student sees for each example
The teacher first learns the downstream task from its labeled examples. The authors then use it to produce targets for a compact encoder that sees the same inputs. For a sentence-pair task, the gold label names the annotated relationship. The teacher’s final scores supply preferences among the allowable relationships. Its intermediate states supply vectors for selected student layers to approximate. All three signals refer to the same example, and the student is optimized against them together.
To see the roles of the signals, consider a premise and hypothesis in an inference task. As the teacher processes the pair, each layer updates a hidden vector at the [CLS] position. The classifier uses the final [CLS] vector to assign scores to the possible labels. In ordinary distillation, the vector’s effect reaches the student through those scores. Patient-KD also compares particular earlier teacher vectors with particular student vectors. The label still tells the student which answer the dataset records, even on examples where the teacher puts its highest probability elsewhere.
The layer pairings specify positions in the two stacks. The first matched student layer takes the first selected teacher layer as its target, and the remaining matches follow the same ordering. During training, a student layer produces its own vector from the input and preceding student computations. The teacher vector enters the loss as a target for that computation. This arrangement leaves the compact encoder able to process new examples on its own once training is complete.
Training a student with Patient Knowledge Distillation
The steps in order.
The encoder and the task classifier
The authors frame distillation as learning a second function for the same task input. The following notation identifies the two parameter sets.
f(x; θ) → g(x; θ′)
Here x is the input, f is the teacher function with parameters θ, and g is the student function with parameters θ′. The arrow indicates the direction of transfer. For a given task, the intended result is that the shallow student can make the same kind of prediction as the deeper teacher while requiring less computation.
For classification, the task head acts on a contextual vector. The paper first writes that vector for an individual example.
hᵢ = BERT(xᵢ) ∈ ℝᵈ
The index i identifies a training example and xᵢ is its input. BERT means applying the encoder to that input. Its output for the classifier is hᵢ, the contextual vector at the final [CLS] position. ℝᵈ is the space of real vectors with d coordinates, and ∈ states that the output belongs to that space.
The classifier maps the vector to a distribution across the task’s classes.
ŷᵢ = P(yᵢ | xᵢ) = softmax(W hᵢ)
Here ŷᵢ is the vector of predicted probabilities for input xᵢ. The notation P(yᵢ | xᵢ) denotes a distribution over the label for the given input, with the vertical bar read as “given.” When yᵢ appears in a supervised loss, it refers to the example’s recorded label. The trainable matrix W maps hᵢ to logits, the scores before probability normalization. softmax turns those scores into probabilities across the available answers.
A useful distinction in the equations is between the vector that represents the input and the scores that a specific classifier reads from it. The [CLS] vector can contribute to several class scores at once, and the probabilities reflect their relative values. When patient supervision is added, it acts on vectors at recorded layer positions. The final distribution still has a separate role in training.
Preparing the teacher and its soft labels
The primary teacher starts as pretrained BERT-Base. The paper describes adapting it by minimizing supervised cross-entropy across the training examples of the target task.
θ̂ᵗ = argminθ ∑ᵢ∈[N] L_CEᵗ(xᵢ, yᵢ; [θ_BERT₁₂, W])
θ̂ᵗ denotes the fitted teacher parameters, with t identifying the teacher. argminθ means choosing the parameters θ that minimize the following objective. ∑ᵢ∈[N] sums over the training examples, where N is the number of examples and [N] is their index set. L_CEᵗ is the teacher’s cross-entropy loss for input xᵢ and recorded label yᵢ. The bracketed parameters include θ_BERT₁₂, the weights of the 12-layer encoder, and W, the classification matrix.
Cross-entropy on the annotated answers rewards assigning high probability to the recorded class. The authors prepare the teacher separately for each task, so its classifier and adapted encoder reflect that task’s supervision. The fitted teacher then provides fixed targets during student training. As the student changes its parameters, the distribution it is trying to reproduce for a given training input remains the teacher’s.
The teacher’s probabilities for distillation are obtained by scaling the logits before applying softmax.
ŷᵢ = Pᵗ(yᵢ | xᵢ) = softmax(W hᵢ / T) = softmax(W · BERT₁₂(xᵢ; θ̂ᵗ) / T)
ŷᵢ is now the teacher’s soft label, and Pᵗ(yᵢ | xᵢ) is its conditional distribution over the classes. T is the distillation temperature. The product W hᵢ gives the logits, with hᵢ supplied by BERT₁₂, the fitted teacher encoder evaluated on xᵢ. The last expression writes that encoder call explicitly, using the fitted weights θ̂ᵗ. The dot denotes multiplication by the classifier matrix.
A higher temperature reduces the contrast among the scaled scores and gives lower-ranked classes more visible probability. The ordering of the scores is preserved under the positive temperatures used in the experiments. Temperature therefore changes the strength of the preferences the student sees while keeping the teacher’s preferred class. A soft label refers to the whole probability vector, so the student can learn about alternatives on examples where the teacher and the annotation agree on the best answer.
The paper also raises the possibility of obtaining teacher predictions for additional unannotated inputs. The procedure evaluated here starts with the target datasets and their labels. The teacher’s output adds information on those examples, and the experimental comparisons concern the value of the signals provided during training on those tasks.
The two losses in ordinary distillation
The first student loss compares predicted probabilities with the teacher’s soft target. It is a cross-entropy with a probability weight for every class.
L_DS = −∑ᵢ∈[N] ∑c∈C Pᵗ(yᵢ = c | xᵢ; θ̂ᵗ) · log Pˢ(yᵢ = c | xᵢ; θˢ)
L_DS is the prediction distillation loss. The outer sum ranges over the training examples indexed by i in [N], and the inner sum ranges over each class c in the set C. Pᵗ(yᵢ = c | xᵢ; θ̂ᵗ) is the probability the fitted teacher gives to class c for xᵢ. Pˢ is the corresponding student distribution and θˢ is the student’s trainable parameter set. log takes the logarithm of the student probability. Each summand multiplies that value by the teacher’s probability for the same answer, and the leading minus sign gives the cross-entropy convention.
The student can improve this objective by bringing its distribution into agreement with the teacher’s across classes. Agreement on the most likely label can coexist with a sizeable penalty if the student allocates too little probability to alternatives favored by the teacher. Distillation therefore carries information beyond a list of the teacher’s predicted labels.
The second loss trains the student directly against the annotation.
L_CEˢ = −∑ᵢ∈[N] ∑c∈C 𝟙[yᵢ = c] · log Pˢ(yᵢ = c | xᵢ; θˢ)
L_CEˢ denotes the supervised cross-entropy for the student. The sums run over examples i in [N] and classes c in C. 𝟙[yᵢ = c] is an indicator that selects the recorded label yᵢ for input xᵢ. The logarithm and leading minus sign have the same roles as before, and Pˢ is again evaluated under student parameters θˢ. Only the annotated class contributes for each example.
The two losses can exert different pressure when the teacher is uncertain or mistaken. The annotation term prefers confidence in the recorded class. The prediction term asks the student to reflect the teacher’s judgment across alternatives. The ordinary distillation baseline gives these contributions complementary weights.
L_KD = (1 − α) L_CEˢ + α L_DS
L_KD is the ordinary knowledge distillation objective, L_CEˢ is the annotation loss, and L_DS is the soft-label loss. The hyper-parameter α weights the soft-label loss, and 1 − α is the remaining weight on the annotation loss. Increasing α shifts the objective towards the teacher distribution. The authors vary α and T separately because the weight of distillation and the concentration of its targets are different choices.
Choosing a representation and matching layers
Each layer of the encoder produces a state at every input position. The authors focus on [CLS] because the classification head already depends on its final state. They describe matching every token state as computationally expensive and suggest that supervising all those positions could also introduce noise. Selecting [CLS] gives one vector at each chosen layer for an input sequence, or for each candidate sequence in the reading-comprehension setup.
The paper motivates this choice by describing a possible classifier input that combines [CLS] states from several layers. It points to SDNet as an example of using a weighted combination.
h_final = ∑ⱼ∈[k] wⱼ hⱼ
h_final is the combined vector, j indexes the hidden layers, and [k] is their index set for an encoder with k layers. hⱼ is the [CLS] vector from layer j. Its contribution is multiplied by wⱼ, a weight that could be learned or set in advance. The sum combines the layers’ weighted vectors. This expression explains why intermediate [CLS] states might matter to prediction. The Patient-KD loss uses them as separate targets rather than implementing this combination as the experimental task head.
To describe all the potential targets for a given input, the paper uses a layer-by-feature array.
hᵢ = [hᵢ,₁, hᵢ,₂, …, hᵢ,ₖ] = BERTₖ(xᵢ) ∈ ℝᵏˣᵈ
Here hᵢ denotes the array of [CLS] vectors for instance i, while hᵢ,ⱼ is the vector for a particular layer j. The ellipsis represents the intervening layer positions. BERTₖ is BERT with k layers, applied to xᵢ. ℝᵏˣᵈ denotes a real array with one axis for the k layers and another for the d coordinates per layer. This use of hᵢ covers the whole stack. In the classification equation the same symbol named only the final vector.
The two variants select different positions from the teacher’s array. The paper gives a concrete mapping for BERT with 12 teacher layers and 6 student layers. With PKD-Skip, the teacher positions are as follows.
I_pt = {2,4,6,8,10}
I_pt denotes the selected teacher layers. The entries give their order of use, starting with teacher layer 2 as the target for the first student layer being matched. The other intermediate student layers take their targets from progressively deeper positions at the same spacing.
For PKD-Last, the teacher positions in that same pairing are these.
I_pt = {7,8,9,10,11}
I_pt again denotes the selected teacher layers, now consecutive and close to the output. Teacher layer 7 supplies the first target in this arrangement. The sequences have the same length, so the comparison changes which depths provide guidance while preserving the number of intermediate matches.
The text states the matching count using the student depth.
k = n − 1
In this rule, n is the number of student layers and k is the number of intermediate matches. This is a different use of k from its earlier role as the depth of an encoder whose entire stack is being described. For the 6-layer student, the paper therefore specifies 5 intermediate matches. Teacher layer 12 is excluded from the hidden-state mapping because the teacher’s final prediction already enters the ordinary distillation loss. The explicit lists give the mapping even though the architecture caption describes the Last arrangement more broadly.
Comparing states and combining objectives
The patient term measures the squared distance between the normalized vectors at paired positions. As printed, the loss sums over examples and layers.
L_PT = ∑ᵢ₌₁ᴺ ∑ⱼ₌₁ᴹ ‖hˢᵢ,ⱼ / ‖hˢᵢ,ⱼ‖₂ − hᵗᵢ,I_pt(j) / ‖hᵗᵢ,I_pt(j)‖₂‖₂²
L_PT is the patient loss. The example index i ranges over the N training inputs. The index j refers to a student layer, and M is the upper limit of that sum. The superscripts s and t identify student and teacher states. The student state hˢᵢ,ⱼ is the [CLS] vector at layer j for example i. The teacher state hᵗᵢ,I_pt(j) is its counterpart from the layer assigned by I_pt(j). The inner ‖·‖₂ expressions give the Euclidean lengths of the vectors, which are used as divisors. The outer ‖·‖₂² gives the squared Euclidean length of the difference. The paper describes M as the number of student layers, although its matching rule and examples supply targets for the intermediate layers only. In the explicit mappings, the final student layer has no corresponding entry in I_pt.
Unit-length normalization makes the loss respond to the direction of each vector. For example, positive rescaling of a vector is removed by dividing by its length. Agreement under this loss can therefore coexist with different original magnitudes. Direct subtraction assumes equal numbers of coordinates in the teacher and student states. The authors encounter that requirement when they pair a BERT-Large teacher with a student built from BERT-Base blocks.
The patient loss supplements the output objective.
L_PKD = (1 − α) L_CEˢ + α L_DS + β L_PT
L_PKD is the full Patient-KD objective. L_CEˢ penalizes errors against annotations, L_DS measures prediction imitation, and L_PT measures disagreement at the matched [CLS] states. α sets the balance within the original distillation objective. The added hyper-parameter β scales the intermediate supervision. Its coefficient is separate from the weights on the prediction terms, so the strength of the hidden-state pressure can be varied while those terms retain the same balance.
In this setup, “patient” describes the use of multiple places along the teacher’s computation. The specified objective combines their losses during training. PKD-Last and PKD-Skip differ in which teacher states enter that objective. The practical question is whether those extra constraints allow the student to learn a more useful solution than the same shallow architecture can find from labels and output probabilities.
Initialization, search, and the reading-comprehension input
The main students use 3 or 6 Transformer blocks. Their initial block weights come from the corresponding first layers of pretrained BERT-Base. Earlier pretrained layers supply the starting point for optimization, while the separately fine-tuned teacher supplies the targets for distillation. As a result, even the first student layer can begin with weights from an early pretrained block and later be trained to approximate a state much deeper in the task-adapted teacher. The authors obtain the starting weights from Google’s official BERT repository and name PKD-for-BERT-Model-Compression as the repository for their own implementation.
The authors set the number of hidden units for the final classifier to 768, use batches of 32, and train for 4 epochs in the stated setup. The learning-rate candidates are 5e-5, 2e-5, and 1e-5. For direct adaptation, there is no teacher term to tune. For vanilla distillation, the grid also includes temperatures of 5, 10, and 20, and values of α of 0.2, 0.5, and 0.7.
Patient-KD adds the search over β, with candidates 10, 100, 500, and 1000. The authors carry forward the T and α values selected in vanilla distillation, then search over the learning rate and the new coefficient. In each setting, validation accuracy determines which run to select. This lets the study build on the ordinary distillation experiment without searching every combination afresh. It also defines what the final comparison represents: the patient objective tuned in the neighborhood of an output-distillation setup selected on the same task.
For RACE, the task output is a choice among candidate answers to a passage question. The paper represents the encoder input for a candidate as follows.
[CLS] P [SEP] q + aᵢ [SEP]
P is the passage, q is the question, and aᵢ is the candidate answer indexed by i. Here + means concatenation of the question and candidate answer. [CLS] marks the position used for the sequence representation, and [SEP] separates or closes input segments. The encoder processes a sequence of this form for each candidate. Each produces a logit, and softmax across the four candidates gives the probabilities used by the task loss. The same question and passage appear in each candidate input, while the proposed answer changes. This gives the teacher and student a shared prediction space for distillation even though the inputs are constructed differently from the GLUE sentence and sentence-pair examples.
Experiments and results
The tasks and their evaluation splits
The experiments cover sentiment classification, paraphrase matching, natural-language inference, and multiple-choice reading comprehension. In the GLUE portion, the authors treat each task as single-input or paired-input classification and fine-tune it independently. This keeps the basic classifier arrangement consistent across tasks whose labels have very different meanings. Predictions for the official test comparisons are submitted to the GLUE evaluation server. Development data are used to select training settings and to examine behavior during optimization.
For sentiment, the evaluation uses SST-2 from the Stanford Sentiment Treebank. Its inputs come from movie reviews, and each annotation identifies positive or negative sentiment. A system assigns a label to an individual review input. By contrast, the paraphrase tasks require it to judge a relationship between two inputs. The Microsoft Research Paraphrase Corpus pairs sentences and asks whether their meanings are equivalent. Quora Question Pairs, or QQP, asks whether two questions are duplicates. The authors identify Quora’s Question Pairs release as the source for QQP.
The Multi-Genre Natural Language Inference corpus, abbreviated MNLI, presents a premise and a hypothesis. The task is to classify their relationship as entailment, contradiction, or neutral. Its matched and mismatched partitions are reported as MNLI-m and MNLI-mm, respectively. Matched evaluation concerns domains represented in training. Mismatched evaluation uses other domains. Both serve the same prediction problem, so scores on the two splits can show whether a pattern survives a change in domain within that task.
QNLI is derived from SQuAD and framed as an entailment-style classification decision about a question and a candidate answer. Its inputs originate in reading comprehension, while the evaluated output is a label for the pair. RTE, or Recognizing Textual Entailment, brings together examples from textual-entailment challenges in GLUE. These tasks share a broad interest in whether one text supports another, but each gets its own teacher and student training. The study does not pool their labels to train one shared classifier.
RACE asks for the correct answer to a question about a passage. The corpus contains 25,137 passages and 87,866 questions drawn from English examinations. In the paper’s format, every question offers four candidates and has one correct choice. RACE-M contains material from middle-school examinations, and RACE-H contains material from high-school examinations. The evaluation compares predicted choices with the correct answers, with results presented on the RACE test set. The candidate format makes the task distinct from the question-and-answer relation classified in QNLI.
The metrics also serve different parts of the study. Validation accuracy is the stated selection criterion, and accuracy is the metric plotted over training on QNLI and MNLI. The MRPC follow-up gives mean development accuracy. The main GLUE reporting uses benchmark test results, for which the prose supplies selected score changes and gaps. The RACE discussion similarly gives performance improvements between methods. Those changes describe comparisons on the indicated splits. They do not supply the absolute score of each contestant.
What the comparison systems control
The authors train compact students of the same depth under different supervision. In the direct fine-tuning condition, abbreviated FT, the shallow encoder learns from task labels. Vanilla KD adds the distribution supplied by the task-adapted teacher. Patient-KD adds the intermediate [CLS] comparisons to the ordinary distillation objective. Thus there are two useful baselines for interpreting an improvement. The first establishes what the shallow pretrained initialization and labeled data achieve together. The second establishes what can already be gained from access to the teacher’s final predictions.
The full BERT-Base encoder serves as a separate reference point. The paper distinguishes its own BERT-Base teacher from Google’s submission in the GLUE comparison, and from the BERT-Base leaderboard result used for RACE. The authors’ teacher is the relevant reference for a transfer gap because it is the network that actually supplies targets. A leaderboard entry gives another benchmark score, but its predictions and hidden states are outside the training procedure.
Score differences between compact students and their teacher also answer a different question from differences between compact training methods. A student can improve meaningfully over the other shallow systems and still lag behind the full teacher. Conversely, if output-only distillation already captures most of the teacher’s performance on a task, the remaining margin for the hidden loss is small. The paper uses both comparisons to judge whether a change in supervision helps and how much predictive performance survives depth reduction.
GLUE test results
On the GLUE test comparisons, the authors report that PKD-Skip generally gives the best results among the compact training methods at both student depths, with MRPC as the main exception. The paper highlights the 6-layer student on MNLI. Its test result improves on direct fine-tuning by 1.1% on MNLI-m and 1.3% on MNLI-mm. These are reported improvements over FT for the same shallow architecture. The appearance of gains on both splits shows that the advantage in this comparison is present on the in-domain and cross-domain portions of MNLI.
The authors also identify QNLI and QQP as cases where the vanilla 6-layer student is already fairly close to the teacher. PKD-Skip improves the test results over each compact baseline on these tasks and brings the student closer to the teacher. This is a useful comparison for the proposed loss because the simpler teacher signal already works there. The extra supervision has to improve on an effective strategy, rather than merely rescue a student that was poorly trained from the labels.
The paper reports specific gaps between its 6-layer patient student and its BERT-Base teacher. On the GLUE test results for SST-2 and QQP, the gaps are -2.3% and -0.1%, respectively. For MNLI-m and MNLI-mm, they are -2.2% and -1.8%. The corresponding QNLI gap is -1.4%. These figures retain the direction of the comparison. The student scores below the teacher in each cited case, with the reported QQP gap particularly small.
The authors describe these scores as comparable to the teacher in 5 tasks out of 7 in the GLUE reporting, where both MNLI partitions are counted. They also note that each of these reported cases has more than 60k training examples. That observation concerns where the closest results occur in this evaluation. The tasks and partitions differ in what they measure, and the two MNLI results draw on the same task rather than independent variations in the amount of training data.
QQP is the case the paper highlights for the 3-layer student. Applying patient distillation at that depth still gives performance described as close to the full teacher. This is the most aggressive depth reduction discussed favorably in the main results. The paper gives a contrasting outcome for RACE at the same depth, so the QQP finding is best read as a result for that task’s duplicate-question judgments under the tested setup.
RACE test results
The reading-comprehension comparison uses the 6-layer student. Ordinary distillation improves RACE test performance by a reported 4.42% over direct fine-tuning. Adding patient supervision yields a further reported lift of 1.6% over ordinary distillation. These numbers are changes between methods on the RACE test comparison. The discussion gives them as improvements, without identifying them as separate absolute accuracies for the middle-school and high-school portions.
The order of comparisons matters here. A candidate distribution from the teacher can express how plausible the other answers look for the same passage and question. That distribution already helps in the output-only condition. The further gain with patient supervision shows that target states from within the teacher can add value in a multiple-choice setup as well as in the benchmark’s sentence classification tasks. The result compares teaching methods for a student of a specified depth.
The authors leave the 3-layer RACE results out of their table because of the large gap between that student and the teacher. The omission establishes that the authors encountered a substantially less satisfactory compression case on this task. Its size is unspecified in the discussion. Together with QQP, it places a boundary on how broadly to read the positive results for the smallest student.
The MRPC result changes with the split
On the GLUE test comparison, MRPC is the case for which the authors report vanilla distillation ahead of their method. They investigate by repeating the experiments three times and averaging development accuracy. Direct fine-tuning gives 82.23%, vanilla KD gives 82.84%, and Patient-KD gives 83.46% on that development set.
MRPC mean development accuracy by training method
The patient student has the highest repeated-run mean on the development set.
The numbers
| System or setting | accuracy % |
|---|---|
| Direct fine-tuning | 82.23 |
| Vanilla knowledge distillation | 82.84 |
| Patient-KD (this paper) | 83.46 |
The means establish that the favorable development comparison is visible across the repeated experiments in aggregate. The test ordering remains a separate result. The authors suspect that with a small training set the patient method can perform well under development evaluation while generalizing less reliably to the test data. Because validation accuracy also drives selection, the development and test comparisons deserve to be read with their distinct roles in mind. The dev means alone give no estimate of how large the variation is from one training run to another.
Parameters, memory, and inference
The smaller encoders retain the embedding layer. The efficiency discussion describes that layer as having 24 million parameters and mapping a 30k-word vocabulary into vectors with 768 coordinates. As the number of Transformer layers falls, the part of the parameter budget spent on embeddings stays in place. This explains why depth, parameter count, and memory do not fall in the same proportion. The paper also notes a softmax component with 0.6M parameters when explaining the totals in its parameter table.
For the Base-style architecture, the 6-layer student has 67.0 million parameters, compared with the full teacher’s 110 million. The authors report machine-memory savings of 1.64 times for the 6-layer architecture and 2.4 times for the 3-layer architecture. These figures concern the architectures described in the efficiency analysis. They need to be read separately from the timing results, in which the layers that account for the most parameters can have a different share of measured execution time.
The timing experiment runs inference on 105k inputs from the QNLI training split. The measurements use a single Titan RTX, a batch size of 128, a maximum sequence length of 128, and FP16, or half-precision floating point. Relative to the full encoder under this setup, the 6-layer architecture gives a reported speedup of 1.94 times, and the 3-layer architecture gives 3.73 times.
Inference speedup on QNLI training inputs relative to BERT-Base
The shallower student gives the greater speedup in the batched timing run.
The numbers
| System or setting | times |
|---|---|
| Patient student with 6 layers | 1.94 |
| Patient student with 3 layers (this paper) | 3.73 |
The authors describe inference speed as scaling nearly linearly with the depth reduction in this experiment. Their component timings put almost all the measured work in the Transformer blocks, with negligible time attributed to the embeddings. The retained embedding table therefore matters considerably to the parameter budget while contributing little to the measured runtime. The speedup is a property of running the shorter stack under these test conditions. The distillation experiment addresses how well that shorter stack can perform after training.
What the ablations show
How the choice of teacher layers affects the student
The PKD-Last and PKD-Skip comparison holds the 6-layer student architecture fixed and changes the location of the hidden targets. This probes a specific decision within Patient-KD. A practitioner could reasonably expect states nearer the teacher’s classifier to offer more relevant task information. Alternatively, states drawn along the teacher’s depth could give the learner a broader view of the processing that leads to the answer. The tested layouts put each of these intuitions into a concrete training configuration.
In the reported GLUE comparison, both arrangements improve over ordinary distillation overall, and PKD-Skip performs slightly better than PKD-Last. The authors propose that widely spaced layers may expose the student to a more varied set of representations. With late consecutive layers, the same example might yield more similar teaching signals at neighboring positions. This explanation would make the value of spaced targets depend on how the representations change across the teacher’s depth.
The experiment compares the downstream usefulness of the two mappings. It does not independently measure representational diversity, assign linguistic properties to layers, or locate a uniquely valuable lower layer. Several student-to-teacher pairings change together. The evidence supports the spaced arrangement as the stronger choice of the two in this setup and leaves the mechanism behind that advantage open.
What happens over the course of training
The authors also track accuracy on training and development examples for QNLI and MNLI. These runs use the BERT-Base teacher and a 6-layer student, with vanilla KD and PKD-Skip as the compared methods. The development curves level off sooner under ordinary distillation. PKD-Skip continues to improve over a longer portion of training and begins to plateau later.
This comparison adds a time dimension to the main result. Final benchmark scores show the outcome after choosing a student. Curves show when improvements on held-out examples stop accompanying continued training. The motivation for Patient-KD is that a student can learn to reproduce the output behavior seen in training while extracting too little that helps on development inputs. The later plateau is consistent with the intermediate target changing how much useful learning takes place after the early part of the run.
Overfitting is the authors’ hypothesis about the earlier saturation. The curves support a difference in development behavior, while leaving more than one explanation for it. An extra objective can favor different internal representations, change the path taken by optimization, or change how long that path continues to improve held-out scores. The paper measures the difference between the training methods. It does not isolate each of those possible consequences of the objective.
The MRPC analysis supplies a different kind of check. There the patient method continues to look favorable on the development means in spite of its poorer position relative to vanilla KD in the test comparison. The QNLI and MNLI curves therefore give evidence of useful development improvements on those tasks, while MRPC demonstrates why the final test comparison still matters. The two analyses concern different datasets and different aspects of generalization.
Changing the teacher while keeping a Base-style student
The larger-teacher study begins with the same 6-layer Base-style student and varies the source of output supervision. The BERT-Large teacher uses 24 layers. Its hidden vectors have a different size from those of the Base-style student. Because the patient loss directly subtracts two normalized vectors, the authors use vanilla KD for the Large-to-Base pairing. Predictions can still be compared because both networks return probabilities over the same task answers.
For the fixed Base-style student, teacher choice has mixed effects. In the reported comparison, the BERT-Base teacher gives the better result on SST-2, QQP, and QNLI. The BERT-Large teacher gives the better result on MNLI-m, MNLI-mm, and RTE. The overall change is described as small. These outcomes compare the students obtained from the two teachers. They show how the choice of source affects the compact learner, which is the quantity of interest for compression.
The authors suggest that distilling from a larger teacher may require more training examples and point to the MNLI results as consistent with that account. The comparison does not vary training set size within MNLI or within any other task. It also includes RTE among the favorable outcomes for the larger teacher, while the paper elsewhere calls attention to RTE’s small dataset. The observed pattern leaves room for task differences as well as data volume to influence which teacher is more useful.
Changing the blocks while keeping the Large teacher
The next comparison changes the shallow architecture. A Large-style student with 6 layers has 108.4 million parameters, whereas the Base-style student with that depth has 67.0 million. The paper puts each BERT-Large Transformer layer at 12.6 million parameters and describes the Large-style student as having 1.6 times as many parameters as the Base-style student. Its larger budget comes from changing the kind of block in the stack, while the number of blocks stays the same.
With vanilla distillation, the authors report that the Large-style student performs worse than the Base-style student used with BERT-Base. The proposed explanation concerns the reduction in depth the two students are asked to accommodate. The paper gives the Large pairing a ratio of 4:1 (24:6) and the Base pairing a ratio of 2:1 (12:6). More parameters per surviving layer may help with some computations, but the larger reduction removes more stages between the pretrained input representation and the teacher’s final decision.
The Large-style student also fares worse when compared with the Base-style student taught by the same BERT-Large teacher. That shared-teacher comparison makes it harder to explain the student ranking solely through differences in the teachers’ predictions. It leaves an important difference in how the students were prepared. They start from the earliest blocks of the pretrained network appropriate to each architecture. The authors suspect that the first six layers of the deeper BERT-Large encoder may provide a starting point with fewer of the higher-level features needed by a complete shallow encoder.
The design leaves those accounts entangled. In the comparison across teacher families, depth ratio, teacher, student width, and starting weights vary. With the Large teacher held fixed, the architecture and its initialization still vary together. A finding that the wider student performed worse is compatible with the proposed explanations, but the relative importance of initialization and structural compression remains unresolved.
Adding Patient-KD to the Large-style pairing
The final comparison adds PKD-Skip to the BERT-Large teacher and the Large-style student. Here the teacher and student states have compatible dimensions. Adding the hidden loss improves results on nearly every task in the comparison with vanilla KD. The same kind of supervision that helps with the Base-style pairing therefore also helps in another tested architecture family.
This last step answers a narrower question than whether a larger teacher produces a better compact encoder overall. It shows the benefit of changing the training signal within the Large-style pairing. The earlier comparisons establish that the selection of an architecture and its initialization can still leave that student behind another shallow architecture. The two observations together explain why the paper evaluates teacher choice, student construction, and the usefulness of the patient loss through separate comparisons.
Limitations
Limits and open questions identified by the authors
The authors identify initialization as an open issue. Their students begin with early pretrained blocks from deeper encoders. They would prefer to study compact architectures pretrained in their own right, but report that the computation required prevented them from doing so. They propose studying pretraining from scratch and exploring whether patient supervision could help during pretraining itself. The reported success therefore concerns students prepared through layer copying and then trained on downstream tasks.
They also acknowledge a compatibility limit in the state loss. A BERT-Large [CLS] vector and a Base-style student’s [CLS] vector have different widths. Their method supplies no common space into which the vectors can be moved before comparison, so the mismatched experiment uses output supervision alone. The favorable result for patient distillation with the Large teacher concerns a Large-style student whose vectors can be compared directly.
The authors regard the distance function as another choice worth investigating. Their experiments establish the usefulness of squared distance on normalized [CLS] states in the tested settings. They leave more elaborate distances to future work. The conclusion also names multitask learning and meta-learning as possible extensions. The reported tasks are trained individually, so the experiments concern teacher and student behavior within each task’s own objective.
Small training datasets are a concern in the authors’ interpretation. They connect the MRPC development–test discrepancy with possible overfitting and point to the substantial teacher–student gap on RTE. They also identify the large performance gap for the 3-layer RACE student. These cases qualify the description of a compact student maintaining teacher quality. The amount of depth that can be removed with a tolerable effect varies across the evaluated tasks.
The authors suggest possible applications to XLNet and RoBERTa in their discussion of large pretrained encoders. The experiments in the paper establish the findings for the BERT variants studied. Extension to another architecture would depend on defining comparable outputs and identifying suitable internal representations for its own teacher and student.
Limits visible in the experimental design
The paper’s evidence concerns task performance and selected state agreement. A penalty at the [CLS] position teaches a part of the computation that the classifier uses. It does not measure how closely the student recovers the teacher’s representations at other positions or whether the two rely on the same evidence for individual answers. For tasks with decisions over individual words, such as dependency parsing, the choice to supervise [CLS] would pose a different design problem. The paper also contains no evaluation on low-resource languages. A small labeled dataset in this evaluation says something about the supply of examples for a particular task and little directly about transfer across languages.
The relationship with dataset size is observational. The paper notices that several of the close-to-teacher results occur on tasks with more labeled examples. The same comparison also changes input domains, label distinctions, and task difficulty. In addition, the MNLI partitions vary the domain of evaluation using the same underlying training task. The results motivate the authors’ data-volume hypothesis, while a within-task comparison at different training sizes would be needed to estimate the effect of data quantity independently.
The role of validation introduces a further qualification. The candidate setting with the strongest validation accuracy is selected, and Patient-KD searches an additional weight unavailable to vanilla distillation. It inherits the best output-loss settings from vanilla KD instead of optimizing all settings jointly. The comparison shows what these training procedures produce with the paper’s specified searches. It cannot tell whether tuning all losses jointly would increase the gain, or whether another allocation of search effort would change the ordering. The MRPC repeats report means on one development split, without establishing how consistent the test ranking would be across repeated training runs.
Several parts of the method are clearer from the worked example than from notation alone. The loss’s description of M and the stated exclusion of the last layer give different readings of the upper limit unless the sum is understood to cover the intermediate matches. The explicit teacher-layer sequences explain the intended behavior for the main pairing. More broadly, the paper presents one squared-distance penalty with normalized vectors. The success of that configuration does not establish how sensitive the result is to normalization, to the number of matches, or to introducing a projection for unequal widths.
The efficiency experiment answers a deployment question under specific conditions. It measures batched inference on one accelerator with half precision and a stated input-length cap. It leaves single-request latency, execution on a CPU, and timing over other sequence lengths unmeasured. The reported parameter and memory figures describe the smaller networks, while runtime also depends on where those parameters are used in the inference computation. The finding that embedding time is negligible applies to the reported timing setup.
Finally, the paper’s timing figures concern running the trained encoder. Preparing a student involves adapting a teacher, producing its signals, optimizing the student, and selecting settings. Those steps use computation even though the resulting student runs a shorter stack. The evaluation does not provide an end-to-end cost comparison that adds all preparation to subsequent inference. The strongest efficiency claim is about the trained shallow architectures, paired with evidence that the patient objective can recover task performance within those architectures.
What came after
Which computation should a compact encoder learn?
TinyBERT takes up BERT distillation for natural-language understanding. It continues the part of Patient-KD’s research problem concerned with retaining language-understanding performance through teaching. Patient-KD frames that problem around task-adapted teachers and the choice of which layer states to imitate. TinyBERT’s stated focus places the broader problem of distilling BERT for understanding tasks at the center of a compact encoder.
MiniLM takes deep self-attention as the focus of task-agnostic compression. This brings a different internal object into view. Patient-KD matches the vector at a designated position after a selected block. Self-attention distillation instead foregrounds a computation within the blocks. The connection is the decision to teach from inside a pretrained Transformer, with the choice of internal target now expressed in terms of attention.
MiniLMv2 specifies multi-head self-attention relations as its distillation subject. Its focus continues the inquiry into what internal quantities a compact encoder should inherit. The progression from selected [CLS] states to attention relations changes the object of agreement. It also distinguishes the question of where to take a target from the question of what to measure at that location.
Preparing students and deciding when to spend computation
Well-Read Students Learn Better makes pretraining compact students its central concern. That subject follows directly from a question left open by Patient-KD’s initialization procedure. A shallow network that starts with early blocks from a deeper encoder inherits parameters learned as part of that deeper stack. Pretraining a compact network considers the student’s preparation as an object of study in its own right. This is the step the Patient-KD authors wanted to investigate when discussing the poorer results of their Large-style student.
MobileBERT sets the objective of a compact, task-agnostic BERT for devices with limited resources. This moves the design question towards a compact encoder intended for reuse across tasks. Patient-KD measures the result of preparing a teacher and student for each task independently. A task-agnostic objective brings the properties of the reusable compact encoder itself to the foreground.
FastBERT combines self-distillation with adaptive inference time. Its stated subject makes inference computation a quantity that can adapt during use. Patient-KD’s speed comparison concerns students with a fixed number of blocks. This later direction links teaching to a different efficiency problem, in which adaptation of the inference time is part of the method under study.
Train Large, Then Compress considers Transformer size in relation to both training and inference efficiency. The timing distinction in Patient-KD helps explain the scope of that question. Patient-KD measures the benefit of the completed shallow architecture and studies the supervision needed to obtain it. The larger training-and-inference question concerns the whole choice of where to use a large architecture and when to exchange it for a compact one.
Compression through other changes to the network
BERT-of-Theseus approaches compression through progressive module replacement. Patient-KD starts student training with a specified shallower stack and gives it targets from a separate teacher. Progressive replacement makes the transition between modules part of the compression procedure itself. The two works thus address different choices about how a smaller architecture comes to take over the work of a larger one.
TernaryBERT links distillation to ultra-low-bit BERT. Here teaching accompanies a change in numerical representation. That direction connects two strands which Patient-KD discusses separately in its context, learning from a teacher and reducing the number of bits needed to represent weights. It expands the compression question beyond choosing which depths of a full stack a student should approximate.
Block Pruning For Faster Transformers emphasizes pruning structured blocks with execution speed as the objective. Its concern with runtime connects to the component measurements in Patient-KD. Those measurements show why an architectural change can have a substantial effect on inference even when an unchanged component still accounts for considerable storage. Block pruning takes the organization of removable computation as the focus of compression.
These lines of work follow distinct questions raised by the shallow BERT experiments. Attention distillation changes the internal quantity used as a teaching signal. Compact pretraining changes how the recipient is prepared. Adaptive inference, module replacement, quantization, and pruning change how the computational savings are obtained. Patient-KD provides an early concrete case for studying these choices independently: the student’s final architecture determines how much computation it runs, while its training signals help determine how much task performance that architecture retains.
Institutions
Fields, topics and concepts
Shelves 5The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 worksComputer Vision and Pattern Recognition · 3,621 works
Topics 1Research subjects and languages the work is about.Efficient models & compression · 328 works
Cite
Cite as Siqi Sun, Yu Cheng, Zhe Gan and Jingjing Liu. 2019. Patient Knowledge Distillation for BERT Model Compression. arXiv:1908.09355.
@misc{sun2019patient,
title = {{Patient Knowledge Distillation for BERT Model Compression}},
author = {Siqi Sun, Yu Cheng, Zhe Gan and Jingjing Liu},
year = {2019},
doi = {10.48550/arxiv.1908.09355},
eprint = {1908.09355},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1908.09355}
}References
- Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. 2017. Enriching word vectors with subword information. TACL. our card
- Soravit Changpinyo, Mark Sandler, and Andrey Zhmoginov. 2017. The power of sparsity in convolutional neural networks. arXiv preprint arXiv:1702.06257. OpenAlex ↗ · Scholar ↗
- Tianqi Chen, Ian J. Goodfellow, and Jonathon Shlens. 2015. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641. our card
- Yu Cheng, Felix X. Yu, Rogerio S. Feris, Sanjiv Kumar, Alok Choudhary, and Shi-Fu Chang. 2015. An exploration of parameter redundancy in deep networks with circulant projections. In ICCV. OpenAlex ↗ · Scholar ↗
- Alexis Conneau, Douwe Kiela, Holger Schwenk, Loic Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. In EMNLP. our card
- Andrew M Dai and Quoc V Le. 2015. Semi-supervised sequence learning. In NIPS. our card
- Misha Denil, Babak Shakibi, Laurent Dinh, Marc'Aurelio Ranzato, and Nando de Freitas. 2013. Predicting parameters in deep learning. In NIPS. OpenAlex ↗ · Scholar ↗
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. our card
- William B Dolan and Chris Brockett. 2005. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing. our card
- Yunchao Gong, Liu Liu, Ming Yang, and Lubomir D. Bourdev. 2014. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115. OpenAlex ↗ · Scholar ↗
- Song Han, Huizi Mao, and William J Dally. 2016. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In ICLR. OpenAlex ↗ · Scholar ↗
- Song Han, Jeff Pool, John Tran, and William J. Dally. 2015. Learning both weights and connections for efficient neural networks. In NIPS. OpenAlex ↗ · Scholar ↗
- Yihui He, Xiangyu Zhang, and Jian Sun. 2017. Channel pruning for accelerating very deep neural networks. In ICCV. OpenAlex ↗ · Scholar ↗
- Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. 2015. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531. our card
- Jeremy Howard and Sebastian Ruder. 2018. Universal language model fine-tuning for text classification. In ACL. OpenAlex ↗ · Scholar ↗
- Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. 2016. Deep networks with stochastic depth. In ECCV. our card
- Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In NIPS. OpenAlex ↗ · Scholar ↗
- Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. 2017. Race: Large-scale reading comprehension dataset from examinations. arXiv preprint arXiv:1704.04683. our card
- Xiaodong Liu, Pengcheng He, Weizhu Chen, and Jianfeng Gao. 2019a. Improving multi-task deep neural networks via knowledge distillation for natural language understanding. arXiv preprint arXiv:1904.09482. OpenAlex ↗ · Scholar ↗
- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019b. Roberta: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692. our card
- Lajanugen Logeswaran and Honglak Lee. 2018. An efficient framework for learning sentence representations. In ICLR. our card
- Liang Lu, Michelle Guo, and Steve Renals. 2017. Knowledge distillation for small-footprint highway networks. In ICASSP. OpenAlex ↗ · Scholar ↗
- Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. 2017. Learned in translation: Contextualized word vectors. In NIPS. our card
- Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013. Distributed representations of words and phrases and their compositionality. In NIPS. our card
- Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In EMNLP. our card
- Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. In NAACL. our card
- Antonio Polino, Razvan Pascanu, and Dan Alistarh. 2018. Model compression via distillation and quantization. arXiv preprint arXiv:1802.05668. OpenAlex ↗ · Scholar ↗
- Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. 2018. Improving language understanding by generative pre-training. arXiv. OpenAlex ↗ · Scholar ↗
- Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In EMNLP. our card
- Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. 2015. Fitnets: Hints for thin deep nets. In ICLR. our card
- Bharat Bhusan Sau and Vineeth N Balasubramanian. 2016. Deep model compression: Distilling knowledge from noisy teachers. arXiv preprint arXiv:1610.09650. OpenAlex ↗ · Scholar ↗
- Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP. our card
- Xu Tan, Yi Ren, Di He, Tao Qin, Zhou Zhao, and Tie-Yan Liu. 2019. Multilingual neural machine translation with knowledge distillation. In ICLR. OpenAlex ↗ · Scholar ↗
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In NIPS. our card
- Dmitry P. Vetrov, Jonathan Huang, Li Zhang, Maxwell Collins, Michael Figurnov, Ruslan Salakhutdinov, and Yukun Zhu. 2017. Spatially adaptive computation time for residual networks. In CVPR. OpenAlex ↗ · Scholar ↗
- Alex Wang, Amapreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461. our card
- Adina Williams, Nikita Nangia, and Samuel R Bowman. 2017. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426. our card
- Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237. our card
- Shuangfei Zhai, Yu Cheng, Weining Lu, and Zhongfei Mark Zhang. 2016. Doubly convolutional neural networks. In NIPS. OpenAlex ↗ · Scholar ↗
- Chenguang Zhu, Michael Zeng, and Xuedong Huang. 2018. Sdnet: Contextualized attention-based deep network for conversational question answering. arXiv preprint arXiv:1812.03593. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/sun-2019-patient-knowledge-distillation-bert-model/