Consistent Accelerated Inference via Confident Adaptive Transformers
arXiv:2104.08803
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. 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.
arXiv commentEMNLP 2021
References in corpus (10)
- PyTorch: An Imperative Style, High-Performance Deep Learning Library
- Deep Residual Learning for Image Recognition
- On Calibration of Modern Neural Networks
- A tutorial on conformal prediction
- Adaptive Computation Time for Recurrent Neural Networks
- Reducing Transformer Depth on Demand with Structured Dropout
- Multi-Scale Dense Networks for Resource Efficient Image Classification
- The Cost of Training NLP Models: A Concise Overview
- BranchyNet: Fast Inference via Early Exiting from Deep Neural Networks
- Conformal Inference of Counterfactuals and Individual Treatment Effects