Latest Experiments (2025-12-06)
Experiment 062: p-Adic vs L2 Base Sweep
- Setup: dims {2,3}, primes {2,5,11}, bases {1.1,1.5,2,5}, seeds 0–11 (288 datasets).
- Outcome: L2 inversions = 1; p-adic inversions = 4 (all in 2D). 3D stayed monotone for both penalties.
- Near-binary surprise: r=1.1 produced a p-adic-only inversion (p=2, seed=5); heavy base r=5.0 also triggered p-adic-only inversions at p=2 and p=5.
- Example dataset (p=2, base=1.1, seed=5): k-paths L2 [3,3,3,2,1] vs p-adic [3,2,3,2,1] on X=[[3,-1],[-4,4],[-3,5],[-1,0],[1,2],[1,-3]], y=[-4,-8,-2,9,6,-7].
Experiment 048: Two-Regime Classifier
- Setup: Random family (n = d+3) and axis-duplication family (aligned/misaligned, n=10) across dims {2,3,4}; primes {2,5,11}; bases {1.5,2,5}; seeds=4.
- Heuristics: k_horiz > k_lambda0, duplication (y>=3 or axis>=5), and a k_lambda0/n splitter that chooses duplication when k_ratio ≥ t else k_horiz.
- Outcome: k_horiz never triggered (0 recall). Best splitter t=0.35 matched duplication precision≈0.148 but with lower recall (0.909 vs 0.970); no improvement over duplication alone.
- Inversions: 33 total (30 axis-dup, 3 random); k_ratio clustered ~0.7 for both families, so it is not a useful regime detector.
Experiment 035: 4D Base-Density Resample
- Setup: d=4, n ∈ {7,8,10}, primes {2,5,11}, bases {1.05,1.3,1.5,2,5,10}, seeds=6.
- Near-binary r=1.05 remained inversion-free across all configs.
- Dense n=10: p=5/11 flip in 1–2/6 runs once r≥1.5 (g_hat ≈1.67 for p=5; ≈3.67 with a bump to 7.33 at r=5 for p=11); p=2 stays zero.
- Baseline n=8: only p=2 inverts sparsely at r≥1.5 (g_hat ≈0.89); p≥5 invert only at r≥5 with low rates (1/6) and stay flat.
- Sparse n=7: small-prime inversions rise at r=5 (p=2 g_hat ≈2.33; p=5 hits 1/6 at r≥5); p=11 remains inversion-free.
Experiment 034: 4D Density Probe
- d=4 with n ∈ {7,8,10}, primes {2,5,11}, bases {1.05,1.5,2,5,10,15}, seeds=4.
- n=8 stayed inversion-free; near-binary bases remain immune.
- Dense n=10 flips for p=5 at r≥2 and p=11 at r≥1.5 (g_hat ≈2.5–5.5) with little base dependence once inversions appear.
- Sparse n=7 saw a single p=2 inversion at r=5 (g_hat ≈1.75); needed more seeds for stability.
Experiment 025: Base-Factor Curve
- Dense base grid r ∈ {1.01…10} across primes {2,5,11,17} and inversion-prone 1D/2D configs.
- Near-binary bases (r ≤ 1.1) gave 0/560 inversions; g(r) ramps gently to ≈0.1 by r≈2, jumps to ≈0.30 at r=3 and ≈0.327 at r=5.
- Heavy-base bump: r=10 raises g_hat to ≈0.417; prime scaling c(r, p) ≈ g(r)/p still holds (p≥11 invert only for r ≥ 3).
Experiment 021: Prime-Weighted Excess Scaling
- Tested P(inv) ≈ c(p) × excess_points with r = p across dims 1–3 and multiple n.
- Aggregated c_hat_global shrinks with prime: p=2/3 → 0.081, p=5 → 0.070, p=7 → 0.065, p=11 → 0.032.
- The prior 0.10 coefficient over-predicts inversions; largest gaps occur in 1D n=7 and 2D n=6 configs.
Experiment 020: Prime Sensitivity of Inversions
- Inversion probability drops with prime when r=p: p=2/3 → 5.25%, p=5 → 4.50%, p=7 → 3.75%, p=11 → 2.50% (400 runs/prime).
- Most inversions occur in 1D n=7 and 2D n=6; 3D is nearly inversion-free.
Experiment 018 (rerun): Base Sensitivity of Inversions
- r ∈ {1.02, 1.1} → 0/410 inversions (suppressed near binary).
- r ∈ {1.5, 2, 3, 5, 10} → aggregated 3.9–7.8% inversions.
- 1D inversion rates now non-zero: n=5 → 2.5–5.0%; n=6 → 2.5–8.8%; n=7 → 7.5–17.5%.
Experiment 019: 1D Non-Monotonicity Audit
- 1D only; bases r ∈ {1.5, 2, 3, 5, 10}; 80 seeds for n ∈ {5,6,7}.
- Result: 0 cases of non-monotonicity without a Pareto inversion once reg_penalty is tracked.
- Confirms Pareto inversions fully explain k increases in 1D.
Experiment 001: Regularisation Thresholds in 1D
Date: 2025-12-01
Status: Completed
Objective
Understand how the number of exactly-fitted points changes with regularisation strength in 1-dimensional p-adic linear regression.
Method
- Implemented exhaustive search over candidate slopes and intercepts
- Tested with p=2 and various λ values from 0 to 1000
- Used both real L2 and p-adic regularisation
Results
| λ | Intercept | Slope | Exact Fits | Data Loss |
|---|---|---|---|---|
| 0.000 | 0.0 | 2.0 | 2 | 2.00 |
| 0.001 | 1.0 | 1.0 | 2 | 2.00 |
| 0.100 | 1.0 | 1.0 | 2 | 2.00 |
| 0.500 | 3.0 | 0.0 | 1 | 2.25 |
| 1.000 | 3.0 | 0.0 | 1 | 2.25 |
| 10.00 | 3.0 | 0.0 | 1 | 2.25 |
Threshold Detection
For dataset {(0,1), (1,2), (2,4), (4,5)}:
Threshold between λ=1.2 and λ=1.3:
3 exact fits → 1 exact fit
Conclusions
- Phase transitions exist at specific λ values
- The transition is discrete, not continuous
- Different regularisation types give different optimal solutions
Experiment 002: Monotonicity and Threshold Analysis
Date: 2025-12-02
Status: Completed
Objective
Test whether k(λ) is monotonically non-increasing and derive analytical formula for threshold values.
Results
- Monotonicity: 30/30 random 1D datasets show monotonic k(λ)
- Threshold Formula: λ* = (L₂ - L₁) / (b₁² - b₂²)
- Validation: Formula correctly predicts λ* = 1.25 for test dataset
Conclusions
H6 (monotonicity) is strongly supported. Threshold locations can be computed analytically from data loss and coefficient values of competing solutions.
Experiment 003: 2D Regression (Fitting Planes)
Date: 2025-12-02
Status: Completed
Objective
Test whether n+1 theorem and monotonicity generalize to 2D regression (fitting planes z = a + bx₁ + cx₂ to 3D points).
Results
| Metric | 1D (Lines) | 2D (Planes) |
|---|---|---|
| n+1 theorem at λ=0 | Validated | Validated (k(0) ≥ 3) |
| Monotonicity | 30/30 | 15/15 |
| Typical thresholds | 1 | 1-2 |
Example
Dataset: 5 points in 3D
λ=0.00: z = 1 + 0.5x₁ + 1.5x₂ fits 4 points
λ=0.50: z = 2 + x₁ fits 3 points
λ=2.00: z = 5 fits 1 point
Conclusions
H8 (higher-dimensional generalization) is validated. The theory extends naturally from 1D to 2D.
Experiment 004: Prime Dependence
Date: 2025-12-02
Status: Completed
Objective
Investigate how the choice of prime p affects threshold structure.
Results
| Prime p | k(0) | Number of Thresholds | Threshold Locations |
|---|---|---|---|
| 2 | 3 | 1 | λ ≈ 1.25 |
| 3 | 3 | 2 | λ ≈ 0.45, 3.95 |
| 5 | 3 | 2 | λ ≈ 1.35, 3.95 |
| 7 | 3 | 2 | λ ≈ 1.35, 3.95 |
Conclusions
The optimization landscape is prime-dependent. Different primes can lead to different numbers of thresholds and different phase transition points.
Experiment 005: Alternative Base Values (r-sweep)
Date: 2025-12-02
Status: Completed
Objective
Test r-v(t) for r ∈ {1.02, 1.05, 1.1, 1.5, 2, 3, 5, 10} to understand interpolation between binary (r→1) and minimax (r→∞) behavior.
Results
- Monotonicity persists: k(λ) stayed monotone for all tested r
- Near-binary r≈1: Preserves two thresholds (3→2→1)
- Large r: Collapses to single threshold, λ* shifts downward
- Trend: λ* drops from ~1.33 at r=1.02 to ~1.01 at r=10
Experiment 006: Exact Threshold Solver
Date: 2025-12-02
Status: Completed
Objective
Compute thresholds analytically (no λ sweep) by intersecting loss lines.
Results
- Method works: Exact thresholds from L(λ) = data_loss + λb²
- Validation: Matches numerical sweeps exactly
- Advantage: No discretization error, handles r-dependence exactly
Experiment 007: Asymptotic Threshold Formula (MAJOR)
Date: 2025-12-02 (Evening)
Status: Completed
Objective
Derive and validate exact closed-form formula for threshold dependence on r.
Results
- Formula: λ* = (L₂ - L₁) / (b₁² - b₂²) where L = Σᵢ r-vp(resi)
- Expansion: λ* = c₀ + c₁/r + c₂/r² + ... (exact)
- Validation: 100% match for r = 1.5, 2, 3, 5, 10, 100, 1000
Examples
canonical_threshold: λ* = 1 + 1/r²
r=2 → 1.25, r=5 → 1.04, r=10 → 1.01 (all exact)
gentle_line: λ* = 1 + 1/r
r=2 → 1.5, r=5 → 1.2, r=10 → 1.1 (all exact)
Conclusions
Major finding: Threshold behavior is entirely determined by p-adic valuations of residuals. The formula is exact, not an approximation.
Planned Experiments
Experiment 008: 2D Exact Threshold Solver
Extend the exact solver to 2D (planes) to test formula generalization.
Experiment 009: p-Adic Regularisation
Systematic comparison of p-adic |β|p vs real L2 regularisation.
Experiment 010: Higher Dimensions (n=3,4,5)
Test n+1 theorem and monotonicity in n=3,4,5 dimensions.
Code Repository
All experiment code is available in the experiments/ directory:
exp001_regularization_threshold.py- Initial threshold detectionexp002_monotonicity_and_thresholds.py- Monotonicity validationexp003_2d_regression.py- 2D plane fittingexp004_prime_dependence.py- Prime comparison studyexp005_r_base_valuation.py- Alternative base sweepexp006_exact_thresholds.py- Exact analytic solverexp007_asymptotic_threshold.py- Asymptotic formula validationexp018_base_inversion_sensitivity.py- Base sensitivity (updated counts)exp019_1d_nonmonotonic_audit.py- 1D audit of non-monotonic casesexp020_prime_inversion_sensitivity.py- Prime dependence of Pareto inversions (r = p)
Core library: src/padic.py - p-adic arithmetic, regression, and 2D fitting