Lipinski Rule of 5: papers and design-rationale extractions (private)
Medicinal-chemistry and drug-discovery papers that cite or mention Lipinski's Rule of 5, or whose compounds are in
ChEMBL 37, with the design decisions their authors state, extracted by Gemma 4 31B with a LoRA adapter (lora_r6g),
and each paper's stance toward the Rule of 5. Part of a study of tacit knowledge in science
(Stanford; project code in tacit-knowledge-in-science).
Private research dataset. Do not make public. Elsevier rows carry derived labels only (see below), and many open
papers are not under a redistributable license (license column).
Contents
| config | rows | what |
|---|---|---|
papers |
78,178 | one row per paper: ids, venue, year, license, ChEMBL roles and Rule-of-5 counts, Ro5 stance, number of decisions |
decisions |
495,978 | one row per extracted design decision |
fulltext_open |
26,303 | open papers only: JATS XML and the rendered text the extractor read |
| source | papers | with at least one decision | decisions |
|---|---|---|---|
| open (Europe PMC full text) | 26,303 | 21,566 | 157,104 |
| Elsevier (ScienceDirect TDM) | 51,875 | 49,150 | 338,874 |
Elsevier rows
Elsevier full text was obtained under a TDM agreement that keeps article text on Stanford servers. This dataset holds
no Elsevier text: no XML, no rendered text, and reason_quote / ro5_quote are null. Every decision instead carries
quote_spans ([start, end) character offsets into norm(rendered text), with norm and the renderer in
promptopt/common.py and promptopt/elsevier_render.py) and quote_sha1, so quotes can be restored on Stanford
servers from the original XML. Derived labels may be kept; published quotations must be short snippets (at most 200
characters) with a DOI link. Elsevier downloads are deleted at the end of the project.
Paper roles (ChEMBL 37)
A compound breaks the rule with 2+ of: MW > 500, ALogP > 5, HBA > 10, HBD > 5 (ChEMBL num_ro5_violations).
D1_rule_breaking: at least 5 compounds and at least half break the rule. D4_step_away: the paper's main single-protein
target (CYP, hERG and P-gp counter-screens excluded) had under 25% rule-breaking compounds in at least 50 compounds
published earlier. role (for ChEMBL-linked papers): step_away (D4), rule_breaking (D1 not D4), inside_rule.
| role | open | Elsevier |
|---|---|---|
| step_away | 291 | 1,576 |
| rule_breaking | 688 | 3,624 |
| inside_rule | 7,639 | 35,606 |
Decision fields
change (what the authors changed), compounds (in-paper labels, e.g. "12a"), reason_category, reason_quote
(verbatim, checked against the source), mentions_physchem_consequence, framing, evidence, section,
paragraph (index into the rendered text's paragraphs), quote_spans, quote_sha1.
| reason_category | decisions |
|---|---|
| potency_or_affinity | 112,801 |
| binding_site_interaction | 91,142 |
| sar_exploration | 64,277 |
| synthetic_accessibility | 41,619 |
| adme_pk | 38,789 |
| physicochemical_or_druglike | 38,513 |
| none_stated | 33,768 |
| mechanism_or_modality | 30,222 |
| safety_or_toxicity | 16,715 |
| selectivity | 16,554 |
| novelty_or_ip | 11,317 |
| INVALID | 261 |
Extractor quality (held-out, decision-level F1 against reconciled hand labels): 0.71 to 0.73.
Ro5 stance (all papers)
| stance | papers |
|---|---|
| not_mentioned | 52,165 |
| applied_as_filter | 18,638 |
| acknowledged_violation | 4,877 |
| argued_exception | 2,498 |
Open-paper licenses
| license | papers |
|---|---|
| cc-by | 11,114 |
| author_manuscript | 7,549 |
| none_stated | 3,536 |
| cc-by-nc-nd | 2,297 |
| cc-by-nc | 1,356 |
| cc-by-nc-sa | 203 |
| license-type:open-access | 142 |
| license-type:editor-choice | 55 |
| cc0 | 33 |
| cc-by-nd | 6 |
| license-type:acs-free-to-read | 6 |
| cc-by-sa | 2 |
| license-type:openaccess | 2 |
| cc-by-ncsa | 1 |
| license-type:us-gov | 1 |
Sources and licenses
Compound counts and roles: ChEMBL 37 (CC BY-SA 3.0). Open full text: Europe PMC; each paper keeps its own license. Elsevier: ScienceDirect TDM, derived labels only.
Benchmark tables (frontier)
The configs above describe what papers said. These describe the benchmark built on top of them:
y = f(x | C), where x is a compound at a point in time, y is an outcome nobody knew yet, and
C is either the articulated rule or the k most similar already-resolved past cases. The question the
tables are built to answer is how much the examples beat the best articulated context, and how that
gap moves with the distance between the query and its nearest example.
Two outcomes are provided. L1 (claims) is literature replication: a (molecule, target, endpoint)
potency claim, labelled by whether a later independent paper landed within 0.5 log. L2 (clinical)
is a regulator-adjudicated outcome: a clinical compound at its first literature disclosure, labelled
approved (max_phase 4) or stalled (phase 1-3, at least 8 years observed), with censored rows kept
and marked. L2 is the headline because L1's label carries an inter-laboratory noise floor: a hand audit
of its "contradictions" found most of them to be assay-to-assay variation rather than a disagreement
anybody would recognise, so L1 is reported as a reliability task and not as replication.
| config | rows | what |
|---|---|---|
claims |
25,720 | L1 claims with both papers' dates, the label, per-claim example-pool counts and properties |
clinical |
8,451 | L2 clinical compounds with first-disclosure date, outcome and properties |
compounds |
616,938 | structures and ChEMBL properties for every compound referenced |
neighbours_l1 |
471,552 | retrieved example sets per L1 claim, by arm and rank |
neighbours_l2 |
479,367 | retrieved example sets per L2 compound, by arm and rank |
extension |
25,720 | whether a later independent paper built a close analogue on the same target |
rationale_links_l1 / _l2 |
3,643 / 444 | the authors' own stated reason for the specific compound, joined through its in-paper label |
rationale_paper_l1 / _l2 |
10,213 / 1,494 | the same at paper granularity, where no compound-level match exists |
arms_index |
30,340 | one row per benchmark request: arm, stratum, cluster, era, example mix, nearest-neighbour similarity |
arms_prompts |
30,340 | the exact prompt each request carried (see quote note below) |
arm_replies |
30,340 | the model's reply and its parsed 0-100 answer |
doc_dates |
41,758 | real publication date used for every document, with precision and source |
cohorts |
9,601 | per-(target, frontier year) example-pool summaries |
arm_scores / arm_distance |
scored results, as the tables below |
Context arms
Each request judges one compound and differs only in C:
| arm | requests | context |
|---|---|---|
none |
3,690 | the compound alone |
rule_ro5 |
3,690 | Lipinski's Rule of 5 as published |
rule_plus |
3,690 | the thick version: Veber, Gleeson 4/400, Hughes 3/75, beyond-Ro5 limits, and Lipinski's own transporter exceptions |
principles |
3,690 | first-order principles (exposure, route, therapeutic window, target-class precedent, attrition) with no thresholds |
authors_reason |
820 | what the disclosing paper itself says about why this compound was made |
examples_knn |
3,690 | the k = 8 nearest already-resolved compounds with their outcomes |
examples_random |
3,690 | a size-matched random draw from the same pool |
examples_labelmatch |
3,690 | a random draw holding the kNN set's label mix fixed |
rule_plus_examples |
3,690 | the nearest examples and the thick rule together |
authors_reason covers fewer requests because a paper argues explicitly for only some of the compounds
it deposits; the arm is scored on its own subset and on the common subset shared with every other arm,
and the "best articulated context" it is compared against is chosen only among arms covering at least
90% of the population.
Results of the first run
Model: Gemma 4 31B instruct, offline batch on one GPU, temperature 0, every request answered with a 0-100 probability of approval. All 30,340 requests returned; 22 replies across all nine arms failed to yield a number (0.0-0.2% per arm) and are counted as misses rather than dropped. The metric is paired accuracy: within a (protein-class cluster, decade) stratum, every approved/stalled pair is scored on whether the model gave the approved compound the higher number, and the 95% interval comes from a bootstrap over clusters.
| arm | n_items | n_pairs | paired_acc | ci_lo | ci_hi | brier | ece | n_unparsed |
|---|---|---|---|---|---|---|---|---|
| examples_random | 3690 | 81091 | 0.5657 | 0.5080 | 0.6252 | 0.2616 | 0.1678 | 0 |
| examples_labelmatch | 3690 | 81091 | 0.5577 | 0.5000 | 0.6167 | 0.2546 | 0.1479 | 0 |
| rule_ro5 | 3689 | 81017 | 0.5888 | 0.5342 | 0.6402 | 0.2867 | 0.2175 | 1 |
| rule_plus | 3688 | 81009 | 0.5756 | 0.5153 | 0.6295 | 0.3171 | 0.2821 | 2 |
| none | 3687 | 80935 | 0.6045 | 0.5473 | 0.6585 | 0.2913 | 0.2125 | 3 |
| principles | 3687 | 81008 | 0.5665 | 0.5103 | 0.6260 | 0.2770 | 0.1977 | 3 |
| examples_knn | 3685 | 80925 | 0.5788 | 0.5247 | 0.6330 | 0.2632 | 0.1861 | 5 |
| rule_plus_examples | 3682 | 80991 | 0.5587 | 0.5057 | 0.6136 | 0.3025 | 0.2700 | 8 |
| authors_reason | 820 | 3028 | 0.5759 | 0.4706 | 0.6721 | 0.2243 | 0.1200 | 0 |
Accuracy against query-to-example distance
| tanimoto_lo | tanimoto_hi | n_items | n_pairs | acc_examples_knn | acc_best_articulated | acc_none | delta | delta_ci_lo | delta_ci_hi | delta_knn_vs_none | delta_articulated_vs_none |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.0 | 0.2 | 69 | 40 | 0.5068 | 0.5203 | 0.4617 | -0.0135 | -0.0405 | 0.0000 | 0.0450 | 0.0586 |
| 0.2 | 0.4 | 1808 | 16518 | 0.5203 | 0.6074 | 0.5477 | -0.0871 | -0.1930 | 0.0209 | -0.0275 | 0.0597 |
| 0.4 | 0.6 | 1018 | 5744 | 0.5595 | 0.5348 | 0.5874 | 0.0246 | -0.0633 | 0.1157 | -0.0279 | -0.0525 |
| 0.6 | 0.8 | 651 | 3576 | 0.6123 | 0.6197 | 0.6150 | -0.0074 | -0.1712 | 0.1533 | -0.0027 | 0.0047 |
| 0.8 | 1.0 | 135 | 137 | 0.6506 | 0.6106 | 0.6124 | 0.0399 | -0.3031 | 0.3469 | 0.0382 | -0.0017 |
The first run is a null, and the no-context arm is nominally the best one. Every arm lands between
0.558 and 0.604 with intervals about ±0.06 wide, so no arm is distinguishable from any other. The
quantity the benchmark exists to measure, examples minus the best articulated context, is
-0.010 [-0.077, +0.060] -- paired over the same compounds and resampling the same clusters. The
authors_reason arm, the one carrying what the chemists themselves wrote, is no better than the rest.
What stops this being merely a flat result is that the answers are not degenerate and the arms differ in a consistent way. Each arm spreads its answers over about 20 distinct values with a modal value taking 19-33%, and each separates the two outcomes in the right direction. But the separation between mean answer given to an approved compound and to a stalled one shrinks as the context thickens:
| arm | sd of answers | mean approved - mean stalled | ECE |
|---|---|---|---|
none |
35.6 | +17.1 | 0.212 |
principles |
31.4 | +14.4 | 0.198 |
rule_ro5 |
30.4 | +13.5 | 0.218 |
examples_labelmatch |
26.4 | +11.7 | 0.148 |
examples_knn |
24.9 | +10.5 | 0.186 |
rule_plus |
26.5 | +9.7 | 0.282 |
rule_plus_examples |
23.3 | +8.3 | 0.270 |
Context here acts as an anchor rather than as information: it raises the mean answer (rule_plus 60.2
against none 47.0), compresses the variance, worsens calibration, and costs discrimination. The two
arms holding the most context are the worst calibrated and the least discriminating. This is a property
of this model at this size, not a measurement of the knowledge -- which is why the design calls for a
scale ladder, and why that is the next run rather than a conclusion.
The distance effect does not survive a difficulty control. This is the part of the table that
changed most on inspection, so the control is built into it rather than left to the reader. The
examples_knn arm does improve as its nearest example gets closer, 0.507 in the 0.0-0.2 Tanimoto band
to 0.651 in 0.8-1.0, a rise of +0.144. But the none arm -- shown no rule and no examples at all, and
therefore a direct measure of how hard each band intrinsically is -- rises +0.151 across the same
bands, from 0.462 to 0.612. A compound that has a close prior analogue is simply an easier compound for
every predictor. The difficulty-adjusted rise in the example effect is -0.007: the apparent distance
effect in these arms is the band gradient, not the examples.
The per-band deltas are reported with their own cluster bootstrap for the same reason. The 0.8-1.0 band
holds 135 compounds and only 137 pairs, so its +0.040 carries an interval of [-0.303, +0.347] and means
nothing; the one band whose interval excludes zero is 0.0-0.2, at -0.014 [-0.041, 0.000], i.e. examples
very slightly worse than the rule where the nearest example is most distant, on 40 pairs. The
acc_none, delta_knn_vs_none and delta_articulated_vs_none columns carry this control in the
released table.
This control has not yet been applied to the non-LLM retrieval baselines reported elsewhere in this project, whose own distance curve runs 30.4% to 63.2% after the same-compound exclusion. The bands there are the same bands, so the same confound is available to it and the curve should not be read as a pure example effect until a no-example predictor has been scored across those bands too.
Leakage controls, and what they cost
Every one of these was measured, not assumed, and each changed a number:
- Real publication dates. ChEMBL's
docs.yearis the printed issue year: it is one year late for 13.4% of measurement documents and early for none, so every correction moves a paper earlier -- the unsafe direction for a frontier.doc_datescarries dates from OpenAlex and Europe PMC for 41,756 of 41,758 measurement documents and 94.3% of L2 first disclosures. Rebuilding on them moved 15 claims' two papers into the opposite order, and of 790,103 example-pool admissibility decisions, 186 had been admitting an example that was not yet public. - Same-compound examples. A Tanimoto of 0.9+ is reached by a close analogue or by the same drug
filed twice as a salt, enantiomer or prodrug. Before exclusion, 87.8% of L2 example pairs above
0.95 and 77.6% of those at 0.90-0.95 were the query compound itself. Two independent tests are
needed -- ChEMBL's
molecule_hierarchy.parent_molregnocatches salts, the first InChIKey block catches enantiomers -- because in L1 the skeleton test alone accounts for 70% of the top band. With both applied at source, the released example sets contain no same-compound pairs, and the headline distance curve fell from 28.6%-82.9% to 30.4%-63.2%: still the strongest effect in the dataset, and roughly half as steep as it looked. - A label-matched example arm. A size-matched random draw leaves a majority-label shortcut, so
examples_labelmatchholds the kNN label mix fixed and isolates which examples were retrieved from what their labels were. - The era shortcut. Era alone reaches 0.584 within a (cluster, decade) stratum, so results are also reported on pairs restricted to within two years.
- Stratum width. Scoring on the mechanism target left 821 of 1,031 strata holding a single outcome. ChEMBL protein class at level 2 widens this to 30,340 requests over comparable strata, and baselines and arms are scored at the same width through one shared definition.
- Identifier scrubbing. The rationale arm quotes a paper that names its own lead compound, which
leaked research codes such as
AZD3514into seven prompts. Identifiers are now replaced with[this compound]in the query's own rationale. - Paper-clustered variance. The L1 label's intra-class correlation is 0.489 by paper against 0.18 by target, so the bootstrap resamples documents and weights each pair by the product of its two documents' multiplicities. This widened the extremeness baseline's interval from [0.518, 0.597] to [0.505, 0.600] -- i.e. from excluding chance to touching it.
- Query window. L2 queries run 1990-2014. Before 1990 the available example pool is 88-100%
approved, which is ChEMBL's survivorship rather than a base rate; after 2014 a compound can only be
labelled if it was approved quickly, since
stalledneeds 8 years.
Quotes in arms_prompts
The rationale arm quotes the disclosing paper. Prompts keep the 37 quote lines
whose source permits redistribution; the 205 drawn from Elsevier full text
(136 prompts) are replaced by [withheld: Elsevier TDM; sha1 <hex>], so the exact
prompt can be rebuilt from the original XML on Stanford servers. Every released prompt and reply was
checked against the full restricted-quote list, by exact substring and by 12-word shingle overlap,
before upload. No Elsevier article text is in this dataset.
Reproducing
Build order is in frontier/PLAN.md in the project repo: claims -> clinical -> neighbours ->
extension -> rationale links -> arms -> score. claims, clinical, compounds and doc_dates come
from ChEMBL 37 (CC BY-SA 3.0) plus OpenAlex and Europe PMC date metadata; the rationale tables are
derived from the extractions in the decisions config above.
- Downloads last month
- 3,130