[论文解读] AutoBERT-Zero: Evolving BERT Backbone from Scratch
该论文提出了一种名为 AutoBERT-Zero 的新型神经架构搜索框架,通过结合基础数学运算和卷积模块的灵活搜索空间,从零开始演化出类似 BERT 的主干网络。通过引入一种操作优先级 NAS(OP-NAS)算法并采用双分支权重重用机制以实现高效评估,该方法发现了一种混合架构,在 GLUE 上分别以 2.4 和 1.4 分的更高得分超越 BERT 和 RoBERTa,同时显著降低了 FLOPs、延迟和内存占用。
Transformer-based pre-trained language models like BERT and its variants have recently achieved promising performance in various natural language processing (NLP) tasks. However, the conventional paradigm constructs the backbone by purely stacking the manually designed global self-attention layers, introducing inductive bias and thus leads to sub-optimal. In this work, we make the first attempt to automatically discover novel pre-trained language model (PLM) backbone on a flexible search space containing the most fundamental operations from scratch. Specifically, we propose a well-designed search space which (i) contains primitive math operations in the intra-layer level to explore novel attention structures, and (ii) leverages convolution blocks to be the supplementary for attentions in the inter-layer level to better learn local dependency. To enhance the efficiency for finding promising architectures, we propose an Operation-Priority Neural Architecture Search (OP-NAS) algorithm, which optimizes both the search algorithm and evaluation of candidate models. Specifically, we propose Operation-Priority (OP) evolution strategy to facilitate model search via balancing exploration and exploitation. Furthermore, we design a Bi-branch Weight-Sharing (BIWS) training strategy for fast model evaluation. Extensive experiments show that the searched architecture (named AutoBERT-Zero) significantly outperforms BERT and its variants of different model capacities in various downstream tasks, proving the architecture's transfer and scaling abilities. Remarkably, AutoBERT-Zero-base outperforms RoBERTa-base (using much more data) and BERT-large (with much larger model size) by 2.4 and 1.4 higher score on GLUE test set.
研究动机与目标
- 为克服 BERT 及其变体中手动设计的自注意力机制所存在的归纳偏置和次优性能问题。
- 自动发现更高效且更强大的注意力结构与主干网络架构,用于预训练语言模型(PLMs)。
- 设计一种灵活的搜索空间,结合层内操作与层间全局(注意力)和局部(卷积)操作,以更好地建模全局与局部依赖关系。
- 开发一种高效的 NAS 算法,显著降低 PLM 架构搜索的计算成本,从而实现高性能架构的实际发现。
- 验证所搜索架构在不同模型尺寸和下游 NLP 任务中的可迁移性与可扩展性。
提出的方法
- 提出一种灵活的搜索空间,包含层内操作(如加法、乘法等基础数学运算),以探索具有可变路径长度和输入节点的新型注意力机制。
- 引入层间搜索空间,结合自注意力与卷积模块,以在各层间平衡全局与局部特征学习。
- 设计一种操作优先(OP)演化策略,利用基于置信度的 UCB 选择机制,在架构变异过程中平衡探索与利用。
- 设计一种双分支权重重用(BIWS)训练策略,通过在注意力与卷积组件的超网络分支间共享权重,加速模型评估。
- 采用代理评估流程:在 40k 步预训练后进行 GLUE 微调,以高效地对候选架构进行排序。
- 采用两阶段训练流程:首先通过 BIWS 实现快速评估的 NAS,然后使用标准超参数在标准基准上进行完整微调。
实验结果
研究问题
- RQ1神经架构搜索框架能否发现比人工设计的自注意力机制更有效且更高效的 PLM 主干网络?
- RQ2将学习到的注意力结构与卷积操作相结合,是否能提升预训练语言模型的性能与效率?
- RQ3一种高效的 NAS 算法能否显著降低 PLM 主干网络搜索的计算成本,同时保持高性能?
- RQ4所搜索的架构是否在不同模型尺寸和下游 NLP 任务中具有良好的泛化能力?
- RQ5所发现的架构能否在数据量更少、参数量更小的情况下,超越 RoBERTa 和 BERT-large 等现有 SOTA 模型?
主要发现
- AutoBERT-Zero-base 在 GLUE 上取得 86.3 的分数,分别高于 RoBERTa-base(83.9)和 BERT-large(84.9)2.4 和 1.4 分。
- 与 BERT-base 相比,所搜索架构在 V100 上将 FLOPs 减少 20.7%(2.3e10 vs. 2.9e10),推理延迟降低 7.2%(27.2s vs. 29.3s)。
- AutoBERT-Zero-base 使用 104M 参数,略少于 BERT-base(110M),但性能更优。
- 模型内存占用为 2.1G,相比 BERT-base(2.5G)减少 16%,展现出更高的内存效率。
- BIWS 训练策略将总搜索成本从估算的 182K GPU 小时降低至 24K GPU 小时,显著提升了效率。
- 所搜索架构展现出强大的可迁移性,在 GLUE、SQuAD v1.1、SQuAD v2.0 及其他基准上均达到 SOTA 性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。