Safety monitoring is essential for Cyber-Physical Systems (CPSs). However, unsafe events are rare in real-world CPS operations, creating an extreme class imbalance that degrades safety predictors. Standard rebalancing techniques perform poorly on time-series CPS telemetry, either generating unrealistic synthetic samples or overfitting on the minority class. Meanwhile, behavioral uncertainty in CPS operations, defined as the degree of doubt or uncertainty in CPS decisions , is often correlated with safety outcomes but unexplored in safety monitoring. To that end, we propose U-Balance, a supervised approach that leverages behavioral uncertainty to rebalance imbalanced datasets prior to training a safety predictor. U-Balance first trains a GatedMLP-based uncertainty predictor that summarizes each telemetry window into distributional kinematic features and outputs an uncertainty score. It then applies an uncertainty-guided label rebalancing (uLNR) mechanism that probabilistically relabels $\textit{safe}$-labeled windows with unusually high uncertainty as $\textit{unsafe}$, thereby enriching the minority class with informative boundary samples without synthesizing new data. Finally, a safety predictor is trained on the rebalanced dataset for safety monitoring. We evaluate U-Balance on a large-scale UAV benchmark with a 46:1 safe-to-unsafe ratio. Results confirm a moderate but significant correlation between behavioral uncertainty and safety. We then identify uLNR as the most effective strategy to exploit uncertainty information, compared to direct early and late fusion. U-Balance achieves a 0.806 F1 score, outperforming the strongest baseline by 14.3 percentage points, while maintaining competitive inference efficiency. Ablation studies confirm that both the GatedMLP-based uncertainty predictor and the uLNR mechanism contribute significantly to U-Balance's effectiveness.
翻译:安全监测对于信息物理系统(CPS)至关重要。然而,实际CPS运行中不安全事件极为罕见,导致极端类别不平衡问题,从而降低安全预测器的性能。标准再平衡技术在处理时间序列CPS遥测数据时表现不佳,或生成不现实的合成样本,或对少数类过拟合。与此同时,CPS运行中的行为不确定性(定义为CPS决策的怀疑或不确定程度)通常与安全结果相关,但在安全监测中尚未被探索。为此,我们提出U-Balance,一种利用行为不确定性对不平衡数据集进行再平衡的有监督方法,之后再训练安全预测器。U-Balance首先训练基于GatedMLP的不确定性预测器,该预测器将每个遥测窗口汇总为分布运动学特征并输出不确定性分数。随后,它应用不确定性引导的标签再平衡(uLNR)机制,以概率方式将具有异常高不确定性的$\textit{安全}$标记窗口重新标记为$\textit{不安全}$,从而在不合成新数据的情况下用信息丰富的边界样本丰富少数类。最后,在再平衡后的数据集上训练安全预测器用于安全监测。我们在一个安全与不安全比例达46:1的大规模无人机基准数据集上评估U-Balance。结果证实行为不确定性与安全之间存在中等但显著的相关性。我们还发现,与直接的早期和晚期融合相比,uLNR是利用不确定性信息最有效的策略。U-Balance取得了0.806的F1分数,超越最强基线14.3个百分点,同时保持具有竞争力的推理效率。消融研究证实,基于GatedMLP的不确定性预测器和uLNR机制均对U-Balance的有效性有显著贡献。