PaperBleachPaperBleach
logo

What N-Gram Repetition Tells AI Detectors About Machine-Written Text

P
Paperbleach

25 Sep 2024

Open a few paragraphs of unedited ChatGPT output and you’ll start to notice it: the same little phrases keep coming back, like a song stuck on two chords. AI detectors notice it too, and one of the oldest, cheapest ways they measure it is by counting repeated runs of words called n-grams. Here’s what that repetition actually reveals, and what it doesn’t.

Key takeaways

  • An n-gram is just a run of n words in a row; detectors count how often the same runs repeat across a document.
  • Machine text tends to reuse the same multi-word phrases more than human writing, which spikes certain repetition stats.
  • Repetition analysis is cheap, language-agnostic, and easy to compute, which is why it shows up in detectors and plagiarism tools alike.
  • It’s a weak signal on its own: technical writing, second-language writing, and templated formats can repeat phrases for perfectly human reasons.
  • You reduce suspicious repetition the same way you make writing better, by varying phrasing and cutting filler, not by gaming a score.

What an n-gram actually is

Strip away the jargon and an n-gram is a sliding window over your words. A 1-gram (unigram) is a single word. A 2-gram (bigram) is two words in a row. A 3-gram (trigram) is three, and so on.

Take the sentence “the model picks the next word.” The bigrams are “the model,” “model picks,” “picks the,” “the next,” and “next word.” The trigrams are “the model picks,” “model picks the,” “picks the next,” and “the next word.” A detector slides that window across your whole document, lists every n-gram, and tallies how many times each one shows up.

That’s the entire mechanic. There’s no AI inside the counting step at all. N-grams have been quietly powering search engines, spell checkers, machine translation, and spam filters since long before anyone worried about ChatGPT. What changed is that people started pointing the same old counting trick at machine-written text.

Why repeated n-grams hint at a machine

Language models generate text one token at a time, and each choice is a bet on what’s most likely to come next. That design has a quiet consequence: when the model isn’t sure, it falls back on safe, high-probability phrasing. The same connective tissue keeps surfacing because, statistically, it’s the comfortable choice.

So an unedited model draft tends to reuse phrases like “plays a crucial role,” “it is important to note,” “on the other hand,” and “in order to” far more often than a human would tolerate. It also reuses sentence shapes, opening half its sentences with the same scaffolding. All of that produces repeated n-grams: the same trigrams and 4-grams appearing again and again.

Human writers behave differently. We get sick of our own phrasing. We swap a transition, vary how a sentence starts, reach for a synonym out of sheer boredom. That restlessness shows up as lower repetition and more variety, and its absence is exactly what a repetition score is built to catch. If you want the broader statistical picture this fits into, see our guide to perplexity and burstiness, the statistics behind AI detectors.

A quick mini-scenario

Imagine two paragraphs about renewable energy. Here’s an AI-flavored one:

> Solar power plays a crucial role in the energy transition. Wind power also plays a crucial role in reducing emissions. In order to meet climate goals, it is important to note that both technologies are essential. It is important to note that adoption continues to grow.

Now count the repeats. “Plays a crucial role” appears twice. “It is important to note” appears twice. “In order to” is doing filler work. A trigram counter lights up immediately, because four words of every other sentence are recycled.

A human edit of the same content might read:

> Solar carries a lot of the energy transition on its back, and wind is catching up fast. Both cut emissions, which is the whole point. The catch is scale. We need a staggering amount of new capacity to hit 2050 targets, and we’re not building it quickly enough yet.

Same facts. The repeated n-grams are gone, the sentence lengths swing around, and a concrete worry (“we’re not building it quickly enough”) replaces the generic framing. That’s the difference repetition analysis is trying to measure.

How detectors turn repetition into a number

Counting n-grams is step one. Turning the counts into a usable signal takes a few common moves:

  • Type-token ratio. Divide the number of unique n-grams by the total number of n-grams. Lots of repeats pushes this ratio down. A low ratio reads as “this text keeps saying the same things the same way.”
  • Repetition rate of top phrases. Detectors check how much of the document is taken up by its most frequent bigrams and trigrams. If a handful of phrases dominate, that’s a flag.
  • Self-similarity across sentences. Some tools compare each sentence’s n-grams against the rest of the document to see how much overlaps. High overlap means the writing circles the same wording.

These stats are attractive to build because they’re cheap to compute, they don’t need a giant neural network, and they work across languages without retraining. You can run n-gram repetition analysis on a phone. That’s a big reason it survives as a feature inside detectors that otherwise lean on heavier machine-learning models. It’s also why it rarely runs alone; it’s usually one input among many. You can read more on how detection works across the rest of our mechanics series.

Repetition isn’t the same as plagiarism

People mix these up constantly, so it’s worth being clear. Plagiarism checkers also use n-grams, but they compare your phrases against an enormous database of published text and student papers to find matches with outside sources. AI-detection repetition analysis points the lens inward: it measures how much your document repeats *itself*, with no database required.

Same math, opposite reference point. One asks “have I seen this somewhere else?” The other asks “does this writer keep saying the same thing?” A document can be flawlessly original yet internally repetitive, or richly varied yet copied. They’re answering different questions, and a high score on one tells you nothing about the other.

Where repetition analysis gets it wrong

This is the part the marketing pages skip. Repeated n-grams have plenty of innocent causes, and the signal is genuinely weak on its own.

Technical and academic writing repeats on purpose. If you’re writing about “myocardial infarction” or the “Fourth Amendment,” you don’t get to swap in a fresh synonym every paragraph. Precision demands the same term again and again. Legal, medical, and scientific writing all repeat key phrases because changing them would change the meaning.

Templated formats force repetition. Cover letters, lab reports, recipe intros, product descriptions, and FAQ pages all follow conventions that recycle structure and phrasing. That’s the format doing its job, not a model phoning it in.

Second-language writers can repeat more. A writer drawing on a smaller working vocabulary in their second language may lean on the same reliable phrases. That’s a sign of careful, cautious writing, not machine authorship, yet a repetition score can’t tell the difference. This kind of bias is documented: a 2023 Stanford study, *GPT detectors are biased against non-native English writers* (Liang et al., with senior author James Zou), found that detectors flagged writing by non-native English speakers far more often than native-speaker writing.

Short text breaks the math. With only a few sentences, there aren’t enough n-grams to say anything meaningful. A repetition score on a single paragraph is mostly noise.

The honest takeaway is the one that applies to every detection signal: it produces a probability, not proof. OpenAI retired its own AI text classifier in July 2023 because it wasn’t accurate enough, and repetition analysis shares the same ceiling. A score is a question worth asking, never a verdict.

How to keep repetition from working against you

The good news is that fixing mechanical repetition and writing better are the same task. You don’t need tricks.

  • Read it aloud. Your ear catches a recycled phrase faster than your eye. When a phrase makes you wince the second time, change it.
  • Vary your sentence openers. If three sentences in a row start with “This” or “The model,” rewrite two of them.
  • Cut filler transitions. “In order to,” “it is important to note,” and “moreover” stacked back to back are pure repetition fuel. Delete or replace them.
  • Swap generic framing for specifics. A concrete number or example almost never repeats, because it’s unique to your point.

Do those things and your repetition stats fall as a byproduct. More importantly, the writing gets clearer for the actual humans reading it, which is the only audience that ultimately matters.

The bottom line

N-gram repetition is one of the oldest, simplest signals in the AI-detection toolkit. It catches a real tendency in unedited machine text, the habit of leaning on the same safe phrases, but it misfires on technical writing, second-language writers, and anything templated. Treat it as one clue among many, not a confession.

If you want to see how your own draft scores and where it repeats itself, you can run a draft through PaperBleach and watch which phrases light up before anyone else checks.

Try it on your own text

Paste your draft into PaperBleach to humanize AI text so it reads naturally — then check your score against built-in AI detection. Free on your first run.