summaryrefslogtreecommitdiff
path: root/notes
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-05-29 08:43:19 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-05-29 08:43:19 -0500
commitdd14582dcfd3b6e3e7b0e28f66bb0f2994f106c4 (patch)
tree99c06ef0e6bb26a040409408040e1e88bc14f69f /notes
parentc47a74792e6ee78181b087ead595465140b77825 (diff)
Add multilayer capacity distribution matching
Diffstat (limited to 'notes')
-rw-r--r--notes/01_theory_notes.md42
-rw-r--r--notes/02_experiment_notes.md49
-rw-r--r--notes/03_paper_outline.md1
3 files changed, 92 insertions, 0 deletions
diff --git a/notes/01_theory_notes.md b/notes/01_theory_notes.md
index 7a54374..b22e535 100644
--- a/notes/01_theory_notes.md
+++ b/notes/01_theory_notes.md
@@ -166,6 +166,48 @@ C_l\approx c/2,
C_{\mathrm{all}}=\Theta(L).
\]
+## Candidate Corollary 2: Observed Capacity Distribution
+
+The threshold cost \(C_l(q)\) is deterministic once \(q\) is chosen. For empirical distribution matching, define the observed alignment surprisal:
+
+\[
+S_l
+=
+-\log \Pr(Q_l'\ge Q_l),
+\]
+
+where \(Q_l'\) is an independent draw from the same beta law as \(Q_l\). If:
+
+\[
+Q_l\sim \mathrm{Beta}\left(\frac12,\frac{D_l-1}{2}\right),
+\]
+
+and the survival function is continuous, then by the probability integral transform:
+
+\[
+U_l=\Pr(Q_l'\ge Q_l)\sim \mathrm{Uniform}(0,1),
+\]
+
+so:
+
+\[
+S_l=-\log U_l\sim \mathrm{Exp}(1).
+\]
+
+For \(L\) independent feedback-aligned layers, the observed total capacity surprisal is:
+
+\[
+S_{1:L}=\sum_{l=1}^L S_l.
+\]
+
+If the layerwise feedback matrices are independent, then:
+
+\[
+S_{1:L}\sim \mathrm{Gamma}(L,1).
+\]
+
+This is useful because it predicts a full distribution rather than only a mean or bound. It also shows that after the beta-tail transform, the null distribution of observed capacity surprisal is dimension-free; dimension enters through the raw \(Q_l\) scale and the threshold cost \(C_l(q)\), not through the transformed surprisal law.
+
## Candidate Theorem 2: Prior-Free Minimax Bound
Let:
diff --git a/notes/02_experiment_notes.md b/notes/02_experiment_notes.md
index dcf797a..2fad18f 100644
--- a/notes/02_experiment_notes.md
+++ b/notes/02_experiment_notes.md
@@ -311,6 +311,55 @@ Interpretation:
- Multilayer capacity accumulation matches the product law until the all-event becomes too rare for the finite sample budget.
- Fixed-threshold high-dimensional tails quickly become too rare for direct Monte Carlo, which is itself consistent with the exponential/geometric volume-collapse interpretation.
+## Multilayer Observed Capacity Distribution Run Log
+
+Script:
+
+```bash
+python scripts/multilayer_capacity_distribution.py --dimensions 64 256 1024 4096 --layers 1 2 4 8 16 --samples 100000 --batch-size 8192 --seed 456 --plot
+```
+
+Theory:
+
+\[
+S_l=-\log P(Q_l'\ge Q_l)\sim \mathrm{Exp}(1)
+\]
+
+and for independent layers:
+
+\[
+S_{1:L}=\sum_{l=1}^L S_l\sim \mathrm{Gamma}(L,1).
+\]
+
+Setup:
+
+- dimensions \(D\): `64, 256, 1024, 4096`
+- layers \(L\): `1, 2, 4, 8, 16`
+- samples per \((D,L)\): `100000`
+- total distribution-matching rows: `20`
+- sampler: exact random-direction chi-square representation \(Q=X/(X+Y)\)
+
+Summary:
+
+- max KS statistic over all \((D,L)\): `0.0042004`
+- mean absolute mean error: `0.0042410`
+- mean absolute variance error: `0.0404870`
+
+Selected rows:
+
+| \(D\) | \(L\) | empirical mean | theory mean | empirical var | theory var | KS |
+|---:|---:|---:|---:|---:|---:|---:|
+| `64` | `1` | `1.00472` | `1` | `1.02000` | `1` | `0.00253` |
+| `64` | `16` | `16.00773` | `16` | `15.87860` | `16` | `0.00246` |
+| `4096` | `1` | `1.00041` | `1` | `1.00609` | `1` | `0.00194` |
+| `4096` | `16` | `16.00106` | `16` | `16.04361` | `16` | `0.00265` |
+
+Interpretation:
+
+- The observed capacity surprisal distribution matches the predicted \(\mathrm{Exp}(1)\) and \(\mathrm{Gamma}(L,1)\) laws tightly.
+- After the beta-tail transform, the null surprisal distribution is dimension-free; \(D\) controls the raw \(Q\) scale and fixed-threshold cost, while \(L\) controls the Gamma shape.
+- This gives the cleanest “theory predicts a distribution, experiment recovers the same distribution” result for multilayer capacity.
+
## Minimax Initialization Run Log
Script:
diff --git a/notes/03_paper_outline.md b/notes/03_paper_outline.md
index 7e2e5d4..328871f 100644
--- a/notes/03_paper_outline.md
+++ b/notes/03_paper_outline.md
@@ -165,6 +165,7 @@ Scaling:
- depth and width sweeps.
- threshold regimes.
- large empirical tail calibration for \(C(q)=-\log P(Q\ge q)\).
+- observed capacity distribution matching: \(S_l\sim\mathrm{Exp}(1)\), \(\sum_l S_l\sim\mathrm{Gamma}(L,1)\).
Trajectory: