Beating AI detectors: It's harder than you'd think but I tried anyways
A common misconception I've come across in my short history of writing pseudoscientific blogposts about AI writing and AI detection is the assumption that AI detectors simply don't work. While it is true that AI detectors cannot be used to prove AI authorship due to the possibility of false positives, the better ones have become incredibly accurate statistical tools to measure AI writing.
In this post I examine how surprisingly difficult it is to fool those detectors and how you can squeeze a bit of score improvement out with prompt engineering. I also show how it's done properly by training my own Gemma 4 26B-A4B-it LoRA to minimise scores and building a workflow that rewrites AI text to fly under the radar.
A small preamble for the statistically challenged.
As I said in the very beginning there are usually about 5-10 people below my posts who confidently claim that "AI detectors don't work" or "AI detection has been debunked". If you're not one of them, just move on to the next section. This isn't for you.
Let me tell you about the Robust AI Detection (or RAID) benchmark. The RAID benchmark is a dataset for evaluating AI text detectors across various domains, models, decoding settings and adversarial edits. It consists of over 10 million generated documents. RAID documentation
Winston AI reaches a detection rate of 99.89% at a target 1% FPR across the models and attacks in the dataset. This means about 1.1 out of a thousand AI texts are missed, while the threshold targets wrongly flagging about 1% of human texts as AI. RAID result For reference, a 2022 Cochrane review found that rapid COVID antigen tests caught 73% of infections in people with symptoms, with about 0.9% false positives among symptomatic people without COVID. Review And you do trust those, don't you?
Perfect accuracy is never a sensible requirement for any statistical model. The world is fuzzy, there are very few certain statements we can make. A perfect detector is impossible, because we can ask an LLM to quote a text verbatim. If our detector classifies the original human text as most likely human, it will classify the identical copy the same way, though it's also been output by an LLM.
The false-positive rate still matters when you look at one person’s writing. Suppose ten of 1,000 essays are AI-written. A detector that catches 90% of them and falsely flags 1% of the human essays produces about nine correct flags and ten incorrect ones. Roughly half the students it flags wrote their own essays.
I want to highlight a particular comment by one of my readers (/u/NuShrike on Reddit) that stood out: "This [using AI detectors to classify papers] is like throwing bones on the ground, and divining if the papers used witchcraft." Let's assume we try throwing bones on the ground and divine the RAID test set, what would the chance be that we get the results that Winston AI got on their detector? If throwing bones means an independent coin flip for each text, the chance of correctly labelling at least 652,073 of the 652,800 AI texts in Winston's test is about 2.27 × 10⁻¹⁹⁴⁰⁵². The correct conclusion, therefore, is that witchcraft is real and the engineers that developed Winston should be burned at the stake.
The Plan
First the goal: The goal is to find a method that rewrites AI text to defeat GPTTrace Ettin-1B, the best open and available detector model I could verify on the RAID paraphrase test.
The plan consists of two straightforward hypotheses.
Hypothesis 1: Getting out of the local maximum
LLMs are trained to minimize errors in next token prediction. This means that they in many cases make weird approximations and develop interesting behaviors and idiosyncrasies. Early LLMs, for example, hard focussed on the word "delve", new ones love "honest caveats" and set theory based distinctions "X is actually a Y never a Z". Even thinking about this makes me throw up in my mouth a little. You may have noticed that no person you have ever interacted with talks or writes like this. This is because no person actually exists that writes or talks like this. This is simply the writing style that emerged through training for next token prediction loss minimization and posttraining. I cannot for certain tell if it came from either pretraining or posttraining and there are valid arguments for both. The important thing is, LLMs have a very specific smell. And the smell goes beyond just using words. It's in sentence structure, word length, sentence length and many other even more abstract metrics and features.
How do we get out of all this? The answer is imitation. If we can get the model to recite human text it would be, arguably correctly, classified as human. If we can get the model to be as close to some sort of human text as possible while rewriting a passage we might avoid most of these AI smells. It would most likely be best to pick texts by known authors with unique styles and large corpuses of text for this. The more of an author's work the model has been trained on, the easier it will be to imitate.
Hypothesis 2: Reverse Rewriting training
Training a model to turn AI inputs into human outputs by giving it pairwise examples of human and AI text to train on should generally lead to a model that produces more human looking rewrites. Super straightforward.
For the detector I chose GPTTrace Ettin‑1B, which had the strongest paraphrase result among the open checkpoints I could verify on RAID. At a threshold set to flag 1% of human writing, its leaderboard entry caught 97.54% of the AI paraphrases. I collected 160 public human/AI pairs to try the rewrites on. The sources and a download are in the appendix. RAID results
The data comes from three public datasets. I took 96 academic excerpts from GPABench2, 32 US federal passages from GoHumanize and 32 long paper sections from Open Text Detector Heldout. Each pair has a human text and an AI rewrite of that text. I used the AI versions as inputs and kept the human originals as the control. For the long paper sections I removed the unchanged text around the rewritten section from both versions.
I used 40 pairs for an initial author screen. Every plot in this post uses the same other 120 passages, including 24 long ones between 500 and 1,137 words. All the methods get the same texts. The test set, all the rewrites and the detector scores are available as CSV downloads in the appendix.
I used GLM 5.3 Flash for all the prompting experiments.
The most intuitive approach
As a control I tried the most intuitive approach of having an LLM rewrite a text asking it to sound "more natural", not use "stock AI-phrases" and write the text to be less likely to be flagged by a detector.
On these 120 passages, a plain rewrite lowered the score on 69 and raised it on 51. The average change was −0.68 points. Removing stock AI phrases barely changed the average (+0.03), and directly asking the model to avoid detection did about as little (−0.09). So those two attempts to sound less like AI did less for me than just asking for clear, natural English. These are raw GPTTrace scores, which have no fixed maximum.
Giving Flash someone to imitate
I chose Charles Darwin, Jane Austen, Mark Twain, Frederick Douglass and Richard Feynman and tried their prompts on the same 120 passages.
Here is the prompt I used:
Rewrite this document in the style of [AUTHOR]'s published prose. Preserve every claim, figure, qualification, attribution and citation. Return only the rewritten text.
Here is Darwin rewriting part of a Federal Reserve speech.
AI input:
In essence, the process of cooperation between the public and private sectors, as exemplified by the Federal Reserve's decades-long efforts to promote the efficiency and safety of the payment system, can often lead to outcomes that benefit households, businesses, and the overall economy.
Darwin:
In essence, that process of co-operation between the public and private spheres—of which the labours of the Federal Reserve, continued through many decades, to advance the efficiency and safety of the payment system, affords a signal example—does often conduct to results of benefit to households, to commercial bodies, and to the economy at large.
The full passage went from the 99.2nd to the 88.1st percentile. Original speech
Interesting result. It's a bit windy for my taste and the em dashes are definitely a choice but the detector score speaks for itself. It did get lower, even if it's just by a bit. This is progress compared to just asking the model to rewrite.
| Text / prompt | Median raw score | Median change (percentile points) | Lower than AI input |
|---|---|---|---|
| Human originals | -6.22 | — | 119/120 |
| Starting AI | 7.03 | — | — |
| Darwin | 6.82 | -4.4 | 74/120 |
| Douglass | 7.57 | -0.9 | 61/120 |
| Plain rewrite | 7.96 | -2.2 | 69/120 |
| Austen | 8.09 | +1.9 | 56/120 |
| Twain | 9.02 | +8.6 | 46/120 |
| Feynman | 10.90 | +17.0 | 25/120 |
I changed only the name in the prompt. The plot shows the resulting scores, including the human originals, starting AI texts and the same plain rewrites from the previous plot. The table also compares each rewrite with its own AI input. A negative change means the detector score went down. Darwin had the largest median drop of the five authors and was the only one to beat plain rewriting on that measure. Feynman made the score higher on 95 of the 120 passages.
Picking sentences
Darwin was the author I'd picked in the initial screen, and it also did best of the five here. But lowering the score on 74 of 120 passages still leaves 46 where it went up. I wanted to see if I could get a bit further than that.
The next thing I tried was giving Flash several attempts at each sentence and picking the one that gave the document the lowest detector score. The surrounding text matters here. I put each candidate sentence back into the passage before scoring it, then kept the best one and moved on to the next sentence. A separate detector did the choosing, and GPTTrace scored the finished text.
I also put together a version using the first suggestion for every sentence. This lets me check whether the selection itself is helping. And I ran the plain rewrite prompt through the same procedure, so I could compare it with Darwin when both got to generate alternatives and pick sentences.
This is a small win for the first hypothesis. Selecting sentences beat taking the first suggestions on 69 of the 120 passages. With both prompts using selection, Darwin beat the plain rewrite on 87. So the author prompt was still helping when I gave the generic prompt the same treatment.
We were still quite a way from the human baseline though. A typical selected Darwin rewrite was also about 70% longer than its input, which is a fairly annoying side effect if you're trying to rewrite a long document.
Bringing out the big guns
Now for the second hypothesis. I fine-tuned Gemma 4 26B-A4B-it with a LoRA adapter. The reason I picked Gemma was simple and unscientific: I had CoreWeave credits to use up.
I built a gigantic Frankenstein of rewriting datasets, then filtered and cleaned it. The training task was to take an AI rewrite and reproduce the human text it came from. In total I trained on 80 million tokens. This gives the model examples of what I want it to do, including changes I probably wouldn't think to ask for in a prompt.
I started with the simplest version: give Gemma a sentence, take its first suggestion, and repeat until the whole document is rewritten. I did this with base Gemma and the fine-tuned model, then scored the complete documents. On 119 of the 120 passages, the fine-tuned version scored lower than base Gemma. The median reduction was 41 percentile points. Compared with the original AI inputs, the fine-tuned version scored lower on 114 of 120.
I then added the same sentence selection procedure I used with Darwin. I expected this to help more than it did. The score improved on 69 of the 120 passages, but the median improvement was only 1.4 percentile points. Fine-tuning had done most of the work.
The median raw score was 7.03 for the AI inputs, −5.12 for Gemma with selection and −6.22 for the human originals. This is already a lot closer to the human baseline than what I got by asking Flash to sound more natural.
We did it? (The finishing touches)
The scores look good. Let's read one of the sentences from the selected Gemma drafts:
For example, such things may be recommended to a child whose parents take violent movies, to a vegetarian whose they are at a steak-house, or even an intern-level job is recommended to a CEO.
Gemma before repair · full-passage percentile: 23.1
Ew. The source is talking about bad recommendations, like suggesting violent movies to children or steak houses to vegetarians. Gemma had managed to make both the grammar and the meaning worse. This is definitely not what I wanted from a rewriting model.
I gave Flash the AI input and the exact Gemma draft I had just scored, and asked it to fix the changes in meaning. Here is the same sentence after that step:
For example, violent movies may be recommended to children, steak-house recommendations may be given to vegetarians, or an intern-level job may be recommended to a CEO.
After Flash · full-passage percentile: 23.8
Much better. The recommendations make sense again, and the full passage's percentile score only went from 23.1 to 23.8. Source paper
Checking the other 119 passages
I did this for all 120 passages, saving and scoring each Gemma draft before giving it to Flash. I then made a fresh Flash call to compare the meaning of the two versions. The reviewer got the AI input and the two drafts labelled A and B in shuffled order. It didn't get the detector scores or a label telling it which version had been repaired.
I asked it to look for changes to the claims, numbers, qualifications and attributions, and to quote the text that showed each problem. I counted the flags where those quotes could be found in the supplied texts. Across the 120 passages, the reviewer found fewer problems after repair on 91 and the same number on 29. Flash was also doing the repairs, so this is still the same model judging the result.
The median change on the percentile scale after repair was zero. Some passages scored higher and others lower, but Flash generally kept the score improvements while fixing many of the meaning problems.
What I find remarkable is how close the finished rewrites get to the human originals on these 120 passages. The median raw score is −5.13 for Gemma + Flash and −6.22 for human writing, compared with 7.03 for the AI texts we started with. And the resemblance goes beyond the median. Here are the full distributions:
What about other detectors?
I also wanted to know whether this only worked on GPTTrace. I took the finished rewrites and scored them with three other open detectors. GPTTrace's smaller 150M model gave 96 of the 120 rewrites lower scores than their AI inputs. ConPara did so on 107 and Tabularis on 100. For comparison, the 1B GPTTrace model used throughout this post gave lower scores on 111.
My own detector gave the rewrites lower scores on all 120 passages. That result was fairly unsurprising because it had been choosing the sentence variants. The other detectors hadn't been involved in that process, so I was much more interested in whether the improvement would carry over to them. It did, although they didn't all agree on which rewriting method was best.
TL;DR
There are two things I'd take away from this:
- If you're using a general-purpose LLM, try asking it to rewrite like Darwin or another well-known writer whose style fits the subject. The Darwin prompt helped here. Requests to remove AI phrases or avoid detection changed the average very little.
- If you want scores closer to the human baseline, use a model trained to rewrite AI text. My trained Gemma model with sentence selection and Flash repair got close to the human baseline on GPTTrace.
Appendix
Where the pairs came from
The 160 pairs came from public datasets. Of the 96 academic excerpts from GPABench2, 32 were computer science, 32 astrophysics and 32 humanities and social sciences. The other two groups were 32 US federal passages from GoHumanize and 32 long paper sections from Open Text Detector Heldout. For those paper sections, I cut away the unchanged text around the rewrite from both versions. GPABench2 · GoHumanize · Open Text Detector Heldout
I kept one pair per source and checked both texts against the recorded Gemma training data and the training and validation data for the detector that selected sentences. I also checked the available dataset and source IDs. I found no matches among the pairs I used. These checks don't rule out near duplicates or texts the base models saw during pretraining.
I took eight pairs from each of the five groups for the initial 40-passage author screen. The remaining 24 per group made up the 120-passage main set used in every plot. Darwin was selected in the initial screen; I later expanded the other four author prompts to the same 120 passages. The long AI passages were between 500 and 1,137 words. They all came from one collection, so length and source material both differ between the short and long passages.
Download the test data (CSV) and all rewrites and results (CSV), or both files with the column notes (ZIP). The test data contains all 160 human/AI pairs. The results contain 2,720 document variants, including the untouched texts, with all available detector scores and the meaning checks. The experiment_group column separates the initial 40 from the main 120. Blank scores mean that detector was not run on that variant; columns beginning with estimated_ are surrogate estimates, not vendor results.
How the scores were calculated
I used GPTTrace's published 4-bit model and averaged its AI-minus-human scores over chunks of up to 512 tokens. The opening plot, generic-prompt plot, author plot and final human comparison show those raw scores. Lower means less AI-like. GPTTrace weights
For the changes reported in percentile points, I ranked each text against the same set of 320 untouched human and AI texts. The author table uses this scale, as do the percentile-point comparisons for Gemma and sentence selection. The cumulative curves labelled “Percentile of original AI scores” use the same 120 starting AI texts as their reference. That is where the diagonal comes from.
A separate detector chose the author and the sentence variants. I chose GPTTrace after looking at the RAID results and the untouched pairs, before scoring the saved rewrites with it. Some of the other detectors preferred Darwin, so the choice of detector affects which method comes out best. I compared scores throughout; a lower score on another detector doesn't automatically mean a text passed its classification threshold.