Instructions to use SII-fkchen/SOTER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SII-fkchen/SOTER with Transformers:
# Load model directly from transformers import SoterForPrediction model = SoterForPrediction.from_pretrained("SII-fkchen/SOTER", device_map="auto") - Notebooks
- Google Colab
- Kaggle
SOTER: A Generative Time-Series Foundation Model for Wearable Human Physiological Signals
Overview
SOTER is a domain-specialized generative time-series foundation model engineered specifically for wearable human physiological signals. To address the intrinsic physical complexities of wearable biosignals—such as coupled multichannel dynamics, heterogeneous spectral scales, and irregular continuous-time sampling—SOTER unifies three domain-grounded architectural components into a single pre-training framework:
- Spatial Feature-Aware Backbone: Employs channel-independent temporal modeling in shallow layers while restoring cross-channel interactions at the topmost attention layer to capture inter-signal physiological dependencies without premature leakage.
- PSD-Guided Mixture-of-Experts: Incorporates an inspectable, deterministic routing mechanism that computes a strictly causal prefix discrete Fourier transform (DFT) to map latent states directly to fixed frequency bands, eliminating learned gating collapse and auxiliary balancing losses.
- Neural CDE/ODE Continuous-Time Decoder: Advances latent representations to arbitrary query timestamps through numerical integration, seamlessly unifying observation-guided causal imputation and autonomous future forecasting.
Pre-trained on 226 billion time points across diverse clinical and ambulatory waveforms, SOTER achieves good performance across out-of-distribution zero-shot forecasting, frozen linear-probe classification, and continuous-time imputation—all while activating only 20.29M parameters per inference step.
Usage
This repository contains weights only — the modeling code lives in the GitHub repository. Clone it first:
git clone https://github.com/SII-fkchen/SOTER.git && cd SOTER
pip install -r requirements.txt
Then download the weights and load them with a strict state-dict load:
import torch
from safetensors.torch import load_file
from huggingface_hub import snapshot_download
from soter.models import SoterConfig, SoterForPrediction # from the GitHub repo
ckpt = snapshot_download("SII-fkchen/SOTER")
config = SoterConfig.from_pretrained(ckpt)
model = SoterForPrediction(config)
model.load_state_dict(load_file(f"{ckpt}/model.safetensors"), strict=True)
model.eval().cuda()
values should be per-channel MinMax-normalized (scaler fitted on the training split), while times are the RAW physical timestamps (e.g. seconds), strictly increasing.
C, P = 128, 64
# C = history length
# P = forecast horizon
values = ... # np.ndarray [C + P], float32
times = ... # np.ndarray [C + P], float32
cur_vals = torch.tensor(values[:C], dtype=torch.float32).view(1, -1, 1).cuda()
cur_times = torch.tensor(times[:C], dtype=torch.float32).view(1, -1).cuda()
preds = []
with torch.inference_mode():
for i in range(P):
next_t = torch.tensor([times[C + i]], device="cuda")
out = model(
input_ids=cur_vals,
time_values=cur_times,
next_target_time_values=next_t,
attention_mask=torch.ones_like(cur_times, dtype=torch.long),
return_dict=True,
)
nxt = out.logits[:, -1, :] # [1, 1]
preds.append(nxt)
cur_vals = torch.cat([cur_vals, nxt.unsqueeze(-1)], dim=1)
cur_times = torch.cat([cur_times, next_t.view(1, 1)], dim=1)
preds = torch.stack(preds, dim=1).squeeze(0).cpu().numpy() # [P]
A full evaluation script (JSONL input, metrics) ships with the GitHub repo:
python forecasting_example.py \
--model ./path/to/weight \
--data ./test_set.jsonl \
--train_jsonl ./train_set.jsonl \
--context <history length> \
--horizon <forecast horizon> \
--num_eval <number of samples to be evaluated>
Setting --num_eval to "all" activates full-scale inference.
Input data format
Example (2-channels):
{"sequence": [[1.0, 0.3], [1.2, 0.4], [0.8, 0.2]], "time": [0.12, 0.22, 0.41], "mask": [[1, 1], [1, 0], [1, 1]]}
Training Datasets
Data Access Notice: All datasets utilized in this project consist of clinical and physiological time-series data involving sensitive human subject information. In compliance with strict Data Use Agreements (DUAs) and credentialed access policies, raw data cannot be hosted or redistributed in this repository. Researchers must request access directly from the official data providers listed below.
- MIMIC-III-Waveform — https://physionet.org/content/mimic3wdb/1.0/
- Sleep-EDF — https://physionet.org/content/sleep-edfx/1.0.0/
- PTB-XL — https://physionet.org/content/ptb-xl/1.0.3/
- WESAD — https://archive.ics.uci.edu/dataset/465/wesad+wearable+stress+and+affect+detection
- Chapman-ECG — https://physionet.org/content/ecg-arrhythmia/1.0.0/
Contact
If you have any questions regarding SOTER, please feel free to contact:
- Fangke Chen: fkchen@zju.edu.cn
License
This project is released under the MIT License.
Citation
If you find SOTER useful, please cite our paper:
@article{chen2026soter,
title={SOTER: A Generative Time-Series Foundation Model for Wearable Human Physiological Signals},
author={Chen, Fangke and Chen, Sirry and Chen, Wei and Wei, Zhongyu},
journal={arXiv preprint arXiv:2609.16804},
year={2026}
}
- Downloads last month
- 15