| --- |
| annotations_creators: |
| - machine-generated |
| language: |
| - en |
| license: |
| - other |
| multilinguality: |
| - monolingual |
| size_categories: |
| - 100K<n<1M |
| task_categories: |
| - image-to-text |
| - visual-question-answering |
| task_ids: |
| - visual-question-answering |
| --- |
| |
| # RobustRDP-ProcessedTrainData |
|
|
| Processed training data for the paper: *RobustRDP: Advancing Reaction Diagram Parsing via Synthetic-to-Real Data Scaling and Robustness-Oriented Training*. |
|
|
| ## Dataset Structure |
|
|
| ``` |
| pretrain_data/ |
| ├── pretrain_downsampled_llm_6w.json # 60,000 synthetic reaction diagrams |
| └── images_pretrain_resized/ |
| ├── single_line_resized/ # Single-line chain-style reactions |
| ├── multi_line_resized/ # Multi-line chain-style reactions |
| ├── branch_resized/ # Branching reactions |
| └── cycle_resized/ # Cyclic reactions |
| |
| sft_data/ |
| ├── multi_task_sft_downsampled_llm.json # 190,800 multi-task SFT entries |
| ├── images_train_aug_resized/ # Augmented training images |
| └── images_train_resized/ # Original resized training images |
| |
| dpo_data/ |
| └── train_downsampled_llm_dpo.json # 14,169 DPO triplets (chosen/rejected pairs) |
| ``` |
|
|
| ## Data Splits |
|
|
| | Split | Entries | Description | |
| |-------|---------|-------------| |
| | **Pretrain** | 60,000 | Synthetic reaction diagrams generated by LayoutDrivenSynthesizer (4 layout types: single-line, multi-line, branch, cycle) | |
| | **SFT** | 190,800 | Multi-task supervised fine-tuning data with 3 task variants: Vanilla Reaction Parsing (VRP), Region-Guided Reaction Parsing (RGRP), Prefix-Perturbed Reaction Parsing (PPRP) | |
| | **DPO** | 14,169 | Direct Preference Optimization triplets with chosen (ground-truth) and rejected (model prediction) annotations | |
|
|
| ## Data Format |
|
|
| ### Pretrain & SFT |
|
|
| Each entry follows the conversational format: |
|
|
| ```json |
| { |
| "messages": [ |
| {"content": "<image>\n...", "role": "user"}, |
| {"content": "<rxn><rct>...<mol><cnd>...<txt><prd>...<mol>", "role": "assistant"} |
| ], |
| "images": ["path/to/image.png"] |
| } |
| ``` |
|
|
| Annotations use special tokens: |
| - `<rxn>`: Start of a reaction |
| - `<rct>`: Reactants section |
| - `<cnd>`: Conditions section |
| - `<prd>`: Products section |
| - `<mol>`: Molecule entity |
| - `<txt>`: Text entity |
|
|
| ### DPO |
|
|
| Each entry contains chosen/rejected pairs: |
|
|
| ```json |
| { |
| "messages": [{"from": "user", "value": "<image>\n..."}], |
| "chosen": {"from": "assistant", "value": "<rxn>..."}, |
| "rejected": {"from": "assistant", "value": "<rxn>..."}, |
| "images": ["path/to/image.png"], |
| "overall": {"precision": 0.8, "recall": 0.8, "f1": 0.8}, |
| "mol_only": {"precision": 0.9, "recall": 0.9, "f1": 0.9} |
| } |
| ``` |
|
|
| ## Data Generation |
|
|
| - **Pretrain**: Synthetic data generated by [LayoutDrivenSynthesizer](https://github.com/jaydetang/RobustRDP/tree/main/pretrain_data_process) — renders molecules from PubChem SMILES onto reaction diagrams with 4 layout types. |
| - **SFT**: Built from [RxnLabelData](https://huggingface.co/datasets/Jingcz/RxnLabelData) with data augmentation (rotation, distortion, composite) and two auxiliary tasks (RGRP, PPRP). See [SFT data process](https://github.com/jaydetang/RobustRDP/tree/main/sft_data_process). |
| - **DPO**: Generated by running the SFT model on training data and filtering cases where model predictions (F1 < 0.8) differ from ground truth. See [DPO data process](https://github.com/jaydetang/RobustRDP/tree/main/dpo_data_process). |
|
|
| ## Related Resources |
|
|
| - **Model**: [RobustRDP](https://huggingface.co/Jingcz/RobustRDP) |
| - **Raw Data**: [RobustRDP-RawTrainData](https://huggingface.co/datasets/Jingcz/RobustRDP-RawTrainData) |
| - **Code**: [RobustRDP GitHub](https://github.com/jaydetang/RobustRDP) |
| - **Annotation Platform**: [RxnLabel](https://github.com/jaydetang/RxnLabel) |
|
|