Papers › OUTFOX: LLM-Generated Essay Detection Through In-Context Learning with Adversarially...

OUTFOX: LLM-Generated Essay Detection Through In-Context Learning with Adversarially Generated Examples

21 Jul 2023arXiv:2307.11729archive 2025-07-28

Ryuto Koike, Masahiro Kaneko, Naoaki Okazaki

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2307.11729")

Code

Syntology Ran 6 of 8 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 1 ran · violated contract; 1 ran · our draft was wrong; 4 ran with no contract checked.

By repository: official repository: 8 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ryuryukke/OUTFOX officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

8 samples harvested; 6 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
1ran · our draft was wrong
4ran
2unverified

Licence: 0 of the 8 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ryuryukke/OUTFOX. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_test_ps_to_near_ps_human_lm_pairs_from_train_tf_idf ryuryukke/OUTFOX/utils/make_tf_idf_pairs.py official repository ran Apache-2.0 (permissive) · 4426e8b08029760f · report
get_train_ps_to_near_ps_human_lm_pairs_from_train_tf_idf ryuryukke/OUTFOX/utils/make_tf_idf_pairs.py official repository ran Apache-2.0 (permissive) · 0859bd3a92b39c97 · report
json2dict ryuryukke/OUTFOX/utils/utils.py official repository ran Apache-2.0 (permissive) · 1bc42d6584406e3e · report
load_pkl ryuryukke/OUTFOX/utils/utils.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 04fe40b607fbd142 · report
str2bool ryuryukke/OUTFOX/src/detection/baseline_detection_dev.py official repository ran · violated contract Apache-2.0 (permissive) · 678874b625786116 · report
trim_to_shorter_length ryuryukke/OUTFOX/src/detection/baseline_detection_dev.py official repository ran fingerprinted Apache-2.0 (permissive) · 1e502726d33bbe9d · report
load_model_and_tokenizer ryuryukke/OUTFOX/utils/utils.py official repository unverified Apache-2.0 (permissive) · 59ab6a8438c40917 · report
tokenize_and_mask ryuryukke/OUTFOX/src/detection/baseline_detection_dev.py official repository unverified Apache-2.0 (permissive) · 374e995ebc355414 · report

Tasks

Adversarial AttackAdversarial Attack DetectionDeepFake DetectionIn-Context LearningLLM-generated Text DetectionLanguage ModellingLarge Language ModelText Generation

Datasets

Introduced by this paper, per the archive.

OUTFOX

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections