{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T01:59:09Z","timestamp":1760147949166,"version":"build-2065373602"},"reference-count":47,"publisher":"MDPI AG","issue":"3","license":[{"start":{"date-parts":[[2023,3,17]],"date-time":"2023-03-17T00:00:00Z","timestamp":1679011200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"State Key Laboratory of Computer Architecture","award":["CARCH 202110","19DZ2252600"],"award-info":[{"award-number":["CARCH 202110","19DZ2252600"]}]},{"name":"Institute of Computing Technology, Chinese Academy of Sciences and the High Performance Computing Center, Shanghai University","award":["CARCH 202110","19DZ2252600"],"award-info":[{"award-number":["CARCH 202110","19DZ2252600"]}]},{"name":"Shanghai Engineering Research Center of Intelligent Computing System","award":["CARCH 202110","19DZ2252600"],"award-info":[{"award-number":["CARCH 202110","19DZ2252600"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Entropy"],"abstract":"<jats:p>Recurrent Neural Networks (RNNs) are applied in safety-critical fields such as autonomous driving, aircraft collision detection, and smart credit. They are highly susceptible to input perturbations, but little research on RNN-oriented testing techniques has been conducted, leaving a threat to a large number of sequential application domains. To address these gaps, improve the test adequacy of RNNs, find more defects, and improve the performance of RNNs models and their robustness to input perturbations. We aim to propose a test coverage metric for the underlying structure of RNNs, which is used to guide the generation of test inputs to test RNNs. Although coverage metrics have been proposed for RNNs, such as the hidden state coverage in RNN-Test, they ignore the fact that the underlying structure of RNNs is still a fully connected neural network but with an additional \u201cdelayer\u201d that records the network state at the time of data input. We use the contributions, i.e., the combination of the outputs of neurons and the weights they emit, as the minimum computational unit of RNNs to explore the finer-grained logical structure inside the recurrent cells. Compared to existing coverage metrics, our research covers the decision mechanism of RNNs in more detail and is more likely to generate more adversarial samples and discover more flaws in the model. In this paper, we redefine the contribution coverage metric applicable to Stacked LSTMs and Stacked GRUs by considering the joint effect of neurons and weights in the underlying structure of the neural network. We propose a new coverage metric, RNNCon, which can be used to guide the generation of adversarial test inputs. And we design and implement a test framework prototype RNNCon-Test. 2 datasets, 4 LSTM models, and 4 GRU models are used to verify the effectiveness of RNNCon-Test. Compared to the current state-of-the-art study RNN-Test, RNNCon can cover a deeper decision logic of RNNs. RNNCon-Test is not only effective in identifying defects in Deep Learning (DL) systems but also in improving the performance of the model if the adversarial inputs generated by RNNCon-Test are filtered and added to the training set to retrain the model. In the case where the accuracy of the model is already high, RNNCon-Test is still able to improve the accuracy of the model by up to 0.45%.<\/jats:p>","DOI":"10.3390\/e25030520","type":"journal-article","created":{"date-parts":[[2023,3,17]],"date-time":"2023-03-17T03:33:57Z","timestamp":1679024037000},"page":"520","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["RNNCon: Contribution Coverage Testing for Stacked Recurrent Neural Networks"],"prefix":"10.3390","volume":"25","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-4563-4069","authenticated-orcid":false,"given":"Xiaoli","family":"Du","sequence":"first","affiliation":[{"name":"School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China"},{"name":"Shanghai Key Laboratory of Computer Software Testing and Evaluating, Shanghai 201112, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Hongwei","family":"Zeng","sequence":"additional","affiliation":[{"name":"School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China"},{"name":"Shanghai Key Laboratory of Computer Software Testing and Evaluating, Shanghai 201112, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Shengbo","family":"Chen","sequence":"additional","affiliation":[{"name":"School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China"},{"name":"Shanghai Key Laboratory of Computer Software Testing and Evaluating, Shanghai 201112, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Zhou","family":"Lei","sequence":"additional","affiliation":[{"name":"School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China"},{"name":"Shanghai Key Laboratory of Computer Software Testing and Evaluating, Shanghai 201112, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2023,3,17]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Collobert, R., and Weston, J. (2008, January 5\u20139). A unified architecture for natural language processing: Deep neural networks with multitask learning. Proceedings of the 25th International Conference on Machine Learning, Helsinki, Finland.","DOI":"10.1145\/1390156.1390177"},{"key":"ref_2","unstructured":"Mikolov, T., Chen, K., Corrado, G.S., and Dean, J. (2013, January 2\u20134). Efficient Estimation of Word Representations in Vector Space. Proceedings of the International Conference on Learning Representations, Scottsdale, AZ, USA."},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"84","DOI":"10.1145\/3065386","article-title":"ImageNet Classification with Deep Convolutional Neural Networks","volume":"60","author":"Krizhevsky","year":"2017","journal-title":"Commun. ACM"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"82","DOI":"10.1109\/MSP.2012.2205597","article-title":"Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups","volume":"29","author":"Hinton","year":"2012","journal-title":"IEEE Signal Process. Mag."},{"key":"ref_5","unstructured":"Chen, B., Jiang, J., Wang, X., Wan, P., Wang, J., and Long, M. (2022). Debiased Self-Training for Semi-Supervised Learning. arXiv."},{"key":"ref_6","unstructured":"Bojarski, M., Testa, D.D., Dworakowski, D., Firner, B., Flepp, B., Goyal, P., Jackel, L.D., Monfort, M., Muller, U., and Zhang, J. (2016). End to End Learning for Self-Driving Cars. arXiv."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Djolonga, J., Yung, J., Tschannen, M., Romijnders, R., Beyer, L., Kolesnikov, A., Puigcerver, J., Minderer, M., D\u2019Amour, A., and Moldovan, D. (2021, January 20\u201325). On robustness and transferability of convolutional neural networks. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA.","DOI":"10.1109\/CVPR46437.2021.01619"},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1109\/TSE.2019.2962027","article-title":"Machine learning testing: Survey, landscapes and horizons","volume":"48","author":"Zhang","year":"2022","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_9","unstructured":"Lipton, Z.C. (2016). The Mythos of Model Interpretability. arXiv."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Molnar, C., Casalicchio, G., and Bischl, B. (2020, January 14\u201318). Interpretable machine learning\u2014A brief history, state-of-the-art and challenges. Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Ghent, Belgium.","DOI":"10.1007\/978-3-030-65965-3_28"},{"key":"ref_11","unstructured":"Adebayo, J., Gilmer, J., Muelly, M., Goodfellow, I.J., Hardt, M., and Kim, B. (2018). Sanity Checks for Saliency Maps. arXiv."},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Berend, D. (2021). Distribution Awareness for AI System Testing. arXiv.","DOI":"10.1109\/ICSE-Companion52605.2021.00045"},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Pei, K., Cao, Y., Yang, J., and Jana, S. (2017, January 28). Deepxplore: Automated whitebox testing of deep learning systems. Proceedings of the 26th Symposium on Operating Systems Principles, Shanghai, China.","DOI":"10.1145\/3132747.3132785"},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Ma, L., Juefei-Xu, F., Zhang, F., Sun, J., Xue, M., Li, B., Chen, C., Su, T., Li, L., and Liu, Y. (2018, January 3\u20137). Deepgauge: Multi-granularity testing criteria for deep learning systems. Proceedings of the 33rd ACM\/IEEE International Conference on Automated Software Engineering, Montpellier, France.","DOI":"10.1145\/3238147.3238202"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Ma, L., Juefei-Xu, F., Xue, M., Li, B., Li, L., Liu, Y., and Zhao, J. (2019, January 24\u201327). Deepct: Tomographic combinatorial testing for deep learning systems. Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), Hangzhou, China.","DOI":"10.1109\/SANER.2019.8668044"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Sun, Y., Wu, M., Ruan, W., Huang, X., Kwiatkowska, M., and Kroening, D. (2018). Concolic Testing for Deep Neural Networks. arXiv.","DOI":"10.1145\/3238147.3238172"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Sun, Y., Huang, X., Kroening, D., Sharp, J., Hill, M., and Ashmore, R. (2018). Testing deep neural networks. arXiv.","DOI":"10.1145\/3238147.3238172"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/3358233","article-title":"Structural test coverage criteria for deep neural networks","volume":"18","author":"Sun","year":"2019","journal-title":"ACM Trans. Embed. Comput. Syst."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Zhou, Z., Dou, W., Liu, J., Zhang, C., Wei, J., and Ye, D. (2021, January 9\u201312). DeepCon: Contribution Coverage Testing for Deep Learning Systems. Proceedings of the 2021 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), Virtual.","DOI":"10.1109\/SANER50967.2021.00026"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Xie, X., Ma, L., Juefei-Xu, F., Xue, M., Chen, H., Liu, Y., Zhao, J., Li, B., Yin, J., and See, S. (2019, January 15\u201319). DeepHunter: A Coverage-Guided Fuzz Testing Framework for Deep Neural Networks. Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis, Beijing, China.","DOI":"10.1145\/3293882.3330579"},{"key":"ref_21","unstructured":"Tian, Y., Pei, K., Jana, S., and Ray, B. (June, January 27). Deeptest: Automated testing of deep-neural-network-driven autonomous cars. Proceedings of the 40th International Conference on Software Engineering, Gothenburg, Sweden."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Guo, J., Jiang, Y., Zhao, Y., Chen, Q., and Sun, J. (2018, January 4\u20139). DLFuzz: Differential Fuzzing Testing of Deep Learning Systems. Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC\/FSE 2018), Lake Buena Vista, FL, USA.","DOI":"10.1145\/3236024.3264835"},{"key":"ref_23","unstructured":"Chen, Y. (2015). Convolutional Neural Network for Sentence Classification. [Master\u2019s Thesis, University of Waterloo]."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Mikolov, T., Karafi\u00e1t, M., Burget, L., Cernock\u1ef3, J., and Khudanpur, S. (2010, January 26\u201330). Recurrent neural network based language model. Proceedings of the INTERSPEECH 2010\u201411th Annual Conference of the International Speech Communication Association, Makuhari, Chiba, Japan.","DOI":"10.21437\/Interspeech.2010-343"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"2279","DOI":"10.1016\/S0031-3203(01)00178-9","article-title":"Image processing with neural networks\u2014A review","volume":"35","author":"Handels","year":"2002","journal-title":"Pattern Recognit."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Sun, Y., Zheng, W., and Ren, Z. (2022, January 22\u201323). Application of convolutional neural network in image processing. Proceedings of the International Conference on Multi-modal Information Analytics, Huhehaote, China.","DOI":"10.1007\/978-3-031-05484-6_47"},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"1093","DOI":"10.1016\/j.asej.2014.04.011","article-title":"Sentiment analysis algorithms and applications: A survey","volume":"5","author":"Medhat","year":"2014","journal-title":"Ain Shams Eng. J."},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"4167","DOI":"10.1109\/TSE.2021.3114353","article-title":"Rnn-test: Towards adversarial testing for recurrent neural network systems","volume":"48","author":"Guo","year":"2021","journal-title":"IEEE Trans. Softw. Eng."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"1191","DOI":"10.1109\/TR.2021.3080664","article-title":"Coverage-guided testing for recurrent neural networks","volume":"71","author":"Huang","year":"2021","journal-title":"IEEE Trans. Reliab."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Du, X., Xie, X., Li, Y., Ma, L., Liu, Y., and Zhao, J. (2019, January 26\u201330). DeepStellar: Model-Based Quantitative Analysis of Stateful Deep Learning Systems. Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC\/FSE 2019), Tallinn, Estonia.","DOI":"10.1145\/3338906.3338954"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Papernot, N., Mcdaniel, P., Swami, A., and Harang, R. (2016, January 1\u20133). Crafting Adversarial Input Sequences for Recurrent Neural Networks. Proceedings of the MILCOM 2016\u20142016 IEEE Military Communications Conference, Baltimore, MD, USA.","DOI":"10.1109\/MILCOM.2016.7795300"},{"key":"ref_32","unstructured":"Abrecht, S., Akila, M., Gannamaneni, S.S., Groh, K., Heinzemann, C., Houben, S., and Woehrle, M. (2020). Proceedings 39, Computer Safety, Reliability, and Security. SAFECOMP 2020 Workshops: DECSoS 2020, DepDevOps 2020, USDAI 2020, and WAISE 2020, Lisbon, Portugal, 15 September 2020, Springer International Publishing."},{"key":"ref_33","unstructured":"Pascanu, R., Gulcehre, C., Cho, K., and Bengio, Y. (2013). How to construct deep recurrent neural networks. arXiv."},{"key":"ref_34","unstructured":"Burges, C., Bottou, L., Welling, M., Ghahramani, Z., and Weinberger, K. (2013). Advances in Neural Information Processing Systems, Curran Associates, Inc."},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Harel-Canada, F., Wang, L., Gulzar, M.A., Gu, Q., and Kim, M. (2020, January 8\u201313). Is Neuron Coverage a Meaningful Measure for Testing Deep Neural Networks?. Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC\/FSE 2020), Virtual.","DOI":"10.1145\/3368089.3409754"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Cho, K., van Merri\u00ebnboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., and Bengio, Y. (2014, January 2\u201313). Learning Phrase Representations using RNN Encoder\u2013Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar.","DOI":"10.3115\/v1\/D14-1179"},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"1735","DOI":"10.1162\/neco.1997.9.8.1735","article-title":"Long Short-term Memory","volume":"9","author":"Hochreiter","year":"1997","journal-title":"Neural Comput."},{"key":"ref_38","unstructured":"Chung, J., Gulcehre, C., Cho, K., and Bengio, Y. (2014). Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv."},{"key":"ref_39","first-page":"2234","article-title":"Improved techniques for training gans","volume":"29","author":"Salimans","year":"2016","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_40","first-page":"6626","article-title":"Gans trained by a two time-scale update rule converge to a local nash equilibrium","volume":"30","author":"Heusel","year":"2017","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_41","doi-asserted-by":"crossref","first-page":"179","DOI":"10.1207\/s15516709cog1402_1","article-title":"Finding structure in time","volume":"14","author":"Elman","year":"1990","journal-title":"Cogn. Sci."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Wei, J., and Zou, K. (2019). Eda: Easy data augmentation techniques for boosting performance on text classification tasks. arXiv.","DOI":"10.18653\/v1\/D19-1670"},{"key":"ref_43","unstructured":"LeCun, Y., Cortes, C., and Burges, C.J.C. (2023, February 06). MNIST Handwritten Digit Database. Available online: http:\/\/yann.lecun.com\/exdb\/mnist\/."},{"key":"ref_44","unstructured":"Maas, A.L., Daly, R.E., Pham, P.T., Huang, D., Ng, A.Y., and Potts, C. (2011, January 12\u201321). Learning Word Vectors for Sentiment Analysis. Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, Portland, OR, USA."},{"key":"ref_45","doi-asserted-by":"crossref","unstructured":"Li, Z., Ma, X., Xu, C., and Cao, C. (2019, January 25\u201331). Structural Coverage Criteria for Neural Networks Could Be Misleading. Proceedings of the 2019 IEEE\/ACM 41st International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER), Montreal, QC, Canada.","DOI":"10.1109\/ICSE-NIER.2019.00031"},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Dong, Y., Zhang, P., Wang, J., Liu, S., Sun, J., Hao, J., Wang, X., Wang, L., Dong, J.S., and Ting, D. (2019). There is limited correlation between coverage and robustness for deep neural networks. arXiv.","DOI":"10.1109\/ICECCS51672.2020.00016"},{"key":"ref_47","first-page":"2579","article-title":"Visualizing Data using t-SNE","volume":"9","author":"Hinton","year":"2008","journal-title":"J. Mach. Learn. Res."}],"container-title":["Entropy"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1099-4300\/25\/3\/520\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T18:57:24Z","timestamp":1760122644000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1099-4300\/25\/3\/520"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,3,17]]},"references-count":47,"journal-issue":{"issue":"3","published-online":{"date-parts":[[2023,3]]}},"alternative-id":["e25030520"],"URL":"https:\/\/doi.org\/10.3390\/e25030520","relation":{},"ISSN":["1099-4300"],"issn-type":[{"type":"electronic","value":"1099-4300"}],"subject":[],"published":{"date-parts":[[2023,3,17]]}}}