--- license: apache-2.0 task_categories: - text-generation - text-classification dataset_info: features: - name: smiles dtype: string - name: label dtype: int64 - name: molecular_features dtype: string - name: most_similar_approved dtype: string - name: most_similar_unapproved dtype: string splits: - name: train num_bytes: 11885125 num_examples: 3608 - name: validation num_bytes: 1481560 num_examples: 451 - name: test num_bytes: 1484156 num_examples: 451 - name: external num_bytes: 81109 num_examples: 25 download_size: 3159278 dataset_size: 14931950 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* - split: external path: data/external-* tags: - chemistry - biology - medical --- [Paper](https://huggingface.co/papers/2508.18579) | [![arXiv](https://img.shields.io/badge/arXiv-2508.18579-b31b1b.svg)](https://arxiv.org/abs/2508.18579) | [Code](https://github.com/mohammad-gh009/DrugReasoner) # DrugReasoner Dataset This dataset contains a curated collection of approved (Phase IV clinical trial) and unapproved (pre-clinical trial) small molecules from the ChEMBL database, annotated for drug approval status. It was designed for training and evaluating DrugReasoner, a reasoning-augmented LLM for drug approval prediction. * **Label:** `1` for approved drugs, `0` for unapproved small molecules. * **Features:** Each molecule is paired with its five most similar approved and unapproved molecules, based on a similarity metric. * **Source:** All data were retrieved from ChEMBL database. * **Purpose:** To support research in drug approval prediction, molecular reasoning, and interpretable AI in drug discovery. # Data verification and processing A dataset of small molecules was obtained from the ChEMBL database (version 35) including approved molecules in Phase IV clinical trials and molecules in the preclinical phase. Child molecules were replaced by their parent compounds to avoid duplication. A subset of 2,255 approved and 2,255 unapproved molecules was created by random undersampling of the unapproved class. The simplified molecular input line entry system (SMILES) structure was retrieved, and strings were canonicalized using RDKit (version 2023.9.5). The dataset was partitioned into training, validation, and test subsets (8:1:1) using a stratified sampling strategy to maintain class distribution across all splits. An independent external dataset includes data presented in the ChemAP paper (Cho, C. et al., 2024). This dataset contained 20 approved and 8 unapproved drugs. Three approved drugs overlapping with the training, validation, or test sets were removed, and the remaining molecules (17 approved and 8 unapproved) were used for external evaluation. ## Sample Usage To use **DrugReasoner**, you must first request access to the base model [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct) on Hugging Face by providing your contact information. Once access is granted, you can run DrugReasoner either through the command-line interface (CLI) or integrate it directly into your Python workflows. ### Prerequisites - Python 3.8 or higher - CUDA-compatible GPU (recommended for training and inference) - Git ### Setup Instructions 1. **Clone the repository** ```bash git clone https://github.com/mohammad-gh009/DrugReasoner.git cd DrugReasoner ``` 2. **Create and activate virtual environment** **Windows:** ```bash cd src python -m venv myenv myenv\Scripts\activate ``` **Mac/Linux:** ```bash cd src python -m venv myenv source myenv/bin/activate ``` 3. **Install dependencies** ```bash pip install -r requirements.txt ``` 4. **Login to your Huggingface account** You can use [this](https://huggingface.co/join) instruction on how to make an account and [this](https://huggingface.co/docs/hub/en/security-tokens) on how to get the token ```bash huggingface-cli login --token YOUR_TOKEN_HERE ``` ## 🚀 How to use **Note:** GPU is required for inference. If unavailable, use our [Kaggle Notebook](https://www.kaggle.com/code/mohammadgh009/drugreasoner). #### CLI Inference ```bash python inference.py \ --smiles "CC(C)CC1=CC=C(C=C1)C(C)C(=O)O" "CC1=CC=C(C=C1)C(=O)O" \ --output results.csv \ --top-k 9 \ --top-p 0.9 \ --max-length 4096 \ --temperature 1.0 ``` #### Python API Usage ```python from inference import DrugReasoner predictor = DrugReasoner() results = predictor.predict_molecules( smiles_list=["CC(C)CC1=CC=C(C=C1)C(C)C(=O)O"], save_path="results.csv", print_results=True, top_k=9, top_p=0.9, max_length=4096, temperature=1.0 ) ``` # Citation If you use this dataset in your research, please cite our paper: ``` @misc{ghaffarzadehesfahani2025drugreasonerinterpretabledrugapproval, title={DrugReasoner: Interpretable Drug Approval Prediction with a Reasoning-augmented Language Model}, author={Mohammadreza Ghaffarzadeh-Esfahani and Ali Motahharynia and Nahid Yousefian and Navid Mazrouei and Jafar Ghaisari and Yousof Gheisari}, year={2025}, eprint={2508.18579}, archivePrefix={arXiv}, primaryClass={cs.LG}, url={https://arxiv.org/abs/2508.18579}, } ``` ## Datast Card Author [Mohammadreza Ghaffarzadeh-Esfahani](https://huggingface.co/Moreza009) ## Dataset Card Contact You can contact with the Corresponding author of the paper: Ali Motahharynia (alimotahharynia@gmail.com)