[Paper Review] Early Exiting with Ensemble Internal Classifiers
This paper proposes a novel training objective and voting-based inference strategy for early exiting in pre-trained language models by leveraging ensemble learning and information theory. It jointly optimizes accuracy and diversity of internal classifiers across model layers, achieving better accuracy-speed trade-offs than prior methods, with up to 82.4% accuracy at 2.0× speed-up on ALBERT.
As a simple technique to accelerate inference of large-scale pre-trained models, early exiting has gained much attention in the NLP community. It allows samples to exit early at internal classifiers without passing through the entire model. Most existing work usually trains the internal classifiers independently and employs an exiting strategy to decide whether or not to exit based on the confidence of the current internal classifier. However, none of these works takes full advantage of the fact that the internal classifiers are trained to solve the same task therefore can be used to construct an ensemble. In this paper, we show that a novel objective function for the training of the ensemble internal classifiers can be naturally induced from the perspective of ensemble learning and information theory. The proposed training objective consists of two terms: one for accuracy and the other for the diversity of the internal classifiers. In contrast, the objective used in prior work is exactly the accuracy term of our training objective therefore only optimizes the accuracy but not diversity. Further, we propose a simple voting-based strategy that considers predictions of all the past internal classifiers to infer the correct label and decide whether to exit. Experimental results on various NLP tasks show that our proposed objective function and voting-based strategy can achieve better accuracy-speed trade-offs.
Motivation & Objective
- Address the inefficiency of existing early exiting methods that optimize only accuracy without considering diversity among internal classifiers.
- Improve inference speed and accuracy by modeling early exiting as an ensemble learning problem.
- Develop a new training objective that balances accuracy and diversity of internal classifiers using information theory.
- Propose a voting-based exiting strategy that uses predictions from all past internal classifiers to make exit decisions.
- Achieve better accuracy-speed trade-offs than state-of-the-art methods like DistilBERT and LayerDrop on multiple NLP benchmarks.
Proposed method
- Formulate early exiting as an ensemble learning problem where internal classifiers at different layers are combined to improve prediction reliability.
- Propose a novel loss function with two terms: one maximizing likelihood of ground truth (accuracy), and another minimizing mutual information between classifier predictions (diversity).
- Use information theory to derive a lower bound on mutual information between the joint prediction of internal classifiers and the true label, which the loss function optimizes.
- Introduce a dynamic soft label target {1−λpc, λpc} for diversity regularization, analogous to label smoothing but adaptive per layer.
- Design a voting-based exiting strategy that aggregates predictions from all previously passed internal classifiers to infer the final label and decide whether to exit.
- Integrate the proposed loss and strategy with any backbone model (e.g., BERT, ALBERT), enabling plug-and-play deployment.
Experimental results
Research questions
- RQ1Can jointly optimizing accuracy and diversity of internal classifiers improve early exiting performance?
- RQ2How does the proposed information-theoretic loss function compare to standard cross-entropy loss in terms of generalization and speed-accuracy trade-offs?
- RQ3Does a voting-based exit strategy that leverages all past internal classifiers outperform confidence-based or patience-based strategies?
- RQ4How robust are the proposed methods to hyperparameter choices (λ and k) across different models and datasets?
- RQ5To what extent does diversity regularization mitigate overconfidence in deeper layers of pre-trained models?
Key findings
- The proposed method achieves 95.2% accuracy and 82.4% F1-score at 2.0× speed-up on ALBERT for multi-class text classification, outperforming prior methods including PABEE and DistilBERT.
- On the SST-2 development set, the model with the proposed loss and voting strategy reaches 97.0% accuracy at 2.0× speed-up, surpassing the Oracle baseline in accuracy while being faster.
- The ablation study shows that λ = 0.2 yields the best accuracy-speed trade-off, while setting λ = 0 (removing diversity loss) results in the worst performance.
- The voting-based strategy consistently outperforms patience-based and entropy-based strategies at speed-up ratios below 1.4×, demonstrating its effectiveness in early exit decisions.
- Empirical analysis confirms that diversity regularization softens targets in deeper layers, reducing overconfidence and improving generalization.
- The diversity loss primarily acts on adjacent layers, as they show the highest correlation in predictions, validating its efficiency in promoting inter-layer diversity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.