Jingcz commited on
Commit
7b0a9b4
·
verified ·
1 Parent(s): e8f0579

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +100 -0
README.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - machine-generated
4
+ language:
5
+ - en
6
+ license:
7
+ - other
8
+ multilinguality:
9
+ - monolingual
10
+ size_categories:
11
+ - 100K<n<1M
12
+ task_categories:
13
+ - image-to-text
14
+ - visual-question-answering
15
+ task_ids:
16
+ - visual-question-answering
17
+ ---
18
+
19
+ # RobustRDP-ProcessedTrainData
20
+
21
+ Processed training data for the paper: *RobustRDP: Advancing Reaction Diagram Parsing via Synthetic-to-Real Data Scaling and Robustness-Oriented Training*.
22
+
23
+ ## Dataset Structure
24
+
25
+ ```
26
+ pretrain_data/
27
+ ├── pretrain_downsampled_llm_6w.json # 60,000 synthetic reaction diagrams
28
+ └── images_pretrain_resized/
29
+ ├── single_line_resized/ # Single-line chain-style reactions
30
+ ├── multi_line_resized/ # Multi-line chain-style reactions
31
+ ├── branch_resized/ # Branching reactions
32
+ └── cycle_resized/ # Cyclic reactions
33
+
34
+ sft_data/
35
+ ├── multi_task_sft_downsampled_llm.json # 190,800 multi-task SFT entries
36
+ ├── images_train_aug_resized/ # Augmented training images
37
+ └── images_train_resized/ # Original resized training images
38
+
39
+ dpo_data/
40
+ └── train_downsampled_llm_dpo.json # 14,169 DPO triplets (chosen/rejected pairs)
41
+ ```
42
+
43
+ ## Data Splits
44
+
45
+ | Split | Entries | Description |
46
+ |-------|---------|-------------|
47
+ | **Pretrain** | 60,000 | Synthetic reaction diagrams generated by LayoutDrivenSynthesizer (4 layout types: single-line, multi-line, branch, cycle) |
48
+ | **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) |
49
+ | **DPO** | 14,169 | Direct Preference Optimization triplets with chosen (ground-truth) and rejected (model prediction) annotations |
50
+
51
+ ## Data Format
52
+
53
+ ### Pretrain & SFT
54
+
55
+ Each entry follows the conversational format:
56
+
57
+ ```json
58
+ {
59
+ "messages": [
60
+ {"content": "<image>\n...", "role": "user"},
61
+ {"content": "<rxn><rct>...<mol><cnd>...<txt><prd>...<mol>", "role": "assistant"}
62
+ ],
63
+ "images": ["path/to/image.png"]
64
+ }
65
+ ```
66
+
67
+ Annotations use special tokens:
68
+ - `<rxn>`: Start of a reaction
69
+ - `<rct>`: Reactants section
70
+ - `<cnd>`: Conditions section
71
+ - `<prd>`: Products section
72
+ - `<mol>`: Molecule entity
73
+ - `<txt>`: Text entity
74
+
75
+ ### DPO
76
+
77
+ Each entry contains chosen/rejected pairs:
78
+
79
+ ```json
80
+ {
81
+ "messages": [{"from": "user", "value": "<image>\n..."}],
82
+ "chosen": {"from": "assistant", "value": "<rxn>..."},
83
+ "rejected": {"from": "assistant", "value": "<rxn>..."},
84
+ "images": ["path/to/image.png"],
85
+ "overall": {"precision": 0.8, "recall": 0.8, "f1": 0.8},
86
+ "mol_only": {"precision": 0.9, "recall": 0.9, "f1": 0.9}
87
+ }
88
+ ```
89
+
90
+ ## Data Generation
91
+
92
+ - **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.
93
+ - **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).
94
+ - **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).
95
+
96
+ ## Related Resources
97
+
98
+ - **Model**: [RobustRDP](https://huggingface.co/Jingcz/RobustRDP)
99
+ - **Code**: [RobustRDP GitHub](https://github.com/jaydetang/RobustRDP)
100
+ - **Annotation Platform**: [RxnLabel](https://github.com/jaydetang/RxnLabel)