{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,4]],"date-time":"2026-05-04T13:00:44Z","timestamp":1777899644465,"version":"3.51.4"},"reference-count":56,"publisher":"Association for Computing Machinery (ACM)","content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"abstract":"<jats:p>Convolutional Neural Network\u00a0(CNN) operators, mostly based on mathematical linear computations, are of vital importance to developing CNN-based software. Existing studies reveal that these operators are prone to floating-point precision problems (FPPs). In a CNN-based application, such problems can be propagated and result in catastrophic consequences. Thus, it is highly desired to detect and repair the FPPs in CNN operators. Considering the FPPs in CNN operators are mainly caused by accumulated floating-point errors and diverse floating-point tensors instead of wrong codes or bad implementations, it requires much time cost and is difficult to tackle these FPPs.<\/jats:p>\n          <jats:p>\n            In this paper, we propose the first method for the automated detection and repair of FPPs in CNN operators from the perspective of floating-point tensors. To generate diverse tensors with floating-point numbers, we design two levels of mutation rules, namely computation-level mutation and input-level mutation, containing a total of five mutation methods. To detect the FPPs caused by the accumulated floating-point errors, our method uses a weight matrix to guide the progressive mutation. To repair the detected FPPs, our method transforms the error-prone floating-point tensors based on the mathematical rewriting of the floating-point linear computational properties without destroying the original computation. Experimental results show that our methods can detect and repair FPPs in CNN operators effectively and efficiently and could reduce 93.32% to 100% of the FPPs in CNN operators.\n            <jats:styled-content style=\"color:#000000;\">We conduct a case study on six different widely-used CNN models and confirm that the proposed FPP method is generalizable and effective across a variety of tasks and architectures. Our detection and repair method offers an intuitive way to handle FPPs during development, allowing users to continue building and fine-tuning their models without being slowed down by numerical precision errors.<\/jats:styled-content>\n            We believe that our method could open up a new way to enhance the quality of CNN operators and CNN-based software.\n          <\/jats:p>","DOI":"10.1145\/3715104","type":"journal-article","created":{"date-parts":[[2025,1,27]],"date-time":"2025-01-27T15:53:31Z","timestamp":1737993211000},"update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":2,"title":["Automated Detection and Repair of Floating-point Precision Problems in Convolutional Neural Network Operators"],"prefix":"10.1145","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-4930-9637","authenticated-orcid":false,"given":"Jiawei","family":"Liu","sequence":"first","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China and Shenzhen Research Institute of Nanjing University, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7284-1931","authenticated-orcid":false,"given":"Xufan","family":"Zhang","sequence":"additional","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-3217-9954","authenticated-orcid":false,"given":"Lurong","family":"Xu","sequence":"additional","affiliation":[{"name":"I&amp;V Dept of Kirin Solution Dept, HS, Huawei, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9930-7111","authenticated-orcid":false,"given":"Chunrong","family":"Fang","sequence":"additional","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China and Shenzhen Research Institute of Nanjing University, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-5141-8923","authenticated-orcid":false,"given":"Mingzheng","family":"Gu","sequence":"additional","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-9333-439X","authenticated-orcid":false,"given":"Weisi","family":"Luo","sequence":"additional","affiliation":[{"name":"I&amp;V Dept of Kirin Solution Dept, HS, Huawei, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0002-2235-5788","authenticated-orcid":false,"given":"Dong","family":"Chai","sequence":"additional","affiliation":[{"name":"I&amp;V Dept of Kirin Solution Dept, HS, Huawei, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-3224-4218","authenticated-orcid":false,"given":"Jiang","family":"Wang","sequence":"additional","affiliation":[{"name":"I&amp;V Dept of Kirin Solution Dept, HS, Huawei, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0009-8850-5583","authenticated-orcid":false,"given":"Zhihong","family":"Zhao","sequence":"additional","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9592-7022","authenticated-orcid":false,"given":"Zhenyu","family":"Chen","sequence":"additional","affiliation":[{"name":"State Key Laboratory for Novel Software Technology, Nanjing University, China and Shenzhen Research Institute of Nanjing University, China"}]}],"member":"320","published-online":{"date-parts":[[2025,1,27]]},"reference":[{"key":"e_1_2_1_1_1","first-page":"413","article-title":". What Every Computer Scientist Should Know About Floating-Point Arithmetic","volume":"23","year":"1991","unstructured":"1991. What Every Computer Scientist Should Know About Floating-Point Arithmetic. ACM Computing Survey 23, 3 (1991), 413. https:\/\/doi.org\/doi\/abs\/10.1145\/103162.103163","journal-title":"ACM Computing Survey"},{"key":"e_1_2_1_2_1","volume-title":"TensorFlow: A System for Large-Scale Machine Learning. In 12th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2016","author":"Abadi Mart\u00edn","year":"2016","unstructured":"Mart\u00edn Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek\u00a0Gordon Murray, Benoit Steiner, Paul\u00a0A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. 2016. TensorFlow: A System for Large-Scale Machine Learning. In 12th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2016, Savannah, GA, USA, November 2-4, 2016. USENIX Association, 265\u2013283. https:\/\/www.usenix.org\/conference\/osdi16\/technical-sessions\/presentation\/abadi"},{"key":"e_1_2_1_3_1","volume-title":"Diagnostic accuracy of deep learning in medical imaging: a systematic review and meta-analysis. NPJ digital medicine 4, 1","author":"Aggarwal Ravi","year":"2021","unstructured":"Ravi Aggarwal, Viknesh Sounderajah, Guy Martin, Daniel\u00a0SW Ting, Alan Karthikesalingam, Dominic King, Hutan Ashrafian, and Ara Darzi. 2021. Diagnostic accuracy of deep learning in medical imaging: a systematic review and meta-analysis. NPJ digital medicine 4, 1 (2021), 1\u201323. https:\/\/doi.org\/articles\/s41746-021-00438-z"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1137\/1.9780898719604"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/2429069.2429133"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.5555\/3104322.3104338"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2203.04026"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/2555243.2555265"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/s11263-011-0505-4"},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICCPS.2018.00028"},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-04570-7_6"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/TIP.2022.3144017"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","unstructured":"Alan Feldstein and PETER TURNER. [n.\u2009d.]. Overflow Underflow and Severe Loss of Significance in Floating-Point Addition and Subtraction. Ima Journal of Numerical Analysis 6 2 ([n.\u2009d.]) 241\u2013251. https:\/\/doi.org\/10.1093\/imanum\/6.2.241","DOI":"10.1093\/imanum"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2017.8115662"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2814270.2814317"},{"key":"e_1_2_1_16_1","unstructured":"Mark Galassi Jim Davies James Theiler Brian Gough Gerard Jungman Patrick Alken Michael Booth Fabrice Rossi and Rhys Ulerich. 2002. GNU scientific library. Network Theory Limited. https:\/\/doi.org\/linux\/misc\/gsl-ref.pdf"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR52688.2022.01186"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1109\/ASE.2019.00080"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/3324884.3416571"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2017.243"},{"key":"e_1_2_1_21_1","volume-title":"Proceedings of Machine Learning and Systems 2020","author":"Jiang Xiaotang","year":"2020","unstructured":"Xiaotang Jiang, Huan Wang, Yiliu Chen, Ziqi Wu, Lichuan Wang, Bin Zou, Yafeng Yang, Zongyang Cui, Yu Cai, Tianhang Yu, Chengfei Lyu, and Zhihua Wu. 2020. MNN: A Universal and Efficient Inference Engine. In Proceedings of Machine Learning and Systems 2020, MLSys 2020, Austin, TX, USA, March 2-4, 2020. mlsys.org. https:\/\/proceedings.mlsys.org\/book\/287.pdf"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/ARITH48897.2020.00023"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1109\/TNNLS.2021.3084827"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/TR.2020.3032744"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE43902.2021.00037"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1098\/rsta.2015.0203"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","unstructured":"Henri\u00a0J. Nussbaumer. 1978. New algorithms for convolution and DFT based on polynomial transforms. (1978) 638\u2013641. https:\/\/doi.org\/10.1109\/ICASSP.1978.1170580","DOI":"10.1109\/ICASSP.1978.1170580"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1109\/JPROC.2021.3074329"},{"key":"e_1_2_1_29_1","volume-title":"High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019","author":"Paszke Adam","year":"2019","unstructured":"Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas K\u00f6pf, Edward\u00a0Z. Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada. 8024\u20138035. https:\/\/proceedings.neurips.cc\/paper\/2019\/hash\/bdbca288fee7f92f2bfa9f7012727740-Abstract.html"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00107"},{"key":"e_1_2_1_31_1","unstructured":"Pytorch. 2018. nn.Linear layer output nan on well formed input. https:\/\/discuss.pytorch.org\/t\/nn-linear-layer-output-nan-on-well-formed-input\/19935"},{"key":"e_1_2_1_32_1","unstructured":"Pytorch. 2019. Input nan output -inf. https:\/\/discuss.pytorch.org\/t\/input-nan-output-inf\/40125"},{"key":"e_1_2_1_33_1","unstructured":"Pytorch. 2019. Is there a PyTorch equivalent to tf.reduce_max()? https:\/\/discuss.pytorch.org\/t\/is-there-a-pytorch-equivalent-to-tf-reduce-max\/35451"},{"key":"e_1_2_1_34_1","unstructured":"Pytorch. 2020. How to debug with floating point differences. https:\/\/discuss.pytorch.org\/t\/how-to-debug-with-floating-point-differences\/82397\/4"},{"key":"e_1_2_1_35_1","unstructured":"Pytorch. 2020. How to fix this nan bug? https:\/\/discuss.pytorch.org\/t\/how-to-fix-this-nan-bug\/90291\/10"},{"key":"e_1_2_1_36_1","volume-title":"Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018","author":"Santurkar Shibani","year":"2018","unstructured":"Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. 2018. How Does Batch Normalization Help Optimization?. In Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montr\u00e9al, Canada. 2488\u20132498. https:\/\/proceedings.neurips.cc\/paper\/2018\/hash\/905056c1ac1dad141560467e0a99e1cf-Abstract.html"},{"key":"e_1_2_1_37_1","first-page":"11","article-title":"Roundoff error and the Patriot missile","volume":"25","author":"Skeel Robert","year":"1992","unstructured":"Robert Skeel. 1992. Roundoff error and the Patriot missile. SIAM News 25, 4 (1992), 11. https:\/\/doi.org\/~arnold\/disasters\/Patriot-dharan-skeel-siam.pdf","journal-title":"SIAM News"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/3230733"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2016.2642956"},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/3180155.3180220"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1109\/MCSE.2011.37"},{"key":"e_1_2_1_42_1","volume-title":"Matthew Brett, Joshua Wilson, K.\u00a0Jarrod Millman, Nikolay Mayorov, Andrew R.\u00a0J","author":"Virtanen Pauli","unstructured":"Pauli Virtanen, Ralf Gommers, Travis\u00a0E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, St\u00e9fan van\u00a0der Walt, Matthew Brett, Joshua Wilson, K.\u00a0Jarrod Millman, Nikolay Mayorov, Andrew R.\u00a0J. Nelson, Eric Jones, Robert Kern, Eric Larson, C.\u00a0J. Carey, Ilhan Polat, Yu Feng, Eric\u00a0W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E.\u00a0A. Quintero, Charles\u00a0R. Harris, Anne\u00a0M. Archibald, Ant\u00f4nio\u00a0H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, and SciPy. 2019. SciPy 1.0-Fundamental Algorithms for Scientific Computing in Python. CoRR abs\/1907.10121 (2019). arXiv:1907.10121 http:\/\/arxiv.org\/abs\/1907.10121"},{"key":"e_1_2_1_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/3551349.3559561"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3368089.3409761"},{"key":"e_1_2_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510041"},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE.2019.00063"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/3468264.3468612"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2019.00748"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR42600.2020.00762"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290369"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1109\/12.156546"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3238147.3238187"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1109\/TR.2021.3107165"},{"key":"e_1_2_1_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/3460319.3464843"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213866"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICCV.2017.244"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3715104","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,1,27]],"date-time":"2025-01-27T15:55:28Z","timestamp":1737993328000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3715104"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,1,27]]},"references-count":56,"alternative-id":["10.1145\/3715104"],"URL":"https:\/\/doi.org\/10.1145\/3715104","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,1,27]]},"assertion":[{"value":"2023-03-05","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-01-09","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-01-27","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}],"article-number":"3715104"}}