renkin 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/package.json +1 -1
- package/renkin_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -175,6 +175,8 @@ Constraints compose freely and are enforced in two layers:
|
|
|
175
175
|
|
|
176
176
|
Add `--verbose` to print search statistics (nodes expanded, elapsed time) to stderr. Performance counters are available in native builds only; disabled in WASM.
|
|
177
177
|
|
|
178
|
+
Add `--search-diagnostics` to add a `search_diagnostics` block to JSON output (beam eviction counts/scores, cross-template duplicate precursor signatures, rule-application attempts, stock-terminal/non-stock candidate counts, depth-wise branching factor, hypothetical dedup-strategy counts) — diagnostics-only bookkeeping, off by default, does not affect search behavior ([Issue #101](https://github.com/kent-tokyo/renkin/issues/101)). Add `--candidate-trace-limit <N>` (implies `--search-diagnostics`) to also collect up to `N` per-candidate trace records (precursor signature, template provenance, beam rank/survival, whether it fed a returned route) — offline diagnostic use only, gated at collection time so the default no-trace path allocates nothing extra.
|
|
179
|
+
|
|
178
180
|
---
|
|
179
181
|
|
|
180
182
|
## Template Evidence Metadata
|
|
@@ -350,6 +352,7 @@ for the full acceptance criteria and licensing split.
|
|
|
350
352
|
| **Partner-free retrieval hints** | `renkin-forward hints --reactants <SMILES>...` — no partner input at all: reports matched template slots, missing-partner SMARTS, and bond deltas for patent/database search, never a concrete product — see the [Forward Retrieval Hints guide](docs/guides/forward-retrieval-hints.md). `predict` / `enumerate` / `hints` compared: [table](docs/guides/forward-retrieval-hints.md#predict--enumerate--hints-at-a-glance) |
|
|
351
353
|
| **Forward validation** | `renkin-forward validate` verifies each step by applying templates forward; accepts `--route-json` or stdin |
|
|
352
354
|
| **Ring-context safety guard** | `--ring-context-policy conservative --ring-context-sidecar <path>` — opt-in match-level filter that rejects an extracted template's ring-opening/closing disconnection when its historical training data never observed that bond as ring-forming/-breaking; default is `disabled` (unchanged legacy behavior) — see [Issue #72](https://github.com/kent-tokyo/renkin/issues/72) |
|
|
355
|
+
| **LightGBM candidate reranker** (experimental, Issue #101) | `--reranker-model model.txt --reranker-freq-table frequency_table.json` — opt-in, ordering-only: re-ranks same-step candidates using a frozen LightGBM model, expressed as a rank-derived bonus on the same scale as the template-frequency bonus. Never changes which candidates are generated, only their search order. Omitting either flag (the default) reproduces legacy ordering byte-for-byte; a bad model/table path falls back to legacy ordering with a stderr warning rather than failing the run. Pure-Rust model reader, no C/C++ dependency. Pending its runtime paired-gate result before this row loses the "experimental" tag. |
|
|
353
356
|
| **Plausibility report** | `renkin-bench --plausibility` — forward-validates best routes and reports composite plausibility score |
|
|
354
357
|
| **PaRoutes benchmark** | `renkin-bench --input-format paroutes` for multi-step ground-truth evaluation with `depth_delta` and `route_diversity` |
|
|
355
358
|
| **Atom balance check** | `renkin-bench` flags steps where `target_MW > Σ precursor_MW` (CompleteRXN reference) |
|
|
@@ -619,7 +622,8 @@ renkin/ ← Cargo workspace root
|
|
|
619
622
|
- [x] `renkin-forward hints` — partner-free retrieval hints (matched template slots, missing-partner SMARTS, bond deltas) for patent/database search, no concrete product predicted ([#64](https://github.com/kent-tokyo/renkin/issues/64) phase 2)
|
|
620
623
|
- [x] `apply_retro`/`run_reactants` performance regression resolved — `chematic` moved from a narrow git-pinned fix to the published `0.8.0` release (upstream automorphism-orbit-pruned canonicalization, [chematic#193](https://github.com/kent-tokyo/chematic/pull/193)); on a fixed 30-target gate, measured in one session against current master: total elapsed **34.7%** faster, p95 **33.8%** faster, and the single worst-case target **42.2%** faster (confirmed via repeated isolated measurement, not a one-off run). Zero correctness change (`apply_retro` call counts identical across versions)
|
|
621
624
|
- [x] `renkin-forward` CLI hardening — versioned `ForwardPredictionReport`, deterministic candidate IDs/merge/provenance, reactant-order-independent matching (up to 3 reactants), strict CLI/route-JSON validation
|
|
622
|
-
- [x] RETROSPECT-inspired offline candidate-reranking foundation — candidate proposal/selection separation, feature schema v1, manifest v2, leakage-safe train/val/test splitting, 7 deterministic baseline arms + trained-ranker arm, paired bootstrap + offline gate tooling ([#59](https://github.com/kent-tokyo/renkin/pull/59)
|
|
625
|
+
- [x] RETROSPECT-inspired offline candidate-reranking foundation — candidate proposal/selection separation, feature schema v1, manifest v2, leakage-safe train/val/test splitting, 7 deterministic baseline arms + trained-ranker arm, paired bootstrap + offline gate tooling ([#59](https://github.com/kent-tokyo/renkin/pull/59))
|
|
626
|
+
- [x] Offline candidate reranker trained and gated against real data ([#101](https://github.com/kent-tokyo/renkin/issues/101) Task 35) — LambdaMART model trained on real USPTO-50k labels, passed its VAL screening gate (top1 +11.7pp, MRR +11.3pp, top10 +9.3pp, bootstrap-CI-confirmed), frozen, and passed a formal 4,903-target TEST evaluation against the frozen model exactly once (top1 +12.7pp, MRR +11.9pp, top10 +9.1pp — consistent magnitude with VAL, no overfitting signal). **Offline candidate-ranking gate only — not yet wired into route search**, see "In progress" below
|
|
623
627
|
- [x] Stable `template_id` (`rule:<name>` / `smirks-sha256:<hex>`) + `--template-metadata` evidence sidecar + `renkin template ids` ([#41](https://github.com/kent-tokyo/renkin/issues/41) phase 1)
|
|
624
628
|
- [x] Substrate-specific `examples` (`schema_version: 2`) — per-step exact-substrate vs. same-template-different-substrate resolution, surfaced in `--format explain` and as `match_kind` in JSON ([#41](https://github.com/kent-tokyo/renkin/issues/41) phase 2)
|
|
625
629
|
- [x] Deterministic ORD (Open Reaction Database) evidence import — offline `renkin evidence match` exact-set batch template matcher + `scripts/ord_evidence_audit.py` audit/converter into `schema_version: 2` sidecars; no network access, no fuzzy matching, ambiguous/unprovenanced records excluded and counted in an audit report rather than guessed at ([#41](https://github.com/kent-tokyo/renkin/issues/41) phase 3A)
|
|
@@ -632,6 +636,7 @@ renkin/ ← Cargo workspace root
|
|
|
632
636
|
|
|
633
637
|
### In progress
|
|
634
638
|
|
|
639
|
+
- [ ] Runtime integration of the trained candidate reranker ([#101](https://github.com/kent-tokyo/renkin/issues/101) Task 35, see the Key Features table above) — implementation and tests complete; a paired 100-target route-search gate (reranker ON vs OFF, same commit/corpus/stock/templates/budget) is the remaining step before this is reported PASS/FAIL. No release/tag either way until then
|
|
635
640
|
- [ ] Template retrieval index (element bitmask + bond-center prefilter) for the 50k template set
|
|
636
641
|
- [ ] Calibrated route confidence (map `success_probability` to empirical solve rate)
|
|
637
642
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"kent-tokyo <kent-tokyo@users.noreply.github.com>"
|
|
6
6
|
],
|
|
7
7
|
"description": "Ultra-fast retrosynthesis engine for computer-aided synthesis planning (CASP) — pure Rust, WASM-ready, Python bindings via PyO3",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "0.22.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
package/renkin_bg.wasm
CHANGED
|
Binary file
|