{
  "seed": "alchemy-note-quality-20261127-v1",
  "selection": "Lowest SHA256(seed|note_id) per stratum. One per assignment per 1M/additional stratum; six per stronger stratum. Deliberately balanced qualitative sample, not a prevalence estimate.",
  "samples": [
    {
      "sample_id": "N01",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a1",
      "population_in_stratum": 962,
      "note": {
        "note_id": "batch-00014:note-5ec756ebbe16ff8d5472",
        "title": "Part 2(b) simplified experiment",
        "body": "# Part 2(b) Simplified Experiment (10 runs)\n\nGiven the 10-run budget for part (b), I'll run 2 interventions with d4-d9 scaling:\n\n## Intervention 1: Weight decay variations (6 runs)\n- wd=0.01, lr=0.003, schedule=linear, dropout=0.0\n- wd=0.1, lr=0.003, schedule=linear, dropout=0.0 (baseline)\n- wd=0.5, lr=0.003, schedule=linear, dropout=0.0\n\n## Intervention 2: Warmup variations (4 runs)\n- warmup=0.005, lr=0.003, schedule=linear, dropout=0.0\n- warmup=0.05, lr=0.003, schedule=linear, dropout=0.0\n\nTotal: 10 runs\n\nThis will let me compare how WD and warmup affect the scaling slope α.\n\nExpected outcomes:\n- WD might affect the irreducible error ε more than the slope α\n- Warmup might affect early training dynamics but not necessarily the scaling slope\n- LR schedule might have more effect on the slope\n\nThe key is to fit power laws L = (1/C)^α + ε for each configuration and compare α values.",
        "sources": [
          "assignments/a1_basics/handout/page_010.png"
        ],
        "supervised_tokens": 302,
        "collection_batch": "batch-00014",
        "task_id": "a1-p2b-followup14-5016a620c0faa5d589162e4ae061f56b9196b8254e77692c1673eec4859b0fc5",
        "assignment_part": "a1-p2b",
        "source_sha256": "6ded62cf769d84ccc458157eed398a1f142507ec44b9d8c62ca73e8fbfeca55b",
        "part_sha256": "2920135657d80aeac5696e661a76ef5eb05364af63c0b5430e338006f79c68b9"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Useful but incomplete",
        "assessment": "Defines concrete weight-decay and warmup comparisons, marks outcomes as expectations, and stays within its stated run count. It contains no measured outcome. The proposed power-law fit needs a clearer compute axis and enough distinct scales to identify its parameters.",
        "verification": "Reviewed full note; no empirical result claimed."
      }
    },
    {
      "sample_id": "N02",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a2",
      "population_in_stratum": 1426,
      "note": {
        "note_id": "batch-00018:note-c81e3997d93d8468a325",
        "title": "A2-P2a Summary",
        "body": "A2-P2a: Summary and Unfinished Work\n\n## What I Learned\n\n### 1. Joint LR-WD Scaling\n- LR and WD are coupled hyperparameters that should be tuned jointly\n- Optimal LR increases with scale (0.0015 to 0.003)\n- Optimal WD decreases with scale (1.6 to 0.2)\n- The product eta*lambda follows a more regular scaling law than either alone\n\n### 2. Product Law\n- eta*lambda approximately follows D^(-1) scaling\n- Product plateaus at 0.0006 for larger budgets\n- This product law can be used to transfer hyperparameters across scales\n\n### 3. Quadratic Fitting\n- Loss landscape can be approximated by quadratic in log(LR) and log(WD)\n- Contours show compensation between LR and WD\n- Cross-term exy is important for accurate fitting\n\n### 4. Comparison with Problem 1\n- LR-only tuning gives similar trends but higher losses\n- Joint tuning achieves better validation losses\n- Benefit of joint tuning increases with training budget\n\n## Unfinished Work\n\n### 4 New Runs at 2.4576B Tokens\nDue to experiment budget exhaustion, I could not run the 4 new runs required for Problem 2(c):\n\n1. Prediction run: LR=0.003, WD=0.1 (based on product law)\n2. Baseline 1: LR=0.0015, WD=1.6 (best from 153.6M)\n3. Baseline 2a: LR=0.003, WD=0.05\n4. Baseline 2b: LR=0.003, WD=0.2\n\nThese runs are needed to:\n- Validate the product law extrapolation\n- Compare prediction with baseline approaches\n- Measure loss gaps and determine product rule effectiveness\n\n### Next Steps (when follow-up session arrives)\n1. Run the 4 new experiments at 2.4576B tokens\n2. Analyze results and compare with predictions\n3. Update analysis with actual measured losses\n4. Finalize writeup with synthesis\n\n## Key Takeaways\n\n1. Learning rate and weight decay are not independent hyperparameters\n2. Their product follows a more regular scaling law\n3. Joint tuning outperforms LR-only tuning\n4. Extrapolation carries uncertainty but product law is useful\n5. The 4 new runs will validate or refine these insights",
        "sources": [],
        "supervised_tokens": 547,
        "collection_batch": "batch-00018",
        "task_id": "a2-p2a",
        "assignment_part": "a2-p2a",
        "source_sha256": "5988c295f3adad5f274400ce9ee92fd1cedf030d6f41a8d655609ba5548da7e4",
        "part_sha256": "988df7272876936f7aaa66dc611cdc93258e957ba450e0425daa652007db712f"
      },
      "review": {
        "kind": "Reference-data synthesis",
        "verdict": "Partly grounded",
        "assessment": "Recognizes joint learning-rate/weight-decay tuning and explicitly leaves extrapolation untested. Its trace reads the supplied sweep CSV, so this is not evidence-free invention. The asserted inverse-token product law is stronger than the measurements summarized here; no fit or uncertainty is supplied.",
        "verification": "Trace inspected: supplied_sweeps CSV access and failed/empty local program outputs. The note is about reference data, not a successful new sweep."
      }
    },
    {
      "sample_id": "N03",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a3",
      "population_in_stratum": 780,
      "note": {
        "note_id": "batch-00008:note-ba487bfca4667222f9a3",
        "title": "A3 Problem 3b: Final Study Summary",
        "body": "# A3 Problem 3b: Minibatch Edge of Stability - Final Summary\n\n## Problem Statement\nStudy edge of stability in minibatch training (standard d8 setting). Use `minibatch()` recipe with constant LR after warmup. Plot ηt × λpre_max vs training tokens (after warmup). Does minibatch AdamW train at the edge?\n\n## Key Theory\n\n### Edge of Stability (Cohen et al. 2021)\n- **Full-batch gradient descent**: Sharpness λmax (max Hessian eigenvalue) progressively increases during training\n- **Progressive sharpening**: λmax rises until it reaches 2/η\n- **Stabilization**: λmax hovers near 2/η (the \"edge of stability\")\n- **Stability thresholds**:\n  - SGD: ηλmax < 2\n  - AdamW (β1=0.9): ηλpre_max < 38\n\n### Preconditioned Sharpness for AdamW\n```\nλpre_max = λmax(D^(-1/2) H D^(-1/2))\nwhere D = sqrt(v_hat + ε)\n```\nv_hat is the bias-corrected second-moment estimate from AdamW.\n\n## Training Recipe (minibatch function)\n```python\ndef minibatch(batch_size=64, **changes):\n    settings = dict(\n        num_epochs=FRACTION,           # 0.32 of epoch (~197M tokens at batch 64)\n        warmup_percent=0.03125,        # 3.125% warmup (~6M tokens)\n        lr_schedule=\"wsd0.0\",          # constant after warmup\n        batch_size=batch_size,\n        num_micro_batches=max(1, batch_size // 64),\n        metric_loggers=TrainConfig.metric_loggers\n        + (MetricLogger(AFTER_BACKWARD, SharpnessLogger(\n            steps=measurement_steps(batch_size), \n            probe=\"heldout\", \n            kinds=(\"pre\",))),),\n        wandb_tags=(EXPERIMENT_KEY,),\n    )\n    settings.update(changes)\n    return TrainConfig(**settings)\n```\n\n**Key parameters**:\n- Batch size: 64 (standard d8)\n- Learning rate: 1e-3 (default)\n- Warmup: 3.125% of training\n- Epochs: 0.32 (~197M tokens)\n- Probe: 64 held-out training sequences\n- Measurement: preconditioned sharpness (kind=\"pre\")\n\n**Measurement steps**: Every 16 updates to 208, then every 100 to 1500, then every 300 to 3001.\n\n## What to Analyze\n\n### 1. Plot ηt × λpre_max vs Training Tokens\n- X-axis: Training tokens (log scale)\n- Y-axis: ηt × λpre_max (log scale)\n- Mark threshold at 38 (dashed line)\n- Leave out warmup period\n\n### 2. Key Questions\n- Does ηt × λpre_max increase after warmup?\n- Does it plateau/stabilize?\n- If it stabilizes, near what value?\n- Is it near 38 (the edge of stability threshold)?\n\n### 3. Interpretation Scenarios\n\n| Scenario | Behavior | Interpretation |\n|----------|----------|----------------|\n| Stabilizes near 38 | ηt × λpre_max ≈ 38 | Edge of stability holds for minibatch |\n| Stabilizes below 38 | ηt × λpre_max << 38 | Minibatch is more stable; noise prevents reaching edge |\n| Stabilizes above 38 | ηt × λpre_max >> 38 | Training is unstable or LR too high |\n| No clear plateau | ηt × λpre_max keeps changing | Different dynamics; affected by stochasticity |\n\n## Expected Findings\n\nBased on Cohen et al. (2021) and the nature of minibatch training:\n\n1. **Edge of stability may or may not hold** for minibatch\n   - Full-batch has cleaner gradients, clearer edge of stability\n   - Minibatch has noisy gradients, which may:\n     - Prevent reaching the edge (stabilize below 38)\n     - Or maintain the edge despite noise\n\n2. **Factors affecting edge of stability**:\n   - **Learning rate**: Higher LR → higher edge\n   - **Batch size**: Smaller batches → more noise → may not reach edge\n   - **Training duration**: Longer training → more time to reach edge\n   - **Optimizer**: AdamW vs SGD have different thresholds (38 vs 2)\n\n## Experiment Status\n\n**Budget**: 8 experiments for a3-p3b\n\n**Experiments run**:\n- e20371c9351566cdcc957b6c: batch_size=64, lr=0.001 - FAILED (W&B auth)\n- e714869d2833eef809a165a39: lr=0.003 - FAILED (W&B auth)\n- 6 other experiments - FAILED\n\n**Root cause**: W&B authentication token missing\n\n## Next Steps (Follow-up Session)\n\n1. **Read experiment results** from W&B using `sharpness.py`:\n   ```python\n   from experiments.a3_optimization.sharpness import history, summarize\n   rows = history(config)\n   summarize(rows, kind=\"pre\")  # for AdamW\n   ```\n\n2. **Generate plots**:\n   - ηt × λpre_max vs training tokens (log scale)\n   - Mark threshold at 38\n   - Show warmup period excluded\n\n3. **Analyze**:\n   - Does the curve plateau?\n   - Where does it stabilize?\n   - Compare to threshold 38\n\n4. **Answer**: Does minibatch AdamW train at the edge of stability?\n\n## References\n- Cohen et al. (2021): \"The Edge of Stability\"\n- Code: `code/a3_release/experiments/a3_optimization/p3_edge_of_stability.py`\n- Code: `code/a3_release/experiments/a3_optimization/sharpness.py`",
        "sources": [
          "assignments/a3_optimization2/handout.md",
          "code/a3_release/experiments/a3_optimization/p3_edge_of_stability.py",
          "code/a3_release/experiments/a3_optimization/sharpness.py"
        ],
        "supervised_tokens": 1392,
        "collection_batch": "batch-00008",
        "task_id": "a3-p3b-followup8-a58a84d4732f80d8b3f3737415e1ac6c6f4ffde9e87899ea2ac3d8cbe06a9a81",
        "assignment_part": "a3-p3b",
        "source_sha256": "57c7c106c64346eff10019b433127bfc04ccd027767db083300bc9575e456400",
        "part_sha256": "05eceabe4d10a35f786bdab3d86aea9bac7c8d19cbab85ab9f9467d4367d7cd7"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Provenance error",
        "assessment": "Provides a useful sharpness-analysis checklist and admits the actual scientific question is unresolved. It incorrectly labels two named programs as failed with a W&B-auth root cause: the trace shows both finished with exit code zero, no metric rows, and configuration-printing output. Another retrieved error explicitly concerns Modal. Finishing a process did not mean training ran, and the summary did not preserve those distinctions.",
        "verification": "Compared note with its own experiment_result replies and stdout, including e20371c93515666cdcc957b6c and e714869d2833eef809a165a39."
      }
    },
    {
      "sample_id": "N04",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a4",
      "population_in_stratum": 902,
      "note": {
        "note_id": "batch-00026:note-400c9836afb605db3d80",
        "title": "Problem 4(c) - Final Summary",
        "body": "## Problem 4(c) - Final Summary\n\n### What I've Accomplished\n1. **Studied the problem**: Understand the goal of designing better RNN updates\n2. **Learned the diagnostics**: Know what metrics to measure and why they matter\n3. **Wrote the experiment code**: Complete main.py with Tanh, GRU, and Custom variants\n4. **Saved notes**: Multiple notes documenting my understanding and approach\n\n### What I Need to Do\n1. **Submit the experiment**: Call request_experiment with my main.py\n2. **Wait for results**: The experiment will run asynchronously\n3. **Analyze results**: Read the diagnostics and compare variants\n4. **Write analysis**: Explain differences using diagnostics and guide improvements\n\n### Key Question\nWhich update rule (tanh, GRU, or custom) produces:\n- Better gradient flow through time (higher LT gradient RMS)?\n- More stable activations (better activation RMS)?\n- Less saturation (lower saturation fraction)?\n- Better information preservation (higher temporal cosine)?\n\nThe variant that excels in these metrics should be the better choice for RNN updates.",
        "sources": [
          "assignments/a4_architecture1/handout/page_010.png",
          "code/a4_release/experiments/a4_stability/p4_recurrent_updates.py",
          "code/a4_release/experiments/a4_stability/p2_rnn_depth.py",
          "code/a4_release/experiments/a4_stability/diagnostics.py"
        ],
        "supervised_tokens": 243,
        "collection_batch": "batch-00026",
        "task_id": "a4-p4c-followup26-4c192cfac1d7fb4758200a154a482164eb590bcf24d38db035556801a83f5c74",
        "assignment_part": "a4-p4c",
        "source_sha256": "85066543ecd6f23ad681354968f25931e7e723b46d667eb446f9aa4e907e7822",
        "part_sha256": "a51215a16825d34e4d05db1de9cac18dcb66f5d2a5e9e4b8e7f999ec16cb74ca"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Useful but incomplete",
        "assessment": "Separates completed preparation from experiments still to submit. The diagnostic checklist is reusable, but there is no comparison or evidence that any update rule is better. Optimizing all listed diagnostics is not automatically equivalent to minimizing validation loss.",
        "verification": "Reviewed full note; no measured result claimed."
      }
    },
    {
      "sample_id": "N05",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a5",
      "population_in_stratum": 745,
      "note": {
        "note_id": "batch-00010:note-d4b5e36b3e0fd2110c14",
        "title": "Problem 4(b) Requirements Summary",
        "body": "## Problem 4(b) Requirements\n\n### What to Compare\n1. **Activation RMS per pass** - with ordinary d8 (R=1)\n2. **Gradient RMS per pass** - with ordinary d8 (R=1)\n3. **Relative residual-update size per pass** - with ordinary d8 (R=1)\n\n### Boundary Map Interventions to Test\nB(h) = RMSNorm(h) + α·a where a = h₀ (prelude output)\n\nFour configurations:\n1. **Identity**: No boundary map (baseline)\n2. **Norm alone**: boundary_norm=True, recall=0\n3. **Injection alone**: boundary_norm=False, recall=1.0\n4. **Both**: boundary_norm=True, recall=1.0\n\n### Canonical Setting\n- Single block looped 6 times (core_size=1, passes=6)\n- Total depth = 2 + 1×6 = 8 blocks (matches d8)\n\n### Additional Instructions\n- \"While keeping the architecture fixed to 1 prelude and 1 coda, try additional looping designs that may further improve performance\"\n- This suggests exploring other loop configurations beyond just the boundary map\n\n### Expected Output\n- Compare metrics across all variants\n- Identify which intervention works best\n- Track statistics per pass",
        "sources": [
          "assignments/a5_capacity/handout.md",
          "code/a5_release/experiments/a5_capacity/p4_looping.py"
        ],
        "supervised_tokens": 284,
        "collection_batch": "batch-00010",
        "task_id": "a5-p4b",
        "assignment_part": "a5-p4b",
        "source_sha256": "e04cf691cb6d620bdfb8d2e80a3913c3d2f1fb8c6d36121c8b6792c1d8eb0dc9",
        "part_sha256": "3ad9444512caf53ef7af896623cd4948f68030b9625ff2db1efa91c98d8639f0"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Useful setup summary",
        "assessment": "Clearly identifies the boundary-normalization and anchor-injection ablation and the one-prelude, six-core-application, one-coda structure. This is useful recall of the assignment requirements; it is not an empirical finding.",
        "verification": "Checked the released looping implementation and executed-depth formula."
      }
    },
    {
      "sample_id": "N06",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a6",
      "population_in_stratum": 610,
      "note": {
        "note_id": "batch-00032:note-d5e55c5c88db68fbc121",
        "title": "A6 Problem 1(d): Experiment Design - Looping Architectures",
        "body": "# A6 Problem 1(d): Experiment Design\n\n## Goal\nExplore architectures that may improve data efficiency at a fixed parameter budget.\n\n## Understanding Parameter Counts\n\n### Dense d8\n- 8 layers, width 512, intermediate_size=2048\n- Each layer: self-attention + MLP\n- Total: ~30.4M parameters (from previous analysis)\n\n### Looping Architecture (LoopLM)\n- 1 prelude (unique)\n- passes * core_size core layers (shared if tied=True)\n- 1 coda (unique)\n- Total unique params = prelude + core_size + coda\n\n**Key insight**: Looping with tied=True has FEWER unique parameters than dense!\n- Looping (core_size=1, passes=6, tied): 3 unique layers vs 8 dense layers\n- This is PARAMETER EFFICIENT, not matched\n\n## Experiment Strategy\n\n### Option 1: Parameter-Efficient Looping\nCompare looping (which uses fewer unique params) vs dense (more unique params)\n- Same training compute (epochs), but looping has more compute/param\n- Question: Does more compute/param help?\n\n### Option 2: Parameter-Matched Looping\nCreate a dense model with same unique params as looping\n- Looping (core_size=1, passes=6): ~3 layers worth of params\n- Dense match: 3 layers, width 512\n- Compare: looping vs dense-3, same unique params\n- This tests if parameter reuse helps\n\n### Option 3: Different Looping Configurations\nTest various (core_size, passes) combinations:\n- (1, 6): 3 unique layers, 6 passes\n- (2, 3): 4 unique layers, 3 passes  \n- (4, 1): 6 unique layers, 1 pass\n- (1, 1): 3 unique layers, 1 pass (baseline looping)\n\nFor each, match to dense with same unique layer count.\n\n## Proposed Experiments\n\n### Exp 1: Looping (core_size=1, passes=6, tied=True)\n- LR tuning: 0.001, 0.003, 0.01\n- Compare to dense-3 (3 layers, width 512)\n- Same unique params, looping reuses 6x\n\n### Exp 2: Looping (core_size=2, passes=3, tied=True)\n- LR tuning: 0.001, 0.003, 0.01\n- Compare to dense-4 (4 layers, width 512)\n\n### Exp 3: Looping (core_size=4, passes=1, tied=True)\n- LR tuning: 0.001, 0.003, 0.01\n- Compare to dense-6 (6 layers, width 512)\n\n### Exp 4: Dense baseline for comparison\n- Dense-3, Dense-4, Dense-6 with LR tuning\n\n## Hypothesis\nLooping should outperform dense at matched unique parameter count because:\n1. Same params used more times during training = more compute/param\n2. Better optimization on limited data\n",
        "sources": [],
        "supervised_tokens": 714,
        "collection_batch": "batch-00032",
        "task_id": "a6-p1d",
        "assignment_part": "a6-p1d",
        "source_sha256": "ab1bbdc4b3aba8266b5acda72c8511d8fbda9d013d8f9776c8ba6fba534c4081",
        "part_sha256": "536a97d9cc97a65b9d85583f8b335a4cbffe381a93842e991d042fee99d61ab1"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Mixed experimental design",
        "assessment": "Correctly distinguishes unique parameters from repeated applications and proposes parameter-matched dense controls. However, equal epochs alone do not ensure equal compute, and comparisons with different executed depths require explicit FLOP accounting. Predictions are labeled as hypotheses.",
        "verification": "Checked layer-count logic against the released looping implementation; no experiment result claimed."
      }
    },
    {
      "sample_id": "N07",
      "route": "assignment",
      "stratum": "additional_1_to_5M",
      "group": "a7",
      "population_in_stratum": 867,
      "note": {
        "note_id": "batch-00026:note-832ea9c423647b540c18",
        "title": "Problem 3(a) - Session Summary",
        "body": "# Problem 3(a) - Session Summary\n\n## What I Accomplished in This Session\n\n### 1. Understood the Problem\n- Read the handout (page 9, lines 461-468) about Problem 3(a): \"Anatomy of a local optimum\"\n- Learned about the CRAWL vs WALK configuration:\n  - **CRAWL**: `terminate_when_unhealthy=False` - removes the fall rule\n  - **WALK**: Default with fall rule - forces the robot to maintain balance\n- Understood why crawling is a local optimum:\n  - Lower coordination requirement for crawling\n  - Risk avoidance - no penalty for falling\n  - Sparse reward for standing up\n  - Weak gradient signal for standing up\n\n### 2. Planned and Requested Experiments\n- Requested experiment e4697caadd17102019cd78b98 to run `local_optimum_runs()`:\n  - Trains both CRAWL and WALK with 3 seeds each\n  - Saves checkpoints at 500k, 1M, 2M, 3M steps\n- Status: Queued (will be available in follow-up session)\n\n### 3. Saved Comprehensive Notes\n- **note-7ebb677baca1c01f20d6**: Initial problem understanding\n- **note-3a8f0001f6210f8bdb52**: Experiment plan\n- **note-3fcc2525cdde5335e7f3**: Initial observations and remaining work\n- **note-44bbb292b83268cfe9ad**: Comprehensive study notes\n- **note-b79bc5973d583ca1cb4e**: What I've learned and what remains\n- **note-d67f22e746d3f5ed5895**: Analysis methodology and expected findings\n- **note-0ed98728c70771ef97b1**: Final summary and next steps\n\n### 4. Learned Key Concepts\n- **Non-stationary landscape**: The RL optimization landscape changes as the policy changes the data distribution\n- **Exploration determines which regions we visit**: Unlike pre-training with fixed data, RL exploration is critical\n- **Evidence types for local optimum**:\n  1. Behavioral evidence (render episodes)\n  2. Performance under different evaluation rules\n  3. Interpolation analysis (barrier detection)\n  4. Random direction analysis (gradient strength)\n\n### 5. Formulated Hypotheses\n1. The crawl is a local maximum (not just a weak gradient region)\n2. The default survival bonus (5) is insufficient to escape\n3. Exploration alone may not be enough - need reward shaping or curriculum\n\n## What Remains Unfinished\n\n### 1. Experiments\n- Wait for experiment e4697caadd17102019cd78b98 to complete\n- Status: Queued (will be available in follow-up session)\n\n### 2. Analysis (After Training)\n- Render episodes to visualize crawler vs walker behaviors\n- Plot proxy return and forward progress under both evaluation modes\n- Run interpolation analysis to detect barriers between crawl and walk\n- Run random direction analysis to check gradient strength around crawl\n\n### 3. Synthesis\n- Write interpretation of the local optimum phenomenon\n- Explain what this tells us about RL optimization landscapes\n- Discuss how exploration affects escaping local optima\n- Explain why the default survival bonus doesn't make the agent walk\n\n## Key Theoretical Insights\n\n### RL vs Pre-training Optimization\n| Aspect | Pre-training | RL |\n|--------|-------------|-----|\n| Landscape | Fixed | Moving (policy changes data) |\n| Gradient noise | Sampling individual examples | Sampling whole trajectories |\n| Objective | Minimize loss | Maximize expected return |\n| Local optima | Rare | Common |\n| Exploration role | Not critical | Critical for escaping local optima |\n\n### The Crawl Local Optimum Phenomenon\n1. **Lower coordination requirement**: Walking requires precise timing. Crawling just requires moving forward.\n2. **Risk avoidance**: Without the fall rule, there's no penalty for falling.\n3. **Sparse reward for standing up**: Standing up is a complex sequence that earns nothing until complete.\n4. **Weak gradient signal**: Under crawl policy, standing up is rare, so gradient is weak.\n\n### Why This Matters\n- **RL is fundamentally different from supervised learning**: The landscape is non-stationary\n- **Exploration is critical**: Without sufficient exploration, we get stuck in local optima\n- **Reward shaping matters**: The reward structure shapes the landscape\n- **Curriculum learning helps**: Training with the fall rule first, then removing it, can help escape the crawl\n\n## Next Steps (In Follow-up Session)\n1. Load the trained policies from experiment e4697caadd17102019cd78b98\n2. Render episodes to visualize crawler vs walker behaviors\n3. Plot performance curves under both evaluation modes\n4. Run interpolation analysis to detect barriers\n5. Run random direction analysis to check gradient strength\n6. Write synthesis about the local optimum phenomenon\n\n## Sources\n- assignments/a7_exotic_rl/handout/page_009.png\n- code/a7_rl_alchemy/experiments/p3_exploration.py\n- code/a7_rl_alchemy/analysis.py\n- Previous study notes from other sessions",
        "sources": [
          "assignments/a7_exotic_rl/handout/page_009.png",
          "code/a7_rl_alchemy/experiments/p3_exploration.py",
          "code/a7_rl_alchemy/analysis.py"
        ],
        "supervised_tokens": 1208,
        "collection_batch": "batch-00026",
        "task_id": "a7-p3a-followup26-ce8b06ff6d5f0be29d161647b321be4578a5d6030c71eff7d0c76da17764b209",
        "assignment_part": "a7-p3a",
        "source_sha256": "98142467aeb7395a311d12ab5318b46abad3d790ee5a86387fd1f99e1d6547a4",
        "part_sha256": "49a991372d1bb91511b55158fb057553fe3b31965234c292c6b73a6f0e8833f3"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Incomplete with overgeneralization",
        "assessment": "Explicitly says the RL runs are queued and lists sensible behavioral/interpolation diagnostics. Much of the note is a status summary and a list of its own earlier notes. Broad claims such as local optima being rare in pretraining and curriculum necessarily helping are not established by this session.",
        "verification": "Reviewed full note. Queued status is a statement at note-writing time, not a claim about the job's current state."
      }
    },
    {
      "sample_id": "N08",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a1",
      "population_in_stratum": 361,
      "note": {
        "note_id": "batch-00006:note-c55b35d23ab3f363cb69",
        "title": "Problem 2(c): Breaking Scaling Laws - Final Analysis Framework",
        "body": "# Final Analysis Framework for Breaking Scaling Laws\n\n## Experiment ID\nee1bcb37b5ab091fb03c692fe (84 runs: 6 depths × 14 interventions)\n\n## Interventions Tested\n\n### Category 1: Extreme Dropout\n- dropout=0.5 (very high)\n- dropout=0.8 (extreme)\n\n### Category 2: Extreme Weight Decay\n- weight_decay=1.0 (10x normal)\n- weight_decay=10.0 (100x normal)\n\n### Category 3: Extreme Learning Rate\n- learning_rate=0.03 (10x normal)\n- learning_rate=0.3 (100x normal)\n- learning_rate=0.0001 (very low)\n\n### Category 4: Wrong LR Schedule\n- lr_schedule=\"constant\" with learning_rate=0.03\n\n### Category 5: No Gradient Clipping\n- grad_norm=None\n\n### Category 6: Extreme Batch Size\n- batch_size=1 (very small)\n- batch_size=256 (very large)\n\n### Category 7: Tied Embeddings\n- tie_word_embeddings=True\n\n### Category 8: Very Low Warmup\n- warmup_percent=0.0\n\n### Category 9: Wrong Optimizer Settings\n- beta1=0.5, beta2=0.99\n\n## Analysis Framework\n\n### Step 1: Collect Results\nFor each intervention, collect:\n- Final validation loss for each depth (d4, d5, d6, d8, d9)\n- Check if training converged (finite loss, decreasing trend)\n- Check for divergence (NaN, inf, exploding loss)\n\n### Step 2: Compute Compute Proxy (C)\nC ∝ depth³ (parameters ∝ depth × hidden_size²)\n- d4: C = 4³/8³ = 0.125\n- d5: C = 5³/8³ = 0.244\n- d6: C = 6³/8³ = 0.422\n- d8: C = 8³/8³ = 1.0\n- d9: C = 9³/8³ = 1.425\n\n### Step 3: Fit Power Law\nFor each intervention where training converged:\n- Fit: L = a × C^(-α) + ε\n- Check R² (>0.7 for good scaling)\n- Check α (positive, reasonable 0.1-0.2 for LLMs)\n\n### Step 4: Classify Scaling Law Break\n\n#### Complete Break\n- Loss diverges (NaN, inf) or explodes\n- α undefined or negative\n- R² very low\n- **Mechanism**: Optimization failure, gradient explosion\n\n#### Floor Break\n- Loss converges but to different floor (ε)\n- α reasonable but ε different\n- **Mechanism**: Model capacity destruction, over/underfitting\n\n#### Modified Scaling\n- Power law holds but α different\n- R² good\n- **Mechanism**: Learning dynamics change, suboptimal hyperparameters\n\n#### Noisy Scaling\n- Power law holds but high variance\n- R² moderate\n- **Mechanism**: High stochasticity, chaotic training\n\n#### Preserved Scaling\n- Power law holds with similar α and ε\n- **Mechanism**: Numerical precision change, minor hyperparameter tweak\n\n### Step 5: Mechanism Analysis\nFor each break type:\n1. What's happening in training? (loss curve, gradient norms)\n2. Why does it break scaling? (optimization, capacity, data)\n3. In what compute regime? (all scales, only larger, only smaller)\n4. On what scaling axis? (model depth, data, both)\n\n## Expected Results (from prior knowledge)\n\n### Complete Breaks (Expected)\n- High LR (0.3): Divergence at all scales\n- No gradient clipping: Explosion at larger scales\n- High dropout (0.8): Model destruction\n\n### Floor Breaks (Expected)\n- Extreme weight decay (10.0): Underfitting, high loss floor\n- High dropout (0.5): Can't learn, high loss floor\n\n### Modified Scaling (Expected)\n- Very low LR (0.0001): Slow convergence, different α\n- Constant LR schedule: Different dynamics\n\n### Preserved Scaling (Expected)\n- Tied embeddings: Might still scale\n- Low warmup: Might still scale\n\n## Key Questions to Answer\n\n1. **Which interventions cause complete breaks?**\n   - High LR, no gradient clipping, extreme dropout\n\n2. **Which interventions cause floor breaks?**\n   - Extreme weight decay, high dropout\n\n3. **Which interventions cause modified scaling?**\n   - Low LR, constant LR schedule, SGD\n\n4. **In what compute regimes do breaks happen?**\n   - All scales vs. only larger scales vs. only smaller scales\n\n5. **What are the underlying mechanisms?**\n   - Optimization failure, capacity destruction, learning dynamics\n\n## Lessons for Empirical ML\n\n1. Scaling laws are empirical regularities, not guarantees\n2. Different interventions break scaling in different ways\n3. Understanding mechanisms is key to predicting breaks\n4. Need systematic experimentation with power law fitting\n5. Not all hyperparameter changes are equal for scaling",
        "sources": [
          "assignments/a1_basics/handout/page_009.png",
          "assignments/a1_basics/handout/page_010.png",
          "previous:369454a5b392:batch-00000:note-0ce72843f260a0f5268a",
          "previous:369454a5b392:batch-00000:note-fab39c6e20b1d21dc209"
        ],
        "supervised_tokens": 1173,
        "collection_batch": "batch-00006",
        "task_id": "a1-p2c",
        "assignment_part": "a1-p2c",
        "source_sha256": "6ded62cf769d84ccc458157eed398a1f142507ec44b9d8c62ca73e8fbfeca55b",
        "part_sha256": "6499b4f16b0dcb9c571880019186ed1c0acd5d79be0ddccde198bf2930f28598"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Unvalidated analysis framework",
        "assessment": "Distinguishes divergence, floor shifts and changed slopes, which can guide later analysis. The header says interventions were tested, while the substance lists expected results and future collection. The assumed depth-cubed compute proxy and fit thresholds need validation against the actual model/data scaling recipe.",
        "verification": "Reviewed full note; did not certify the named sweep as completed."
      }
    },
    {
      "sample_id": "N09",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a2",
      "population_in_stratum": 258,
      "note": {
        "note_id": "batch-00000:note-6bbc89bf6e5028940794",
        "title": "P1a Analysis: Expected Results",
        "body": "Expected findings for P1a:\n\n1. **Observed pattern**: At each token budget (153.6M, 307.2M, 614.4M), the sampled LR=0.003 gives the lowest loss:\n   - 153.6M: 3.2291 at LR 0.003\n   - 307.2M: 3.0562 at LR 0.003\n   - 614.4M: 2.9256 at LR 0.003\n\n2. **Scaling law hypothesis**: The optimal LR appears to be roughly constant across token budgets. This would suggest a power law with exponent p ≈ 0.\n\n3. **Theoretical intuition**: \n   - In online optimization, optimal LR often depends on the noise level of gradients\n   - With more data (more tokens), gradient noise decreases as O(1/√D)\n   - However, the learning rate also needs to balance convergence speed vs. stability\n   - The constant LR observation suggests that in this regime, the optimal LR is dominated by other factors (architecture, optimizer, etc.) rather than pure data scale\n\n4. **Next steps**: \n   - Fit curves to verify the optima\n   - Check if this constant LR pattern holds at larger budgets (1.2288B, 1.8432B, 2.4576B) in P1b\n   - This will inform whether we can use a single optimal LR across all scales",
        "sources": [
          "assignments/a2_hyperparameter_scaling/handout/page_004.png",
          "code/a2_release/worksheets/hparam_invariants/data/provided_sweeps.csv"
        ],
        "supervised_tokens": 350,
        "collection_batch": "batch-00000",
        "task_id": "a2-p1a",
        "assignment_part": "a2-p1a",
        "source_sha256": "5988c295f3adad5f274400ce9ee92fd1cedf030d6f41a8d655609ba5548da7e4",
        "part_sha256": "3884c3b3819f12b5774cf183c3897c46f2268cf4067f9792fb4113bbb3cef884"
      },
      "review": {
        "kind": "Reference-data synthesis",
        "verdict": "Grounded numbers with a reasoning gap",
        "assessment": "The three quoted losses and LR=0.003 agree with the supplied P1a sweep rows; the trace actually read that CSV. The note appropriately calls a constant-optimal-LR extrapolation a hypothesis. Its claim that increasing total training tokens by itself lowers gradient noise as 1/sqrt(D) is not justified when the batch sampling conditions are fixed.",
        "verification": "Checked the three numerical entries against provided_sweeps.csv and confirmed source access in the trace."
      }
    },
    {
      "sample_id": "N10",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a3",
      "population_in_stratum": 292,
      "note": {
        "note_id": "batch-00002:note-0c71358e7190a0d8e1a5",
        "title": "Problem 1: Mode Connectivity - Summary and Next Steps",
        "body": "Problem 1: Mode Connectivity - Study Summary\n\nCompleted:\n- Read the handout and starter code (p1_mode_connectivity.py, connectivity.py)\n- Understood the setup: forked runs with shared prefixes and different branch data orders\n- Identified the three stages: prefix, branches, measure\n- Fixed the experiment code to use argparse properly\n- Queued experiments for prefix and branches stages\n\nPending (will be available in follow-up):\n- Wait for experiments to complete\n- Run measure stage to compute interpolation curves\n- Analyze results and generate plots for parts (a), (b), and (c)\n\nKey concepts:\n- Midpoint barrier B = L((θ1+θ2)/2) - (L(θ1)+L(θ2))/2\n- Criterion: B ≤ 0.01 indicates successful weight averaging\n- 0.5/0.5 prediction ensemble: mixture of next-token probabilities\n- Full interpolation: θ(α) = (1-α)θ1 + αθ2 for α ∈ {0, 0.25, 0.5, 0.75, 1}\n\nPart (c) specifically asks to:\n1. Select representative cells from the heatmap in (b)\n2. Plot validation loss vs α for full interpolation\n3. Compare to midpoint barrier and ensemble\n4. Interpret what this tells us about mode connectivity\n\nUnfinished:\n- Waiting for experiment results\n- Need to generate plots and write interpretation\n- Part (d) exploration of hyperparameters affecting mode connectivity\n\nHypothesis: With constant LR after warmup, runs trained longer (higher x) should have better mode connectivity (lower barrier) than short runs. This is because longer training allows models to find smoother minima.",
        "sources": [
          "assignments/a3_optimization2/handout/page_003.png",
          "assignments/a3_optimization2/handout/page_004.png",
          "code/a3_release/experiments/a3_optimization/p1_mode_connectivity.py",
          "code/a3_release/experiments/a3_optimization/connectivity.py"
        ],
        "supervised_tokens": 383,
        "collection_batch": "batch-00002",
        "task_id": "a3-p1c-followup2-40b77da0e48b272eb3ae38d4683232e5a5113e772244d2e1f87e917f39377dce",
        "assignment_part": "a3-p1c",
        "source_sha256": "57c7c106c64346eff10019b433127bfc04ccd027767db083300bc9575e456400",
        "part_sha256": "fbc4101a9064d63afb64a4ae8cf048cf4e2608417c2581551284b3ea9375d917"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Useful but incomplete",
        "assessment": "Preserves the midpoint-barrier definition and distinguishes weight interpolation from prediction ensembling. It explicitly reports pending runs. The idea that longer training yields smoother, more connected minima is a hypothesis, not a result of the session.",
        "verification": "Reviewed full note and arithmetic of the stated midpoint-barrier definition."
      }
    },
    {
      "sample_id": "N11",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a4",
      "population_in_stratum": 156,
      "note": {
        "note_id": "batch-00000:note-bfb0146ca6059234230e",
        "title": "Problem 3(c): Summary and Next Steps",
        "body": "# Problem 3(c): Blocked Attention Residuals - Summary\n\n## Completed Work\n\n### Understanding the Implementation\n- Reviewed `p3_attention_residuals.py` thoroughly\n- Understood how `AttentionDepth` implements blocked residuals\n- Identified variants: `Block2Transformer`, `Block4Transformer`, `Block2RNN`, `Block4RNN`\n- Noted learning rates from `sweeps.py`: RNN=0.001, Transformer block2=0.001, Transformer block4=0.003\n\n### Experimental Setup\n- Requested 6 experiments:\n  - `transformer-block2` (lr=0.001)\n  - `transformer-block4` (lr=0.003)\n  - `transformer-attention` (lr=0.009, baseline)\n  - `rnn-block2` (lr=0.001)\n  - `rnn-block4` (lr=0.001)\n  - `rnn-attention` (lr=0.003, baseline)\n- Experiment IDs: `e30efc13a2560666c0eab02ab`, `e166efa3253ef037b480b50cc`\n\n### Analysis Framework\n- Created framework for comparing:\n  - Validation loss convergence\n  - Activation RMS across depth\n  - Activation-gradient RMS for L and LT\n  - Branch/input RMS ratios\n  - Adjacent-depth cosine similarity\n  - Routing weights across depth\n\n## Unfinished Work\n\n### Pending\n1. **Wait for experiments to complete** (~2 hours per experiment)\n2. **Analyze results**:\n   - Compare validation losses across variants\n   - Plot diagnostics across depth for each variant\n   - Inspect routing weight distributions\n   - Compare RNN vs Transformer behavior\n\n### Analysis Questions to Answer\n1. Do blocked residuals improve or hurt validation loss?\n2. Does B=2 outperform B=4 (more checkpoints)?\n3. How do routing weights distribute across sources?\n4. Do blocked residuals prevent attention sinks?\n5. How does signal propagation differ between B=1, B=2, B=4?\n6. Are there differences between RNN and Transformer variants?\n\n### Next Steps (After Experiments Complete)\n1. Load experiment results from `/inputs/<ID>/work`\n2. Load checkpoints and run diagnostic probes\n3. Generate plots for each diagnostic metric\n4. Compare against baselines\n5. Write synthesis of findings",
        "sources": [
          "code/a4_release/experiments/a4_stability/p3_attention_residuals.py",
          "code/a4_release/experiments/a4_stability/sweeps.py"
        ],
        "supervised_tokens": 568,
        "collection_batch": "batch-00000",
        "task_id": "a4-p3c",
        "assignment_part": "a4-p3c",
        "source_sha256": "85066543ecd6f23ad681354968f25931e7e723b46d667eb446f9aa4e907e7822",
        "part_sha256": "ae91d6866255276a7bb1cc19536443351a726469023375760f9ff90901a28b39"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Useful but incomplete",
        "assessment": "Names concrete residual variants, learning rates and diagnostics. It says the results and analysis are still pending. Claims of having a framework or having requested runs should not be counted as completed research.",
        "verification": "Reviewed full note; no new measured comparison is shown."
      }
    },
    {
      "sample_id": "N12",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a5",
      "population_in_stratum": 148,
      "note": {
        "note_id": "batch-00001:note-0e8dc81af16ea6f72128",
        "title": "Problem 4(a) Looping - Complete Analysis Summary",
        "body": "## Problem 4(a): Looping - Capacity at Fixed Applications\n\n### Problem Statement\nCompare four sharing patterns where parameters are reused across multiple applications:\n- R=1: Ordinary d8 (6 distinct core blocks, 8 total layers)\n- R=2: 3 shared core blocks, 5 total layers\n- R=3: 2 shared core blocks, 4 total layers  \n- R=6: 1 shared core block, 3 total layers\n\nAll use the same data budget (600K sequences) and evaluation protocol.\n\n### Architecture Structure\n```\nh₀ = Prelude(x)\nhₖ₊₁ = Core(hₖ)  for k = 0,...,R-1  (R applications of shared core)\nz = Coda(hᵣ)\n```\n\nBoundary interventions between passes:\n- `h = boundary(h) + recall * anchor` where `anchor = h₀`\n- `boundary` can be Identity or RMSNorm\n- `recall` controls injection strength of prelude output\n\n### Key Metrics to Compare\n1. **Validation loss** (lower is better)\n2. **Stored parameters** (should decrease with higher R)\n3. **Training compute** (FLOPs per token, same for all R)\n4. **Inference compute** (same for all R)\n\n### Parameter Count Estimates\nBaseline d8: ~34.6M parameters\n- R=1: ~34.6M (baseline)\n- R=2: ~17.3M (~50% reduction)\n- R=3: ~11.5M (~67% reduction)\n- R=6: ~5.8M (~83% reduction)\n\n### Theoretical Hypotheses\n\n#### Loss vs. R\n**Primary hypothesis**: Loss may increase with R due to signal degradation through repeated applications of the same transformation.\n\n**Mechanisms of degradation**:\n1. **Vanishing updates**: If core blocks have small updates, repeated application drives h toward anchor\n2. **Exploding updates**: Large updates can destabilize the sequence\n3. **Information bottleneck**: Single block must handle all transformations\n\n**Counter-hypothesis**: Looping is effective in some settings (Dehghani et al. 2019, Yang et al. 2024) and may provide regularization benefits.\n\n#### Signal Propagation\nUsing `signal_profile()` diagnostic:\n- **activation_rms**: RMS of hidden state per pass\n- **gradient_rms**: RMS of gradients per pass\n- **relative_update**: ||Δh||/||h|| per pass\n\nExpected patterns:\n- Without interventions: Updates decay toward zero or explode\n- With boundary_norm: Activations stabilize (prevents decay/explosion)\n- With recall: Fresh information injected (prevents forgetting)\n\n#### Boundary Intervention Effectiveness\n1. **Identity (baseline)**: No intervention, likely signal degradation\n2. **boundary_norm**: Should stabilize activations, modest improvement\n3. **recall**: Injects prelude output, may help information flow but risks instability\n4. **norm-recall**: Best of both? Stabilization + information refresh\n\n#### Generalization to Untrained R\nIf trained at R=6, evaluate at R=3 or R=12:\n- Similar loss → robust to loop count\n- Degrading loss → overfit to specific R\n\n### Code Analysis Insights\n\n#### Forward Pass (p4_looping.py)\n```python\nh = prelude(x)\nanchor = h\nfor r in range(passes):\n    for j in range(core_size):\n        index = j if tied else r*core_size + j\n        h = layers[1+index](h)\n    if r < passes-1 or final_boundary:\n        h = boundary(h) + recall*anchor\nh = coda(h)\n```\n\n#### Diagnostics (diagnostics.py)\n`signal_profile()` runs in FP32, preserves parameter gradients, returns per-pass statistics for each core application.\n\n### Expected Results Summary\n\n| R | Params | Expected Loss | Signal Behavior |\n|---|--------|---------------|-----------------|\n| 1 | 34.6M | Baseline | Stable (native d8) |\n| 2 | 17.3M | ? | May degrade |\n| 3 | 11.5M | ? | May degrade more |\n| 6 | 5.8M | ? | Likely significant degradation |\n\nWith interventions:\n- boundary_norm: Should improve stability\n- recall: Should improve information flow\n- norm-recall: Potentially best\n\n### What I Learned\n1. Looping trades parameter count for \"effective depth\" through reuse\n2. Signal propagation is critical - without stabilization, repeated applications degrade\n3. Boundary interventions are architectural knobs to control signal dynamics\n4. Generalization to untrained R tests robustness of the design\n\n### Open Questions\n1. What is the optimal R value for compute efficiency?\n2. How do interventions affect long-sequence performance?\n3. Does looping provide regularization (delayed overfitting)?\n4. Can we extrapolate loop counts effectively?\n\n### Experiment Status\n- All 8 a5-p4a experiments: **failed** (Modal auth error)\n- a5-p4b, a5-p4c experiments: **queued**\n- No reference runs available locally\n\n### Key References\n- Dehghani et al. 2019: Looping for inference-time compute scaling\n- Yang et al. 2024: Looping for reasoning tasks\n- arxiv-2609.19107.md: \"Looping adds depth without adding parameters to overfit\"",
        "sources": [
          "code/a5_release/experiments/a5_capacity/p4_looping.py",
          "code/a5_release/experiments/a5_capacity/diagnostics.py",
          "code/a5_release/tests/test_a5_capacity.py",
          "code/a5_release/experiments/a5_capacity/sweeps.py",
          "cited/arxiv-2609.19107.md",
          "assignments/a5_capacity/handout/page_007.png"
        ],
        "supervised_tokens": 1240,
        "collection_batch": "batch-00001",
        "task_id": "a5-p4a-followup1-3a1d93ede69a93863f6c87b45a7b82d072c505d711cf9f0f0c0425160b30e8cf",
        "assignment_part": "a5-p4a",
        "source_sha256": "e04cf691cb6d620bdfb8d2e80a3913c3d2f1fb8c6d36121c8b6792c1d8eb0dc9",
        "part_sha256": "3ba859e24a606c0c2d3283bc3f467f119f1a8f4819907b618833007469912828"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Material counting error",
        "assessment": "Useful description of shared-core looping, with explicit failed experiments. But dividing the entire model's parameter count by the number of passes is wrong: embeddings, prelude and coda remain. The title says complete analysis although the empirical analysis is unfinished. Its parameter table should not be used as a measured or correct parameter census.",
        "verification": "Checked released architecture: one fixed prelude, shared core, fixed coda; unchanged components cannot scale as 1/R."
      }
    },
    {
      "sample_id": "N13",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a6",
      "population_in_stratum": 183,
      "note": {
        "note_id": "batch-00000:note-22ab7915627400fb8ad3",
        "title": "A6 Problem 1(d): Exploration Architecture Designs",
        "body": "# A6 Problem 1(d): Exploration Architecture Designs\n\n## Exploration Hypotheses\n\n### Hypothesis 1: Loop with Optimized Passes/Core Size\nThe standard Loop uses 6 passes through 1 core block (3 unique blocks, 8 executed). \n**Variation**: Try different (passes, core_size) pairs that maintain same executed depth but different stored parameters.\n\nFor example:\n- **Loop-4-2**: 4 passes through 2 core blocks = 8 executed, 3 unique blocks (same params)\n- **Loop-3-2-5**: 3 passes through 2 blocks, then 5 passes through 1 block = 11 executed, 6 unique blocks\n- **Loop-2-4**: 2 passes through 4 core blocks = 8 executed, 5 unique blocks\n\n### Hypothesis 2: MoE with Fewer Experts\nStandard MoE has 4 experts. Reducing experts might improve data efficiency:\n- **MoE-2**: 2 experts, top-1 routing, quantile balancing\n  - 50% of MoE-4 capacity\n  - Should match ~2.5x dense d8 capacity\n- **MoE-3**: 3 experts, top-1 routing, quantile balancing\n  - 75% of MoE-4 capacity\n\n### Hypothesis 3: Hybrid Loop-MoE\nCombine Loop's parameter efficiency with MoE's capacity:\n- **Loop-MoE**: Use MoE as the core block in a loop structure\n  - 1 prelude, 6 passes through MoE core (1 MoE block = 4 experts), 1 coda\n  - Stores: 1 prelude + 1 MoE + 1 coda = 3 blocks worth of params\n  - Executes: 8 passes through MoE = 32 expert activations per token\n\n### Hypothesis 4: Looped Dense with Bottleneck\nA dense architecture with a bottleneck that's repeated:\n- **Bottleneck-Loop**: Narrow middle section repeated multiple times\n  - Wide prelude/coda, narrow core repeated\n  - Tests if bottleneck learning is more data-efficient\n\n## Experimental Plan\n\n### Phase 1: Baseline Runs (Required for 1b-c)\n1. Train MoE at LR 0.001, 0.003, 0.01 (32 epochs, WD 3.2)\n2. Train Loop at LR 0.001, 0.003, 0.01 (32 epochs, WD 3.2)\n3. Train Dense d8 at LR 0.003 (32 epochs, WD 3.2)\n\n### Phase 2: Exploration Runs\n1. **MoE-2**: 2-expert MoE, LR sweep (0.001, 0.003, 0.01)\n2. **Loop-4-2**: 4 passes, 2 core blocks, LR sweep\n3. **Loop-2-4**: 2 passes, 4 core blocks, LR sweep\n4. **Loop-MoE**: Loop with MoE core, LR sweep\n\n### Phase 3: Parameter Matching\nFor each exploration architecture, find a dense model with matching parameter count and compare.\n\n## Key Metrics\n- Validation NLL (primary)\n- Parameter count (for matching)\n- Training compute (FLOPs)\n- Inference compute\n\n## Implementation Notes\n- Need to modify `models.py` to support new architecture variants\n- For MoE-2, change `router=dict(quantile=True, balance=0.0, top_k=1, experts=2)`\n- For Loop variants, adjust `passes` and `core_size` parameters\n- Keep same data_seed=42 for fair comparison",
        "sources": [],
        "supervised_tokens": 841,
        "collection_batch": "batch-00000",
        "task_id": "a6-p1d",
        "assignment_part": "a6-p1d",
        "source_sha256": "ab1bbdc4b3aba8266b5acda72c8511d8fbda9d013d8f9776c8ba6fba534c4081",
        "part_sha256": "536a97d9cc97a65b9d85583f8b335a4cbffe381a93842e991d042fee99d61ab1"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Material counting error",
        "assessment": "Contains real experiment ideas, but its basic counts are inconsistent. Four passes through two core blocks plus prelude/coda execute 10 blocks and store 4 unique blocks, not 8 and 3. It also counts all four experts as active per token despite proposing top-1 routing. These errors would invalidate compute/parameter-matched comparisons.",
        "verification": "Verified against executed_depth = 2 + core_size * passes and the stated top-1 routing rule."
      }
    },
    {
      "sample_id": "N14",
      "route": "assignment",
      "stratum": "first_1M",
      "group": "a7",
      "population_in_stratum": 334,
      "note": {
        "note_id": "batch-00005:note-0969d56d6a095c6e34b9",
        "title": "Problem 2e Experiment Plan",
        "body": "Plan for Problem 2e (Full PPO experiments):\n\nFrom the handout (page 8):\n- (e) Full PPO: Restore the rest of the default agent (10 passes per batch). Train it at ℓ∈{0, 4, 16}.\n\nFrom p2_off_policy.py:\n- CORRECTIONS[\"ppo-full\"] = dict(surrogate=\"ppo\", epochs_per_batch=10)\n- This is the default agent with stale actors\n\nExperiment workflow:\n1. First, run correction_runs() at lag=4 with learning rates [1e-5, 3e-5, 1e-4] to tune\n   - This tests: none, is, is-clip1, is-clip2, is-clip5, ppo, pppo-full\n   - 7 variants × 3 seeds × 3 lrs = 63 runs at lag=4\n\n2. Then run lag_runs(best_lr) at lags 0, 4, 16\n   - 5 variants × 3 seeds × 3 lags = 45 runs\n   - (lag=4 already covered, so 30 new runs)\n\nTotal: 63 + 30 = 93 runs\n\nTo avoid resource issues, I'll run in smaller batches:\n- Phase 1: Run correction_runs at lag=4 with lr=1e-5 only (7 variants × 3 seeds = 21 runs)\n- Phase 2: Run correction_runs at lag=4 with lr=3e-5 (21 runs)\n- Phase 3: Run correction_runs at lag=4 with lr=1e-4 (21 runs)\n- Phase 4: Run lag_runs with tuned learning rates (30 runs)\n\nOr I can run all at once with modal=False (local CPU runs) which should be more manageable.",
        "sources": [
          "code/a7_rl_alchemy/experiments/p2_off_policy.py",
          "assignments/a7_exotic_rl/handout/page_008.png"
        ],
        "supervised_tokens": 416,
        "collection_batch": "batch-00005",
        "task_id": "a7-p2e-followup5-a9293f075a06646cceb019d6ced83a331c5cf30a51be0a3539f29e7629d00ede",
        "assignment_part": "a7-p2e",
        "source_sha256": "98142467aeb7395a311d12ab5318b46abad3d790ee5a86387fd1f99e1d6547a4",
        "part_sha256": "abfce5623f7f474439055c7228ae038457b72f36148212737a65f81dbaa1e443"
      },
      "review": {
        "kind": "Plan",
        "verdict": "Scope and feasibility concern",
        "assessment": "Identifies the relevant PPO-lag sweep and lays out a workflow. The 93-run plan expands beyond the immediate requested comparison; saying local CPU execution would be more manageable is not supported by a runtime estimate. This illustrates planning without demonstrated completion.",
        "verification": "Reviewed full note; sweep execution and runtime feasibility were not established."
      }
    },
    {
      "sample_id": "N15",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00010:note-721c78cc1e588b24cb2e",
        "title": "Comparing Evidence Types for LSTM Memory: What Each Reveals",
        "body": "# Comparing Evidence Types for LSTM Memory\n\n## Two Complementary Perspectives\n\nGraves (2013) and Karpathy et al. (2015) provide two fundamentally different but complementary ways of demonstrating that LSTMs have persistent features. Understanding what each approach reveals — and what it doesn't — is crucial for interpreting RNN behavior.\n\n---\n\n## Graves: Evidence Through Behavior\n\n### The Experimental Paradigm\n\n**Setup:**\n1. Train LSTM on handwriting data\n2. Take a real sequence from training data (the \"priming\" sequence)\n3. Clamp inputs to this sequence for T timesteps\n4. Sample to generate a continuation\n5. Observe the generated output\n\n**What's shown:** Figure 18 (page 37) displays priming sequences at the top of each block, with generated continuations below. The generated text exhibits stylistic traits matching the priming writer.\n\n### What This Reveals\n\n#### 1. **The Network Can Persist Information**\nThe style from the priming sequence persists into the generated continuation. This demonstrates that information can travel across many timesteps and still affect predictions.\n\n#### 2. **Memory is Not Just Short-Term Context**\nIf the network were only using recent inputs, the style would fade quickly. The persistence of style demonstrates long-term influence.\n\n#### 3. **Memory Can Be Task-Relevant**\nThe network is using memory to generate realistic handwriting, not just storing information for its own sake. The memory is functionally useful.\n\n#### 4. **Memory Can Be Abstract**\nThe network stores stylistic features (slant, cursiveness, stroke patterns) rather than specific character sequences. This is abstract, not rote memorization.\n\n### What This Doesn't Reveal\n\n1. **Which specific features are stored:** We see style persists, but we don't know which aspects of style (slant? spacing? stroke order?) are being tracked.\n\n2. **How the features are tracked:** We don't know which cells or mechanisms are responsible for the memory.\n\n3. **What the internal state looks like:** We can't observe the hidden state c or h directly.\n\n4. **Whether specific features are tracked:** We see global style persists, but not whether specific textual attributes (like quotes or parentheses) are tracked.\n\n### The Implicit Claim\n\n\"The network stores information in its state.\"\n\nThis is an **inference** from behavioral evidence. The claim is: if the output shows memory, the state must contain memory.\n\n---\n\n## Karpathy et al.: Evidence Through Mechanism\n\n### The Experimental Paradigm\n\n**Setup:**\n1. Train LSTM on text data (War and Peace, Linux Kernel)\n2. Monitor tanh(c) activations for individual cells during test set processing\n3. Visualize activation patterns over time\n4. Identify cells whose activations correlate with specific textual features\n\n**What's shown:** Figure 2 (page 5) displays activation patterns for cells that track line length, quotes, indentation, etc.\n\n### What This Reveals\n\n#### 1. **Specific Features Are Tracked**\nWe can identify exactly which features are tracked: line length, quotes, parentheses, indentation, comment blocks, etc.\n\n#### 2. **Specific Cells Are Responsible**\nWe can identify which cells track which features. This is mechanistic, not just behavioral.\n\n#### 3. **Tracking Persists Beyond Gradient Horizon**\nCells track features ~230 characters for quotes, despite truncated backprop limiting gradients to 100 characters. This demonstrates genuine long-term memory, not just gradient-driven learning.\n\n#### 4. **The Network Discovers Useful Mechanisms**\nThe cells aren't just storing arbitrary information; they're tracking features that are useful for prediction (closing quotes, matching parentheses, etc.).\n\n### What This Doesn't Reveal\n\n1. **Whether the tracked features affect output:** We see cells tracking features, but not necessarily that this tracking affects predictions.\n\n2. **How much memory the network has:** We identify some tracked features, but not the full capacity of the network.\n\n3. **Whether tracking is generalizable:** We don't know if the same cells track the same features across different tasks.\n\n4. **Whether the mechanism is optimal:** We don't know if these are the best possible mechanisms for tracking these features.\n\n### The Implicit Claim\n\n\"Specific cells track specific features.\"\n\nThis is an **observation** of mechanistic evidence. The claim is: we can observe cells whose activations correlate with specific features.\n\n---\n\n## The Complementary Nature of Both Approaches\n\n### What Each Answers\n\n| Question | Graves (Behavioral) | Karpathy et al. (Mechanistic) |\n|----------|---------------------|-------------------------------|\n| Does the network remember? | Yes (behavior shows persistence) | Yes (cells show tracking) |\n| What does it remember? | Style (global) | Specific features (local) |\n| How does it remember? | Unknown (inferred from behavior) | Specific cells track features |\n| Can we manipulate memory? | Yes (priming) | Potentially (identify cells) |\n| Is it generalizable? | Implicitly (novel sequences) | Explicitly (multiple datasets) |\n\n### The Synergy\n\n1. **Graves shows memory exists** → Karpathy et al. show what it is\n2. **Karpathy et al. identify mechanisms** → Graves shows they work\n3. **Graves demonstrates utility** → Karpathy et al. explain the mechanism\n4. **Karpathy et al. provide interpretability** → Graves shows it's not just interpretation\n\n### The Analogy\n\nThink of it like understanding a black box:\n\n- **Graves:** I press buttons and observe outputs. The output shows the box is remembering something.\n- **Karpathy et al.:** I open the box and see gears. Some gears are tracking specific inputs.\n\nBoth are necessary to understand the box.\n\n---\n\n## Connection to Lecture 08: Signal Propagation\n\nLecture 08 page 17 frames these approaches within the broader context of signal propagation:\n\n```\nPage 17 (lines 301-307):\nAdvances in sequence models with LSTMs\n~2015: Many interesting successes with LSTMs\n• Left: Generating handwriting (real valued, sequential output)\n• Right: Generating text, with LSTM cells tracking interpretable features\nGraves 2013; Karpathy, Johnson & Fei-Fei 2015\n```\n\nThis framing connects to the core questions about signal propagation:\n\n### Retention (Can information travel across time?)\n\n- **Graves:** Style persists over many characters → Yes\n- **Karpathy et al.:** Cells track features for ~230 characters → Yes\n\n### Mixing (Can the network retrieve the 'right' information?)\n\n- **Graves:** Network retrieves stylistic features → Yes (implicitly)\n- **Karpathy et al.:** Specific cells track specific features → Yes (explicitly)\n\n### Capacity (Can the network store many bits?)\n\n- **Graves:** Network generates diverse, realistic handwriting → Implicitly yes\n- **Karpathy et al.:** Multiple cells track multiple features → Implicitly yes\n\n### The Lecture's Point\n\nBoth approaches are necessary to answer the core questions about signal propagation in LSTMs. Neither alone is sufficient.\n\n---\n\n## Alternative Explanations: What Each Must Rule Out\n\n### Graves Must Rule Out\n\n1. **Pattern completion:** The network is just completing local patterns, not storing abstract features\n2. **Recency bias:** The network is using recent inputs, not long-term memory\n3. **Memorization:** The network is reproducing training data, not generalizing\n\n**How to rule out:** Show novelty, persistence beyond local context, generalization to unseen content\n\n### Karpathy et al. Must Rule Out\n\n1. **Incidental correlation:** The activations correlate by chance, not because they're tracking\n2. **Gradient artifacts:** The tracking is a side effect of gradient flow, not learning\n3. **Overfitting:** The cells are tracking features specific to the training data\n\n**How to rule out:** Show robustness across datasets, persistence beyond gradient horizon, generalization\n\n---\n\n## Synthesis: What Counts as Convincing Evidence?\n\n### For Behavioral Evidence (Graves):\n1. **Novelty:** Output must be novel, not a copy\n2. **Persistence:** Feature must persist beyond local context\n3. **Generalization:** Feature must transfer to unseen content\n4. **Control:** Experiment must isolate the feature\n\n### For Mechanistic Evidence (Karpathy et al.):\n1. **Correlation:** Activation must correlate with feature\n2. **Causation:** Activation must affect output\n3. **Persistence:** Activation must persist over time\n4. **Robustness:** Mechanism must work across contexts\n\n### The Selection Effect\n\nBoth approaches face the same fundamental selection effect:\n\n**The question:** Are we observing genuine long-term memory, or something else?\n\n- **Graves's alternative:** Pattern completion, recency bias, memorization\n- **Karpathy et al.'s alternative:** Correlation without causation, artifacts, overfitting\n\n**The common requirement:** Demonstrate that the observed behavior is not explicable by simpler, non-memory mechanisms.\n\n---\n\n## Open Questions\n\n1. **Thresholds:** What's the minimum persistence time for \"memory\"? At what point does pattern completion become memory?\n2. **Generalization:** Do the same cells track the same features across different tasks?\n3. **Causality:** Do the tracked features actually affect predictions, or are they incidental?\n4. **Capacity:** How many bits can an LSTM truly store?\n5. **Design:** Can we use Karpathy et al.'s method to design LSTMs with targeted memory capabilities?",
        "sources": [
          "cited/arxiv-1308.0850.md",
          "cited/arxiv-1506.02078.md",
          "lectures/lecture_08.md"
        ],
        "supervised_tokens": 2116,
        "collection_batch": "wave-00010",
        "task_id": "task-81a35c26e4c081dc112c"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Useful with causal caveats",
        "assessment": "Usefully distinguishes behavioral memory evidence from internal activation correlations and explicitly asks for causal tests. Some sections nonetheless overstate what correlated cells establish about mechanism or generalization. This is a useful reading synthesis, not an intervention proving a memory mechanism.",
        "verification": "Reviewed full note; historical figure claims were not independently rechecked in this audit."
      }
    },
    {
      "sample_id": "N16",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00015:note-c68ced658f3b0d40685a",
        "title": "Conceptual Distinction: Bcrit vs \"Optimal Batch Size\"",
        "body": "## Conceptual Distinction: Bcrit vs \"Optimal Batch Size\"\n\n### The Confusion\n\nBoth Kaplan et al. (2020) and MiniCPM (2024) discuss \"optimal batch size\" but with **different objectives**:\n\n| Paper | Objective | Hardware Assumption | What \"Optimal\" Means |\n|-------|-----------|---------------------|---------------------|\n| Kaplan | Time/compute tradeoff | Unlimited parallelism | Bcrit = Emin/Smin |\n| MiniCPM | Minimize tokens for loss | Fixed hardware | B that minimizes BS |\n\n### Kaplan's Bcrit: A Theoretical Construct\n\n**Definition:** Bcrit(L) is the batch size where the hyperbola (S/Smin)^(-1) × (E/Emin)^(-1) = 1 intersects the line S = E/B.\n\n**Geometric Interpretation:**\n- In (S, E) space, all points on the hyperbola reach loss L\n- Bcrit is where S = E/Bcrit\n- This is the \"balanced\" point where S = 2×Smin and E = 2×Emin\n\n**Why It's Special:**\n- At Bcrit, you get 2×Smin steps and 2×Emin examples\n- This is the point where time and compute are equally weighted\n- For unlimited parallelism, this minimizes the product S×E (and thus C)\n\n**Key Property:** Bcrit depends only on L, not on N (model size)\n\n### MiniCPM's \"Optimal\": An Empirical Fit\n\n**Definition:** The batch size that minimizes BS (total tokens) for a given loss L.\n\n**Geometric Interpretation:**\n- In (S, E) space, this is the point on the hyperbola with minimum E\n- Since E = BS, minimizing BS = minimizing E\n- This occurs at B << Bcrit where S ≈ Smin × (Bcrit/B)\n\n**Why It's Different:**\n- MiniCPM's \"optimal\" is not Bcrit—it's somewhere to the left of Bcrit\n- The fit bs = 1.21×10^9 × L^6.24 describes this regime\n- This is the compute-optimal regime, not the tradeoff regime\n\n### Visualizing the Difference\n\n```\n        E (examples)\n        ^\n        |   Hyperbola: (S/Smin)^(-1) × (E/Emin)^(-1) = 1\n        |   /\n        |  /\n        | /\n        |/\n        +------------------> S (steps)\n         \\\n          \\\n           \\\n            Smin, Emin\n```\n\n**Bcrit** is where S = E/Bcrit (the \"balanced\" point)\n**MiniCPM's optimal** is where E is minimized (the leftmost point on the hyperbola)\n\n### When They Coincide\n\nThey coincide when:\n1. Hardware allows arbitrary parallelism\n2. You want to minimize both time and compute equally\n3. You're willing to accept 2×Smin steps and 2×Emin examples\n\n### When They Diverge\n\nThey diverge when:\n1. **Fixed hardware pool:** Step time ∝ B\n   - Bcrit minimizes time/compute balance\n   - B << Bcrit minimizes compute\n   - B >> Bcrit minimizes time\n\n2. **Cost asymmetry:** Compute is more expensive than time\n   - Prefer B << Bcrit (MiniCPM's regime)\n\n3. **Time is more expensive:** Inference latency matters\n   - Prefer B >> Bcrit (time-optimal regime)\n\n### Practical Implications\n\n**Scenario 1: Cloud Training with Unlimited GPUs**\n- Use Bcrit for optimal balance\n- Kaplan's framework applies directly\n\n**Scenario 2: On-Premise with Fixed GPU Pool**\n- Use B << Bcrit to minimize compute\n- MiniCPM's fit is more relevant\n- Total time is roughly constant regardless of B\n\n**Scenario 3: Training with Cost Constraints**\n- If compute cost > time cost: B << Bcrit\n- If time cost > compute cost: B >> Bcrit\n- Bcrit is the indifference point\n\n### MiniCPM's Specific Case\n\n**From Section 3.2:**\n- Trained 0.009B, 0.03B, 0.17B models\n- Each model trained on 6 batch sizes\n- Found: bs = 1.21×10^9 × L^6.24\n\n**Interpretation:**\n- This is a fit to the compute-optimal regime (B << Bcrit)\n- The exponent 6.24 > 4.76 suggests MiniCPM's models may have different loss landscapes\n- The coefficient 1.21×10^9 > 2×10^8 suggests MiniCPM's \"optimal\" batch sizes are larger\n\n**Why Larger?**\nPossible reasons:\n1. MiniCPM's models have different gradient noise characteristics\n2. MiniCPM's hardware allows more parallelism\n3. MiniCPM's loss landscape has different curvature\n4. MiniCPM's fit includes some B >> Bcrit regime points\n\n### Key Takeaway\n\n**Don't conflate Kaplan's Bcrit with MiniCPM's \"optimal batch size\" without considering:**\n\n1. **Hardware constraints:** Can you scale parallelism arbitrarily?\n2. **Optimization objective:** Are you minimizing time, compute, or the product?\n3. **Regime:** Are you in B << Bcrit, B ≈ Bcrit, or B >> Bcrit?\n\n**For reasoning about unfamiliar experiments:**\n- If the paper fits batch size to loss directly: Likely B << Bcrit regime\n- If the paper discusses gradient noise: Likely Bcrit regime\n- If the paper mentions \"optimal allocation of compute\": Likely Bcrit tradeoff point",
        "sources": [
          "cited/arxiv-2404.06395.md",
          "readings/arxiv-2001.08361.md"
        ],
        "supervised_tokens": 1289,
        "collection_batch": "wave-00015",
        "task_id": "task-a9ef4c6353f027658178"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Material equation error",
        "assessment": "The distinction between compute and time objectives is useful. However, its displayed hyperbola is inconsistent with its own balanced point: at S=2*Smin and E=2*Emin, the displayed product of inverses equals 1/4, not 1. The crossover law needs the subtracted-one terms. The claimed mapping of MiniCPM to a particular regime is not established here.",
        "verification": "Direct substitution checks the internal equation inconsistency; compared with the cited scaling-law discussion."
      }
    },
    {
      "sample_id": "N17",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00006:note-f109184c5f2874eaf885",
        "title": "Selective SSM Toy Example: Two-State, Three-Token Recurrence",
        "body": "# Selective SSM Toy Example: Two-State, Three-Token Recurrence\n\n## Setup\n\nFollowing Algorithm 2 (SSM + Selection / S6) and Section 3.5.2 interpretations, I construct a minimal example to trace state dynamics and understand what each selective parameter controls.\n\n**Parameters:**\n- N = 2 (two states)\n- L = 3 (three tokens)\n- D = 1 (single channel for simplicity)\n\n**Continuous parameters (time-invariant):**\n- A_cont = [[-0.5, 0], [0, -0.5]]  (both states decay at rate 0.5)\n- B_cont = [[1, 0], [0, 1]]  (identity input projection)\n- C = [[1, 0]]  (only first state visible; second state is HIDDEN from output)\n\n**Discretized parameters (time-varying via Δ_t):**\n- Δ = [0.1, 2.0, 0.1]  (small, large, small)\n\n**Discretization (ZOH, Eq. 4):**\n- A_t = exp(Δ_t * A_cont) = exp(-0.5 * Δ_t) * I\n- B_t = (Δ_t * A_cont)^(-1) * (exp(Δ_t * A_cont) - I) * Δ_t * B_cont\n\nComputing these:\n- For Δ_t = 0.1: A_t = 0.9512, B_t = 10.05\n- For Δ_t = 2.0: A_t = 0.3679, B_t = 0.6321\n\n**Input sequence:** x = [1, 2, 1]\n**Initial state:** h_0 = [0, 0]\n\n## State Trajectory\n\n### t = 0 (Δ_0 = 0.1, \"weak entry\")\n- A_0 = 0.9512, B_0 = 10.05\n- h_1 = A_0 * h_0 + B_0 * x_0 = 0.9512*[0,0] + 10.05*[1,1] = [1.005, 1.005]\n- y_0 = C * h_0 = [1, 0] * [0, 0] = **0**\n\n### t = 1 (Δ_1 = 2.0, \"strong persistence reset\")\n- A_1 = 0.3679, B_1 = 0.6321\n- h_2 = A_1 * h_1 + B_1 * x_1 = 0.3679*[1.005, 1.005] + 0.6321*[2,2] = [1.264, 1.264]\n- y_1 = C * h_1 = [1, 0] * [1.005, 1.005] = **1.005**\n\n### t = 2 (Δ_2 = 0.1, \"weak entry\")\n- A_2 = 0.9512, B_2 = 10.05\n- h_3 = A_2 * h_2 + B_2 * x_2 = 0.9512*[1.264, 1.264] + 10.05*[1,1] = [12.45, 12.45]\n- y_2 = C * h_2 = [1, 0] * [1.264, 1.264] = **1.264**\n\n## What Each Parameter Controls\n\n### Δ (Delta): Gating / State Reset\n**Can control:**\n- How much the current input influences the state (via B_t)\n- How much previous state persists (via A_t)\n- Large Δ → A_t small (fast decay), B_t small (weak input) → state reset\n- Small Δ → A_t near 1 (slow decay), B_t large (strong input) → state persistence\n\n**Cannot infer from output alone:**\n- The specific Δ_t value at each step\n- Whether a state reset occurred vs. gradual decay\n- The internal state values h_t (only C * h_t is visible)\n\n### B (Input Selection): Input-to-State Coupling\n**Can control:**\n- Which inputs enter the state at each timestep\n- By making B_t selective (via s_B(x)), different inputs can be filtered\n\n**Cannot infer from output alone:**\n- The exact B_t matrix at each step\n- Whether an input was filtered or passed through\n\n### C (Output Selection): State-to-Output Coupling\n**Can control:**\n- Which state components are visible in output\n- Which state components are hidden (as in our example: second state is completely hidden)\n\n**Cannot infer from output alone:**\n- The exact C matrix (hidden states are unobservable)\n- Internal state dynamics of hidden components\n\n## Key Observations\n\n1. **Hidden state matters:** The second state component (h_2,t) is never visible in output, yet it influences future outputs through its effect on the recurrence. This demonstrates that internal state dynamics can matter even if not directly observed.\n\n2. **Δ controls both decay and input coupling:** The same Δ_t parameter controls both A_t (persistence) and B_t (input strength). This coupling is fundamental to the gating mechanism.\n\n3. **Output ≠ State:** y_t = C * h_t, but we cannot recover h_t from y_t when C is not full rank. In our example, C = [1, 0] makes the second state completely unobservable.\n\n4. **Selective parameters enable content-based reasoning:** By making Δ, B, C depend on x_t, the model can:\n   - Ignore irrelevant tokens (large Δ → state reset)\n   - Remember relevant tokens (small Δ → state persistence)\n   - Output only relevant information (selective C)\n\n## Open Questions\n\n- Can we recover Δ_t from output statistics? (Probably not without knowing C)\n- What happens if we make A selective as well as Δ? (Paper hypothesizes similar performance)\n- How does this toy example scale to realistic sequence lengths?",
        "sources": [
          "cited/arxiv-2312.00752.md Section 3.5.2",
          "cited/arxiv-2312.00752.md Algorithm 2"
        ],
        "supervised_tokens": 1425,
        "collection_batch": "wave-00006",
        "task_id": "task-59ff0d6f5a961c2d290f"
      },
      "review": {
        "kind": "Worked derivation",
        "verdict": "Material numerical and causal errors",
        "assessment": "Attempts a concrete state-space example, but the ZOH input coefficients are wrong. With A=-0.5 and B=1, Bbar=2*(1-exp(-0.5*Delta)): 0.09754 at Delta=0.1 and 1.26424 at Delta=2. The note gives 10.05 and 0.6321. With diagonal transitions and an output reading only the first state, the second state cannot affect later outputs. These errors reverse the intended gating interpretation.",
        "verification": "Recomputed the coefficients from the note's own formula and checked it against Mamba equation 4. The hidden-state claim is refuted directly by the stated diagonal recurrence."
      }
    },
    {
      "sample_id": "N18",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00010:note-37f78b7c7da63afcf282",
        "title": "Sharpness Definitions: Spectral Norm vs. Metric 2.1",
        "body": "## Two Operational Meanings of Sharpness\n\n### 1. Definitions\n\n**\"A Walk with SGD\" (AWwSGD) - Spectral Norm**\n- **Metric:** $\\lambda_{\\max}(\\nabla^2 f(x))$ (largest eigenvalue of the Hessian).\n- **Context:** Tracked along the SGD trajectory (Figure 3).\n- **Properties:**\n  - Captures the absolute maximum curvature in the entire parameter space.\n  - Local measure (at point $x$), but considers all directions.\n  - Computationally expensive (requires Hessian).\n  - Footnote 11 notes it's preferred over Frobenius norm because Frobenius sums squares of all eigenvalues (including negative ones) and can be misleading.\n\n**Keskar et al. (2016) - Metric 2.1**\n- **Metric:** $\\phi_{x,f}(\\epsilon, A) = \\frac{\\max_{y \\in C_\\epsilon} f(x + Ay) - f(x)}{1 + f(x)} \\times 100$.\n- **Neighborhood:** $C_\\epsilon = \\{z \\in \\mathbb{R}^p : -\\epsilon(|(A^\\dagger + x)_i| + 1) \\le z_i \\le \\epsilon(|(A^\\dagger + x)_i| + 1)\\}$ (a box around $x$).\n- **Subspace:** $A \\in \\mathbb{R}^{n \\times p}$ defines the directions.\n  - If $A = I_n$: Full space maximization.\n  - If $A$ is random ($p=100$): Random subspace maximization.\n- **Properties:**\n  - Empirical approximation of sharpness.\n  - For small $\\epsilon$, relates to the largest eigenvalue (Ritz value) projected onto the column-space of $A$.\n  - Designed to be computationally feasible.\n  - Explicitly depends on $\\epsilon$ and $A$.\n\n### 2. Response to a Narrow High-Curvature Direction (\"Needle\")\n\n**Spectral Norm:**\n- **Response:** Always captures it. By definition, $\\lambda_{\\max}$ is the maximum curvature over *all* directions. Even if the high-curvature direction is very narrow (small norm or specific orientation), it is included in the maximum.\n- **Implication:** Sensitive to \"needle\" sharpness. A minimum could be \"flat\" in almost all directions but \"sharp\" in one specific direction, and the spectral norm would report high sharpness.\n\n**Metric 2.1 (Keskar):**\n- **Full Space ($A=I_n$):** Captures the needle, similar to spectral norm.\n- **Random Subspace ($A$ random):** May **miss** the needle.\n  - If the high-curvature direction is orthogonal to the column-space of $A$, the maximization over $C_\\epsilon$ will not find it.\n  - The metric will approximate the Ritz value of the projection of the Hessian onto $A$'s space. If the top eigenvector is not in $A$'s space, the measured sharpness will be lower than the true spectral norm.\n  - **Text Evidence:** Keskar notes (lines 364-366) they perform maximization in random manifolds \"to avoid being mislead by the case when a large value of f is attained only in a tiny subspace\". This suggests they are concerned about outliers, but the random subspace approach inherently risks missing the specific direction of the outlier.\n\n### 3. Response to Neighborhood and Subspace Choice\n\n**Spectral Norm:**\n- **Neighborhood:** Implicitly local (derivative at $x$). Does not depend on a parameter like $\\epsilon$.\n- **Subspace:** Implicitly global (all directions).\n\n**Metric 2.1:**\n- **Neighborhood ($\\epsilon$):**\n  - Small $\\epsilon$: Linear approximation holds, relates to Hessian eigenvalues.\n  - Large $\\epsilon$: Captures non-local behavior (e.g., barriers, flat regions).\n- **Subspace ($A$):**\n  - Random $A$ provides a \"typical\" sharpness measure (bulk of spectrum).\n  - Full space $I_n$ provides a \"worst-case\" sharpness measure.\n  - The choice of $p=100$ (random subspace) is a trade-off: cheaper than full space, but might miss specific directions.\n\n### 4. Comparing Claims about Small- vs Large-Batch Solutions\n\n**Directly Comparable Claims:**\n- **Claim:** \"Small-batch methods find flatter minima; large-batch methods find sharper minima.\"\n- **AWwSGD:** Shows spectral norm decreases over training (finding flatter regions) and correlates with validation accuracy (Figure 3).\n- **Keskar:** Shows Metric 2.1 values are significantly lower for SB (Table 3) than LB (Table 4).\n- **Compatibility:** The relative ordering (SB < LB) is robust across both definitions. Both agree that noise (small batch) helps escape sharp minima.\n\n**Claims Requiring Care:**\n- **Claim:** \"Sharpness is the primary driver of generalization.\"\n- **Nuance:** The *definition* of sharpness affects what is measured.\n  - If \"sharpness\" is defined by a single narrow direction (needle), spectral norm is more sensitive.\n  - If \"sharpness\" is defined by the bulk of the spectrum (typical curvature), Keskar's random subspace metric is more representative and computationally feasible.\n- **Claim:** \"Large-batch methods converge to sharp minima.\"\n- **Nuance:** Keskar's random subspace metric might under-estimate sharpness if the large-batch minimum has a specific narrow direction of high curvature that isn't aligned with the random subspace. However, Keskar also reports full-space results (Table 3), which would catch this.\n- **Claim:** \"SGD bounces above the valley floor.\" (AWwSGD specific).\n- **Nuance:** This is a trajectory claim, not just a final minimizer claim. AWwSGD uses loss interpolation to study the path, while Keskar studies the final point. The sharpness of the *path* vs. the *destination* might differ.\n\n### 5. Summary\n\n- **Spectral Norm:** Global maximum curvature. Sensitive to all directions, including narrow ones. Expensive.\n- **Metric 2.1:** Empirical maximum curvature in a neighborhood/subspace. Flexible ($\\epsilon, A$). Random subspace approximates \"typical\" sharpness but might miss \"needle\" sharpness.\n- **Conclusion:** The two definitions are compatible for comparing SB vs. LB generalization performance, as both metrics capture the \"bulk\" sharpness that differs between the two regimes. However, care is needed when interpreting absolute values or when \"sharpness\" is dominated by a single narrow direction (needle), where spectral norm would report higher values than random-subspace Metric 2.1.",
        "sources": [],
        "supervised_tokens": 1545,
        "collection_batch": "wave-00010",
        "task_id": "task-e28de38528967dbf3a8f"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Mathematical qualifications missing",
        "assessment": "Usefully contrasts local Hessian curvature with finite-neighborhood and subspace sensitivity. But the spectral norm is the largest absolute eigenvalue, not always the largest eigenvalue for an indefinite Hessian. Maximizing over a scaled box also cannot generally be reduced to a single Ritz eigenvalue as if the domain were a Euclidean ball.",
        "verification": "Checked the mathematical definitions; the papers' complete empirical comparisons were not re-audited."
      }
    },
    {
      "sample_id": "N19",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00007:note-9632d059d304a20c52ca",
        "title": "Two Roads into Random Guessing: Why Shrinking Model vs. Data Don't Converge to Same Error",
        "body": "## The Core Question\n\nWhen we shrink a model to zero parameters (m→0) with abundant data, versus shrinking data to zero samples (n→0) with a large model, do we approach the same \"random-guess\" error? The paper's functional form assumes they do (single ϵ₀), but this is a simplification that fails for imbalanced datasets.\n\n## Key Sources of Divergence\n\n### 1. Footnote 2 (Page 5): The Assumption\n> \"Best guess when m →0 (ϵ₀ⁿ) or n →0 (ϵ₀ᵐ) need not coincide, but can, e.g., in a balanced dataset.\"\n\n**Interpretation**: The paper uses a single ϵ₀ parameter in equation (5), but this conflates two distinct limits:\n- **m→0, n→∞**: Tiny model trained on lots of data → error approaches the limit of what a trivial predictor can do\n- **n→0, m→∞**: Huge model trained on no data → error approaches the limit of what a random predictor can do\n\nThese can differ when the dataset has structure that small models can exploit but large models without data cannot.\n\n### 2. Section 8 (Page 10): The Transition Limitation\n> \"We have made a few simplifying assumptions in our choice of approximating function, in particular in how to model the transition from the initial random-guess error level and the union of the random-guess level of the two scenarios (small model with large data and large model with small data).\"\n\n**What this means**: The proposed envelope function (equation 5) uses a single complex pole to model both transitions:\n```\nε̂(m,n) = ϵ₀ * [ε̃(m,n) / (ε̃(m,n) - iη)]\n```\n\nThis assumes one unified transition from random-guess to power-law. But if ϵ₀ⁿ ≠ ϵ₀ᵐ, we actually have **two different plateaus** meeting at different heights.\n\n### 3. Figure 15 (Appendix C, Page 20): The Evidence\nWikiText-103 error landscape shows the estimated surface (b) deviating from actual (a), particularly:\n- Small model/large data region: estimated error higher than actual\n- The \"union\" of random-guess levels doesn't match either plateau\n\n**Why language modeling is special**: \n- Long-tail vocabulary (270K words in WikiText-103)\n- Balanced image datasets: ϵ₀ ≈ (N_classes-1)/N_classes is well-defined\n- Language: What's \"random guessing\"? Guessing the next token from 270K vocabulary? The error depends on whether you have data to learn frequency patterns or not.\n\n## Minimal Conceptual Modification: Two Plateaus\n\nTo properly represent the landscape, we need **two distinct random-guess levels** meeting at different heights:\n\n```\nε(m,n) = ϵ₀ⁿ when m is small, n is large\n        ε₀ᵐ when n is small, m is large\n        c∞ when both are large\n```\n\nA modified functional form could be:\n\n```\nε(m,n) = [ϵ₀ⁿ * (n/(n+δ)) + ϵ₀ᵐ * (m/(m+δ))] / 2  [transition from either plateau]\n        + b * m^(-β) + c∞                           [power-law decay]\n```\n\nOr more elegantly, using separate envelopes:\n\n```\nε(m,n) = ϵ₀ⁿ * Eₙ(m,n) + ϵ₀ᵐ * Eₘ(m,n) + c∞\n```\n\nwhere Eₙ(m,n) = 1 when m is small, decays to 0 when m is large, and vice versa for Eₘ.\n\n## Why This Matters for Language Modeling\n\nThe paper's functional form works well for balanced image classification but shows systematic errors for language modeling (see Figure 15). The deviation is **not** in the power-law region (large m, large n) but in the **transition regions** where one dimension is small.\n\nThis suggests:\n- For balanced datasets: Single ϵ₀ is fine\n- For imbalanced datasets: Need to learn ϵ₀ⁿ and ϵ₀ᵐ separately\n- The transition parameter η in the current form may need to be **dataset-specific and dimension-specific** (ηₙ vs ηₘ)\n\n## Open Questions\n\n1. What determines ϵ₀ⁿ vs ϵ₀ᵐ? Is it vocabulary size, class imbalance, or something else?\n2. Can we learn these separately with minimal additional parameters?\n3. Does this breakdown occur only for language modeling, or also for other imbalanced tasks?\n4. What's the theoretical reason small models with data can outperform large models without data? (The small model can learn frequency patterns; the large model without data has no signal.)\n\n## Practical Implications\n\nWhen extrapolating from small-scale measurements to predict large-scale behavior:\n- If you're near the random-guess plateau, extrapolation is **ill-posed** (Section D)\n- The current paper's method works well when you're **past** the transition\n- For language modeling, you need to ensure your fit region is well above both ϵ₀ⁿ and ϵ₀ᵐ plateaus\n\nThis is a crucial caveat: the paper's functional form is **not universally applicable** without modification for imbalanced datasets.",
        "sources": [
          "cited/arxiv-1909.12673",
          "cited/arxiv-1909.12673/page_005.png",
          "cited/arxiv-1909.12673/page_010.png",
          "cited/arxiv-1909.12673/page_020.png"
        ],
        "supervised_tokens": 1218,
        "collection_batch": "wave-00007",
        "task_id": "task-5e542c06fc4be6a27419"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Insightful question, invalid proposed formula",
        "assessment": "The distinction between small-data and small-model limiting errors is useful. Its proposed repair includes b*m^(-beta), which diverges as m approaches zero for positive beta; that does not implement the finite small-model plateau it aims to preserve. Proposed functional forms need asymptotic checks before being treated as a solution.",
        "verification": "Directly checked the proposed expression's small-model limit; historical figure interpretation not independently verified."
      }
    },
    {
      "sample_id": "N20",
      "route": "stronger",
      "stratum": "additional_1_to_5M",
      "group": "all",
      "population_in_stratum": 2599,
      "note": {
        "note_id": "wave-00009:note-c03a978d0bfab4227e0f",
        "title": "Distance to Region Boundary in Hanin & Rolnick (2019)",
        "body": "## Deriving the Distance Formula\n\nFor a ReLU neuron z with pre-activation z(x) = w^T x + b (where b is the bias b_z), the activation is ReLU(z(x) - b_z).\n\n**The switching hyperplane** occurs where z(x) = b_z, i.e., w^T x + b = b_z, or w^T x = b_z - b.\n\nThe standard distance from point x to hyperplane {x : w^T x = c} is:\n```\ndistance = |w^T x - c| / ||w||\n```\n\nSubstituting c = b_z - b and noting z(x) = w^T x + b:\n```\ndistance = |w^T x + b - (b_z - b)| / ||w||\n         = |z(x) - b_z| / ||w||\n```\n\nSince ∇z(x) = w (the weight vector, when the neuron is active), we get:\n```\ndistance(x, BN) = min_{neurons z} |z(x) - b_z| / ||∇z(x)||\n```\n\nThis is Equation (4) from the paper.\n\n## What This Quantity Measures\n\n**1. Local Sensitivity**\n\nThe formula measures how close an input x is to any neuron's switching point. \n\n- |z(x) - b_z|: How far the neuron's pre-activation is from its threshold\n- ||∇z(x)||: The \"steepness\" of the neuron's response\n\nWhen ||∇z(x)|| is large, the neuron's output changes rapidly with input, making the boundary \"closer\" in function space. When |z(x) - b_z| is small, we're near the kink where the neuron switches behavior.\n\nThe minimum over all neurons gives the distance to the *nearest* boundary, which determines the size of the linear region containing x.\n\n**2. Connection to Adversarial Robustness (Heuristic)**\n\nThe paper states (lines 336-339):\n> \"the distance from a typical point to BN gives a heuristic lower bound for the typical distance to an adversarial example: two inputs closer than the typical distance to a linear region boundary likely fall into the same linear region, and hence are unlikely to be classified differently.\"\n\nThis is a **heuristic** because:\n- Two points in the same linear region receive the same output (linear function), so they get the same prediction\n- An adversarial example typically requires crossing a decision boundary\n- The decision boundary is a subset of the region boundaries\n- But: the region boundary ≠ decision boundary (the decision boundary is where the output label changes, which requires both crossing a region boundary AND having the label flip)\n\nSo the distance to the region boundary is a *lower bound* on the adversarial distance, not an exact measure.\n\n## Mathematical Connection Between Boundary Volume and Distance\n\nThe proof sketch for Corollary 8 (lines 704-712) reveals the relationship:\n\n1. **Tube volume approximation**: For small ε, the volume of the ε-tube around the (n-1)-dimensional boundary scales as:\n   ```\n   vol_n(T_ε(BN) ∩ K) ≈ ε × vol_{n-1}(BN ∩ K)\n   ```\n\n2. **Probability of being far from boundary**:\n   ```\n   P(distance(x, BN) > ε) = 1 - vol_n(T_ε(BN) ∩ K) / vol_n(K)\n                         ≈ 1 - ε × vol_{n-1}(BN ∩ K) / vol_n(K)\n   ```\n\n3. **Expected distance bound**: Using E[distance] ≥ ε × P(distance > ε):\n   ```\n   E[distance(x, BN)] ≥ ε × (1 - ε × vol_{n-1}(BN ∩ K) / vol_n(K))\n   ```\n\nWhen ε is small (ε × vol_{n-1}(BN) / vol_n(K) << 1), this gives:\n```\nE[distance(x, BN)] ≥ ε\n```\n\nThis connects the (n-1)-dimensional volume density of the boundary to the expected distance:\n```\nvol_{n-1}(BN ∩ K) / vol_n(K) ≈ E[distance(x, BN)] / ε\n```\n\nTheorem 2 shows the volume density scales as O(1/#{neurons}), which implies:\n```\nE[distance(x, BN)] = Ω(1/#{neurons})\n```\n\n## Key Observations from Figures 6-7\n\n**Figure 6:**\n- Distance to nearest boundary ≈ 0.4 to 1.5 times 1/#{neurons}\n- Product of #neurons × distance is roughly constant throughout training\n- Distribution of distances varies over many orders of magnitude (log scale in Figure 7)\n\n**Figure 7:**\n- Shows log-distance distribution for a depth-4, width-16 network\n- Distribution doesn't change significantly during training\n- Heavy skew toward small distances, consistent with many small regions\n\n## Why the Adversarial Connection is Only Heuristic\n\nThe paper is careful to call this a \"heuristic lower bound\" because:\n\n1. **Region boundary ≠ decision boundary**: The network's output is linear within each region, but the decision boundary (where labels flip) is determined by the output layer. A point can be near a region boundary but still be far from any actual decision boundary.\n\n2. **Same region ≠ same label**: Even within a single linear region, the output can be on either side of the decision boundary depending on where that region sits in the output space.\n\n3. **Small distance doesn't guarantee adversarial vulnerability**: Two points near a region boundary might both be classified identically if that boundary doesn't correspond to a label change.\n\n4. **The output layer matters**: The adversarial distance depends on the entire network's output function, not just individual neuron boundaries. The output layer's weights and thresholds determine which region boundaries are actually decision boundaries.\n\n## Connection to Typical vs Worst-Case Behavior\n\nFrom related notes on stability:\n\n**Worst-case (sawtooth construction):**\n- Achieves exponential regions in depth\n- Extremely fragile: requires ε ≲ 2^(-k) to preserve regions\n- Distance to boundary can be exponentially small\n\n**Typical (random initialization, Hanin & Rolnick):**\n- Only linear regions in neuron count\n- Robust: stable under perturbations of size O(1/N)\n- Distance to boundary ≈ Ω(1/N) where N = #neurons\n\nThe distance formula captures this distinction:\n- For typical networks: |z(x) - b_z| is typically O(1), ||∇z(x)|| is O(1), so distance ≈ O(1/N)\n- For fragile constructions: |z(x) - b_z| can be exponentially small, giving exponentially small distances\n\nThe key insight: **The distance to region boundary measures how \"robustly\" the network's partition is maintained.** Typical networks have robust partitions (distance ≈ 1/N), while worst-case constructions have fragile partitions (distance can be exponentially small).\n\n## Open Questions\n\n1. How does the distribution of distances change with different activation functions (ReLU6, Leaky ReLU, etc.)?\n2. What is the relationship between distance to region boundary and actual adversarial distance on specific datasets?\n3. How do the \"good neuron\" paths (neurons that can reach the output) affect the distance formula?\n4. Why does the product #neurons × distance diverge slightly during training (Figure 6b)?\n5. What determines which region boundaries become decision boundaries?\n6. How does the distance formula relate to the co-area formula used in Theorem 3's proof?",
        "sources": [
          "readings/arxiv-1901.09021.md",
          "readings/arxiv-1901.09021/page_006.png",
          "previous:cec0a76058c7:wave-00005:note-fa8adea0793db7b3f06d"
        ],
        "supervised_tokens": 1695,
        "collection_batch": "wave-00009",
        "task_id": "task-a4a51942951888240f79"
      },
      "review": {
        "kind": "Worked derivation",
        "verdict": "Material contradiction",
        "assessment": "Recognizes that activation-region and decision boundaries differ, but earlier claims that a shared linear region means a shared output/label and that decision boundaries are subsets of activation boundaries. A linear score can cross a class threshold within a single region. It also contains inconsistent bias algebra and an unjustified boundary-volume-to-distance step.",
        "verification": "Counterexample: score f(x)=x has one linear region but changes predicted class at x=0. This disproves the categorical boundary claim without relying on an empirical benchmark."
      }
    },
    {
      "sample_id": "N21",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00000:note-6b6c03d9142420e69793",
        "title": "When to Begin Iterate Averaging: Polyak, Xing, and Hägele",
        "body": "# When to Begin Iterate Averaging: Polyak, Xing, and Hägele\n\n## Overview\n\nThree different criteria for detecting when optimization has entered a \"stable\" regime suitable for averaging:\n\n1. **Polyak (1990)**: Negative-inner-product criterion (sign changes in successive gradients)\n2. **Xing et al. (2018)**: Successive-gradient cosine metric\n3. **Hägele et al. (2024)**: Finite-window SWA with constant LR + cooldown\n\n## Polyak's Negative-Inner-Product Criterion\n\nFrom Polyak's Section 7 (page 8 of the paper):\n\n**The criterion**: For stochastic optimization problems (y_k = ∇f(x_k) + ξ_k), a criterion that we have reached a neighborhood of x* is the occurrence of **sign changes in the variables ζ_k = (y_k, y_{k+1})**.\n\n**More precisely**: If during the last 10 iterations we find **no less than 3 negative values** of ζ_k (i.e., ∑_{j=k-9}^{k} sign(ζ_j) < 4), then this k is taken as k_0 (the time to start averaging).\n\n**Intuition**: When successive gradients have negative inner products (cosine < 0), the optimizer is \"bouncing\" back and forth—suggesting it has entered a valley-like structure and is oscillating around the valley floor.\n\n**Why delay averaging until k > k_0?**\n- Early in training, the process hasn't entered a neighborhood of the solution\n- The effect of a poor initial approximation can be quite strong\n- The beginning of the asymptotic behavior will be delayed\n- Starting averaging too early would mix optimization progress with noise cancellation\n\n## Xing et al. (2018): Successive-Gradient Cosine\n\nFrom \"A Walk with SGD\":\n\n**The metric**: cos(g_{t-1}, g_t) = g_{t-1}^T g_t / (||g_{t-1}||_2 ||g_t||_2)\n\n**Key observations**:\n1. **For full-batch GD**: Cosine becomes highly negative (close to -1) after ~20 iterations, meaning consecutive gradients are almost along opposite directions\n2. **For SGD with mini-batches**: Cosine is significantly less negative, suggesting optimization is \"quickly moving away from its previous position\" rather than oscillating in the same region\n3. **Batch size effect**: Larger batch sizes → more negative cosine → optimization bouncing within the same region; smaller batch sizes → less negative cosine → more exploration\n\n**Connection to Polyak**: The successive-gradient cosine is essentially measuring the same phenomenon—whether successive gradients are pointing in opposite directions (negative inner product) or not. Polyak's criterion uses a threshold on the count of negative products; Xing et al. track the actual cosine value.\n\n**Valley floor intuition**: When cosine ≈ -1, the optimizer is \"bouncing between walls at a height above the valley floor\" (Xing et al. terminology). The valley floor has many \"ups and downs\" (barriers) that don't affect SGD dynamics because it travels at a height above the floor.\n\n## Hägele et al. (2024): Finite-Window SWA\n\nFrom \"Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations\":\n\n**Method**: Split training into fixed windows (h = 500 steps in their experiments) and average within each window. Save window averages as checkpoints every h steps.\n\n**Figure 10 observations**:\n- **Left panel (constant LR)**: SWA \"strongly boosts the loss\" during the constant LR phase, but \"a gap to the cooldown remains\"\n- **Right panel (cosine LR)**: SWA \"improves the generalization of a cosine schedule,\" where intermediate checkpoints of SWA \"largely overlap with optimal loss trajectory of shorter cosine runs\"\n\n**Key insight**: SWA effectively simulates decayed learning rates. The averaging process reduces noise and improves generalization (Wortsman et al., 2022).\n\n**Window length**: Windows below or at 2500 steps (256M tokens) are optimal. This suggests a \"finite window\" approach rather than infinite averaging.\n\n## Common Oscillation Intuition\n\nAll three approaches share a common geometric intuition:\n\n1. **Valley-like loss landscapes**: DNN loss surfaces have valley-like structures where the optimizer bounces between walls\n2. **Negative gradient correlation**: When successive gradients have negative inner products (cosine < 0), the optimizer is oscillating within a valley\n3. **Averaging as noise cancellation**: Once oscillation stabilizes, averaging the iterates cancels out the oscillatory noise and locates the valley floor\n\n**The oscillation mechanism** (Xing et al.):\n- Large learning rate → maintains large height from valley floor\n- Small batch size → injects noise facilitating exploration\n- This \"bouncing between walls at a height\" mechanism helps traverse larger distances for small batch sizes and large learning rates\n- Valley floor has barriers; exploration above the floor allows quick travel to flatter regions (better generalization)\n\n## Why Averaging Too Early or Over Too Long is Problematic\n\n### Averaging Too Early (k < k_0)\n\n**Problem**: Mixes optimization progress with noise cancellation\n\n- Early iterations are dominated by the initial approximation error\n- The asymptotic behavior hasn't begun yet\n- Averaging would dilute the progress made during early optimization\n- Polyak notes: \"the behavior of the method in the initial iterations is strongly dependent on [step size selection]\"\n\n**Mathematical insight** (Polyak): The asymptotic convergence rate Vy = O(k^{-1}) is only achieved for k >> cη²||x₀||², where c = ||A^TSA^T||^{-2}. For large initial error or ill-conditioned problems, this delay is significant.\n\n### Averaging Over Too Long a Window\n\n**Problem**: Averaging over too long a window may mix different optimization regimes\n\n- Different phases of training have different dynamics (exploration vs. exploitation)\n- Early exploration phases may have different valley structures than later fine-tuning phases\n- Hägele et al. use finite windows (h = 500 steps) rather than infinite averaging\n- \"Windows below or at 2500 steps (256M tokens) are optimal\"\n\n**The trade-off**: \n- Too short: Insufficient noise cancellation\n- Too long: Mixing different optimization regimes, potentially missing the \"optimal loss trajectory\"\n\n## Comparison Summary\n\n| Criterion | Signal | Threshold | When to Start |\n|-----------|--------|-----------|---------------|\n| Polyak | Sign changes in ζ_k = (y_k, y_{k+1}) | ≥3 negative in last 10 iterations | k > k_0 |\n| Xing et al. | cos(g_{t-1}, g_t) | Highly negative (close to -1) | When cosine ≈ -1 |\n| Hägele et al. | Fixed window averaging | h = 500 steps (optimal ≤ 2500) | Start immediately, use finite windows |\n\n**Key difference**: Hägele et al. don't delay averaging—they use finite windows throughout training, which implicitly handles the \"when to start\" question by averaging only over recent iterations.\n\n## Open Questions\n\n1. How do these criteria translate to adaptive optimizers (Adam, etc.) where gradients are pre-scaled?\n2. What is the relationship between the \"valley floor\" geometry and generalization?\n3. Can we predict k_0 (Polyak) or the optimal window length (Hägele) without trial-and-error?\n4. Why does SWA improve generalization even when the loss increases (Figure 10 left)?\n\n## References\n\n- Polyak, B. T. (1990). A new method of stochastic approximation type. Automation and Remote Control.\n- Xing, C., et al. (2018). A Walk with SGD.\n- Hägele, A., et al. (2024). Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations.",
        "sources": [
          "lectures/lecture_05.md",
          "cited/polyak-1990-stochastic-approximation.md",
          "cited/arxiv-1802.08770.md",
          "cited/arxiv-2405.18392.md"
        ],
        "supervised_tokens": 1785,
        "collection_batch": "wave-00000",
        "task_id": "task-87df932bd939dfa9bcd3"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Useful comparison with unchecked details",
        "assessment": "Connects iterate averaging, gradient oscillation and finite windows, but some exact statements are unreliable. Three negative signs among ten give a sign sum of 4, which does not satisfy the displayed strict inequality below 4. Its final question treats a quoted improvement in loss as an increase in loss, a direction-of-metric ambiguity requiring source checking.",
        "verification": "Checked the threshold arithmetic. The exact Polyak threshold and all figure descriptions were not independently re-established here."
      }
    },
    {
      "sample_id": "N22",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00000:note-9cdd9e9703c35944b7b2",
        "title": "Multi-step Augmentation Walk and Conditional Independence",
        "body": "## The Multi-step Augmentation Walk\n\nIn the HaoChen et al. paper, the \"multi-step augmentation walk\" is a theoretical construct used to justify the data assumptions without requiring conditional independence of positive pairs.\n\n### The Markov Chain Construction\nConsider a positive pair $(x_0, x^+)$ where $x^+$ is drawn from the augmentation distribution $p(\\cdot | x_0)$. We can view this as the first step of a Markov chain: $x_0 \\to x_1 \\to x_2 \\to \\dots \\to x_T$.\n- **Transition:** $x_t \\sim p(\\cdot | x_{t-1})$.\n- **Graph Interpretation:** The vertices are augmented data points, and edges connect augmentations of the same natural image (or neighbors in the augmentation space).\n\n### One-step vs. Multi-step Pairs\n\n| Property | One-step Pair $(x_0, x_1)$ | Multi-step Pair $(x_0, x_T)$ |\n| :--- | :--- | :--- |\n| **Within-class Mixing** | Low. $x_1$ is a direct neighbor of $x_0$. | High (for large $T$). $x_T$ is likely to be a random sample from the class distribution. |\n| **Cross-class Leakage** | Low (but non-zero if augmentation allows it). | Low (for large $T$). The walk stays in the class for a long time. |\n| **Conditional Dependence** | **High.** $x_0$ and $x_1$ are highly correlated even given the label. | **Low.** $x_0$ and $x_T$ are independent given the label (due to mixing). |\n\n### Why This Matters\nPrior theoretical works (e.g., Arora et al., 2019; Tosh et al., 2021) assume that positive pairs $(x, x^+)$ are **conditionally independent** given the label (or a hidden variable). This is unrealistic for computer vision augmentations (e.g., crops of the same image are highly correlated).\n\nHaoChen et al. relax this by assuming that the **Markov chain mixes within the class faster than it mixes across classes**.\n- **Formal Assumption:** There exists a $T$ such that $x_0$ and $x_T$ are likely to have the same label, but are sufficiently independent conditioned on this label.\n- **Implication:** The augmentation graph has a \"spectral gap\" or expansion property. The connected components (classes) are well-connected internally but disconnected externally.\n\n### Small Clustered Markov Chain Example\n\nConsider a graph with two classes, A and B.\n- **Class A:** Nodes $\\{1, 2, 3\\}$ with edges $(1,2), (2,3), (3,1)$.\n- **Class B:** Nodes $\\{4, 5, 6\\}$ with edges $(4,5), (5,6), (6,4)$.\n- **Inter-class edges:** None (or very weak).\n\n**Scenario:** Start at $x_0 = 1$ (Class A).\n1.  **$T=1$:** $x_1 \\in \\{2, 3\\}$. $x_1$ is highly correlated with $x_0$.\n2.  **$T=10$:** The walk has mixed within Class A. $x_{10}$ is likely $\\{1, 2, 3\\}$ with equal probability.\n    - **Independence:** $P(x_{10} | y(x_{10})=A)$ is uniform, independent of $x_0$.\n    - **Label Preservation:** $P(y(x_{10})=A) \\approx 1$ (assuming no cross-class edges).\n\n**Connection to Paper:**\nThis illustrates why the paper avoids the one-step conditional-independence assumption. In practice, $x_0$ and $x_1$ are not independent. However, the theoretical guarantee relies on the existence of *some* $T$ (potentially large) where independence holds *within the class*, while the class structure is preserved. This allows the analysis to proceed via spectral decomposition of the augmentation graph, which captures the connectivity properties that the one-step independence assumption misses.\n\n### Open Question\nWhat happens if the augmentation graph is not a union of disconnected components but has weak inter-class edges? The paper's assumption ($\\rho^{\\lfloor k/2 \\rfloor}$ large) implies a specific spectral gap. Does this correspond to a specific \"mixing time\" threshold for $T$?",
        "sources": [
          "cited/arxiv-2106.04156.md (Page 5)"
        ],
        "supervised_tokens": 1006,
        "collection_batch": "wave-00000",
        "task_id": "task-733f6363b7ab3b98c42f"
      },
      "review": {
        "kind": "Worked explanation",
        "verdict": "Useful approximate intuition",
        "assessment": "The clustered-walk example makes the within-class mixing intuition tangible. Finite-step mixing gives approximate, not automatically exact, conditional independence; weak cross-class edges require a window after local mixing but before substantial leakage. The note partly acknowledges these qualifications.",
        "verification": "Reviewed the finite-state Markov-chain reasoning; not a full verification of the paper's theorem assumptions."
      }
    },
    {
      "sample_id": "N23",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00003:note-745f7c977bdf5f6c4b61",
        "title": "Investigation Summary: Recovering Q′(1) in the Nonlinear System",
        "body": "## Investigation Summary: Recovering Q′(1) in the Nonlinear System\n\n### Completed Tasks\n\n1. **Derived Q′(1) from Q(q):**\n   - Starting from Q(q) = E[φ(√q z)²], differentiated using chain rule\n   - Q′(q) = (1/√q) E[z·φ(√q z)·φ′(√q z)]\n   - At q=1: Q′(1) = E[z·φ(z)·φ′(z)] ✓\n\n2. **Used Gaussian Integration Identity:**\n   - Stein's lemma: E[Z·f(Z)] = E[f′(Z)] for Z~N(0,1)\n   - Applied to f(z) = φ(z)·φ′(z)\n   - Result: Q′(1) = C′(1) + E[φ·φ″]\n   - This shows the relationship between the two constraints ✓\n\n3. **Explained Independence of Q(1)=1 and Q′(1)=1:**\n   - Q(1)=1 fixes the scaling parameter γ (output variance)\n   - Q′(1)=1 constrains the shape parameters (α, β, δ)\n   - These are fundamentally different: amplitude vs. derivative structure\n   - Normalization alone cannot control derivative correlations ✓\n\n### Key Insights\n\n**The Q/C Map Framework:**\n- Q maps track variance propagation through layers\n- C maps track correlation propagation through layers\n- Degenerate C maps (converging to constants) cause training instability\n- Well-behaved C maps (close to identity) enable stable deep training\n\n**The TAT Method:**\n- Uses transformed activation φ̂(x) = γ(φ(αx+β)+δ)\n- Solves a 3D nonlinear system (Eq. 16) for parameters\n- γ determined by Q(1)=1, remaining parameters by (16a)-(16c)\n\n**Why Independence Matters:**\n- Without Q′(1)=1, derivative correlations would drift through depth\n- This would cause gradient instability even if variance is normalized\n- The three conditions (16a-c) jointly ensure well-behaved dynamics\n\n### Open Questions\n\n1. **Analytical solutions?** The paper uses numerical solvers. Can we find closed-form solutions for specific activations?\n\n2. **Non-smooth activations?** The derivation assumes smooth φ. How do we handle ReLU where φ″ doesn't exist?\n\n3. **Finite-depth effects?** The Q/C map analysis is asymptotic (infinite width). What happens at finite width and finite depth?\n\n4. **Relationship to other methods:** How do these conditions compare to EOC, DKS, or other initialization schemes?\n\n### Files/Notes Created\n\n- `note-83b4fcb9751f35101631`: Derivation of Q′(1) and Gaussian integration\n- `note-5ae1b8a3500b38783713`: Relationship between Q′(1) and C′(1)\n- `note-28535cb400d7a45bbfb2`: Summary of Q/C maps and TAT method",
        "sources": [
          "cited/arxiv-2203.08120.md (equations 4, 14, 15, 16, 17, 18)"
        ],
        "supervised_tokens": 719,
        "collection_batch": "wave-00003",
        "task_id": "task-80ea1b73edddd79a4bad"
      },
      "review": {
        "kind": "Worked derivation",
        "verdict": "Sound core derivation",
        "assessment": "Correctly differentiates Q(q)=E[phi(sqrt(q)Z)^2] and applies Stein's identity to obtain Q'(1)=E[phi'(Z)^2+phi(Z)phi''(Z)], under the usual smoothness/integrability conditions. This is a concrete example of useful mathematical reasoning. The broader claims about stable finite-width training require separate evidence.",
        "verification": "Independently checked the displayed differentiation and integration-by-parts identity; no empirical stability guarantee inferred."
      }
    },
    {
      "sample_id": "N24",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00000:note-e17269fc0204011fc113",
        "title": "EfficientNet Scaling: Continuous Formula vs. Discrete Implementation",
        "body": "**EfficientNet Compound Scaling (Tan & Le, 2019)**\n\nThe paper introduces a compound scaling method to uniformly scale network width, depth, and resolution.\n\n**Scaling Formula (Equation 3):**\nFor a model scaled by a compound coefficient $\\phi$:\n*   Depth: $d = \\alpha^\\phi$\n*   Width: $w = \\beta^\\phi$\n*   Resolution: $r = \\gamma^\\phi$\n*   Constraint: $\\alpha \\cdot \\beta^2 \\cdot \\gamma^2 \\approx 2$ (ensures FLOPS scale by $2^\\phi$)\n\n**Two-Step Process:**\n1.  **Step 1 (Grid Search)**: Fix $\\phi=1$ (assuming 2x FLOPS relative to baseline). Search for optimal $\\alpha, \\beta, \\gamma$.\n    *   Found values for EfficientNet-B0: $\\alpha=1.2$, $\\beta=1.1$, $\\gamma=1.15$.\n2.  **Step 2 (Scaling)**: Fix $\\alpha, \\beta, \\gamma$ as constants. Scale the baseline (B0) with different $\\phi$ to obtain B1, B3, B4, etc.\n\n**Tracing B0 Stages for $\\phi=1$ (Continuous Values):**\nUsing $\\alpha=1.2, \\beta=1.1, \\gamma=1.15$, we trace two contrasting stages from Table 1 before integer rounding.\n\n*   **Stage 1 (Early, High-Resolution)**:\n    *   Original (B0): $L=1$, $C=32$, $R=224 \\times 224$.\n    *   Scaled ($\\phi=1$):\n        *   Depth: $1 \\times 1.2^{1} = 1.2$ layers\n        *   Width: $32 \\times 1.1^{1} = 35.2$ channels\n        *   Resolution: $224 \\times 1.15^{1} = 257.6$ pixels\n*   **Stage 8 (Late, High-Channel)**:\n    *   Original (B0): $L=1$, $C=320$, $R=7 \\times 7$.\n    *   Scaled ($\\phi=1$):\n        *   Depth: $1 \\times 1.2^{1} = 1.2$ layers\n        *   Width: $320 \\times 1.1^{1} = 352$ channels\n        *   Resolution: $7 \\times 1.15^{1} = 8.05$ pixels\n\n**Why Discrete Design Choices are Necessary:**\nThe continuous formula provides ideal ratios, but implementation requires discrete, integer-valued parameters.\n\n1.  **Layers (Depth)**: Must be an integer. $1.2$ layers is impossible. Must round to 1 or 2.\n2.  **Channels (Width)**: Must be an integer. Often rounded to multiples of 8 or 16 for efficiency (e.g., 35.2 $\\to$ 32 or 40).\n3.  **Resolution**: Must be an integer and divisible by kernel sizes (e.g., 3x3, 5x5). $257.6 \\to 256$ (common power of 2). $8.05 \\to 8$.\n\n**Implications:**\n*   Rounding deviates from the theoretical scaling law, affecting actual FLOPS and parameters.\n*   The \"discrete design choices\" are the rounding strategies (e.g., rounding up/down, choosing nearest multiple of 8).\n*   The continuous formula guides the search, but the final architecture is a result of these discrete constraints.\n\n**Open Question:**\nHow do the rounding strategies (e.g., always round up vs. nearest multiple of 8) impact the accuracy-efficiency trade-off? The paper mentions the search is done on the small baseline, but the rounding effects might vary across stages.",
        "sources": [
          "cited/arxiv-1905.11946.md",
          "cited/arxiv-1905.11946/page_005.png"
        ],
        "supervised_tokens": 912,
        "collection_batch": "wave-00000",
        "task_id": "task-4ccf2e2058b3aee6b796"
      },
      "review": {
        "kind": "Worked explanation",
        "verdict": "Useful arithmetic with implementation error",
        "assessment": "The compound-scaling arithmetic and need for integer rounding are useful. The claim that image resolution must be divisible by convolution kernel sizes is false in general; padding and stride determine output sizes. Powers of two are not a universal resolution requirement.",
        "verification": "Checked the numerical multiplications and standard convolution dimension arithmetic; no entire EfficientNet implementation audit claimed."
      }
    },
    {
      "sample_id": "N25",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00002:note-6cd11f0ce5b5e0bc4304",
        "title": "Load-Balancing in the Context of Expressivity",
        "body": "# Load-Balancing in the Context of Expressivity\n\nThis lecture is titled \"Expressivity\" — what functions can a neural network represent? The Switch Transformer's load-balancing mechanism connects to expressivity in several important ways.\n\n## Expressivity vs. Efficiency Trade-off\n\n### The MoE Expressivity Claim\n\nMoE models like Switch Transformer claim to increase expressivity **without increasing compute**:\n- **Total parameters**: Can be trillions (far more than dense models)\n- **Compute per token**: Same as a dense model (only activated parameters count)\n- **Expressivity**: Potentially higher due to more parameters\n\n### The Load-Balancing Role\n\nLoad-balancing ensures this expressivity potential is **realized in practice**:\n\n| Without Load-Balancing | With Load-Balancing |\n|------------------------|---------------------|\n| Experts collapse to a few | All experts contribute |\n| Wasted parameters | Full parameter utilization |\n| Limited expressivity | Expressivity scales with N |\n\n## Why Load-Balancing Matters for Expressivity\n\n### 1. Preventing Expert Death\n\nIf experts become unused:\n- Their parameters stop being updated\n- They effectively disappear from the model\n- **Expressivity loss**: The model can't leverage those parameters\n\nLoad-balancing ensures all experts remain active, maintaining the full expressivity potential.\n\n### 2. Enabling Specialization\n\nGood load-balancing doesn't mean uniform usage — it means **balanced opportunity**:\n- Token A might need Expert 1 (specialized for fact retrieval)\n- Token B might need Expert 2 (specialized for reasoning)\n- Token C might need Expert 3 (specialized for creativity)\n\nThe load-balancing loss ensures each expert gets enough tokens to learn its specialization, without starving other experts.\n\n### 3. Scaling Laws\n\nKaplan et al. (2020) showed scaling laws: performance improves with compute, data, and parameters. Switch Transformer enables:\n- **Parameter scaling**: More experts = more parameters\n- **Compute efficiency**: Same compute, more parameters\n- **Expressivity scaling**: Better performance through larger parameter count\n\nLoad-balancing is the mechanism that makes this scaling work.\n\n## The Gradient as an Expressivity Signal\n\nThe load-balancing gradient ∂loss/∂p_i(x) ∝ f_i can be seen as:\n\n```\n∂loss/∂p_i(x) = signal about \"how much expressivity expert i is currently contributing\"\n```\n\n- **High f_i**: Expert i is overused → reduce its influence (decrease p_i)\n- **Low f_i**: Expert i is underused → increase its influence (increase p_i)\n\nThis creates a **dynamic expressivity allocation** where the model adjusts routing based on current expert utilization.\n\n## Comparison to Other Expressivity Mechanisms\n\n### Depth vs. Width (Telgarsky)\n- **Depth**: Allows for \"folding\" to create high-frequency functions\n- **Width**: More parallel computation\n- **MoE**: More parameters without more compute\n\nLoad-balancing in MoE is analogous to **regularization for width**: it ensures all \"width\" (experts) is actually used.\n\n### Dropout\n- **Dropout**: Randomly disables units during training\n- **Load-balancing**: Encourages uniform usage across experts\n\nBoth are regularization techniques, but load-balancing is more targeted to the MoE architecture.\n\n### Batch Normalization\n- **Batch norm**: Normalizes activations to stabilize training\n- **Load-balancing**: Normalizes expert usage to stabilize routing\n\nBoth provide stability for training dynamics.\n\n## Open Questions About Expressivity\n\n### Q1: Does Load-Balancing Limit Expressivity?\n\n**Hypothesis**: Yes, in some cases.\n\nIf the task naturally requires certain experts to handle most tokens, forcing uniform usage could:\n- Prevent experts from specializing optimally\n- Force \"wrong\" experts to process certain tokens\n- **Result**: Potentially worse task performance\n\n**Test**: Compare load-balanced vs. unbalanced models on tasks with clear expert preferences.\n\n### Q2: Is the Linear Penalty Optimal?\n\nThe loss is linear in f_i · P_i:\n```\nloss = Σ f_i · P_i\n```\n\n**Alternative**: Quadratic penalty\n```\nloss = Σ (f_i - 1/N)²\n```\n\nThis would penalize imbalance more strongly. But it's non-differentiable (depends on f_i).\n\n**Test**: Try different loss formulations in experiments.\n\n### Q3: Should Load-Balancing Be Task-Aware?\n\nCurrent design: Load-balancing is **task-agnostic**.\n\n**Idea**: Weight load-balancing by task difficulty:\n```\nloss = Σ w_i · f_i · P_i\n```\nwhere w_i reflects expert i's task relevance.\n\n**Challenge**: How to learn w_i?\n\n## Practical Implications\n\n### When Load-Balancing Helps:\n1. **Large N, small T**: Need to prevent expert collapse\n2. **Dynamic tasks**: Token needs vary, no fixed expert specialization\n3. **Scaling experiments**: Want to verify all experts are used\n\n### When Load-Balancing Might Harm:\n1. **Small N**: Overhead might not be worth it\n2. **Highly specialized tasks**: Natural routing is already balanced\n3. **Low compute regime**: Load-balancing gradient adds overhead\n\n## Summary\n\nLoad-balancing in Switch Transformers is a **mechanism to realize expressivity potential**. By ensuring all experts are used, it enables:\n- Full utilization of the parameter budget\n- Dynamic specialization across tokens\n- Scalable expressivity with constant compute\n\nThe gradient design (proportional to f_i) is simple but effective, creating a global signal that pushes toward uniform expert utilization while allowing task-driven routing to determine which expert handles which token.\n\nThis connects back to the lecture's theme: expressivity isn't just about what functions a network *can* represent, but what it *prefers* to represent given its architecture and training dynamics.",
        "sources": [
          "lectures/lecture_09.md",
          "cited/arxiv-2101.03961.md",
          "note-d7bb54146ade08053522"
        ],
        "supervised_tokens": 1286,
        "collection_batch": "wave-00002",
        "task_id": "task-f1f3e8043bb36475aa74"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Useful hypothesis generation",
        "assessment": "Explains why routing collapse can waste expert capacity and proposes reasonable ablations. It often uses guarantee-like language for a soft balancing objective: the loss encourages utilization but does not ensure every expert remains active or prove expressivity gains. Its hypotheses are useful prompts for experiments rather than results.",
        "verification": "Reviewed the distinction between an optimization incentive and a guarantee; no new experiment is reported."
      }
    },
    {
      "sample_id": "N26",
      "route": "stronger",
      "stratum": "first_1M",
      "group": "all",
      "population_in_stratum": 676,
      "note": {
        "note_id": "wave-00000:note-7ce950251147fc26526e",
        "title": "Noiseless Theorem vs. Empirical Claims: Label Noise and Double Descent",
        "body": "## The Fundamental Gap: Noiseless vs. Noisy Settings\n\n### Theorem 1 (Noiseless)\n\n**Assumptions:**\n- Labels are noiseless: y_i = h*(x_i) exactly\n- h* ∈ H∞ (Gaussian RKHS)\n- h interpolates the data: h(x_i) = y_i\n\n**Conclusion:**\n- Uniform error is bounded: ||h - h*||_∞ ≤ O((n/log n)^{1/d}) (||h*|| + ||h||)\n- This implies good generalization to test points\n\n**Limitation:**\n- The bound degrades exponentially in dimension d\n- Cannot explain why deep learning works in high dimensions\n\n### Empirical Claims (Noisy Setting)\n\n**Observation:**\n- In practice, labels are noisy: y_i = h*(x_i) + ε_i\n- Modern practice trains to zero training loss (interpolation) even with noise\n- Minimum norm interpolants still generalize well\n\n**Key Empirical Evidence:**\n1. Zhang et al. (2017) [4]: Neural networks achieve ≈0 training error even when labels are randomized\n2. Belkin et al. (2019) [42]: Minimum norm interpolants generalize well despite label noise\n\n**The Puzzle:**\nIf labels are noisy, interpolating them means learning the noise! How can ||h - h*|| be small when h(x_i) = y_i = h*(x_i) + ε_i?\n\n## Reconciling the Gap\n\n### Possibility 1: The Minimum Norm Solution is \"Robust\"\n\nThe minimum norm interpolant h_{n,∞} might be robust to noise because:\n- It chooses the \"simplest\" interpolant (smallest RKHS norm)\n- Simple functions might be less sensitive to noise\n\n**But wait:** If h interpolates noisy labels, then ||h - h*||_∞ ≥ ||ε||_∞ (at the training points). The theorem's bound doesn't directly apply.\n\n### Possibility 2: Test Points Are Different from Training Points\n\nThe fill-distance bound controls error over the training domain Ω. But:\n- Test points come from the same distribution P\n- The bound is uniform over Ω, so it applies to test points too\n- But only if h is close to h* on the training set\n\n**The contradiction:** If h interpolates noisy labels, it can't be close to h* on the training set.\n\n### Possibility 3: Implicit Regularization Beyond RKHS Norm\n\nPerhaps the minimum norm solution has additional properties:\n- It might not just minimize ||h||_{H∞}\n- It might implicitly regularize in other ways (e.g., spectral bias, flat minima)\n\n## What the Paper Actually Claims\n\nFrom page 14-15:\n\n> \"While these bounds apply only in the noiseless setting, they provide a justification for the inductive bias based on choosing a solution with a small norm. Indeed, there is significant empirical evidence that minimum norm interpolating solutions generalize well on a variety of datasets, even in the presence of large amounts of label noise [4].\"\n\n**Key distinction:** The theorem justifies the *inductive bias* (small norm), but doesn't prove generalization in the noisy setting. The empirical claim is separate.\n\n## The Double Descent Connection\n\n### Classical Regime (N < n)\n- Bias-variance tradeoff applies\n- Test risk is U-shaped\n- Sweet spot at N ≈ √n log n\n\n### Interpolating Regime (N ≥ n)\n- Training risk = 0 (interpolation)\n- Test risk initially high at N = n (interpolation threshold)\n- Then decreases as N increases (second descent)\n\n**Why does test risk decrease after N = n?**\n\nThe paper's mechanism:\n1. Larger function class H_N contains more candidate functions\n2. Among interpolants, we choose the minimum norm one\n3. As N increases, we can find interpolants with smaller norm\n4. Smaller norm → better generalization (via Theorem 1)\n\n**But this assumes noiseless data!**\n\n## Open Questions\n\n1. **Why does minimum norm interpolation work with noise?**\n   - Does it learn h* + small_noise rather than h* + large_noise?\n   - Is the RKHS norm bound still relevant?\n\n2. **What regularizes the minimum norm solution?**\n   - Is it just the RKHS norm?\n   - Are there other implicit regularizers at play?\n\n3. **Does the fill-distance argument extend to noisy settings?**\n   - If not, what mechanism explains generalization with noise?\n   - Is there a different bound needed?\n\n4. **Why does test risk decrease as N increases?**\n   - The paper attributes this to finding lower-norm interpolants\n   - But with noise, lower-norm interpolants should overfit less...\n   - What's the precise mechanism?\n\n## Summary Table\n\n| Aspect | Noiseless Theorem | Empirical Claim |\n|--------|------------------|-----------------|\n| Labels | y_i = h*(x_i) | y_i = h*(x_i) + ε_i |\n| Interpolation | h(x_i) = h*(x_i) | h(x_i) = h*(x_i) + ε_i |\n| Error bound | ||h - h*|| small | ??? |\n| Generalization | Guaranteed by theorem | Empirically observed |\n| Mechanism | Fill distance + RKHS norm | Unknown / different? |\n\nThe theorem provides a *mechanism* (small RKHS norm interpolants generalize) that works in the noiseless setting. Whether the same mechanism applies to noisy settings is an open question—the paper claims empirical evidence but no theoretical proof.",
        "sources": [
          "cited/arxiv-1812.11118.md",
          "cited/arxiv-1812.11118/page_015.png",
          "cited/arxiv-1812.11118.md (page 14-15)"
        ],
        "supervised_tokens": 1252,
        "collection_batch": "wave-00000",
        "task_id": "task-34ef02cdc59482194bea"
      },
      "review": {
        "kind": "Literature synthesis",
        "verdict": "Material theorem-transcription error",
        "assessment": "Correctly highlights that a noiseless theorem does not prove noisy-label generalization, and recognizes that interpolation of noise prevents a small uniform error at training points. However, it drops the negative exponential in the theorem bound, replacing a decaying factor with a growing power. The theorem cannot be safely reconstructed from this note alone.",
        "verification": "Checked the frozen cited paper, Theorem 1: the factor is A*exp(-B*(n/log n)^(1/d))."
      }
    }
  ],
  "reviewer": "Single AI-assisted qualitative review; reviewer knew aggregate evaluation results. Full text of all 26 sampled notes was read. Not all individual claims were independently verified."
}
