| |
| |
| |
| |
| import matplotlib; matplotlib.use("Agg") |
| import matplotlib.pyplot as plt |
| import numpy as np |
|
|
| |
| DOMS = ["cw", "fqa", "general", "code", "math"] |
| NAIVE = [2.591, 2.775, 3.000, 3.211, 4.632] |
| GEN = [2.647, 2.814, 3.049, 3.204, 4.698] |
| MOS = [2.721, 2.907, 3.108, 3.338, 4.922] |
|
|
| x = np.arange(len(DOMS)); w = 0.27 |
| fig, ax = plt.subplots(figsize=(10.5, 5.4)) |
| b0 = ax.bar(x - w, NAIVE, w, label="naive same-data (from D0, before warm-start) — loses", color="#c0392b") |
| b1 = ax.bar(x, GEN, w, label="generalist (same 250k data)", color="#9aa7b8") |
| b2 = ax.bar(x + w, MOS, w, label="CorDA-MoS warm-from-gen (OURS, same data) — wins", color="#1b5e20") |
| for bars in (b0, b1, b2): |
| for b in bars: |
| ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}", ha="center", va="bottom", fontsize=7.5) |
| |
| for j in range(len(DOMS)): |
| gain = MOS[j] - NAIVE[j] |
| ax.text(x[j]+w, MOS[j]+0.20, f"+{gain:.2f} vs naive", ha="center", fontsize=7, color="#1b5e20", fontweight="bold") |
| ax.set_xticks(x); ax.set_xticklabels(DOMS) |
| ax.set_ylabel("held-out accept length (AL)") |
| ax.set_ylim(2.0, 5.4) |
| ax.set_title("Method > Data (same 250k): naive same-data split (from D0) LOSES to gen;\n" |
| "our warm-from-gen CorDA-MoS BEATS gen on all 5 domains — the gap shows the method's contribution", fontsize=10.5) |
| ax.legend(loc="upper left", fontsize=8.5); ax.grid(axis="y", ls=":", alpha=0.4) |
| ax.text(0.58, 0.74, f"avg AL: naive {np.mean(NAIVE):.3f} < gen {np.mean(GEN):.3f} < ours {np.mean(MOS):.3f}", |
| transform=ax.transAxes, fontsize=9.5, va="top", ha="center", |
| bbox=dict(boxstyle="round,pad=0.3", fc="#e8f3e8", ec="#1b5e20")) |
| fig.tight_layout() |
| fig.savefig("fig_exp5_method_vs_data.png", dpi=140, bbox_inches="tight") |
| print("OK wrote /tmp/fig_exp5_method_vs_data.png") |
|
|