Distinguishing Artificial from Authentic: Evaluating LLMs for Detecting LLM-Generated Content
Summary
This paper investigates how well LLMs can detect their own generated content in educational contexts, finding that detection accuracy varies by task type and is unreliable for short-answer questions.
View Cached Full Text
Cached at: 07/24/26, 05:16 AM
# Distinguishing Artificial from Authentic: Evaluating LLMs for Detecting LLM-Generated Content
Source: [https://arxiv.org/html/2607.20446](https://arxiv.org/html/2607.20446)
Finland juho\.2\.leinonen@aalto\.fiPaul Denny University of Auckland AucklandNew Zealand paul@cs\.auckland\.ac\.nz
###### Abstract
As large language models \(LLMs\) are increasingly used by students to generate natural language responses and program code, there is growing interest in whether LLMs themselves can be used to distinguish AI\-generated work from human\-authored submissions\. In this paper, we investigate the extent to which LLMs can detect their own generated content across multiple educational task types, including programming exercises, reflective writing, and short\-answer questions\. Using authentic student responses and multiple variants of LLM\-generated answers, we evaluate detection performance under different prompting strategies and output formats\. Our study addresses three research questions: \(1\) how accurately LLMs can identify their own outputs across task domains, \(2\) how detection effectiveness is influenced by factors such as prompt design, response length, and task type, and \(3\) what characteristics of LLM\-generated responses contribute to successful or failed detection\. Our findings show that LLM\-based detection is highly task\-dependent: detection is substantially more reliable for programming tasks and longer reflective responses, but performs poorly for short\-answer questions, where LLMs frequently judge their own outputs as more human\-like than authentic student responses\. We further find that prompt framing and response verbosity have a pronounced effect on detectability in reflective writing tasks, with relatively minor prompt variations significantly reducing detection accuracy, while programming\-related detection is more robust to prompt changes\. Together, these results highlight both the potential and the limitations of LLM self\-detection in educational settings and suggest caution in relying on LLMs as standalone tools for identifying AI\-generated student work\.
###### keywords:
generative AI, large language models, detection
## 1Introduction
Large language models \(LLMs\) are increasingly embedded in educational contexts\. Beyond their use by students to draft written responses\[[10](https://arxiv.org/html/2607.20446#bib.bib27)\]or generate code in programming courses\[[11](https://arxiv.org/html/2607.20446#bib.bib28)\], LLMs are now being explored as graders, feedback providers, and generators of synthetic student data for research and tool development\[[7](https://arxiv.org/html/2607.20446#bib.bib30),[18](https://arxiv.org/html/2607.20446#bib.bib29),[12](https://arxiv.org/html/2607.20446#bib.bib15)\]\. For synthetic data generation in particular, it is important for LLM\-generated outputs to closely resemble authentic student work in both structure and distribution\[[16](https://arxiv.org/html/2607.20446#bib.bib31)\]\. However, this goal exists alongside parallel efforts to reliably differentiate AI\-generated outputs from authentic student work\.
Interest in detection approaches for AI\-generated content is growing in higher education contexts\. Universities have seen substantial growth in academic integrity referrals, with many thousands of cases linked to suspected AI use\[[4](https://arxiv.org/html/2607.20446#bib.bib25)\]\. Concerns have also been raised around the reliability of detection approaches\. Some instructors have relied on direct LLM outputs to determine authorship, resulting in wrong accusations of misconduct\[[3](https://arxiv.org/html/2607.20446#bib.bib26)\]\. Commonly used classifier\-based detection tools, including systems such as GPTZero, have also been shown to be unstable and inconsistent\[[17](https://arxiv.org/html/2607.20446#bib.bib24)\]\. While watermarking approaches have been proposed, they are not widely accessible and they have been shown to be very fragile in some contexts, such as for code generation\[[25](https://arxiv.org/html/2607.20446#bib.bib23)\]\.
Despite the growing interest, there has been relatively little research examining how well LLMs can detect LLM outputs in authentic educational task settings\. In particular, there has been limited investigation of how self\-detection performance varies across domains such as programming, reflective writing, and short\-answer responses, or how factors such as prompt framing and response length influence detectability\. In this paper, we explore the following research questions:
- •RQ1: How accurately can LLMs detect their own generated content across different educational task domains \(programming, reflection, and short\-answer responses\)?
- •RQ2: How do prompt framing, response length, and task type influence LLM self\-detection performance?
- •RQ3: What characteristics of LLM\-generated responses contribute to successful or failed detection?
## 2Related Work
As large language models \(LLMs\) are increasingly used to generate a wide range of content across many domains, there is growing interest in the ability to detect LLM\-generated material\[[27](https://arxiv.org/html/2607.20446#bib.bib16)\]\. This is an essential problem for many reasons, including the prevention of misinformation and maintaining accountability in situations where human authorship is expected, such as in many educational contexts\[[20](https://arxiv.org/html/2607.20446#bib.bib17),[15](https://arxiv.org/html/2607.20446#bib.bib18)\]\. There is also the problem of model collapse, as introduced by Shumailov et al\.\[[23](https://arxiv.org/html/2607.20446#bib.bib12)\], a phenomenon in which LLMs trained on data that includes their own generated content lose the ability to represent the original distribution of human\-generated text\. As AI\-generated text becomes more sophisticated, the difficulty of the detection task increases\. Traditional approaches tend to rely on innovations in watermarking techniques, statistical analysis detectors, and neural\-network based detectors\[[14](https://arxiv.org/html/2607.20446#bib.bib19),[1](https://arxiv.org/html/2607.20446#bib.bib20),[27](https://arxiv.org/html/2607.20446#bib.bib16)\]\.
### 2\.1LLM Self\-Detection
Recent work has also explored whether LLMs themselves can be effective detectors of LLM\-generated content\. For example, Zhu et al\. propose a zero\-shot black\-box detection method that leverages ChatGPT to revise text and then measures the similarity between the original and revised versions\[[28](https://arxiv.org/html/2607.20446#bib.bib21)\]\. The intuition behind their approach is that ChatGPT will make fewer revisions to LLM\-generated text compared to human\-written text, as LLM outputs more closely align with the statistical patterns and generation logic learned by these models\. Similarly, Wang et al\. apply instruction tuning of open\-source LLMs to both document\-level and sentence\-level detection\[[26](https://arxiv.org/html/2607.20446#bib.bib22)\]\. When applied to LLM\-generated Chinese text, they find that instruction\-tuned LLMs significantly outperform traditional classifiers\. Other recent work has shown that without modification, models such as GPT\-4 and Llama 2 have non\-trivial accuracy at distinguishing content they generate themselves from that of other LLMs and humans\[[22](https://arxiv.org/html/2607.20446#bib.bib10)\]\. Steyvers et al\. focus on the alignment between human trust in AI\-generated responses and how LLMs communicate the likelihood of their predictions being correct\[[24](https://arxiv.org/html/2607.20446#bib.bib13)\]\. Their findings suggest that improving uncertainty communication could enhance the reliability of LLM\-generated content detection, particularly in educational and professional contexts\.
### 2\.2Challenges and Benchmarks
Gressel et al\. propose a benchmark for detecting AI\-generated responses, testing both explicit and implicit detection strategies\[[6](https://arxiv.org/html/2607.20446#bib.bib3)\]\. They find that explicit detection achieves a higher success rate, whereas implicit challenges, where LLMs are given a prompt to guide them to disguise their outputs, prove significantly more difficult\. Najjar et al\. use explainable AI methods to classify text as human\- or LLM\-generated, outperforming some trained detection tools \(like GPTZero\) on both direct copying and more subtle forms of plagiarism\[[19](https://arxiv.org/html/2607.20446#bib.bib6)\]\.
In the context of computing education, Hoq et al\. present an ML\-based approach to detect ChatGPT\-generated code submissions in CS1 courses, achieving over 90% accuracy with traditional ML and AST\-based deep learning models\[[9](https://arxiv.org/html/2607.20446#bib.bib9)\]\. Their findings reveal that even with prompt variations intended to mimic novice programmers, ChatGPT\-generated code remains structurally distinct from student code\. They observe that code structure provides detectable signatures that differentiate student work from AI\-generated solutions, reinforcing the idea that LLMs could be trained to detect their own outputs in structured domains\. In contrast, Orenstrakh et al\. evaluate eight LLM\-generated text detectors in computing education, noting that detection accuracy decreases with code\-based submissions and non\-English text\[[21](https://arxiv.org/html/2607.20446#bib.bib7)\]\.
### 2\.3Biases and Misinformation
Other work has focused more explicitly on biases and detecting misinformation\. Chen et al\. explore the challenges of detecting LLM\-generated misinformation, demonstrating that such content is often harder to detect than human\-written misinformation due to its deceptive style\[[5](https://arxiv.org/html/2607.20446#bib.bib2)\]\. They propose a taxonomy for LLM\-generated misinformation and highlight the need for robust detection frameworks\. Lin et al\. investigate biases in LLM\-based detection systems, revealing that political and linguistic biases can affect classification accuracy\[[13](https://arxiv.org/html/2607.20446#bib.bib5)\]\. They propose debiasing techniques to improve fairness in AI\-generated content detection\. Beyond simple detection, Achintalwar et al\. focus on identifying risks within LLM\-generated content, such as bias, hallucinations, toxicity, and misinformation, rather than distinguishing AI\-generated text from human\-written text\[[2](https://arxiv.org/html/2607.20446#bib.bib1)\]\. They introduce a library of compact classifiers that can operate independently of the underlying LLMs, allowing for scalable AI safety measures\.
## 3Methods
\\Description
You have been learning MATLAB for 6 weeks now, and have just begun to learn the C programming language\. You will notice that some things are different, and some are similar\. Perhaps you find it easier to learn another language, given that you already understand basic programming principles, or perhaps you find it harder because some things work differently to what you are now familiar with\. Everyone will experience this differently\.
For this exercise, write a short reflective piece \(anywhere from several sentences to several paragraphs\) in your own words, that describes how you have found this transition to learning a new language\. What are you finding easier, and what are you finding harder about learning C compared to MATLAB?
You have been learning MATLAB for 6 weeks now, and have just begun to learn the C programming language\. You will notice that some things are different, and some are similar\. Perhaps you find it easier to learn another language, given that you already understand basic programming principles, or perhaps you find it harder because some things work differently to what you are now familiar with\. Everyone will experience this differently\.
For this exercise, write a short reflective piece \(anywhere from several sentences to several paragraphs\) in your own words, that describes how you have found this transition to learning a new language\. What are you finding easier, and what are you finding harder about learning C compared to MATLAB?
Figure 1:Reflection: an exercise eliciting students’ reflections on transitioning from MATLAB to C in an introductory programming course\.\\Description
\[Reflection prompt\]Reflection prompt
\\Description
A figure showing two code snippet examples where the examples are identical except for the spacing used\. Students are asked: ‘Ìn a sentence, why do you think the code you selected above is easier to read?
You have now seen lots of examples of code\. The two examples shown below are identical except for the spacing used\.

In a sentence, why do you think the code you selected above is easier to read?
Figure 2:Short answer: an exercise eliciting a sentence\-length response from students on the readability of a provided code fragment\.\\Description
\[Readability prompt\]Readability prompt
\\Description
Define a function calledSignBalance\(\)which is passed one input: an array of integers\. This function should determine whether there are more positive or more negative values in the array \(up to the position of the first 0 element\)\. In calculating this, you should examine every value in the array up to the first occurrence of the value 0\. If there are more positive than negative values, you should return the value 1\. If there are more negative values than positive values, you should return the value \-1\. If there are an equal number of positive and negative values, you should return the value 0\. The function prototype declaration will look like the following:
int SignBalance\(int values\[\]\)
Define a function calledSignBalance\(\)which is passed one input: an array of integers\. This function should determine whether there are more positive or more negative values in the array \(up to the position of the first 0 element\)\. In calculating this, you should examine every value in the array up to the first occurrence of the value 0\. If there are more positive than negative values, you should return the value 1\. If there are more negative values than positive values, you should return the value \-1\. If there are an equal number of positive and negative values, you should return the value 0\. The function prototype declaration will look like the following:
int SignBalance\(int values\[\]\)
Figure 3:Programming 1: an exercise involving loops and arrays, where answers should be specified in the C language\.\\Description
\[Programming prompt 1\]Programming prompt 1
\\Description
Write a function that takes two strings as input: the word to check and the pattern against which to check it\. The function prototype declaration is as follows:
int WordMatchesPattern\(char \*word, char \*pattern\)
The function should return true only if the string “word” is a possible completion of the string “pattern”\. The “pattern” string is a partial word where some of the characters have been replaced with hyphens \(\-\)\. The “word” will be a valid completion of the “pattern” if all of the characters not corresponding to hyphens match, and if they are both the same length\.
Write a function that takes two strings as input: the word to check and the pattern against which to check it\. The function prototype declaration is as follows:
int WordMatchesPattern\(char \*word, char \*pattern\)
The function should return true only if the string “word” is a possible completion of the string “pattern”\. The “pattern” string is a partial word where some of the characters have been replaced with hyphens \(\-\)\. The “word” will be a valid completion of the “pattern” if all of the characters not corresponding to hyphens match, and if they are both the same length\.
Figure 4:Programming 2: an exercise involving string matching, where answers should be specified in the C language\.\\Description
\[Programming prompt 2\]Programming prompt 2
### 3\.1Context and Data
We analyse student submissions from a university\-level introductory programming course\. The course was taught over 12 weeks at the University of Auckland, and is a core \(compulsory\) course that engineering students take in their first year of study\. The first half of the course uses the MATLAB language, and from week 7 students transition to the C language\.
Students completed weekly lab sessions, and our data was gathered from labs delivered during weeks 7, 9, 10 and 11, across four different exercises\. The week 7 data are responses to a reflection task \(*reflection*\) shown in Figure[1](https://arxiv.org/html/2607.20446#S3.F1), asking students about their perceptions of the switch to a new language\. Responses were expected to be several sentences to several paragraphs\. The Week 9 and 10 data are responses to two programming exercises: the first \(*programming 1*\) to determine whether there are more positive or more negative values in the array \(up to the position of the first 0 element\), and the second \(*programming 2*\) is a string matching exercise to determine if a string could be a valid completion of a partial string with missing letters\. The tasks are shown in Figures[3](https://arxiv.org/html/2607.20446#S3.F3)and[4](https://arxiv.org/html/2607.20446#S3.F4)\. Finally, the Week 11 data is a short answer task \(*short answer*\) on the readability of code, where expected responses were a single sentence, as shown in Figure[2](https://arxiv.org/html/2607.20446#S3.F2)\.
The number of submissions per exercise was: programming 1 \(n=201n=201\), programming 2 \(n=870n=870\), short answer \(n=854n=854\), and reflection \(n=846n=846\)\. In total, the dataset includes submissions from 913 unique students across all exercises\.
Table 1:Study Results for Reflection, Short Answer, and Programming QuestionsTable 2:Rank\-based separability of detector likelihood scores between real student responses and LLM\-generated responses\. We report Cliff’sδ\\deltaeffect sizes and Holm\-adjustedpp\-values from two\-sided Mann–Whitney U tests\.\\Description
Four density plots of LLM\-likelihood \(0\-100%\) comparing real students vs 3 LLM variants; reflection/programming higher for LLM; short\-answer reversed\.
\(a\)Reflection
\(b\)Short answer
\(c\)Programming 1
\(d\)Programming 2
Figure 5:Distributions for each question type for the likelihood prompt\.
### 3\.2Generating LLM Data
We generated synthetic responses using GPT\-4o under three prompting conditions per exercise type\. The prompts included the content of the prompts that were shown to students as part of the labs tasks \(see Figures 1–4\)\.
For the textual exercises \(reflection and short answer\), we used: \(i\)*baseline*: “Your job is to generate responses to exercises\.” \(ii\)*persona*: “Your job is to generate responses to exercises\. Make it seem like a student response in an introductory programming course\.” \(iii\)*typos*: “Your job is to generate responses to exercises\. Make it seem like a student response in an introductory programming course\. Make sure to include a lot of typos and use informal language\.”
For the programming exercises \(programming 1 and programming 2\), we used: \(i\)*baseline*: “Your job is to generate responses to exercises\.” \(ii\)*persona*: “Your job is to generate responses to exercises\. Make it seem like a student response in an introductory programming course\.” \(iii\)*bugs*: “Your job is to generate responses to exercises\. Make it seem like a student response in an introductory programming course\. The response should include common beginner mistakes and exhibit poor programming style\.”
For each prompt–exercise combination, we generated 100 responses, yielding2textual exercises×3prompts×100=6002\\text\{ textual exercises\}\\times 3\\text\{ prompts\}\\times 100=600textual LLM responses and2programming exercises×3prompts×100=6002\\text\{ programming exercises\}\\times 3\\text\{ prompts\}\\times 100=600programming LLM responses, for a total of 1200 LLM\-generated responses\.
### 3\.3Evaluation
We evaluate detectability by prompting an LLM to judge whether a response was LLM\-generated\. For the programming exercises, we removed non\-code text from LLM\-generated responses to match the student submission format \(students submitted code only\)\.
We used two detector prompts: \(i\)*likelihood*: “Your job is to detect LLM\-generated responses\. Only ever respond with a percentage indicating how likely it is that the response was generated by an LLM\.” \(ii\)*yes/no*: “Your job is to detect LLM\-generated responses\. Only ever respond with yes or no indicating whether you think that the response was generated by an LLM \(yes = it was generated by an LLM, no = it was not generated by an LLM\)\.”
To account for variability in the detector’s outputs, we ran the detector 10 times per response for both prompts\.
### 3\.4Analysis
We report descriptive statistics for response length \(mean and standard deviation\) and detector outputs\. For the likelihood prompt, we report the mean and standard deviation of likelihood values pooled across all detector runs \(10 runs per response\)\. For the yes/no prompt, we report the percentage of “yes” and “no” outputs pooled across all runs\.
To quantify separability between real student responses and LLM\-generated responses, we compare detector likelihood scores between \(i\) real student responses and \(ii\) each LLM prompting condition, separately for each exercise\. Because likelihood scores are obtained from repeated detector runs, inferential analyses are performed at the response level: we first average the 10 likelihood outputs for each response so that each response contributes a single score\. We then use Mann–Whitney U tests \(two\-sided\) and report Cliff’s delta \(δ\\delta\) as an effect size\. We adjustpp\-values for multiple comparisons using Holm’s method\[[8](https://arxiv.org/html/2607.20446#bib.bib32)\]\.
## 4Results
Table[1](https://arxiv.org/html/2607.20446#S3.T1)summarizes descriptive statistics for detector outputs and response lengths, while Table[2](https://arxiv.org/html/2607.20446#S3.T2)quantifies rank\-based separability of the likelihood scores between real student responses and each LLM prompting condition\. Figure[5](https://arxiv.org/html/2607.20446#S3.F5)visualizes the distributions of likelihood estimates\.
### 4\.1Overall Patterns Across Tasks
Across three of the four exercises \(reflection, programming 1, programming 2\), LLM\-generated responses generally received higher likelihood estimates than real student responses \(Table[1](https://arxiv.org/html/2607.20446#S3.T1)\), and the likelihood distributions were shifted toward higher values for LLM responses \(Figure[5\(a\)](https://arxiv.org/html/2607.20446#S3.F5.sf1), Figure[5\(c\)](https://arxiv.org/html/2607.20446#S3.F5.sf3), Figure[5\(d\)](https://arxiv.org/html/2607.20446#S3.F5.sf4)\)\. This is also reflected in predominantly negative Cliff’sδ\\deltavalues in Table[2](https://arxiv.org/html/2607.20446#S3.T2)\(computed asδ\(real,LLM\)\\delta\(\\text\{real\},\\text\{LLM\}\), so negative values indicate higher likelihoods for LLM responses\)\.
In contrast, the short answer exercise exhibited the opposite pattern: real student responses tended to receive*higher*likelihood estimates than LLM\-generated responses \(Table[1](https://arxiv.org/html/2607.20446#S3.T1)\), with positive Cliff’sδ\\deltaacross all three prompting conditions \(Table[2](https://arxiv.org/html/2607.20446#S3.T2)\)\. In Figure[5\(b\)](https://arxiv.org/html/2607.20446#S3.F5.sf2), the real\-student distribution is centered slightly to the right of the baseline and persona distributions, and the typo condition shows substantial probability mass at low likelihood values\.
### 4\.2Reflection and Short Answer \(Textual Exercises\)
Table 3:Example responses for the short answer question by source\.For the reflection question, baseline LLM responses were substantially more detectable than real student responses by the likelihood prompt \(means 87\.0 vs\. 68\.8; Table[1](https://arxiv.org/html/2607.20446#S3.T1)\)\. The separation was large and statistically reliable \(Cliff’sδ=−0\.841\\delta=\-0\.841,pHolm=1\.28e−42p\_\{\\mathrm\{Holm\}\}=1\.28\\mathrm\{e\}\{\-42\}; Table[2](https://arxiv.org/html/2607.20446#S3.T2)\)\. Figure[5\(a\)](https://arxiv.org/html/2607.20446#S3.F5.sf1)shows a pronounced concentration of likelihoods for baseline LLM near the upper range, whereas real student responses exhibit a broader distribution with more mass at lower likelihoods\. Persona prompting reduced separability relative to baseline \(Cliff’sδ=−0\.451\\delta=\-0\.451\), and the typo prompt reduced separability further \(Cliff’sδ=−0\.131\\delta=\-0\.131\), with the typo distribution overlapping more closely with real students \(Figure[5\(a\)](https://arxiv.org/html/2607.20446#S3.F5.sf1)\)\.
For the short answer question, the detector behaved differently\. Real student responses had a higher mean likelihood than any LLM condition \(74\.1 for real vs\. 68\.6 baseline, 72\.6 persona, and 51\.7 typo; Table[1](https://arxiv.org/html/2607.20446#S3.T1)\)\. Rank\-based comparisons confirm this reversal \(Cliff’sδ=0\.162\\delta=0\.162for baseline,0\.2860\.286for persona, and0\.6080\.608for typo; allpHolm≤0\.0078p\_\{\\mathrm\{Holm\}\}\\leq 0\.0078; Table[2](https://arxiv.org/html/2607.20446#S3.T2)\)\. Figure[5\(b\)](https://arxiv.org/html/2607.20446#S3.F5.sf2)suggests that the typo condition, in particular, often received low likelihood estimates, indicating that the detector frequently judged these LLM responses as human\-like despite being generated\.
Table[3](https://arxiv.org/html/2607.20446#S4.T3)shows one example from each source of a response to the short answer question\. Responses from real students tended to be shorter, as in the example, whereas the typo LLM included words such as “becoz” and “u”\.
### 4\.3Programming Exercises
For programming question 1, LLM responses received substantially higher likelihood estimates than real student code \(means 80\.0–86\.1 for LLM vs\. 59\.5 for real; Table[1](https://arxiv.org/html/2607.20446#S3.T1)\)\. The likelihood distributions in Figure[5\(c\)](https://arxiv.org/html/2607.20446#S3.F5.sf3)show real student responses with considerable mass near very low likelihood values, while LLM responses are concentrated near high likelihoods\. Rank\-based separability was moderate to large \(Cliff’sδ≈−0\.47\\delta\\approx\-0\.47for baseline/persona andδ=−0\.640\\delta=\-0\.640for bugs; allpHolm<10−10p\_\{\\mathrm\{Holm\}\}<10^\{\-10\}; Table[2](https://arxiv.org/html/2607.20446#S3.T2)\), suggesting that adding beginner mistakes and poor style did not reduce detectability for this question and may have increased it\.
For programming question 2, likelihood estimates were higher overall and separation was stronger for baseline and persona prompting \(means 91\.0 and 90\.7 vs\. 73\.1 for real; Table[1](https://arxiv.org/html/2607.20446#S3.T1)\), with large negative effect sizes \(Cliff’sδ=−0\.699\\delta=\-0\.699baseline and−0\.670\-0\.670persona; Table[2](https://arxiv.org/html/2607.20446#S3.T2)\)\. However, the bugs prompt reduced separability relative to baseline/persona \(Cliff’sδ=−0\.512\\delta=\-0\.512\), which is also visible in Figure[5\(d\)](https://arxiv.org/html/2607.20446#S3.F5.sf4)as increased overlap between the bugs and real\-student distributions compared to baseline/persona\.
### 4\.4Response Length as a Potential Confound
Across both textual exercises, LLM\-generated responses were substantially longer than real student responses \(Table[1](https://arxiv.org/html/2607.20446#S3.T1)\)\. For reflection, LLM responses were roughly 3\.5–5×\\timeslonger on average \(1577\.9–2329\.4 vs\. 439\.7 characters\)\. For short answers, LLM responses were about 2–3×\\timeslonger on average \(203\.7–305\.7 vs\. 91\.6\)\. For programming exercises, LLM code was also longer than student code \(e\.g\., 663\.5–853\.3 vs\. 390\.2 characters in programming question 1\)\. These consistent length differences suggest that response length may be one signal the detector can exploit, particularly for the text\-based exercises\.
## 5Discussion
### 5\.1Task Differences
For RQ1,How accurately can LLMs detect their own generated content across different educational task domains?, self\-detection performance was stronglytask\-dependent\. Detection was most reliable for the two programming tasks and for the longer reflective responses, where LLM\-generated submissions typically received higher “LLM\-likelihood” scores than real student work\. In contrast, detection performed poorly for the short\-answer task: it was the only task type where both the likelihood estimates and binary judgments were higher for real student responses than for LLM\-generated ones, indicating a clear failure mode where brief, one\-sentence answers were not only hard to classify but could be systematically misranked\. This suggests that conclusions about detectability are unlikely to transfer uniformly across assessment formats, even within the same course context\.
### 5\.2Prompting and Length
For RQ2,How do prompt framing, response length, and task type influence LLM self\-detection performance?, both detector prompting and generation prompting influenced outcomes, and their effects varied by task type\. On the detector side, asking for a graded likelihood estimate produced more consistent separation than forcing a binary yes/no decision\. For LLM\-generated content, mean likelihood estimates were always in the correct direction \(frequently high\), whereas binary decisions tended to misclassify LLM\-generated responses across most task and prompt combinations\. In contrast, for authentic student content, binary classification was comparatively more accurate \(especially for programming\), while likelihood estimates remained above 50% but were generally lower than those for most LLM\-generated responses, suggesting the detector may capture some signal even when imperfectly calibrated\.
On the generation side, prompt variants intended to mimic students affected detectability primarily in the natural language tasks\. Introducing typographic errors reduced detectability compared to baseline or persona prompts\. For programming, the persona prompt had little effect relative to baseline, while inserting beginner bugs had an inconsistent impact across the two questions\. Response length also differed substantially: despite using the same exercise descriptions given to students \(including implicit guidance such as “in a sentence” versus “several sentences to several paragraphs”\), LLM outputs were markedly longer than student submissions\. Length may therefore provide one cue the detector exploits, but it does not explain the short\-answer reversal, where real student answers were judged more LLM\-like\.
### 5\.3What Triggers Detection
For RQ3,What characteristics of LLM\-generated responses contribute to successful or failed detection?, the observed patterns suggest that successful detection relies on persistent, domain\-specific signatures of LLM output\. In reflection tasks, unusually polished and verbose prose appears to increase detectability, and in programming tasks, regular, high\-level structure may provide consistent cues\. Detection failed most often when these signatures were weakened or masked, such as when LLM outputs were deliberately obfuscated to resemble novice writing \(e\.g\., typos and informality\), and when the task constrained responses to short, heterogeneous natural language \(short answers\), where authentic student responses could plausibly resemble templated or generic explanations\.
### 5\.4Limitations
First, our detectability results reflect a single LLM\-based detector and may not generalize to other detection models or non\-LLM approaches\. Second, the data comes from a single course context, so student response styles and exam formats may differ in other settings\. Third, for programming tasks we removed non\-code content from LLM outputs to match the student submission format; different preprocessing choices could affect detectability\. Finally, prompting conditions differed by exercise type \(typos for textual tasks; bugs for programming tasks\), so prompt effects should be interpreted within each exercise type rather than compared directly across types\.
## 6Conclusion
Taken together, our findings indicate that LLM self\-detection can be informative in some educational settings, particularly for programming and longer free\-form writing, but it is unreliable for short\-answer formats and sensitive to relatively small prompt changes\. Consequently, LLM\-based detection should not be treated as a standalone evidence source for academic integrity decisions, and caution is especially warranted in contexts dominated by short, formulaic textual responses\.
## Acknowledgments
This work was supported by Research Council of Finland grant \#356114\. Generative AI was used for polishing the text in this paper\. All GenAI\-generated text was reviewed by the \(human\) authors and the human authors take full responsibility for the text\.
## References
- \[1\]M\. Abassy, K\. Elozeiri, A\. Aziz, M\. N\. Ta, R\. V\. Tomar, B\. Adhikari, S\. E\. D\. Ahmed, Y\. Wang, O\. M\. Afzal, Z\. Xie, J\. Mansurov, E\. Artemova, V\. Mikhailov, R\. Xing, J\. Geng, H\. Iqbal, Z\. M\. Mujahid, T\. Mahmoud, A\. Tsvigun, A\. F\. Aji, A\. Shelmanov, N\. Habash, I\. Gurevych, and P\. Nakov\(2024\)LLM\-detectaive: a tool for fine\-grained machine\-generated text detection\.External Links:2408\.04284,[Link](https://arxiv.org/abs/2408.04284)Cited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[2\]S\. Achintalwar, A\. A\. Garcia, A\. Anaby\-Tavor, I\. Baldini, S\. E\. Berger, B\. Bhattacharjee, D\. Bouneffouf, S\. Chaudhury, P\. Chen, L\. Chiazor, E\. M\. Daly, K\. DB, R\. A\. de Paula, P\. Dognin, E\. Farchi, S\. Ghosh, M\. Hind, R\. Horesh, G\. Kour, J\. Y\. Lee, N\. Madaan, S\. Mehta, E\. Miehling, K\. Murugesan, M\. Nagireddy, I\. Padhi, D\. Piorkowski, A\. Rawat, O\. Raz, P\. Sattigeri, H\. Strobelt, S\. Swaminathan, C\. Tillmann, A\. Trivedi, K\. R\. Varshney, D\. Wei, S\. Witherspooon, and M\. Zalmanovici\(2024\)Detectors for safe and reliable llms: implementations, uses, and limitations\.External Links:2403\.06009,[Link](https://arxiv.org/abs/2403.06009)Cited by:[§2\.3](https://arxiv.org/html/2607.20446#S2.SS3.p1.1)\.
- \[3\]S\. Ankel\(2023\-05\-18\)A texas professor failed more than half of his class after chatgpt falsely claimed it wrote their papers\.Note:https://www\.businessinsider\.com/professor\-fails\-students\-after\-chatgpt\-falsely\-said\-it\-wrote\-papers\-2023\-5Accessed: 2026\-02\-03Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p2.1)\.
- \[4\]J\. Bergin\(2025\-10\-09\)University wrongly accuses students of using artificial intelligence to cheat\.Note:https://www\.abc\.net\.au/news/2025\-10\-09/artificial\-intelligence\-cheating\-australian\-catholic\-university/105863524Accessed: 2026\-02\-03Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p2.1)\.
- \[5\]C\. Chen and K\. Shu\(2024\)Can llm\-generated misinformation be detected?\.External Links:2309\.13788,[Link](https://arxiv.org/abs/2309.13788)Cited by:[§2\.3](https://arxiv.org/html/2607.20446#S2.SS3.p1.1)\.
- \[6\]G\. Gressel, R\. Pankajakshan, and Y\. Mirsky\(2024\)Are you human? an adversarial benchmark to expose llms\.External Links:2410\.09569,[Link](https://arxiv.org/abs/2410.09569)Cited by:[§2\.2](https://arxiv.org/html/2607.20446#S2.SS2.p1.1)\.
- \[7\]O\. Henkel, L\. Hills, A\. Boxer, B\. Roberts, and Z\. Levonian\(2024\)Can large language models make the grade? an empirical study evaluating llms ability to mark short answer questions in k\-12 education\.InProceedings of the Eleventh ACM Conference on Learning @ Scale,L@S ’24,New York, NY, USA,pp\. 300–304\.External Links:ISBN 9798400706332,[Link](https://doi.org/10.1145/3657604.3664693),[Document](https://dx.doi.org/10.1145/3657604.3664693)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[8\]S\. Holm\(1979\)A simple sequentially rejective multiple test procedure\.Scandinavian journal of statistics,pp\. 65–70\.Cited by:[§3\.4](https://arxiv.org/html/2607.20446#S3.SS4.p2.2)\.
- \[9\]M\. Hoq, Y\. Shi, J\. Leinonen, D\. Babalola, C\. Lynch, T\. Price, and B\. Akram\(2024\)Detecting chatgpt\-generated code submissions in a cs1 course using machine learning models\.InProceedings of the 55th ACM Technical Symposium on Computer Science Education V\. 1,SIGCSE 2024,New York, NY, USA,pp\. 526–532\.External Links:ISBN 9798400704239,[Link](https://doi.org/10.1145/3626252.3630826),[Document](https://dx.doi.org/10.1145/3626252.3630826)Cited by:[§2\.2](https://arxiv.org/html/2607.20446#S2.SS2.p2.1)\.
- \[10\]A\. Jelson and S\. W\. Lee\(2024\)An empirical study to understand how students use chatgpt for writing essays and how it affects their ownership\.InProceedings of the Third Workshop on Intelligent and Interactive Writing Assistants,In2Writing ’24,New York, NY, USA,pp\. 26–30\.External Links:ISBN 9798400710315,[Link](https://doi.org/10.1145/3690712.3690720),[Document](https://dx.doi.org/10.1145/3690712.3690720)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[11\]M\. Kazemitabaar, X\. Hou, A\. Henley, B\. J\. Ericson, D\. Weintrop, and T\. Grossman\(2024\)How novices use llm\-based code generators to solve cs1 coding tasks in a self\-paced learning environment\.InProceedings of the 23rd Koli Calling International Conference on Computing Education Research,Koli Calling ’23,New York, NY, USA\.External Links:ISBN 9798400716539,[Link](https://doi.org/10.1145/3631802.3631806),[Document](https://dx.doi.org/10.1145/3631802.3631806)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[12\]J\. Leinonen, P\. Denny, O\. Kiljunen, S\. MacNeil, S\. Sarsa, and A\. Hellas\(2025\)LLM\-itation is the sincerest form of data: generating synthetic buggy code submissions for computing education\.InProceedings of the 27th Australasian Computing Education Conference,ACE ’25,New York, NY, USA,pp\. 56–63\.External Links:ISBN 9798400714252,[Link](https://doi.org/10.1145/3716640.3716647),[Document](https://dx.doi.org/10.1145/3716640.3716647)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[13\]L\. Lin, L\. Wang, J\. Guo, and K\. Wong\(2024\)Investigating bias in llm\-based bias detection: disparities between llms and human perception\.External Links:2403\.14896,[Link](https://arxiv.org/abs/2403.14896)Cited by:[§2\.3](https://arxiv.org/html/2607.20446#S2.SS3.p1.1)\.
- \[14\]A\. Liu, L\. Pan, Y\. Lu, J\. Li, X\. Hu, X\. Zhang, L\. Wen, I\. King, H\. Xiong, and P\. Yu\(2024\-11\)A survey of text watermarking in the era of large language models\.ACM Comput\. Surv\.57\(2\)\.External Links:ISSN 0360\-0300,[Link](https://doi.org/10.1145/3691626),[Document](https://dx.doi.org/10.1145/3691626)Cited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[15\]L\. Liu, D\. Zhang, B\. Yan, and D\. Wu\(2024\)EduGuard\-llm: an ai\-generated content detector using large language models for safeguarding educational integrity\.In2024 4th International Conference on Educational Technology \(ICET\),Vol\.,pp\. 102–105\.External Links:[Document](https://dx.doi.org/10.1109/ICET62460.2024.10869067)Cited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[16\]S\. MacNeil, M\. Rogalska, J\. Leinonen, P\. Denny, A\. Hellas, and X\. Crosland\(2024\)Synthetic students: a comparative study of bug distribution between large language models and computing students\.InProceedings of the 2024 on ACM Virtual Global Computing Education Conference V\. 1,SIGCSE Virtual 2024,New York, NY, USA,pp\. 137–143\.External Links:ISBN 9798400705984,[Link](https://doi.org/10.1145/3649165.3690100),[Document](https://dx.doi.org/10.1145/3649165.3690100)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[17\]M\. A\. Malik and A\. I\. Amjad\(2025\)AI vs ai: how effective are turnitin, zerogpt, gptzero, and writer ai in detecting text generated by chatgpt, perplexity, and gemini?\.Journal of Applied Learning & Teaching8\(1\),pp\. 91–101\.External Links:[Document](https://dx.doi.org/10.37074/jalt.2025.8.1.9),[Link](https://doi.org/10.37074/jalt.2025.8.1.9),ISSN 2591\-801XCited by:[§1](https://arxiv.org/html/2607.20446#S1.p2.1)\.
- \[18\]T\. Menezes, L\. Egherman, and N\. Garg\(2024\)AI\-grading standup updates to improve project\-based learning outcomes\.InProceedings of the 2024 on Innovation and Technology in Computer Science Education V\. 1,ITiCSE 2024,New York, NY, USA,pp\. 17–23\.External Links:ISBN 9798400706004,[Link](https://doi.org/10.1145/3649217.3653541),[Document](https://dx.doi.org/10.1145/3649217.3653541)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p1.1)\.
- \[19\]A\. Najjar, H\. I\. Ashqar, O\. Darwish, and E\. Hammad\(2025\)Leveraging explainable ai for llm text attribution: differentiating human\-written and multiple llms\-generated text\.External Links:2501\.03212,[Link](https://arxiv.org/abs/2501.03212)Cited by:[§2\.2](https://arxiv.org/html/2607.20446#S2.SS2.p1.1)\.
- \[20\]S\. Nathanson, Y\. Yoo, D\. Na, Y\. Cao, and L\. Watkins\(2024\)A step towards modern disinformation detection: novel methods for detecting llm\-generated text\.InMILCOM 2024 \- 2024 IEEE Military Communications Conference \(MILCOM\),Vol\.,pp\. 615–620\.External Links:[Document](https://dx.doi.org/10.1109/MILCOM61039.2024.10773838)Cited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[21\]M\. S\. Orenstrakh, O\. Karnalim, C\. A\. Suarez, and M\. Liut\(2023\)Detecting llm\-generated text in computing education: a comparative study for chatgpt cases\.External Links:2307\.07411,[Link](https://arxiv.org/abs/2307.07411)Cited by:[§2\.2](https://arxiv.org/html/2607.20446#S2.SS2.p2.1)\.
- \[22\]A\. Panickssery, S\. R\. Bowman, and S\. Feng\(2024\)LLM evaluators recognize and favor their own generations\.External Links:2404\.13076,[Link](https://arxiv.org/abs/2404.13076)Cited by:[§2\.1](https://arxiv.org/html/2607.20446#S2.SS1.p1.1)\.
- \[23\]I\. Shumailov, Z\. Shumaylov, Y\. Zhao, Y\. Gal, N\. Papernot, and R\. Anderson\(2024\)The curse of recursion: training on generated data makes models forget\.External Links:2305\.17493,[Link](https://arxiv.org/abs/2305.17493)Cited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[24\]M\. Steyvers, H\. Tejeda, A\. Kumar, C\. Belem, S\. Karny, X\. Hu, L\. W\. Mayer, and P\. Smyth\(2025\)What large language models know and what people think they know\.Nature Machine Intelligence\(\),pp\.\.External Links:[Document](https://dx.doi.org/10.1038/s42256-024-00976-7),[Link](https://doi.org/10.1038/s42256-024-00976-7),ISSN 2522\-5839Cited by:[§2\.1](https://arxiv.org/html/2607.20446#S2.SS1.p1.1)\.
- \[25\]T\. Suresh, S\. Ugare, G\. Singh, and S\. Misailovic\(2025\)Is the watermarking of llm\-generated code robust?\.External Links:2403\.17983,[Link](https://arxiv.org/abs/2403.17983)Cited by:[§1](https://arxiv.org/html/2607.20446#S1.p2.1)\.
- \[26\]R\. Wang, H\. Chen, R\. Zhou, H\. Ma, Y\. Duan, Y\. Kang, S\. Yang, B\. Fan, and T\. Tan\(2024\)LLM\-detector: improving ai\-generated chinese text detection with open\-source llm instruction tuning\.External Links:2402\.01158,[Link](https://arxiv.org/abs/2402.01158)Cited by:[§2\.1](https://arxiv.org/html/2607.20446#S2.SS1.p1.1)\.
- \[27\]J\. Wu, S\. Yang, R\. Zhan, Y\. Yuan, L\. S\. Chao, and D\. F\. Wong\(2025\-02\)A survey on llm\-generated text detection: necessity, methods, and future directions\.Computational Linguistics,pp\. 1–66\.External Links:ISSN 0891\-2017,[Document](https://dx.doi.org/10.1162/coli%5Fa%5F00549),[Link](https://doi.org/10.1162/coli%5C_a%5C_00549),https://direct\.mit\.edu/coli/article\-pdf/doi/10\.1162/coli\_a\_00549/2497295/coli\_a\_00549\.pdfCited by:[§2](https://arxiv.org/html/2607.20446#S2.p1.1)\.
- \[28\]B\. Zhu, L\. Yuan, G\. Cui, Y\. Chen, C\. Fu, B\. He, Y\. Deng, Z\. Liu, M\. Sun, and M\. Gu\(2023\-12\)Beat LLMs at their own game: zero\-shot LLM\-generated text detection via querying ChatGPT\.InProceedings of the 2023 Conference on Empirical Methods in Natural Language Processing,H\. Bouamor, J\. Pino, and K\. Bali \(Eds\.\),Singapore,pp\. 7470–7483\.External Links:[Link](https://aclanthology.org/2023.emnlp-main.463/),[Document](https://dx.doi.org/10.18653/v1/2023.emnlp-main.463)Cited by:[§2\.1](https://arxiv.org/html/2607.20446#S2.SS1.p1.1)\.
\\balancecolumnsSimilar Articles
Can LLMs Judge Better Than They Generate? Evaluating Task Asymmetry, Mechanistic Interpretability and Transferability for In-Context QA
This paper tests the assumption that LLMs judge better than they generate in in-context QA, finding generation accuracy exceeds self-evaluation on most benchmarks, with evaluation attending less to context. The findings challenge core assumptions in self-evaluation pipelines.
Evaluating LLMs as Human Surrogates in Controlled Experiments
This paper evaluates whether off-the-shelf LLMs can reliably simulate human responses in controlled behavioral experiments by comparing LLM-generated data with human survey responses on accuracy perception. The findings show that while LLMs capture directional effects and aggregate belief-updating patterns, they do not consistently match human-scale effect magnitudes, clarifying when synthetic LLM data can serve as behavioral proxies.
Detecting LLM-Generated Texts with "Classical" Machine Learning
A developer explores using classical machine learning to detect LLM-generated web fiction, creating an open-source demo and model with ~85% single-sentence accuracy.
LLM-as-a-Discriminator: When Synthetic Tables Still Look Real
This paper proposes an LLM-as-Discriminator method to audit privacy of synthetic tabular data by asking an LLM to classify samples as real or synthetic, showing that LLM discrimination can serve as a practical privacy audit signal.
@rohanpaul_ai: LLMs often cannot tell when an attack made them say something unsafe. Asking an LLM whether its own previous answer was…
This paper investigates whether LLMs can reliably self-report when their outputs have been compromised by adversarial prefills, finding that models often cannot distinguish between compromised and intentional outputs, and their limited recognition stems from normal refusal behavior rather than true self-awareness.