Deep neural networks have emerged as the workhorse for a large section of robotics and control applications, especially as models for dynamical systems. Such data-driven models are in turn used for designing and verifying autonomous systems. They are particularly useful in modeling medical systems where data can be leveraged to individualize treatment. In safety-critical applications, it is important that the data-driven model is conformant to established knowledge from the natural sciences. Such knowledge is often available or can often be distilled into a (possibly black-box) model. For instance, an F1 racing car should conform to Newton's laws (which are encoded within a unicycle model). In this light, we consider the following problem - given a model $M$ and a state transition dataset, we wish to best approximate the system model while being a bounded distance away from $M$. We propose a method to guarantee this conformance. Our first step is to distill the dataset into a few representative samples called memories, using the idea of a growing neural gas. Next, using these memories we partition the state space into disjoint subsets and compute bounds that should be respected by the neural network in each subset. This serves as a symbolic wrapper for guaranteed conformance. We argue theoretically that this only leads to a bounded increase in approximation error; which can be controlled by increasing the number of memories. We experimentally show that on three case studies (Car Model, Drones, and Artificial Pancreas), our constrained neurosymbolic models conform to specified models (each encoding various constraints) with order-of-magnitude improvements compared to the augmented Lagrangian and vanilla training methods. Our code can be found at: https://github.com/kaustubhsridhar/Constrained_Models
翻译:深度神经网络已成为大量机器人学与控制应用(特别是作为动态系统模型)的中坚力量。这类数据驱动模型进而用于自主系统的设计与验证,尤其在医疗系统中具有重要价值——此类系统可利用数据实现个性化治疗。在安全关键型应用中,确保数据驱动模型符合自然科学领域既有的知识至关重要。这类知识通常已存在,或可被提炼为(可能是黑箱)模型。例如,F1赛车应遵循牛顿定律(该定律被编码在单轮模型中)。基于此,我们考虑以下问题:给定模型M与状态转移数据集,希望在距离M有界约束的前提下,最大化近似系统模型。我们提出了一种保证这种一致性的方法。第一步,利用动态神经气(Growing Neural Gas)概念,将数据集提炼为若干代表性样本(称为记忆)。随后,基于这些记忆将状态空间划分为互斥子集,并计算神经网络在每个子集中应遵守的边界。这构成了保证一致性的符号封装器。我们从理论上论证:该方法仅导致近似误差的有界增加,且可通过增加记忆数量来控制误差增长。在三个案例研究(汽车模型、无人机与人工胰腺)中,实验表明:与增广拉格朗日方法和普通训练方法相比,我们提出的约束神经符号模型在符合特定模型(分别编码了多种约束)时实现了数量级性能提升。我们的代码可在以下链接获取:https://github.com/kaustubhsridhar/Constrained_Models