通过去除无关特征提升预测置信度估计,让语言模型更可靠地提前退出。
Improving Prediction Certainty Estimation for Reliable Early Exiting via Null Space Projection
- 用特征中无关信息比例定义新置信度评分NSP
- 在GLUE上实现2.19倍加速,性能损失极小
- 适合追求推理效率又不牺牲准确率的场景
早期退出技术可通过让简单样本在浅层提前退出,显著加速预训练语言模型的推理,但现有方法主要依赖类别相关输出概率构建退出信号,忽略了特征中类别无关信息对预测置信度的干扰,导致置信度被高估,引发错误提前退出。为此,本文提出基于零空间投影(NSP)的置信度估计方法,通过计算特征中类别无关信息的比例来更准确评估预测置信度。在此基础上,设计了一种融合输出概率与NSP得分的确定性感知概率(CAP)评分,以提升退出决策的可靠性。在GLUE基准测试上的实验表明,该方法在所有任务上平均提速2.19倍,性能下降可忽略,相比当前最优方法ConsistentEE提升28%,实现了性能与效率更优的平衡。代码已公开于https://github.com/He-Jianing/NSP.git。
原文摘要 · Abstract (English)
Early exiting has demonstrated great potential in accelerating the inference of pre-trained language models (PLMs) by enabling easy samples to exit at shallow layers, eliminating the need for executing deeper layers. However, existing early exiting methods primarily rely on class-relevant logits to formulate their exiting signals for estimating prediction certainty, neglecting the detrimental influence of class-irrelevant information in the features on prediction certainty. This leads to an overestimation of prediction certainty, causing premature exiting of samples with incorrect early predictions. To remedy this, we define an NSP score to estimate prediction certainty by considering the proportion of class-irrelevant information in the features. On this basis, we propose a novel early exiting method based on the Certainty-Aware Probability (CAP) score, which integrates insights from both logits and the NSP score to enhance prediction certainty estimation, thus enabling more reliable exiting decisions. The experimental results on the GLUE benchmark show that our method can achieve an average speed-up ratio of 2.19x across all tasks with negligible performance degradation, surpassing the state-of-the-art (SOTA) ConsistentEE by 28%, yielding a better trade-off between task performance and inference efficiency. The code is available at https://github.com/He-Jianing/NSP.git.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。