DE3-BERT: Distance-Enhanced Early Exiting for BERT based on Prototypical Networks
Existing BERT early-exit methods rely solely on per-sample local signals (e.g., entropy) to determine exit decisions, neglecting inter-class global structure—leading to biased reliability estimation and suboptimal exit choices. Method: This work introduces prototype networks into early-exit mechanisms for the first time, proposing a distance-enhanced reliability assessment paradigm that jointly models local entropy and Euclidean distance to class prototypes. A dual-signal, synergistic hybrid gating strategy is designed and integrated into BERT’s hierarchical inference architecture—requiring zero additional parameters or computational overhead. Contribution/Results: The method achieves significant improvements over state-of-the-art approaches on the GLUE benchmark across multiple acceleration ratios, consistently attaining higher accuracy. It exhibits strong generalization across diverse tasks and datasets, while offering enhanced interpretability through geometrically grounded exit decisions based on prototype distances and uncertainty.