Table of Contents
Fetching ...

Impeding LLM-assisted Cheating in Introductory Programming Assignments via Adversarial Perturbation

Saiful Islam Salim, Rubin Yuchan Yang, Alexander Cooper, Suryashree Ray, Saumya Debray, Sazzadur Rahaman

TL;DR

The baseline performance of 5 widely used LLMs on a collection of introductory programming problems is investigated, adversarial perturbations to degrade their performance are examined, and the results of a user study aimed at measuring the efficacy of such perturbations in hindering actual code generation for introductory programming assignments are described.

Abstract

While Large language model (LLM)-based programming assistants such as CoPilot and ChatGPT can help improve the productivity of professional software developers, they can also facilitate cheating in introductory computer programming courses. Assuming instructors have limited control over the industrial-strength models, this paper investigates the baseline performance of 5 widely used LLMs on a collection of introductory programming problems, examines adversarial perturbations to degrade their performance, and describes the results of a user study aimed at understanding the efficacy of such perturbations in hindering actual code generation for introductory programming assignments. The user study suggests that i) perturbations combinedly reduced the average correctness score by 77%, ii) the drop in correctness caused by these perturbations was affected based on their detectability.

Impeding LLM-assisted Cheating in Introductory Programming Assignments via Adversarial Perturbation

TL;DR

The baseline performance of 5 widely used LLMs on a collection of introductory programming problems is investigated, adversarial perturbations to degrade their performance are examined, and the results of a user study aimed at measuring the efficacy of such perturbations in hindering actual code generation for introductory programming assignments are described.

Abstract

While Large language model (LLM)-based programming assistants such as CoPilot and ChatGPT can help improve the productivity of professional software developers, they can also facilitate cheating in introductory computer programming courses. Assuming instructors have limited control over the industrial-strength models, this paper investigates the baseline performance of 5 widely used LLMs on a collection of introductory programming problems, examines adversarial perturbations to degrade their performance, and describes the results of a user study aimed at understanding the efficacy of such perturbations in hindering actual code generation for introductory programming assignments. The user study suggests that i) perturbations combinedly reduced the average correctness score by 77%, ii) the drop in correctness caused by these perturbations was affected based on their detectability.

Paper Structure

This paper contains 42 sections, 2 equations, 10 figures, 10 tables.

Figures (10)

  • Figure 1: Removal of 5 characters from an assignment prompt caused correctness scores of the generated solutions to drop from 100% to 0% in CodeRL, Code Llama, GPT-3.5, and GitHub Copilot. For Mistral, it dropped from 33.33% to 0%.
  • Figure 2: Overview of our study, which is conducted in three steps. Here, boxed elements indicate processing units, and unboxed elements represent input/output data. We used solid arrows through processing units to connect inputs to their corresponding outputs.
  • Figure 3: The average changes caused by the perturbation techniques are calculated as the edit distance between the original and the perturbed assignments.
  • Figure 4: Examples of short and long problems
  • Figure 5: An example CS1 problem where CodeRL, GPT-3.5 and GitHub Copilot scored 0%.
  • ...and 5 more figures

Theorems & Definitions (1)

  • Definition 1: Efficacy