Autara-OF v2 (Autara-Omni): Tri-Modal Neuro-Vascular-Cardiac Foundation Model
Autara Research Labs | Paper: paper/autara_omni_paper.pdf
Autara-OF v2 (Autara-Omni) is a pure-Rust (burn, #![no_std] core) Tri-Modal Omni-Physiological Foundation Model that jointly decodes EEG (brain electrical), fNIRS (brain hemodynamic HbO/HbR), and ECG (autonomic cardiac) waveforms in real time.
Unlike traditional single-task BCI classifiers, Autara-Omni supports any non-empty subset of sensors at inference time (EEG+fNIRS+ECG, EEG+fNIRS, EEG+ECG, fNIRS+ECG, EEG-only, fNIRS-only, or ECG-only wearable watch mode) and outputs 5 simultaneous real-time clinical signals.
Architecture
- Multi-Scale Neuro-Spectral EEG Encoder (
src/eeg_encoder.rs)- Input:
16anatomical channels (FP1, FP2, F3, Fz, F4, FC3, FC4, C3, C1, Cz, C2, C4, CP1, CP2, P3, P4) @128 Hz(5s = 640samples). - Parallel temporal filter bank (
k = 7, 15, 31covering Beta/Gamma, Alpha/Mu, Delta/Theta) β Spatial Montage Mixing β250 mspatch tokenizer (20tokens) β Pre-LayerNorm residual projection.
- Input:
- Multi-Scale Hemodynamic fNIRS Encoder (
src/fnirs_encoder.rs)- Input:
32Modified Beer-Lambert Law channels (16 HbR + 16 HbO) @10 Hz(5s = 50samples, exact+4.0swall-clock HRF alignment). - Parallel slow-wave filter bank (
k = 5, 11, 21) β Optode Mixing β0.5spatch tokenizer (10tokens).
- Input:
- Multi-Scale Morphological ECG Encoder (
src/ecg_encoder.rs)- Input:
1-lead ECG @250 Hz(5s = 1250samples). - Parallel cardiac filter bank (
k = 9, 25, 63covering QRS, P/T waves, and R-R rhythm) β hierarchical compression (25tokens).
- Input:
- Perceiver Latent Bottleneck Omni-Fusion (
src/fusion.rs)- Modality-specific learnable temporal positional embeddings + modality identity embeddings.
- Dynamic Modality Reliability Gate producing live sensor trust weights
[EEG, fNIRS, ECG]and masking disconnected sensors cleanly. K = 8learnable neuro-autonomic latent queries cross-attending over all active sensor streams, followed by3Pre-LayerNorm Self-Attention + SwiGLU Transformer blocks and attentive latent pooling.
Multi-Head Output Schema (OmniOutput)
| Head | Tensor Shape | Clinical Output |
|---|---|---|
state_logits |
[B, 7] |
7-class hierarchical cognitive-motor state (Mental Arithmetic, N-Back, Motor Imagery, Passive Motor, Active Motor, N-Back + Arithmetic, Full Dual-Task) |
cognitive_load |
[B, 1] |
Continuous subjective cognitive workload (0.0β1.0, mapped from 1β9 scale) |
motor_logits |
[B, 3] |
Direct BCI control intent (Non-Motor, Imagined Motor, Active/Physical Motor) |
fatigue_score |
[B, 1] |
Continuous alertness / Karolinska Sleepiness Scale (0.0β1.0, mapped from 1β9 KSS) |
latent_embedding |
[B, 128] |
Universal 128-D neuro-physiological bio-state representation |
modality_trust |
[B, 3] |
Normalized per-sensor contribution [EEG, fNIRS, ECG] |
Dataset & Verified Zero-Shot Unseen-Subject Benchmarks
Trained on OpenNeuro ds007554 (CMx7-MM: 30 subjects Γ 3 sessions Γ 7 tasks, 29,465 training windows from sub-001..024 and 9,462 strictly unseen test windows from sub-025..030) with multi-task loss and Omni Modality Dropout.
Hardware Mode (Zero-Shot Unseen Subjects sub-025..030) |
v2.0 7-Cls | v2.1 7-Cls | v2.1 Motor-3 | v2.1 KSS MAE (/9) | Steady GPU Latency (RTX 3070) |
|---|---|---|---|---|---|
Full Omni (EEG + fNIRS + ECG) |
23.4% | 22.4% | 44.4% (peak 50.7%) | 1.18 (peak 0.73) | ~6.4 ms |
Hybrid BCI (EEG + fNIRS) |
24.0% | 23.5% | 45.2% | 1.12 | ~6.0 ms |
Optical-Cardiac (fNIRS + ECG) |
17.2% | 22.0% (+4.8%) | 44.3% | 1.22 | ~5.8 ms |
| fNIRS-Only (Butterworth IIR) | 20.1% | 22.2% (+2.1%) | 48.0% | 0.88 | ~5.5 ms |
Wearable (EEG + ECG) |
20.0% | 18.1% | 43.2% | 1.14 | ~6.2 ms |
| EEG-Only | 20.9% | 17.9% | 44.3% | 1.22 | ~5.8 ms |
| ECG-Only (Watch Mode) | 13.7% | 15.9% (+2.2%) | 41.9% | 1.08 (-0.23) | ~5.2 ms |
Key v2.0 β v2.1 Controlled Ablation Gains
- Motor Imagery (Unseen Subjects):
6.6%β43.8%(+37.2%, 6.6Γ jump from session-baseline normalization preserving Mu/Beta ERD!) - Active Motor (Unseen Subjects):
43.1%β53.7%(+10.6%, 3.8Γ chance) - Biometric TrainβTest Overfitting Gap:
67.6%β34.1%(-33.5%) with balanced Full-Omni sensor trust[33.2 / 33.5 / 33.3%]!
Quick Start
# 1. Build synchronized tri-modal dataset on DATA1
venv/bin/python scripts/build_omni_dataset.py --sessions ses-01,ses-02,ses-03 --subjects 1-30
# 2. Run unit & integration tests (all 7 modality subsets + WGPU)
cargo test --release
# 3. Train Autara-Omni v2 on GPU
cargo run --release --bin train -- --epochs 30 --batch-size 64
# 4. Run real-time telemetry simulator in any hardware mode
cargo run --release --bin infer -- --mode omni # EEG + fNIRS + ECG
cargo run --release --bin infer -- --mode bci # EEG + fNIRS
cargo run --release --bin infer -- --mode wearable # EEG + ECG
cargo run --release --bin infer -- --mode ecg # Watch-only ECG