Skip to main content
QUICK REVIEW

[论文解读] Applying the Transformer to Character-level Transduction

Shijie Wu, Ryan Cotterell|arXiv (Cornell University)|May 20, 2020
Natural Language Processing TechniquesComputer Science参考文献 31被引用 27
一句话总结

该论文表明,当使用大批次和特征不变的输入表示进行训练时,Transformer 架构在字符级转换任务上实现了最先进性能,包括词形变化、历史文本规范化、音素转写和音译任务,尽管参数量更少,但仍优于以往的循环神经网络序列到序列模型。

ABSTRACT

The transformer has been shown to outperform recurrent neural network-based sequence-to-sequence models in various word-level NLP tasks. Yet for character-level transduction tasks, e.g. morphological inflection generation and historical text normalization, there are few works that outperform recurrent models using the transformer. In an empirical study, we uncover that, in contrast to recurrent sequence-to-sequence models, the batch size plays a crucial role in the performance of the transformer on character-level tasks, and we show that with a large enough batch size, the transformer does indeed outperform recurrent models. We also introduce a simple technique to handle feature-guided character-level transduction that further improves performance. With these insights, we achieve state-of-the-art performance on morphological inflection and historical text normalization. We also show that the transformer outperforms a strong baseline on two other character-level transduction tasks: grapheme-to-phoneme conversion and transliteration.

研究动机与目标

  • 调查为何 Transformer 在字符级转换任务上表现不佳,尽管其在词级自然语言处理任务中表现优异。
  • 识别并解决限制 Transformer 在低资源字符级设置下性能的关键超参数瓶颈——批量大小。
  • 提出一种特征不变的输入表示方法,以消除特征引导转换任务中的顺序偏差。
  • 通过一个极简且精心调优的 Transformer,在四个字符级转换任务上建立最先进结果。
  • 证明当在低资源、字符级序列到序列任务上进行适当优化时,Transformer 可以超越强大的 RNN 基线模型。

提出的方法

  • 采用一个小型 Transformer 模型,包含 N=4 层,d_model=256,d_ff=1024,以及 4 个注意力头,以降低模型容量,适应低资源设置。
  • 通过将词形特征的位置嵌入设为零,并使用特殊标记来区分特征与字符,引入特征不变的位置编码。
  • 使用大批次大小(最高达 400,约占 10k 训练样本数据集的 4%)以稳定训练并提升性能。
  • 应用标签平滑(0.1),并使用 Adam 优化器,β2=0.98 或 0.999,以提升字符级任务上的泛化能力。
  • 采用从左到右的贪婪解码方式训练模型,使用学习得到的字符嵌入和 softmax 前的线性层。
  • 根据任务调整 dropout 率(0.1 和 0.3),以在低资源环境下平衡过拟合与泛化。

实验结果

研究问题

  • RQ1为何 Transformer 在字符级转换任务上的表现不如 RNN,尽管其在词级任务中表现优异?
  • RQ2批量大小在低资源、字符级序列到序列任务中对 Transformer 性能的影响程度如何?
  • RQ3如何对特征引导的输入(如词形属性)进行编码,以保持模型对特征顺序的不变性?
  • RQ4一个小型且精心调优的 Transformer 是否能在字符级转换任务上超越强大的循环基线模型?
  • RQ5Transformer 的性能优势是否能在包括词形变化、g2p、音译和文本规范化在内的多样化字符级任务中持续体现?

主要发现

  • 在词形变化任务上,Transformer 以 94.81% 的开发集准确率超越了强大的循环基线模型,达到新的最先进水平。
  • 在词形变化任务上,性能随批量大小增加而稳步提升,仅当批量大小 ≥128 时,Transformer 才能超越 RNN。
  • 特征不变的 Transformer 在历史文本规范化任务上达到 91.85% 的准确率,比之前最先进方法高出 0.24 个百分点。
  • 在音素转写任务上,Transformer 实现了 27.63% 的 WER 和 0.069 的 PER,优于以往的循环模型。
  • 在音译任务上,使用 dropout=0.3 的 Transformer 实现了 43.39% 的 MFS 分数,显著优于以往结果。
  • 在历史文本规范化任务中,dropout=0.3 的模型表现最佳(CERi=0.340),而 g2p 任务中 dropout=0.1 最优,表明超参数对任务具有敏感性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。