T-165Text Predictability Score
Computes n-gram predictability score using information-theoretic measures — AI text is often more predictable than human text.
Algorithm / Model
Token-Level Predictability and Information-Theoretic Anomaly Detection
How it works
This method applies Text Predictability Score analysis for AI-generated content detection:\n\n1. Token-Level Surprisal Computation: For each token in the text, the method computes surprisal using a reference language model: surprisal(w_i) = −log₂ P(w_i | w_1...w_{i-1}). This measures how 'surprising' each word is given its context. The method computes: (a) mean surprisal — the average bits per token. Human text mean surprisal: 6–10 bits/token (depending on genre and model). AI text: 3–6 bits/token (significantly more predictable because AI generates tokens that maximize probability). (b) Surprisal variance — the spread of token-level surprisal values. Human: σ² = 8–18 (high variance — unpredictable words mixed with predictable ones). AI: σ² = 4–10 (low variance — uniformly predictable). (c) Surprisal distribution shape — human text shows a right-skewed distribution with a long tail of high-surprisal tokens (creative word choices, rare vocabulary). AI text shows a more symmetric distribution with truncated right tail.\n\n2. Entropy and Perplexity Analysis: The method computes information-theoretic summary statistics: (a) cross-entropy — H(text, model) = (1/N) Σ surprisal(w_i). Lower cross-entropy indicates higher predictability. Human cross-entropy: 4.5–7.0 bits/token. AI: 2.5–5.0 bits/token. (b) Perplexity — 2^H. Human perplexity: 23–128. AI: 6–32. This is the core detection principle behind methods like DetectGPT (Mitchell et al., 2023) and GPTZero. (c) Calibrated perplexity — perplexity adjusted for text genre and topic. Academic text naturally has higher perplexity (more technical vocabulary); informal text has lower perplexity. The method uses genre-specific perplexity baselines to compute z-scores: z = (observed − expected) / expected_σ. Texts with z < −1.5 are flagged as potentially AI-generated.\n\n3. Log-Probability Curvature Analysis: Following DetectGPT (Mitchell et al., 2023), the method analyzes the curvature of the log-probability function: (a) the method generates perturbations of the original text by randomly replacing words with substitutions from a masked language model. (b) For each perturbation, it computes the log-probability under the reference model. (c) Machine-generated text tends to occupy local maxima in the log-probability space — perturbations consistently decrease log-probability. Human text does not occupy such maxima — perturbations are equally likely to increase or decrease log-probability. The curvature score d = (original_logprob − mean_perturbed_logprob) / std_perturbed_logprob. Human d: −0.5 to 1.0 (near zero, no consistent curvature). AI d: 1.5 to 4.0 (strong positive curvature indicating a probability maximum). The method typically uses 50–100 perturbations for stable curvature estimation.\n\n4. N-gram Predictability Patterns: The method analyzes predictability at different n-gram levels: (a) unigram predictability — how predictable each word is based solely on frequency. Human: rank-frequency profile follows Zipf's law with α ≈ 1.0. AI: α ≈ 0.85–0.95 (slightly flatter, avoiding rare words). (b) Bigram predictability — how predictable each word is given the previous word. Human bigram entropy: 5–8 bits. AI: 3–6 bits. (c) Predictability acceleration — the rate at which predictability increases with more context (unigram → bigram → trigram → 4-gram). Human text shows diminishing returns: each additional context word reduces entropy by 15–25%. AI: each additional word reduces entropy by 25–40% (AI text is more effectively compressed by additional context). (d) Burstiness of surprisal — whether high-surprisal tokens cluster together (bursty) or distribute evenly (periodic). Human: bursty distribution (coefficient B = 0.3–0.6). AI: periodic distribution (B = 0.0–0.2).
Technical Parameters
Mean surprisal human: 6–10 bits/token\nMean surprisal AI: 3–6 bits/token\nSurprisal variance human: σ² = 8–18\nSurprisal variance AI: σ² = 4–10\nCross-entropy human: 4.5–7.0 bits/token\nCross-entropy AI: 2.5–5.0 bits/token\nPerplexity human: 23–128\nPerplexity AI: 6–32\nCurvature score human: −0.5 to 1.0\nCurvature score AI: 1.5 to 4.0\nPerturbations: 50–100\nZipf α human: ≈1.0\nZipf α AI: 0.85–0.95\nMinimum tokens: 100
Accuracy & Reliability
85–93% accuracy detecting AI-generated text through predictability analysis. Log-probability curvature achieves AUC of 0.92 (state-of-the-art for zero-shot detection). Mean surprisal provides F1-score of 0.88. N-gram predictability acceleration adds 2–3% improvement. Performs across most text genres and lengths.
Strengths
• Information-theoretic foundation provides strong theoretical basis\n• DetectGPT curvature analysis is a state-of-the-art zero-shot method\n• No training data from specific AI models required\n• Works across different generators (GPT, Claude, Llama, etc.)\n• Applicable to virtually any text genre und length
Limitations
• Requires access to a reference language model\n• Perturbation-based curvature is computationally expensive\n• Human text on highly predictable topics may score as AI\n• Paraphrasing attacks can reduce predictability scores\n• Very short texts (<100 tokens) produce unstable estimates
Use Case
Zero-shot detection of AI-generated text without requiring training data from specific models. Evaluating text authenticity across all genres. Identifying AI-written content in academic submission screening. Flagging potential AI-generated journalism and social media content.
References & Citations
- Mitchell, E. et al. — DetectGPT: Zero-Shot Machine-Generated Text Detection Using Probability Curvature (ICML 2023)
- Bao, G. et al. — Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvature (EMNLP 2023)
- Tian, E. & Cui, A. — GPTZero: Towards Detection of AI-Generated Text (arXiv 2023)