CLDec 20, 2022

A Length-Extrapolatable Transformer

MicrosoftTsinghua
arXiv:2212.10554v1288 citationsh-index: 102
Originality Incremental advance
AI Analysis

This addresses a key limitation in Transformer-based language models for applications requiring handling of variable-length sequences, though it is incremental in nature.

The paper tackles the problem of length extrapolation in Transformers, where models trained on short texts struggle with longer sequences, and shows that their proposed model achieves strong performance in both interpolation and extrapolation settings.

Position modeling plays a critical role in Transformers. In this paper, we focus on length extrapolation, i.e., training on short texts while evaluating longer sequences. We define attention resolution as an indicator of extrapolation. Then we propose two designs to improve the above metric of Transformers. Specifically, we introduce a relative position embedding to explicitly maximize attention resolution. Moreover, we use blockwise causal attention during inference for better resolution. We evaluate different Transformer variants with language modeling. Experimental results show that our model achieves strong performance in both interpolation and extrapolation settings. The code will be available at https://aka.ms/LeX-Transformer.

Code Implementations5 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes