From 646f890833e2d3ff159debe45c186988e7081b16 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Sat, 29 Aug 2026 13:27:33 -0500 Subject: fig: summarize the full physical grid crossover --- experiments/plot_physical_grid_p5.py | 9 +- results/figs/physical_grid_p5_full.pdf | Bin 0 -> 30869 bytes results/figs/physical_grid_p5_full.png | Bin 0 -> 162872 bytes results/figs/physical_grid_p5_full.svg | 1476 ++++++++++++++++++++++++++ visual-composer/physical-grid-p5-contract.md | 7 +- 5 files changed, 1485 insertions(+), 7 deletions(-) create mode 100644 results/figs/physical_grid_p5_full.pdf create mode 100644 results/figs/physical_grid_p5_full.png create mode 100644 results/figs/physical_grid_p5_full.svg diff --git a/experiments/plot_physical_grid_p5.py b/experiments/plot_physical_grid_p5.py index bc86647..35125d4 100644 --- a/experiments/plot_physical_grid_p5.py +++ b/experiments/plot_physical_grid_p5.py @@ -49,10 +49,10 @@ def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser() parser.add_argument( "--input", type=Path, - default=Path("results/physical_bias/p5_grid_bias_crossover.json")) + default=Path("results/physical_bias/p5_full_grid_bias_crossover.json")) parser.add_argument( "--output-prefix", type=Path, - default=Path("results/figs/physical_grid_p5")) + default=Path("results/figs/physical_grid_p5_full")) return parser.parse_args() @@ -140,8 +140,11 @@ def main() -> None: axes[1], records, ("overclamp", "overclamp_sdil"), "(b) Composition with overclamping") axes[0].set_ylabel("Classification error (%)") + diameters = sorted({record["input_diameter_v"] for record in records}) + trials_per_diameter = sum( + record["input_diameter_v"] == diameters[0] for record in records) axes[1].text( - 0.98, 0.82, "8 trials per input diameter", + 0.98, 0.62, f"{trials_per_diameter} trials per input diameter", transform=axes[1].transAxes, ha="right", va="top", fontsize=8, color="#666666") args.output_prefix.parent.mkdir(parents=True, exist_ok=True) diff --git a/results/figs/physical_grid_p5_full.pdf b/results/figs/physical_grid_p5_full.pdf new file mode 100644 index 0000000..5408845 Binary files /dev/null and b/results/figs/physical_grid_p5_full.pdf differ diff --git a/results/figs/physical_grid_p5_full.png b/results/figs/physical_grid_p5_full.png new file mode 100644 index 0000000..ef25f0a Binary files /dev/null and b/results/figs/physical_grid_p5_full.png differ diff --git a/results/figs/physical_grid_p5_full.svg b/results/figs/physical_grid_p5_full.svg new file mode 100644 index 0000000..3fd95a7 --- /dev/null +++ b/results/figs/physical_grid_p5_full.svg @@ -0,0 +1,1476 @@ + + + + + + + + 2026-08-29T13:27:26.956331 + image/svg+xml + + + Matplotlib v3.10.8, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 83.4 + + + + + + + + + + 166.8 + + + + + + + + + + 250.2 + + + + + + + + + + 333.5 + + + + + + + + + + 416.9 + + + + Input diameter (mV) + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 20 + + + + + + + + + + + + + 40 + + + + + + + + + + + + + 60 + + + + + + + + + + + + + 80 + + + + Classification error (%) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (a) Standard local learning + + + + + + + + + + Raw local update + + + + + + + + + Constant calibration + + + + + + + + + SDIL + + + + + + + + + + + + + + + + 83.4 + + + + + + + + + + 166.8 + + + + + + + + + + 250.2 + + + + + + + + + + 333.5 + + + + + + + + + + 416.9 + + + + Input diameter (mV) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 32 trials per input diameter + + + (b) Composition with overclamping + + + + + + + + + + Overclamping + + + + + + + + + Overclamping + SDIL + + + + + + + + + + + + + diff --git a/visual-composer/physical-grid-p5-contract.md b/visual-composer/physical-grid-p5-contract.md index 1c7b448..f938f1c 100644 --- a/visual-composer/physical-grid-p5-contract.md +++ b/visual-composer/physical-grid-p5-contract.md @@ -5,11 +5,10 @@ - Core claim: local state-dependent residualization restores physical local learning and composes with overclamping. - Reviewer question: does SDIL improve downstream classification over raw learning, constant calibration, and overclamping under the same component imperfections? - Evidence layer: main result. -- Source data: `results/physical_bias/p5_grid_bias_crossover.json`. -- Statistics: eight trials per input diameter (two label rotations by four device draws); show every trial and the arithmetic mean, without inferred uncertainty intervals. +- Source data: `results/physical_bias/p5_full_grid_bias_crossover.json`. +- Statistics: 32 trials per input diameter (eight label rotations by four device draws); show every trial and the arithmetic mean, without inferred uncertainty intervals. - Panel map: (a) raw, per-edge constant calibration, and SDIL under standard clamping; (b) overclamping and overclamping plus SDIL. - Labels: classification error (%), input diameter (mV), method names, eight trials per diameter. - Caption role: state the physical-grid setting, trial count, component-error model, and perfect-result counts without extending the evidence to hardware measurements. -- Output: `results/figs/physical_grid_p5.{svg,pdf,png}`. +- Output: `results/figs/physical_grid_p5_full.{svg,pdf,png}`. - Traceability: plotting code reads the committed JSON directly; no values are copied by hand. - -- cgit v1.2.3