Papers › Red Teaming Language Model Detectors with Language Models

Red Teaming Language Model Detectors with Language Models

31 May 2023arXiv:2305.19713archive 2025-07-28

Zhouxing Shi, Yihan Wang, Fan Yin, Xiangning Chen, Kai-Wei Chang, Cho-Jui Hsieh

The prevalence and strong capability of large language models (LLMs) present significant safety and ethical risks if exploited by malicious users. To prevent the potentially deceptive usage of LLMs, recent works have proposed algorithms to detect LLM-generated text and protect LLMs. In this paper, we investigate the robustness and reliability of these LLM detectors under adversarial attacks. We study two types of attack strategies: 1) replacing certain words in an LLM's output with their synonyms given the context; 2) automatically searching for an instructional prompt to alter the writing style of the generation. In both strategies, we leverage an auxiliary LLM to generate the word replacements or the instructional prompt. Different from previous works, we consider a challenging setting where the auxiliary LLM can also be protected by a detector. Experiments reveal that our attacks effectively compromise the performance of all detectors in the study with plausible generations, underscoring the urgent need to improve the robustness of LLM-generated text detection systems.

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="2305.19713")

Code

Syntology Ran 1 of 18 code samples harvested from 2 repositories linked to this paper; 17 have no recorded run. Of those that ran: 1 ran · violated contract.

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

shizhouxing/Attack-LM-Detectors officialmentioned on GitHubpytorchBSD-3-Clause report
shizhouxing/LLM-Detector-Robustness mentioned in papermentioned on GitHubpytorchBSD-3-Clause 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

18 samples harvested; 1 ran; 0 honoured the contract we drafted; 17 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
17unverified

Licence: 0 of the 18 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

clip shizhouxing/Attack-LM-Detectors/utils.py official repository unverified BSD-3-Clause (permissive) · 021e54e68430a412 · report
generate_attack_with_T5 shizhouxing/Attack-LM-Detectors/lm_watermarking/demo_watermark.py official repository unverified BSD-3-Clause (permissive) · a69e4a6bacf133b7 · report
get_chatgpt_response shizhouxing/Attack-LM-Detectors/openai_adapters.py official repository unverified BSD-3-Clause (permissive) · 480e7079dc543792 · report
get_chatgpt_response_content shizhouxing/Attack-LM-Detectors/openai_adapters.py official repository unverified BSD-3-Clause (permissive) · 9420861d60bd47e5 · report
get_post shizhouxing/Attack-LM-Detectors/prompt_attack.py official repository unverified BSD-3-Clause (permissive) · 5d5e9dfd7e7d9a52 · report
llama_parse_response shizhouxing/Attack-LM-Detectors/DetectGPT/llama_adapters.py official repository unverified BSD-3-Clause (permissive) · 3e92d9232d362c91 · report
load_data shizhouxing/Attack-LM-Detectors/utils.py official repository unverified BSD-3-Clause (permissive) · dcf5648ead0be9bd · report
openai_ai_text_detect shizhouxing/Attack-LM-Detectors/openai_adapters.py official repository unverified BSD-3-Clause (permissive) · 61878b201ba3201c · report
parse_mapping shizhouxing/Attack-LM-Detectors/DetectGPT/openai_perturbations.py official repository unverified BSD-3-Clause (permissive) · 2617eae32424f5e1 · report
parse_response shizhouxing/Attack-LM-Detectors/DetectGPT/openai_perturbations.py official repository unverified BSD-3-Clause (permissive) · 0c125fa85591bb34 · report
process_prompt shizhouxing/Attack-LM-Detectors/DetectGPT/custom_datasets.py official repository unverified BSD-3-Clause (permissive) · a9123b58146ec27b · report
process_spaces shizhouxing/Attack-LM-Detectors/DetectGPT/custom_datasets.py official repository unverified BSD-3-Clause (permissive) · 2b3a1c3191857159 · report
read_text shizhouxing/Attack-LM-Detectors/utils.py official repository unverified BSD-3-Clause (permissive) · c3a40e446ef9f89c · report
str2bool shizhouxing/LLM-Detector-Robustness/lm_watermarking/demo_watermark.py named in the paper ran · violated contract BSD-3-Clause (permissive) · 678874b625786116 · report
count_masks shizhouxing/LLM-Detector-Robustness/DetectGPT/run_attack.py named in the paper unverified BSD-3-Clause (permissive) · 23c3416429f69fee · report
load_pubmed shizhouxing/LLM-Detector-Robustness/DetectGPT/custom_datasets.py named in the paper unverified BSD-3-Clause (permissive) · 14beed14f0519675 · report
replace_masks shizhouxing/LLM-Detector-Robustness/DetectGPT/run_attack.py named in the paper unverified BSD-3-Clause (permissive) · 11e5b3fc9bdba4a4 · report
tokenize_and_mask shizhouxing/LLM-Detector-Robustness/DetectGPT/run_attack.py named in the paper unverified BSD-3-Clause (permissive) · 374e995ebc355414 · report

Tasks

Adversarial RobustnessLLM-generated Text DetectionLanguage ModelingLanguage ModellingRed TeamingText Detectionmodel

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Test

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