Demographic-Conditioned State Space Models for ECG-Based Age Estimation

This Hugging Face repository contains the official model weights and MICCAI 2026 submission results for the paper "Demographic-Conditioned State Space Models for ECG-Based Age Estimation".

The full code for preprocessing, training, inference, and evaluation is hosted in the companion GitHub Repository.


Model Architecture

We propose a bidirectional State Space Model (BiMamba2) architecture with demographic conditioning (sex) for ECG-based biological age estimation.

The architecture consists of:

  1. Per-lead convolutional stem with instance normalization and optional MixStyle domain generalization.
  2. Bidirectional Mamba2 backbone with Adaptive Layer Normalization (AdaLN) for demographic conditioning (sex).
  3. Hierarchical attention pooling (temporal pooling $\to$ lead-level pooling) to produce a unified patient-level representation.
  4. Regression head predicting the normalized biological age (rescaled to 0–100 years).

Model architecture

Overview of the proposed demographic-conditioned bidirectional Mamba2 architecture.


Repository Structure

.
β”œβ”€β”€ MICCAI2026_submission_results/   # Directory containing submission prediction files and plots
β”‚   β”œβ”€β”€ bimamba_code15/              # Proposed Model (sex-conditioned) results on CODE-15%
β”‚   β”œβ”€β”€ bimamba_code15_agnostic/     # Proposed Model (sex-agnostic) results on CODE-15%
β”‚   β”œβ”€β”€ bimamba_samitrop/            # Proposed Model (sex-conditioned) results on SaMi-Trop
β”‚   β”œβ”€β”€ bimamba_samitrop_agnostic/   # Proposed Model (sex-agnostic) results on SaMi-Trop
β”‚   β”œβ”€β”€ resnet_code15/               # 1D-ResNet Baseline results on CODE-15%
β”‚   └── resnet_samitrop/             # 1D-ResNet Baseline results on SaMi-Trop
β”œβ”€β”€ architecture.svg                 # SVG visualization of the model architecture
β”œβ”€β”€ LICENSE                          # MIT License
β”œβ”€β”€ model.pth                        # Pretrained model weights (Proposed Model - sex-conditioned)

For each model variant in the MICCAI2026_submission_results/ directory, you will find:

  • inference_predictions.csv: Per-exam predictions containing exam IDs, ground-truth chronological ages, and predicted biological ages.
  • inference_history.csv: Summarized regression evaluation metrics (loss, MAE, RMSE, $R^2$, etc.).
  • patient_predicted_chronological_age.csv & patient_median_predicted_chronological_age.csv: Patient-level consolidated predictions.
  • plots/: Bland-Altman, scatter plots, and age-gap distribution histograms.
  • survival/: Summary text files and adjusted survival curves generated using Cox proportional hazards models.

Model Weights (model.pth)

The file model.pth contains the pretrained PyTorch weights for the Proposed Model (sex-conditioned).

How to Load the Model Weights

To load and use these weights, clone the GitHub Repository and use the following PyTorch code snippet:

import torch
from model import MultimodalDeepMambaECG

# 1. Instantiate the model matching the submission configuration
model = MultimodalDeepMambaECG(
    num_layers=4,
    hidden_dim=128,
    num_leads=12,
    num_sex_classes=2,
    downsample_factor=8
)

# 2. Load the state dictionary from model.pth
checkpoint = torch.load("model.pth", map_location="cpu")
state_dict = checkpoint["model"]
model.load_state_dict(state_dict, strict=False)
model.eval()

# Ready for inference!
# Input traces shape: [batch_size, 12, seq_len] (e.g., [B, 12, 4096] at 400Hz)
# Input sex shape: [batch_size] (0 = Female, 1 = Male)
# Outputs: predicted_age (0-1 range), temporal_attention, lead_attention
# Multiply predicted_age by 100.0 to obtain age in years.

MICCAI 2026 Submission Results

1. Quantitative Regression Results

Regression performance evaluated on the CODE-15% and SaMi-Trop datasets. Metrics include Mean Absolute Error (MAE) Β± standard deviation (STD), Pearson correlation ($R$), coefficient of determination ($R^2$), and mean predicted ages.

Dataset / Metric 1D-ResNet Baseline Proposed Model
(sex-conditioned)
Proposed Model
(sex-agnostic)
CODE-15% Dataset1
  MAE Β± STD 8.44 Β± 7.12 6.72 Β± 5.81 6.87 Β± 5.88
  $R$ ; $R^2$ 0.84 ; 0.69 0.90 ; 0.80 0.89 ; 0.79
  Pred. Mean Β± STD 52.1 Β± 18.7 51.6 Β± 18.3 52.2 Β± 18.1
SaMi-Trop Dataset2
  MAE Β± STD 9.96 Β± 7.61 7.83 Β± 6.30 8.06 Β± 6.31
  $R$ ; $R^2$ 0.60 ; 0.04 0.70 ; 0.38 0.69 ; 0.35
  Pred. Mean Β± STD 62.6 Β± 14.1 62.0 Β± 12.3 62.7 Β± 12.0

1 Real Mean Β± STD for CODE-15%: 51 Β± 20.
2 Real Mean Β± STD for SaMi-Trop: 60 Β± 13.

2. Prognostic Value (Cox Proportional Hazards Regression)

Age- and sex-adjusted Cox regression for all-cause mortality. Hazard Ratios (HR) compare the Overestimation (ECG-age > chronological age + 8 years) and Underestimation (ECG-age < chronological age - 8 years) groups against the Concordant baseline (ECG-age discrepancy $\le$ 8 years).

Model / Age-Gap Group CODE-15% HR (95% CI) CODE-15% p-value SaMi-Trop HR (95% CI) SaMi-Trop p-value
1D-ResNet Baseline
  Underestimation 0.81 (0.76–0.86) < 0.005 0.95 (0.55–1.64) 0.86
  Overestimation 1.80 (1.68–1.92) < 0.005 2.38 (1.51–3.74) < 0.005
Proposed Model (sex-conditioned)
  Underestimation 0.78 (0.73–0.83) < 0.005 0.86 (0.49–1.50) 0.59
  Overestimation 2.06 (1.92–2.21) < 0.005 1.76 (1.10–2.80) 0.02
Proposed Model (sex-agnostic)
  Underestimation 0.79 (0.74–0.84) < 0.005 0.67 (0.36–1.23) 0.19
  Overestimation 1.99 (1.85–2.13) < 0.005 1.32 (0.81–2.13) 0.26

Citation

If you use these model weights, submission results, or code in your research, please cite our MICCAI 2026 paper:

@inproceedings{bracke2026demographic,
    title     = {Demographic-Conditioned State Space Models for ECG-Based Age Estimation},
    author    = {Bracke, Benjamin and Stang, Andreas and Schmidt, B{\"o}rge and Friedrich, Christoph M.},
    booktitle = {Medical Image Computing and Computer Assisted Intervention -- MICCAI 2026},
    year      = {2026},
    publisher = {Springer}
}

License

The model weights and code are released under the MIT License.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support