arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.14040cs.CLcs.LG
收藏

用于自然语言任务的循环神经网络的加权自动机提取与解释

Weighted Automata Extraction and Explanation of Recurrent Neural Networks for Natural Language Tasks

Peking University(北京大学);University of Oxford(牛津大学)

Zeming Wei, Xiyue Zhang, Yihao Zhang, Meng Sun

AI总结:

提出WFA提取与解释框架,解决RNN在自然语言任务中的转移稀疏和上下文丢失问题,提升提取精度并实现基于TME的面向任务的解释。

摘要:

循环神经网络(RNNs)在处理序列数据方面取得了巨大成功,但理解和分析其行为仍是一个重大挑战。为此,人们做出了许多努力从RNN中提取有限自动机,这更便于分析和解释。然而,现有的精确学习和组合方法等模型提取方法在可扩展性或精度上存在局限。本文提出了一种新颖的加权有限自动机(WFA)提取和解释框架,以解决自然语言任务中的这些局限。首先,针对我们在自然语言任务的WFA提取中发现的转移稀疏性和上下文丢失问题,我们提出了一种经验方法来补充转移图中缺失的规则,并调整转移矩阵以增强WFA的上下文感知能力。我们还提出了两种数据增强策略来追踪RNN更多的动态行为,这进一步使我们能够提高提取精度。基于提取的模型,我们提出了一种RNN的解释方法,包括一种词嵌入方法——转移矩阵嵌入(TME)以及基于TME的面向任务的解释。我们的评估表明,与现有方法相比,我们的方法在提取精度上具有优势,并且基于TME的解释方法在预训练和对抗样本生成应用中是有效的。

英文摘要:

Recurrent Neural Networks (RNNs) have achieved tremendous success in processing sequential data, yet understanding and analyzing their behaviours remains a significant challenge. To this end, many efforts have been made to extract finite automata from RNNs, which are more amenable for analysis and explanation. However, existing approaches like exact learning and compositional approaches for model extraction have limitations in either scalability or precision. In this paper, we propose a novel framework of Weighted Finite Automata (WFA) extraction and explanation to tackle the limitations for natural language tasks. First, to address the transition sparsity and context loss problems we identified in WFA extraction for natural language tasks, we propose an empirical method to complement missing rules in the transition diagram, and adjust transition matrices to enhance the context-awareness of the WFA. We also propose two data augmentation tactics to track more dynamic behaviours of RNN, which further allows us to improve the extraction precision. Based on the extracted model, we propose an explanation method for RNNs including a word embedding method -- Transition Matrix Embeddings (TME) and TME-based task oriented explanation for the target RNN. Our evaluation demonstrates the advantage of our method in extraction precision than existing approaches, and the effectiveness of TME-based explanation method in applications to pretraining and adversarial example generation.

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

↑