Upload folder using huggingface_hub
Browse files
reports/experiments/experiments.md
CHANGED
|
@@ -20,8 +20,8 @@
|
|
| 20 |
|
| 21 |
| Experiment Folder | Stage | Models Covered | Status | Key Highlight |
|
| 22 |
| :--- | :---: | :--- | :---: | :--- |
|
| 23 |
-
| `stage-4a-controls-and-main` | 4A | Analytical CKKS, Trivial/Linear Controls, `PolySortNet` (Shared & Stage-Adaptive) |
|
| 24 |
-
| `stage-4b-pnn-ladder-and-scaling` | 4B | `PolyPairwiseRank`, `LearnedWire`, `DeepSetsPoly`, `PiNet`, `PolyMLP`, $n=4..128$ |
|
| 25 |
| `stage-4c-baselines-and-controls` | 4C | `ShuffledTarget`, `DiffSort` (Logistic/Cauchy), `ReLU-MLP`, `SetTransformer` | Pending | β |
|
| 26 |
| `stage-4d-ablations` | 4D | 6 Causal Ablation Families (A1βA6) | Pending | β |
|
| 27 |
| `stage-4e-multiseed-and-sensitivity` | 4E | 5-Seed Statistical Rigor (100 runs) + Hyperparam & Float64 Sweeps | Pending | β |
|
|
|
|
| 20 |
|
| 21 |
| Experiment Folder | Stage | Models Covered | Status | Key Highlight |
|
| 22 |
| :--- | :---: | :--- | :---: | :--- |
|
| 23 |
+
| `stage-4a-controls-and-main` | 4A | Analytical CKKS, Trivial/Linear Controls, `PolySortNet` (Shared & Stage-Adaptive) | **Done** | 6-param `polysort_shared_m2` gets `0.0079` MAE ($n=8$), `0.0200` MAE zero-shot at $n=128$ ($\tau=0.998$); 36-param `adaptive_m2` gets `0.0072` MAE ($n=8$), `0.0097` ($n=16$) β beating Cheon $f_3\circ g_3$ by $3.85\times$! |
|
| 24 |
+
| `stage-4b-pnn-ladder-and-scaling` | 4B | `PolyPairwiseRank`, `LearnedWire`, `DeepSetsPoly`, `PiNet`, `PolyMLP`, $n=4..128$ | In Progress | β |
|
| 25 |
| `stage-4c-baselines-and-controls` | 4C | `ShuffledTarget`, `DiffSort` (Logistic/Cauchy), `ReLU-MLP`, `SetTransformer` | Pending | β |
|
| 26 |
| `stage-4d-ablations` | 4D | 6 Causal Ablation Families (A1βA6) | Pending | β |
|
| 27 |
| `stage-4e-multiseed-and-sensitivity` | 4E | 5-Seed Statistical Rigor (100 runs) + Hyperparam & Float64 Sweeps | Pending | β |
|
reports/experiments/learnings.md
CHANGED
|
@@ -40,3 +40,17 @@ This living log documents every key insight gained from the literature review, m
|
|
| 40 |
- *Root Cause:* When $\delta$ is set too aggressively for composition depth $L = 3$, the minimax equioscillation amplitude $\tau_L$ pushes $|s(\Delta)|$ up to $1 + \tau_L \approx 1.53$, allowing wire values to escape $[-1, 1]$ and cascade exponentially across sorting stages! Conversely, scaling the final stage by $1/(1+\tau_L)$ keeps wires bounded but shrinks every swap by $(1+\tau_L)^{-1}$ per stage, compounding to $(1+\tau_L)^{-\ell}$ attenuation.
|
| 41 |
- *Fix:* Implemented **Lee et al. (2022) Algorithm 2** via exact **HiGHS convex linear programming** (`scipy.optimize.linprog`), rescaling intermediate stages $1 \dots L-1$ by $1/\text{peak}$ into $[\alpha_k, 1]$ while centering stage $L$ at $1.0$ with depth-matched $\delta$ ($\delta=0.10$ for $L=3, m=1 \Rightarrow \text{MAE} \approx 0.044$, $2.6\times$ better than Cheon $f_1^{(3)}$; $\delta=0.03$ for $L=3, m=2$).
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
- *Root Cause:* When $\delta$ is set too aggressively for composition depth $L = 3$, the minimax equioscillation amplitude $\tau_L$ pushes $|s(\Delta)|$ up to $1 + \tau_L \approx 1.53$, allowing wire values to escape $[-1, 1]$ and cascade exponentially across sorting stages! Conversely, scaling the final stage by $1/(1+\tau_L)$ keeps wires bounded but shrinks every swap by $(1+\tau_L)^{-1}$ per stage, compounding to $(1+\tau_L)^{-\ell}$ attenuation.
|
| 41 |
- *Fix:* Implemented **Lee et al. (2022) Algorithm 2** via exact **HiGHS convex linear programming** (`scipy.optimize.linprog`), rescaling intermediate stages $1 \dots L-1$ by $1/\text{peak}$ into $[\alpha_k, 1]$ while centering stage $L$ at $1.0$ with depth-matched $\delta$ ($\delta=0.10$ for $L=3, m=1 \Rightarrow \text{MAE} \approx 0.044$, $2.6\times$ better than Cheon $f_1^{(3)}$; $\delta=0.03$ for $L=3, m=2$).
|
| 42 |
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## Learnings from Stage 4A Execution & GPU Profiling
|
| 46 |
+
|
| 47 |
+
7. **Bug Fixed in `R_stable` Upper Stability Radius Calculation:**
|
| 48 |
+
- *Issue:* During Stage 4A controls, `ana_cheon_fg_n8` achieved `MAE = 0.0279` at $s = 1.0$, yet reported `R_stable = 0.0`.
|
| 49 |
+
- *Root Cause:* `SCALE_SWEEP_FACTORS` begins with `0.1, 0.5, 1.0, 1.05, ...`. At tiny shrinkage $s = 0.1$, all pairwise differences shrink by $10\times$ into the near-origin linear zone of $s(\Delta)$, making relative MAE (`MAE / 0.1`) $> 0.05$ and tripping `break` before ever evaluating $s \ge 1.0$.
|
| 50 |
+
- *Fix:* Updated `metrics.py` so `R_stable` starts at $s = 1.0$ and sweeps upward ($s \ge 1.0$), cleanly measuring the upper polynomial blow-up cliff while still logging full $s = 0.1, 0.5$ metrics in `ood`.
|
| 51 |
+
|
| 52 |
+
8. **8Γ RTX 5070 Throughput Fix (Windows WDDM Kernel-Launch Bottleneck):**
|
| 53 |
+
- *Observation:* `main_polysort_shared_n8_s42` at `batch_size=512` took `~10.5s/epoch` despite converging to `val_mae = 0.03776` by epoch 8 (99% GPU idle due to ~150 tiny CUDA kernel launches $\times$ 391 batches/epoch under Windows WDDM).
|
| 54 |
+
- *Fix:* Switched compact structured networks (`PolySortNet`, `PolyPairwiseRank`, `DiffSort`) to `batch_size=4096, lr=8e-3, epochs=50` (~49 batches/epoch, ~8Γ faster) and dense networks to `batch_size=2048, lr=2e-3, epochs=60`, while retaining `batch_size=512 vs 2048 vs 4096` explicitly in the Stage 4E sensitivity sweep to verify invariance.
|
| 55 |
+
|
| 56 |
+
|
reports/experiments/stage-4a-controls-and-main/experiment.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 4A Experiment Report: Zero-Training Controls, Analytical CKKS Sorters & Primary `PolySortNet` Models
|
| 2 |
+
|
| 3 |
+
**Date:** 2026-11-25
|
| 4 |
+
**Seed:** `42` (single-seed primary exploration; 5-seed statistical rigor in Stage 4E)
|
| 5 |
+
**Dataset:** $200{,}000$ train / $10{,}000$ val / $10{,}000$ held-out test (`Uniform[-1, 1]^n`) + 10 OOD suites ($2{,}000$ each) + zero-shot length sweep ($n \in \{4, 8, 16, 32, 64, 128\}$).
|
| 6 |
+
**Hardware:** NVIDIA GeForce RTX 5070 Laptop GPU (`torch 2.11.0+cu128`).
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## 1. Held-Out In-Distribution Results ($N_{\text{test}} = 10{,}000$)
|
| 11 |
+
|
| 12 |
+
### List Length $n = 8$ (Bitonic depth $\ell = 6$)
|
| 13 |
+
|
| 14 |
+
| Run ID | Pure Poly? | Params | Comp. Deg | MAE ($\downarrow$) | RMSE ($\downarrow$) | Mono Rate ($\uparrow$) | Pair Acc ($\uparrow$) | Kendall $\tau$ ($\uparrow$) | $R_{\text{stable}}$ |
|
| 15 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 16 |
+
| `ctrl_identity_n8` | Yes | 0 | 1 | 0.583411 | 0.764280 | 0.00% | 50.00% | -0.0001 | 0.0 |
|
| 17 |
+
| `ctrl_rand_pinet_n8` | Yes | 201,608 | 9 | 0.500190 | 0.577334 | 0.02% | 49.82% | -0.0036 | 0.0 |
|
| 18 |
+
| `ctrl_rand_polysort_n8` | Yes | 3 | 27 | 0.240399 | 0.288962 | 94.81% | 99.80% | 0.9961 | 0.0 |
|
| 19 |
+
| `ctrl_linear_n8` (OLS) | Yes | 72 | 1 | 0.134646 | 0.169388 | 99.53%* | 99.98%* | 0.9996* | 0.0 |
|
| 20 |
+
| `ana_cheon_f1_L3_n8` | Yes | 0 | 27 | 0.113616 | 0.139496 | 96.10% | 99.80% | 0.9961 | 0.0 |
|
| 21 |
+
| `ana_cheon_f2_L2_n8` | Yes | 0 | 25 | 0.107184 | 0.131642 | 96.06% | 99.80% | 0.9960 | 0.0 |
|
| 22 |
+
| `ana_remez_L3_n8` (Lee '22) | Yes | 0 | 27 | 0.053090 | 0.074156 | 71.60% | 98.41% | 0.9682 | 0.0 |
|
| 23 |
+
| `ana_remez_L3_m2_n8` | Yes | 0 | 125 | `inf` | `inf` | 85.92% | 99.18% | 0.9836 | 0.0 |
|
| 24 |
+
| `ana_cheon_fg_n8` ($f_3\circ g_3$) | Yes | 0 | 49 | 0.027881 | 0.035066 | 94.19% | 99.73% | 0.9946 | 1.1 |
|
| 25 |
+
| **`main_polysort_shared_n8`** | **Yes** | **3** | **27** | **0.037757** | **0.046529** | **90.14%** | **99.50%** | **0.9900** | **1.3** |
|
| 26 |
+
| **`main_polysort_adaptive_n8`** | **Yes** | **18** | **27** | **0.033254** | **0.041907** | **94.09%** | **99.75%** | **0.9949** | **1.3** |
|
| 27 |
+
| **`main_polysort_shared_m2_n8`** | **Yes** | **6** | **125** | **0.007941** | **0.010433** | **92.22%** | **99.67%** | **0.9935** | **1.0** |
|
| 28 |
+
| **`main_polysort_adaptive_m2_n8`** | **Yes** | **36** | **125** | **0.007241** | **0.009620** | **95.92%** | **99.83%** | **0.9967** | **1.0** |
|
| 29 |
+
|
| 30 |
+
*\*Note on `ctrl_linear`: Optimal OLS linear regression predicts $\hat{y}_k \approx \bar{x} + \mathbb{E}[x_{(k)}]$, a mean-shifted constant sorted template; it is almost always monotone yet suffers severe Value MAE (`0.1346`) because it cannot sort elements.*
|
| 31 |
+
|
| 32 |
+
### List Length $n = 16$ (Bitonic depth $\ell = 10$)
|
| 33 |
+
|
| 34 |
+
| Run ID | Pure Poly? | Params | Comp. Deg | MAE ($\downarrow$) | RMSE ($\downarrow$) | Mono Rate ($\uparrow$) | Pair Acc ($\uparrow$) | Kendall $\tau$ ($\uparrow$) | $R_{\text{stable}}$ |
|
| 35 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 36 |
+
| `ctrl_identity_n16` | Yes | 0 | 1 | 0.624327 | 0.790615 | 0.00% | 49.97% | -0.0006 | 0.0 |
|
| 37 |
+
| `ctrl_linear_n16` (OLS) | Yes | 272 | 1 | 0.098597 | 0.124860 | 99.67%* | 100.00%* | 0.9999* | 0.0 |
|
| 38 |
+
| `ana_cheon_f1_L3_n16` | Yes | 0 | 27 | 0.145679 | 0.179540 | 85.95% | 99.86% | 0.9972 | 0.0 |
|
| 39 |
+
| `ana_cheon_f2_L2_n16` | Yes | 0 | 25 | 0.136867 | 0.168912 | 86.14% | 99.86% | 0.9973 | 0.0 |
|
| 40 |
+
| `ana_remez_L3_n16` | Yes | 0 | 27 | 0.073997 | 0.114251 | 28.76% | 97.74% | 0.9549 | 0.0 |
|
| 41 |
+
| `ana_remez_L3_m2_n16` | Yes | 0 | 125 | `inf` | `inf` | 49.74% | 97.24% | 0.9447 | 0.0 |
|
| 42 |
+
| `ana_cheon_fg_n16` ($f_3\circ g_3$) | Yes | 0 | 49 | 0.037486 | 0.046753 | 86.22% | 99.83% | 0.9967 | 1.1 |
|
| 43 |
+
| **`main_polysort_shared_n16`** | **Yes** | **3** | **27** | **0.048420** | **0.059968** | **73.58%** | **99.62%** | **0.9924** | **1.3** |
|
| 44 |
+
| **`main_polysort_adaptive_n16`** | **Yes** | **30** | **27** | **0.036939** | **0.046879** | **75.81%** | **99.71%** | **0.9942** | **1.3** |
|
| 45 |
+
| **`main_polysort_shared_m2_n16`** | **Yes** | **6** | **125** | **0.011082** | **0.014053** | **72.87%** | **99.66%** | **0.9933** | **1.0** |
|
| 46 |
+
| **`main_polysort_adaptive_m2_n16`** | **Yes** | **60** | **125** | **0.009725** | **0.012558** | **82.45%** | **99.81%** | **0.9963** | **1.0** |
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
## 2. Zero-Shot List-Length Generalization ($n_{\text{train}} = 8 \to n_{\text{test}} \in \{4..128\}$)
|
| 51 |
+
|
| 52 |
+
| Model (Trained at $n=8$ Only) | $n=4$ MAE ($\tau$) | $n=8$ MAE ($\tau$) | $n=16$ MAE ($\tau$) | $n=32$ MAE ($\tau$) | $n=64$ MAE ($\tau$) | $n=128$ MAE ($\tau$) |
|
| 53 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 54 |
+
| `ana_cheon_f1_L3` (0 params) | 0.0784 (0.991) | 0.1135 (0.996) | 0.1451 (0.997) | 0.1758 (0.997) | 0.2135 (0.997) | 0.2600 (0.997) |
|
| 55 |
+
| `ana_cheon_fg` (0 params, deg 49) | 0.0168 (0.997) | 0.0280 (0.994) | 0.0378 (0.997) | 0.0445 (0.998) | 0.0487 (0.999) | 0.0514 (0.999) |
|
| 56 |
+
| `main_polysort_shared` (3 params, deg 27) | 0.0252 (0.993) | 0.0376 (0.988) | 0.0485 (0.993) | 0.0551 (0.995) | 0.0581 (0.997) | 0.0581 (0.998) |
|
| 57 |
+
| **`main_polysort_shared_m2` (6 params, deg 125)** | **0.0046 (0.996)** | **0.0080 (0.994)** | **0.0118 (0.993)** | **0.0156 (0.993)** | **0.0186 (0.996)** | **0.0200 (0.998)** |
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## 3. Exact Invariants & Negative Boundary Verification (Float64 + OOD Scale Cliff)
|
| 62 |
+
|
| 63 |
+
- **Exact Float64 Sum Conservation:** `2.1e-16` β `2.2e-16` across all `PolySortNet` variants (exact machine epsilon!).
|
| 64 |
+
- **Exact Float64 Shift Equivariance ($x + 100\mathbf{1}$):** $L_\infty$ error `6.6e-14` β `8.4e-14`.
|
| 65 |
+
- **OOD Duplicates & Near-Ties ($\delta = 10^{-3}$):** `main_polysort_adaptive_m2_n8` achieves `MAE = 0.0066` on both 50% duplicates and $10^{-3}$ near-ties (actually *lower* than uniform ID!).
|
| 66 |
+
- **Predicted Negative Result (Polynomial Scale Blow-Up Cliff β H5):** Strictly pure `PolySortNet` diverges cleanly outside its domain:
|
| 67 |
+
- Cubic ($m=1$, deg 27): stable through $s = 1.3$ ($R_{\text{stable}} = 1.3$), degrades to `MAE = 0.169` at $s = 1.5$, diverges to `inf` at $s = 2.0, 5.0$.
|
| 68 |
+
- Quintic ($m=2$, deg 125): stable at $s = 1.0$ ($R_{\text{stable}} = 1.0$), diverges to `inf` at $s = 1.5, 2.0, 5.0$.
|
reports/experiments/stage-4a-controls-and-main/learnings.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 4A Learnings: Mechanistic Analysis of Learned vs. Analytical Polynomials
|
| 2 |
+
|
| 3 |
+
**Date:** 2026-11-25
|
| 4 |
+
|
| 5 |
+
## 1. What Did Gradient Descent Actually Discover?
|
| 6 |
+
Inspecting the exact learned weights of `main_polysort_shared_n8_s42` (`[[1.4017], [0.8521], [0.7530]]`) and `main_polysort_adaptive_n8_s42` reveals two deep mechanistic phenomena:
|
| 7 |
+
|
| 8 |
+
1. **Automatic Rediscovery & Generalization of Cheon's Mixed $f \circ g$ Principle:**
|
| 9 |
+
- Analytical Cheon $f_1^{(3)}$ fixes $c_1 = c_2 = c_3 = 0.5$, yielding small-gap slope $1.5^3 = 3.375$.
|
| 10 |
+
- End-to-end training spontaneously learns a **decreasing-gain schedule** ($c_1 = 1.40 > c_2 = 0.85 > c_3 = 0.75$): Layer 1 amplifies small gaps aggressively ($h_1'(0) = 2.40$, allowing controlled intermediate overshoot like Cheon's $g_3$), while Layers 2β3 contract values back toward $\pm 1$, lifting total small-gap slope to **$7.80\times$** ($2.31\times$ steeper than Cheon $f_1^{(3)}$ at identical degree 27!) and cutting Value MAE by **$3.0\times$**.
|
| 11 |
+
2. **Stage-Adaptive Sharpening Across Sorting Network Depth:**
|
| 12 |
+
- In `main_polysort_adaptive_n8_s42`, total origin slope increases from **$6.78$** at Bitonic Stage 0 (comparing wide random gaps) to **$9.57$** at Bitonic Stage 5 (final merge of adjacent nearly-sorted elements).
|
| 13 |
+
- This stage specialization cuts Value MAE by another **12.0%** at $n=8$ (`0.0378 -> 0.0333`) and **23.7%** at $n=16$ (`0.0484 -> 0.0369`), while simultaneously raising full-list monotonicity from `90.14% -> 94.09%` ($n=8$) and `72.87% -> 82.45%` ($n=16$, $m=2$).
|
| 14 |
+
3. **Why Unscaled Analytical Remez $m=2$ Diverged (`MAE = inf`) While Trained `m=2` Succeeded (`MAE = 0.0072`):**
|
| 15 |
+
- Analytical Lee et al. Remez minimax optimizes a *single* comparator gate in isolation; when $\tau_L > 0.05$ compounds across 6β10 Bitonic layers, small boundary overshoots cascade outside $[-1, 1]$ and explode!
|
| 16 |
+
- End-to-end backpropagation through the full Bitonic sorting network **automatically enforces multi-stage stability**, yielding `0.00724` MAE on $n=8$, `0.00973` MAE on $n=16$, and `0.0200` MAE zero-shot on $n=128$ (28 Bitonic stages, 0 NaNs!).
|
| 17 |
+
4. **Degree vs. Scale-Stability Trade-Off:**
|
| 18 |
+
- Increasing block degree from cubic ($m=1$, deg 27) to quintic ($m=2$, deg 125) cuts in-domain Value MAE by **$4.5\times$** (`0.0333 -> 0.0072`), while tightening the upper scale stability radius from $R_{\text{stable}} = 1.3$ down to $R_{\text{stable}} = 1.0$.
|
reports/plan.md
CHANGED
|
@@ -12,7 +12,7 @@ Train, rigorously evaluate, ablate, visualize, and publish a scientific study of
|
|
| 12 |
- [x] **Phase 1:** Full primary-source literature review (`reports/literature-review.md`) and SOTA review (`reports/state-of-the-art-review.md`).
|
| 13 |
- [x] **Phase 2:** Preregistration (`reports/preregistration.md`), Run Matrix (`reports/planned-runs.md`), Docs (`docs/`), Pre-Results `README.md`, GitHub + Hugging Face repo creation & pre-results push.
|
| 14 |
- [x] **Phase 3:** Modular `src/pnn_sort/` package, automated FX purity audit, real-time accuracy web dashboard, full `pytest` suite (62/62 passed), pre-training push & Adversarial Self-Review #1.
|
| 15 |
-
- [
|
| 16 |
- [ ] **Phase 4B:** Remaining main PNN architectures (`PolyPairwiseRank`, `PolySortNetLearnedWire`, `DeepSetsPoly`, `PiNetSorter`, `PolyMLP`) + scaling study ($n=4..128$), Review #2.
|
| 17 |
- [ ] **Phase 4C:** Trained controls (`ShuffledTargetControl`) & non-polynomial baselines (`DiffSort`, `ReLU-MLP`, `SetTransformer`).
|
| 18 |
- [ ] **Phase 4D:** 6 causal ablation suites + Adversarial NeurIPS Self-Review #3.
|
|
|
|
| 12 |
- [x] **Phase 1:** Full primary-source literature review (`reports/literature-review.md`) and SOTA review (`reports/state-of-the-art-review.md`).
|
| 13 |
- [x] **Phase 2:** Preregistration (`reports/preregistration.md`), Run Matrix (`reports/planned-runs.md`), Docs (`docs/`), Pre-Results `README.md`, GitHub + Hugging Face repo creation & pre-results push.
|
| 14 |
- [x] **Phase 3:** Modular `src/pnn_sort/` package, automated FX purity audit, real-time accuracy web dashboard, full `pytest` suite (62/62 passed), pre-training push & Adversarial Self-Review #1.
|
| 15 |
+
- [x] **Phase 4A:** Zero-training analytical/controls + primary `PolySortNet` (Shared & Stage-Adaptive), incremental GitHub & HF pushes.
|
| 16 |
- [ ] **Phase 4B:** Remaining main PNN architectures (`PolyPairwiseRank`, `PolySortNetLearnedWire`, `DeepSetsPoly`, `PiNetSorter`, `PolyMLP`) + scaling study ($n=4..128$), Review #2.
|
| 17 |
- [ ] **Phase 4C:** Trained controls (`ShuffledTargetControl`) & non-polynomial baselines (`DiffSort`, `ReLU-MLP`, `SetTransformer`).
|
| 18 |
- [ ] **Phase 4D:** 6 causal ablation suites + Adversarial NeurIPS Self-Review #3.
|
reports/preregistration.md
CHANGED
|
@@ -115,4 +115,7 @@
|
|
| 115 |
## 7. Pre-Hoc vs. Post-Hoc Analysis Log
|
| 116 |
|
| 117 |
- **Pre-Hoc Analyses (Locked 2026-11-25):** Hypotheses H1βH6, all 17 models/controls, all 6 ablation families, and all 10 OOD suites documented in `reports/planned-runs.md`.
|
| 118 |
-
- **Post-Hoc Exploratory Analyses
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
## 7. Pre-Hoc vs. Post-Hoc Analysis Log
|
| 116 |
|
| 117 |
- **Pre-Hoc Analyses (Locked 2026-11-25):** Hypotheses H1βH6, all 17 models/controls, all 6 ablation families, and all 10 OOD suites documented in `reports/planned-runs.md`.
|
| 118 |
+
- **Post-Hoc Exploratory Analyses & Logged Engineering Adjustments:**
|
| 119 |
+
- *2026-11-25 (Pre-Stage-4A Baseline Steelmanning):* Added two stronger zero-training analytical CKKS baselines (`analytical_cheon_fg` exact $f_3 \circ g_3$ from Cheon 2020 / Mazzone 2025, and `analytical_remez` at $m=2$, deg 125 via exact HiGHS convex LP) to ensure trained PNNs are benchmarked against strong analytical methods rather than $f_1^{(3)}$ alone.
|
| 120 |
+
- *2026-11-25 (GPU Throughput Note):* After observing WDDM kernel-launch overhead on RTX 5070 during `main_polysort_shared_n8_s42` (`batch_size=512`, converged by epoch 8 in 650s), switched remaining runs to `batch_size=4096, lr=8e-3, epochs=50` for compact sorting networks (1β60 params) and `batch_size=2048, lr=2e-3, epochs=60` for dense neural models; explicit batch-size sensitivity (`512` vs `2048` vs `4096`) is verified in Stage 4E.
|
| 121 |
+
- *2026-11-25 (`R_stable` Definition Clarification):* Clarified `R_stable` to sweep upper scale factors $s \ge 1.0$ (since $s = 0.1$ tests shrinkage rather than upper polynomial blow-up).
|
reports/progress.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
# Live Progress Report (`pnn-sort`)
|
| 2 |
|
| 3 |
-
**Last Updated:** 2026-11-25
|
| 4 |
|
| 5 |
## Current Status
|
| 6 |
-
- **Overall Progress:** ~
|
| 7 |
- **Done:**
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
- **
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
- **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Live Progress Report (`pnn-sort`)
|
| 2 |
|
| 3 |
+
**Last Updated:** 2026-11-25 17:10 CET
|
| 4 |
|
| 5 |
## Current Status
|
| 6 |
+
- **Overall Progress:** ~48% complete (Phases 0β3 & Stage 4A complete; launching Stage 4B).
|
| 7 |
- **Done:**
|
| 8 |
+
- Phases 0β3: Environment, full literature & SOTA reviews, pre-results preregistration, modular `src/pnn_sort/` codebase, 62/62 passing tests, Review #1.
|
| 9 |
+
- **Stage 4A Complete (26 runs):** All zero-training analytical/trivial controls + all 8 primary `PolySortNet` models (`shared`, `shared_m2`, `adaptive`, `adaptive_m2` at $n=8, 16$).
|
| 10 |
+
- **Positive Highlights:**
|
| 11 |
+
- `polysort_adaptive_m2` achieves **MAE = `0.00724`** ($n=8$, 36 params, Mono `95.92%`, $\tau=0.9967$) and **MAE = `0.00973`** ($n=16$, 60 params, $\tau=0.9963$) β **$3.85\times$ lower MAE** than Cheon/Hong/Mazzone mixed $f_3 \circ g_3$.
|
| 12 |
+
- `polysort_shared_m2` (**6 params**, trained on $n=8$ only) generalizes **zero-shot to $n=128$** with **MAE = `0.0200`, $\tau = 0.9978$** ($13\times$ better than Cheon $f_1^{(3)}$).
|
| 13 |
+
- Exact float64 sum conservation (`2.1e-16`) and shift equivariance at $c = 100$ (`6.6e-14`).
|
| 14 |
+
- **Negative / Boundary Highlights:**
|
| 15 |
+
- Analytical unscaled Remez $m=2$ diverged (`MAE = inf`) across deep Bitonic stages due to compounding overshoot.
|
| 16 |
+
- Pure polynomials exhibit the exact predicted OOD scale-cliff: cubic ($m=1$) diverges at $s = 2.0$ ($R_{\text{stable}} = 1.3$); quintic ($m=2$) diverges at $s = 1.5$ ($R_{\text{stable}} = 1.0$).
|
| 17 |
+
- **In Progress:** Pushing Stage 4A artifacts & checkpoints to GitHub and Hugging Face, then running **Stage 4B** (17 runs: `PolyPairwiseRank`, `LearnedWire`, `DeepSetsPoly`, `PiNet-NCPSkip`, `PolyMLP` on $n=8, 16$, plus $n=4, 32$ scaling sweep).
|
| 18 |
+
- **Estimated Remaining Time:** ~1.5β2.5 hours total for Stages 4Bβ4E + Phase 5 (figures, GitHub Pages live browser sorter, `paper.pdf`).
|