论文标题
为实时系统设计神经网络
Designing Neural Networks for Real-Time Systems
论文作者
论文摘要
人工神经网络(ANN)越来越多地用于安全至关重要的网络物理系统(CPSS)。它们通常与传统的嵌入式软件共同划分,并且可能会执行基于咨询的角色。验证这些系统的时序和功能正确性很重要。但是,文献中的大多数方法都考虑仅保证基于ANN的控制器的功能。这个问题主要源于常见神经网络框架中使用的实施策略 - 其基本源代码通常不适合诸如静态时序分析之类的正式技术。结果,安全至关重要的CPS的开发人员必须依靠非正式技术,例如基于测量的方法来证明正确性,最多可提供较弱的保证的技术。在这项工作中,我们应对这一挑战。我们提出了一条设计管道,通过该管道,使用流行的深度学习框架Keras训练的神经网络被编译为功能等效的C代码。该C代码仅限于简单的构造,这些构造可能通过现有的静态时序分析工具来分析。结果,如果将其编译到合适的时间预测平台,则所有执行范围都可以静态得出。为了证明我们的方法的好处,我们执行了一个训练的ANN,可以在赛道上驾驶自动驾驶汽车。我们将ANN编译到PATMOS时可预测的控制器中,并表明我们可以得出最坏的案例执行时间。
Artificial Neural Networks (ANNs) are increasingly being used within safety-critical Cyber-Physical Systems (CPSs). They are often co-located with traditional embedded software, and may perform advisory or control-based roles. It is important to validate both the timing and functional correctness of these systems. However, most approaches in the literature consider guaranteeing only the functionality of ANN based controllers. This issue stems largely from the implementation strategies used within common neural network frameworks -- their underlying source code is often simply unsuitable for formal techniques such as static timing analysis. As a result, developers of safety-critical CPS must rely on informal techniques such as measurement based approaches to prove correctness, techniques that provide weak guarantees at best. In this work we address this challenge. We propose a design pipeline whereby neural networks trained using the popular deep learning framework Keras are compiled to functionally equivalent C code. This C code is restricted to simple constructs that may be analysed by existing static timing analysis tools. As a result, if compiled to a suitable time-predictable platform all execution bounds may be statically derived. To demonstrate the benefits of our approach we execute an ANN trained to drive an autonomous vehicle around a race track. We compile the ANN to the Patmos time-predictable controller, and show that we can derive worst case execution timings.