Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Tree
Not on the map. Why?
Abstract (arXiv)
Code clones are semantically similar code fragments pairs that are syntactically similar or different. Detection of code clones can help to reduce the cost of software maintenance and prevent bugs. Numerous approaches of detecting code clones have been proposed previously, but most of them focus on detecting syntactic clones and do not work well on semantic clones with different syntactic features. To detect semantic clones, researchers have tried to adopt deep learning for code clone detection to automatically learn latent semantic features from data. Especially, to leverage grammar information, several approaches used abstract syntax trees (AST) as input and achieved significant progress on code clone benchmarks in various programming languages. However, these AST-based approaches still can not fully leverage the structural information of code fragments, especially semantic information such as control flow and data flow. To leverage control and data flow information, in this paper, we build a graph representation of programs called flow-augmented abstract syntax tree (FA-AST). We construct FA-AST by augmenting original ASTs with explicit control and data flow edges. Then we apply two different types of graph neural networks (GNN) on FA-AST to measure the similarity of code pairs. As far as we have concerned, we are the first to apply graph neural networks on the domain of code clone detection. We apply our FA-AST and graph neural networks on two Java datasets: Google Code Jam and BigCloneBench. Our approach outperforms the state-of-the-art approaches on both Google Code Jam and BigCloneBench tasks.
Key facts. Cited by 68 papers in the map (data through 7 Oct 2026). First posted on arXiv 20 Feb 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 13; 2022: 17; 2023: 13; 2024: 10; 2025: 13; 2026: 2.
68 papers.
Sort:
By area:
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
- 2021How could Neural Networks understand Programs?cited by 26
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 17
38 more
- 2021GNN4IP: Graph Neural Network for Hardware Intellectual Property Piracy Detectioncited by 13
- 2023Graph Convolutions Enrich the Self-Attention in Transformers!cited by 11
- 2024Top Pass: Improve Code Generation by Pass@k-Maximized Code Rankingcited by 9
- 2022Poison Attack and Defense on Deep Source Code Processing Modelscited by 8
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
- 2022Learning Program Representations with a Tree-Structured Transformercited by 6
- 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structurecited by 6
- 2022Parameter-Efficient Finetuning of Transformers for Source Codecited by 6
- 2022DexBERT: Effective, Task-Agnostic and Fine-grained Representation Learning of Android Bytecodecited by 6
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Taskscited by 6
- 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2022TEP-GNN: Accurate Execution Time Prediction of Functional Tests using Graph Neural Networkscited by 5
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 2022Generalizability of Code Clone Detection on CodeBERTcited by 4
- 2023CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Searchcited by 4
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformationcited by 4
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarkingcited by 4
- 2021deGraphCS: Embedding Variable-based Flow Graph for Neural Code Searchcited by 3
- 2021GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarizationcited by 3
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detectioncited by 3
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Searchcited by 3
- 2023ZC3: Zero-Shot Cross-Language Code Clone Detectioncited by 3
- 2023PACE: A Program Analysis Framework for Continuous Performance Predictioncited by 3
- 2024The Struggles of LLMs in Cross-lingual Code Clone Detectioncited by 3
- 2025SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executorscited by 3
- 2025CodeSSM: Towards State Space Models for Code Understandingcited by 3
- 2022On the Effectiveness of Hybrid Pooling in Mixup-Based Graph Learning for Language Processingcited by 2
- 2022CLAWSAT: Towards Both Robust and Accurate Code Modelscited by 2
- 2023AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detectioncited by 2
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understandingcited by 2
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Taskscited by 2
- 2022AstBERT: Enabling Language Model for Financial Code Understanding with Abstract Syntax Treescited by 1
- 2022K-ASTRO: Structure-Aware Adaptation of LLMs for Code Vulnerability Detectioncited by 1
- 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Modelscited by 1
50 most cited of 68 All 68 (JSON)
- 2026A Unified Model for Cross-Domain Clone Detection via Model Merging4 Aug 2026
- 2026ClaHF: A Human Feedback-inspired Reinforcement Learning Framework for Improving Classification Tasks17 May 2026
- 2025BugSweeper: Function-Level Detection of Smart Contract Vulnerabilities Using Graph Neural Networks10 Dec 2025
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025MAGNET: A Multi-Graph Attentional Network for Code Clone Detection28 Oct 2025
- 2025HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection20 Oct 2025
- 2025Selecting and Combining Large Language Models for Scalable Code Clone Detection17 Oct 2025
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking27 Aug 2025
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025AST-Enhanced or AST-Overloaded? The Surprising Impact of Hybrid Graph Representations on Code Clone Detection17 Jun 2025
- 2025CodeSSM: Towards State Space Models for Code Understanding2 May 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
38 more
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2025Poisoned Source Code Detection in Code Models19 Feb 2025
- 2025SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executors16 Feb 2025
- 2024In-Context Code-Text Learning for Bimodal Software Engineering8 Oct 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)19 Sep 2024
- 2024Top Pass: Improve Code Generation by Pass@k-Maximized Code Ranking11 Aug 2024
- 2024The Struggles of LLMs in Cross-lingual Code Clone Detection8 Aug 2024
- 2024FuncEvalGMN: Evaluating Functional Correctness of SQL via Graph Matching Network9 Jul 2024
- 2024Advanced Detection of Source Code Clones via an Ensemble of Unsupervised Similarity Measures3 May 2024
- 2024Beyond Self-learned Attention: Mitigating Attention Bias in Transformer-based Models Using Attention Guidance26 Feb 2024
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding24 Feb 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Source Code is a Graph, Not a Sequence: A Cross-Lingual Perspective on Code Clone Detection27 Dec 2023
- 2023Graph Convolutions Enrich the Self-Attention in Transformers!7 Dec 2023
- 2023PACE: A Program Analysis Framework for Continuous Performance Prediction1 Dec 2023
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Code13 Nov 2023
- 2023AdaCCD: Adaptive Semantic Contrasts Discovery Based Cross Lingual Adaptation for Code Clone Detection13 Nov 2023
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
- 2023ZC3: Zero-Shot Cross-Language Code Clone Detection26 Aug 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023CCT-Code: Cross-Consistency Training for Multilingual Clone Detection and Code Search19 May 2023
- 2023A Black-Box Attack on Code Models via Representation Nearest Neighbor Search10 May 2023
- 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Models14 Mar 2023
- 2022DexBERT: Effective, Task-Agnostic and Fine-grained Representation Learning of Android Bytecode12 Dec 2022
- 2022Parameter-Efficient Finetuning of Transformers for Source Code12 Dec 2022
- 2022CLAWSAT: Towards Both Robust and Accurate Code Models21 Nov 2022
- 2022Poison Attack and Defense on Deep Source Code Processing Models31 Oct 2022
- 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structure7 Oct 2022
- 2022On the Effectiveness of Hybrid Pooling in Mixup-Based Graph Learning for Language Processing6 Oct 2022
- 2022Generalizability of Code Clone Detection on CodeBERT26 Aug 2022
- 2022TEP-GNN: Accurate Execution Time Prediction of Functional Tests using Graph Neural Networks25 Aug 2022
- 2022Learning Program Representations with a Tree-Structured Transformer18 Aug 2022
- 2022K-ASTRO: Structure-Aware Adaptation of LLMs for Code Vulnerability Detection17 Aug 2022
- 2022Evaluation of Contrastive Learning with Various Code Representations for Code Clone Detection17 Jun 2022
- 2022Understanding Long Programming Languages with Structure-Aware Sparse Attention27 May 2022
50 newest of 68 All 68 (JSON)
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
- 2021How could Neural Networks understand Programs?cited by 26
- 2021On Multi-Modal Learning of Editing Source Codecited by 25
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 17
12 most cited of 64 All 64 (JSON)
- 2026A Unified Model for Cross-Domain Clone Detection via Model Merging4 Aug 2026
- 2025BugSweeper: Function-Level Detection of Smart Contract Vulnerabilities Using Graph Neural Networks10 Dec 2025
- 2025A Metamorphic Testing Perspective on Knowledge Distillation for Language Models of Code: Does the Student Deeply Mimic the Teacher?7 Nov 2025
- 2025MAGNET: A Multi-Graph Attentional Network for Code Clone Detection28 Oct 2025
- 2025HGAdapter: Hypergraph-based Adapters in Language Models for Code Summarization and Clone Detection20 Oct 2025
- 2025Selecting and Combining Large Language Models for Scalable Code Clone Detection17 Oct 2025
- 2025An Empirical Study of Knowledge Distillation for Code Understanding Tasks21 Aug 2025
- 2025AST-Enhanced or AST-Overloaded? The Surprising Impact of Hybrid Graph Representations on Code Clone Detection17 Jun 2025
- 2025CodeSSM: Towards State Space Models for Code Understanding2 May 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2025Poisoned Source Code Detection in Code Models19 Feb 2025
12 newest of 64 All 64 (JSON)