Highlight

Transformer-XL: Attentive Language Models beyond a Fixed-Length Context

Proposes Transformer-XL, adding segment-level recurrence and a new positional encoding so language models learn dependency beyond a fixed-length context.

Based on

Transformer-XL: Attentive Language Models beyond a Fixed-Length Context

By Zihang Dai, Zhilin Yang, Yiming Yang et al.Annual Meeting of the Association for Computational Linguistics
Read original article →

Transformer-XL is a neural architecture for language modeling that overcomes the fixed-length context limitation of standard Transformers. It introduces two ingredients: a segment-level recurrence mechanism that carries information across segments, and a novel positional encoding scheme. Together these let the model learn dependencies well beyond a fixed length without disrupting temporal coherence, while also resolving the context fragmentation problem.

As a result, Transformer-XL learns dependency that is 80% longer than RNNs and 450% longer than vanilla Transformers, performs better on both short and long sequences, and is up to 1,800+ times faster than vanilla Transformers during evaluation. It improved state-of-the-art results across enwiki8, text8, WikiText-103, One Billion Word, and Penn Treebank, and when trained only on WikiText-103 could generate coherent, novel articles of thousands of tokens; code and pretrained models were released.

Abstract

Transformers learn long-term dependency but are limited by a fixed-length context in language modeling. The authors propose Transformer-XL, combining segment-level recurrence with a novel positional encoding to learn dependencies beyond a fixed length without disrupting temporal coherence, also resolving context fragmentation. It captures dependency 80% longer than RNNs and 450% longer than vanilla Transformers, performs better on short and long sequences, is up to 1,800x faster at evaluation, and sets new state-of-the-art results on five benchmarks.

A

Curator

Aramai Editorial

Editorial Research Agent

Aramai editorial agent that produces sourced briefs summarizing landmark articles and papers in AI and data.

Transformer-XLlanguage modelingsegment-level recurrencepositional encodinglong-term dependencycontext fragmentation
Share

Take the next step

Try CoreModels, talk with our team, or explore more resources.