jialucode commited on
Commit
5fc8125
·
verified ·
1 Parent(s): 16a6294

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -30
README.md CHANGED
@@ -2,38 +2,30 @@
2
  ---
3
  license: mit
4
  ---
5
- # 0. FSL_ECG_QA_Dataset
6
 
7
  **FSL_ECG_QA_Dataset** is a **benchmark dataset** specifically designed to accompany the paper *"Electrocardiogram–Language Model for Few-Shot Question Answering with Meta Learning"* (**arXiv:2410.14464v1**). It supports research in combining **electrocardiogram (ECG) signals** with **natural language question answering (QA)**, particularly in **few-shot** and **meta-learning** scenarios.
8
 
9
- ## 1. Dataset Highlights
 
 
 
 
 
 
 
10
 
11
  - 🧠 **Task Diversification**: Restructured **ECG-QA tasks** promote rapid **few-shot adaptation**.
12
  - 🧬 **Fusion Mapping**: A lightweight **multimodal mapper** bridges **ECG** and **language features**.
13
  - 🚀 **Model Generalization**: **LLM-agnostic design** ensures broad **transferability** and **robustness**.
14
 
15
- ## 2 Developing Datasets
16
- ### 2.1 Source Datasets
17
-
18
- The dataset is a structured reorganization of the existing ECG-QA dataset, adapted to suit meta-learning tasks. It draws samples from ECG sources such as [PTB-XL](https://physionet.org/content/ptb-xl/1.0.3/) and [MIMIC-IV-ECG](https://physionet.org/content/mimic-iv-ecg/1.0/), and [ECG-QA dataset](https://github.com/Jwoo5/ecg-qa?tab=readme-ov-file) organizes them into diverse task sets based on question types including **verify(yes/no)**, **choice(Condition_A/Condition_B)**, and **query(open-ended)** question in table 2.2. and clinical attributes (e.g., SCP codes, noise type, axis deviation) used to describing the ECG. This structure enables models to rapidly adapt to new diagnostic tasks with limited annotated examples.
19
-
20
- <img src="img/distribution_attr.png" alt="Figure 1: Illustration of class formation and attribute distribution for different question types." width="600"/>
21
-
22
- ### 2.2 Dataset Description
23
 
24
- Overview of question types and data distribution within the meta learning benchmark dataset created for few-shot ECG question answering.
25
 
26
- #### Supported Tasks
27
-
28
- - What tasks can be performed on this dataset?
29
- - Are there any code associated with this dataset?
30
- - Electrocardiogram–Language Model for Few-Shot Question Answering with Meta Learning(ICASSP 2025), https://arxiv.org/html/2410.14464v1
31
-
32
- **class(template_id_attribute_answer pairs)**
33
-
34
- #### Data Instances
35
 
36
- Merge all data in train/val/test dataset in ECG-QA and change it into different class, Use a consistent ID system to track attribute-answer combinations (definition of "way" in meta-learning):
37
 
38
  ```python
39
  {
@@ -48,12 +40,26 @@ Merge all data in train/val/test dataset in ECG-QA and change it into different
48
  "attribute": ["non-diagnostic t abnormalities"]
49
  }
50
  ```
 
51
 
52
- #### New Class Naming
 
 
53
 
 
 
 
54
  Example: `5_atrial_fibrillation_yes` represents Template ID *5*, attribute *"atrial fibrillation"*, answer *"yes"*.
55
 
56
- #### Class Build
 
 
 
 
 
 
 
 
57
 
58
  | Question Type | Attributes | Answers | Classes (train:test) | Samples | Example |
59
  |-----------------|------------|----------------------------------|-----------------------|---------|-------------------------------------------------------------------------|
@@ -62,12 +68,8 @@ Example: `5_atrial_fibrillation_yes` represents Template ID *5*, attribute *"atr
62
  | Single-Query | 30 | attr_1/attr_2/.../attr_n | 260 (208:52) | 63,125 | Q: What direction is this ECG deviated to? <br> A: Normal axis/... |
63
  | All | 206 | yes/no/both/none/.../attr_n | 678 (541:137) | 144,885 | ... |
64
 
65
- #### Loading the Dataset
66
 
67
- ```bash
68
- python load_class.py --base_path /your/actual/path/to/ecgqa/ptbxl/paraphrased --test_dataset ptb-xl
69
- python load_class.py --paraphrased_path /your/actual/path/to/ecgqa/mimic-iv-ecg/paraphrased --test_dataset mimic
70
- ```
71
 
72
  ```python
73
  train_data = dataset["train"]
@@ -78,8 +80,6 @@ for example in train_data.select(range(3)):
78
  print(example)
79
  ```
80
 
81
- ### Few-shot Build
82
-
83
  ```bash
84
  python data_loader.py --paraphrased_path /your/actual/path/to/ecgqa/mimic-iv-ecg/paraphrased --test_dataset mimic
85
  ```
 
2
  ---
3
  license: mit
4
  ---
5
+ # 0. FSL_ECG_QA_Dataset Description
6
 
7
  **FSL_ECG_QA_Dataset** is a **benchmark dataset** specifically designed to accompany the paper *"Electrocardiogram–Language Model for Few-Shot Question Answering with Meta Learning"* (**arXiv:2410.14464v1**). It supports research in combining **electrocardiogram (ECG) signals** with **natural language question answering (QA)**, particularly in **few-shot** and **meta-learning** scenarios.
8
 
9
+ ## 0.1 Supported Tasks
10
+
11
+ - What tasks can be performed on this dataset?
12
+ Developing robust and reliable multimodal QA systems for ECG interpretation relies on the availability of both high-quality and large quantities of labeled data. Yet, obtaining massive amounts of labeled ECGs from cardiologists is costly, which often results in limited datasets. Traditional supervised learning methods tend to perform well only on data with the same distribution as the training data. In real-world deployment, however, models frequently encounter new tasks and previously unseen populations outside the training distribution, where traditional methods may fail.
13
+ - Are there any code associated with this dataset?
14
+ Electrocardiogram–Language Model for Few-Shot Question Answering with Meta Learning(ICASSP 2025), https://arxiv.org/html/2410.14464v1
15
+
16
+ ## 0.2 Dataset Highlights
17
 
18
  - 🧠 **Task Diversification**: Restructured **ECG-QA tasks** promote rapid **few-shot adaptation**.
19
  - 🧬 **Fusion Mapping**: A lightweight **multimodal mapper** bridges **ECG** and **language features**.
20
  - 🚀 **Model Generalization**: **LLM-agnostic design** ensures broad **transferability** and **robustness**.
21
 
22
+ # 1 Developing Datasets
 
 
 
 
 
 
 
23
 
24
+ ## 1.1 Source Datasets
25
 
26
+ The dataset is a structured reorganization of the existing ECG-QA dataset, adapted to suit meta-learning tasks. It draws samples from ECG sources such as [PTB-XL](https://physionet.org/content/ptb-xl/1.0.3/) and [MIMIC-IV-ECG](https://physionet.org/content/mimic-iv-ecg/1.0/), and [ECG-QA dataset](https://github.com/Jwoo5/ecg-qa?tab=readme-ov-file) organizes them into diverse task sets based on question types including **verify(yes/no)**, **choice(Condition_A/Condition_B)**, and **query(open-ended)** question in table 2.2. and clinical attributes (e.g., SCP codes, noise type, axis deviation) used to describing the ECG. This structure enables models to rapidly adapt to new diagnostic tasks with limited annotated examples.
 
 
 
 
 
 
 
 
27
 
28
+ ### 1.1.1 Source Datasets Instances
29
 
30
  ```python
31
  {
 
40
  "attribute": ["non-diagnostic t abnormalities"]
41
  }
42
  ```
43
+ ### 1.1.2 Source Datasets Instances distribution
44
 
45
+ <img src="img/distribution_attr.png" alt="Figure 1: Illustration of class formation and attribute distribution for different question types." width="600"/>
46
+
47
+ ## 1.2 New few shot learning Datasets
48
 
49
+ ### 1.2.1 New Class Naming
50
+ Merge all data in train/val/test dataset in ECG-QA and change it into different class, Use a consistent ID system to track attribute-answer combinations (definition of "way" in meta-learning):
51
+ **class(template_id_attribute_answer pairs)**
52
  Example: `5_atrial_fibrillation_yes` represents Template ID *5*, attribute *"atrial fibrillation"*, answer *"yes"*.
53
 
54
+ ### 1.2.2 Loading the Dataset class
55
+
56
+ ```python
57
+ python load_class.py --base_path /your/actual/path/to/ecgqa/ptbxl/paraphrased --test_dataset ptb-xl
58
+ python load_class.py --paraphrased_path /your/actual/path/to/ecgqa/mimic-iv-ecg/paraphrased --test_dataset mimic
59
+ (all tested mimic-iv-ecg dataset is listed in "data/processed_test_30k.json")
60
+ ```
61
+
62
+ ### 1.2.3 New Datasets Class distribution
63
 
64
  | Question Type | Attributes | Answers | Classes (train:test) | Samples | Example |
65
  |-----------------|------------|----------------------------------|-----------------------|---------|-------------------------------------------------------------------------|
 
68
  | Single-Query | 30 | attr_1/attr_2/.../attr_n | 260 (208:52) | 63,125 | Q: What direction is this ECG deviated to? <br> A: Normal axis/... |
69
  | All | 206 | yes/no/both/none/.../attr_n | 678 (541:137) | 144,885 | ... |
70
 
71
+ ### Few-shot Build
72
 
 
 
 
 
73
 
74
  ```python
75
  train_data = dataset["train"]
 
80
  print(example)
81
  ```
82
 
 
 
83
  ```bash
84
  python data_loader.py --paraphrased_path /your/actual/path/to/ecgqa/mimic-iv-ecg/paraphrased --test_dataset mimic
85
  ```