{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,2]],"date-time":"2026-10-02T10:20:30Z","timestamp":1790936430927,"version":"4.1.0"},"reference-count":81,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2024,4,18]],"date-time":"2024-04-18T00:00:00Z","timestamp":1713398400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100000923","name":"Australian Research Council","doi-asserted-by":"crossref","award":["DP210100041"],"award-info":[{"award-number":["DP210100041"]}],"id":[{"id":"10.13039\/501100000923","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2024,5,31]]},"abstract":"<jats:p>Deep Learning (DL) models have rapidly advanced, focusing on achieving high performance through testing model accuracy and robustness. However, it is unclear whether DL projects, as software systems, are tested thoroughly or functionally correct when there is a need to treat and test them like other software systems. Therefore, we empirically study the unit tests in open-source DL projects, analyzing 9,129 projects from GitHub. We find that: (1) unit tested DL projects have positive correlation with the open-source project metrics and have a higher acceptance rate of pull requests; (2) 68% of the sampled DL projects are not unit tested at all; (3) the layer and utilities (utils) of DL models have the most unit tests. Based on these findings and previous research outcomes, we built a mapping taxonomy between unit tests and faults in DL projects. We discuss the implications of our findings for developers and researchers and highlight the need for unit testing in open-source DL projects to ensure their reliability and stability. The study contributes to this community by raising awareness of the importance of unit testing in DL projects and encouraging further research in this area.<\/jats:p>\n                  <jats:p\/>","DOI":"10.1145\/3638245","type":"journal-article","created":{"date-parts":[[2023,12,20]],"date-time":"2023-12-20T07:06:14Z","timestamp":1703055974000},"page":"1-22","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":7,"title":["Beyond Accuracy: An Empirical Study on Unit Testing in Open-source Deep Learning Projects"],"prefix":"10.1145","volume":"33","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7862-6677","authenticated-orcid":false,"given":"Han","family":"Wang","sequence":"first","affiliation":[{"name":"Faculty of Information Technology, Monash University, Clayton Victoria, Australia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-1946-9407","authenticated-orcid":false,"given":"Sijia","family":"Yu","sequence":"additional","affiliation":[{"name":"Jilin University, Changchun, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2011-9618","authenticated-orcid":false,"given":"Chunyang","family":"Chen","sequence":"additional","affiliation":[{"name":"Faculty of Information Technology, Monash University, Clayton Victoria, Australia"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1511-2163","authenticated-orcid":false,"given":"Burak","family":"Turhan","sequence":"additional","affiliation":[{"name":"M3S Research Unit, Faculty of ITEE, University of Oulu, Oulu, Finland"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7200-7629","authenticated-orcid":false,"given":"Xiaodong","family":"Zhu","sequence":"additional","affiliation":[{"name":"Jilin University, Changchun, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2024,4,18]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"Pytest-dev Team. 2015. PyTest: Helps you write better programs. Retrived from: https:\/\/docs.pytest.org\/en\/7.1.x\/"},{"key":"e_1_3_1_3_2","unstructured":"Richard. 2016. Unit tests for functions in a Jupyter notebook? Retrieved from: https:\/\/stackoverflow.com\/questions\/40172281\/unit-tests-for-functions-in-a-jupyter-notebook"},{"key":"e_1_3_1_4_2","unstructured":"Chase Roberts. 2017. How To Unit Test Machine Learning Code. Retrieved from: https:\/\/www.kdnuggets.com\/2017\/11\/unit-test-machine-learning-code.html"},{"key":"e_1_3_1_5_2","unstructured":"Aadharna. 2017. Tensorflow response is making no sense. Retrieved from: https:\/\/www.reddit.com\/r\/MachineLearning\/comments\/6qyvvg\/p_tensorflow_response_is_making_no_sense\/"},{"key":"e_1_3_1_6_2","unstructured":"Moritz Klammler. 2021. driver-check.py. Retrieved from: https:\/\/github.com\/5gon12eder\/msc-graphstudy\/blob\/master\/test\/driver-check.py"},{"key":"e_1_3_1_7_2","unstructured":"Paper With Code. 2021. Github - paperswithcode\/paperswithcode-data:the full dataset behind paperswithcode.com. Retrieved from: https:\/\/github.com\/paperswithcode\/paperswithcode-data"},{"key":"e_1_3_1_8_2","unstructured":"Keras. 2021. Keras API reference. Retrieved from: https:\/\/keras.io\/api\/"},{"key":"e_1_3_1_9_2","unstructured":"Tensorflow. 2021. Module: tf.test | TensorFlow Core v2.5.0. Retrieved from: https:\/\/tensorflow.google.cn\/versions\/r2.5\/api_docs\/python\/tf\/test"},{"key":"e_1_3_1_10_2","unstructured":"Tensorflow. 2021. TensorFlow testing best practices. Retrieved from: https:\/\/tensorflow.google.cn\/community\/contribute\/tests"},{"key":"e_1_3_1_11_2","unstructured":"Apache Software Foundation. 2021. test_loss.py.. Retrieved from: https:\/\/github.com\/apache\/incubator-mxnet\/blob\/master\/tests\/python\/unittest\/test_loss.py"},{"key":"e_1_3_1_12_2","unstructured":"LinkedIn. 2021. test_lstm_layer.py. DeText Repository. Retrieved from: https:\/\/github.com\/linkedin\/detext\/blob\/master\/test\/detext\/layers\/test_lstm_layer.py"},{"key":"e_1_3_1_13_2","unstructured":"Github Inc. 2022. GitHub Managing labels. Retrieved from: https:\/\/docs.github.com\/en\/issues\/using-labels-and-milestones-to-track-work\/managing-labels"},{"key":"e_1_3_1_14_2","unstructured":"GitHub Inc. 2022. GitHub REST API. Retrieved from: https:\/\/docs.github.com\/en\/rest"},{"key":"e_1_3_1_15_2","unstructured":"Numpy Developers. 2022. Test Support (numpy.testing). Retrieved from: https:\/\/numpy.org\/doc\/stable\/reference\/routines.testing.html"},{"key":"e_1_3_1_16_2","unstructured":"Freddiewanah. 2022. Unit Test in Open-source DL Projects. Retrieved from: https:\/\/github.com\/freddiewanah\/UnitTest-DL"},{"key":"e_1_3_1_17_2","unstructured":"Python Software Foundation. 2022. unittest-Unit testing framework-python 3.10.2 documentation. Retrieved from: https:\/\/docs.python.org\/3\/library\/unittest.html"},{"key":"e_1_3_1_18_2","unstructured":"AIDanial. 2023. AlDanial\/cloc: cloc counts blank lines comment lines and physical lines of source code in many programming languages. Retrieved from: https:\/\/github.com\/AlDanial\/cloc"},{"key":"e_1_3_1_19_2","unstructured":"Papers With Code. 2023. General Methods Papers With Code. Retrieved from: https:\/\/paperswithcode.com\/methods\/area\/general"},{"key":"e_1_3_1_20_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-SEIP.2017.27"},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.1109\/SEAA.2018.00018"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","DOI":"10.5220\/0005519903480357"},{"key":"e_1_3_1_23_2","doi-asserted-by":"publisher","DOI":"10.5555\/850947.853341"},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.5555\/338330"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME.2016.31"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1109\/BigData.2017.8258038"},{"key":"e_1_3_1_27_2","volume-title":"Machine Learning and Systems Conference (MLSys\u201919)","author":"Breck Eric","year":"2019","unstructured":"Eric Breck, Neoklis Polyzotis, Sudip Roy, Steven Whang, and Martin Zinkevich. 2019. Data validation for machine learning. In Machine Learning and Systems Conference (MLSys\u201919)."},{"key":"e_1_3_1_28_2","article-title":"On empirical comparisons of optimizers for deep learning","author":"Choi Dami","year":"2019","unstructured":"Dami Choi, Christopher J. Shallue, Zachary Nado, Jaehoon Lee, Chris J. Maddison, and George E. Dahl. 2019. On empirical comparisons of optimizers for deep learning. arXiv preprint arXiv:1910.05446 (2019).","journal-title":"arXiv preprint arXiv:1910.05446"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.1037\/0033-2909.114.3.494"},{"key":"e_1_3_1_30_2","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE.2014.11"},{"key":"e_1_3_1_31_2","article-title":"BERT: Pre-training of deep bidirectional transformers for language understanding","author":"Devlin Jacob","year":"2018","unstructured":"Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018).","journal-title":"arXiv preprint arXiv:1810.04805"},{"key":"e_1_3_1_32_2","doi-asserted-by":"publisher","DOI":"10.1007\/s12652-020-01998-w"},{"key":"e_1_3_1_33_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME46990.2020.00040"},{"key":"e_1_3_1_34_2","doi-asserted-by":"publisher","DOI":"10.1145\/3236024.3264835"},{"key":"e_1_3_1_35_2","doi-asserted-by":"publisher","DOI":"10.1145\/3340531.3412699"},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.array.2021.100057"},{"key":"e_1_3_1_37_2","doi-asserted-by":"publisher","DOI":"10.1080\/19312450709336664"},{"key":"e_1_3_1_38_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380395"},{"key":"e_1_3_1_39_2","doi-asserted-by":"publisher","DOI":"10.1145\/3338906.3338955"},{"key":"e_1_3_1_40_2","doi-asserted-by":"publisher","DOI":"10.1145\/3377811.3380378"},{"key":"e_1_3_1_41_2","article-title":"IEC\/IEEE international standard-systems and software engineering\u2013Vocabulary","author":"Iso ISO","year":"2017","unstructured":"ISO Iso. 2017. IEC\/IEEE international standard-systems and software engineering\u2013Vocabulary. ISO\/IEC\/IEEE 24765: 2017 (E) (2017).","journal-title":"ISO\/IEC\/IEEE 24765: 2017 (E)"},{"key":"e_1_3_1_42_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-13734-6_6"},{"key":"e_1_3_1_43_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME52107.2021.00011"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER53432.2022.00097"},{"key":"e_1_3_1_45_2","doi-asserted-by":"publisher","DOI":"10.1038\/nature14539"},{"key":"e_1_3_1_46_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-59762-7_2"},{"key":"e_1_3_1_47_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2019.8668044"},{"key":"e_1_3_1_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238202"},{"key":"e_1_3_1_49_2","doi-asserted-by":"publisher","DOI":"10.1214\/aoms\/1177730491"},{"key":"e_1_3_1_50_2","volume-title":"TensorFlow Machine Learning Cookbook","author":"McClure Nick","year":"2017","unstructured":"Nick McClure. 2017. TensorFlow Machine Learning Cookbook. PACKT Publishing Ltd."},{"key":"e_1_3_1_51_2","doi-asserted-by":"publisher","DOI":"10.1145\/567793.567795"},{"key":"e_1_3_1_52_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4842-4240-7"},{"key":"e_1_3_1_53_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2019.00078"},{"key":"e_1_3_1_54_2","article-title":"Activation functions: Comparison of trends in practice and research for deep learning","author":"Nwankpa Chigozie","year":"2018","unstructured":"Chigozie Nwankpa, Winifred Ijomah, Anthony Gachagan, and Stephen Marshall. 2018. Activation functions: Comparison of trends in practice and research for deep learning. arXiv preprint arXiv:1811.03378 (2018).","journal-title":"arXiv preprint arXiv:1811.03378"},{"key":"e_1_3_1_55_2","article-title":"SpecAugment: A simple data augmentation method for automatic speech recognition","author":"Park Daniel S.","year":"2019","unstructured":"Daniel S. Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D. Cubuk, and Quoc V. Le. 2019. SpecAugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779 (2019).","journal-title":"arXiv preprint arXiv:1904.08779"},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","DOI":"10.1145\/3132747.3132785"},{"key":"e_1_3_1_57_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-020-09881-0"},{"key":"e_1_3_1_58_2","doi-asserted-by":"publisher","DOI":"10.1145\/3368089.3409730"},{"key":"e_1_3_1_59_2","volume-title":"Proceedings of the SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop)","author":"Sculley David","year":"2014","unstructured":"David Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, and Michael Young. 2014. Machine learning: The high interest credit card of technical debt. In Proceedings of the SE4ML: Software Engineering for Machine Learning (NIPS 2014 Workshop)."},{"key":"e_1_3_1_60_2","first-page":"2503","article-title":"Hidden technical debt in machine learning systems","volume":"28","author":"Sculley David","year":"2015","unstructured":"David Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-Francois Crespo, and Dan Dennison. 2015. Hidden technical debt in machine learning systems. Adv. Neural Inf. Process. Syst. 28 (2015), 2503\u20132511.","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"e_1_3_1_61_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-NIER.2019.00030"},{"key":"e_1_3_1_62_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2015.86"},{"key":"e_1_3_1_63_2","doi-asserted-by":"publisher","DOI":"10.1109\/IACS.2018.8355444"},{"key":"e_1_3_1_64_2","article-title":"Exploring ML testing in practice\u2013Lessons learned from an interactive rapid review with Axis Communications","author":"Song Qunying","year":"2022","unstructured":"Qunying Song, Markus Borg, Emelie Engstr\u00f6m, H\u00e5kan Ard\u00f6, and Sergio Rico. 2022. Exploring ML testing in practice\u2013Lessons learned from an interactive rapid review with Axis Communications. arXiv preprint arXiv:2203.16225 (2022).","journal-title":"arXiv preprint arXiv:2203.16225"},{"key":"e_1_3_1_65_2","doi-asserted-by":"publisher","DOI":"10.1214\/ss\/1177012580"},{"key":"e_1_3_1_66_2","article-title":"Testing deep neural networks","author":"Sun Youcheng","year":"2018","unstructured":"Youcheng Sun, Xiaowei Huang, Daniel Kroening, James Sharp, Matthew Hill, and Rob Ashmore. 2018. Testing deep neural networks. arXiv preprint arXiv:1803.04792 (2018).","journal-title":"arXiv preprint arXiv:1803.04792"},{"key":"e_1_3_1_67_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-19811-3_21"},{"key":"e_1_3_1_68_2","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180220"},{"key":"e_1_3_1_69_2","volume-title":"An Analysis of the Differences between Unit and Integration Tests","author":"Trautsch Fabian","year":"2019","unstructured":"Fabian Trautsch. 2019. An Analysis of the Differences between Unit and Integration Tests. Ph.D. Dissertation. Nieders\u00e4chsische Staats-und Universit\u00e4tsbibliothek G\u00f6ttingen."},{"key":"e_1_3_1_70_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICST.2017.26"},{"key":"e_1_3_1_71_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2019.110421"},{"key":"e_1_3_1_72_2","doi-asserted-by":"publisher","DOI":"10.1145\/2568225.2568315"},{"key":"e_1_3_1_73_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASE51524.2021.9678615"},{"key":"e_1_3_1_74_2","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2019.2962695"},{"key":"e_1_3_1_75_2","article-title":"What do users ask in open-source AI repositories? An empirical study of GitHub issues","author":"Yang Zhou","year":"2023","unstructured":"Zhou Yang, Chenyu Wang, Jieke Shi, Thong Hoang, Pavneet Kochhar, Qinghua Lu, Zhenchang Xing, and David Lo. 2023. What do users ask in open-source AI repositories? An empirical study of GitHub issues. arXiv preprint arXiv:2303.09795 (2023).","journal-title":"arXiv preprint arXiv:2303.09795"},{"key":"e_1_3_1_76_2","doi-asserted-by":"publisher","DOI":"10.1109\/CSCI.2017.163"},{"key":"e_1_3_1_77_2","doi-asserted-by":"crossref","unstructured":"Hao Yu Yiling Lou Ke Sun Dezhi Ran Tao Xie Dan Hao Ying Li Ge Li and Qianxiang Wang. 2022. Automated assertion generation via information retrieval and its integration with deep learning. In International Conference on Software Engineering (ICSE\u201922).","DOI":"10.1145\/3510003.3510149"},{"key":"e_1_3_1_78_2","volume-title":"Biostatistical Analysis","author":"Zar Jerrold H.","year":"1999","unstructured":"Jerrold H. Zar. 1999. Biostatistical Analysis. Pearson Education India."},{"key":"e_1_3_1_79_2","volume-title":"Biostatistical Analysis","author":"Zar Jerrold H.","year":"1999","unstructured":"Jerrold H. Zar. 1999. Biostatistical Analysis. 4th ed., Prentice Hall, NJ."},{"key":"e_1_3_1_80_2","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2013.39"},{"key":"e_1_3_1_81_2","article-title":"Software engineering practice in the development of deep learning applications","author":"Zhang Xufan","year":"2019","unstructured":"Xufan Zhang, Yilin Yang, Yang Feng, and Zhenyu Chen. 2019. Software engineering practice in the development of deep learning applications. arXiv preprint arXiv:1910.03156 (2019).","journal-title":"arXiv preprint arXiv:1910.03156"},{"key":"e_1_3_1_82_2","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213866"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3638245","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3638245","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T18:53:35Z","timestamp":1750272815000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3638245"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,4,18]]},"references-count":81,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2024,5,31]]}},"alternative-id":["10.1145\/3638245"],"URL":"https:\/\/doi.org\/10.1145\/3638245","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,4,18]]},"assertion":[{"value":"2023-05-11","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2023-11-28","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-04-18","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}