# Large Language Models in Computer Science Classrooms: Ethical Challenges and Strategic Solutions
## 5 Tools and Strategies for Ensuring Academic Integrity
### Plagiarism Detection Methods
#### 5.3.2 Automated Detection Software  
In recent years, numerous automated tools have been developed for the submission and grading of exercises [49]. These tools often include capabilities to detect similarities in submitted exercises [8; 55]. Designed for programming assignments, they can compare  
Figure 9: An example of standardized code generated using ChatGPT4. submitted code with existing code repositories, public code bases, or other students' submissions. Although these tools may not specifically identify ChatGPT-generated code, they can help to detect similarities that might raise suspicions. Detecting plagiarized content generated with GenAI tools poses a greater challenge than detecting conventional plagiarism from human-created programs or code. Given the complexities involved in detecting standard plagiarism, the challenge becomes even more pronounced with GenAI. Unlike traditional tools that detect cheating through the identification of overly similar assignments, methods for detecting AI-generated outputs are inherently more complex. [PERSON] et al. [49] have outlined three primary approaches for the detection of standard plagiarism: Structural, semantic, and behavioral. **Structural Approaches:** These methods detect plagiarism by comparing the physical structures within the source code, such as token sequences or data structures like trees, using algorithms to measure their similarity. **Semantic Approaches:** Focusing on the underlying meaning rather than the literal structure, these methods utilize representations such as program dependence graphs, control flow graphs, and call graphs. They also employ techniques such as latent semantic analysis to discern deeper, non-visible semantic similarities in the code. **Behavioral Approaches:** Operating on the assumption that similar programs exhibit identical behaviors when executed, these approaches involve dynamic analysis of the programs. They vary in the specific aspects of the program's behavior they examine, such as data processing during runtime, interactions with the execution environment, functionality, or logic. All three approaches compare two sets of code to identify similarities, whether structural, semantic, or behavioral. However, detecting GenAI-based plagiarism is inherently challenging as there is no pre-defined AI-generated source to compare against. For the same prompt, students might receive different responses from an AI tool. Consequently, even with nearly identical prompts, their responses might not align, suggesting that traditional methods and software designed to detect copied work may not be effective in this context. It may indeed be feasible to develop machine learning methods to determine whether a text was produced using a language model such as ChatGPT. One strategy involves training a machine learning model using numerous examples from the language model, which aids in detecting AI-generated code through identifying recurring patterns and similarities. One study [27] examined various techniques for identifying AI-generated content in order to set it apart from human-created text. A logistic regression model that evaluates the probability distribution of tokens predicted by a language model was presented, specifically focusing on the tokens with the highest probabilities for classification. Furthermore, two deep learning classifiers constructed based on the RoBERTa model were presented: one designed for analyzing individual texts and another suited to a question-answering context. These classifiers take advantage of the advanced capabilities of RoBERTa--a pre-trained transformer model fine-tuned to accurately identify AI-generated text. Additionally, detection tools can examine specific features in the text, such as unique writing styles or specific words and patterns, which may suggest that the text was generated by a language model. These methods are also capable of manually detecting code generated by AI tools, as detailed in Section 5.3.1.