summaryrefslogtreecommitdiff
path: root/experiments/plot_main_figures.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 10:15:30 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 10:15:30 -0500
commit07a9d5afe08fee5824c325edfb3807a2f9aede8f (patch)
treebcaca065f27d22c1b6b68a71ae71376f004340c1 /experiments/plot_main_figures.py
parent4865d62a86f62ffaa073a734a3ab3cbb69f1e8b8 (diff)
figures: generate claim-bounded captions
Diffstat (limited to 'experiments/plot_main_figures.py')
-rw-r--r--experiments/plot_main_figures.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/experiments/plot_main_figures.py b/experiments/plot_main_figures.py
index 23b4cc9..7b17b2c 100644
--- a/experiments/plot_main_figures.py
+++ b/experiments/plot_main_figures.py
@@ -471,6 +471,31 @@ def file_hash(path):
return h.hexdigest()
+def figure_captions(preview):
+ prefix = "**PREVIEW — incomplete cells remain.**\n\n" if preview else ""
+ return prefix + """# Main figure captions
+
+**Figure 1 | Accuracy–cost trade-offs for local learning.** Points and error bars show mean ±
+sample standard deviation across five initialization seeds; wall time was measured on a single
+GTX 1080. **a,** CIFAR-10 test accuracy versus wall time for width-64 residual MLPs trained for
+five epochs. The black line is the mean-based nondominated frontier among local-learning methods.
+BP is a nonlocal reference and is excluded from frontier construction. Labels give hidden depth.
+**b,** SDIL versus canonical equilibrium propagation (EP) on exact 784–500–10 (d1) and
+784–500–500–10 (d2) forward architectures, the same first 50,000 MNIST training examples, and the
+same epoch counts. EP retains its published raw-pixel, hard-sigmoid energy dynamics and relaxation
+schedule; SDIL retains its z-scored, tanh feedforward dynamics. Thus architecture, examples, and
+epochs are matched, but preprocessing and state dynamics are intentionally method-native.
+
+**Figure 2 | Credit-assignment scaling in deep local-learning networks.** Mean ± sample standard
+deviation across five seeds on the same CIFAR-10 width-64 residual MLP protocol. **a,** Test
+accuracy versus hidden depth. **b,** Paired accuracy gap from the exact-BP model with the same
+depth and initialization seed. **c,** Mean per-sample cosine between the teaching signal and exact
+descent direction, averaged over the earliest third of hidden layers. Exact gradients are used only
+for this diagnostic, never for local learning. “Scaling” here means preserving useful accuracy and
+credit assignment as depth grows; flattened-CIFAR accuracy itself does not increase with depth.
+"""
+
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--results", default="results")
@@ -494,10 +519,13 @@ def main():
"sources": [{"path": p, "sha256": file_hash(p)} for p in source_paths],
"statistics": audited_statistics(args.results),
"outputs": ["figure1_pareto.pdf", "figure1_pareto.png",
- "figure2_scaling.pdf", "figure2_scaling.png"],
+ "figure2_scaling.pdf", "figure2_scaling.png",
+ "main_figure_captions.md"],
}
with open(os.path.join(args.outdir, "main_figure_manifest.json"), "w") as f:
json.dump(manifest, f, indent=2)
+ with open(os.path.join(args.outdir, "main_figure_captions.md"), "w") as f:
+ f.write(figure_captions(preview=not strict))
print(f"rendered figures from {len(source_paths)} audited result files; "
f"missing cells={len(manifest['missing_cells'])}")