用CYK算法直接构建神经网络,实现高效语法解析
Neuro-symbolic Syntactic Parsing: Shaping a Neural Network with the CYK Algorithm

- 将CYK算法嵌入神经网络,通过矩阵乘法实现可训练解析
- 在4种简单语法上超越20B参数大模型与微调的小模型
- 为神经符号方法提供新思路,适合形式化推理研究者
本文展示了将算法直接注入神经网络架构的可行性。我们聚焦于上下文无关文法(乔姆斯基正规式)的解析算法Cocke-Youger-Kasami(CYK),提出CYKNN——一种基于递归神经网络的架构,通过可训练的矩阵-向量乘法编码CYK算法。我们在一个包含4种变体的简单语法上进行实验,结果表明该方法在上下文学习设置下,优于参数超过200亿的现有大语言模型,以及经过LoRA微调的Qwen系列小模型。这一尝试为神经符号方法开辟了新的路径。
原文摘要 · Abstract (English)
In this paper, we show the possibility of a direct injection of algorithms into neural network architecture. We focus on a complex algorithm, that is, Cocke-Youger-Kasami (CYK) for parsing context-free grammars in Chomsky Normal Form and we propose CYKNN, a simple recurrent neural network architecture for encoding the CYK algorithm in trainable matrix-vector multiplications.We experimented with a very simple grammar with 4 variations showing that our approach outperforms existing LLMs with more than 20B parameters with an in-context learning setting and smaller LLMs of the Qwen family fine-tuned with LoRA. Our attempt paves the way to a different approach to neuro-symbolic methodologies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。