循环神经网络的定性和定量模型检验
Qualitative and Quantitative Model Checking Against Recurrent Neural Networks
-
摘要:研究背景 近些年,随着人工智能和深度学习的发展,循环神经网络(Recurrent Neural Networks,RNNs)在序列数据处理中得到了广泛应用,如自然语言处理。然而,由于循环神经网络的黑盒性质和独特的网络结构,它们的网络行为缺乏严格的形式化保证,这极大地阻碍了其在安全攸关领域的应用和推广。因此,循环神经网络的形式化推理和验证是一项紧迫而富有挑战性的任务。目的 我们的研究目的在于构建一个针对循环神经网络的定性和定量的验证框架。对于给定的网络性质规约,该框架能够给出该性质是否成立的定性结论,如果不成立,能够给出该性质成立的置信度(概率)。方法 我们提出LTLf逻辑的一个扩展语言LTLfx,用于推理循环神经网络的关键性质,例如鲁棒性、可达性和已有工作中很少被研究的时序性质。验证语句被形式化为一个类似于霍尔逻辑的三元组,包含定性和定量的语义解释。验证借助于Polyhedron抽象域,提出了抽象域上的关键技术来处理定性和定量模型检验的问题,主要包括正向/反向传播技术,基于维度保持的抽象技术,蒙特卡洛采样等。提出了循环神经网络定性和定量模型检验的验证框架BPMC2,主要算法的正确性给出了严格的证明。结果 基于提出的循环神经网络定性和定量验证框架BPMC2,实现了原型工具,该工具可以对常见的网络性质(如鲁棒性,可达性等)和时序性质给出定性和定量验证的结论。结论 基于LTLfx和Polyhedra抽象域,我们的验证框架BPMC2从理论上解决了ReLU作为激活函数的RNN验证的技术难题。然而,对于其在实际大规模网络中的部署和应用,仍需要对其扩展性进行进一步优化,例如更高效的数据结构和组织、更合理的近似策略来平衡精度和效率等。将我们的验证框架扩展到其他激活函数和RNN变体网络上也是未来需要考虑的研究方向。Abstract: Recurrent neural networks (RNNs) have been heavily used in applications relying on sequence data such as time series and natural languages. As a matter of fact, their behaviors lack rigorous quality assurance due to the black-box nature of deep learning. It is an urgent and challenging task to formally reason about the behaviors of RNNs. To this end, we first present an extension of linear-time temporal logic to reason about properties with respect to RNNs, such as local robustness, reachability, and some temporal properties. Based on the proposed logic, we formalize the verification obligation as a Hoare-like triple, from both qualitative and quantitative perspectives. The former concerns whether all the outputs resulting from the inputs fulfilling the pre-condition satisfy the post-condition, whereas the latter is to compute the probability that the post-condition is satisfied on the premise that the inputs fulfill the pre-condition. To tackle these problems, we develop a systematic verification framework, mainly based on polyhedron propagation, dimension-preserving abstraction, and the Monte Carlo sampling. We also implement our algorithm with a prototype tool and conduct experiments to demonstrate its feasibility and efficiency.