Recurrent Neural Networks (RNNs) can learn to predict Signal Temporal Logic (STL) verdicts online from partial trajectories, but deploying them as runtime monitors in safety-critical systems demands more than predictive accuracy. Standard RNN architectures offer no structural guarantee that outputs degrade gracefully under sensor degradation; a dropped input can silently flip a verdict from safe to unsafe. We introduce the Recurrent Differentiable Ternary Logic Gate Network (R-DTLGN), a recurrent architecture that operates over Kleene's three-valued logic $\{-1, 0, +1\}$, where $0$ explicitly represents unknown. The R-DTLGN trains through continuous polynomial surrogates and hardens to a discrete ternary logic circuit at inference. We analyze the hardened circuit through two gate vocabularies derived from two orderings on the ternary domain: numerically monotone gates ensure stable recurrent dynamics, while information-monotone gates, when present, guarantee principled abstention (unknown inputs never produce wrong outputs) and monotonicity in input certainty (more information can only improve the verdict). We show that the recurrent connections required by bounded STL operators use exclusively AND and OR, which belong to both vocabularies, linking the monitoring task to the architecture's guarantees. A realizability bound derived from the STL formula's temporal operators directly sizes the network's hidden state, replacing hyperparameter search with a formula-driven specification. We evaluate on STL specifications over D4RL PointMaze navigation data, testing prediction accuracy, degradation under predicate dropout, and the accuracy-versus-safety tradeoff between two label construction pipelines. The R-DTLGN is, to our knowledge, the first recurrent architecture that couples learned temporal prediction with formal degradation guarantees rooted in three-valued logic.
翻译:循环神经网络(RNN)能够从部分轨迹中在线学习预测信号时序逻辑(STL)判定结果,但将其部署为安全关键系统的运行时监控器时,仅具备预测精度远远不够。标准RNN架构无法提供结构化保证以确保输出在传感器退化时平稳降级:输入信号丢失可能静默地将安全判定翻转为不安全判定。我们提出循环可微三元逻辑门网络(R-DTLGN),这是一种基于Kleene三值逻辑$\{-1, 0, +1\}$(其中$0$显式表示未知)的循环架构。R-DTLGN通过连续多项式代理进行训练,并在推理时硬化为一离散三元逻辑电路。我们通过三元域上的两种序关系导出两类门字典来分析硬化电路:数值单调门确保循环动力学的稳定性,而信息单调门(若存在)则保证原则性弃权(未知输入永不产生错误输出)以及输入确定性单调性(更多信息只能改善判定结果)。我们证明,有界STL算子所需的循环连接仅使用AND和OR门,这两类门均属于上述两种字典,从而将监控任务与架构的保证特性联系起来。基于STL公式时序算子导出的可实现性边界直接决定了网络隐藏状态的尺寸,从而以公式驱动的方式取代了超参数搜索。我们在D4RL PointMaze导航数据的STL规范上进行评估,测试了预测精度、谓词丢弃下的退化表现,以及两条标签构建流水线在精度与安全性之间的权衡。据我们所知,R-DTLGN是首个将学习到的时序预测与基于三值逻辑的形式化退化保证相结合的循环架构。