[Paper Review] OUTFOX: LLM-Generated Essay Detection Through In-Context Learning with Adversarially Generated Examples
OUTFOX proposes a novel adversarial training framework that enhances LLM-generated essay detection robustness by iteratively training a detector and an attacker using each other's outputs via in-context learning. The detector improves detection accuracy by up to +41.3 F1-score on attacker-generated texts, achieving state-of-the-art performance of 96.9 F1-score on non-attacked texts, while the attacker degrades existing detectors by up to -57.0 F1-score, outperforming baseline paraphrasing methods.
Large Language Models (LLMs) have achieved human-level fluency in text generation, making it difficult to distinguish between human-written and LLM-generated texts. This poses a growing risk of misuse of LLMs and demands the development of detectors to identify LLM-generated texts. However, existing detectors lack robustness against attacks: they degrade detection accuracy by simply paraphrasing LLM-generated texts. Furthermore, a malicious user might attempt to deliberately evade the detectors based on detection results, but this has not been assumed in previous studies. In this paper, we propose OUTFOX, a framework that improves the robustness of LLM-generated-text detectors by allowing both the detector and the attacker to consider each other's output. In this framework, the attacker uses the detector's prediction labels as examples for in-context learning and adversarially generates essays that are harder to detect, while the detector uses the adversarially generated essays as examples for in-context learning to learn to detect essays from a strong attacker. Experiments in the domain of student essays show that the proposed detector improves the detection performance on the attacker-generated texts by up to +41.3 points F1-score. Furthermore, the proposed detector shows a state-of-the-art detection performance: up to 96.9 points F1-score, beating existing detectors on non-attacked texts. Finally, the proposed attacker drastically degrades the performance of detectors by up to -57.0 points F1-score, massively outperforming the baseline paraphrasing method for evading detection.
Motivation & Objective
- To address the lack of robustness in existing LLM-generated text detectors against simple attacks like paraphrasing.
- To simulate realistic adversarial scenarios where malicious users exploit detector feedback to evade detection.
- To develop a detector that learns from adversarially generated texts to improve detection under strong attack conditions.
- To evaluate the effectiveness of the proposed framework in a realistic educational domain—student essay writing.
- To release a reproducible dataset and code for future research in LLM-generated text detection.
Proposed method
- The detector first predicts labels on a training set of essays, including both human-written and LLM-generated texts.
- The attacker uses these detector prediction labels as in-context examples to generate adversarial essays that are harder to detect.
- The detector then retrains using the adversarially generated essays as in-context examples to improve detection on strong attacker outputs.
- In-context learning is used throughout: the attacker leverages detector labels as demonstrations, and the detector uses adversarial examples as few-shot prompts.
- The framework is trained and evaluated on a custom dataset of 15,400 essay triplets (problem, human-written, LLM-generated) from native student writers.
- Semantic similarity is measured using BERT embeddings and cosine similarity to analyze the linguistic proximity of attacker-generated essays to human-written ones.
Experimental results
Research questions
- RQ1Can a detector trained on adversarially generated texts via in-context learning achieve higher robustness against strong attackers?
- RQ2Does incorporating adversarial examples during detector training degrade performance on non-attacked, natural LLM-generated texts?
- RQ3How does the semantic similarity of attacker-generated essays compare to human-written essays and non-attacked LLM-generated essays?
- RQ4To what extent does the proposed attacker outperform baseline paraphrasing methods in evading detection?
- RQ5Can in-context learning enable LLMs to detect LLM-generated texts without parameter updates?
Key findings
- The OUTFOX detector improves detection F1-score on attacker-generated texts by up to +41.3 points compared to a detector not exposed to adversarial examples.
- The OUTFOX detector achieves a state-of-the-art F1-score of 96.9 on non-attacked LLM-generated essays, outperforming existing detectors.
- The proposed attacker degrades the performance of existing detectors by up to -57.0 F1-score, significantly outperforming baseline paraphrasing attacks.
- Attacker-generated essays are semantically closer to human-written essays than non-attacked LLM-generated essays, as shown by a rightward shift in cosine similarity distributions.
- The detector maintains high recall (98.8) for human-written essays, indicating minimal over-detection, likely due to its training on human-feedback-tuned LLMs.
- The DIPPER attack, based on paraphrasing, actually improves detection performance on some models like RoBERTa-large, highlighting the limitations of non-discriminative attacks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.