Views
No views yet
ibm-research/MoLFormer-XL-both-10pct (MolFormer-XL), frozen: SMILES → mean-pooled token
embedding → 768-d, then a 2-layer MLP (768→384→256).sentence-transformers/all-MiniLM-L6-v2 (MiniLM), frozen: each of the 7 metadata
fields is embedded separately (mean-pooled, L2-normalized) → 384-d, then a learned
per-field projection → 32-d (7×32 = 224-d total).
A missing/empty field uses a learned per-field "missing" embedding instead of the text embedding,
so absent metadata is handled gracefully and distinctly from any real value.[mol_mlp (256) | metadata (224)] = 480-d.[z_A, z_B] → 960-d input.sigmoid(logit) = P(transfer). ~8M trainable params; encoders frozen.molecule_name, species_or_population, dose, oral_exposure_mode, qualifying_conditions, comparator, extra_detailsNone/"", for a missing field
— the model then uses its learned per-field "missing" embedding.pip install torch transformers safetensors sentence-transformerstrust_remote_code=True. The repository includes the custom model wrapper plus
the frozen MolFormer and MiniLM encoders, so inference runs directly from raw SMILES and metadata.1from transformers import AutoModel
2
3repo_id = "jiosephlee/starling-transfer-shared-eval-same-species-v2-no-source-value-small-lt10m-v1-best-knn-val1"
4model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval()
5
6out = model(
7 smiles_a=["CC(=O)Oc1ccccc1C(=O)O"], # molecule A (bioavailability known)
8 smiles_b=["CCO"], # molecule B (candidate)
9 metadata_a=[{"species_or_population": "human", "dose": "325 mg", "oral_exposure_mode": "tablet"}],
10 metadata_b=[{"species_or_population": "human"}], # missing fields are fine
11 # no source_value argument for this variant
12)
13p_transfer = out.logits.sigmoid()
14print(float(p_transfer[0]))smiles_a: SMILES for molecule A.smiles_b: SMILES for molecule B.metadata_a: dicts for molecule A metadata.metadata_b: dicts for molecule B metadata.source_value.1[
2 "molecule_name",
3 "species_or_population",
4 "dose",
5 "oral_exposure_mode",
6 "qualifying_conditions",
7 "comparator",
8 "extra_details",
9]None or "". The model has learned missing-field
embeddings for those cases.out.logits.sigmoid() to get P(transfer), where higher values
mean the model predicts that oral-bioavailability behavior transfers from molecule A to molecule B
under the provided study context.1out = model(
2 smiles_a=["CCO", "CCN"],
3 smiles_b=["CCC", "CCCl"],
4 metadata_a=[
5 {"species_or_population": "rat", "oral_exposure_mode": "oral gavage"},
6 {"species_or_population": "human", "dose": "50 mg"},
7 ],
8 metadata_b=[
9 {"species_or_population": "rat"},
10 {"species_or_population": "human", "dose": "100 mg"},
11 ],
12)
13probs = out.logits.sigmoid().tolist()same_species_v2 no-source-value shared-eval split. The frozen embeddings were
precomputed once and the head was trained on top. The label is |value_A - value_B| thresholded.
This no-source-value variant learns transfer from molecule structure and metadata only.record_knn_validation_1_macro_f1, not the checkpoint
selected by assay-transfer validation macro-F1.same_species_v2no_source_valuesmall_lt10m_v1best_record_knn_validation_1_macro_f1record_knn_validation_1_macro_f1 = 0.7048431000condition_key_v3_record_splits_hf/full_metadata:0.699383, accuracy 0.7338710.766394, accuracy 0.796000checkpoint_metadata.json.