基于浅层攻击解码的即时语法纠错
Instantaneous Grammatical Error Correction with Shallow Aggressive Decoding
摘要:
在本文中,我们提出了浅侵略解码(SAD),以提高即时语法错误纠正(GEC)的Transformer的在线推理效率。SAD通过两个创新优化了GEC的在线推理效率:1)它并行地积极解码尽可能多的令牌,而不是总是在每个步骤中仅解码一个令牌,以提高计算并行性; 2)它使用浅解码器而不是具有平衡的编码器-解码器深度的传统Transformer架构,以降低推理期间的计算成本。在中英文GEC基准测试中的实验表明,积极解码可以产生与贪心解码相同的预测,但具有显着的在线推理速度。它与浅层解码器的结合可以在不损失质量的情况下提供比强大的Transformer基线更高的在线推理加速。我们的方法不仅允许单个模型在英语GEC基准测试中实现最先进的结果:CoNLL-14中的66.4 F0.5和ESTA-19测试集中的72.9 F0.5,在线推理速度比Transformer-big模型快近10倍,而且它很容易适应其他语言。我们的代码可在https://github.com/AutoTemp/Shallow-Aggressive-Decoding上获得。
英文摘要:
In this paper, we propose Shallow Aggressive Decoding (SAD) to improve the online inference efficiency of the Transformer for instantaneous Grammatical Error Correction (GEC). SAD optimizes the online inference efficiency for GEC by two innovations: 1) it aggressively decodes as many tokens as possible in parallel instead of always decoding only one token in each step to improve computational parallelism; 2) it uses a shallow decoder instead of the conventional Transformer architecture with balanced encoder-decoder depth to reduce the computational cost during inference. Experiments in both English and Chinese GEC benchmarks show that aggressive decoding could yield the same predictions as greedy decoding but with a significant speedup for online inference. Its combination with the shallow decoder could offer an even higher online inference speedup over the powerful Transformer baseline without quality loss. Not only does our approach allow a single model to achieve the state-of-the-art results in English GEC benchmarks: 66.4 F0.5 in the CoNLL-14 and 72.9 F0.5 in the BEA-19 test set with an almost 10x online inference speedup over the Transformer-big model, but also it is easily adapted to other languages. Our code is available at https://github.com/AutoTemp/Shallow-Aggressive-Decoding.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。