Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing

Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le
6/5/2020
277 citations
cs.LGcs.CLstat.ML
transformer-attention

Official code: laiguokun/Funnel-Transformer (220 stars, Python, MIT, last commit 2020-06-08).

Abstract

With the success of language pretraining, it is highly desirable to develop more efficient architectures of good scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the much-overlooked redundancy in maintaining a full-length token-level presentation, especially for tasks that only require a single-vector presentation of the sequence.

Show full abstract

With this intuition, we propose Funnel-Transformer which gradually compresses the sequence of hidden states to a shorter one and hence reduces the computation cost. More importantly, by re-investing the saved FLOPs from length reduction in constructing a deeper or wider model, we further improve the model capacity. In addition, to perform token-level predictions as required by common pretraining objectives, Funnel-Transformer is able to recover a deep representation for each token from the reduced hidden sequence via a decoder. Empirically, with comparable or fewer FLOPs, Funnel-Transformer outperforms the standard Transformer on a wide variety of sequence-level prediction tasks, including text classification, language understanding, and reading comprehension. The code and pretrained checkpoints are available at https://github.com/laiguokun/Funnel-Transformer.

View on arXivView PDF

Code Implementations(1)

MIT
22019Python, ShellJun 7, 20206 years agoMIT

Similar Papers

Cite this paper

@article{dai2020funneltransformer,
  title  = {Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processing},
  author = {Zihang Dai and Guokun Lai and Yiming Yang and Quoc V. Le},
  year   = {2020},
  eprint = {2006.03236},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.03236}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2006.03236.svg)](https://codeofpaper.com/paper/2006.03236)

Discussion