Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
File renamed without changes.
12 changes: 6 additions & 6 deletions paper/tex/marc_aaai.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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$,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}.}
Expand Down
4 changes: 2 additions & 2 deletions paper/tex/marc_aaai_appendix.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down
4 changes: 2 additions & 2 deletions scripts/plot_hard_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
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

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):
Expand Down
2 changes: 1 addition & 1 deletion scripts/plot_regime_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/plot_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions scripts/plot_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions scripts/run_crossover_theory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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'}")

Expand Down Expand Up @@ -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'}")

Expand Down
4 changes: 2 additions & 2 deletions scripts/run_dimension_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'}")
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_overnight.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading