Source Code Plagiarism Detection with Pre-Trained Model Embeddings and Automated Machine Learning
20106Authors
nan
Abstract
AbstractSource code plagiarism is a critical ethical issue in computer science education where students use someone else’s work as their own. It can be treated as a binary classification problem where the output can be either: yes (plagiarism found) or no (plagiarism not found). In this research, we have taken the open-source dataset ‘SOCO’, which contains two programming languages (PLs), namely Java and C/C++ (although our method could be applied to any PL). Source codes should be converted to vector representations that capture both the syntax and semantics of the text, known as contextual embeddings. These embeddings would be generated using source code pre-trained models (CodePTMs). The cosine similarity scores of three different CodePTMs were selected as features. The classifier selection and parameter tuning were conducted with the assistance of Automated Machine Learning (AutoML). The selected classifiers were tested, initially on Java, and the proposed approach produced average to high results compared to other published research, and surpassed the baseline (the JPlag plagiarism detection tool). For C/C++, the approach outperformed other research work and produced the highest ranking score.
Keywords
Full Content
Proceedings of Recent Advances in Natural Language Processing, pages 301–309 Varna, Sep 4–6, 2023 https://doi.org/10.26615/978-954-452-092-2_034 301 Source Code Plagiarism Detection with Pre-Trained Model Embeddings and Automated Machine Learning Fahad Ebrahim University of Warwick, UK Fahad.Ebrahim@warwick.ac.uk Mike Joy University of Warwick, UK M.S.Joy@warwick.ac.uk Abstract Source code plagiarism is a critical ethical issue in computer science education where students use someone else’s work as their own. It can be treated as a binary classification problem where the output can be either ‘yes’ (plagiarism found) or ‘no’ (plagiarism not found). In this research, we have taken the open-source dataset ‘SOCO’, which contains two program- ming languages (PLs), namely Java and C/C++ (although our method could be applied to any PL). Source codes should be converted to vec- tor representations that capture both the syntax and semantics of the text, known as contextual embeddings. These embeddings would be gen- erated using source code pre-trained models (CodePTMs). The cosine similarity scores of three different CodePTMs were selected as fea- tures. The classifier selection and parameter tuning were conducted with the assistance of Automated Machine Learning (AutoML). The selected classifiers were tested, initially on Java, and the proposed approach produced average to high results compared to other published re- search, and surpassed the baseline (the JPlag plagiarism detection tool). For C/C++, the ap- proach outperformed other research work and produced the highest ranking score. 1 Introduction Plagiarism is the ethical and educational issue of taking ideas from other sources and representing them as your own without acknowledgement. Pla- giarism can be divided into text and source code. Academic source code plagiarism can be defined as “Source-code plagiarism in programming assign- ments can occur when a student reuses source code authored by someone else and, intentionally or un- intentionally, fails to acknowledge it adequately, thus submitting it as his/her own work. This in- volves obtaining the source-code, either with or without the permission of the original author and reusing the source code produced as part of another assessment (in which academic credit was gained) without adequate acknowledgement” (Cosma and Joy, 2008). The words reuse, obtain, and acknowl- edge may also be defined on the basis of the aca- demic requirements. The detection of plagiarism is a lengthy and demanding process, so new technologies such as Artificial Intelligence (AI) might be used effec- tively. Plagiarism can be treated as a classification problem as the output can be considered a class of discrete values: ‘yes’ (plagiarised), ‘no’ (non- plagiarised), or potentially ‘partial’. Source code plagiarism can be also considered to be an applica- tion of a source code similarity measurement task (Zakeri-Nasrabadi et al., 2023). There are several ways to represent source codes (Hrk´ut et al., 2023) such as graphs, trees and to- kens. The source codes must be converted into vectors known as embeddings before being fed into a classifier. Contextualized embeddings not only consider syntax but also the semantics of source codes. These embeddings can be created using pre-trained models. The emergence of pre-trained models has revolutionized …
Content truncated to 500 words
Labeled Text
AbstractSource code plagiarism is a critical ethical issue in computer science education where students use someone else’s work as their own. It can be treated as a binary classification problem where the output can be either: yes (plagiarism found) or no (plagiarism not found). In this research, we have taken the open-source dataset ‘SOCO’, which contains two programming languages (PLs), namely Java and C/C++ (although our method could be applied to any PL). Source codes should be converted to vector representations that capture both the syntax and semantics of the text, known as contextual embeddings. These embeddings would be generated using source code pre-trained models (CodePTMs). The cosine similarity scores of three different CodePTMs were selected as features. The classifier selection and parameter tuning were conducted with the assistance of Automated Machine Learning (AutoML). The selected classifiers were tested, initially on Java, and the proposed approach produced average to high results compared to other published research, and surpassed the baseline (the JPlag plagiarism detection tool). For C/C++, the approach outperformed other research work and produced the highest ranking score.
Publication Details
- Paper ID:
- 20106
- Year:
- 2023
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan