Fooling MOSS Detection with Pretrained Language Models
Open accessThe DOI matches its Crossref record; 35 of the 36 references it cites were found in a registry or an index, and 1 are not checked yet.
Abstract
As artificial intelligence (AI) technologies become increasingly powerful and prominent in society, their misuse is a growing concern. In educational settings, AI technologies could be used by students to cheat on assignments and exams. In this paper we explore whether transformers can be used to solve introductory level programming assignments while bypassing commonly used AI tools to detect similarities between pieces of software. We find that a student using GPT-J [60] can complete introductory level programming assignments without triggering suspicion from MOSS [2], a widely used software similarity and plagiarism detection tool. This holds despite the fact that GPT-J was not trained on the problems in question and is not provided with any examples to work from. We further find that the code written by GPT-J is diverse in structure, lacking any particular tells that future plagiarism detection techniques may use to try to identify algorithmically generated code. We conclude with a discussion of the ethical and educational implications of large language models and directions for future research.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Moreover, AI-generated code is diverse in structure and resilient to standard plagiarism detection tools.”
From “It’s Weird That it Knows What I Want”: Usability and Interactions with Copilot for Novice Programmers (2024) · cites this paper as [13]
In the citing paper
“Biderman and Raff show that introductory level programming assignments can be completed by AI code generators without triggering suspicion from MOSS, a state of the art code plagiarism detection tool [13].”
From “It’s Weird That it Knows What I Want”: Usability and Interactions with Copilot for Novice Programmers (2024) · cites this paper as [13]
In the citing paper
“These generators enable effortless obfuscation attacks, exploiting vulnerabilities in existing detectors by inserting statements to disrupt the matching of related programs.”
From Detecting Automatic Software Plagiarism via Token Sequence Normalization (2024) · cites this paper as [6]
In the citing paper
“With the free and accessible GenAI tools, students now have an easy way to produce solutions that cannot be detected using common approaches [41].”
From Navigating the Ethical and Societal Impacts of Generative AI in Higher Computing Education (2025) · cites this paper as [41]
In the citing paper
“Biderman and Raff [2] explored the performance of Java code generated by GPT-J on MOSS (measure of software similarity tool) and discovered that plagiarism was not detected, although they do not have evidence that this would be the case for tasks in more advanced programming courses.”
From Incorporating Generative AI into Software Development Education (2024) · cites this paper as [2]
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Prefix-Tuning: Optimizing Continuous Prompts for Generation
Li, X. L., & Liang, P. (2021) · Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · doi:10.18653/v1/2021.acl-long.353 · Cited by 2,473 · cited 1×
“There is a substantial literature on “prompt programming,” or crafting inputs to language models in ways that help the model perform better at downstream tasks [12, 42, 51] (for a survey, see [43]).”
BackgroundText Summarization with Pretrained Encoders
Liu, Y., & Lapata, M. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1387 · Cited by 1,553 · cited 1×
“While we were unable to find papers that explicitly seek to use language models for plagiarism, there is a wealth of research both on paraphrasing [41, 44, 47] and on adversarial examples against textual models [16, 28, 36], both of which can easily be applied to plagiarism even if the papers do not say so explicitly.”
BackgroundPrompt Programming for Large Language Models: Beyond the Few-Shot Paradigm
Reynolds, L., & McDonell, K. (2021) · Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems · doi:10.1145/3411763.3451760 · Cited by 952 · cited 1×
“There is a substantial literature on “prompt programming,” or crafting inputs to language models in ways that help the model perform better at downstream tasks [12, 42, 51] (for a survey, see [43]).”
BackgroundVaithilingam, P., Zhang, T., & Glassman, E. L. (2022) · CHI Conference on Human Factors in Computing Systems Extended Abstracts · doi:10.1145/3491101.3519665 · Cited by 660
Multitask Prompted Training Enables Zero-Shot Task Generalization
Sanh, V., Webson, A., Raffel, C., Bach, S. H., Sutawika, L., Alyafeai, Z., Chaffin, A., Stiegler, A., Scao, T. L., Raja, A., et al. (2021) · arXiv · doi:10.48550/arxiv.2110.08207 · Cited by 612 · cited 1×
“Although there exist more powerful transformers that are publicly available, they are either incapable of generating code [50, 52] or lack free public APIs and require substantial expertise to deploy [6, 66].”
BackgroundSelf-citationThe Pile: An 800GB Dataset of Diverse Text for Language Modeling
Gao, L., Biderman, S., Black, S., Golding, L., Hoppe, T., Foster, C., Phang, J., He, H., Thite, A., Nabeshima, N., et al. (2021) · arXiv · doi:10.48550/arxiv.2101.00027 · Cited by 492 · cited 2×
“While GPT-J was trained on arXiv preprints [26], it appears that Karnalim et al.”
MethodSelf-citationGPT-NeoX-20B: An Open-Source Autoregressive Language Model
Black, S., Biderman, S., Hallahan, E., Anthony, Q., Gao, L., Golding, L., He, H., Leahy, C., McDonell, K., Phang, J., et al. (2022) · Proceedings of BigScience Episode #5 -- Workshop on Challenges & Perspectives in Creating Large Language Models · doi:10.18653/v1/2022.bigscience-1.9 · Cited by 404
Self-citationKnowPrompt: Knowledge-aware Prompt-tuning with Synergistic Optimization for Relation Extraction
Chen, X., Zhang, N., Xie, X., Deng, S., Yao, Y., Tan, C., Huang, F., Si, L., & Chen, H. (2022) · Proceedings of the ACM Web Conference 2022 · doi:10.1145/3485447.3511998 · Cited by 389
Designing Quality E-Learning Environments for Emergency Remote Teaching in Coronavirus Crisis
Affouneh, S. J., Salha, S. H., & Khlaif, Z. N. (2020) · DOAJ (DOAJ: Directory of Open Access Journals) · doi:10.30476/ijvlms.2020.86120.1033 · Cited by 321
The Values Encoded in Machine Learning Research
Birhane, A., Kalluri, P., Card, D., Agnew, W., Dotan, R., & Bao, M. (2021) · arXiv · doi:10.48550/arxiv.2106.15590 · Cited by 317 · cited 1×
“In future workwe intended to examine how the intended application is explicitly and implicitly embedded in the functionality of document similarity detectors [4, 5, 32], and incorporate analysis of what it means for such a device to be judged as “working” in its planned application context [38].”
Background
Research works printed but not linked: 32
- Moss (measure of software similarity) plagiarism detection system. Alex Aiken, 2000. 2000
- Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc V Le, Charles Sutton, arXiv:2108.07732Program synthesis with large language models. 2021. 2021arXiv preprint
- Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda
- The secret sharer: Evaluating and testing unintended memorization in neural networks. Nicholas Carlini, Chang Liu, Úlfar Erlingsson, Jernej Kos, Dawn Song, 28th {USENIX} Security Symposium ({USENIX} Security 19. 2019
- Extracting training data from large language models. Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, Alina Oprea, and Colin Raffel. 202130th {USENIX} Security Symposium. {USENIX} Security 21
- Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde, Jared Kaplan, Harrison Edwards, Yura Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, David W Cummings, Matthias Plappert, Fotios Chantzis, arXiv:2107.03374Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. 2021. Evaluating large language models trained on code. Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew M Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Elizabeth Barnes, Ariel Herbert-Voss, William H. Guss, Alex Nichol, Igor Babuschkin, S. Arun Balaji, Shantanu Jain, Andrew Carr; Bob McGrewJan Leike. 2021arXiv preprint
- Adaprompt: Adaptive prompt-based finetuning for relation extraction. Xiang Chen, Xin Xie, Ningyu Zhang, Jiahuan Yan, Shumin Deng, Chuanqi Tan, Fei Huang, Luo Si, Huajun Chen, arXiv:2104.076502021. 2021arXiv preprint
- Using natural language processing for automatic detection of plagiarism. Miranda Chong, Lucia Specia, Ruslan Mitkov, Proceedings of the 4th International Plagiarism Conference (IPC-2010). the 4th International Plagiarism Conference (IPC-2010)2010
- Katherine Crowson, Stella Biderman, Daniel Kornis, Dashiell Stander, Eric Hallahan, Louis Castricato, Edward Raff, arXiv:2204.08583VQGAN-CLIP: Open Domain Image Generation and Editing with Natural Language Guidance. 2022. 2022arXiv preprint
- Iddo Drori, Sunny Tran, Roman Wang, Newman Cheng, Kevin Liu, Leonard Tang, Elizabeth Ke, Nikhil Singh, Taylor L Patti, Jayson Lynch, arXiv:2112.15594A Neural Network Solves and Generates Mathematics Problems by Program Synthesis: Calculus, Differential Equations, Linear Algebra, and More. 2021. 2021arXiv preprint
- Solving Linear Algebra by Program Synthesis. Iddo Drori, Nakul Verma, arXiv:2111.081712021. 2021arXiv preprint
- Daniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-Tau Yih, Luke Zettlemoyer, Mike Lewis, arXiv:2204.05999InCoder: A Generative Model for Code Infilling and Synthesis. 2022. 2022arXiv preprint
- Meet Your Favorite Character: Open-domain Chatbot Mimicking Fictional Characters with only a Few Utterances. Seungju Han, Beomsu Kim, Jin Yong Yoo, Seokjun Seo, Sangbum Kim, Enkhbayar Erdenee, Buru Chang, arXiv:2204.108252022. 2022arXiv preprint
- Measuring Coding Challenge Competence With APPS. Dan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, Jacob Steinhardt, Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track. 2021
- Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, Yejin Choi, arXiv:1904.09751The curious case of neural text degeneration. 2019. 2019arXiv preprint
- Are Algorithms Value-Free? Feminist Theoretical Virtues in Machine Learning. Gabbrielle Johnson, Journal of Moral Philosophy, special issue on. 2022. 2022Justice, Power, and the Ethics of Algorithmic Decision-Making
- Thieves on Sesame Street! Model Extraction of BERT-based APIs. Kalpesh Krishna, Gaurav Singh Tomar, Ankur P Parikh, Nicolas Papernot, Mohit Iyyer, International Conference on Learning Representations. 2020
- The Hard Problem of Aligning AI to Human Values. Connor Leahy, Stella Biderman, The State of AI Ethics Report. 20214
- CoAuthor: Designing a Human-AI Collaborative Writing Dataset for Exploring Language Model Capabilities. Mina Lee, Percy Liang, Qian Yang, arXiv:2201.067962022. 2022arXiv preprint
- Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, Graham Neubig, arXiv:2107.135862021. 2021arXiv preprint
- Software plagiarism detection techniques: A comparative study. Divya Luke, Divya, L Sony, S Johnson, Elizabeth B Sreeprabha, Varghese, 2018 5th International Symposium on Emerging Trends and Technologies in Libraries and Information Services (ETTLIS). Citeseer2014
- Neural Program Generation Modulo Static Analysis. Rohan Mukherjee, Yeming Wen, Dipak Chaudhari, Thomas Reps, Swarat Chaudhuri, Chris Jermaine, Thirty-Fifth Conference on Neural Information Processing Systems. 2021
- Prompt Engineering for Text-Based Generative Art. Jonas Oppenlaender, arXiv:2204.139882022. 2022arXiv preprint
- Exploring the limits of transfer learning with a unified text-to-text transformer. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, arXiv:1910.106832019. 2019arXiv preprint
- Teaching C++ programming using automated unit testing and test-driven development-Design and efficacy study. Waseem Sheikh, Computer Applications in Engineering Education. 2022. 2022
- Learning Methods for Solving Astronomy Course Problems. Avi Shporer, Sunny Tran, Nikhil Singh, Brandon Kates, Jayson Lynch, Iddo Drori, 2021. 2021preprint
- Solving machine learning problems. Sunny Tran, Pranav Krishna, Ishan Pakuwal, Prabhakar Kafle, Nikhil Singh, Jayson Lynch, Iddo Drori, Asian Conference on Machine Learning. PMLR2021
- Dingming Wu, and Mohammad Shidujaman. 2021. AI Creativity and the Human-AI Co-creation Model. Zhuohao Wu, Danwen Ji, Kaiwen Yu, Xianxu Zeng, International Conference on Human-Computer Interaction. Springer
- Uri Frank F Xu, Graham Alon, Vincent J Neubig, Hellendoorn, arXiv:2202.13169A systematic evaluation of large language models of code. 2022. 2022arXiv preprint
- The Policy of Credit Payment Relaxation in Overcoming the Impact of Covid-19 Spread to the Economic Society in Indonesia. Muhammad Yasid, T P Gomgom, Muhammad Siregar, Lubis Ansori, Journal of Advanced Research in Dynamical and Control Systems. 2020. 2020
- Wordcraft: Story Writing With Large Language Models. Ann Yuan, Andy Coenen, Emily Reif, Daphne Ippolito, 27th International Conference on Intelligent User Interfaces. 2022
- Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi Victoria Lin, arXiv:2205.01068OPT: Open Pre-trained Transformer Language Models. 2022. 2022arXiv preprint
Cited by
Perkins, M. (2023) · Journal of University Teaching and Learning Practice · doi:10.53761/1.20.02.07 · Cited by 839
“…AI based technologies, there is ongoing research exploring how the intricacies of co-creation may be further be codified and explored in the fields of creative writing (M. Lee et al., 2022; Y. Lee et al., 2022), software development (Biderman & Raff, 2022) and artistic outputs (Oppenlaender, 2022).”
Human heuristics for AI-generated language are flawed
Jakesch, M., Hancock, J. T., & Naaman, M. (2023) · Proceedings of the National Academy of Sciences · doi:10.1073/pnas.2208839120 · Cited by 342
Computing Education in the Era of Generative AI
Denny, P., Prather, J., Becker, B. A., Finnie-Ansley, J., Hellas, A., Leinonen, J., Luxton-Reilly, A., Reeves, B. N., Santos, E. A., & Sarsa, S. (2024) · Communications of the ACM · doi:10.1145/3624720 · Cited by 316
“However, recent work has shown that common plagiarism detection tools are often ineffective against AI-generated solutions [6].”
BackgroundPrather, J., Reeves, B. N., Denny, P., Becker, B. A., Leinonen, J., Luxton-Reilly, A., Powell, G., Finnie-Ansley, J., & Santos, E. A. (2024) · ACM Transactions on Computer-Human Interaction · doi:10.1145/3617367 · Cited by 256
“Biderman and Raff show that introductory level programming assignments can be completed by AI code generators without triggering suspicion from MOSS, a state of the art code plagiarism detection tool [13].”
BackgroundPerkins, M., Roe, J., Postma, D., McGaughran, J., & Hickerson, D. (2024) · Journal of Academic Ethics · doi:10.1007/s10805-023-09492-6 · Cited by 234
“Bidermann and Raff ( 2022 ) demonstrated that more advanced models like GPT-J can evade detection tools like MOSS (Measure of Software Similarity), suggesting that newer LLMs might be even harder to detect.”
Metadata
- Authors
- Biderman, S., & Raff, E.
- Affiliations
- Booz Allen Hamilton (United States) (US)
- Venue
- Proceedings of the 31st ACM International Conference on Information & Knowledge Management
- Publisher
- ACM
- Published
- 2022-10-17
- Pages
- 2933-2943
- ISSN
- 2155-0751 (ISSN-L)
- OpenAlex
- W4306317681
- Cited by
- 37
- References
- 26
- Citations by year
- 2026: 2 · 2025: 3 · 2024: 17 · 2023: 14 · 2022: 1
- FWCI
- 8.70
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- Locations
- ACM International Conference on Information and Knowledge Management (CIKM) (publishedVersion, cc-by-sa)
- arXiv (Cornell University) (submittedVersion, cc-by-sa)
- arXiv (Cornell University)
- Topics
- Social Sciences › Education › Academic integrity and plagiarism
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Social Sciences › Education › Artificial Intelligence in Education
- Keywords
- bryophytes, GPT-J, large language models, code plagiarism detection
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.