Neural Network Interoperability Across Platforms DOI: XXXXXXX.XXXXXXX Conference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NY ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Neural networks CCS: Software and its en
Nadia Daoudi, Ivan Alfonso, Jordi Cabot · 2025
Read Neural Network Interoperability Across Platforms DOI: XXXXXXX.XXXXXXX Conference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NY ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Neural networks CCS: Software and its en by Nadia Daoudi, Ivan Alfonso, Jordi Cabot (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-02610.txt.
Introduction
Nadia Daoudi, Ivan Alfonso, and Jordi Cabot automate the tedious job of moving a neural network from one software library to another. Organisations switch libraries, from PyTorch to TensorFlow or back, when performance slips or requirements change, but no tailored migration tools exist for neural network code. Engineers therefore rewrite by hand and risk subtle behavioural changes. The authors' approach first lifts the current code into a framework-neutral pivot model of the network.
From that abstraction, equivalent code is produced in the target library. The paper discusses the concrete mismatches between PyTorch and TensorFlow and how the method handles each one. In an evaluation on five neural networks, the migrations succeeded and produced networks functionally equivalent to the originals. The artefacts are published online for other teams facing the same framework trap.
Catalog record
| CREATOR | Nadia Daoudi, Ivan Alfonso, Jordi Cabot |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 45 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-02610
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Neural Network Interoperability Across Platforms DOI: XXXXXXX.XXXXXXX Conference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NY ISBN: 978-1-4503-XXXX-X/2018/06 CCS: Computing methodologies Neural networks CCS: Software and its engineering Model-driven software engineering CCS: Software and its engineering Maintaining software Nadia Daoudi, Ivan Alfonso, Jordi Cabot Abstract . The development of smart systems (i.e., systems enhanced with AI components) has thrived thanks to the rapid advancements in neural networks (NNs). A wide range of libraries and frameworks have consequently emerged to support NN design and implementation. The choice depends on factors such as available functionalities, ease of use, documentation and community support. After adopting a given NN framework, organizations might later choose to switch to another if performance declines, requirements evolve, or new features are introduced. Unfortunately, migrating NN implementations across libraries is challenging due to the lack of migration approaches specifically tailored for NNs. This leads to increased time and effort to modernize NNs, as manual updates are necessary to avoid relying on outdated implementations and ensure compatibility with new features. In this paper, we propose an approach to automatically migrate neural network code across deep learning frameworks. Our method makes use of a pivot NN model to create an abstraction of the NN prior to migration. We validate our approach using two popular NN frameworks, namely PyTorch and TensorFlow. We also discuss the challenges of migrating code between the two frameworks and how they were approached in our method. Experimental evaluation on five NNs shows that our approach successfully migrates their code and produces NNs that are functionally equivalent to the originals. Artefacts from our work are available online 1 1 1 https://anonymous.4open.science/r/Migration-NNs . 1. Introduction With the growing demand for smart software, organizations are investing in developing and maintaining AI-based applications to respond to evolving customer needs and remain competitive in the market ( BCG 2025 ; Business Insider 2025 ) . This increasing demand is driven by the need to leverage the vast and ever-growing amounts of data to provide personalized services and enable more informed decision-making ( Nielsen 2025 ; Segment 2025 ) . Moreover, efficiency improvements and cost reduction are also considered significant drivers for adopting smart systems as they allow organizations to increase productivity using fewer resources ( Vintti 2023 ; Financial Times 2025 ) . Neural networks are at the core of many smart systems, forming the foundation of their decision-making processes. They have been successfully applied to various domains, consistently achieving state-of-the-art performance in tasks like image classification, speech recognition, and anomaly detection. Various types of NN layers exist, each designed for a specific task, enabling NNs to efficiently tackle a wide range of challenges. For instance, convolutional neural networks (CNNs) ( Ketkar and Moolayil 2021 ) are composed of convolutional and pooling layers that efficiently process and analyse spatial data, making them particularly effective for tasks like object detection ( Girshick et al. 2014 ) and image segmentation ( Long et al. 2015 ) . Recurrent neural networks (RNNs) ( Schmidt 2019 ) , on the other hand, contain recurrent layers that excel in processing temporal and sequential data, which makes them suitable for tasks like machine translation ( Bahdanau et al. 2014 ) and time series prediction ( Hewamalage et al. 2021 ) . Neural network development is supported by a range of deep learning (DL) frameworks specifically designed for NN creation, training and validation, making it easier to implement and leverage advanced concepts and features effectively. With the rapid pace of artificial intelligence (AI) development, organizations may seek to migrate to a different framework that offers better support for new features, enabling them stay up-to-date with emerging technologies and best practices. Migration may also be necessary when the adopted DL framework lacks interoperability with modern tools or platforms, which hinders seamless integration. For instance, Hugging Face recently announced the deprecation of TensorFlow 2 2 2 https://www.tensorflow.org/ and Flax 3 3 3 https://flax.readthedocs.io/en/stable/ support in their transformers library ( Debut 2025 ) . This decision will require users to transition to supported frameworks to maintain compatibility and fully leverage Hugging Face new features and updates. Besides, documentation and community support often play a key role in NN migration decisions, as a more active community can offer better resources and timely assistance with issue resolution. Despite the benefits of migration, there is a lack of approaches specifically designed for neural network code. In the literature, some techniques ( Apple 2017b ; Liu et al. 2020 ; Lutsenko 2023 ) have been proposed to convert trained ready-to-use NNs across frameworks. However, code migration remains largely overlooked, which hinders NN development and the flexibility to adopt new features while reusing existing code. In the absence of adapted techniques, migrating to new DL frameworks generally involves manually rewriting NN code from scratch, a process that typically requires a considerable amount of time, effort, and resources. In this paper, we contribute an approach to support NN code migration across DL frameworks. Our method builds on a recent work that proposed a Domain Specific Language (DSL) for neural networks based on Model-Driven Engineering (MDE) ( Daoudi et al. 2025 ) . Specifically, we use the NN metamodel as a pivot to migrate neural network code across frameworks. We also develop code generators to automatically produce NN code in the target framework. Moreover, we report on the challenges encountered during the design of the migration approach and how these challenges were addressed. While our migration approach is generic, we focus in this work on the two popular DL frameworks: PyTorch 4 4 4 https://pytorch.org/ and TensorFlow. Experimental evaluation confirms the success of our approach in migrating NN implementations and shows that the migrated NNs remain functionally equivalent to the originals. We also discuss how the migrated networks can be integrated with the other components of smart systems (e.g., UI, database, …), which are often modelled using MDE. The rest of the paper is structured as follows: In Section 2 , we discuss the background concepts relevant to our research. In Section 3 , we present our migration approach. We describe the challenges encountered during the migration and how they were addressed in Section 4 . We discuss how our approach can be integrated into complete system models and evaluate our approach in Section 5 and Section 6 , respectively. Finally, we present the related work in Section 7 and conclude this paper in Section 8 . 2. Background In this section, we briefly review key concepts necessary to understand our approach, namely neural networks and the BESSER NN metamodel, which are presented in Section 2.1 and Section 2.2 , respectively. 2.1. Neural Networks A neural network consists of a sequence of layers that are connected together to analyse and process input data. They can model complex relationships, which makes them suitable for tasks, including classification, clustering, regression, and new data generation ( Eck 2018 ; Mohammadi Foumani et al. 2024 ; Hruschka and Natter 1999 ; Graves 2013 ) . Layers are considered the basic building block of neural networks. Various types of layers exist, each tailored to extract specific features from the input data to achieve the