Table of Contents
Fetching ...

Fooling MOSS Detection with Pretrained Language Models

Stella Biderman, Edward Raff

TL;DR

This paper demonstrates that a publicly available transformer (GPT-J) can complete introductory Java programming assignments with high correctness and produce solutions that evade MOSS plagiarism detection. By using a realistic threat model and a diverse set of prompts, the authors show that minimal human intervention is often sufficient to obtain viable, novel-looking code. They also identify consistent error modes and invented constraints, illustrating gaps in current detection schemes and suggesting implications for education, ethics, and HCI research. The work highlights the need for curriculum design and enhanced detection/detection-aware evaluation to counter evolving AI-assisted cheating while preserving learning outcomes.

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 [Wang and Komatsuzaki, 2021] can complete introductory level programming assignments without triggering suspicion from MOSS [Aiken, 2000], 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.

Fooling MOSS Detection with Pretrained Language Models

TL;DR

This paper demonstrates that a publicly available transformer (GPT-J) can complete introductory Java programming assignments with high correctness and produce solutions that evade MOSS plagiarism detection. By using a realistic threat model and a diverse set of prompts, the authors show that minimal human intervention is often sufficient to obtain viable, novel-looking code. They also identify consistent error modes and invented constraints, illustrating gaps in current detection schemes and suggesting implications for education, ethics, and HCI research. The work highlights the need for curriculum design and enhanced detection/detection-aware evaluation to counter evolving AI-assisted cheating while preserving learning outcomes.

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 [Wang and Komatsuzaki, 2021] can complete introductory level programming assignments without triggering suspicion from MOSS [Aiken, 2000], 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.
Paper Structure (24 sections, 3 figures, 3 tables)

This paper contains 24 sections, 3 figures, 3 tables.

Figures (3)

  • Figure 1: A breakdown of MOSS scores for completions of exercises from karnalim2019source by how they were generated. "Original" denotes the original solutions, "LN" denotes Level N plagiarism, "non" denotes non-plagiarisms, and "AI" denotes solutions written by GPT-J.
  • Figure 2: Natural language prompts are pretty hit-or-miss when it comes to getting GPT-J to produce an actual program, but it is responsive to naming specific programming languages. Table shows the results of 5 generations for each of the 7 programming tasks
  • Figure 3: Isomap embedding of the original solutions (black), plagiarized variants (red and yellow, where yellow are sophisticated ones that evade MOSS), along with GPT-J produced solutions (blue) and independent implementations (green). The blue data points being interspersed with yellow, green, and far-away spaces shows that GPT-J is not easily detected by MOSS.