{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,20]],"date-time":"2025-06-20T04:08:53Z","timestamp":1750392533467,"version":"3.41.0"},"reference-count":64,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","funder":[{"name":"National Natural Science Foundation of China","award":["No. 62272473, No.U2441238, No.62202474"],"award-info":[{"award-number":["No. 62272473, No.U2441238, No.62202474"]}]},{"name":"the Science and Technology Innovation Program of Hunan Province","award":["No.2023RC1001, No.2023RC3012"],"award-info":[{"award-number":["No.2023RC1001, No.2023RC3012"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2025,6,19]]},"abstract":"<jats:p>As deep learning (DL) frameworks become widely used, converting models between frameworks is crucial for ecosystem flexibility. However, interestingly, existing model converters commonly focus on syntactic operator API mapping\u2014transpiling operator names and parameters\u2014which results in API compatibility issues (i.e., incompatible parameters, missing operators). These issues arise from semantic inconsistencies due to differences in operator implementation, causing conversion failure or performance degradation.<\/jats:p>\n          <jats:p>In this paper, we present the first comprehensive study on operator semantic inconsistencies through API mapping analysis and framework source code inspection, revealing that 47% of sampled operators exhibit inconsistencies across DL frameworks, with source code limited to individual layers and no inter-layer interactions. This suggests that layer-wise source code alignment is feasible. Based on this, we propose ModelX, a source-level cross-framework conversion approach that extends operator API mapping by addressing semantic inconsistencies beyond the API level. Experiments on PyTorch-to-Paddle conversion show that ModelX successfully converts 624 out of 686 sampled operators and outperforms two state-of-the-art converters and three popular large language models. Moreover, ModelX achieves minimal metric gaps (avg. all under 3.4%) across 52 models from vision, text, and audio tasks, indicating strong robustness.<\/jats:p>","DOI":"10.1145\/3729361","type":"journal-article","created":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T15:15:34Z","timestamp":1750346134000},"page":"2030-2052","source":"Crossref","is-referenced-by-count":0,"title":["Bridging Operator Semantic Inconsistencies: A Source-Level Cross-Framework Model Conversion Approach"],"prefix":"10.1145","volume":"2","author":[{"ORCID":"https:\/\/orcid.org\/0009-0000-9134-5941","authenticated-orcid":false,"given":"Xingpei","family":"Li","sequence":"first","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4504-6806","authenticated-orcid":false,"given":"Yan","family":"Lei","sequence":"additional","affiliation":[{"name":"Chongqing University, Chongqing, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2533-4547","authenticated-orcid":false,"given":"Zhouyang","family":"Jia","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0009-0006-6042-7489","authenticated-orcid":false,"given":"Yuanliang","family":"Zhang","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4493-4265","authenticated-orcid":false,"given":"Haoran","family":"Liu","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8084-8009","authenticated-orcid":false,"given":"Liqian","family":"Chen","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8033-7943","authenticated-orcid":false,"given":"Wei","family":"Dong","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0798-974X","authenticated-orcid":false,"given":"Shanshan","family":"Li","sequence":"additional","affiliation":[{"name":"National University of Defense Technology, Changsha, China"}]}],"member":"320","published-online":{"date-parts":[[2025,6,19]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"12th USENIX symposium on operating systems design and implementation (OSDI 16)","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, and Michael Isard. 2016. TensorFlow: a system for Large-Scale machine learning. In 12th USENIX symposium on operating systems design and implementation (OSDI 16). 265\u2013283."},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.1088\/1742-6596"},{"key":"e_1_2_1_3_1","unstructured":"Baidu. 2019. X2Paddle. https:\/\/github.com\/PaddlePaddle\/X2Paddle Accessed: 2024-07-05"},{"key":"e_1_2_1_4_1","unstructured":"Baidu. 2022. PaConvert. https:\/\/github.com\/PaddlePaddle\/PaConvert Accessed: 2024-07-05"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","unstructured":"Alexei Botchkarev. 2018. Performance metrics (error measures) in machine learning regression forecasting and prognostics: Properties and typology. arXiv preprint arXiv:1809.03006 https:\/\/doi.org\/10.28945\/4184 10.28945\/4184","DOI":"10.28945\/4184"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.7060209"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","unstructured":"Tianqi Chen Mu Li Yutian Li Min Lin Naiyan Wang Minjie Wang Tianjun Xiao Bing Xu Chiyuan Zhang and Zheng Zhang. 2015. Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems. arXiv preprint arXiv:1512.01274 https:\/\/doi.org\/10.48550\/arXiv.1512.01274 10.48550\/arXiv.1512.01274","DOI":"10.48550\/arXiv.1512.01274"},{"key":"e_1_2_1_8_1","volume-title":"13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18)","author":"Chen Tianqi","year":"2018","unstructured":"Tianqi Chen, Thierry Moreau, Ziheng Jiang, Lianmin Zheng, Eddie Yan, Haichen Shen, Meghan Cowan, Leyuan Wang, Yuwei Hu, and Luis Ceze. 2018. TVM: An automated End-to-End optimizing compiler for deep learning. In 13th USENIX Symposium on Operating Systems Design and Implementation (OSDI 18). 578\u2013594."},{"key":"e_1_2_1_9_1","volume-title":"Keras: The Python Deep Learning library. https:\/\/keras.io.","author":"Chollet Fran\u00e7ois","year":"2015","unstructured":"Fran\u00e7ois Chollet and the Keras Team. 2015. Keras: The Python Deep Learning library. https:\/\/keras.io."},{"key":"e_1_2_1_10_1","unstructured":"PyTorch Contributors. 2024. PyTorch. GitHub repository. https:\/\/github.com\/pytorch\/pytorch"},{"key":"e_1_2_1_11_1","unstructured":"PyTorch Contributors. 2025. Torch ONNX Exporter. https:\/\/pytorch.org\/docs\/stable\/onnx.html Accessed: 2025-01-30"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/JVA60410.2023.00015"},{"key":"e_1_2_1_13_1","unstructured":"DeepSeek. 2024. Models - DeepSeek-coder. https:\/\/platform.deepseek.com\/api-docs Accessed: 2024-08-18"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2009.5206848"},{"key":"e_1_2_1_15_1","volume-title":"Differential Testing of Cross Deep Learning Framework APIs: Revealing Inconsistencies and Vulnerabilities. In 32nd USENIX Security Symposium (USENIX Security 23)","author":"Deng Zizhuang","year":"2023","unstructured":"Zizhuang Deng, Guozhu Meng, Kai Chen, Tong Liu, Lu Xiang, and Chunyang Chen. 2023. Differential Testing of Cross Deep Learning Framework APIs: Revealing Inconsistencies and Vulnerabilities. In 32nd USENIX Security Symposium (USENIX Security 23). USENIX Association, Anaheim, CA. 7393\u20137410. isbn:978-1-939133-37-3 https:\/\/www.usenix.org\/conference\/usenixsecurity23\/presentation\/deng-zizhuang"},{"key":"e_1_2_1_16_1","unstructured":"TensorFlow Developers. 2025. TensorFlow Official API Documentation. https:\/\/www.tensorflow.org\/api_docs Accessed: 2025-01-30"},{"key":"e_1_2_1_17_1","volume-title":"Torchscript: Optimized execution of pytorch programs. Retrieved January.","author":"DeVito Zachary","year":"2022","unstructured":"Zachary DeVito. 2022. Torchscript: Optimized execution of pytorch programs. Retrieved January."},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2307.12713"},{"key":"e_1_2_1_19_1","volume-title":"GDB: The GNU Project Debugger. https:\/\/www.gnu.org\/software\/gdb\/ Accessed: 2024-06-02","author":"Project GNU","year":"2023","unstructured":"GNU Project. 2023. GDB: The GNU Project Debugger. https:\/\/www.gnu.org\/software\/gdb\/ Accessed: 2024-06-02"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.24963\/ijcai.2024"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3643916.3646556"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2019.2914071"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVIDL58838.2023.10166096"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1007\/s11432-020-3097-4"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-981-19-2879-6_5"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/3650212.3680374"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-024-10521-0"},{"key":"e_1_2_1_28_1","first-page":"1","article-title":"AutoKeras: An AutoML Library for Deep Learning","volume":"24","author":"Jin Haifeng","year":"2023","unstructured":"Haifeng Jin, Franois Chollet, Qingquan Song, and Xia Hu. 2023. AutoKeras: An AutoML Library for Deep Learning. Journal of Machine Learning Research, 24, 6 (2023), 1\u20136. http:\/\/jmlr.org\/papers\/v24\/20-1355.html","journal-title":"Journal of Machine Learning Research"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2002.11054"},{"key":"e_1_2_1_30_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2102.02886"},{"key":"e_1_2_1_31_1","volume-title":"Ahmed Sidi Mahmoudi, and Sa\u00efd Mahmoudi","author":"Jean-S\u00e9bastien","year":"2021","unstructured":"Jean-S\u00e9bastien LERAT, Ahmed Sidi Mahmoudi, and Sa\u00efd Mahmoudi. 2021. Deep Learning Frameworks: Performances Analysis."},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","unstructured":"Jia Li Ge Li Yongmin Li and Zhi Jin. 2023. Structured chain-of-thought prompting for code generation. ACM Transactions on Software Engineering and Methodology https:\/\/doi.org\/10.1145\/3690635 10.1145\/3690635","DOI":"10.1145\/3690635"},{"key":"e_1_2_1_33_1","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2019.2919566"},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/3368089.3417051"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1142\/S0219691323500078"},{"key":"e_1_2_1_36_1","unstructured":"Yingwei Ma Yue Liu Yue Yu Yuanliang Zhang Yu Jiang Changjian Wang and Shanshan Li. 2023. At which training stage does code data help llms reasoning? arXiv preprint arXiv:2309.16298 arxiv:2309.16298"},{"key":"e_1_2_1_37_1","unstructured":"Yingwei Ma Qingping Yang Rongyu Cao Binhua Li Fei Huang and Yongbin Li. 2024. How to understand whole software repository? arXiv preprint arXiv:2406.01422 https:\/\/doi.org\/abs\/2406.01422"},{"key":"e_1_2_1_38_1","doi-asserted-by":"publisher","DOI":"10.11871\/jfdc.issn.2096.742X.2019.01.011"},{"key":"e_1_2_1_39_1","doi-asserted-by":"publisher","DOI":"10.1145\/3578938"},{"key":"e_1_2_1_40_1","unstructured":"MLEAP Consortium. 2023. EASA Research \u2013 Machine Learning Application Approval (MLEAP) Interim Technical Report. European Union Aviation Safety Agency. Horizon Europe research and innovation programme report"},{"key":"e_1_2_1_41_1","unstructured":"ONNX. 2017. Open Neural Network Exchange. https:\/\/onnx.ai\/ Accessed: 2024-05-08"},{"key":"e_1_2_1_42_1","unstructured":"OpenAI. 2024. Models - GPT-3.5-turbo. https:\/\/platform.openai.com\/docs\/models\/gpt-3-5-turbo Accessed: 2024-08-18"},{"key":"e_1_2_1_43_1","unstructured":"OpenAI. 2024. Models - GPT-4o. https:\/\/platform.openai.com\/docs\/models\/gpt-4o Accessed: 2024-08-18"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME55016.2022.00010"},{"key":"e_1_2_1_45_1","unstructured":"PaddlePaddle. 2025. PaddlePaddle Documentation. https:\/\/www.paddlepaddle.org.cn\/documentation\/docs\/en\/2.5\/api\/index_en.html Accessed: 2025-01-30"},{"key":"e_1_2_1_46_1","unstructured":"PaddlePaddle. 2025. PaddlePaddle GitHub Repository. https:\/\/github.com\/PaddlePaddle Accessed: 2025-02-10"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1912.01703"},{"key":"e_1_2_1_48_1","unstructured":"Python Software Foundation. 2023. pdb - The Python Debugger. https:\/\/docs.python.org\/3\/library\/pdb.html Accessed on 2023-10-25"},{"key":"e_1_2_1_49_1","unstructured":"PyTorch. 2025. PyTorch Documentation. https:\/\/pytorch.org\/docs\/2.0\/ Accessed: 2025-01-30"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/2939672.2945397"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2005.254"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/3468264.3468591"},{"key":"e_1_2_1_53_1","doi-asserted-by":"publisher","DOI":"10.1109\/TCSVT.2021.3054471"},{"key":"e_1_2_1_54_1","unstructured":"TensorLayer Team. 2023. TensorLayerX: An Open-Source Deep Learning Library. https:\/\/github.com\/tensorlayer\/tensorlayerx Accessed: 2024-09-12"},{"key":"e_1_2_1_55_1","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1605.02688"},{"key":"e_1_2_1_56_1","doi-asserted-by":"publisher","unstructured":"Veronika Thost and Jie Chen. 2021. Directed acyclic graph neural networks. arXiv preprint arXiv:2101.07965 https:\/\/doi.org\/10.48550\/arXiv.2101.07965 10.48550\/arXiv.2101.07965","DOI":"10.48550\/arXiv.2101.07965"},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1109\/MCSE.2011.37"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510071"},{"key":"e_1_2_1_59_1","doi-asserted-by":"publisher","DOI":"10.1145\/3510003.3510041"},{"key":"e_1_2_1_60_1","volume-title":"Fei Xia, Ed Chi, Quoc V Le, and Denny Zhou.","author":"Wei Jason","year":"2022","unstructured":"Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed Chi, Quoc V Le, and Denny Zhou. 2022. Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In Advances in Neural Information Processing Systems, S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (Eds.). 35, Curran Associates, Inc., 24824\u201324837. https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2022\/file\/9d5609613524ecf4f15af0f7b31abca4-Paper-Conference.pdf"},{"key":"e_1_2_1_61_1","doi-asserted-by":"publisher","DOI":"10.1145\/3573942.3573948"},{"key":"e_1_2_1_62_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE48619.2023.00105"},{"key":"e_1_2_1_63_1","doi-asserted-by":"publisher","unstructured":"Zihan Yu Liang He Zhen Wu Xinyu Dai and Jiajun Chen. 2023. Towards better chain-of-thought prompting strategies: A survey. arXiv preprint arXiv:2310.04959 https:\/\/doi.org\/10.48550\/arXiv.2310.04959 10.48550\/arXiv.2310.04959","DOI":"10.48550\/arXiv.2310.04959"},{"key":"e_1_2_1_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/3213846.3213866"}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3729361","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T15:22:06Z","timestamp":1750346526000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3729361"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,6,19]]},"references-count":64,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2025,6,19]]}},"alternative-id":["10.1145\/3729361"],"URL":"https:\/\/doi.org\/10.1145\/3729361","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,6,19]]}}}