Skip to content

Attention Is All You Need

作者:Vaswani et al. (Google Brain, 2017)
引用:超过 100,000 次

抛弃 RNN 和 CNN,完全基于 Self-Attention 构建模型。三大优势:

  1. 并行计算:不使用循环,所有位置同时计算
  2. 短路径:任意两个位置只需 O(1) 步
  3. 可解释:注意力权重可视化
组件
dmodeld_{\text{model}}512
头数 hh8
dk,dvd_k, d_v64
FFN 隐藏层2048
Encoder/Decoder 层数6
Dropout0.1
优化器Adam (β1=0.9,β2=0.98\beta_1=0.9, \beta_2=0.98)
学习率warmup 4000 步后衰减

WMT 2014 英德翻译:

模型BLEU训练成本
ConvS2S (之前最佳)26.4
Transformer (base)27.31/4
Transformer (big)28.41/3

“We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely.”