Sparsifying Transformer Models with Trainable Representation Pooling

Michał Pietruszka, Łukasz Borchmann, Łukasz Garncarek
9/10/2020
cs.CLcs.LG
transformer-attention

Official code: applicaai/pyramidions (14 stars, Python, last commit 2022-05-15).

Abstract

We propose a novel method to sparsify attention in the Transformer model by learning to select the most-informative token representations during the training process, thus focusing on the task-specific parts of an input. A reduction of quadratic time and memory complexity to sublinear was achieved due to a robust trainable top-$k$ operator.

Show full abstract

Our experiments on a challenging long document summarization task show that even our simple baseline performs comparably to the current SOTA, and with trainable pooling, we can retain its top quality, while being $1.8\times$ faster during training, $4.5\times$ faster during inference, and up to $13\times$ more computationally efficient in the decoder.

View on arXivView PDF

Code Implementations(1)

This repository contains a demonstrative implementation for pooling-based models, e.g., DeepPyramidion complementing our paper "Sparsifying Transformer Models with Trainable Representation Pooling."

140Python, ShellJul 2, 20214 years ago

Similar Papers

Cite this paper

@article{pietruszka2020sparsifying,
  title  = {Sparsifying Transformer Models with Trainable Representation Pooling},
  author = {Michał Pietruszka and Łukasz Borchmann and Łukasz Garncarek},
  year   = {2020},
  eprint = {2009.05169},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2009.05169}
}

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/2009.05169.svg)](https://codeofpaper.com/paper/2009.05169)

Discussion