arXiv · 2611.38868
GraphCodeBERT for Cross-Language Code Clone Retrieval through Data-Flow Alignment and Hard-Negative Mining
Abstract
This paper proposes a GraphCodeBERT adaptation that combines soft data flow alignment with reliability filtered hard negative mining. The alignment component compares variable dependency representations across paired implementations without requiring identical identifiers or graph topology. The mining component excludes known equivalent solutions, retains a mixture of random and challenging candidates, and gradually increases negative difficulty. A reproducible evaluation design separates programming tasks across training, validation, and testing and covers six directed retrieval settings involving Java, Python, and Go. Across the six settings, the joint configuration has mean reciprocal rank 0.814, compared with 0.731 for a matched GraphCodeBERT baseline. Removing alignment reduces this score to 0.786, whereas replacing filtered mining with random negatives reduces it to 0.772. The evaluation framework also addresses retrieval depth, perturbation tolerance, mining contamination, and indexing cost under a fixed candidate protocol. The component comparison separates structural supervision from negative selection and identifies their respective contributions to the ranking profile. The resulting design provides an auditable route for investigating whether language independent dependencies and carefully selected distractors improve cross language code retrieval under realistic annotation and computational constraints. The absolute mean reciprocal rank increase is 0.083, corresponding to approximately 11.4% relative to the baseline; this aggregate comparison does not establish statistical significance.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Qiong Liu. 2026-11-28. GraphCodeBERT for Cross-Language Code Clone Retrieval through Data-Flow Alignment and Hard-Negative Mining. https://arxiv.science/abs/2611.38868
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.