Detecting LLM -Assisted Cheating on Open-Ended Writing Tasks on Language Proficiency Tests (2024)

Abstract: The high capability of recent Large Language Models (LLMs) has led to concerns about possible misuse as cheating assistants in open-ended writing tasks in assessments. Although various detecting methods have been proposed, most of them have not been evaluated on or optimized for real-world samples from LLM-assisted cheating, where the generated text is often copy-typed imperfectly by the test-taker. In this paper, we present a framework for training LLM-generated text detectors that can effectively detect LLM-generated samples after being copy-typed. We enhance the existing transformer-based classifier training process with contrastive learning on constructed pairwise data and self-training on unlabeled data, and evaluate the improvements on a real-world dataset from the Duolingo English Test (DET), a high-stakes online English proficiency test. Our experiments demonstrate that the improved model outperforms the original transformer-based classifier and other baselines.

## introduction language proficiency tests are crucial in many high-stakes decisions, such as immigration, school admissions, and employment. to ensure valid results, testing agencies have developed security technologies to prevent and detect cheating. with the rise of large language models (llms), concerns about llm-assisted cheating have emerged, especially for open-ended writing questions. for example, multimodal llms like gpt-4 vision (ope-nai, 2023) can provide high-quality answers from a screenshot of the question @xcite . to counteract llm misuse, researchers have proposed methods to distinguish llm-generated text from human-written text, which have shown good performance on domain-specific datasets @xcite . however, due to the difficulty of collecting real-world llmgenerated samples in malicious use cases, most research on llm-generated text detection is conducted on datasets where positive samples are generated by researchers using llms (sometimes with paraphrasers). consequently, it is unclear whether detection methods have the same performance on real-world samples where manual modifications are common. for instance, in an online test with screen recording and key tracking enabled, testtakers have to copy-type the llm-generated text within a tight time limit, introducing typos and other modifications that rarely exist in researchergenerated samples. in this paper, we address the detection of llmassisted cheating on open-ended writing tasks on english proficiency tests by bridging the gap between researcher-constructed and real-world llmgenerated samples. first, we create a dataset with human-written responses and gpt-4-generated responses, augmented with an approximated copytyping error insertion and correction process (section 3.2). we then fine-tune a roberta-base model @xcite on this dataset with the simclr @xcite contrastive learning framework (section 3.3). to incorporate real-world positive samples, we perform self-training @xcite on pseudo-labeled samples using the initial classifier (section 3.4). finally, we evaluate the model on both constructed and real-world data (section 4 and 5), which shows that the detection rate foot_0 is improved by 1.7x over the initial fine-tuned roberta-base model at a low false positive rate of 0.1%. ## related works our work is an application of generated text detection, enhanced with contrastive learning and self-training. we briefly review related works as follows: generated text detection (gtd) is a text classification task of whether a text sample is generated by machine (or llm specifically), or written by human. methods of gtd fall into two categories: (1) metric-based methods that do not require model training and are usually based on the llm-generated text distribution, such as detect-gpt @xcite , or dna-gpt @xcite , and (2) model-based methods that involve training classifiers, either transformer-based @xcite or feature-based @xcite . specifically, @xcite apply both transformer-based and feature-based models in detecting gpt-3-generated essays in english proficiency tests. among these methods, finetuned transformer-based classifiers show high performance on benchmarks @xcite . however, most existing research relies on positive samples generated by researchers prompting llms, instead of those from malicious users. to fill this gap, our work provides an approach to evaluate and improve the classifier on real-world samples from llm-assisted cheating. contrastive learning @xcite ) is a technique of learning representations by contrasting positive and negative pairs. following sim-clr @xcite , a contrastive learning framework in computer vision, @xcite apply simclr to text classification to improve robustness towards adversarial samples. bhattacharjee et al. (2023) combine simclr with domainadaption to detect llm-generated text from unseen llms. inspired by these prior works, we adopt the simclr framework for robustness towards modifications in copy-typed llm-generated samples. self-training @xcite is a semisupervised learning method where a model is initially trained on a labeled dataset, and then applied to an unlabeled dataset to obtain pseudo-labeled samples for the next round of training. it has been applied in text classification to leverage unlabeled data in low-resource settings @xcite and to use unlabeled non-english samples for cross-lingual transfer @xcite . similarly, we apply self-training to utilize copy-typed llmgenerated samples in unlabeled real-world data. ## methodology in this section, we frame the problem of detecting copy-typed llm-generated responses by defining probabilistic distributions for different response processes (section 3.1). then, we construct our main dataset by approximating the copy-typing process (section 3.2) which enables contrastive learning (section 3.3). we further improve the model with self-training in section 3.4. ## results and discussions we present evaluation results to verify: ## conclusion in this work, we present a framework for training an llm-generated text detector to effectively detect generated samples with human modification during copy-typing. we enhance the existing method of fine-tuning transformer-based classifiers by incorporating contrastive learning and self-training, and verify these improvements in detecting llmassisted cheating on open-ended writing tasks in an english proficiency test. this research provides new possibilities for detecting llm misuse with post-generation modifications, such as errors introduced during copy-typing. for future directions, we plan to further investigate characteristics of llm-assisted cheating, such as modeling the copy-typing process. we also plan to apply the framework to other domains, such as open-ended speaking questions, where the process of reading aloud followed by automatic speech recognition can be viewed as a more complex postgeneration modification than copy-typing.