Attribution-Driven Dropout
Inspired by the observations in Section 2.2 , we propose a novel regularizer, AD-Drop , to better prevent overfitting when adapting PrLMs to downstream tasks. The motivation of AD-Drop is to minimize the over-reliance of these models on particular features which may affect their generalization. Formally, given a training set \mathcal{D}=\left\{{\left({{{{x}}_{i}},{{{y}}_{i}}}\right)}\right\}_{i=1}^{N} of N samples, where x_{i} is the i -th sample and y_{i} is its label, the goal of AD-Drop is to fine-tune a PrLM F{\left({\cdot}\right)} of L layers on \mathcal{D} . Same as the vanilla dropout [ 19 ] , AD-Drop is only applied in the training phase.

As shown in Figure 3 , the idea of AD-Drop can be described in four steps. First, we conduct a forward computation of the model to obtain the label with the highest probability as the pseudo label. The reason we adopt pseudo labels rather than gold labels for attribution will be explained shortly. Specifically, for the input x_{i} with n tokens, we apply F{\left({\cdot}\right)} to encode it and obtain its pseudo label \tilde{c} :

\tilde{{c}}={\mathop{\arg\max}_{c}}\left({P_{F}}\!\left({{c}|{x_{i}}}\right)\right), (4)

where {P_{F}}\!\left(c|x_{i}\right) is the probability of class c for x_{i} . After the forward computation, we also obtain a set of attention maps {\bf{A}}=\left[{{\bf{A}}_{1},{\bf{A}}_{2},\cdots,{\bf{A}}_{H}}\right] for each layer according to Eq. ( 1 ).

Second, we compute the attribution matrices {\bf{B}}=\left[{{\bf{B}}_{1},{\bf{B}}_{2},\cdots,{\bf{B}}_{H}}\right] for H heads according to Eq. ( 2 ). Specifically, the attribution matrix {\bf{B}}_{h} for the h -th head is computed as:

{{\bf{B}}_{h}={\frac{{\partial F_{\tilde{{c}}}\left({{\bf{A}}}\right)}}{{\partial{\bf{A}}_{h}}}}}, (5)

where F_{\tilde{c}}\left({{\bf{A}}}\right) is the logit output of pseudo label \tilde{c} before softmax. 2 2 2 The negative loss will be used for both regression and token-level tasks, as introduced in Appendix A .

Third, we generate a mask matrix {\bf{M}}_{h} based on {\bf{B}}_{h} . To this end, we first sort each row of {\bf{B}}_{h} in ascending order and obtain a sorted attribution matrix {{\bf{\widehat{B}}}_{h}} . Then, we define a candidate discard region {\bf{S}}_{h} , in which each element s_{i,j} is defined as:

s_{i,j}=\left\{{\begin{array}[]{*{20}{c}}1,&b_{i,j}<\widehat{b}_{i,\mathop{\rm int}\left(n\left(1-p\right)\right)}\ 0,&{{\rm{otherwise}}}\end{array}}\right

where b_{i,j} and \widehat{b}_{i,j} are elements of {\bf{B}}_{h} and {{\bf{\widehat{B}}}_{h}} , respectively, {\rm int}\!\left(\cdot\right) is an integer function, and p\in\left({0,1}\right) is used to control the size of the candidate discard region. Next, we apply dropout in the region to produce the mask matrix {\bf{M}}_{h} as:

m_{i,j}=\left\{{\begin{array}[]{*{20}{c}}{-\infty,}&{\left({{{{s}}_{i,j}}{\rm{+}}{u_{i,j}}}\right)=0}\ 0,&{{\rm{otherwise}}}\end{array}}\right

where u_{i,j}\sim{{\rm Bernoulli}\!\left(1-q\right)} is an element of matrix {{\bf{U}}_{h}}\in{\mathbb{R}^{n\times n}} , and q is the dropout rate.

Finally, {\bf{M}}_{h} is fed into self-attention of Eq. ( 1 ) for the second forward computation, and the final output is used to calculate the loss for backpropagation.