Skip to content

learn_quant: SALT 35 paper reproduction layer, data, manuscript, and fixes - #74

Open
haberchr wants to merge 8 commits into
mainfrom
learn-quant-paper-reproduction
Open

learn_quant: SALT 35 paper reproduction layer, data, manuscript, and fixes#74
haberchr wants to merge 8 commits into
mainfrom
learn-quant-paper-reproduction

Conversation

@haberchr

@haberchr haberchr commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Adds everything needed to reproduce the SALT 35 paper Quantifiers that are more monotone are easier to learn (Proceedings of SALT 35: 286–309, 2025) from data committed in this repo, plus two small fixes uncovered along the way.

What's included

  • Fix: conf/model/ Hydra configs were missing — the README documents model=mvlstm / model=transformer, but the blanket model/ .gitignore pattern (meant for saved model artifacts) had silently excluded the config group, so those invocations fail on a fresh clone. Un-ignored and committed (mvlstm.yaml, transformer.yaml).
  • Fix: util.py index helpers could return None (determine_start_index without a resume key; define_index_bounds with a present-but-null index).
  • Reproduction layer: REPRODUCE.md (full walkthrough), scripts/reproduce_figures.py / deeper_analysis.py / review_extensions.py (all figures + stat tables from the committed runs CSV), FIGURES_TECHNICAL.ipynb (cell-by-cell companion incl. mixed models reproducing Table 6), one-shot notebook, and the provenance notebooks that originally exported the CSV. No database, MLflow store, or training runs required — verified end-to-end from a fresh clone.
  • Data: outputs/monotonicity_values_redl.csv (degree + 4 directional senses for all 9550 generated expressions; strict superset of the existing 54-row file, identical values on shared expressions), expression↔run-hash map, excluded-hash list, and the committed stat tables.
  • Manuscript: camera-ready PDF under manuscript/, README links fixed (were reversed markdown pointing at a missing file).
  • Optional Postgres provenance checks read the DSN from MLFLOW_PG_DSN; no credentials in the repo. Scripts log repo-relative paths so committed tables are machine-independent.

Key reproduced numbers

  • Figure 2 (monotonicity vs validation-loss AUC): n = 7170, r = −0.333
  • Figure 1 (first-step vs AUC): partial Spearman controlling for model r = 0.893 (published caption 0.892), n = 4068 converged runs
  • Mixed model AUC ~ degree * model + (1|expression) reproduces published Table 6 to ~0.2%

🤖 Generated with Claude Code

haberchr and others added 8 commits July 25, 2026 12:42
The README documents 'model=mvlstm' / 'model=transformer' overrides and
learn.yaml declares 'defaults: - model: null', but the conf/model config
group was silently excluded by the blanket 'model/' .gitignore pattern
(intended for saved model artifacts), so the documented invocations fail
on a fresh clone. Un-ignore conf/model/ and commit the two configs used
for the SALT 35 experiments.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
determine_start_index fell through to an implicit None when cfg.training
had no 'resume' key (or when the resume expression was not found), and
define_index_bounds returned (None, None + 1) -> TypeError when
cfg.expressions.index was present but null. Return 0 as the explicit
start-index fallback and require a non-null index.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Scripts, docs, and notebooks to regenerate every figure and statistical
result in the SALT 35 monotonicity manuscript from the committed runs CSV
(outputs/combined_runs_AOC_monotonicity_updated.csv) — no database, MLflow
store, or training runs required:

- scripts/reproduce_figures.py: paper Figure 1 (exact plotnine
  reproduction) + length/function-count twins + complexity-vs-learning
- scripts/deeper_analysis.py: partial correlations, directional
  monotonicity, per-operator Ridge, nested models (tables to
  analysis/tables/)
- scripts/review_extensions.py: 2026-07 review figures and diagnostics
- scripts/reproduce_from_postgres.py, verify_postgres_matches_csv.py:
  optional provenance checks; the Postgres DSN is read from the
  MLFLOW_PG_DSN env var (no credentials in the repo)
- REPRODUCE.md: full walkthrough with headline results
- FIGURES_TECHNICAL.ipynb: cell-by-cell companion for every number,
  including the mixed models reproducing published Table 6
- notebooks/reproduce_figures_and_analysis.ipynb: one-shot Run All
- notebooks/get_AOC.ipynb, get_experiment_data.ipynb: the queries that
  originally exported the runs CSV (provenance)

Scripts log paths relative to the package root so tee'd tables and
notebook outputs are machine-independent. README gains a rewritten
introduction and a pointer to REPRODUCE.md. All paths point at outputs/
where this repo keeps the runs CSV. Verified: all three scripts run
clean from src/examples/learn_quant/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- outputs/monotonicity_values_redl.csv: degree + four directional
  monotonicity senses recomputed for all 9550 generated expressions.
  Strict superset of outputs/monotonicity_values.csv (54 expressions);
  values agree exactly on shared expressions and on the 2000 trained
  expressions in combined_runs_AOC_monotonicity_updated.csv.
- Expression_to_Run_Hashes.csv: expression -> MLflow run-hash map used
  to join training runs to expressions (provenance for the runs CSV).
- ignore_hashes.txt: run hashes excluded from the published analysis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Camera-ready of 'Quantifiers that are more monotone are easier to learn'
(Proceedings of SALT 35: 286-309, 2025), with the regenerated figures.
The README's placeholder links used reversed markdown syntax and pointed
at a paper.pdf that was never committed; add the full citation and point
to REPRODUCE.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
analysis/tables/*.txt are the full OLS/Ridge/nested-model results that
REPRODUCE.md documents as committed artifacts. The figures/ directory is
fully regenerated by scripts/reproduce_figures.py + deeper_analysis.py +
review_extensions.py (~24 MB of PNGs), so it stays untracked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reproduces the appendix figure 'First Step vs. AUC, Shaded by Model'
(learning speed vs learning difficulty, per-model linear fits with SE
bands) from the verified runs CSV, and recomputes its caption statistic:
partial Spearman correlation of first_step and val_loss_step_AOC
controlling for model (binary covariate), via the first-order
partial-correlation formula on pairwise Spearman coefficients (no
pingouin dependency). Reproduced r = 0.893 on n = 4068 converged runs
vs the published caption's r = 0.892; the statistic is printed and
saved to analysis/tables/10_first_step_auc_partial_spearman.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@haberchr
haberchr force-pushed the learn-quant-paper-reproduction branch from c3ef5c7 to a8e6add Compare July 26, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant