用软校验和检测机器学习预测的可信度,避免物理模拟中误用不可靠结果。
Soft Checksums to Flag Untrustworthy Machine Learning Surrogate Predictions and Application to Atomic Physics Simulations
- 在输出层加校验节点,让模型自学习预测值间的数学关系。
- 校验错误高时预测误差大,且阈值可有效区分分布内/外数据。
- 仅需一次前向传播即可判断,适合实时物理仿真场景。
训练好的神经网络作为替代昂贵计算的代理模型在物理模拟中极具吸引力,但常被用于训练数据未充分覆盖的状态。本文提出软校验和这一科学机器学习的新技术,可通用区分分布内(ID)数据上的可信小误差预测与分布外(OOD)数据上的不可信大误差预测。通过在现有输出层添加校验节点,训练模型学习编码于神经网络预测中的特定校验函数,并证明该函数的违反程度与高预测误差相关。由于校验函数仅依赖于神经网络输出,可对任意预测通过单次前向传播计算校验误差,开销极小。此外,将校验函数纳入损失函数并训练时引入分布外数据点,能增强ID与OOD预测的分离效果。在复杂、高维且非局域热力学平衡的原子物理数据集上应用软校验和,表明合理设定的校验误差阈值可有效区分分布内与分布外预测。
原文摘要 · Abstract (English)
Trained neural networks (NN) are attractive as surrogate models to replace costly calculations in physical simulations, but are often unknowingly applied to states not adequately represented in the training dataset. We present the novel technique of soft checksums for scientific machine learning, a general-purpose method to differentiate between trustworthy predictions with small errors on in-distribution (ID) data points, and untrustworthy predictions with large errors on out-of-distribution (OOD) data points. By adding a check node to the existing output layer, we train the model to learn the chosen checksum function encoded within the NN predictions and show that violations of this function correlate with high prediction errors. As the checksum function depends only on the NN predictions, we can calculate the checksum error for any prediction with a single forward pass, incurring negligible time and memory costs. Additionally, we find that incorporating the checksum function into the loss function and exposing the NN to OOD data points during the training process improves separation between ID and OOD predictions. By applying soft checksums to a physically complex and high-dimensional non-local thermodynamic equilibrium atomic physics dataset, we show that a well-chosen threshold checksum error can effectively separate ID and OOD predictions.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。