Khaos Molecule Embedding

A molecule encoder that fuses a SMILES transformer with a molecular graph network into a 256-dimensional vector, pre-trained to predict 17 RDKit descriptors.

chem_mol_embedding v1, from Khaos (a local-first library of pre-trained models for domain-specific tasks). This is the first release of the artifact.

Model

  • Architecture: HybridMoleculeEncoder: 6-layer SMILES transformer (dim 256, 8 heads) + 4-layer GIN-style graph network, fused by an MLP
  • Parameters: 5,568,772
  • Format: ONNX (model.onnx) plus PyTorch weights (model.pt) and manifest.json
  • Training data: fletxcher/khaos-chem_mol_embedding

Results

Measured on the held-out test split of the training dataset.

Metric Value
mean_r2 0.9950
mse_standardized 0.0082
n_test 20000

Per-descriptor results

Per-descriptor R2 on the test split (scaffold-disjoint):

Descriptor R2
MolWt 0.999
MolLogP 0.995
MolMR 0.999
TPSA 0.998
LabuteASA 0.999
BertzCT 0.997
HeavyAtomCount 1.000
NumHeteroatoms 0.999
NumHDonors 0.997
NumHAcceptors 0.996
NumRotatableBonds 0.993
RingCount 0.996
NumAromaticRings 0.995
NumAliphaticRings 0.984
NumSaturatedRings 0.987
FractionCSP3 0.998
qed 0.982

Training

{
  "vocab_size": 246,
  "atom_dim": 32,
  "dim": 256,
  "depth": 6,
  "heads": 8,
  "graph_layers": 4,
  "epochs": 10,
  "batch": 256,
  "lr": 0.001,
  "train_molecules": 160000,
  "objective": "17 standardized RDKit descriptors, MSE"
}

Best epoch 10, trained in 77.7 minutes on a single consumer GPU (RTX 3050 8 GB).

Intended use

Embedding molecules for similarity search and as an initialization for property models. Inputs are SMILES token ids plus atom features and adjacency (see khaos.chem.tokenizer and atom_features in training/chem/train.py).

Limitations

  • Trained only to reproduce RDKit descriptors, so the embedding reflects structure and physicochemical features, not biological activity.
  • Drug-like molecules up to 60 heavy atoms and 126 SMILES tokens.
  • Not validated on organometallics, polymers or large natural products.

Usage

pip install khaos
khaos serve ./chem_mol_embedding

License

This model was trained on data with research-only, share-alike or mixed terms (see the training dataset card for each source). Treat it as research use and check the upstream data licenses before any commercial use.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support