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. This is 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 $M$. For instance, the unicycle model (which encodes Newton's laws) for an F1 racing car. In this light, we consider the following problem - given a model $M$ and state transition dataset, we wish to best approximate the system model while being bounded distance away from $M$. We propose a method to guarantee this conformance. Our first step is to distill the dataset into 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, when the input is drawn from a particular subset. This serves as a symbolic wrapper for guaranteed conformance. We argue theoretically that this only leads to 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 $M$ 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
翻译:深度神经网络已成为机器人学与控制应用中大部分领域的主力模型,尤其是作为动态系统的建模工具。这类数据驱动模型进而被用于自主系统的设计与验证,在医疗系统建模中尤其有用——通过利用数据实现个性化治疗。在安全关键应用中,确保数据驱动模型符合自然科学领域的既有知识至关重要。此类知识通常已存在或可浓缩为(可能是黑箱的)模型M。例如,F1赛车的单轮模型(编码牛顿定律)。基于此,我们考虑以下问题:给定模型M与状态转移数据集,我们希望以距离M有界的方式最佳逼近系统模型。我们提出一种保证这种符合性的方法。首先,利用增长型神经气体概念将数据集蒸馏为少量代表性样本(称为记忆)。接着,基于这些记忆将状态空间划分为互斥子集,并计算当输入来自特定子集时神经网络应遵守的界限。这构成了保证符合性的符号包装器。我们从理论上论证,这种方法只会导致近似误差的有界增加,且可通过增加记忆数量来控制。实验表明,在三个案例研究(汽车模型、无人机、人工胰腺)中,我们的受约束神经符号模型在符合指定的M模型(各编码不同约束)方面,相较于增广拉格朗日方法与普通训练方法实现了数量级的改进。我们的代码可在https://github.com/kaustubhsridhar/Constrained_Models 获取。