XLNet
The XLNet was an autoregressive Transformer designed as an improvement over BERT, with 340M parameters and trained on 33 billion words. It was released on 19 June 2019, under the Apache 2.0 license. It achieved state-of-the-art results on a variety of natural language processing tasks, including language modeling, question answering, and natural language inference. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.
The XLNet was an autoregressive Transformer designed as an improvement over BERT, with 340M parameters and trained on 33 billion words. It was released on 19 June 2019, under the Apache 2.0 license. It achieved state-of-the-art results on a variety of natural language processing tasks, including language modeling, question answering, and natural language inference. We factorize the joint probability of a sequence of words x_1, \ldots, x_T using the chain rule: \Pr(x_1, \ldots, x_T) = \Pr(x_1) \Pr(x_2 | x_1) \Pr(x_3 | x_1, x_2) \ldots \Pr(x_T | x_1, \ldots, x_{T-1}). For example, the sentence "My dog is cute" is factorized as: \Pr(\text{My}, \text{dog}, \text{is}, \text{cute}) = \Pr(\text{My}) \Pr(\text{dog} | \text{My}) \Pr(\text{is} | \text{My}, \text{dog}) \Pr(\text{cute} | \text{My}, \text{dog}, \text{is}). Schematically, we can write it as \texttt{ } \texttt{ } \texttt{ } \texttt{ } \to \text{My } \texttt{ } \texttt{ } \texttt{ } \to \text{My dog }\texttt{ } \texttt{ } \to \text{My dog is }\texttt{ } \to \text{My dog is cute}. However, for XLNet, the model is required to predict the words in a randomly generated order. Suppose we have sampled a randomly generated order 3241, then schematically, the model is required to perform the following prediction task: \texttt{ } \texttt{ } \texttt{ } \texttt{ } \to \texttt{ } \texttt{ } \text{is }\texttt{ } \to \texttt{ } \text{dog is }\texttt{ } \to \texttt{ }\text{dog is cute} \to \text{My dog is cute} By considering all permutations, XLNet is able to capture longer-range dependencies and better model the bidirectional context of words. The content stream uses the causal mask M_{\text{causal}} = \begin{bmatrix} 0 & -\infty & -\infty & \dots & -\infty \\ 0 & 0 & -\infty & \dots & -\infty \\ 0 & 0 & 0 & \dots & -\infty \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \dots & 0 \end{bmatrix} permuted by a random permutation matrix to P M_{\text{causal}} P^{-1} . The query stream uses the cross-attention mask P (M_{\text{causal}} - \infty I) P^{-1} , where the diagonal is subtracted away specifically to avoid the model "cheating" by looking at the content stream for what the current masked token is. Like the causal masking for GPT models, this two-stream masked architecture allows the model to train on all tokens in one forward pass.
Cite this
"XLNet". 1786372984. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1368704963 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy