[论文解读] Language Models with Transformers
该论文提出 Coordinate Architecture Search (CAS) 通过为语言模型在预训练的 GPT/BERT 类Transformer中添加 LSTM 层和选择性微调,以此来适应语言建模,在 PTB、WikiText-2、WikiText-103 上对现有最先进的 LSTM 获得显著困惑度提升。
The Transformer architecture is superior to RNN-based models in computational efficiency. Recently, GPT and BERT demonstrate the efficacy of Transformer models on various NLP tasks using pre-trained language models on large-scale corpora. Surprisingly, these Transformer architectures are suboptimal for language model itself. Neither self-attention nor the positional encoding in the Transformer is able to efficiently incorporate the word-level sequential context crucial to language modeling. In this paper, we explore effective Transformer architectures for language model, including adding additional LSTM layers to better capture the sequential context while still keeping the computation efficient. We propose Coordinate Architecture Search (CAS) to find an effective architecture through iterative refinement of the model. Experimental results on the PTB, WikiText-2, and WikiText-103 show that CAS achieves perplexities between 20.42 and 34.11 on all problems, i.e. on average an improvement of 12.0 perplexity units compared to state-of-the-art LSTMs. The source code is publicly available.
研究动机与目标
- 激励在语言模型中捕捉精细词级序列上下文的架构需求。
- 提出 Coordinate Architecture Search (CAS) 以高效地优化预训练的 Transformer 架构用于语言建模。
- 证明添加 LSTM 层和有选择的微调能在困惑度上优于基于 LSTM 的基线。
- 展示 CAS 如何利用先前的 GPT/BERT 模型在降低搜索成本的情况下取得优异结果。
提出的方法
- 引入一个以 Transformer 为基础的语言模型,并增添 LSTM 层以捕捉细粒度的顺序上下文。
- 定义并应用 Coordinate Architecture Search (CAS),一种贪婪的、随机采样的程序,用于生成和评估架构变体。
- 仅微调一部分权重或在重用预训练的 GPT/BERT 权重的同时改造架构,以降低训练成本。
- 在 PTB、WT-2 和 WT-103 上评估 CAS 变体,使用子词词汇(WordPiece 和 BPE)和 perplexity 作为评估指标。
- 将 CAS 与 GPT、BERT 与 AWD-LSTM-MoS 基线进行比较,包括没有 LSTMs 的消融或固定 Transformer 块的情形。
- 给出相对于 NAS/ENAS/DARTS 的 GPU-days 等效率指标,并描述词汇表与训练数据方面的考量。
实验结果
研究问题
- RQ1在基于 Transformer 的语言模型中添加 LSTM 层是否有助于改进用于下一词预测的词级序列上下文建模?
- RQ2一种贪婪的架构改进搜索(CAS)是否能够从预训练的 GPT/BERT 起点中有效识别高性能的语言模型架构?
- RQ3CAS 相对于标准的 LSTM/Transformer 基线及现代语言模型在 PTB、WT-2、WT-103 的 perplexity 性能如何?
- RQ4微调策略(子集固定 vs 全部微调)对不同数据集规模下的性能与过拟合有何影响?
主要发现
- CAS 派生架构(BERT-CAS 和 GPT-CAS)在 PTB、WT-2 和 WT-103 的 perplexity 上超越 AWD-LSTM-MoS 基线。
- BERT-Large-CAS 达到强劲的 perplexities——在 PTB: 31.34(val),在 WT-103 的 test: 34.11,显示了更大预训练起点的好处。
- GPT-CAS 实现了有竞争力的 perplexities,特别是在 WT-103 的测试中达到 34.24,使用了子词词汇。
- 消融研究表明增加 LSTMs 并部分更新 Transformer 权重相比简单使用 GPT/BERT 显著提升性能。
- CAS 在报道的实验中相较 NAS/ENAS/DARTS 展示了更高的搜索效率(更少的 GPU-days)。
- 在相近的参数量下,BERT-Large-CAS 往往优于 GPT-2 在 PTB 与 WT-103 上,体现出较好的效率和效果。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。