Code Similarity Detection Using Complexity-Based Birthmarks
摘要
This research investigates using complexity-based code embeddings to produce unique software birthmarks optimized for software similarity detection. We suggest a novel approach to address this problem by handling the source code as a collection of complexity-based birthmarks. Our model has identified code implementation similarity across 280,000 analyzed pairs with an F1-score of 82% when evaluated against a dataset of solutions gathered from Codeforces competitive programming contests, using only twenty-four unique features for birthmark generation. Using a perf-based profiler that recorded raw metrics like branch misses, total CPU cycles, or page faults captured on a Unix system, the programs under evaluation were dynamically evaluated under a range of incremental inputs. The similarity score was subsequently determined using these performance metrics to build regression models designed to approximate the program’s complexity class for each performance metric.