Elamur Research

MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers

Paper · 2020 · Wenhui Wang, Furu Wei, Li Dong et al.

Summary

A pretrained Transformer can support many language tasks, but its size makes it expensive to adapt and slow to run. MiniLM tackles both problems by training a smaller network to imitate a larger one before either is adapted to a particular application. The large network supplies examples of how it processes text, and the small network learns from those examples. The resulting student can then undergo fine-tuning for a task such as answering questions about a passage. The large teacher can stay as it was during pretraining, and the student can be reused across tasks.

The authors take their training targets from the last self-attention layer. Self-attention lets each token gather information from other positions in the input. MiniLM learns both how the teacher distributes attention across those positions and how the vectors that carry information between positions relate to one another. The authors turn these vectors, called values, into tables of pairwise scores. The tables have the same shape for teacher and student because their rows and columns index tokens, even if the underlying vectors have different widths. The student can therefore be narrower without learning an extra projection for the comparison. Using just the final layer also gives the authors freedom to change the student’s depth without assigning a teacher layer to every student layer. For particularly small students, they also test an intermediate network that learns from the original teacher and then teaches the final student.

The main English comparison starts from BERT. A MiniLM student with 6 layers and a hidden width of 768 uses 50% of the teacher’s Transformer parameters and computations. It runs 2.0× faster in the paper’s inference test and retains more than 99% of the teacher’s performance on SQuAD 2.0 and several tasks in GLUE. That figure describes how much of the teacher’s score the student retained. The underlying scores include F1 for SQuAD 2.0 and accuracy for tasks such as MNLI. MiniLM beats DistilBERT and TinyBERT on most tasks in the comparison of publicly released students, and experiments with narrower students also favor the attention-based objective.

The authors find that transferring value relations improves development-set results across the student sizes they test. An intermediate teacher assistant helps especially when the final student is much smaller. The method also yields competitive cross-lingual results after distillation from XLM-R Base, with fewer Transformer parameters. Separate experiments show that a student distilled from an in-house teacher can be adapted for question generation and abstractive summarization. The authors publicly released the MiniLM code and trained weights.

Deep dive: MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers

MiniLM compresses pretrained Transformers by matching final-layer attention and value relations, preserving much of the teacher’s benchmark performance. · about 35 minutes to read

The problem and its context

When a general-purpose network is expensive to use

The paper starts from a practical consequence of pretraining. A network such as BERT can learn contextual representations from a large collection of text and then provide a starting point for many supervised tasks. A representation is contextual when the vector at a token position depends on the surrounding input. The same token can therefore contribute differently in different sentences. During pretraining, BERT learns by predicting masked tokens using the context on both sides. During fine-tuning, a task-specific output layer can use the resulting vectors to make a different kind of prediction. The paper treats this reuse as one of the main advantages of language models and pretraining.

Reuse leaves the cost of the underlying network in place. Adding a small output layer for a new task still leaves the full stack of pretrained layers underneath it. When the entire network is adapted, training must work with that stack. When the adapted network is served, inference must run through it. The authors point to both latency and capacity constraints as reasons to train a smaller alternative. The aim is to keep the option of adapting the same pretrained network to several tasks while reducing the work each use requires. That makes MiniLM a contribution to efficient models and compression.

The paper describes several ways the field improved pretrained networks before turning to compression. BERT used a bidirectional encoder trained to recover masked tokens. RoBERTa showed the value of training for longer on more text. SpanBERT changed the unit of masking to contiguous spans, while XLNet used a permuted prediction order. These examples establish the setting for MiniLM. A large pretrained network already has a useful way of processing context, so the authors can ask which parts of its behavior a smaller network needs to reproduce. Their proposal concerns how to transfer that behavior from a trained Transformer.

Distillation before and after specialization

In knowledge distillation, a trained teacher supplies targets for a student. The teacher can provide a probability distribution instead of a single answer. For a masked token, for instance, that distribution gives the student information about several possible completions and the teacher’s relative preference for each. Earlier work also used intermediate representations as teaching signals. This gives the student a target for some step inside the teacher’s computation, in addition to any target derived from the final prediction. The paper traces soft probability targets to Distilling the Knowledge in a Neural Network.

Some approaches first adapt the large teacher to a particular downstream task. A question-answering teacher would be trained on question answering before guiding the student. The paper describes work that transferred task-specific BERT behavior into a small bidirectional recurrent network, as well as methods that used small pretrained networks to initialize students. Other approaches matched hidden states selected at intervals from the teacher or added supervision from attention distributions. Each choice changes what the student sees. A task-specific teacher can demonstrate how it solves the task, but preparing that teacher requires a large-network fine-tuning run. The paper identifies this cost as especially relevant when the task’s training dataset is large.

Task-agnostic distillation moves the transfer to an earlier stage. The teacher is still a general pretrained network when the student learns from it. Once trained, the student is the network that gets adapted to each application. The transfer data therefore serve a different purpose from the labeled data used later. During transfer, the text elicits behavior from the teacher that can become a training target. During fine-tuning, the examples specify what counts as a correct prediction for the task. A strong result on a downstream benchmark measures what the student can do after that second stage.

What earlier compression methods asked students to match

The authors place MiniLM alongside several task-agnostic methods. MiniBERT used the teacher’s probabilities for masked-token predictions to train a multilingual student. DistilBERT also used soft targets and incorporated a loss based on the similarity of representations. Its initialization drew alternating layers from the teacher, making identical layer architecture important for transferring their weights. The design cuts depth while retaining the shape of an individual teacher layer. The paper’s main English comparison includes the publicly released DistilBERT.

TinyBERT and MobileBERT brought more of the teacher’s internal computation into the training objective. Both used intermediate hidden states and attention information. To supervise a shallower student layer by layer, TinyBERT used a uniform rule to select the teacher layers. It also used a learned matrix to transform narrower student representations into the width needed for comparison. TinyBERT included separate task-specific distillation and data augmentation stages in its broader approach. Those stages are distinct from the initial, task-agnostic transfer that the MiniLM paper seeks to compare.

MobileBERT used a teacher and student with the same depth for layer-by-layer supervision. The architectures included bottleneck designs that made the hidden representations used for matching compatible. Its teacher was specially designed and comparable in size to BERT Large. This matters both for the architectural comparison and for the benchmark design. The authors can use MobileBERT to explain what layer-by-layer supervision requires while choosing a narrower set of baselines for a controlled comparison of students distilled from BERT Base.

These methods expose several design choices that can become coupled. If each student layer must imitate an internal teacher layer, the training procedure needs a rule for pairing them. If the objective compares vectors directly, it needs compatible widths at the point of comparison. If the objective uses masked-token predictions, it compares distributions over a vocabulary. MiniLM instead concentrates supervision on the final self-attention module and compares distributions indexed by positions in the input. That choice determines what information is transferred, which architectural dimensions can change, and where the computation for the distillation loss is spent.

The method, step by step

Prepare matching inputs for the teacher and student

For the main English experiments, the authors start from uncased BERT Base. This teacher has 12 Transformer layers, a hidden width of 768, 12 attention heads, and about 109M parameters. The head count matters because the objective pairs teacher and student distributions head by head. The authors use 12 heads for the students’ attention distributions and value relations as well. In contrast, the number of layers and the width of an individual representation can vary between networks.

The English transfer corpus consists of documents from BookCorpus and English Wikipedia, using the Wikipedia snapshot enwiki-20181101. The authors follow BERT’s preprocessing, with a vocabulary of 30,522 and a maximum sequence length of 512. WordPiece divides text into vocabulary units that can be smaller than words. In the paper’s example, “forecasted” becomes forecast followed by ##ed. The prefix on the second piece marks it as a continuation. The unit associated with each row of an attention map is therefore an input position, which can correspond to a whole word, a word piece, or a special token. Subword tokenization determines those positions before attention is calculated.

BERT inserts a special token called CLS at the beginning of the input and uses SEP to mark boundaries. The hidden representation at CLS can later serve as the input to a classifier for the whole sequence. During input preparation, each token gets a vector made by adding its token embedding, an embedding for its absolute position, and an embedding for its segment. The token embedding identifies the vocabulary item. The other terms describe where it occurs and which segment it belongs to. Teacher and student can represent the same positions with different numbers of features.

MiniLM’s task-agnostic distillation

The steps in order.

MiniLM’s task-agnostic distillationStep 1: Prepare the same token sequence for both networks1. Prepare the same token sequence for both networksStep 2: Run the teacher and student through their Transformers2. Run the teacher and student through their TransformersStep 3: Collect attention distributions from their final layers3. Collect attention distributions from their final layersStep 4: Compute pairwise value relations within each head4. Compute pairwise value relations within each headStep 5: Minimize both teacher-to-student divergence losses5. Minimize both teacher-to-student divergence lossesStep 6: Use an intermediate teacher for selected smaller students6. Use an intermediate teacher for selected smaller studentsStep 7: Fine-tune the resulting student for a downstream task7. Fine-tune the resulting student for a downstream task

Follow a token through the Transformer

The initial token vectors form an ordered collection that the first Transformer layer receives. Each layer produces an updated collection for the next layer. The paper writes this recurrence as follows.

Hˡ = Transformerₗ(Hˡ⁻¹),  l ∈ [1, L]

Here Hˡ is the collection of hidden vectors after layer l, Hˡ⁻¹ is the input to that layer, and Transformerₗ denotes the transformation performed by layer l. The superscripts on H index the stage of processing. The superscript 0 refers to the initial embeddings. The symbol ∈ means the layer index belongs to the range from 1 through L, where L is the network’s depth. The final collection Hᴸ contains a contextual representation at every position.

A Transformer block contains a self-attention sublayer and a fully connected feed-forward sublayer. In the architecture described in the paper, each sublayer has a residual connection followed by layer normalization. The residual connection carries the sublayer input into the output alongside the computed transformation. For MiniLM, the distinction between the whole block and its attention sublayer is important. The objectives are computed inside the final block, using attention intermediates. The student still uses its complete Transformer stack to produce the contextual representations that downstream tasks receive.

Inside one attention head, every position gets a query, a key, and a value. A query is used to score other positions. A key is the vector against which that score is calculated. A value is the vector that can contribute to the resulting mixture of information. The network produces all three by applying different learned linear transformations to the same incoming hidden vectors. The heads each have their own transformations, allowing them to use the input hidden state in different ways.

Q[l,a] = Hˡ⁻¹ Wᑫ[l,a]

Q[l,a] is the query matrix for head a in layer l. Its rows correspond to input positions. Hˡ⁻¹ is the matrix of incoming hidden vectors, and Wᑫ[l,a] is the learned query projection for that layer and head. The product applies the projection to all input rows.

K[l,a] = Hˡ⁻¹ Wᵏ[l,a]

K[l,a] is the key matrix at the same layer l and head a. Wᵏ[l,a] is the learned key projection, and Hˡ⁻¹ again supplies the input features at every position.

V[l,a] = Hˡ⁻¹ Wᵛ[l,a]

V[l,a] is the matrix of value vectors for head a at layer l. Wᵛ[l,a] is the corresponding value projection, and Hˡ⁻¹ is the incoming hidden-state matrix. For all three projections, the incoming vectors have hidden width dₕ, and the projected vectors have head width dₖ. The head index ranges over the Aₕ attention heads. In BERT, the head width multiplied by the number of heads equals the overall hidden width.

Turn queries and keys into attention distributions

Each query is scored against the keys at the positions in the sequence. When the query belongs to a position t, the scores in its row describe how that position weighs the positions it can attend to. At the matrix level, calculating these rows together is a multiplication of the query matrix by the transpose of the key matrix.

A[l,a] = softmax((Q[l,a] K[l,a]ᵀ) / √dₖ)

A[l,a] is the attention matrix for head a of layer l. Q[l,a] and K[l,a] are its query and key matrices. The superscript ᵀ denotes transpose, which exchanges rows and columns. In the product, each entry is a dot product between a query from one position and a key from another. The denominator √dₖ is the square root of the head width. The softmax operation converts the scaled scores in each row into a probability distribution over positions. The matrix has |x| rows and |x| columns, where |x| is the input sequence length.

The attention probabilities then determine how the head mixes the values. For a particular row, the head multiplies each position’s value vector by the probability assigned to that position and adds the contributions. A high probability gives a value more weight, while the contents of that value determine what features it contributes.

AO[l,a] = A[l,a] V[l,a]

AO[l,a] is the output matrix of head a in layer l. A[l,a] supplies the mixing weights, and V[l,a] supplies the vectors being mixed. The output has a row for each token position. This equation shows why the authors distinguish attention distributions from value relations. The weights determine the mixture, but the weights alone leave room for substantial differences in the vectors being combined.

Match the final attention distributions

The generic distillation setup can be expressed as a loss over the teacher and student features on each training example. The features can be outputs, internal representations, or distributions derived from those representations. The paper gives the generic objective before specializing it to self-attention.

ℒᴷᴰ = ∑[e ∈ 𝒟] L(fˢ(e), fᵀ(e))

ℒᴷᴰ is the total knowledge-distillation loss. The summation sign ∑ adds over examples e belonging to the training data 𝒟. The expressions fˢ(e) and fᵀ(e) are the student and teacher features for instance e. In this equation, L denotes the function that measures the discrepancy between the features. The paper uses the same letter elsewhere for the teacher’s layer count, so its meaning depends on whether it appears as a function or a layer index. Mean squared error and KL divergence are examples of discrepancy functions discussed in the paper.

MiniLM takes the teacher’s attention distributions from its last Transformer layer and the student’s distributions from its own last layer. The teacher’s final layer may follow a longer succession of transformations than the student’s. Since the comparison is made at the end of each stack, the procedure needs just that pair of layers. Earlier student layers still matter. They produce the representations that feed the final layer, and the final-layer loss can guide their training through that dependency.

ℒᴬᵀ = (1 / (Aₕ |x|)) ∑[a = 1 to Aₕ] ∑[t = 1 to |x|] Dₖₗ(Aᵀ[L,a,t] ∥ Aˢ[M,a,t])

ℒᴬᵀ is the attention-distribution transfer loss. Aₕ is the shared number of attention heads, |x| is the sequence length, a selects a head, and t selects a row corresponding to a token position. Aᵀ[L,a,t] is the row from the teacher’s last layer L. Aˢ[M,a,t] is the corresponding row from the student’s last layer M. Here the superscripts T and S identify teacher and student. Dₖₗ is Kullback–Leibler divergence, which measures a discrepancy between probability distributions. The separator ∥ keeps the order of its arguments explicit, with the teacher distribution first. The denominator averages the summed divergences over the heads and token rows.

The matching concerns the probability assigned to each position. Both networks can make this assignment even when they have different widths because each forms its query–key products within its own attention head. As long as the head correspondence and the token positions are available, each student row can be compared with its teacher counterpart. Directly matching a teacher query vector to a student query vector would be a different objective, with a different requirement on their dimensions.

Match the relations among values

The paper’s additional target comes from the value vectors. The authors compare each value with every value in the same head, including its own, by taking dot products. They scale the scores and apply softmax to every row. The resulting row describes the relative association, under this scoring rule, of the selected value with the values at all the positions. These distributions are computed for training. In the Transformer’s ordinary attention computation, the weights applied to the values still come from queries and keys.

VRᵀ[L,a] = softmax((Vᵀ[L,a] (Vᵀ[L,a])⊤) / √dₖ)

VRᵀ[L,a] is the teacher’s value-relation matrix for head a of its final layer L. Vᵀ[L,a] is the teacher’s value matrix for that head, with one row per position and dₖ features per row. The superscript ᵀ attached to V or VR identifies the teacher, while the separate operator ⊤ transposes the matrix in parentheses. The product contains dot products of teacher values with other teacher values. √dₖ scales them by the square root of the teacher’s head width, and softmax normalizes each row.

VRˢ[M,a] = softmax((Vˢ[M,a] (Vˢ[M,a])⊤) / √dₖ′)

VRˢ[M,a] is the student’s value-relation matrix at head a of its last layer M. Vˢ[M,a] is the student’s value matrix for that head, with the same number of rows as the teacher’s and a potentially different number of columns, dₖ′. The superscript ˢ identifies the student. The operator ⊤ again transposes the matrix, √dₖ′ is the square root of the student’s head width, and softmax converts the scaled entries into a distribution in each row.

The width disappears from the shape of the resulting comparison because the dot product reduces each pair of vectors to a single score. Both relation matrices have a row and a column for every token position. Taken across the heads, each network thus supplies Aₕ matrices of size |x| by |x|. The construction needs only the projections that the attention modules already use. It adds no learned matrix that maps a student value vector into the teacher’s feature space.

Matching the normalized relations is a specific kind of imitation. Consider two positions whose values receive a high score relative to others in a teacher row. The loss favors a student row that gives a similar share of its probability to those positions. This constrains how the student organizes values within a head without prescribing the individual coordinates of its value vectors. The relation targets use the same token indexing as the attention targets, but they describe a different part of the calculation.

ℒⱽᴿ = (1 / (Aₕ |x|)) ∑[a = 1 to Aₕ] ∑[t = 1 to |x|] Dₖₗ(VRᵀ[L,a,t] ∥ VRˢ[M,a,t])

ℒⱽᴿ is the value-relation transfer loss. VRᵀ[L,a,t] is the teacher’s normalized value-relation row for token position t in head a of layer L. VRˢ[M,a,t] is the student’s row for the same position and head in layer M. Dₖₗ compares the two distributions, in the teacher-to-student order indicated by ∥. The sums cover the Aₕ heads and the |x| token positions, and the reciprocal in front turns the sum into an average.

ℒ = ℒᴬᵀ + ℒⱽᴿ

ℒ is the MiniLM training objective, ℒᴬᵀ is the attention-distribution loss, and ℒⱽᴿ is the value-relation loss. The plus sign gives both losses unit weight. The teacher’s masked-token probabilities do not enter this objective. Both teaching signals come from internal computations in its final attention module.

Train directly or through a teacher assistant

The direct procedure uses the original pretrained teacher throughout distillation. The authors also examine a staged procedure for students whose depth and width are each at most half those of the teacher. In the paper’s notation, the teacher has L layers and hidden width dₕ, while the eventual student has M layers and hidden width dₕ′. The intermediate teacher assistant has depth L and width dₕ′. It inherits the target student’s narrower representation while retaining the original teacher’s depth.

In the first stage, the teacher supervises the assistant. In the second, the trained assistant supplies the targets for the final student. The second transfer therefore reduces the depth of a network that already has the desired width. This design separates two architectural changes that the direct procedure makes at once. It also changes the source of the supervision. The final student learns relations produced by a trained narrow network, and the assistant itself has already learned from the wider teacher.

The staged setup requires training the assistant before using it as a teacher. The paper distinguishes assisted results from direct results in its main BERT Base comparisons. An entry labeled MiniLM without the teacher-assistant designation in those comparisons is a direct student. In the in-house and multilingual experiments, the authors explicitly identify the deeper, narrow student that supervises the shallower one. That distinction matters when comparing two students with similar architecture but different training histories.

Set the training schedule for each family

For the main BERT Base experiments, the optimizer is Adam, with β₁ set to 0.9 and β₂ set to 0.999. These coefficients govern how the optimizer averages information from recent gradients. The 6-layer student with width 768 uses a batch size of 1024 and a peak learning rate of 5e-4 over 400,000 steps. The other student architectures in this setup use a batch size of 256 and a peak learning rate of 3e-4. The paper specifies linear warmup over the first 4,000 steps followed by linear decay. Dropout is set to 0.1 and weight decay to 0.01. The authors use 8 V100 GPUs and mixed precision for distillation.

The in-house teacher has the depth, width, and head count of BERT Base and follows UniLM. Its training collection contains 160GB of text. In addition to English Wikipedia and BookCorpus, it includes OpenWebText, CC-News, and Stories. The authors reuse these corpora to distill students with width 384 and depths of 12 and 6. The 12-layer run uses Adam with β₁ of 0.9 and β₂ of 0.98, a batch size of 2048, and a peak learning rate of 6e-4 over 400,000 steps. The paper gives a batch size of 512 and a peak learning rate of 4e-4 for the 6-layer run. The 12-layer student acts as the teacher assistant for the shallower student.

For multilingual and cross-lingual NLP, the teacher is the v0 release of XLM-R Base. The authors use the same corpora as the teacher and train students with 12 or 6 layers and a hidden width of 384. The deeper student supervises the shallower one. Adam uses β₁ of 0.9 and β₂ of 0.999. The 12-layer student trains for 1,000,000 steps with a batch size of 256 and a peak learning rate of 3e-4. The 6-layer student trains for 400,000 steps with a batch size of 512 and a peak learning rate of 6e-4. The training schedules therefore vary across architectures and teacher families even though the two components of the distillation objective stay the same.

Experiments and results

What the downstream tests measure

The main evaluation asks how well a distilled student adapts to labeled tasks. For extractive question answering, the input contains a question and a passage, and the prediction identifies a span in the passage. BERT’s input convention places CLS first, then the question, a SEP boundary, the passage, and a closing SEP. MiniLM adds separate linear output layers that score token positions as the start or the end of the answer. SQuAD 2.0 also includes questions for which the passage has no answer. The system represents an unanswerable case by assigning both ends of the span to CLS. The paper reports F1 for the development-set comparison on SQuAD 2.0.

The SQuAD 2.0 fine-tuning setup uses a maximum sequence length of 384. Longer inputs are handled with the paper’s sliding-window setting of 128. The 12-layer student distilled from the in-house teacher is fine-tuned for 3 epochs with a batch size of 48 and a peak learning rate of 4e-5. The other distilled students use 3 epochs, a batch size of 32, and a peak learning rate of 6e-5. These are settings for learning the downstream answer predictor and adapting the student’s weights. They are separate from the settings used to match the teacher’s attention and value-relation distributions.

GLUE broadens the assessment to sentence-level tasks. CoLA concerns linguistic acceptability. SST tests sentiment, and MRPC and QQP concern whether paired inputs express the same meaning or ask the same question. The benchmark also includes semantic textual similarity and several inference tasks. For instance, MNLI concerns the relationship between a premise and a hypothesis, while QNLI frames a question and a candidate sentence as an inference problem. The paper describes the GLUE prediction setup as a linear output layer on the final CLS representation. Thus the same distilled Transformer can be fine-tuned for outputs that depend on the whole input, while SQuAD reads token-level representations to locate an answer.

For GLUE, the maximum sequence length is 128. The students distilled from BERT Base use a batch size of 32. The authors consider learning rates of 2e-5, 3e-5, 4e-5, and 5e-5, and fine-tuning durations of 3, 4, or 5 epochs. For the in-house students the batch size can be 32 or 48. The paper reports that longer training, up to 10 epochs, gives slight improvements on CoLA, RTE, and MRPC. For those tasks, the 12-layer in-house student uses a learning rate of 1.5e-5. In the monolingual comparisons based on the authors’ fine-tuning runs, the reported results average 4 runs per task.

Comparison at the same student depth and width

The first comparison uses the student shape common in earlier BERT Base distillation work, with 6 layers and a hidden width of 768. The baselines are public versions of DistilBERT and TinyBERT. For DistilBERT, the authors take the GLUE results from the earlier work and run their own SQuAD 2.0 fine-tuning experiment using the released weights. For TinyBERT, they fine-tune the public version they identify in the paper. The comparison is about the starting point obtained through task-agnostic distillation. TinyBERT’s additional downstream distillation and data augmentation are outside this comparison.

On the reported development sets, MiniLM leads the two baselines on most tasks. The authors give a margin of 3.0+% F1 on SQuAD 2.0 and 5.0+% on CoLA, which they describe as an accuracy gain. These margins answer a question about the value of different training methods at the same student shape. The accompanying teacher-retention claim answers a different question. Compared with the original BERT Base teacher, the student retains more than 99% of its performance on tasks including SQuAD 2.0 and MNLI. A large share of the teacher’s score and an advantage over another compact student can both hold because the reference systems differ.

MobileBERT is outside this performance comparison. Its teacher uses a specially designed inverted bottleneck architecture at BERT Large size, and its student uses 24 layers with bottleneck modules. Including it would bring a different teacher and a different student design into an experiment organized around BERT Base and the common 6-layer configuration. The paper still discusses MobileBERT when comparing the architectural and training requirements of the methods.

What happens when the student gets narrower

The authors also compare smaller students distilled from BERT Base. For this experiment they implement a masked-language-model distillation baseline, called MLM-KD, and a version of TinyBERT. MLM-KD uses the teacher’s probability distribution over vocabulary items for masked-token predictions. The TinyBERT comparison represents an alternative way to supervise internal representations and attention. The paper uses the same data and hyper-parameters for the methods in this part of the experiment. That gives the comparison a different basis from the one using public checkpoints.

The reported development results cover SQuAD 2.0, MNLI, and SST-2. MiniLM beats the implemented MLM-KD and TinyBERT baselines on all three tasks in this comparison. These tasks ask for different kinds of predictions. The SQuAD output depends on positions in a passage, while the GLUE tasks evaluated here use sentence-level decisions. Gains on both kinds of task support the intended use of the student as a general starting point for fine-tuning. The paper also reports further improvement for smaller students when the training uses a teacher assistant.

The narrow-student comparisons matter for the design claim. With students that keep the teacher’s hidden width, the ability to match two different widths is available in the method but has little bearing on the shape of the training targets. Reducing the width exercises that property directly. The attention distributions and value relations remain aligned by token position while the number of features per head can change. The benchmark outcome tells the reader whether this convenient comparison still leaves the student with useful downstream representations.

Inference speed and the in-house teacher

The authors measure inference time on the QNLI training set. They report the average running time over 100 batches on a single P100 GPU, holding the inference hyper-parameters constant across the systems they time. The dataset here supplies the timed inputs. Its role in the speed comparison is distinct from the use of development splits to measure prediction quality. Using the same workload and device helps give a concrete meaning to the reported speedups.

MiniLM inference speedup over BERT Base on the QNLI training set

The narrower student distilled from the in-house teacher has the larger reported speedup.

MiniLM inference speedup over BERT Base on the QNLI training setBERT Base teacher, 6-layer MiniLM with width 768: 2.0BERT Base teacher, 6-layer MiniLM withwidth 7682.0In-house teacher, 12-layer MiniLM with width 384 (this paper): 2.7In-house teacher, 12-layer MiniLM withwidth 384 (this paper)2.7
The numbers
System or settingSpeedup ×
BERT Base teacher, 6-layer MiniLM with width 7682.0
In-house teacher, 12-layer MiniLM with width 384 (this paper)2.7

The BERT Base student with 6 layers and width 768 uses 50% of the teacher’s Transformer parameters and computations. The paper distinguishes Transformer parameters from embedding parameters in its accounting. The vocabulary and the parameters used to represent it belong to the embedding component, so the figure for the Transformer stack has a specific scope. The observed speedup is a separate measurement made from the timed inference batches.

The in-house experiment explores a second route to a compact student. The teacher has the dimensions of BERT Base but follows UniLM and uses the broader corpus described earlier. Its students have width 384, and the 12-layer version serves as assistant to the 6-layer version. The authors report improved MiniLM results on the SQuAD 2.0 and GLUE development sets with this teacher. The 12-layer student is competitive with BERT Base on those datasets, with the paper describing its performance as favorably comparing with that reference. The timing comparison places that narrower student alongside the shallower student from BERT Base. Because depth, width, teacher, and training setup vary, their score comparison describes the complete configurations.

Generation after distillation

A separate set of experiments uses the compact students to generate text. The authors follow UniLM in fine-tuning MiniLM with a particular self-attention mask for sequence-to-sequence prediction. An attention mask controls which positions can contribute to a particular position’s computation. Changing the mask lets the network process a source sequence and produce target text under the sequence-to-sequence setup. The students in these experiments have widths of 384 and depths of 12 and 6.

The question-generation task gives the system a passage and an answer and asks it to produce a question for which that answer is appropriate. This reverses the direction of the extractive task in several respects. The supplied answer informs the generated question, and the output is a sequence of tokens. The evaluation uses SQuAD 1.1 and reports results under separate data splits from earlier question-generation studies. The comparison includes UniLM Large, along with other baselines. The paper reports competitive results for the MiniLM students using METEOR, ROUGE, and the BLEU score.

These experiments on question generation use batches of 32, a total length of 512, and an output limit of 48. The learning rates are 3e-5 for the 12-layer student and 8e-5 for the 6-layer student. Both train for 25 epochs with label smoothing at 0.1. Label smoothing changes the training target so the correct output token does not receive all the target probability. During decoding, beam search keeps multiple possible continuations with the beam width set to 5, as specified in the paper. The length penalty is 1.3. These settings belong to the generation experiment and determine how candidate outputs are produced from the fine-tuned student.

The other generation task is abstractive summarization. The system produces a shorter text that conveys important content from a source document. The paper uses the non-anonymized CNN/DailyMail dataset and XSum, evaluating with the F1 version of ROUGE. The 12-layer student outperforms BERTSumAbs and MASS Base with fewer parameters. The authors also describe the 6-layer student as competitive. The result extends the paper’s evidence beyond classification and span extraction to the generation tasks evaluated with this fine-tuning procedure.

Both summarization setups use a batch size of 64 and label smoothing of 0.1. The CNN/DailyMail setting uses a total length of 768 and caps output length at 160. The authors fine-tune both depths for 25 epochs, with learning rates of 1e-4 at 12 layers and 1.5e-4 at 6 layers. Decoding uses a beam size of 5 and a length penalty of 0.7. XSum uses a total length of 512 and caps the output length at 48. The learning rates are the same as on CNN/DailyMail. The deeper student trains for 30 epochs and the shallower one for 50 epochs. The XSum decoding setup uses a beam size of 5 and a length penalty of 0.9.

Cross-lingual classification and question answering

The multilingual experiments ask whether the last-layer objective also produces useful students from XLM-R Base. The authors identify an additional reason to consider internal attention supervision in that setting. They give vocabulary sizes of 30k for monolingual BERT and 250k for XLM-R. A masked-token distillation target contains probabilities indexed by the vocabulary, so the larger vocabulary makes that comparison more expensive. MiniLM’s targets are indexed by positions in the current sequence. The paper reports faster multilingual training than soft-label distillation, describing the vocabulary difference as a motivation for the comparison.

Cross-lingual natural language inference is evaluated on XNLI. The paper reports accuracy for each of the 15 XNLI languages and an average accuracy. Following the teacher’s evaluation procedure, the authors select one checkpoint using the joint development set across the languages. Fine-tuning uses a maximum sequence length of 128, a batch size of 128, and 5 epochs. The authors consider learning rates of 3e-5, 4e-5, 5e-5, and 6e-5. The compact students achieve competitive XNLI results with fewer Transformer parameters, and the 12-layer student compares favorably with mBERT and the XLM baseline trained with masked language modeling.

The cross-lingual extractive question-answering test uses MLQA. The students train on SQuAD 1.1, with English MLQA development data used to decide when to stop. The paper reports F1 and exact match on each of the 7 MLQA languages. Exact match measures agreement with an accepted answer for the complete predicted span, while F1 can give credit for overlap. The experiment fine-tunes for 3 epochs with a batch size of 32. The input limit is 512, with a sliding-window setting of 128 for longer inputs. The learning rates considered are 3e-5, 4e-5, 5e-5, and 6e-5.

The MLQA comparisons include mBERT, XLM, and the XLM-R Base teacher. The authors distinguish XLM-R Base results taken from the earlier work from results produced by their own fine-tuning. They describe the 12-layer MiniLM as performing competitively better than mBERT and XLM, and the 6-layer student as competitive. In both multilingual tasks, the paper’s size claim is specifically about Transformer parameters. It separately accounts for embeddings, which matter when interpreting the size of a system built around a large multilingual vocabulary.

What the ablations show

The value-relation target adds useful supervision

The first ablation asks what happens when the attention-distribution transfer is supplemented with the value-relation term. The authors compare students with and without that term on the SQuAD 2.0, MNLI, and SST-2 development sets. They report a positive contribution across the student sizes studied. The comparison is pertinent because attention distributions are already an established teaching signal. Holding on to that signal while adding the value objective tests whether supervision from a different part of the same module has further value.

The attention equations give a reason for trying the comparison. The distribution tells a head how to weight positions, and the value vectors supply the features that get weighted. If a student imitates the teacher’s assignment of probabilities, the values can still be organized differently. The additional loss constrains the student’s value relations directly. The downstream improvement is evidence that this constraint helps in the tested setting. The experiment assesses the effect of adding the target. It does not assign particular pieces of linguistic knowledge to individual value relations.

The authors also experimented with transferring relations between hidden states and found the resulting student performance unstable across teachers. That observation helps define the scope of the positive result. The paper has affirmative evidence for relations built from projected values inside attention heads. Its attempt to extend a similar idea to hidden states produced inconsistent outcomes. The location of the target inside the architecture is therefore part of the tested method.

Relations versus direct value regression

Another comparison changes how the values are matched. The alternative uses mean squared error on the teacher’s and student’s value vectors. Mean squared error penalizes differences between corresponding coordinates. If the student is narrower, the comparison needs a parameter matrix to map its values into a space with the teacher’s width. The MiniLM version first constructs a token-by-token relation distribution in each network and then compares the distributions with KL divergence.

The authors report better development-set results for value-relation transfer in this comparison, including about 1.0% F1 improvement on SQuAD. The result supports the particular combination used in MiniLM. The comparison changes the representation of the target, the discrepancy function, and the projection requirement together. It therefore shows that KL on the normalized relations works better here than the tested direct regression procedure. It cannot identify how much of the gain is attributable separately to the relation representation or to the change in loss.

The size argument is independent of that benchmark margin. The row and column axes in the relation matrix are input positions. Once those axes correspond, comparing teacher and student distributions does not require a learned width-matching transformation. In direct value regression with different widths, creating corresponding coordinates is part of the procedure. The ablation therefore links a measured advantage to a concrete difference in training design without relying on any inference about the meaning of the individual coordinates.

Final-layer transfer versus uniform layer matching

The layer comparison keeps the kind of attention knowledge fixed while changing where it is transferred. In the layer-by-layer condition, the authors use a uniform rule like TinyBERT’s to pair student layers with teacher layers. The final-layer condition takes the same type of supervision from the end of each stack. The reported development results favor MiniLM’s final-layer design. This specifically addresses whether adding intermediate supervision through that uniform alignment improves the result.

The authors also report that computing the transfer at the final layer takes less work and speeds training. Each network still has to produce the final layer’s input. The savings concern constructing and comparing the training targets at fewer layers. The design also eliminates the need to decide which internal teacher layer should correspond to a given internal student layer. That becomes especially relevant when the two networks have different depths. A uniform rule supplies a plausible correspondence, but the rule itself cannot establish that the matched layers are at equivalent stages of computation.

This comparison is useful because it holds the kind of knowledge being transferred steady. A benchmark comparison with a separate distillation method might change the layer correspondence, the objective, and the initialization at the same time. The ablation narrows the question to the final layer versus the tested uniform layer-by-layer scheme. The evidence favors the final layer for that comparison, while leaving other choices of intermediate layers open.

The assistant and the choice of teacher

The direct and assisted BERT Base comparisons investigate a different aspect of training. With very small students, the authors report gains from using the intermediate network, and further gains from combining the assistant with deep self-attention transfer. Because the final student receives targets from a narrow teacher, the experiment tests a training path that changes width first and depth afterwards. Its results show that changing the source of the targets can help even when the end product remains a compact student.

The in-house teacher comparison gives a broader view of how MiniLM depends on the teacher. The teacher’s training method and corpora change, and the student setup has its own schedule. The improved downstream results show that the distillation method works with this alternative source of supervision and can yield a stronger student in that setup. The comparison evaluates a collection of changes. Its outcome alone cannot determine which changes to the teacher, data, or student training account for the improvement.

Limitations

Limits the authors identify

The authors leave distillation from larger pretrained networks for future work. Their English experiments use BERT Base or an in-house teacher with the same architectural dimensions. Their multilingual experiments use XLM-R Base. Together these settings establish that the approach works with different teachers and across the tested monolingual and multilingual tasks. They leave open how the objective behaves when the teacher is much larger than the teachers used here.

The paper also reports that hidden-state relation transfer was unstable across teachers. Its positive findings are specific to the attention and value-relation objectives that it evaluates. Teacher assistants help in the smaller configurations studied, and the paper gives a concrete way to choose the assistant’s shape. The experiments supply evidence for that staged procedure with the tested students. They leave the best assistant size and sequence of stages for other architectures open.

Limits visible in the experimental design

The relation construction makes different hidden widths compatible, but the published objective couples teacher and student along other axes. It compares distributions head by head, and the student runs in the main English setup use the teacher’s head count. It also assumes that rows and columns correspond to positions in a shared input. The experiments therefore demonstrate flexibility in depth and hidden width within a setup that aligns attention heads and input positions. A teacher and student with different head counts or different segmentations would require a way to establish correspondences before these losses could be applied as written.

Matching the two distributions captures selected features of attention behavior. The attention target constrains the probabilities used to combine positions. The value target constrains the normalized dot-product relations among the values. The loss neither compares the coordinates of those values directly nor gives independent supervision to the feed-forward sublayer. Strong downstream performance establishes that the distilled representations are useful after task adaptation. Establishing that the student reproduces the teacher’s full computation would require measurements beyond the losses and task scores in the paper.

The comparisons also have different degrees of experimental control. The implemented MLM-KD and TinyBERT baselines for smaller students use the same data and hyper-parameters as the corresponding MiniLM training runs, making them informative about the choice of a distillation method in that setup. In the public-checkpoint comparison, the DistilBERT GLUE figures come from the earlier work, while the authors run fine-tuning experiments for other entries. It is a comparison of usable distilled checkpoints at the stated architecture, with a mix of result sources. Averaging the authors’ own fine-tuning runs over 4 repetitions is useful for reading the reported averages, while the main prose does not quantify uncertainty around each reported margin.

The timing result is measured on a single P100 GPU using batches from QNLI. That makes the result concrete and lets the authors compare several configurations with the same workload. Speed on another device, under different batching, or on generation workloads would require its own measurement. Likewise, the Transformer parameter comparison has a defined scope. It describes the stack of Transformer layers, and the paper accounts for embeddings separately. This distinction is particularly consequential for multilingual students with a large vocabulary. The method can reduce the cost of the Transformer while retaining a substantial embedding component.

The multilingual efficiency argument concerns the structure of the loss as well as the experiments. Vocabulary-wide soft targets grow with the number of vocabulary entries. MiniLM instead forms matrices indexed by pairs of input positions, and those matrices grow as the sequence gets longer. The relative computational advantage therefore depends on the workload, including the lengths of sequences. The same consideration applies to the benefit of taking targets from one layer. It reduces the amount of relation comparison, while the forward passes to reach that layer still run through the networks.

The application results are bounded by the chosen tasks and fine-tuning procedures. The generation experiments show that the students can adapt to the tested question-generation and summarization setups. Their scores concern comparisons on those datasets under the stated decoding and scoring methods. XNLI and MLQA provide evidence about cross-lingual transfer under their respective checkpoint selection and supervision protocols. More general claims about language coverage, resulting output quality, or the performance of a student before any downstream adaptation would need different tests.

What came after

The clearest continuation is MiniLMv2. Its stated subject is multi-head self-attention relation distillation for compressing pretrained Transformers. This carries forward the question MiniLM introduces through its value objective. If relations within an attention module provide useful supervision, multi-head relations can themselves be the focus of the distillation method. MiniLM makes this question concrete by matching query–key attention distributions and normalized value–value relations at the end of each network. The later title identifies the continuation at the level of multi-head relation distillation. MiniLMv2

TinyBERT has a different relationship to MiniLM. It is a citing work in its listed publication form, and the MiniLM paper already discusses it as a baseline and a source for the uniform layer-mapping comparison. The technical relationship documented by MiniLM is that TinyBERT transfers attention and hidden states across matched layers, with a learned transformation where the hidden widths differ. MiniLM uses this approach to frame a comparison about where supervision should enter the student and which representations can be matched directly. The citation relationship alone cannot establish that TinyBERT adopted MiniLM’s approach. TinyBERT

Other citing works put compression in a wider context. A case study on compressing large Transformer-based networks uses BERT as its subject, putting the architecture at the center of the MiniLM experiments in a broader compression study. Work on structured pruning addresses compactness by studying which parts of a network can be removed as structures. The connection is the aim of keeping useful performance under a size constraint. MiniLM asks which signals a separately trained student should receive, while the title of the pruning work identifies a question about the structure of the compact network. The citation information establishes the connection to the literature without specifying a reuse of the final-layer loss. Compressing Large-Scale Transformer-Based Models · Structured Pruning Learns Compact and Accurate Models

TernaryBERT and I-BERT illustrate related questions about how compact BERT systems are represented and run. TernaryBERT explicitly puts distillation together with ultra-low-bit BERT. That places the training signal alongside a numerical representation constraint. I-BERT identifies integer-only quantization as its subject. In MiniLM, the principal architectural variables are the number of Transformer layers and the width of the hidden representations. These citing works use titles that locate the efficiency problem in quantization. Their citation of MiniLM does not specify whether they use its attention or value targets. TernaryBERT · I-BERT

The citing literature also connects distillation to different kinds of training evidence. On-Policy Distillation of Language Models foregrounds learning from self-generated mistakes. MiniLM’s teacher and student process sequences drawn from a transfer corpus, and the student learns from distributions inside the teacher. The later work’s title identifies a different source of examples for learning. These subjects illustrate how “distillation” can describe distinct decisions about what the student observes, where the targets come from, and which part of the student’s behavior they supervise. The documented overlap is the use of distillation as the problem setting. On-Policy Distillation of Language Models

The Massive Text Embedding Benchmark is connected through evaluation. MiniLM tests its distilled students through fine-tuned prediction and generation tasks. The later benchmark’s title identifies text embeddings as the object of assessment. The difference matters when interpreting a citation from benchmark work. A question about how a system’s embeddings behave calls for an evaluation designed around those embeddings. MiniLM’s results establish how its students perform under the task procedures in the paper. The citation information does not establish which MiniLM variant, if any, appears in the later benchmark’s experiments. MTEB

A later survey of small language models places techniques alongside applications, enhancements, collaboration with larger systems, and trustworthiness. MiniLM addresses a particular technical question within that scope. It demonstrates that supervision from an attention module can train a smaller Transformer that is useful as a starting point for several downstream tasks. Among the citing titles, MiniLMv2 most clearly pursues that specific relation-distillation idea. The others show where it is cited across compression, distillation, and evaluation, with the precise use of MiniLM’s objective left unspecified in their descriptions. A Comprehensive Survey of Small Language Models

Cite

Cite as Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang and Ming Zhou. 2020. MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers. arXiv:2002.10957.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2002.10957 · arXiv 2002.10957

@misc{wang2020minilm,
  title = {{MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers}},
  author = {Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao, Nan Yang and Ming Zhou},
  year = {2020},
  doi = {10.48550/arxiv.2002.10957},
  eprint = {2002.10957},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2002.10957}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/wang-2020-minilm-deep-self-attention-distillation/

References

64 references, from the paper's own bibliography.

  1. Aguilar, G., Ling, Y., Zhang, Y., Yao, B., Fan, X., and Guo, E. Knowledge distillation from internal representations. CoRR, abs/1910.03723, 2019. URL http://arxiv.org/abs/1910.03723. OpenAlex ↗ · Scholar ↗
  2. Ba, L. J., Kiros, J. R., and Hinton, G. E. Layer normalization. CoRR, abs/1607.06450, 2016. URL http://arxiv.org/abs/1607.06450. OpenAlex ↗ · Scholar ↗
  3. Baevski, A., Edunov, S., Liu, Y., Zettlemoyer, L., and Auli, M. Cloze-driven pretraining of self-attention networks. arXiv preprint arXiv:1903.07785, 2019. our card
  4. Bahdanau, D., Cho, K., and Bengio, Y. Neural machine translation by jointly learning to align and translate. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. our card
  5. Bao, H., Dong, L., Wei, F., Wang, W., Yang, N., Liu, X., Wang, Y., Piao, S., Gao, J., Zhou, M., and Hon, H.-W. Unilmv2: Pseudo-masked language models for unified language model pre-training. arXiv preprint arXiv:2002.12804, 2020. our card
  6. Bar-Haim, R., Dagan, I., Dolan, B., Ferro, L., and Giampiccolo, D. The second PASCAL recognising textual entailment challenge. In Proceedings of the Second PASCAL Challenges Workshop on Recognising Textual Entailment, 01 2006. OpenAlex ↗ · Scholar ↗
  7. Bentivogli, L., Dagan, I., Dang, H. T., Giampiccolo, D., and Magnini, B. The fifth pascal recognizing textual entailment challenge. In In Proc Text Analysis Conference (TAC’09, 2009. OpenAlex ↗ · Scholar ↗
  8. Cer, D., Diab, M., Agirre, E., Lopez-Gazpio, I., and Specia, L. Semeval-2017 task 1: Semantic textual similarity-multilingual and cross-lingual focused evaluation. arXiv preprint arXiv:1708.00055, 2017. OpenAlex ↗ · Scholar ↗
  9. Chen, Z., Zhang, H., Zhang, X., and Zhao, L. Quora question pairs. 2018. OpenAlex ↗ · Scholar ↗
  10. Clark, K., Khandelwal, U., Levy, O., and Manning, C. D. What does BERT look at? an analysis of bert's attention. CoRR, abs/1906.04341, 2019. URL http://arxiv.org/abs/1906.04341. OpenAlex ↗ · Scholar ↗
  11. Conneau, A., Lample, G., Rinott, R., Williams, A., Bowman, S. R., Schwenk, H., and Stoyanov, V. Xnli: Evaluating cross-lingual sentence representations. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2018. OpenAlex ↗ · Scholar ↗
  12. Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., Grave, E., Ott, M., Zettlemoyer, L., and Stoyanov, V. Unsupervised cross-lingual representation learning at scale. CoRR, abs/1911.02116, 2019. URL http://arxiv.org/abs/1911.02116. our card
  13. Dagan, I., Glickman, O., and Magnini, B. The pascal recognising textual entailment challenge. In Proceedings of the First International Conference on Machine Learning Challenges: Evaluating Predictive Uncertainty Visual Object Classification, and Recognizing Textual Entailment, MLCW'05, pp. 177–190, Berlin, Heidelberg, 2006. Springer-Verlag. ISBN 3-540-33427-0, 978-3-540-33427-9. . URL http://dx.doi.org/10.1007/11736790_9. OpenAlex ↗ · Scholar ↗
  14. Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018. our card
  15. Dolan, W. B. and Brockett, C. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005. our card
  16. Dong, L., Yang, N., Wang, W., Wei, F., Liu, X., Wang, Y., Gao, J., Zhou, M., and Hon, H.-W. Unified language model pre-training for natural language understanding and generation. In 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), 2019. our card
  17. Du, X. and Cardie, C. Harvesting paragraph-level question-answer pairs from wikipedia. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 1: Long Papers, pp. 1907–1917, 2018. our card
  18. Gehrmann, S., Deng, Y., and Rush, A. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 4098–4109, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/D18-1443. our card
  19. Giampiccolo, D., Magnini, B., Dagan, I., and Dolan, B. The third PASCAL recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL Workshop on Textual Entailment and Paraphrasing, pp. 1–9, Prague, June 2007. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/W07-1401. our card
  20. He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pp. 770–778, 2016. our card
  21. Hinton, G. E., Vinyals, O., and Dean, J. Distilling the knowledge in a neural network. CoRR, abs/1503.02531, 2015. URL http://arxiv.org/abs/1503.02531. our card
  22. Howard, J. and Ruder, S. Universal language model fine-tuning for text classification. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 328–339, Melbourne, Australia, July 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/P18-1031. OpenAlex ↗ · Scholar ↗
  23. Hu, M., Peng, Y., Wei, F., Huang, Z., Li, D., Yang, N., and Zhou, M. Attention-guided answer distillation for machine reading comprehension. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, October 31 - November 4, 2018, pp. 2077–2086, 2018. URL https://www.aclweb.org/anthology/D18-1232/. OpenAlex ↗ · Scholar ↗
  24. Jawahar, G., Sagot, B., and Seddah, D. What does BERT learn about the structure of language? In Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 3651–3657, 2019. URL https://www.aclweb.org/anthology/P19-1356/. our card
  25. Jiao, X., Yin, Y., Shang, L., Jiang, X., Chen, X., Li, L., Wang, F., and Liu, Q. Tinybert: Distilling BERT for natural language understanding. CoRR, abs/1909.10351, 2019. URL http://arxiv.org/abs/1909.10351. our card
  26. Joshi, M., Chen, D., Liu, Y., Weld, D. S., Zettlemoyer, L., and Levy, O. Spanbert: Improving pre-training by representing and predicting spans. arXiv preprint arXiv:1907.10529, 2019. our card
  27. Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, San Diego, CA, 2015. URL http://arxiv.org/abs/1412.6980. our card
  28. Lample, G. and Conneau, A. Cross-lingual language model pretraining. Advances in Neural Information Processing Systems (NeurIPS), 2019. OpenAlex ↗ · Scholar ↗
  29. Levesque, H., Davis, E., and Morgenstern, L. The winograd schema challenge. In Thirteenth International Conference on the Principles of Knowledge Representation and Reasoning, 2012. OpenAlex ↗ · Scholar ↗
  30. Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., and Zettlemoyer, L. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019a. our card
  31. Lewis, P. S. H., Oguz, B., Rinott, R., Riedel, S., and Schwenk, H. MLQA: evaluating cross-lingual extractive question answering. CoRR, abs/1910.07475, 2019b. URL http://arxiv.org/abs/1910.07475. our card
  32. Lin, C.-Y. ROUGE: A package for automatic evaluation of summaries. In Text Summarization Branches Out: Proceedings of the ACL-04 Workshop, pp. 74–81, Barcelona, Spain, July 2004. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/W04-1013. our card
  33. Liu, Y. and Lapata, M. Text summarization with pretrained encoders. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, pp. 3730–3740, Hong Kong, China, 2019. our card
  34. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. RoBERTa: A robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019. our card
  35. Mirzadeh, S., Farajtabar, M., Li, A., and Ghasemzadeh, H. Improved knowledge distillation via teacher assistant: Bridging the gap between student and teacher. CoRR, abs/1902.03393, 2019. URL http://arxiv.org/abs/1902.03393. our card
  36. Narayan, S., Cohen, S. B., and Lapata, M. Don't give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 1797–1807, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. . URL https://www.aclweb.org/anthology/D18-1206. our card
  37. Peters, M., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., and Zettlemoyer, L. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 2227–2237, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/N18-1202. our card
  38. Radford, A., Narasimhan, K., Salimans, T., and Sutskever, I. Improving language understanding by generative pre-training. 2018. URL https://s3-us-west-2.amazonaws.com/openaiassets/research-covers/language-unsupervised/language understanding paper.pdf. OpenAlex ↗ · Scholar ↗
  39. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2019. our card
  40. Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 2383–2392, Austin, Texas, November 2016. Association for Computational Linguistics. . URL https://www.aclweb.org/anthology/D16-1264. our card
  41. Rajpurkar, P., Jia, R., and Liang, P. Know what you don't know: Unanswerable questions for SQuAD. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, ACL 2018, Melbourne, Australia, July 15-20, 2018, Volume 2: Short Papers, pp. 784–789, 2018. our card
  42. Romero, A., Ballas, N., Kahou, S. E., Chassang, A., Gatta, C., and Bengio, Y. Fitnets: Hints for thin deep nets. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/abs/1412.6550. our card
  43. Sanh, V., Debut, L., Chaumond, J., and Wolf, T. Distilbert, a distilled version of BERT: smaller, faster, cheaper and lighter. CoRR, abs/1910.01108, 2019. URL http://arxiv.org/abs/1910.01108. our card
  44. See, A., Liu, P. J., and Manning, C. D. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1073–1083, Vancouver, Canada, July 2017. Association for Computational Linguistics. . URL https://www.aclweb.org/anthology/P17-1099. OpenAlex ↗ · Scholar ↗
  45. Socher, R., Perelygin, A., Wu, J., Chuang, J., Manning, C. D., Ng, A., and Potts, C. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013. our card
  46. Song, K., Tan, X., Qin, T., Lu, J., and Liu, T.-Y. Mass: Masked sequence to sequence pre-training for language generation. arXiv preprint arXiv:1905.02450, 2019. our card
  47. Sun, S., Cheng, Y., Gan, Z., and Liu, J. Patient knowledge distillation for BERT model compression. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pp. 4322–4331, 2019a. our card
  48. Sun, Z., Yu, H., Song, X., Liu, R., Yang, Y., and Zhou, D. Mobilebert: Task-agnostic compression of bert by progressive knowledge transfer, 2019b. URL https://openreview.net/pdf?id=SJxjVaNKwB. OpenAlex ↗ · Scholar ↗
  49. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., and Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016. . OpenAlex ↗ · Scholar ↗
  50. Tang, R., Lu, Y., Liu, L., Mou, L., Vechtomova, O., and Lin, J. Distilling task-specific knowledge from BERT into simple neural networks. CoRR, abs/1903.12136, 2019. URL http://arxiv.org/abs/1903.12136. OpenAlex ↗ · Scholar ↗
  51. Trinh, T. H. and Le, Q. V. A simple method for commonsense reasoning. ArXiv, abs/1806.02847, 2018. our card
  52. Tsai, H., Riesa, J., Johnson, M., Arivazhagan, N., Li, X., and Archer, A. Small and practical BERT models for sequence labeling. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, EMNLP-IJCNLP 2019, Hong Kong, China, November 3-7, 2019, pp. 3630–3634, 2019. OpenAlex ↗ · Scholar ↗
  53. Turc, I., Chang, M., Lee, K., and Toutanova, K. Well-read students learn better: The impact of student initialization on knowledge distillation. CoRR, abs/1908.08962, 2019a. URL http://arxiv.org/abs/1908.08962. OpenAlex ↗ · Scholar ↗
  54. Turc, I., Chang, M., Lee, K., and Toutanova, K. Well-read students learn better: The impact of student initialization on knowledge distillation. CoRR, abs/1908.08962, 2019b. URL http://arxiv.org/abs/1908.08962. OpenAlex ↗ · Scholar ↗
  55. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. Attention is all you need. In Advances in Neural Information Processing Systems 30, pp. 5998–6008. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf. our card
  56. Wang, A., Singh, A., Michael, J., Hill, F., Levy, O., and Bowman, S. R. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=rJ4km2R5t7. our card
  57. Warstadt, A., Singh, A., and Bowman, S. R. Neural network acceptability judgments. arXiv preprint arXiv:1805.12471, 2018. OpenAlex ↗ · Scholar ↗
  58. Williams, A., Nangia, N., and Bowman, S. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1112–1122, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. . URL https://www.aclweb.org/anthology/N18-1101. our card
  59. Wu, Y., Schuster, M., Chen, Z., Le, Q. V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., Macherey, K., Klingner, J., Shah, A., Johnson, M., Liu, X., Kaiser, L., Gouws, S., Kato, Y., Kudo, T., Kazawa, H., Stevens, K., Kurian, G., Patil, N., Wang, W., Young, C., Smith, J., Riesa, J., Rudnick, A., Vinyals, O., Corrado, G., Hughes, M., and Dean, J. Google's neural machine translation system: Bridging the gap between human and machine translation. CoRR, abs/1609.08144, 2016. URL http://arxiv.org/abs/1609.08144. OpenAlex ↗ · Scholar ↗
  60. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., and Le, Q. V. XLNet: Generalized autoregressive pretraining for language understanding. In 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), 2019. our card
  61. Zagoruyko, S. and Komodakis, N. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings, 2017. URL https://openreview.net/forum?id=Sks9\_ajex. our card
  62. Zhang, S. and Bansal, M. Addressing semantic drift in question generation for semi-supervised question answering. CoRR, abs/1909.06356, 2019. our card
  63. Zhao, Y., Ni, X., Ding, Y., and Ke, Q. Paragraph-level neural question generation with maxout pointer and gated self-attention networks. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3901–3910, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/D18-1424. our card
  64. Zhu, Y., Kiros, R., Zemel, R., Salakhutdinov, R., Urtasun, R., Torralba, A., and Fidler, S. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of the IEEE international conference on computer vision, pp. 19–27, 2015. our card