Consistent Accelerated Inference via Confident Adaptive Transformers

Tal Schuster, Adam Fisch, Tommi Jaakkola, Regina Barzilay
4/18/2021
cs.CLcs.AIcs.LG
transformer-attention

Official code: TalSchuster/CATs (15 stars, Python, MIT, last commit 2021-04-18).

Abstract

We develop a novel approach for confidently accelerating inference in the large and expensive multilayer Transformers that are now ubiquitous in natural language processing (NLP). Amortized or approximate computational methods increase efficiency, but can come with unpredictable performance costs.

Show full abstract

In this work, we present CATs -- Confident Adaptive Transformers -- in which we simultaneously increase computational efficiency, while guaranteeing a specifiable degree of consistency with the original model with high confidence. Our method trains additional prediction heads on top of intermediate layers, and dynamically decides when to stop allocating computational effort to each input using a meta consistency classifier. To calibrate our early prediction stopping rule, we formulate a unique extension of conformal prediction. We demonstrate the effectiveness of this approach on four classification and regression tasks.

View on arXivView PDF

Code Implementations(1)

TalSchuster/CATsOfficial100%
MIT

Confident Adaptive Transformers

154PythonApr 16, 20215 years agoMIT

Similar Papers

Cite this paper

@article{schuster2021consistent,
  title  = {Consistent Accelerated Inference via Confident Adaptive Transformers},
  author = {Tal Schuster and Adam Fisch and Tommi Jaakkola and Regina Barzilay},
  year   = {2021},
  eprint = {2104.08803},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.08803}
}

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

Discussion