[论文解读] XLNet: Generalized Autoregressive Pretraining for Language Understanding
XLNet 引入基于置换的自回归预训练和两流注意力以捕捉双向上下文,在多种 NLP 任务上超越 BERT 和 RoBERTa,且不存在预训练与微调之间的差异。
With the capability of modeling bidirectional contexts, denoising autoencoding based pretraining like BERT achieves better performance than pretraining approaches based on autoregressive language modeling. However, relying on corrupting the input with masks, BERT neglects dependency between the masked positions and suffers from a pretrain-finetune discrepancy. In light of these pros and cons, we propose XLNet, a generalized autoregressive pretraining method that (1) enables learning bidirectional contexts by maximizing the expected likelihood over all permutations of the factorization order and (2) overcomes the limitations of BERT thanks to its autoregressive formulation. Furthermore, XLNet integrates ideas from Transformer-XL, the state-of-the-art autoregressive model, into pretraining. Empirically, under comparable experiment settings, XLNet outperforms BERT on 20 tasks, often by a large margin, including question answering, natural language inference, sentiment analysis, and document ranking.
研究动机与目标
- 动机并解决自回归和自编码预训练方案(AR 与 AE)在双向语言理解方面的局限性。
- 提出一个统一的预训练目标,结合自回归的优势与双向上下文。
- 融入 Transformer-XL 特征,以处理更长的上下文并提升训练效率。
- 开发与置换式预训练兼容的目标感知两流注意力机制。
提出的方法
- 定义置换语言建模:在序列的所有分解顺序上最大化期望对数似然。
- 引入带有内容流和目标感知查询流的两流自注意力,以产生针对目标的预测。
- 通过在给定置换中预测子集令牌来计算部分预测目标,以简化优化。
- 加入 Transformer-XL 风格的相对分段编码和循环,以建模长上下文。
- 通过内存建模多段来处理更长的输入以及问答和文档排序等任务。
- 在大规模多语言英文语料上进行训练,序列长度为 512,并与 BERT 风格基线进行公平比较。
实验结果
研究问题
- RQ1基于置换的自回归预训练是否能有效学习到双向上下文?
- RQ2移除输入污染(无掩码)是否能避免预训练-微调不一致,同时保持性能?
- RQ3Transformer-XL 组件(相对编码与循环)是否提升了 XLNet 对长上下文的处理?
- RQ4在置换因子分解下,目标感知的两流注意力机制对目标预测是否必要?
主要发现
- 在可比设置下,XLNet 在包括 GLUE、SQuAD、RACE 及文档排序等广泛任务上超越 BERT。
- 在需要更长上下文的任务(如 SQuAD、RACE)上,性能提升尤为显著。
- 在消融实验中,Transformer-XL 与置换语言建模均对超越 BERT 的提升有贡献;内存、跨度级预测和双向数据管道也提升了结果。
- BERT 的下一句预测目标对 XLNet 并不始终有帮助,在 XLNet 的变体中也没有使用。
- 在若干阅读理解和 GLUE 基准测试上,XLNet 达到与 RoBERTa 相当或更优的结果。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。