arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1811.00641cs.LGcs.CLcs.NAmath.NAstat.ML
收藏

在线文本分类中的低秩矩阵分解用于词嵌入压缩

Online Embedding Compression for Text Classification using Low Rank Matrix Factorization

Amazon Alexa AI(亚马逊Alexa人工智能);Amazon Search Technologies(亚马逊搜索技术);University of Texas at Austin(德克萨斯大学奥斯汀分校)

Anish Acharya, Rahul Goel, Angeliki Metallinou, Inderjit Dhillon

AI总结:

本文提出了一种在线词嵌入压缩方法,利用低秩矩阵分解在训练过程中压缩词嵌入层,从而减少NLP模型的内存瓶颈,同时在下游任务中通过重新训练恢复精度,实验证明该方法在句子分类任务中实现了90%的压缩率,并优于固定点量化等其他方法。

摘要:

深度学习模型已成为自然语言处理(NLP)任务的最新技术,但将其部署到生产系统中却面临显著的内存限制。现有的压缩方法要么有损,要么引入显著的延迟。我们提出了一种压缩方法,利用低秩矩阵分解在训练过程中压缩词嵌入层,该层是大多数NLP模型的主要内存瓶颈。我们的模型在训练、压缩后,再在下游任务上重新训练以恢复精度,同时保持减小的尺寸。实验证明,所提出的方法在句子分类任务中可实现90%的压缩,对精度影响极小,并优于固定点量化或其他方法如离线词嵌入压缩。我们还通过FLOP计算分析了我们方法的推理时间和存储空间,显示我们可以通过可配置的比率压缩DNN模型,并在不引入额外延迟的情况下恢复精度损失。最后,我们引入了一种新的学习率调度方法,即周期性退火学习率(CALR),并通过句子分类基准实验证明其优于其他流行的自适应学习率算法。

英文摘要:

Deep learning models have become state of the art for natural language processing (NLP) tasks, however deploying these models in production system poses significant memory constraints. Existing compression methods are either lossy or introduce significant latency. We propose a compression method that leverages low rank matrix factorization during training,to compress the word embedding layer which represents the size bottleneck for most NLP models. Our models are trained, compressed and then further re-trained on the downstream task to recover accuracy while maintaining the reduced size. Empirically, we show that the proposed method can achieve 90% compression with minimal impact in accuracy for sentence classification tasks, and outperforms alternative methods like fixed-point quantization or offline word embedding compression. We also analyze the inference time and storage space for our method through FLOP calculations, showing that we can compress DNN models by a configurable ratio and regain accuracy loss without introducing additional latency compared to fixed point quantization. Finally, we introduce a novel learning rate schedule, the Cyclically Annealed Learning Rate (CALR), which we empirically demonstrate to outperform other popular adaptive learning rate algorithms on a sentence classification benchmark.

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

↑