Subscribe
AI
7 min read

What Is the Law of Anomalous Numbers? The Digit Pattern That Catches Fraud and Shapes LLM Output

Newcomb noticed it in worn log tables in 1881. Benford proved it over 20,000 numbers in 1938. Today it explains why language models flub digits, how their weights quantize, and a cheap way to test synthetic audio.

What Is the Law of Anomalous Numbers? The Digit Pattern That Catches Fraud and Shapes LLM Output

The wearing on the book

In 1881 the astronomer Simon Newcomb noticed something odd about his copy of a common logarithm table. The front pages were more worn than the back ones. Since the early pages list numbers that begin with 1 and the later pages numbers that begin with 8 or 9, the wear pattern meant the numbers Newcomb and his colleagues actually computed with did not start with all digits equally. Most started small. Newcomb published a two-page note proposing that the probability of a leading digit d is log(1+d) - log(d), and then was ignored for half a century.

The idea resurfaced in 1938 when Frank Benford, a physicist at General Electric's research lab, collected the first digits of 20,229 numbers from wildly different sources: river areas and lengths, readership figures, physical constants, death rates, atomic weights, specific heats. All slumped toward the low digits in the same logarithmic shape. Benford called it the Law of Anomalous Numbers, and despite Newcomb's priority, the phenomenon took Benford's name. A 2026 citation analysis of the two original papers traces how Newcomb (1881) fell out of the literature almost completely after the eponym was formalized in the 1970s.

The exact rule, in base 10, is P(d) = log10(1 + 1/d). That gives 1 as the leading digit 30.1 percent of the time, 2 at 17.6 percent, and it tails off to 9 at just 4.6 percent. If digits were uniform, every one would sit at 11.1 percent. Real data is not uniform.

Nine bars descending in height from left to right on a cream background, with a magnifying glass hovering over the tallest bar

Why 1 wins

The law is not magic; it is a consequence of how magnitudes, rather than values, spread out. In 1995 the statistician Theodore Hill proved the cleanest version of the argument: base-invariance implies Benford's law. If a dataset's leading-digit distribution stays the same whether you count in base 10, base 8 or base 16, Benford's distribution is the only one that can survive the change of base. Scale-invariance points the same way. Measure rivers in miles or furlongs and the leading digits hold; measure adult heights in feet or meters and they do not, because nobody is four meters tall while plenty of people are four or five feet. The distribution that resists unit changes is Benford's.

Intuitively, the law favors datasets that span many orders of magnitude and where a number has to pass through 1x, 2x, ... 9x of every power of ten on its way up, spending proportionally more time (in log terms) in the 1-to-2 band than in the 9-to-10 band. Multiplicative processes, prices that compound, populations that grow, measurements that vary by orders of magnitude, all produce this. Datasets bounded to a narrow range, like roulette wheel numbers, IQ scores or assigned identifiers such as phone numbers, break the law, and the recent proofs literature is explicit that non-conformity over a narrow interval is expected, not suspicious.

The fraud hunter

That "expected, not suspicious" caveat matters, because the law's main career has been as a lie detector. The logic is simple. When people invent numbers, they spread first digits far too evenly, because uniform feels random to a human. A fabricated expense report or doctored dataset tends to overuse 7s, 8s and 9s relative to Benford's decay, and a forensic accountant can see the deviation without knowing anything about the underlying transactions. Hal Varian, later chief economist at Google, wrote a 2008 survey of this use in tax screening; an MIT finance paper from the same year catalogs the IRS interest. The behavioral premise has been tested directly. Asked to invent random numbers, people miss Benford badly, which is the whole basis of the fraud test. But Bruce Burns' 2020 CogSci analysis shows the picture is subtler: when people estimate meaningful quantities (river lengths, national debt, newspaper circulation) rather than conjure random digits, their first digits are distorted toward Benford's law with sizable effect sizes (up to about half the variance explained). Fabricated-but-plausible numbers can therefore partially mimic the real distribution. The honest conclusion, echoed throughout the forensic literature: deviation raises a flag, fit does not certify innocence, and the test is a screening tool, not a verdict.

Modern applications include finance forensics. A 2020 study by Timothy Peterson applied leading-digit tests to Bitcoin's daily closing prices from 2010 through 2020 and concluded, with statistical confidence the author put near certainty, that the price series had been manipulated in identifiable windows. Follow-on work tested trading volumes of individual coins and flagged schemes like Bitconnect while clearing assets whose aggregates behave normally. The method's honest framing is the same as always: deviation raises questions, it does not answer them, and tight-range data (precinct-level election returns being the most politically abused example) does not meet the law's conditions at all.

The model angle

Here is where the 1938 curve meets the 2020s stack. Three lines of recent research tie Benford's law directly to language models.

First, generation bias. A 2025 paper by Jiandong Shao and colleagues, "Benford's Curse," checked the OLMo-Mix pretraining corpus and found its numbers follow Benford's law closely, as web text does. Then the authors built a seven-task math benchmark whose correct answers are, by construction, uniformly distributed across digits, and ran six open-source models from the Llama, Qwen, Mistral and Gemma families. Every one overgenerated small digits (Mistral-7B emitted 1 as a leading answer digit more than 12 percent of the time despite a uniform target). Worse, the first digit where a wrong answer diverged from the truth showed an even stronger Benford-like skew, meaning the model drifts toward small numbers precisely when it is hallucinating. Using logit-lens tracing they localized the bias to a small subset of digit-selective neurons in deeper-layer feed-forward blocks; pruning fewer than 0.01 percent of the network's neurons shifted a measurable share of wrong answers to right ones. The claim is causal: corpus digit statistics propagate into symbolic failure modes.

Second, weights themselves. A 2026 paper by Arthur Negrao and colleagues, "Benford's Law as a Distributional Prior for Post-Training Quantization," surveyed transformer tensors and found a functional dichotomy: ordinary linear-layer weights in attention and feed-forward blocks are Benford-like, spanning scales the way natural data does, while LayerNorm parameters systematically violate the law by clustering near a single learned scalar. The authors used the finding practically, replacing the uniform quantization grid with a log-spaced one ("BenQ") for the Benford-like layers. In 4-bit group-wise quantization it beat uniform round-to-nearest consistently and traded wins with the NormalFloat grids popularized by QLoRA, while being simpler than optimization-based methods like GPTQ.

Third, detection. A 2022 paper by Leo Hsu and Visar Berisha asked whether human speech follows Benford's law and found that magnitude spectra of speech do, on average across speakers, with per-sample variability. The authors turned the deviation statistics into a feature set ("BenS") that helps separate human from synthetic speech, reaching roughly 90 percent correct classification in their best results, positioning a 134-year-old digit law as one more weak signal in the audio deepfake arms race.

An organic teal waveform above a mechanical orange square wave on a cream background, with a magnifying glass over the right side of both signals

What to take from it

Benford's law is a good corrective in both directions. Against the "numbers are neutral" intuition: the magnitudes in natural data follow a fixed logarithmic shape, and models trained on that data inherit the shape, down to specific neurons. Against the "anomaly means fraud" reflex: the law has conditions, and most apparent violations are ranges that are too narrow or processes that are genuinely additive. For LLM practitioners the practical reads are concrete. If a model's numeric output keeps starting with small digits, that is learned corpus statistics, not reasoning, and the Benford's Curse neuron evidence suggests it is baked into the weights rather than the prompting. If you are quantizing weights, the value distribution you are fighting is log-shaped, which is why non-uniform codebooks keep winning. And if you are auditing generated corpora, a leading-digit histogram is a ten-line sanity check that your synthetic data has not quietly stopped resembling the real thing.

The worn pages of a log table turned out to be a load-bearing fact about how numbers occur in the world, and now about how they occur in the models that read the world's numbers.

Sources

AILLMeducational