arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1901.10668cs.LGstat.ML
收藏

双重稀疏:稀疏专家的稀疏混合,用于有效的Softmax推理

Doubly Sparse: Sparse Mixture of Sparse Experts for Efficient Softmax Inference

University of Toronto(多伦多大学);Google(谷歌);ByteDance(字节跳动)

Shun Liao, Ting Chen, Tian Lin, Denny Zhou, Chong Wang

摘要:

当输出类的数量很大时,softmax函数的计算非常昂贵。在本文中,我们提出了一种新的softmax推理加速方法,双稀疏Softmax(DS-Softmax),利用稀疏混合稀疏专家有效地检索前k类。与大多数现有的需要和近似固定softmax的方法不同,我们的方法是基于学习的,可以适应softmax权重以获得更好的推理加速。特别是,我们的方法学习一个两级层次结构,将整个输出类空间划分为几个部分重叠的专家。每个专家是稀疏的,只包含输出类的子集。为了找到top-k类,稀疏混合使我们能够快速找到最可能的专家,稀疏专家使我们能够在小规模softmax中搜索。我们经验性地对几个现实世界的任务进行评估,包括神经机器翻译,语言建模和图像分类,并证明可以在没有性能损失的情况下实现显着的计算减少。

英文摘要:

Computations for the softmax function are significantly expensive when the number of output classes is large. In this paper, we present a novel softmax inference speedup method, Doubly Sparse Softmax (DS-Softmax), that leverages sparse mixture of sparse experts to efficiently retrieve top-k classes. Different from most existing methods that require and approximate a fixed softmax, our method is learning-based and can adapt softmax weights for a better inference speedup. In particular, our method learns a two-level hierarchy which divides entire output class space into several partially overlapping experts. Each expert is sparse and only contains a subset of output classes. To find top-k classes, a sparse mixture enables us to find the most probable expert quickly, and the sparse expert enables us to search within a small-scale softmax. We empirically conduct evaluation on several real-world tasks, including neural machine translation, language modeling and image classification, and demonstrate that significant computation reductions can be achieved at no performance loss.

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

↑