arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.02882cs.CL
收藏

基于DFA的正则表达式与神经网络集成

Integrating Regular Expressions with Neural Networks via DFA

Harbin Institute of Technology(哈尔滨工业大学)

Shaobo Li, Qun Liu, Xin Jiang, Yichun Yin, Chengjie Sun, Bingquan Liu, Zhenzhou Ji, Lifeng Shang

摘要:

人工设计的规则被广泛用于构建行业应用程序。然而,要维护成千上万条这样的手工规则是不可行的。因此,将规则知识融入神经网络中,建立一个性能更好的混合模型是非常重要的。具体地说,人类设计的规则制定为正则表达式(RE),从它的等价的最小确定性有限自动机(MDFA)的构造。我们建议使用的MDFA作为一个中间模型,以捕获匹配的RE模式作为基于规则的功能,为每个输入句子,并将这些额外的功能到神经网络。我们评估所提出的方法上的ATIS意图分类任务。实验结果表明,当训练数据集相对较小时,该方法与神经网络以及其他四种RE与神经网络相结合的方法相比,具有最佳的性能。

英文摘要:

Human-designed rules are widely used to build industry applications. However, it is infeasible to maintain thousands of such hand-crafted rules. So it is very important to integrate the rule knowledge into neural networks to build a hybrid model that achieves better performance. Specifically, the human-designed rules are formulated as Regular Expressions (REs), from which the equivalent Minimal Deterministic Finite Automatons (MDFAs) are constructed. We propose to use the MDFA as an intermediate model to capture the matched RE patterns as rule-based features for each input sentence and introduce these additional features into neural networks. We evaluate the proposed method on the ATIS intent classification task. The experiment results show that the proposed method achieves the best performance compared to neural networks and four other methods that combine REs and neural networks when the training dataset is relatively small.

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

↑