Fast-R2D2:一种基于剪枝CKY的递归神经网络用于语法归纳和文本表示
Fast-R2D2: A Pretrained Recursive Neural Network based on Pruned CKY for Grammar Induction and Text Representation
摘要:
近年来,基于CKY的模型在无监督语法归纳中显示出巨大的潜力,这要归功于它们类似于人类的编码范式,它递归地、层次地运行,但需要$O(n^3)$时间复杂度。基于可微树的递归Transformer(R2D2)通过引入启发式剪枝方法,使得即使使用复杂的树编码器也可以扩展到大语言模型预训练。然而,基于规则的剪枝方法存在局部最优和推理速度慢的问题。在本文中,我们解决这些问题在一个统一的方法。我们建议使用一个自顶向下的解析器作为基于模型的修剪方法,这也使并行编码在推理。通常,我们的解析器将解析转换为分割点评分任务,首先对给定句子的所有分割点进行评分,然后通过选择当前跨度中得分最高的分割点将跨度递归地分为两个。拆分的相反顺序被认为是R2D2编码器中的修剪顺序。除了双向语言模型损失外,我们还通过最小化解析器和R2D2的树概率之间的KL距离来优化解析器。我们的实验表明,我们的Fast-R2D2在语法归纳方面显着提高了性能,并在下游分类任务中取得了有竞争力的结果。
英文摘要:
Recently CKY-based models show great potential in unsupervised grammar induction thanks to their human-like encoding paradigm, which runs recursively and hierarchically, but requires $O(n^3)$ time-complexity. Recursive Transformer based on Differentiable Trees (R2D2) makes it possible to scale to large language model pre-training even with complex tree encoder by introducing a heuristic pruning method. However, the rule-based pruning approach suffers from local optimum and slow inference issues. In this paper, we fix those issues in a unified method. We propose to use a top-down parser as a model-based pruning method, which also enables parallel encoding during inference. Typically, our parser casts parsing as a split point scoring task, which first scores all split points for a given sentence, and then recursively splits a span into two by picking a split point with the highest score in the current span. The reverse order of the splits is considered as the order of pruning in R2D2 encoder. Beside the bi-directional language model loss, we also optimize the parser by minimizing the KL distance between tree probabilities from parser and R2D2. Our experiments show that our Fast-R2D2 improves performance significantly in grammar induction and achieves competitive results in downstream classification tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。