Metraipolis › archive › dc_0ff577179f1c
A Unified Model for Cross-Domain Clone Detection via Model Merging — arXiv:2608.04215
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2608.04215
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-31T11:13:37.999Z
- SHA-256 of the archived text
032dbc974bdd05df1ed6c1a0dbccad1471d0f3b1fd125f3e66ddbd92c5c0bcee- Stable URL of this page
https://metraipolis.com/documento/dc_0ff577179f1c
How to cite
A Unified Model for Cross-Domain Clone Detection via Model Merging — arXiv:2608.04215 — arXiv (en), https://arxiv.org/abs/2608.04215 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_0ff577179f1c (Metraipolis archive dc_0ff577179f1c, sha256 032dbc974bdd05df1ed6c1a0dbccad1471d0f3b1fd125f3e66ddbd92c5c0bcee)
BibTeX
@misc{dc0ff577179f1c,
title = {A Unified Model for Cross-Domain Clone Detection via Model Merging — arXiv:2608.04215},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2608.04215},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_0ff577179f1c; sha256 032dbc974bdd05df1ed6c1a0dbccad1471d0f3b1fd125f3e66ddbd92c5c0bcee},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.04215. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
The growing diversity of code clone types, from syntactic copies to cross-language semantic clones to AI-generated duplicates, has created a fragmentation crisis in clone detection. Current deep learning detectors are domain specialists that degrade significantly outside their training distribution, with F1 drops exceeding 70% across domains. Deploying multiple specialized models is impractical, yet training a single cross-domain detector requires simultaneous access to all training data. To address this, we investigate model merging, a family of post-hoc techniques that operate solely on trained checkpoints. We evaluate parameter merging with five task-vector methods, architecture merging via greedy layer stitching, and cross-tokenizer alignment across four code models, three benchmarks, and twelve configurations. Same-base TIES merging creates effective cross-domain detectors, validated across two model families and three random seeds, reaching 0.865 combined F1 on UniXcoder, 93% of multi-task performance without any training data at the merging step. WUDI achieves the highest in-distribution combined F1 at 0.899, but TIES generalizes better to unseen AI-generated clones, making it our recommended method. Cross-base merging yields only marginal and high-variance gains across all five methods, indicating that task vector compatibility through a shared pre-trained base is the binding factor for effective merging. Merged detectors also outperform zero-shot code LLMs on GPTCloneBench at lower inference cost and generalize up to 4x better than multi-task training to unseen AI-generated clones, suggesting a trade-off between in-domain performance and OOD robustness. This work provides one of the first systematic empirical studies of model merging for software engineering and a practical recipe for building cross-domain clone detectors. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-06 in cs.AI). Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI). Pagina del lavoro: https://arxiv.org/abs/2608.04215 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-31T11:02:13.489Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-06?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).