T-122Sentence Length Information Entropy

Statistical Analysistext2023

Applies Shannon Entropy principles to the distribution curve of sentence lengths across a document. Large Language Models operate on probability maximization, naturally gravitating toward a 'safe, average' sentence length (typically 15-25 words). As a result, AI-generated text produces a narrow, highly predictable, bell-curve distribution of sentence lengths. Human writers are inherently chaotic and rhythmic—effortlessly mixing staccato 3-word sentences for emphasis with sprawling 45-word compound-complex sentences, resulting in a significantly higher and more unpredictable information entropy score.

Shannon Entropy Calculation on Sentence Length Frequencies
The algorithm tokenizes the text into sentences and counts the word length of each. It groups these lengths into statistical 'bins' (e.g., 1-5 words, 6-10 words, etc.). It then applies the Shannon Entropy formula ($H = -\sum p(x) \log p(x)$) to the probability distribution of these bins. A high entropy score means the sentence lengths are widely and unpredictably distributed (human). A low entropy score indicates that almost all sentences fall into a few predictable length bins, exposing the mathematical homogenization typical of AI generation.
Analysis: Word Count per Sentence Array
Metric: Shannon Entropy of Length Distribution Bins

Output: 0-100 Entropy Deficit (Mathematical Homogenization) Score
High — 82-88% accuracy on texts exceeding 500 words. A foundational pillar of statistical AI detection.
• Highly robust, language-agnostic metric that relies purely on mathematical distribution rather than analyzing semantics or grammar.
• Very difficult to bypass with simple prompting (e.g., 'write with varied sentence lengths'), as AI models still struggle to mathematically replicate true human entropy.
• Entirely ineffective on short texts (under 150 words), as the sample size is too small to calculate a statistically significant entropy curve.
• Highly formalized writing (e.g., legal code, strictly formatted technical specs) naturally produces low entropy and may read as false positives.
Best suited for auditing medium-to-long form content (blog posts, articles, academic essays) where there is enough statistical volume to confidently plot a distribution curve of sentence lengths.