You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`protac_smiles`|`str \| list \| DataFrame`|*(required)*| SMILES to split. Single string, list of strings, or DataFrame with a `protac_smiles_col` column. |
108
-
|`model`|`str`|`"xgboost"`| Splitting strategy. See [Splitting strategies](#splitting-strategies) for valid values. |
108
+
|`model`|`str`|`"adaptive"`| Splitting strategy. See [Splitting strategies](#splitting-strategies) for valid values. |
109
109
|`fix_predictions`|`bool`|`True`| Apply cheminformatics post-processing to Transformer predictions before reassembly check. |
110
110
|`protac_smiles_col`|`str`|`"SMILES"`| Column name for SMILES when input is a DataFrame; also used as key name in output dicts. |
|`betweenness_threshold`|`float`|`0.4`| Betweenness-centrality cut-off for the heuristic. Higher values are more conservative. |
117
117
|`use_capacity_weight`|`bool`|`False`| Weight graph edges by bond order when computing betweenness centrality (heuristic only). |
118
118
|`betweenness_approx_frac`|`float \| None`|`None`| Fraction of nodes to sample for approximate betweenness centrality. `None` uses exact computation. |
119
+
|`adaptive_heuristic_grid`|`list[tuple[float, bool]] \| None`|`None`|`model="adaptive"` only. `(betweenness_threshold, use_capacity_weight)` pairs to try, in order. `None` uses a built-in 6-point grid seeded with the package default first. |
120
+
|`adaptive_use_xgboost`|`bool`|`True`|`model="adaptive"` only. Whether the XGBoost stage runs on molecules the heuristic grid left flagged. |
121
+
|`adaptive_use_transformer`|`bool`|`False`|`model="adaptive"` only. Whether the Transformer stage runs on molecules still flagged after XGBoost. Off by default (needs the `[transformer]` extra; GPU recommended). |
119
122
|`use_transformer`|`bool \| None`|`None`|**Deprecated.** Use `model='transformer'` instead. |
120
123
|`use_xgboost`|`bool \| None`|`None`|**Deprecated.** Use `model='xgboost'` instead. |
121
124
125
+
`model="adaptive"` returns three extra keys beyond the usual `default_pred_n0` / `model_name`: `heuristic_params` (which grid point won, when `model_name == "Heuristic"`, else `None`), `n_flags`, and `review_reasons` — a semicolon-joined list of the [`evaluation.score_split()`](protac_splitter/evaluation.py) plausibility checks that still fired on the winning candidate (empty string if none). Running `model="adaptive"` over a batch of test molecules and looking at which `heuristic_params` wins most often is a good way to pick new defaults for `betweenness_threshold` / `use_capacity_weight`.
@@ -172,7 +189,8 @@ PROTAC-Splitter supports multiple strategies, selectable via `--model` (CLI) or
172
189
173
190
| Value | Description |
174
191
|---|---|
175
-
|`xgboost`| XGBoost graph edge classifier — default, no GPU required. Model downloaded automatically on first use (~17 MB). |
192
+
|`adaptive`*(default)*| QC-gated escalation, not just fallback-on-failure: a small heuristic `(betweenness_threshold, use_capacity_weight)` grid runs first, then XGBoost, then — only with `--adaptive-use-transformer` / `adaptive_use_transformer=True` — the Transformer. Each stage only runs on molecules the previous stage left flagged by [`evaluation.score_split()`](protac_splitter/evaluation.py) (structural validity, fragment size, linker topology, known-ligand similarity), and a later stage only replaces the current best if it scores strictly better. Slower than a single strategy, but reports which method/params won — see [`adaptive_*` arguments](#python-api) above. |
193
+
|`xgboost`| XGBoost graph edge classifier — no GPU required. Model downloaded automatically on first use (~17 MB). |
176
194
|`heuristic`| Betweenness-centrality graph algorithm — no model download needed. |
|`transformer->xgboost`| Transformer first; XGBoost replaces any failed predictions. |
@@ -183,7 +201,7 @@ PROTAC-Splitter supports multiple strategies, selectable via `--model` (CLI) or
183
201
> [!IMPORTANT]
184
202
> The above strategies must be passed as a double-quoted string in the CLI (e.g., `--model "transformer->xgboost"`). The `>` operator is a shell redirection operator, so it must be quoted to avoid shell interpretation.
185
203
186
-
The default strategy is `heuristic->xgboost`, which is the most robust, fastest and accurate for general use.
204
+
The default strategy is `adaptive`, which trades speed for a QC-scored search over methods and parameters, generally giving the best-quality split. For higher-throughput batch jobs where a single robust pass is enough, `heuristic->xgboost`is a faster alternative. See [docs/adaptive_splitting.md](docs/adaptive_splitting.md) for the full pipeline reference: every stage, every QC flag it checks, and how each threshold was calibrated.
187
205
188
206
> [!TIP]
189
207
> We recommend increasing the `num_proc` argument to maximize the amount of parallelism when using the default strategy.
0 commit comments