Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
MIRA: Medical Time Series Foundation Model for Real-World Health Data
| Date | Stars |
|---|---|
| 2026-07-31 | 414 |
| 2026-08-02 | 414 |
| 2026-08-06 | 414 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div align="center">
<h2><b>(NeurIPS '25) MIRA: Medical Time Series Foundation Model for Real-World Health Data </b></h2>
</div>
<div align="center">
**[<a href="https://arxiv.org/abs/2506.07584">Paper Page</a>]**
</div>
## Overview
MIRA is a foundation model for medical time-series, designed to learn a unified representation space across heterogeneous clinical datasets and support zero-shot forecasting in real-world healthcare settings. Unlike conventional time-series models that operate on fixed sampling rates or task-specific feature spaces, MIRA is built to handle irregular and clinically diverse signals natively. By combining continuous-time encoding, frequency-aware specialization, and neural dynamics modeling, MIRA generalizes robustly across conditions.
MIRA is pretrained on 454B time points collected from large-scale clinical corpora spanning both ICU physiological signals and hospital EHR time-series, covering a rich range of sampling frequencies (minute-level vitals, hourly labs, waveform segments, and multi-day clinical indicators). This large and heterogeneous training distribution allows MIRA to serve as a unified backbone capable of strong out-of-distribution generalization. In extensive evaluations, MIRA achieves state-of-the-art zero-shot forecasting performance across diverse clinical benchmarks. Compared with existing foundation models, MIRA obtains SOTA results on 4 of 5 out-of-distribution evaluation settings on standard baselines—demonstrating strong robustness under dataset shift, irregular sampling, and multimodal temporal variations.
**Key features**
- Continuous-Time Rotary Positional Encoding (CT-RoPE)
Provides a principled way to embed irregular timestamps while preserving temporal geometry, enabling robust reasoning across arbitrary sampling patterns.
- Frequency-specialized Mixture-of-Experts
Allows different experts to specialize on physiological signs, improving transfer across diverse clinical signals.
- Neural ODE Extrapolation
Models latent dynamics continuously over time, enabling forecasting at arbitrary future timestamps.
<p align="center">
<img src="images/Model_Architecture.png" width="720"/>
</p>
---
## Installation
Install Python 3.10+, and then install the dependencies:
```shell
pip install -r requirements.txt
pip install torchdiffeq
```
**Note: MIRA requires `torchdiffeq` for ODE.**
---
## Data Preparation
### Data format example
Each line represents one sample and must contain at least `sequence` and
`time` fields:
``` json
{"sequence": [1.0, 1.2, 0.8, ...], "time": [0.12, 0.22, 0.41, ...], "mask": [1,1,1,...]}
{"sequence": [5.1, 5.0, 5.3, ...], "time": [1, 2.1, 3.1, ...], "mask": [1,1,1,...]}
```
---
## Training
MIRA can be trained on either CPU or GPU environments. The training script automatically handles model initialization, dataset loading, and checkpointing. Below we provide example commands for common setups. For training on irregular medical data:
```bash
python torch_dist_run.py main.py \
--from_scratch \
-d ./yourdata.jsonl \
--output_path ./saveyoucheckpoints \
--save_steps 10000 \
--save_strategy steps \
--save_total_limit 10 \
--save_only_model \
--precision bf16 \
--time_aware_dataset \
--time_aware_rotary
```
### CPU
If you prefer to train on CPU, simply point the script to your dataset directory:
```bash
python main.py -d <data_path>
```
### GPU
The project includes a lightweight launcher that wraps PyTorch distributed training. On a machine with one or multiple GPUs, launch training via:
```bash
python torch_dist_run.py main.py -d <data_path>
```
For multi-node setups, standard PyTorch elastic variables must be configured.
```bash
export MASTER_ADDR=<master_addr>
export MASTER_PORT=<master_port>
export WORLD_SIZE=<world_size>
export RANK=<rank>
python torch_dist_run.py main.py -d <data_path>
```
To training from scratch, please include the --from_scratch argument in your command.
```bash
python torch_dist_run.py maiExcerpt of 11,616 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:e0d9a6ab5627bae4, llm:Repository title and description: 'MIRA: Medical Time Series Foundation Model for Real-World Health Data' (medical time series foundation model).
matched fp:e0d9a6ab5627bae4, llm:Repository title and description: 'MIRA: Medical Time Series Foundation Model for Real-World Health Data' (medical time series foundation model).
matched fp:e0d9a6ab5627bae4, llm:Repository title and description: 'MIRA: Medical Time Series Foundation Model for Real-World Health Data' (medical time series foundation model).