Most articles about AI detectors tell you which tool to use. This one is about what's actually happening when you paste text into one. If you write code, you'll recognize the pattern quickly: it's a classifier, and like every classifier, it's only as good as its features, its training data, and its threshold.
The marketing says these tools tell human from machine. The math says something more modest. They estimate a probability based on statistical signals, and those signals are noisier than the confident percentage on screen implies.
Let's open it up and look at the mechanics, the metrics, and why the whole approach is harder than it sounds.
The Core Idea: Text as a Statistical Signal
What a Detector Is, Technically
An AI detector is, under the hood, a classifier that takes a string of text as input and outputs a probability that the text was generated by a language model, using statistical features extracted from the writing rather than any record of authorship. That distinction is the key to understanding everything else about how these tools behave.
Because the detector never observes who wrote the text, it can only reason about the text itself. It measures properties of the token sequence and compares them against patterns it learned from labeled human and AI examples. The output is not a fact about origin. It is an inference from surface statistics, which is exactly why the same architecture that catches obvious machine output also misfires on unusual human writing. Everything a detector "knows" is encoded in the features it extracts, so the features are where the real story lives.
The Two Features That Matter Most
Two metrics do the heavy lifting in most detectors: perplexity and burstiness. Nearly everything else is refinement on top of these.
Both come from language modeling, and both are computable with a few lines on top of an existing model. Understanding them is enough to understand why detection works at all, and why it breaks.
Perplexity: Measuring Predictability
The Math
Perplexity quantifies how "surprised" a language model is by a piece of text. Formally, it's the exponential of the average negative log-likelihood of the tokens:
PP(x) = exp( - (1/N) * Σ log P(x_i | x_1 ... x_i-1) )
For each token, the model gives a probability. Take the log, average across all N tokens, negate, and exponentiate. Low perplexity means the model found the text highly predictable. High perplexity means it didn't.
Why It Signals AI
Here's the logic. AI-generated text tends to choose high-probability tokens, because that's what the model was optimized to do. So machine output usually has low perplexity when scored by a similar model.
Human writing is messier and less predictable, so it tends to score higher. A detector treats low perplexity as evidence of AI. The flaw is immediate to anyone who thinks about edge cases: a human who writes in clear, conventional, predictable prose also produces low perplexity, and gets flagged for it.
Burstiness: Measuring Variation
The Concept
Burstiness captures how much variation exists across sentences, typically in length and in per-sentence perplexity. You can compute it as the variance, or standard deviation, of sentence-level scores across a document.
Human writing tends to be bursty. We follow a long, winding sentence with a short one. Then a fragment. That uneven rhythm produces high variance.
Why It Signals AI
Machine text is often smoother and more uniform, which yields low burstiness. So detectors read low variation as machine-like and high variation as human.
The failure mode mirrors perplexity's. A human who writes in a consistent, even style, common among some non-native speakers and some neurodivergent writers, produces low burstiness and trips the same wire. The metric can't tell disciplined uniformity from machine uniformity.
Beyond the Two Metrics
Trained Classifiers
Modern detectors rarely stop at raw perplexity and burstiness. Many fine-tune a transformer, often a RoBERTa-style model, on large labeled datasets of human and AI text, learning features far more complex than two scalars.
This helps, but it inherits a classic machine-learning problem. The classifier only generalizes as well as its training distribution. Text from a newer model, a different domain, or an unusual writer can fall outside what it learned.
The Threshold Problem
Every detector ultimately reduces its probability to a decision using a threshold. Set it low and you catch more AI but flag more humans. Set it high and you protect humans but miss more AI. This is the precision-recall tradeoff, and there is no setting that escapes it.
|
Component |
What it computes |
Failure mode |
|
Perplexity |
Token predictability |
Clear human prose scores low |
|
Burstiness |
Sentence-level variance |
Uniform human style scores low |
|
Trained classifier |
Learned features |
Fails outside training distribution |
|
Threshold |
Probability to label |
Trades false positives for false negatives |
Why the Math Produces False Positives
The Numbers Are Ugly
The theoretical weaknesses show up hard in testing. A 2025 University of Chicago Booth study by Jabarian and Imas found the best detectors held false-positive rates at or below 1% on academic writing, while an open-source baseline flagged 30% to 69% of genuine human text.
The bias is worse than the averages suggest. A Stanford study in the journal Patterns found over 61% of essays by non-native English speakers were falsely flagged, and a 2026 follow-up reported a 61.3% false-positive rate for Chinese students versus 5.1% for US students. The features literally penalize constrained vocabulary and simple syntax.
An Unwinnable Arms Race
There's a deeper theoretical issue. As language models improve, their output moves closer to the human distribution the detector uses as its reference.
Adversarial testing confirms it: paraphrasing and rewriting tools sharply reduce detection, with one 2025 study reporting an average 84.94% relative drop under adversarial paraphrasing. When machine text becomes statistically indistinguishable from human text, the classifier's job approaches the impossible. Even OpenAI withdrew its own detector in July 2023, citing low accuracy.
Pro tip for developers: If you're tempted to build detection into a product, treat the score as a soft signal, never a gate. Log the probability, set a deliberately conservative threshold, and keep a human in the loop for any consequential decision. Shipping a hard "AI or not" verdict on top of a noisy classifier is how you generate false accusations at scale.
The Takeaway
Under the hood, an AI detector is a probabilistic classifier resting on two shaky features and a threshold. Perplexity measures predictability. Burstiness measures variation. Both conflate "machine-like" with "clear and consistent," which is why honest human writing gets flagged.
The empirical results follow directly from the math. Accuracy ranges from near-perfect to worse than a coin flip, false positives exceed 60% for some groups, and better language models keep eroding the signal detection depends on.
For developers, the lesson is the one that applies to any classifier making high-stakes calls. Know your features, respect your error rates, and never let a probability masquerade as a fact. The code can estimate a likelihood. It cannot, on its own, prove who wrote the words.
