Clones in Deep Learning Code: What, Where, and Why?
Not on the map. Why?
Abstract (arXiv)
Deep Learning applications are becoming increasingly popular. Developers of deep learning systems strive to write more efficient code. Deep learning systems are constantly evolving, imposing tighter development timelines and increasing complexity, which may lead to bad design decisions. A copy-paste approach is widely used among deep learning developers because they rely on common frameworks and duplicate similar tasks. Developers often fail to properly propagate changes to all clones fragments during a maintenance activity. To our knowledge, no study has examined code cloning practices in deep learning development. Given the negative impacts of clones on software quality reported in the studies on traditional systems, it is very important to understand the characteristics and potential impacts of code clones on deep learning systems. To this end, we use the NiCad tool to detect clones from 59 Python, 14 C# and 6 Java-based deep learning systems and an equal number of traditional software systems. We then analyze the frequency and distribution of code clones in deep learning and traditional systems. We do further analysis of the distribution of code clones using location-based taxonomy. We also study the correlation between bugs and code clones to assess the impacts of clones on the quality of the studied systems. Finally, we introduce a code clone taxonomy related to deep learning programs and identify the deep learning system development phases in which cloning has the highest risk of faults. Our results show that code cloning is a frequent practice in deep learning systems and that deep learning developers often clone code from files in distant repositories in the system. In addition, we found that code cloning occurs more frequently during DL model construction. And that hyperparameters setting is the phase during which cloning is the riskiest, since it often leads to faults.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 28 Jul 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 1; 2024: 1; 2025: 0; 2026: 2.
5 papers.
- 2022Quality issues in Machine Learning Software Systemscited by 7
- 2024Unraveling Code Clone Dynamics in Deep Learning Frameworkscited by 2
- 2023Quality Issues in Machine Learning Software Systemscited by 0
- 2026From AI Technical Debt to Agentic Technical Debt: A Systematic Mapping of Root Causes and Manifestations in Agentic AI Systemscited by 0
- 2026A Unified Model for Cross-Domain Clone Detection via Model Mergingcited by 0
- 2026A Unified Model for Cross-Domain Clone Detection via Model Merging4 Aug 2026
- 2026From AI Technical Debt to Agentic Technical Debt: A Systematic Mapping of Root Causes and Manifestations in Agentic AI Systems2 Aug 2026
- 2024Unraveling Code Clone Dynamics in Deep Learning Frameworks25 Apr 2024
- 2023Quality Issues in Machine Learning Software Systems26 Jun 2023
- 2022Quality issues in Machine Learning Software Systems18 Aug 2022