一句话:提出混合深度神经网络,从黑盒系统的时间序列信号中推断状态模型与状态变化点。
运行时行为模型推断有助于程序理解、异常检测和测试,但现有动态推断多依赖白盒插桩;黑盒方法又常为单变量、依赖分布假设或难以建模长期历史。本文提出混合深度神经网络,将各输入/输出信号表示为时间序列,经卷积层与循环层学习信号间非线性关联和时序模式,以推断黑盒系统状态及状态变化点。作者在真实无人机自动驾驶系统(约50万行C代码)上运行888个随机系统级测试用例,并与传统时间序列变化点检测和分类算法比较。结果显示,变化点检测F1最高提升102%,状态分类平均F1为90.45%,较传统分类器最高提升17%。
Inferring behavior model of a running software system is quite useful for several automated software engineering tasks, such as program comprehension, anomaly detection, and testing. Most existing dynamic model inference techniques are white-box, i.e., they require source code to be instrumented to get run-time traces. However, in many systems, instrumenting the entire source code is not possible (e.g., when using black-box third-party libraries) or might be very costly. Unfortunately, most black-box techniques that detect states over time are either univariate, or make assumptions on the data distribution, or have limited power for learning over a long period of past behavior. To overcome the above issues, in this paper, we propose a hybrid deep neural network that accepts as input a set of time series, one per input/output signal of the system, and applies a set of convolutional and recurrent layers to learn the non-linear correlations between signals and the patterns, over time. We have applied our approach on a real UAV auto-pilot solution from our industry partner with half a million lines of C code. We ran 888 random recent system-level test cases and inferred states, over time. Our comparison with several traditional time series change point detection techniques showed that our approach improves their performance by up to 102%, in terms of finding state change points, measured by F1 score. We also showed that our state classification algorithm provides on average 90.45% F1 score, which improves traditional classification algorithms by up to 17%.