中间N元语法:面向大N与大规模数据集的确定性快速N元语法方法
Intermediate N-Gramming: Deterministic and Fast N-Grams For Large N and Large Datasets
AI总结:
针对大n及大规模数据集下n元语法计算效率低的问题,提出硬件感知的多轮遍历算法Intergrams,可确定性快速提取top-k高频n元语法,速度最高达现有最优方法的33倍,且提供了理论支撑。
摘要:
N元语法(n-gram)特征的数量会随n呈指数增长,即便n仅为3,计算最高频n元语法的计算需求也极高。受我们基于n元语法特征搭建的生产级机器学习系统驱动,我们提出问题:是否有可能准确、确定性且快速地恢复出现频率最高的前k个n元语法?我们设计了名为Intergrams的多轮遍历算法,该算法从长度为n-1的前置n元语法构建候选n元语法。通过在算法设计阶段结合硬件特性考量,即便为其他已知次快算法应用同类优化,我们的方法仍能实现超过一个数量级的加速(最高可达33倍)。我们还利用n元语法的经验幂律分布,为该多轮遍历方法的有效性提供了理论支撑。我们的代码可在https://github.com/rcurtin/Intergrams获取。
英文摘要:
The number of n-gram features grows exponentially in n, making it computationally demanding to compute the most frequent n-grams even for n as small as 3. Motivated by our production machine learning system built on n-gram features, we ask: is it possible to accurately, deterministically, and quickly recover the top-k most frequent n-grams? We devise a multi-pass algorithm called Intergrams that constructs candidate n-grams from the preceding (n - 1)-grams. By designing this algorithm with hardware in mind, our approach yields more than an order of magnitude speedup (up to 33x!) over the next known fastest algorithm, even when similar optimizations are applied to the other algorithm. Using the empirical power-law distribution over n-grams, we also provide theory to inform the efficacy of our multi-pass approach. Our code is available at https://github.com/rcurtin/Intergrams.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。