Datasets:
File size: 3,809 Bytes
7b0a9b4 091ca79 7b0a9b4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | ---
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)
|