At the heart of text based neural models lay word representations, which are powerful but occupy a lot of memory making it challenging to deploy to devices with memory constraints such as mobile phones, watches and IoT. To surmount these challenges, we introduce ProFormer -- a projection based transformer architecture that is faster and lighter making it suitable to deploy to memory constraint devices and preserve user privacy. We use LSH projection layer to dynamically generate word representations on-the-fly without embedding lookup tables leading to significant memory footprint reduction from O(V.d) to O(T), where V is the vocabulary size, d is the embedding dimension size and T is the dimension of the LSH projection representation. We also propose a local projection attention (LPA) layer, which uses self-attention to transform the input sequence of N LSH word projections into a sequence of N/K representations reducing the computations quadratically by O(K^2). We evaluate ProFormer on multiple text classification tasks and observed improvements over prior state-of-the-art on-device approaches for short text classification and comparable performance for long text classification tasks. In comparison with a 2-layer BERT model, ProFormer reduced the embedding memory footprint from 92.16 MB to 1.3 KB and requires 16 times less computation overhead, which is very impressive making it the fastest and smallest on-device model.


翻译:以文字为基础的神经模型的核心是字形表示,这些字形非常强大,但占用了许多记忆力,使得部署到具有记忆限制的装置,如移动电话、手表和IoT等具有挑战性的装置具有挑战性。为了克服这些挑战,我们引入了ProFormer -- -- 一个基于投影的变压器结构,这种变压器结构速度更快、更轻,适合部署到内存限制装置并保护用户隐私。我们使用LSH投影层来动态地在飞行上生成字形表示,而不嵌入外观表,导致从O(V.d)到O(T)大量减少记忆足迹,而V是词汇的大小,d是嵌入尺寸,T是LSH投影代表的层面。我们还提出一个本地投影注意(LPA)层,它使用自我注意将NSH字预测的输入序列转换成N/K表示式的顺序,减少O(K)2号的四重计算。我们评估ProFormer关于多文本分类任务的模式,并观察到了先前的“最先进的文字分类方法”的改进,d是嵌入尺寸尺寸,T是长文本分类的缩缩缩的缩缩缩缩缩模。

0
下载
关闭预览

相关内容

局部敏感哈希算法
Transformer文本分类代码
专知会员服务
117+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
命名实体识别新SOTA:改进Transformer模型
AI科技评论
17+阅读 · 2019年11月26日
计算机类 | PLDI 2020等国际会议信息6条
Call4Papers
3+阅读 · 2019年7月8日
已删除
将门创投
3+阅读 · 2019年1月15日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
Jointly Improving Summarization and Sentiment Classification
黑龙江大学自然语言处理实验室
3+阅读 · 2018年6月12日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
0+阅读 · 2021年6月13日
Arxiv
0+阅读 · 2021年5月28日
Arxiv
19+阅读 · 2020年12月23日
Arxiv
6+阅读 · 2020年4月14日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
VIP会员
相关VIP内容
Transformer文本分类代码
专知会员服务
117+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
相关资讯
命名实体识别新SOTA:改进Transformer模型
AI科技评论
17+阅读 · 2019年11月26日
计算机类 | PLDI 2020等国际会议信息6条
Call4Papers
3+阅读 · 2019年7月8日
已删除
将门创投
3+阅读 · 2019年1月15日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
Jointly Improving Summarization and Sentiment Classification
黑龙江大学自然语言处理实验室
3+阅读 · 2018年6月12日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Top
微信扫码咨询专知VIP会员