arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2203.01670cs.CL
收藏

一种简单的基于哈希的早期退出语言理解和生成方法

A Simple Hash-Based Early Exiting Approach For Language Understanding and Generation

Fudan University(复旦大学);East China Normal University(华东师范大学);Ping An Health and Technology Company Limited(平安健康科技有限公司);Ping An Healthcare Technology(平安医疗科技);Ping An International Smart City Technology Company Limited(平安国际智慧城市科技有限公司);Peng Cheng Laboratory(鹏城实验室)

Tianxiang Sun, Xiangyang Liu, Wei Zhu, Zhichao Geng, Lingling Wu, Yilong He, Yuan Ni, Guotong Xie, Xuanjing Huang, Xipeng Qiu

摘要:

提前退出允许实例根据难度的估计在不同的层退出。以往的工作通常采用启发式度量,如熵的内部输出来衡量实例的难度,这遭受泛化和阈值调整。相比之下,学习退出或学习预测实例难度是一种更有吸引力的方法。虽然一些努力已经致力于采用这样的“学习退出”模块,它仍然是未知的实例难度是否以及如何可以学习。作为回应,我们首先对实例难度的可学习性进行了实验,这表明现代神经模型在预测实例难度方面表现不佳。基于这一观察,我们提出了一种简单而有效的基于哈希的提前退出方法(HashEE),该方法用哈希函数取代了learn-to-exit模块,将每个令牌分配给固定的退出层。与以前的方法不同,HashEE不需要内部分类器,也不需要额外的参数,因此效率更高。分类,回归和生成任务的实验结果表明,HashEE可以实现更高的性能与更少的FLOP和推理时间相比,以前的国家的最先进的早期退出的方法。

英文摘要:

Early exiting allows instances to exit at different layers according to the estimation of difficulty. Previous works usually adopt heuristic metrics such as the entropy of internal outputs to measure instance difficulty, which suffers from generalization and threshold-tuning. In contrast, learning to exit, or learning to predict instance difficulty is a more appealing way. Though some effort has been devoted to employing such "learn-to-exit" modules, it is still unknown whether and how well the instance difficulty can be learned. As a response, we first conduct experiments on the learnability of instance difficulty, which demonstrates that modern neural models perform poorly on predicting instance difficulty. Based on this observation, we propose a simple-yet-effective Hash-based Early Exiting approach (HashEE) that replaces the learn-to-exit modules with hash functions to assign each token to a fixed exiting layer. Different from previous methods, HashEE requires no internal classifiers nor extra parameters, and therefore is more efficient. Experimental results on classification, regression, and generation tasks demonstrate that HashEE can achieve higher performance with fewer FLOPs and inference time compared with previous state-of-the-art early exiting methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑