Dataset Prep & Filters
Prepare and filter training datasets for REINVENT 4 generative models.
Curating your training data is the single biggest lever on what REINVENT generates: this page covers the input formats, cleaning, blocklists, diversity filters, and scaffold-based splits that determine the chemical validity and diversity of the molecules you get back.
Training Data for REINVENT 4
REINVENT 4 uses RNN and transformer architectures that require properly curated SMILES datasets for training generative models. The quality of training data directly impacts the chemical validity and diversity of generated molecules.
For more information, see the REINVENT 4 GitHub repository.
Input formats
- CSV with a
smilescolumn (UTF-8) - SDF for richer metadata; export
smilesif you need fast parsing - Optional columns:
score,label,source
Cleaning
Blocklists
- Maintain SMARTS for liabilities (e.g., nitro, sulfur mustards).
- Add an
allowedcolumn if certain scaffolds must remain even if they match alerts.
Diversity filters
- Precompute Murcko scaffolds to monitor coverage:
Chem.Scaffolds.MurckoScaffold.GetScaffoldForMol. - Log scaffold frequency; drop overrepresented ones before training.
Splits
- Train/valid/test: typical 80/10/10 by scaffold.
- For RL-only runs, keep a held-out set to evaluate novelty after training.
Provenance
- Store dataset version, source URL, and checksum in a small
metadata.jsonnext to the CSV/SDF. - Record these details in job metadata so downstream tasks can trace results.
Training considerations for REINVENT 4
REINVENT 4 supports multiple generative modes that may require different dataset preparations:
- De novo design: Large, diverse SMILES datasets (e.g., ChEMBL, ZINC) for pre-training prior models
- Scaffold hopping: Datasets containing the target scaffold class for focused generation
- R-group replacement: Annotated datasets with marked attachment points for substituent optimization
- Linker design: Fragment pairs with known linkers for training linker generation models
When fine-tuning models for specific chemical spaces, ensure training data represents the desired molecular properties and structural features.
Was this page helpful?
REINVENT
Design molecules with REINVENT 4 reinforcement learning, scoring functions and diversity filters — soft-deprecated here in favour of GenMol.
RL Loops & Curriculum
Steer a REINVENT run — random_seed, Murcko-scaffold diversity filters with minsimilarity and bucket_size, the replay buffer and curriculum stages.