SYEDKHIZARX snoroozi commited on
Commit
88e4569
·
verified ·
0 Parent(s):

Duplicate from snoroozi/pmoa-tts

Browse files

Co-authored-by: Shahriar <snoroozi@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
60
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - text-classification
4
+ - time-series-forecasting
5
+ language:
6
+ - en
7
+ tags:
8
+ - clinical,
9
+ - time-series,
10
+ - biomedical
11
+ - text
12
+ pretty_name: PMOA-TTS
13
+ size_categories:
14
+ - 100K<n<1M
15
+ dataset_info:
16
+ features:
17
+ - name: pmc_id
18
+ dtype: string
19
+ - name: case_report_id
20
+ dtype: string
21
+ - name: textual_timeseries
22
+ list:
23
+ - name: event
24
+ dtype: string
25
+ - name: time
26
+ dtype: int64
27
+ - name: demographics
28
+ struct:
29
+ - name: age
30
+ dtype: string
31
+ - name: sex
32
+ dtype: string
33
+ - name: ethnicity
34
+ dtype: string
35
+ - name: diagnoses
36
+ sequence: string
37
+ - name: death_info
38
+ struct:
39
+ - name: observed_time
40
+ dtype: float64
41
+ - name: death_event_indicator
42
+ dtype: int64
43
+ splits:
44
+ - name: train
45
+ num_bytes: 240122853
46
+ num_examples: 124349
47
+ - name: case_study_100
48
+ num_bytes: 205311
49
+ num_examples: 88
50
+ - name: case_study_25k_L33
51
+ num_bytes: 47652572
52
+ num_examples: 24746
53
+ - name: case_study_25k_DSR1
54
+ num_bytes: 63989161
55
+ num_examples: 24746
56
+ download_size: 211632200
57
+ dataset_size: 351969897
58
+ configs:
59
+ - config_name: default
60
+ data_files:
61
+ - split: train
62
+ path: data/train-*
63
+ - split: case_study_100
64
+ path: data/case_study_100-*
65
+ - split: case_study_25k_L33
66
+ path: data/case_study_25k_L33-*
67
+ - split: case_study_25k_DSR1
68
+ path: data/case_study_25k_DSR1-*
69
+ license: cc-by-nc-sa-4.0
70
+ ---
71
+ # PMOA-TTS: Textual Time Series from PubMed Case Reports
72
+
73
+ **PMOA-TTS** is a dataset of structured textual time series derived from 124k clinical case reports published in PubMed Open Access. Each data point corresponds to a single patient case and includes a sequence of timestamped clinical events extracted using large language models. This dataset is intended to support research in temporal modeling, survival analysis, event forecasting, and multimodal representation learning.
74
+
75
+ This release contains the full dataset preprocessed from raw annotated files generated by LLaMA 3.3. A future version will include annotations from DeepSeek-R1 for the full dataset to enable comparative modeling. The current DeepSeek-R1 annotations are for the 25k subset presented in the survival experiments of our paper.
76
+
77
+ ---
78
+
79
+ ## 💾 Dataset Summary
80
+
81
+ Each data point corresponds to a case report and includes:
82
+
83
+ - A **textual time series** of clinical events with timestamps.
84
+ - **Demographic information**: age, sex, and ethnicity (when available).
85
+ - A set of **diagnoses** extracted from the same report.
86
+ - A **death phenotype label** indicating whether the patient died or was censored, and the observed time.
87
+
88
+ ---
89
+
90
+ ## 📂 Dataset Splits
91
+
92
+ - **`train` [default]**: The full dataset of 124k single-patient case reports automatically extracted using LLaMA 3.3. This is the default split and contains the primary annotations used in downstream tasks.
93
+ - **`case_study_100`**: A curated benchmark of 100 case reports (88 present in this dataset), used in the paper to evaluate LLM-based vs. metadata-based case report identification. Each sample has been manually reviewed for single-case validity across five different diagnoses.
94
+ - **`case_study_25k_L33`**: A 25k-case subset of LLaMA 3.3-annotated reports used for downstream survival analysis experiments in the paper. This split is designed to support modeling and evaluation of time-to-event outcomes on a more computationally manageable subset.
95
+ - **`case_study_25k_DSR1`**: A 25k-case subset of DeepSeek-R1-annotated reports used for downstream survival analysis experiments in the paper. The `textual_timeseries` and `death_info` fields in this split are reconstructed from DeepSeek-R1 outputs, enabling comparative analysis between models across the same patient cohort.
96
+
97
+ ## 📁 Data Fields
98
+
99
+ Each row in the dataset is a JSON object with the following fields:
100
+
101
+ | Field | Type | Description |
102
+ |-------|------|-------------|
103
+ | `pmc_id` | `str` | Folder-level ID for the PubMed case report (`PMC000xxxxxx` to `PMC011xxxxxx`) |
104
+ | `case_report_id` | `str` | Full filename for the case (e.g., `PMC6417290`) |
105
+ | `textual_timeseries` | `List[Dict]` | Time series of `{ "event": str, "time": int }` |
106
+ | `demographics` | `Dict` | `{"age": str or "Not Specified", "sex": str or "Not Specified", "ethnicity": str or "Not Specified"}` |
107
+ | `diagnoses` | `List[str]` | List of diagnosis terms extracted per case |
108
+ | `death_info` | `Dict` |`{"observed_time": int, "death_event_indicator": 0 or 1}` |
109
+
110
+ ### Example JSON entry
111
+
112
+ ```json
113
+ {
114
+ "pmc_id": "PMC006xxxxxx",
115
+ "case_report_id": "PMC6417290",
116
+ "textual_timeseries": [
117
+ {"event": "56 years old", "time": 0},
118
+ {"event": "male", "time": 0},
119
+ {"event": "HIV-positive", "time": 0},
120
+ {"event": "admitted to the hospital", "time": 0},
121
+ {"event": "knee arthralgia", "time": 0},
122
+ ...
123
+ {"event": "postural headache", "time": 48},
124
+ ...
125
+ {"event": "neurological examination", "time": 120},
126
+ ...
127
+ {"event": "persistence of headache", "time": 144},
128
+ {"event": "brain computed tomography scan", "time": 144}
129
+ ...
130
+ {"event": "symptom free", "time": 4320},
131
+ {"event": "CT scan", "time": 4320},
132
+ {"event": "complete resolution of subdural hematoma", "time": 4320},
133
+ {"event": "no brain shift", "time": 4320}
134
+ ],
135
+ "diagnoses": [
136
+ "HIV",
137
+ "Knee arthralgia",
138
+ "Subdural hematoma",
139
+ "Postdural puncture headache (PDPH)"
140
+ ],
141
+ "death_info": {
142
+ "observed_time": 4230,
143
+ "death_event_indicator": 0
144
+ },
145
+ "demographics": {
146
+ "age": 56,
147
+ "sex": "Male",
148
+ "ethnicity": "Not Specified"
149
+ }
150
+ }
151
+ ```
152
+
153
+ ## 🔍 Intended Use
154
+
155
+ This dataset is intended for research in:
156
+
157
+ - Time series modeling from unstructured text
158
+ - Temporal representation learning
159
+ - Survival analysis (e.g., using `death_info`)
160
+ - Clinical forecasting (next-event prediction)
161
+ - Multimodal clinical modeling (text, time, demographics, outcomes)
162
+
163
+ ## 📝 License
164
+
165
+ The dataset is derived from publicly available PubMed Open Access case reports. All annotations and metadata are released under the **CC BY NC SA 4.0** license.
166
+
167
+ ## 🧩 Coming Soon
168
+ - DeepSeek-R1 annotations for full 125k dataset. (DeepSeek-R1 annotations for the 25k subset is already available).
169
+
170
+ ## 🙏 Acknowledgments
171
+
172
+ This dataset was generated as part of research at National Library of Medicine (NLM) at National Institutes of Health (NIH) and Carnegie Mellon University. We thank the PubMed Open Access initiative and the authors of case reports that made this work possible.
data/case_study_100-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b2310285504256c3e5bfda4f11d1b63132a3618841cb80d780e7441ec4f9b575
3
+ size 104917
data/case_study_25k_DSR1-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39732d6faf55abcd5d15484502649acc789509a41626bcac425eb415bb2eb026
3
+ size 28839947
data/case_study_25k_L33-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96dcb78c2c0f317a7f5efc33408256a5931b8c9607baf2af23558747024ec862
3
+ size 22019579
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a4b828a9ffda9230629b2fa29d81dda24a72e5c6911b4f31562b75cb404fb9f
3
+ size 109822131
tts_dataset.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1aac58db4cd2c1a874e4713130fdddb900b1a8c9aab87e396b50c80318088486
3
+ size 346093140
tts_dataset_case_study_100.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ddfb678a75857159c865c2d13ffcbb0d9a061d63a4240c9584a4a5dbb6ef14ac
3
+ size 293355
tts_dataset_case_study_25k_DSR1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42eb53efa18da788d5e4415169479c034088b76715dbf44cbf95ddc9937d4117
3
+ size 91104833
tts_dataset_case_study_25k_L33.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c13531242e4c0880403046bcf2cdbaeec2671668d984aab6d99bcecf7a74198
3
+ size 68686344