Behavioral Model Inference of Black-box Software using Deep Neural Networks

Many software engineering tasks, such as testing, debugging, and anomaly detection can benefit from the ability to infer a behavioral model of the software. Most existing inference approaches assume access to code to collect execution sequences. In this paper, we investigate a black-box scenario, where the system under analysis cannot be instrumented, in this granular fashion. This scenario is particularly prevalent with control systems’ log analysis in the form of continuous signals. In this situation, an execution trace amounts to a multivariate time-series of input and output signals, where different states of the system correspond to different ’phases’ in the timeseries. From an inference perspective, the challenge is to detect when these phase changes take place. Unfortunately, most existing solutions are either univariate, make assumptions on the data distribution, or have limited learning power. Therefore, we propose a hybrid deep neural network that accepts as input a multivariate time series and applies a set of convolutional and recurrent layers to learn the non-linear correlations between signals and the patterns over time. We show how this approach can be used to accurately detect state changes, and how the inferred models can be successfully applied to transfer-learning scenarios, to accurately process traces from different products with similar execution characteristics. Our experimental results on two UAV autopilot case studies (one industrial and one open-source) indicate that our approach is highly accurate (over 90% F1 score for state classification) and significantly improves baselines (by up to 102% for change point detection). Using transfer learning we also show that up to 90% of the maximum achievable F1 scores in the open-source case study can be achieved by reusing the trained models from the industrial case and only fine tuning them using as low as 5 labeled samples, which reduces the manual labeling effort by 98%.

[1]  Kenji Yamanishi,et al.  A unifying framework for detecting outliers and change points from time series , 2006, IEEE Transactions on Knowledge and Data Engineering.

[2]  Georgios B. Giannakis,et al.  Group lassoing change-points in piecewise-constant AR processes , 2012, EURASIP J. Adv. Signal Process..

[3]  Alfonso Valdes,et al.  Adaptive, Model-Based Monitoring for Cyber Attack Detection , 2000, Recent Advances in Intrusion Detection.

[4]  Andrew L. Maas Rectifier Nonlinearities Improve Neural Network Acoustic Models , 2013 .

[5]  Sébastien Ourselin,et al.  Generalised Dice overlap as a deep learning loss function for highly unbalanced segmentations , 2017, DLMIA/ML-CDS@MICCAI.

[6]  Ruby B. Lee,et al.  Time Series Segmentation through Automatic Feature Learning , 2018, ArXiv.

[7]  Guigang Zhang,et al.  Deep Learning , 2016, Int. J. Semantic Comput..

[8]  Alexander L. Wolf,et al.  Discovering models of software processes from event-based data , 1998, TSEM.

[9]  Thomas Ball,et al.  Finding and Reproducing Heisenbugs in Concurrent Programs , 2008, OSDI.

[10]  Robert Lund,et al.  A Review and Comparison of Changepoint Detection Techniques for Climate Data , 2007 .

[11]  Eamonn J. Keogh,et al.  An online algorithm for segmenting time series , 2001, Proceedings 2001 IEEE International Conference on Data Mining.

[12]  Hadi Hemmati,et al.  Interactive Semi-automated Specification Mining for Debugging: An Experience Report , 2019, Inf. Softw. Technol..

[13]  Jiawei Han,et al.  Mining Software Specifications: Methodologies and Applications , 2011 .

[14]  Bengt Jonsson,et al.  Active learning for extended finite state machines , 2016, Formal Aspects of Computing.

[15]  Kevin P. Murphy,et al.  Machine learning - a probabilistic perspective , 2012, Adaptive computation and machine learning series.

[16]  Andrew Zisserman,et al.  Very Deep Convolutional Networks for Large-Scale Image Recognition , 2014, ICLR.

[17]  J. Stock,et al.  Testing for and Dating Common Breaks in Multivariate Time Series , 1998 .

[18]  Jerome A. Feldman,et al.  On the Synthesis of Finite-State Machines from Samples of Their Behavior , 1972, IEEE Transactions on Computers.

[19]  Michèle Basseville,et al.  Detection of abrupt changes: theory and application , 1993 .

[20]  Bruno Legeard,et al.  Model-based testing , 2015, Commun. ACM.

[21]  James R. Larus,et al.  Mining specifications , 2002, POPL '02.

[22]  Patrick Martin,et al.  Assisting developers of Big Data Analytics Applications when deploying on Hadoop clouds , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[23]  A. Scott,et al.  A Cluster Analysis Method for Grouping Means in the Analysis of Variance , 1974 .

[24]  AngluinDana Learning regular sets from queries and counterexamples , 1987 .

[25]  Neil Walkinshaw,et al.  Comparison of Search-Based Algorithms for Stress-Testing Integrated Circuits , 2018, SSBSE.

[26]  Richard M. Murray,et al.  Feedback Systems An Introduction for Scientists and Engineers , 2007 .

[27]  Dana Angluin,et al.  Learning Regular Sets from Queries and Counterexamples , 1987, Inf. Comput..

[28]  P. Fearnhead,et al.  Optimal detection of changepoints with a linear computational cost , 2011, 1101.1438.

[29]  Hadi Hemmati,et al.  An Empirical Study on Practicality of Specification Mining Algorithms on a Real-World Application , 2019, 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC).

[30]  Siau-Cheng Khoo,et al.  Mining modal scenario-based specifications from execution traces of reactive systems , 2007, ASE '07.

[31]  Murat Bronz,et al.  Using the Paparazzi UAV System for Scientific Research , 2014 .

[32]  Pierre Dupont,et al.  Generating annotated behavior models from end-user scenarios , 2005, IEEE Transactions on Software Engineering.

[33]  Thomas Brox,et al.  U-Net: Convolutional Networks for Biomedical Image Segmentation , 2015, MICCAI.

[34]  Andreas Zeller,et al.  Automatically Generating Test Cases for Specification Mining , 2012, IEEE Transactions on Software Engineering.

[35]  Christian Igel,et al.  U-Time: A Fully Convolutional Network for Time Series Segmentation Applied to Sleep Staging , 2019, NeurIPS.

[36]  Seyed-Ahmad Ahmadi,et al.  V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation , 2016, 2016 Fourth International Conference on 3D Vision (3DV).

[37]  Adrian Kuhn,et al.  Exploiting the Analogy Between Traces and Signal Processing , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[38]  Mark Harman,et al.  The Oracle Problem in Software Testing: A Survey , 2015, IEEE Transactions on Software Engineering.

[39]  Xiaoli Li,et al.  Deep Convolutional Neural Networks on Multichannel Time Series for Human Activity Recognition , 2015, IJCAI.

[40]  Daniel Roggen,et al.  Deep Convolutional and LSTM Recurrent Neural Networks for Multimodal Wearable Activity Recognition , 2016, Sensors.

[41]  Petros Papadopoulos,et al.  Black-Box Test Generation from Inferred Models , 2015, 2015 IEEE/ACM 4th International Workshop on Realizing Artificial Intelligence Synergies in Software Engineering.

[42]  Hod Lipson,et al.  Nonlinear system identification using coevolution of models and tests , 2005, IEEE Transactions on Evolutionary Computation.

[43]  Tiziana Margaria,et al.  LearnLib: a framework for extrapolating behavioral models , 2009, International Journal on Software Tools for Technology Transfer.

[44]  Josep Carmona,et al.  A Region-Based Algorithm for Discovering Petri Nets from Event Logs , 2008, BPM.

[45]  Ivan Beschastnikh,et al.  General LTL Specification Mining (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[46]  Tim Oates,et al.  Time series classification from scratch with deep neural networks: A strong baseline , 2016, 2017 International Joint Conference on Neural Networks (IJCNN).

[47]  Enhong Chen,et al.  Exploiting MultiChannels Deep Convolutional Neural Networks for Multivariate Time Series Classification , 2015 .

[48]  Daniel Roggen,et al.  Deep convolutional feature transfer across mobile activity recognition domains, sensor modalities and locations , 2016, SEMWEB.

[49]  Yoshua Bengio,et al.  Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation , 2014, EMNLP.

[50]  Yan Liu,et al.  Recurrent Neural Networks for Multivariate Time Series with Missing Values , 2016, Scientific Reports.

[51]  Neil Walkinshaw,et al.  Testing Functional Black-Box Programs Without a Specification , 2018, Machine Learning for Dynamic Software Analysis.

[52]  Qiang Yang,et al.  A Survey on Transfer Learning , 2010, IEEE Transactions on Knowledge and Data Engineering.

[53]  Bo Yu,et al.  Convolutional Neural Networks for human activity recognition using mobile sensors , 2014, 6th International Conference on Mobile Computing, Applications and Services.

[54]  N. Vayatis,et al.  Selective review of offline change point detection methods , 2019 .

[55]  Marc Lavielle,et al.  Using penalized contrasts for the change-point problem , 2005, Signal Process..

[56]  Timothy Sherwood,et al.  Wavelet-based phase classification , 2006, 2006 International Conference on Parallel Architectures and Compilation Techniques (PACT).

[57]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[58]  Piotr Fryzlewicz,et al.  Wild binary segmentation for multiple change-point detection , 2014, 1411.0858.

[59]  Diane J. Cook,et al.  A survey of methods for time series change point detection , 2017, Knowledge and Information Systems.

[60]  Leonardo Mariani,et al.  Automatic generation of software behavioral models , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[61]  Kyong Joo Oh,et al.  Analyzing Stock Market Tick Data Using Piecewise Nonlinear Model , 2022 .

[62]  Mathew Hall,et al.  Inferring Computational State Machine Models from Program Executions , 2016, 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[63]  Shaohan Hu,et al.  DeepSense: A Unified Deep Learning Framework for Time-Series Mobile Sensing Data Processing , 2016, WWW.