Towards More Efficient Insertion Transformer with Fractional Positional Encoding

Zhisong Zhang, Yizhe Zhang, Bill Dolan


Abstract
Auto-regressive neural sequence models have been shown to be effective across text generation tasks. However, their left-to-right decoding order prevents generation from being parallelized. Insertion Transformer (Stern et al., 2019) is an attractive alternative that allows outputting multiple tokens in a single generation step. Nevertheless, due to the incompatibility between absolute positional encoding and insertion-based generation schemes, it needs to refresh the encoding of every token in the generated partial hypothesis at each step, which could be costly. We design a novel reusable positional encoding scheme for Insertion Transformers called Fractional Positional Encoding (FPE), which allows reusing representations calculated in previous steps. Empirical studies on various text generation tasks demonstrate the effectiveness of FPE, which leads to floating-point operation reduction and latency improvements on batched decoding.
Anthology ID:
2023.eacl-main.115
Volume:
Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics
Month:
May
Year:
2023
Address:
Dubrovnik, Croatia
Editors:
Andreas Vlachos, Isabelle Augenstein
Venue:
EACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1564–1572
Language:
URL:
https://aclanthology.org/2023.eacl-main.115
DOI:
10.18653/v1/2023.eacl-main.115
Bibkey:
Cite (ACL):
Zhisong Zhang, Yizhe Zhang, and Bill Dolan. 2023. Towards More Efficient Insertion Transformer with Fractional Positional Encoding. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 1564–1572, Dubrovnik, Croatia. Association for Computational Linguistics.
Cite (Informal):
Towards More Efficient Insertion Transformer with Fractional Positional Encoding (Zhang et al., EACL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.eacl-main.115.pdf
Video:
 https://aclanthology.org/2023.eacl-main.115.mp4