CSSG: Measuring Code Similarity with Semantic Graphs

Yiyang Lu, Jingwen Xu, Changze Lv, Zisu Huang, Zhengkang Guo +4 more
1/7/2026
cs.PLcs.AI

No confident code implementation found for this paper.

Abstract

Existing code similarity metrics, such as BLEU, CodeBLEU, and TSED, largely rely on surface-level string overlap or abstract syntax tree structures, and often fail to capture deeper semantic relationships between programs.We propose CSSG (Code Similarity using Semantic Graphs), a novel metric that leverages program dependence graphs to explicitly model control dependencies and variable interactions, providing a semantics-aware representation of code.Experiments on the CodeContests+ dataset show that CSSG consistently outperforms existing metrics in distinguishing more similar code from less similar code under both monolingual and cross-lingual settings, demonstrating that dependency-aware graph representations offer a more effective alternative to surface-level or syntax-based similarity measures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lu2026cssg,
  title  = {CSSG: Measuring Code Similarity with Semantic Graphs},
  author = {Yiyang Lu and Jingwen Xu and Changze Lv and Zisu Huang and Zhengkang Guo and Zhengyuan Wang and Muzhao Tian and Xuanjing Huang and Xiaoqing Zheng},
  year   = {2026},
  eprint = {2601.04085},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.04085v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.04085.svg)](https://codeofpaper.com/paper/2601.04085)

Discussion