We study the Collatz total stopping time τ(n) over n≤107 from a probabilistic machine learning viewpoint. Empirically, τ(n) is a skewed and heavily overdispersed count with pronounced arithmetic heterogeneity. We develop two complementary models. First, a Bayesian hierarchical Negative Binomial regression (NB2-GLM) predicts τ(n) from simple covariates (logn and residue class nmod8), quantifying uncertainty via posterior and posterior predictive distributions. Second, we propose a mechanistic generative approximation based on the odd-block decomposition: for odd m, write 3m+1=2K(m)m′ with m′ odd and K(m)=v2(3m+1)≥1; randomizing these block lengths yields a stochastic approximation calibrated via a Dirichlet-multinomial update. On held-out data, the NB2-GLM achieves substantially higher predictive likelihood than the odd-block generators. Conditioning the block-length distribution on mmod8 markedly improves the generator's distributional fit, indicating that low-order modular structure is a key driver of heterogeneity in τ(n).
Figures & tables
Figure 1: Empirical distribution of τ(n) for 1≤n≤N (integer-aligned bins, width 2) with a KDE overlay computed on a large subsample to reduce noise. This motivates an overdispersed count likelihood.
Statistic
Value
N
10,000,000
τmin
0
τmax
685
E[τ]
155.272
Var(τ)
3814.045
Var(τ)/E[τ]
24.564
Table 1: Summary statistics for τ(n) over 1≤n≤N .
Figure 2: Scatter of τ(n) vs. n (log- x ). The mean increases slowly and is approximately linear as a function of logn , while the spread grows with n ; banding suggests modular structure, motivating logn and nmod8 as covariates.
Figure 3: Posterior predictive check for the hierarchical NB2-GLM (Model M3). The PPC matches the bulk well and mildly overestimates extreme right-tail mass.
Figure 4: Empirical block-length distribution p^k for K=v2(3m+1) (odd m≤N ) vs. geometric reference 2−k on log- y . This evaluates the “geometric K ” heuristic.
Figure 5: Dirichlet posterior for (pk) (log scale) with uncertainty bars, compared to the geometric reference 2−k .
Figure 6: Posterior mean of pk conditional on the odd residue class mmod8 (heatmap). This reveals systematic arithmetic dependence beyond an i.i.d. geometric law.
Figure 7: PPC overlay: empirical τ vs. G1 (geometric 2−k ), G2 (global calibrated pk ), and G3 ( pk conditional on mmod8 ). Conditioning reduces the bias in the mean and improves distributional agreement in the bulk.
Model
Log score (higher better)
W1 distance (lower better)
NB2-GLM (M3)
−272911.95
3.199
Odd-block G2 (global pk )
−1165983.43
17.594
Odd-block G3 ( pk∣mmod8 )
−1079086.65
5.434
Table 2: Quantitative comparison on held-out data using a proper log predictive score and a distributional distance. All scores are computed on Ntest=50,000 held-out pairs, with the generative log scores estimated via SMC=40 Monte Carlo replicates per test point.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Example trajectory in log scale for n=27 : deterministic Collatz vs. stochastic odd-block approximation.
We present a comprehensive structural analysis of the Collatz conjecture through ~1014 computational experiments yielding 630 formal results. By systematically deploying 29 distinct mathematical paradigms--including transfer operator spectral theory, S-unit equations, p-adic interpolation, martingale methods, modular sieving, formal language theory, cascade algebra, discrete logarithm obstruction, and Diophantine approximation--we establish a Paradigm Exhaustion Theorem: every known framework for promoting distributional convergence ("almost all orbits descend") to pointwise convergence ("all orbits descend") encounters an irreducible structural obstruction when applied to the Syracuse map. On the unconditional side, we prove: (i) the Syracuse transfer operator has a uniform spectral gap for all M, implying equidistribution modulo any power of 2; (ii) any nontrivial cycle of length L satisfies D > 2^F for all L >= 3, giving ord_D(2) > F and F+1 distinct residues mod D; (iii) divergent starting points have natural density 0 and Hausdorff dimension ~0.68; (iv) the formal language of divergent-compatible v-sequences is not context-free; (v) cylinder-averaged density-1 convergence is proved unconditionally via spectral contraction on the invariant core I_2; (vi) a discrete logarithm triple filter achieves 100% cycle blockage for all L tested. We identify the Distributional-to-Pointwise Gap as the irreducible core and prove it equivalent to the divergence component. The modular sieve is permanently nonempty via the Mersenne Bypass. The present work is not a proof of the Collatz conjecture; it characterizes why the conjecture resists proof. The 29-paradigm exhaustion constitutes the most comprehensive structural survey of Collatz attack surfaces to date. Produced through human-LLM collaboration; see Section 12.
Edward Y. Chang
Computer Science, Stanford University · QuadriumAI
Grokking in transformers trained on algorithmic tasks is characterized by a long delay between training-set fit and abrupt generalization, but the source of that delay remains poorly understood. In encoder-decoder arithmetic models, we argue that this delay reflects limited access to already learned structure rather than failure to acquire that structure in the first place. We study one-step Collatz prediction and find that the encoder organizes parity and residue structure within the first few thousand training steps, while output accuracy remains near chance for tens of thousands more. Causal interventions support the decoder bottleneck hypothesis. Transplanting a trained encoder into a fresh model accelerates grokking by 2.75 times, while transplanting a trained decoder actively hurts. Freezing a converged encoder and retraining only the decoder eliminates the plateau entirely and yields 97.6% accuracy, compared to 86.1% for joint training. What makes the decoder's job harder or easier depends on numeral representation. Across 15 bases, those whose factorization aligns with the Collatz map's arithmetic (e.g., base 24) reach 99.8% accuracy, while binary fails completely because its representations collapse and never recover. The choice of base acts as an inductive bias that controls how much local digit structure the decoder can exploit, producing large differences in learnability from the same underlying task.
Exact stochastic equations for non-equilibrium dynamics are rarely accessible. We show that the long-time evolution of stochastic dynamics can be predicted from configuration pairs at a fixed short time lag, without knowledge of the equation of motion. Generative diffusion models learn the finite-time transition kernel from these pairs, and iterating it propagates the dynamics far beyond the training lag. For two-dimensional Model B, the diffusive dynamics of a conserved order parameter, the learned kernels reproduce dynamic critical scaling and self-similar t1/3 coarsening. Agreement with direct simulations persists on lattices twice the largest training size and for initial ensembles absent from training. For driven colloids in a periodic optical potential, ten minutes of measured trajectories suffice to predict the particle current and mean passage time over the next twenty minutes within experimental uncertainty. Short-time observations thus contain the information needed to predict emergent non-equilibrium dynamics at much longer times.
Yang-yang Tan, Jinyang Li, Lingxiao Wang
Institute for Physics of Intelligence, Graduate School of Science, The University of Tokyo, Bunkyo-ku, Tokyo 113-0033, Japan · RIKEN Center for Interdisciplinary Theoretical and Mathematical Sciences (iTHEMS), Wako, Saitama 351-0198, Japan · KEK Theory Center, Institute of Particle and Nuclear Studies +1