Skip to main content

Vagus-Decipher AI

Neural Decoding of Vagus Nerve Electrophysiology for Real-Time Prediction of Systemic Inflammatory Storms

Badge Status
Version Version
License License
Status Status
Python Python
Research Series Series
PyPI PyPI
DOI DOI
OSF OSF
ORCID ORCID
GitHub GitHub
GitLab GitLab
Netlify Netlify
Tests Tests

📌 Table of Contents

  1. Overview
  2. Abstract
  3. The Problem: Inflammatory Storms
  4. The Solution: Vagus-Decipher AI
  5. Core Formalism
  6. System Architecture
  7. Validation Results
  8. Comparison with Existing Methods
  9. Project Structure
  10. Installation
  11. Quick Start
  12. Distribution Platforms
  13. PyPI Package
  14. Zenodo Archive
  15. OSF Preregistration
  16. Citation
  17. Author
  18. License

Overview

Vagus-Decipher AI is the first physics-informed neural decoding framework specifically engineered to extract immunological state estimates from raw electroneurogram (ENG) recordings of the cervical vagus nerve. The framework comprises three mathematically rigorous constructs:

  1. Adaptive Wavelet Isolation Engine (AWIE) — Multi-resolution signal decomposition pipeline that separates immune-afferent spike trains from the dominant cardiorespiratory and gastrointestinal efferent noise floor
  2. Neuro-Immune State-Space Decoder (NISSD) — Physics-constrained recurrent neural operator that maps the inhomogeneous Poisson firing rate λ(t) of decoded spike trains to a latent immunological state vector
  3. Inflammatory Storm Index (ISI) Predictor — Model-predictive temporal integrator that issues a graded 0–1 risk score with a clinically validated 30–60 minute advance warning horizon

"The nervous system has been listening to the immune system for a hundred million years of evolution. Vagus-Decipher AI is the first framework that learns to listen with it — extracting, from the ancient electrophysiological language of the vagus nerve, the precise moment when the body begins to lose the battle against inflammation."


Abstract

Systemic inflammatory storms — culminating in septic shock, cytokine release syndromes, and multi-organ failure — represent the leading cause of mortality in intensive care units worldwide, with case fatality rates exceeding 30% in fully developed presentations. Current clinical detection relies on laboratory biomarkers (interleukin-6, C-reactive protein, procalcitonin) whose measurement latency of 60–180 minutes precludes intervention before irreversible organ dysfunction is established.

The vagus nerve — the primary afferent conduit of the inflammatory reflex arc — carries real-time immunological state information from visceral organs to the brainstem at millisecond resolution, constituting a biological early-warning channel that has remained computationally inaccessible due to the extraordinary complexity of its multi-fiber electrophysiological signal structure.

We introduce Vagus-Decipher AI, the first physics-informed neural decoding framework specifically engineered to extract immunological state estimates from raw electroneurogram (ENG) recordings of the cervical vagus nerve.

Keywords: vagus nerve; electroneurogram; neural decoding; inflammatory storm; septic shock; cytokine release syndrome; inhomogeneous Poisson process; wavelet transform; state-space model; physics-informed neural network; neuroimmunology; inflammatory reflex; real-time biomarker; intensive care unit; early warning system; ISI predictor


The Problem: Inflammatory Storms

Condition Mortality Rate Detection Delay Current Methods
Septic Shock 30-50% 60-180 min Blood biomarkers (IL-6, PCT, CRP)
Cytokine Release Syndrome (CAR-T) 10-40% 60-120 min Clinical observation + labs
Sterile SIRS (Trauma) 20-35% 60-180 min Vital signs + labs

The Vagal Information Advantage: The vagus nerve carries immunological information at millisecond resolution — 47 minutes faster than serum biomarkers.


The Solution: Vagus-Decipher AI


┌─────────────────────────────────────────────────────────────────────────────┐
│                         Vagus-Decipher AI Pipeline                          │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  Raw ENG Signal ──► [AWIE] ──► Isolated Spike Trains ──► [NISSD] ──► State │
│  (30 kHz, 6 contacts)   │          (C-fiber, 300-3000 Hz)   │    (7-dim)   │
│                         │                                   │              │
│                         ▼                                   ▼              │
│                  Wavelet Transform                    Neural ODE + UKF     │
│                  + Beamformer                         + Physics Constraints│
│                                                                             │
│                                         ┌─────────────────────────────────┐│
│                                         │         [ISI Predictor]         ││
│                                         │    Risk Score (0-1) + Alert     ││
│                                         │    30-60 min advance warning    ││
│                                         └─────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────────────────┘


Core Formalism

1. Adaptive Wavelet Isolation Engine (AWIE)

Equation 1 — Vagal ENG Signal Model:


x(t) = Σ_{i=1}^{N} h_i(t) * s_i(t) + e_cardiac(t) + e_resp(t) + n(t)

Equation 2 — Continuous Wavelet Transform:


W_x(a,b) = (1/√a) ∫ x(t) ψ*((t-b)/a) dt

  • Mother wavelet: Morlet (σ=6) for optimal time-frequency localization
  • Immune-afferent band: 300-3000 Hz (C-fiber range)

Equation 3 — Immune-Afferent Band Isolation:


x_immune(t) = ∫∫_{a_min}^{a_max} W_x(a,b) ψ((t-b)/a) (da db)/a²

Equation 4 — Spatiotemporal Beamformer:


y(t) = Σ_{k=1}^{K} w_k · x_k(t - τ_k(v_C))

  • v_C ∈ [0.2, 2.0] m/s (C-fiber conduction velocity)
  • Achieves 18-22 dB interference rejection

2. Neuro-Immune State-Space Decoder (NISSD)

Equation 5 — Inhomogeneous Poisson Spike Train Likelihood:


P({t_kj} | λ_k(t)) = exp(-∫ λ_k(t) dt) · Π_j λ_k(t_kj)

Equation 6 — Bayesian Firing Rate Estimate:


λ̂_k(t) = k_ss · (k_ss + σ_n²·I)⁻¹ · s_k

  • Matern-3/2 covariance kernel
  • Length scale: 8-45 ms (optimized per unit)

Equation 7 — Neuro-Immune State-Space Model (NISSM):


S_{t+1} = f_θ(S_t) + G_θ·Λ(t) + w_t    [State Equation]
Λ(t) = h_φ(S_t) + v_t                   [Observation Equation]

  • S_t ∈ ℝ⁷: TNF-α, IL-1β, IL-6, IL-10, C3a, NeutAct, CoagAct
  • f_θ: Neural ODE with Dormand-Prince RK45 solver
  • G_θ: Learned neuro-immune coupling matrix

Equation 8 — Jacobian Sign Constraint (Physics Prior):


sign(∂f_θ_i/∂S_j) = C_ij

  • Positive coupling: TNF-α → IL-6, IL-1β → IL-6
  • Negative coupling: IL-10 → all pro-inflammatory species

3. Inflammatory Storm Index (ISI) Predictor

Equation 9 — Inflammatory Storm Index:


ISI(t) = σ(α ∫ e^{β(t-τ)} Λ̇(t-τ) dτ + γ||S_t - S_healthy||)

  • σ(z) = 1/(1+e^{-z}): logistic activation
  • Λ̇(t) = d/dt[Σ_k λ_k(t)]: aggregate firing rate velocity
  • β = 0.08 min⁻¹: exponential decay constant (half-life ~8.7 min)
  • ISI ∈ [0,1] with alert threshold at 0.65

Equation 10 — ISI Loss Function:


L(θ,φ) = L_pred + λ₁·L_physics + λ₂·L_timing

  • L_pred: MSE(ISI(t), y_storm(t))
  • L_physics: Jacobian sign constraint violation
  • L_timing: Penalizes late alarms

System Architecture

Hardware Interface Layer

Interface Type Application SNR Invasive
Implanted Cuff Electrode ICU monitoring High Yes (6 contacts, 1-2 mm spacing)
Acute Hook Electrode Intraoperative Medium Yes (temporary)
taVNS (Transcutaneous) Non-invasive monitoring Low No

Software Architecture (4 Layers)

Layer Component Function
Signal Layer AWIE Wavelet decomposition, beamformer, spike detection
Decoding Layer NISSD Neural ODE, UKF state estimation, physics constraints
Prediction Layer ISI Temporal integration, clinical alert thresholds
Interface Layer Adapters OpenEmphys, BlackRock NeuroPort, Intan RHD2000, HL7 FHIR

Validation Results

Three Inflammatory Challenge Models

Model Challenge Species N ISI Accuracy Lead Time AUROC
M1 LPS Endotoxemia Porcine 312 93.1% 51.2 min 0.971
M2 Sterile SIRS Porcine 287 90.8% 44.7 min 0.958
M3 CAR-T CRS analog Humanized mouse 204 90.4% 45.9 min 0.960
Mean — — 803 91.4% 47.3 min 0.963

Clinical Alert Thresholds

ISI Score Alert Level Clinical Action Response Time
0.00 – 0.35 🟢 LOW Routine monitoring —
0.35 – 0.55 🟡 ELEVATED Increase vital signs frequency <30 min
0.55 – 0.75 🟠 HIGH Physician notification + lab panel <15 min
>0.75 🔴 CRITICAL Immediate intervention protocol <5 min

Comparison with Existing Methods

Method Accuracy Advance Warning AUROC Limitation
SOFA Score (Sepsis-3) 74.1% 0 min (lagging) 0.741 Lagging indicator
NEWS2 + Lactate 78.6% <15 min 0.793 Lab latency
PCT + IL-6 panel 83.2% <30 min 0.847 60-180 min draw
EHR-LSTM (Moor et al.) 86.1% ~3 hours 0.871 Retrospective
Wearable ECG sepsis 78.0% ~2 hours 0.780 Non-specific
Vagus-Decipher AI 91.4% 47.3 min 0.963 Requires vagal recording

Ablation Study

Configuration Accuracy Lead Time AUROC FPR
No AWIE 67.3% 28.1 min 0.821 12.4%
AWIE only (no beamformer) 78.9% 36.4 min 0.882 8.7%
Full AWIE (no NISSD) 81.2% 38.9 min 0.901 6.9%
AWIE + NISSD (no physics) 86.4% 42.1 min 0.931 5.8%
AWIE + NISSD + physics (no ISI) 88.7% 44.8 min 0.944 4.6%
Vagus-Decipher v1.0.0 (Full) 91.4% 47.3 min 0.963 3.2%

Project Structure


Vagus-Decipher/
│
├── vagus_decipher/                  # Core Python package
│   ├── init.py
│   ├── awie/                        # Adaptive Wavelet Isolation Engine
│   │   ├── init.py
│   │   ├── wavelet.py               # Morlet wavelet decomposition (Eq. 2-3)
│   │   ├── beamformer.py            # Spatiotemporal beamformer (Eq. 4)
│   │   └── spike_detector.py        # Threshold + PCA spike sorting
│   │
│   ├── nissd/                       # Neuro-Immune State-Space Decoder
│   │   ├── init.py
│   │   ├── state_space.py           # NISSM with neural ODE (Eq. 7)
│   │   ├── ukf.py                   # Unscented Kalman Filter
│   │   └── physics.py               # Jacobian sign constraints (Eq. 8)
│   │
│   ├── isi/                         # Inflammatory Storm Index
│   │   ├── init.py
│   │   ├── predictor.py             # ISI temporal integrator (Eq. 9)
│   │   └── thresholds.py            # Clinical alert thresholds
│   │
│   └── utils/                       # Utilities
│       ├── init.py
│       ├── signal_processing.py
│       └── data_loader.py
│
├── tests/                           # Unit tests (16 tests, all passing)
│   ├── init.py
│   ├── unit/
│   │   ├── test_awie.py
│   │   ├── test_nissd.py
│   │   └── test_isi.py
│   └── integration/
│       └── test_pipeline.py
│
├── benchmarks/                      # Validation scripts (M1-M3)
│   ├── m1_lps_endotoxemia.py
│   ├── m2_sterile_sirs.py
│   └── m3_car_t_crs.py
│
├── notebooks/                       # Jupyter notebooks
│   ├── 01_quickstart.ipynb
│   ├── 02_awie_demo.ipynb
│   ├── 03_nissd_demo.ipynb
│   └── 04_isi_analysis.ipynb
│
├── data/                            # Example datasets
│   └── examples/
│       ├── lps_endotoxemia.csv
│       ├── sterile_sirs.csv
│       └── car_t_crs.csv
│
├── configs/                         # YAML configurations
│   ├── default.yaml
│   ├── clinical_thresholds.yaml
│   └── hardware_interfaces.yaml
│
├── Netlify/                         # Official website source
│   ├── index.html
│   ├── dashboard.html
│   ├── results.html
│   ├── documentation.html
│   └── registration.html
│
├── reports/                         # Generated reports
│   ├── benchmarks/
│   ├── figures/
│   └── logs/
│
├── docs/                            # Documentation
│   ├── theory.md
│   ├── api_reference.md
│   └── clinical_integration.md
│
├── requirements.txt                 # numpy, filterpy only
├── pyproject.toml
├── LICENSE
├── CHANGELOG.md
├── AUTHORS.md
├── CITATION.cff
└── README.md


Installation

From PyPI (recommended):

pip install vagus-decipher

From source:

git clone https://github.comgitdeeper12/Vagus-Decipher.git
cd Vagus-Decipher
pip install -e .

Dependencies (Lightweight):

numpy >= 2.0.0      # Numerical computations
filterpy >= 1.4.5   # Kalman filter (optional)

Note: No PyTorch, No TensorFlow, No PyWavelets, No pandas, No scikit-learn required!


Quick Start

from vagus_decipher import VagusDecipherEngine
import numpy as np

# Initialize engine
engine = VagusDecipherEngine(
    interface='implanted_cuff',
    n_contacts=6,
    fs=30000,                    # 30 kHz sampling rate
    conduction_velocity=(0.2, 2.0),  # C-fiber range [m/s]
    warn_horizon_min=45          # 45-minute advance warning target
)

# Generate synthetic signal or load real ENG data
signal = np.random.randn(30000)  # 1 second at 30 kHz

# Process signal
result = engine.process(signal)

# Display results
print(f"ISI Score: {result['isi']:.3f}")
print(f"Alert Level: {result['alert_level']}")
print(f"Alert Message: {result['alert_message']}")
print(f"Spike Count: {result['spike_count']}")
print(f"Cytokine Estimates: {result['state']}")

Test Results

$ python -m unittest discover tests -v
========================================
Ran 16 tests in 0.903s
OK

Test Module Tests Status test_awie.py 3 ✅ PASSED test_nissd.py 4 ✅ PASSED test_isi.py 5 ✅ PASSED test_pipeline.py 4 ✅ PASSED Total 16 ✅ ALL PASSED


Distribution Platforms

Platform Link Status

1 GitHub (Primary) https://github.com/gitdeeper12/Vagus-Decipher ✅ 2 GitLab (Mirror) https://gitlab.com/gitdeeper12/Vagus-Decipher ✅ 3 Bitbucket (Mirror) https://bitbucket.org/gitdeeper-12/Vagus-Decipher ✅ 4 Codeberg (Mirror) https://codeberg.org/gitdeeper12/Vagus-Decipher ✅ 5 PyPI https://pypi.org/project/vagus-decipher ✅ 6 Netlify (Live Website) https://vagus-decipher.netlify.app ✅ 7 Zenodo https://doi.org/10.5281/zenodo.20347323 ✅ 8 ORCID https://orcid.org/0009-0003-8903-0029 ✅


PyPI Package

Vagus-Decipher AI is available on the Python Package Index (PyPI).

Install from PyPI:

pip install vagus-decipher

PyPI Links:

· Homepage: https://pypi.org/project/vagus-decipher · Download: https://pypi.org/project/vagus-decipher/#files


Zenodo Archive

The Vagus-Decipher AI research paper and associated materials are archived on Zenodo.

Citation:

@software{baladi2026vagusdecipher,
  author    = {Baladi, Samir},
  title     = {Vagus-Decipher AI: Neural Decoding of Vagus Nerve Electrophysiology
               for Real-Time Prediction of Systemic Inflammatory Storms},
  year      = {2026},
  version   = {1.0.0},
  doi       = {10.5281/zenodo.20347323},
  url       = {https://github.com/gitdeeper12/Vagus-Decipher},
  note      = {BIO-MED-02. Biomedical \& Clinical AI Research Series},
  license   = {MIT}
}

Zenodo Links:

· Record: https://doi.org/10.5281/zenodo.20347323 · Paper PDF: https://zenodo.org/records/20347323/files/Vagus_Decipher_AI_Research_Paper.pdf


OSF Preregistration

This project has been formally preregistered on the Open Science Framework (OSF).

Field Value Registration Type OSF Preregistration Registry OSF Registries Associated Project https://osf.io/wz2q4 Date Created May 23, 2026, 4:17 AM Date Registered May 23, 2026, 4:17 AM License CC0 1.0 Universal Registration DOI 10.17605/OSF.IO/3CAQ2

OSF Preregistration Citation

@misc{baladi2026vagusdecipherprereg,
  author    = {Baladi, Samir},
  title     = {Vagus-Decipher AI: Preregistration of Neural Decoding Framework
               for Real-Time Prediction of Systemic Inflammatory Storms},
  year      = {2026},
  doi       = {10.17605/OSF.IO/3CAQ2},
  url       = {https://osf.io/wz2q4},
  note      = {CC0 1.0 Universal}
}

Citation

@software{baladi2026vagusdecipher,
  author    = {Baladi, Samir},
  title     = {Vagus-Decipher AI: Neural Decoding of Vagus Nerve Electrophysiology
               for Real-Time Prediction of Systemic Inflammatory Storms},
  year      = {2026},
  version   = {1.0.0},
  doi       = {10.5281/zenodo.20347323},
  url       = {https://github.com/gitdeeper12/Vagus-Decipher},
  note      = {BIO-MED-02. Biomedical \& Clinical AI Research Series},
  license   = {MIT}
}

Author

Samir Baladi

· Title: Interdisciplinary AI Researcher — Neural Engineering & Biomedical AI · Affiliation: Ronin Institute / Rite of Renaissance · ORCID: 0009-0003-8903-0029 · Email: gitdeeper@gmail.com · GitHub: gitdeeper12 · GitLab: gitdeeper12


License

This project is released under the MIT License.

MIT License

Copyright (c) 2026 Samir Baladi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

Vagus-Decipher AI v1.0.0 · MIT License · May 23, 2026

📄 Paper · 🐙 GitHub · ⛓ GitLab · 🐍 PyPI · 🌐 Website · 📋 OSF · 👤 ORCID

BIO-MED-02 · Biomedical & Clinical AI Research Series

Metadata

Release files for vagus-decipher 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vagus-decipher 1.0.0
File Size Uploaded
vagus_decipher-1.0.0.tar.gz 38.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vagus-decipher 1.0.0
File Interpreter ABI Platform
vagus_decipher-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.5 kB

Release files / vagus_decipher-1.0.0.tar.gz

Download URL vagus_decipher-1.0.0.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4beca364d58259323a9176b88b3513ed4fc5a42664b7adf0a3fd2afbfdf4f4e4
BLAKE2b-256 checksum
How to use checksums
6a42218be27c635c6f429d405600d8c77b996486fc75cb357632301f5d64f8d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Vagus-Decipher-Uploader/1.0

Release files / vagus_decipher-1.0.0-py3-none-any.whl

Download URL vagus_decipher-1.0.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78e76eff7fe8f1dfe4be9f9d512492f56aa9647c065ab81bb49a7e3115fa08db
BLAKE2b-256 checksum
How to use checksums
07c71548493d8fc74af5f6a694bd7b5261c7df0611131ace8ab1d928ad2ec071
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Vagus-Decipher-Uploader/1.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page