diff --git a/paper/figures/fig_crossover_theory.pdf b/paper/tex/figures/fig_crossover_theory.pdf similarity index 100% rename from paper/figures/fig_crossover_theory.pdf rename to paper/tex/figures/fig_crossover_theory.pdf diff --git a/paper/figures/fig_regime_map.pdf b/paper/tex/figures/fig_regime_map.pdf similarity index 99% rename from paper/figures/fig_regime_map.pdf rename to paper/tex/figures/fig_regime_map.pdf index 20bb76a..8abdf45 100644 Binary files a/paper/figures/fig_regime_map.pdf and b/paper/tex/figures/fig_regime_map.pdf differ diff --git a/paper/figures/fig_repair.pdf b/paper/tex/figures/fig_repair.pdf similarity index 100% rename from paper/figures/fig_repair.pdf rename to paper/tex/figures/fig_repair.pdf diff --git a/paper/figures/fig_repair_accuracy.pdf b/paper/tex/figures/fig_repair_accuracy.pdf similarity index 100% rename from paper/figures/fig_repair_accuracy.pdf rename to paper/tex/figures/fig_repair_accuracy.pdf diff --git a/paper/figures/fig_repair_kscaling.pdf b/paper/tex/figures/fig_repair_kscaling.pdf similarity index 100% rename from paper/figures/fig_repair_kscaling.pdf rename to paper/tex/figures/fig_repair_kscaling.pdf diff --git a/paper/tex/marc_aaai.tex b/paper/tex/marc_aaai.tex index 77841d2..29b4868 100644 --- a/paper/tex/marc_aaai.tex +++ b/paper/tex/marc_aaai.tex @@ -352,10 +352,10 @@ \subsection{A factorization law predicts both results} instances per $n$ (Wilson intervals), with the same generators, polish, and checker as the solve-rate experiments; Appendix Table~\ref{tab:law} tabulates the dichotomy. -% provenance: paper/figures/fig_crossover_theory.pdf, RESULTS.md R9 +% provenance: paper/tex/figures/fig_crossover_theory.pdf, RESULTS.md R9 \begin{figure*}[t] \centering -\includegraphics[width=0.62\textwidth]{../figures/fig_crossover_theory.pdf} +\includegraphics[width=0.62\textwidth]{figures/fig_crossover_theory.pdf} \caption{The factorization law, measured. Left: $\log q(n)$ against $n$. The separable family is a line (slope $-1.03$, $R^2 = 0.98$), the coupled bilinear family is nearly flat ($-0.13$), and the geometry family, though syntactically coupled, collapses ($-0.77$, @@ -414,13 +414,13 @@ \subsection{A factorization law predicts both results} first and ties; geometry has the first, fails the second, and ties. Figure~\ref{fig:regime} places every measured family on the two axes of the law. -% provenance: paper/figures/fig_regime_map.pdf (scripts/plot_regime_map.py); +% provenance: paper/tex/figures/fig_regime_map.pdf (scripts/plot_regime_map.py); % slopes from crossover_theory.json (R9), R27 slopes law-inverted from the LM arm of % crossover_families.json; outcomes from scaling.json (R15), crossover_families.json (R27), % coupled.json (R7), pointchain_learned.json (R25), real_systems.json (R26) \begin{figure}[ht] \centering -\includegraphics[width=0.88\columnwidth]{../figures/fig_regime_map.pdf} +\includegraphics[width=0.88\columnwidth]{figures/fig_regime_map.pdf} \caption{The regime map. Each measured family sits at its measured $\log q(n)$ slope (abscissa; the separable and coupled slopes are the fits of Table~\ref{tab:law}, the geometry slope that of Figure~\ref{fig:law}, the R27 slopes are inverted from the best-of-8 LM arm through Eq.~\eqref{eq:bestofk}) in its solution-structure @@ -531,10 +531,10 @@ \subsection{Relocating the learned component: structural repair beats its contro \end{tabular} \end{table} -% provenance: paper/figures/fig_repair_accuracy.pdf (scripts/plot_repair.py --panel left) +% provenance: paper/tex/figures/fig_repair_accuracy.pdf (scripts/plot_repair.py --panel left) \begin{figure}[t] \centering -\includegraphics[width=0.8\columnwidth]{../figures/fig_repair_accuracy.pdf} +\includegraphics[width=0.8\columnwidth]{figures/fig_repair_accuracy.pdf} \caption{Table~\ref{tab:repair}, drawn: the ranker against its candidate-only and random controls; the dotted line is $K{=}4$ chance. Menu-size scaling is in Appendix Figure~\ref{fig:repair}.} diff --git a/paper/tex/marc_aaai_appendix.tex b/paper/tex/marc_aaai_appendix.tex index 96e7ed6..474ff03 100644 --- a/paper/tex/marc_aaai_appendix.tex +++ b/paper/tex/marc_aaai_appendix.tex @@ -138,10 +138,10 @@ \section{Repair: Menu-Size Scaling and Cost Accounting} (Figure~\ref{fig:repair}). Directly training at $K{=}16$ performs at chance, so the transferred checkpoint is selected and both negatives are kept in the record. -% provenance: paper/figures/fig_repair_kscaling.pdf (scripts/plot_repair.py --panel right), RESULTS.md R10 +% provenance: paper/tex/figures/fig_repair_kscaling.pdf (scripts/plot_repair.py --panel right), RESULTS.md R10 \begin{figure}[ht] \centering -\includegraphics[width=0.6\textwidth]{../figures/fig_repair_kscaling.pdf} +\includegraphics[width=0.6\textwidth]{figures/fig_repair_kscaling.pdf} \caption{Menu-size scaling behind main-text Figure~\ref{fig:repair-acc}: the $K{=}4$ checkpoint evaluated zero-shot at larger menus retains an accuracy edge at $K{=}8$ that closes by $K{=}16$, while the blind enumeration it displaces grows from $2.5$ to $9.1$ diff --git a/scripts/plot_hard_eval.py b/scripts/plot_hard_eval.py index 0cf3e2f..73b9880 100644 --- a/scripts/plot_hard_eval.py +++ b/scripts/plot_hard_eval.py @@ -3,7 +3,7 @@ row; refine variants are labelled classical baselines (fixing-plan A2 house rule). Run: python scripts/plot_hard_eval.py -Writes paper/figures/fig_hard_suite.pdf and paper/figures/hard_suite_table.md. +Writes paper/tex/figures/fig_hard_suite.pdf and paper/tex/figures/hard_suite_table.md. """ import json from pathlib import Path @@ -11,7 +11,7 @@ from marc.eval.metrics import two_proportion_z SRC = Path("results/p_hard/hard_eval.json") -FIGDIR = Path("paper/figures") +FIGDIR = Path("paper/tex/figures") def _cell(m): diff --git a/scripts/plot_regime_map.py b/scripts/plot_regime_map.py index 17a2bc7..c1c1d55 100644 --- a/scripts/plot_regime_map.py +++ b/scripts/plot_regime_map.py @@ -151,7 +151,7 @@ def main(): bbox_to_anchor=(0.01, 0.12)) fig.tight_layout() - out = REPO / "paper" / "figures" / "fig_regime_map.pdf" + out = REPO / "paper" / "tex" / "figures" / "fig_regime_map.pdf" fig.savefig(out) print(f"wrote {out}") for name, slope, y, oc, *_ in pts: diff --git a/scripts/plot_repair.py b/scripts/plot_repair.py index 8f78064..ef13f6f 100644 --- a/scripts/plot_repair.py +++ b/scripts/plot_repair.py @@ -97,7 +97,7 @@ def main(): args = ap.parse_args() labels, gen = load_generalization() ks, full, rand, calls = load_scaling() - figs = REPO / "paper" / "figures" + figs = REPO / "paper" / "tex" / "figures" if args.panel == "left": fig, ax = plt.subplots(figsize=(4.6, 3.4)); _accuracy(ax, labels, gen) diff --git a/scripts/plot_results.py b/scripts/plot_results.py index 88ca09d..c3fbe3d 100644 --- a/scripts/plot_results.py +++ b/scripts/plot_results.py @@ -2,7 +2,7 @@ """Render P2 paper figures + summary table from ``results/p2_main/`` JSON. Reads the suite/ablation JSON written by ``run_main_eval.py`` and produces, under -``paper/figures/``: +``paper/tex/figures/``: * fig_generalization.pdf — in-distribution vs. held-out solve rate + gap. * fig_perturbation.pdf — solve rate vs. perturbation magnitude per split. @@ -14,7 +14,7 @@ Usage: python scripts/plot_results.py - python scripts/plot_results.py --results results/p2_main --figures paper/figures + python scripts/plot_results.py --results results/p2_main --figures paper/tex/figures """ from __future__ import annotations @@ -209,7 +209,7 @@ def build_summary_table( def main() -> None: parser = argparse.ArgumentParser(description="Render P2 figures + summary table") parser.add_argument("--results", default="results/p2_main") - parser.add_argument("--figures", default="paper/figures") + parser.add_argument("--figures", default="paper/tex/figures") args = parser.parse_args() res = Path(args.results) diff --git a/scripts/run_crossover_theory.py b/scripts/run_crossover_theory.py index 184cb97..d57dc4f 100644 --- a/scripts/run_crossover_theory.py +++ b/scripts/run_crossover_theory.py @@ -49,11 +49,11 @@ 3. Predicts P_random(n;K) = 1-(1-q(n))^K and compares to the observed random-restart rates in results/p_scaling/scaling.json and results/p_coupled/coupled.json. 4. Predicts the crossover n* from v and the learned ceiling p_L, compares to observed. -5. Writes results/p_crossover/crossover_theory.json and paper/figures/fig_crossover_theory.pdf. +5. Writes results/p_crossover/crossover_theory.json and paper/tex/figures/fig_crossover_theory.pdf. 6. (--k-sweep) Optionally sweeps the restart budget K to trace the *restart curve* as solve-rate vs wall-clock: at each K the mean wall-clock and restarts a best-of-K run spends (it stops at first success) against the rate it reaches. Writes the curve to the - JSON payload and paper/figures/fig_restart_curve.pdf. The single-K measure also now + JSON payload and paper/tex/figures/fig_restart_curve.pdf. The single-K measure also now records wall-clock per instance (``random_mean_ms``) so cost is reported alongside rate. Run: python scripts/run_crossover_theory.py [--trials 300] [--K 8] @@ -287,7 +287,7 @@ def main() -> None: ap.add_argument("--k-sweep", type=str, default="", help="comma list of restart budgets K to sweep, e.g. '1,2,4,8,16,32' — " "traces the restart curve (solve-rate vs wall-clock) into the JSON " - "payload and paper/figures/fig_restart_curve.pdf") + "payload and paper/tex/figures/fig_restart_curve.pdf") args = ap.parse_args() indep = measure_family("indep", NS_INDEP, INDEP_START, args.trials, args.K, args.seed) @@ -449,7 +449,7 @@ def _plot(indep, coupled, v, K, n_star, learned_indep, geometry=None) -> None: ax[1].set_title("(b) parameter-free prediction of the crossover") ax[1].legend(fontsize=7, loc="center right") fig.tight_layout() - d = Path("paper/figures"); d.mkdir(parents=True, exist_ok=True) + d = Path("paper/tex/figures"); d.mkdir(parents=True, exist_ok=True) fig.savefig(d / "fig_crossover_theory.pdf") print(f"wrote {d/'fig_crossover_theory.pdf'}") @@ -479,7 +479,7 @@ def _plot_restart_curve(sweeps, Ks) -> None: a.set_title(f"restart curve — {fam} (K∈[{min(Ks)},{max(Ks)}])") a.legend(fontsize=7) fig.tight_layout() - d = Path("paper/figures"); d.mkdir(parents=True, exist_ok=True) + d = Path("paper/tex/figures"); d.mkdir(parents=True, exist_ok=True) fig.savefig(d / "fig_restart_curve.pdf") print(f"wrote {d/'fig_restart_curve.pdf'}") diff --git a/scripts/run_dimension_scaling.py b/scripts/run_dimension_scaling.py index bd2cf1a..00d48b2 100644 --- a/scripts/run_dimension_scaling.py +++ b/scripts/run_dimension_scaling.py @@ -30,7 +30,7 @@ rate carries a 95% Wilson CI; learned-vs-baseline comparisons carry two-proportion z-test p-values (house rules, paper/RESULTS.md). -Outputs: results/p_scaling/scaling.json and paper/figures/fig_dimension_scaling.pdf. +Outputs: results/p_scaling/scaling.json and paper/tex/figures/fig_dimension_scaling.pdf. Run: python scripts/run_dimension_scaling.py [--quick] [--seeds N] """ from __future__ import annotations @@ -249,7 +249,7 @@ def _plot(rows) -> None: ax.set_title("Learned inference vs. classical refinement & prior (95% CI)") ax.legend(fontsize=8, loc="upper right") fig.tight_layout() - fig_dir = Path("paper/figures") + fig_dir = Path("paper/tex/figures") fig_dir.mkdir(parents=True, exist_ok=True) fig.savefig(fig_dir / "fig_dimension_scaling.pdf") print(f"wrote {fig_dir/'fig_dimension_scaling.pdf'}") diff --git a/scripts/run_overnight.py b/scripts/run_overnight.py index 006c57c..1c249b0 100644 --- a/scripts/run_overnight.py +++ b/scripts/run_overnight.py @@ -61,7 +61,7 @@ ] # Dirs scanned after each phase to attribute freshly written outputs. -OUTPUT_DIRS = ["results", "checkpoints", "paper/figures"] +OUTPUT_DIRS = ["results", "checkpoints", "paper/tex/figures"] # ------------------------------------------------------------------- utilities