ztshuaiUCLA commited on
Commit
cfe17c8
Β·
verified Β·
1 Parent(s): 68d93bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -78
README.md CHANGED
@@ -7,13 +7,6 @@ tags:
7
  - physiological-signal
8
  - generative-model
9
  - flow-matching
10
- - scalable-interpolant-transformer
11
- - ecg
12
- - ppg
13
- - blood-pressure
14
- - vitaldb
15
- - mimic-iv
16
- - sensorgen
17
  language:
18
  - en
19
  datasets:
@@ -24,29 +17,24 @@ datasets:
24
 
25
  [![Paper](https://img.shields.io/badge/paper-arXiv-red)](#)
26
  [![Webpage](https://img.shields.io/badge/website-project--page-blue)](#)
27
- [![GitHub](https://img.shields.io/badge/code-GitHub-181717?logo=github)](https://github.com/GitaTReNt/SensorGen)
28
- [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-SensorGen--SiT-FFD21E)](https://huggingface.co/Run33/SensorGen-SiT)
29
  [![Python](https://img.shields.io/badge/python-3.10%2B-brightgreen)](https://www.python.org/)
30
  [![PyTorch](https://img.shields.io/badge/PyTorch-2.4%2B-EE4C2C?logo=pytorch)](https://pytorch.org/)
31
- [![Model size](https://img.shields.io/badge/params-260--273M-blueviolet)](#model-details)
32
 
33
  > Scalable Interpolant Transformer (SiT-B/1d) reference models for the
34
  > SensorGen benchmark on real-world sensor time series.
35
 
36
- This repository hosts five trained checkpoints used in the SensorGen study
37
  ("*Signal or Noise? Understanding Generative Models for Real-World Sensor
38
- Time Series*"). All checkpoints share the same SiT-B/1d backbone (12
39
- transformer blocks, hidden 768, 1-D patch size 20) and were trained on 4Γ—
40
- NVIDIA GH200 120 GB with a constant 1e-4 learning rate, EMA decay 0.9998,
41
- and hard FP32 precision.
42
-
43
- | Checkpoint | Task | Dataset | Step | Notes |
44
- |------------|------|---------|-------|-------|
45
- | `sit_b1d_mimic_text2ecg_50k.pt` | Text-to-ECG | MIMIC-IV ECG | 50,000 | Paper-aligned step |
46
- | `sit_b1d_mimic_text2ecg_200k.pt` | Text-to-ECG | MIMIC-IV ECG | 200,000 | Extended training |
47
- | `sit_b1d_vitaldb_bp_translation_50k.pt` | PPG β†’ invasive BP | VitalDB | 50,000 | Paper-aligned step |
48
- | `sit_b1d_vitaldb_forecast_18k.pt` | Medication-aware forecasting | VitalDB | 18,000 | Best-validation step (paper-aligned) |
49
- | `sit_b1d_vitaldb_forecast_200k.pt` | Medication-aware forecasting | VitalDB | 200,000 | Extended training |
50
 
51
  For VitalDB forecasting we observed a U-shape in validation loss past ~20K
52
  steps; the **18K best-validation checkpoint** is what we use to report paper
@@ -58,7 +46,7 @@ overfit on the validation set.
58
  ## Usage
59
 
60
  Pair this checkpoint repository with the GitHub code release at
61
- **[GitaTReNt/SensorGen](https://github.com/GitaTReNt/SensorGen)**.
62
 
63
  ### Download a single checkpoint
64
 
@@ -66,54 +54,17 @@ Pair this checkpoint repository with the GitHub code release at
66
  from huggingface_hub import hf_hub_download
67
 
68
  ckpt_path = hf_hub_download(
69
- repo_id="Run33/SensorGen-SiT",
70
- filename="sit_b1d_mimic_text2ecg_50k.pt",
71
  )
72
  ```
73
 
74
  ### Download all checkpoints (β‰ˆ26 GB)
75
 
76
  ```bash
77
- hf download Run33/SensorGen-SiT --local-dir ./ckpts
78
- ```
79
-
80
- ### Run inference (text-to-ECG)
81
-
82
- ```bash
83
- # After cloning https://github.com/GitaTReNt/SensorGen
84
- torchrun --nproc_per_node=1 wrapper/run.py \
85
- --model-name sit \
86
- --config wrapper/configs/sit_mimic_generation.yaml \
87
- --ckpt ./ckpts/sit_b1d_mimic_text2ecg_50k.pt \
88
- --evaluate_only \
89
- --global-batch-size 16 \
90
- --results-dir ./samples_text_to_ecg
91
  ```
92
 
93
- This loads the EMA weights, runs flow-matching ODE sampling on the
94
- MIMIC-IV ECG test-split reports, and writes 12-lead ECG signals of shape
95
- `(B, 12, 1000)` to `./samples_text_to_ecg/`. On first use the SD3 text
96
- encoder (~12 GB) is downloaded automatically from Hugging Face Hub.
97
-
98
- Equivalent commands for the other two tasks are in the repository
99
- [README](https://github.com/GitaTReNt/SensorGen#-usage).
100
-
101
-
102
- ## Model details
103
-
104
- | Field | Value |
105
- |-------|-------|
106
- | Architecture | SiT-B/1d (Scalable Interpolant Transformer, 1-D variant) |
107
- | Depth Γ— width | 12 transformer blocks Γ— hidden 768 |
108
- | Patchification | `Conv1d(in_channels=C, kernel=20, stride=20)`; `C ∈ {12, 1, 7}` per task |
109
- | Trained parameters | β‰ˆ260 M (text-to-ECG, excluding frozen SD3 text encoder) / β‰ˆ273 M (BP, forecasting) |
110
- | Path / prediction | Linear interpolant, velocity-parameterised flow matching |
111
- | Precision | Hard FP32 (TF32 disabled) |
112
- | Optimizer | AdamW, constant LR 1e-4, no warmup |
113
- | EMA decay | 0.9998 |
114
- | Batch size | Global 256 (per-rank 64 on 4Γ— GH200 120 GB) |
115
- | Training time | ~24–96 GPU-hours per task |
116
-
117
 
118
  ## Task specifications
119
 
@@ -121,7 +72,6 @@ Equivalent commands for the other two tasks are in the repository
121
  |------|------------|-------|----------------|---------------|
122
  | Text-to-ECG | 12-lead ECG, 10 s @ 100 Hz | 12 Γ— 1,000 | Free-text ECG report (CLIP-encoded) | β€” |
123
  | PPG β†’ invasive BP | Arterial blood pressure, 30 s @ 50 Hz | 1 Γ— 1,500 | 6-D non-invasive BP statistics | PPG waveform, 1 Γ— 1,500 |
124
- | Medication-aware forecasting | 7 future physiological waveforms, 10 s @ 100 Hz | 7 Γ— 1,000 | β€” | Past 7 waveforms (20 s) + 21 medication channels (30 s) |
125
 
126
 
127
  ## Datasets
@@ -138,16 +88,8 @@ layout consumed by these checkpoints are documented in the GitHub README.
138
 
139
  ## Limitations and responsible use
140
 
141
- - The MIMIC-IV ECG generator is conditioned on free-text reports authored
142
- by clinicians. Generated 12-lead ECG waveforms reflect statistical
143
- patterns in the training corpus and **must not be used for clinical
144
  diagnosis or as a substitute for real patient recordings**.
145
- - The VitalDB blood-pressure translation and forecasting models rely on
146
- intra-operative monitoring data from anaesthetised surgical cases and
147
- may not generalise to ambulatory or out-of-hospital settings.
148
- - Patient overlap was controlled at preprocessing time but the exact
149
- protocol differs across datasets; see the paper appendix for
150
- per-dataset split details.
151
  - These models are released for *research use*. They are not approved
152
  medical devices and have not been evaluated for clinical safety or
153
  efficacy.
@@ -172,7 +114,3 @@ If you use any of these checkpoints, please cite the SensorGen paper:
172
  ## License
173
 
174
  This release is distributed under the Apache License 2.0.
175
-
176
- The downstream SD3 text encoder weights (downloaded at runtime for the
177
- text-to-ECG task only) are governed by Stability AI's Community License;
178
- please review that license before commercial deployment.
 
7
  - physiological-signal
8
  - generative-model
9
  - flow-matching
 
 
 
 
 
 
 
10
  language:
11
  - en
12
  datasets:
 
17
 
18
  [![Paper](https://img.shields.io/badge/paper-arXiv-red)](#)
19
  [![Webpage](https://img.shields.io/badge/website-project--page-blue)](#)
20
+ [![GitHub](https://img.shields.io/badge/code-GitHub-181717?logo=github)](https://github.com/yang-ai-lab/SensorGen)
21
+ [![HuggingFace](https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-SensorGen--SiT-FFD21E)](https://huggingface.co/yang-ai-lab/SensorGen-SiT)
22
  [![Python](https://img.shields.io/badge/python-3.10%2B-brightgreen)](https://www.python.org/)
23
  [![PyTorch](https://img.shields.io/badge/PyTorch-2.4%2B-EE4C2C?logo=pytorch)](https://pytorch.org/)
24
+
25
 
26
  > Scalable Interpolant Transformer (SiT-B/1d) reference models for the
27
  > SensorGen benchmark on real-world sensor time series.
28
 
29
+ This repository hosts the pre-trained checkpoints used in the SensorGen study
30
  ("*Signal or Noise? Understanding Generative Models for Real-World Sensor
31
+ Time Series*").
32
+
33
+ | Checkpoint | Task | Dataset |
34
+ |------------|------|---------|
35
+ | `text2ecg.pt` | Text-to-ECG | MIMIC-IV ECG |
36
+ | `bp_translation.pt` | PPG and NIBP to invasive BP | VitalDB |
37
+
 
 
 
 
 
38
 
39
  For VitalDB forecasting we observed a U-shape in validation loss past ~20K
40
  steps; the **18K best-validation checkpoint** is what we use to report paper
 
46
  ## Usage
47
 
48
  Pair this checkpoint repository with the GitHub code release at
49
+ **[yang-ai-lab/SensorGen](https://github.com/yang-ai-lab/SensorGen)**.
50
 
51
  ### Download a single checkpoint
52
 
 
54
  from huggingface_hub import hf_hub_download
55
 
56
  ckpt_path = hf_hub_download(
57
+ repo_id="yang-ai-lab/SensorGen-SiT",
58
+ filename="text2ecg.pt",
59
  )
60
  ```
61
 
62
  ### Download all checkpoints (β‰ˆ26 GB)
63
 
64
  ```bash
65
+ hf download yang-ai-lab/SensorGen-SiT --local-dir ./ckpts
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  ```
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  ## Task specifications
70
 
 
72
  |------|------------|-------|----------------|---------------|
73
  | Text-to-ECG | 12-lead ECG, 10 s @ 100 Hz | 12 Γ— 1,000 | Free-text ECG report (CLIP-encoded) | β€” |
74
  | PPG β†’ invasive BP | Arterial blood pressure, 30 s @ 50 Hz | 1 Γ— 1,500 | 6-D non-invasive BP statistics | PPG waveform, 1 Γ— 1,500 |
 
75
 
76
 
77
  ## Datasets
 
88
 
89
  ## Limitations and responsible use
90
 
91
+ - The generated waveforms reflect statistical patterns in the training corpus and **must not be used for clinical
 
 
92
  diagnosis or as a substitute for real patient recordings**.
 
 
 
 
 
 
93
  - These models are released for *research use*. They are not approved
94
  medical devices and have not been evaluated for clinical safety or
95
  efficacy.
 
114
  ## License
115
 
116
  This release is distributed under the Apache License 2.0.