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