关于将 Transformer 注意力偏置至单调性
计算与语言
2021-04-09 v1
摘要
自然语言处理中的许多序列到序列任务在源序列与目标序列的对齐上大致是单调的,先前的工作通过专门的注意力函数或预训练来促进或强制学习单调注意力行为。在本工作中,我们引入一种与标准注意力机制兼容的单调性损失函数,并在若干序列到序列任务上进行了测试:字素到音素转换、形态屈折、音译和方言规范化。实验表明我们能够实现大体上的单调行为。性能表现不一,在 RNN 基线上提升较大。一般的单调性无益于 Transformer 多头注意力,然而,当我们仅将部分注意力头偏置至单调行为时,看到了孤立的改进。
引用
@article{arxiv.2104.03945,
title = {On Biasing Transformer Attention Towards Monotonicity},
author = {Annette Rios and Chantal Amrhein and Noëmi Aepli and Rico Sennrich},
journal= {arXiv preprint arXiv:2104.03945},
year = {2021}
}
备注
To be published in: Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2021)