vix.ing · top · new · best · stats · spec

Improving Source Code Similarity Detection Through GraphCodeBERT and Integration of Additional Features

2024/08/12 by Jorge Martínez-Gil, Martinez-Gil, Jorge · 1 citation
Computer Science · #Advanced Malware Detection Techniques #FOS: Computer and information sciences #Software Engineering (cs.SE) #Software Engineering Research #Web Data Mining and Analysis

paper · pdf · doi:10.48550/arxiv.2408.08903

openalex publication_date 2024/08/12 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

This paper investigates source code similarity detection using a transformer model augmented with an execution-derived signal. We extend GraphCodeBERT with an explicit, low-dimensional behavioral feature that captures observable agreement between code fragments, and fuse this signal with the pooled transformer representation through a trainable output head. We compute behavioral agreement via output comparisons under a fixed test suite and use this observed output agreement as an operational approximation of semantic similarity between code pairs. The resulting feature acts as an explicit behavioral signature that complements token- and graph-based representations. Experiments on established clone detection benchmarks show consistent improvements in precision, recall, and F1 over the unmodified GraphCodeBERT baseline, with the largest gains on semantically equivalent but syntactically dissimilar pairs. The source code that illustrates our approach can be downloaded from https://www.github.com/jorge-martinez-gil/graphcodebert-feature-integration.

Cited by

Related