PALBERT: Teaching ALBERT to Ponder

Nikita Balagansky, Daniil Gavrilov
4/7/2022
cs.LGcs.CL

Official code: tinkoff-ai/palbert (37 stars, Python, Apache-2.0, last commit 2023-04-08).

Abstract

Currently, pre-trained models can be considered the default choice for a wide range of NLP tasks. Despite their SoTA results, there is practical evidence that these models may require a different number of computing layers for different input sequences, since evaluating all layers leads to overconfidence in wrong predictions (namely overthinking).

Show full abstract

This problem can potentially be solved by implementing adaptive computation time approaches, which were first designed to improve inference speed. Recently proposed PonderNet may be a promising solution for performing an early exit by treating the exit layer's index as a latent variable. However, the originally proposed exit criterion, relying on sampling from trained posterior distribution on the probability of exiting from the $i$-th layer, introduces major variance in exit layer indices, significantly reducing the resulting model's performance. In this paper, we propose improving PonderNet with a novel deterministic Q-exit criterion and a revisited model architecture. We adapted the proposed mechanism to ALBERT and RoBERTa and compared it with recent methods for performing an early exit. We observed that the proposed changes can be considered significant improvements on the original PonderNet architecture and outperform PABEE on a wide range of GLUE tasks. In addition, we also performed an in-depth ablation study of the proposed architecture to further understand Lambda layers and their performance.

View on arXivView PDF

Code Implementations(1)

tinkoff-ai/palbertOfficial100%
Apache-2.0

Code for the paper "PALBERT: Teaching ALBERT to Ponder", NeurIPS 2022 Spotlight

371Python, DockerfileNov 17, 20223 years agoApache-2.0
albertbertgluepondernetroberta

Similar Papers

Cite this paper

@article{balagansky2022palbert,
  title  = {PALBERT: Teaching ALBERT to Ponder},
  author = {Nikita Balagansky and Daniil Gavrilov},
  year   = {2022},
  eprint = {2204.03276},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.03276}
}

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

Discussion