论文标题
Exais:可执行人AI语义
ExAIS: Executable AI Semantics
论文作者
论文摘要
神经网络可以被视为一种新的编程范式,即,而不是通过(通常是非正式的)逻辑推理在程序员思想中构建越来越多的复杂程序,而是通过使用大数据优化通用的神经网络模型来构建复杂的“ AI”系统。在这个新的范式中,AI框架(例如Tensorflow和Pytorch)起着关键作用,这与传统程序的编译器一样必不可少。众所周知,缺乏针对编程语言的适当语义(例如C),即编译器的正确性规范,已导致许多有问题的程序行为和安全问题。尽管由于编程语言的高复杂性及其快速发展,因此很难为编译器提供正确的规范,但这次我们有一个独特的机会来完成神经网络(这些功能有限,并且大多数功能都具有稳定的语义)。在这项工作中,我们报告了为提供神经网络框架(例如TensorFlow)提供正确性规范的努力。我们在逻辑编程语言Prolog中指定了几乎所有张力流层的语义。我们通过两种应用来证明语义的有用性。一个是用于Tensorflow的模糊引擎,它具有强大的甲骨文和系统的有效神经网络的方式。另一个是一种模型验证方法,该方法可以为TensorFlow模型提供一致的错误报告。
Neural networks can be regarded as a new programming paradigm, i.e., instead of building ever-more complex programs through (often informal) logical reasoning in the programmers' mind, complex 'AI' systems are built by optimising generic neural network models with big data. In this new paradigm, AI frameworks such as TensorFlow and PyTorch play a key role, which is as essential as the compiler for traditional programs. It is known that the lack of a proper semantics for programming languages (such as C), i.e., a correctness specification for compilers, has contributed to many problematic program behaviours and security issues. While it is in general hard to have a correctness specification for compilers due to the high complexity of programming languages and their rapid evolution, we have a unique opportunity to do it right this time for neural networks (which have a limited set of functions, and most of them have stable semantics). In this work, we report our effort on providing a correctness specification of neural network frameworks such as TensorFlow. We specify the semantics of almost all TensorFlow layers in the logical programming language Prolog. We demonstrate the usefulness of the semantics through two applications. One is a fuzzing engine for TensorFlow, which features a strong oracle and a systematic way of generating valid neural networks. The other is a model validation approach which enables consistent bug reporting for TensorFlow models.