Download PiDataScience_ReadMe.md from MartialTerran/DataScience: direct link, hf CLI and curl.
- Browser
- Download file 10.6 kB
-
https://huggingface.co/datasets/MartialTerran/DataScience/resolve/main/PiDataScience_ReadMe.md
- Command line
-
hf download hf://datasets/MartialTerran/DataScience/PiDataScience_ReadMe.md
-
curl -L -o PiDataScience_ReadMe.md https://huggingface.co/datasets/MartialTerran/DataScience/resolve/main/PiDataScience_ReadMe.md
PiDataScience: Auditing Substring Collisions, Ergodic Entropy, and Neural Storage Capacity in Transcendental Sequences
1. Executive Summary & Epistemological Purpose
In natural language processing, evaluating whether large language models (LLMs) are genuinely reasoning or merely stochastically memorizing is notoriously difficult. Natural language possesses syntactic grammar, semantic hierarchies, and high structural redundancy. These features allow models to interpolate between training points via fuzzy statistical heuristics.
The number $\pi$ provides a rigorous, zero-leakage benchmark for sequence modeling.
Because $\pi$ is an irrational, transcendental number conjectured to be Borel normal, its digit representation exhibits:
- Zero Grammatical Redundancy: No local parts-of-speech, token clusters, or phrase patterns exist.
- Maximal Conditional Entropy: The mutual information between adjacent digits is empirically zero: $$I(X_t; X_{t+1}) = 0$$
- Low Kolmogorov Complexity: A compact deterministic algorithm (such as the BBP or Chudnovsky formula) generates the infinite sequence.
- Extreme Logical Depth: Deducing output digits requires substantial computation (e.g., modular exponentiation), resisting linear shortcuts.
When a Transformer models sequences of $\pi$, there is no middle ground: it must either discover the underlying mathematical formula or construct an exact tabular associative memory.
2. Mathematical Analysis of the Empirical Repetition Logs
The telemetry below reflects an automated search running PiDataScience_V1.0.py on an expanding hexadecimal horizon:
========================================================================================
[EXPANSION] Certain lengths have NO repeats in N=64000. Doubling horizon to N=128000...
>>> Generating 128000 hex digits of Pi via Chudnovsky...
>>> Generated 128000 digits in 1.74s. Scanning lengths 4..64...
Length 08: [NO ] No collision detected in current window.
Length 09: [NO ] No collision detected in current window.
[EXPANSION] Certain lengths have NO repeats in N=128000. Doubling horizon to N=256000...
>>> Generating 256000 hex digits of Pi via Chudnovsky...
>>> Generated 256000 digits in 2.28s. Scanning lengths 4..64...
Length 08: [YES] Count: 6 | First: 'A0C8493A' @ [67098 -> 159033]
Length 09: [NO ] No collision detected in current window.
[EXPANSION] Certain lengths have NO repeats in N=256000. Doubling horizon to N=512000...
>>> Generating 512000 hex digits of Pi via Chudnovsky...
>>> Generated 512000 digits in 8.33s. Scanning lengths 4..64...
Length 09: [YES] Count: 1 | First: '5270BD1DD' @ [274197 -> 275562]
Length 10: [NO ] No collision detected in current window.
[EXPANSION] Certain lengths have NO repeats in N=512000. Doubling horizon to N=1024000...
>>> Generating 1024000 hex digits of Pi via Chudnovsky...
>>> Generated 1024000 digits in 25.70s. Scanning lengths 4..64...
Length 10: [NO ] No collision detected in current window.
Length 11: [NO ] No collision detected in current window.
Length 12: [NO ] No collision detected in current window.
Length 13: [NO ] No collision detected in current window.
Length 14: [NO ] No collision detected in current window.
Length 15: [NO ] No collision detected in current window.
========================================================================================
2.1 The Birthday Paradox & Analytic Expectations
For an alphabet of size $B = 16$, the number of possible distinct strings of length $L$ is $16^L$.
In a stream of $N$ digits, there are approximately $N$ overlapping substrings. Under the assumption that $\pi$ behaves as an ideal pseudorandom oracle, the expected number of duplicate pairs $\mathbb{E}[C]$ is governed by the Birthday Bound:
The 50% probability threshold for observing at least one collision occurs at:
Applying this to each transition point in the run demonstrates close agreement with theory:
| Length ($L$) | Combinatorial Space ($16^L$) | Expected $N_{50%}$ | Experimental Observation in Colab | Theoretical Analysis |
|---|---|---|---|---|
| $L = 8$ | $16^8 \approx 4.295 \times 10^9$ | $\approx 77,100$ | First seen at $N = 256,000$'A0C8493A' (Count: 6) |
At $N=128\text{k}$, $\mathbb{E}[C] \approx 1.9$ (unlucky draw). At $N=256\text{k}$, $\mathbb{E}[C] \approx 7.6$. The script found exactly 6, closely matching expectation. |
| $L = 9$ | $16^9 \approx 6.872 \times 10^{10}$ | $\approx 308,600$ | First seen at $N = 512,000$'5270BD1DD' (Count: 1) |
At $N=256\text{k}$, $P(\text{collision}) \approx 37%$ ([NO]). At $N=512\text{k}$, $P(\text{collision}) \approx 85%$ ([YES]), locating its first collision at indices $274,197 \to 275,562$. |
| $L = 10$ | $16^{10} \approx 1.099 \times 10^{12}$ | $\approx 1,234,000$ | [NO] at $N = 1,024,000$ |
At $N = 1,024,000$, $N < N_{50%}$. The expected collision count is $\mathbb{E}[C] \approx 0.47$. Remaining [NO] at $1\text{M}$ is mathematically normal. |
| $L = 16$ | $16^{16} \approx 1.845 \times 10^{19}$ | $\approx 5,060,000,000$ | [NO] across all windows |
A 16-hex repeat requires searching $\sim 5$ billion digits of $\pi$. |
3. Machine Learning Significance: Why These Findings Matter
3.1 Proving the "Collision-Free Hash Key" Reality
In early Transformer experiments (such as PiComputer_GPT2), small models trained on 16-digit prefixes ($A=16$) to predict 8-digit targets ($S=8$) within offsets $[0, 2000]$ quickly achieved $>95%$ training accuracy.
The empirical data gathered by PiDataScience supplies a key mathematical conclusion:
- Even across $1,024,000$ continuous digits, there is not a single repeat of length 10, let alone length 16.
- Across the interval $[0, 2000]$, the probability of two 16-digit prefixes colliding is: $$P(\text{collision}) \approx \frac{(2000)^2}{2 \times 16^{16}} \approx \frac{4 \times 10^6}{3.69 \times 10^{19}} \approx 1.08 \times 10^{-13}$$
Conclusion: Every 16-digit prefix seen by a model in that interval is strictly unique across the entire history of the training universe. The Transformer did not learn the transcendental calculation of $\pi$; it formed an exact associative key-value store, mapping each collision-free 16-digit hash key to its memorized continuation.
PREFIX INPUT (16 Hex Digits) TARGET (8 Hex Digits)
[ A0 C8 49 3A ... 5F ] ──────── (Transformer) ────────► [ D5 B5 B5 47 ]
│ ▲
│ │
▼ │
100% Unique Collision-Free Key Retrieved from Weights
(Equivalent to SHA-256 slice) (Associative Lookup)
3.2 Measuring Storage Capacity in Karpathy / Sutskever Units
Because the input tokens serve as orthogonal dictionary keys, $\pi$ sequences provide a benchmark for calculating empirical neural storage density:
- For Base 16, each token carries $\log_2(16) = 4$ bits of information.
- Because $\pi$ cannot be compressed by linguistic heuristics (such as grammar, common words, or semantic templates), every bit of cross-entropy reduction represents raw stored information.
- Testing networks against $\pi$ provides an objective metric for evaluating how different positional encodings (RoPE vs. Sinusoidal vs. Learned) alter a Transformer's capacity to bind key-value pairs per unit of parameter budget.
3.3 The Generalization Test: Algorithmic Learning vs. Tabular Memorization
To test whether an architecture is genuinely calculating $\pi$ or merely acting as a lookup table:
- The Transductive Test: If a model achieves $99%$ token accuracy over offsets $n \in [0, 2000]$, evaluate it out-of-distribution (OOD) at offsets $n = 3,000$ and $n = 4,000$.
- If the accuracy immediately reverts to the random-guessing baseline of $6.25%$ ($1/16$), the architecture is operating as an associative memory.
- A network that genuinely approximates the series expansion of $\pi$ must preserve its accuracy on unseen offsets beyond the training domain.
4. Summary of Substring Discoveries
The following table records the earliest duplicate hexadecimal substrings discovered in $\pi$ by this suite:
| Sequence Length ($L$) | First Repeated Sequence | First Index ($i_1$) | Repeat Index ($i_2$) | Span Distance ($\Delta i$) |
|---|---|---|---|---|
| 4 | 243F |
$0$ | $8,241$ | $8,241$ |
| 5 | A308D |
$10$ | $42,109$ | $42,099$ |
| 6 | 8885A3 |
$6$ | $124,980$ | $124,974$ |
| 7 | 2E03707 |
$20$ | $189,442$ | $189,422$ |
| 8 | A0C8493A |
$67,098$ | $159,033$ | $91,935$ |
| 9 | 5270BD1DD |
$274,197$ | $275,562$ | $1,365$ (Localized cluster) |
| 10 – 64 | No collisions found | $> 1,024,000$ | $> 1,024,000$ | — |
Note: Indices are 0-indexed starting immediately after the hexadecimal point ($3.\bullet$).
5. How to Reproduce
Run the self-contained extraction pipeline in Google Colab (Standard CPU runtime):
# Clone the repository and execute the standalone search script
git clone https://huggingface.co/datasets/PiDataScience/pi-repetition-audit
cd pi-repetition-audit
python PiDataScience_V1.0.py
Checkpoints (pi_datascience_checkpoint.json) are generated automatically every 30 minutes, producing synchronized reports in .txt, .md, and .html formats.