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