EndoDecay-Sim: A Hybrid In-Silico Digital Twin Platform for Cardiorenal Multimorbidity Tracking with Homomorphic Encryption
Description
🌐 LIVE INTERACTIVE DASHBOARD PLATFORM: Researchers and peer-reviewers can access and stress-test the live, cloud-deployed clinical decision support interface directly via: https://avd9sajwiyrcgrrmunesjx.streamlit.app/ (Complete local deployment steps, CLI commands, and package dependencies are fully documented inside the repository's README.md file).
Release Description and Academic Evaluation (v14.12 - Production Grade)
This repository entry documents the definitive production-level release of EndoDecay-Sim (v14.12), advancing the architecture from a research suite into a fully deployed, high-performance computing (HPC)-optimized, and privacy-hardened digital twin platform. Version 14.12 bridges a mechanics-driven non-linear Milstein Stochastic Differential Equation (SDE) endothelial decay solver, an object-oriented multi-axial organ-graph network topology, a fully integrated 2048-bit Paillier Asymmetric Cryptosystem enhanced with Differential Privacy (L2-Norm Clipping), and a live, cloud-deployed clinical decision support dashboard (Streamlit Cloud).
Operating via vectorized NumPy broadcasting to manage a synthetic cohort of 10,000 virtual patients over a 120-month clinical timeline, this release delivers verified mathematical validation, optimized computational efficiency, and regulatory-compliant federated privacy layers.
Key Architectural Milestones in v14.12
1. High-Performance Computing (HPC) Vectorized Stochastic Solver & Milstein Integration The computational core (endodecay_sim_core.py) models continuous microvascular degradation under cellular noise using a non-linear multivariate Milstein Scheme. In v14.12, the engine has been re-engineered for High-Performance Computing (HPC) environments. By replacing iterative loops with SIMD-optimized NumPy matrix operations, the platform achieves ultra-fast SDE integration while preserving the strong convergence order of 1.0. This mathematical constraint suppresses numerical trajectory explosions, maintaining structural simulation boundaries across high-risk patient subgroups.
2. Enhanced Cardiorenal Feedback Network Topology Multi-systemic chronic failure cascades are mapped dynamically via an object-oriented network architecture (EnhancedCardiorenalTopology). During each SDE integration micro-step (dt), microvascular breakdown scores trigger numerical message passing across interconnected organ nodes including Endothelium, Heart, Kidney, Inflammation, and Metabolism. The platform maps reciprocal damage vectors across multi-axial pathways—including endo-cardiac (0.75), endo-renal (0.65), and cardiac-renal RAAS (0.80) axes—forcing real-time internal drift modifications to reflect epidemiological multimorbidity profiles.
3. Privacy-Preserving Federated Learning (HE + DP) Building upon the 2048-bit Paillier Cryptosystem, v14.12 implements a production-grade, asymmetric homomorphic encryption layer. Crucially, this release introduces Differential Privacy (DP) via L2-Norm Clipping. Local model weights are now clipped to a unit norm (L2-norm = 1.0) and injected with calibrated Gaussian noise before encryption, ensuring that central aggregation occurs without raw, unencrypted parameters ever being exposed, adhering to strict GDPR/HIPAA compliance through a true weighted FedAvg implementation.
4. Fully Functional Interactive Clinical Dashboard The frontend has been production-hardened. The dashboard establishes a direct reactive bridge to the persistent simulation data. Version 14.12 addresses critical statistical artifacts:
-
Time-Lag Correction: The Kaplan-Meier analysis strictly enforces the S(0) = 1.0 axiom, eliminating time-lag errors found in legacy versions.
-
Statistical Stability: OLS trendline computations in the clinical scatter telemetry now feature singularity protection (variance-check), preventing LinAlgError crashes during restrictive sub-cohort filtering.
-
Dynamic Visualization: Recalculated Kaplan-Meier curves now include Greenwood confidence intervals (CI), rendered with a precise layering hierarchy for prognostic clarity.
5. Strict Temporal Data Leakage Isolation To ensure absolute data science integrity, the machine learning and analytical sub-routines enforce rigid temporal boundaries. Prognostic predictions regarding long-term multi-systemic collapse are computed exclusively using pre-simulation (Month 0) immutable baseline traits. This architecture eliminates look-ahead bias by remaining completely isolated from downstream longitudinal parameters generated during the active runtime of the SDE loops.
6. International Clinical Guideline Alignment Target classification labels are strictly mapped to established medical consensus criteria:
-
Renal Endpoint (KDIGO Guidelines): eGFR < 15 mL/min/1.73m^2 marking the clinical onset of Stage 5 Kidney Failure (with Stage 4 tracking at eGFR < 30 mL/min/1.73m^2).
-
Cardiovascular Endpoint (ESC Guidelines): Age-adjusted NT-proBNP risk thresholds (ranging from 450 pg/mL to 1800 pg/mL) defining diagnostic boundaries for heart failure.
Empirical Pipeline Validation Records (v14.12 Verified Logs)
I. Physical Data Persistence Tracks The core engine writes four highly reproducible data matrices to storage:
-
EndoDecay_Sim_v14_Final_Data.csv: An 16-column physiological matrix mapping baseline markers against final 120-month post-SDE outcomes for 10,000 virtual subjects.
-
EndoDecay_Sim_v14_Survival_Data.csv: High-resolution longitudinal Kaplan-Meier survival probabilities calculated month-by-month, featuring Greenwood-corrected variance bounds.
-
EndoDecay_Sim_v14_Hazard_Ratios.csv: Cox Proportional Hazards (CoxPH) model results containing variable hazard ratios and log-coefficient tables.
-
EndoDecay_Sim_v14_Metrics.csv: Benchmark performance metrics (Concordance Index > 0.95 and Integrated Brier Score < 0.20) for the vectorized Random Survival Forest (RSF) and CoxPH model ensemble.
II. Secure Federated Aggregation Verification The 2048-bit Paillier cryptographic pipeline, coupled with L2-Norm Clipping, verified secure weight sharing across independent clinical nodes.
-
Decrypted Global FedAvg Vector Sum: Verified secure via asymmetric Paillier Ciphertext Objects.
-
Prognostic Performance: High-fidelity validation metrics verified across the vectorized machine learning sub-routines.
⚠️ Current Limitations & Theoretical Calibration Framework
While EndoDecay-Sim v14.12 is structurally and computationally production-ready, it is critical to distinguish between computational validity and empirical clinical calibration:
-
Mathematical Drift Coefficients: The numerical multipliers inside the Milstein SDE drift gradient (e.g., 0.001 for age, 0.003 for HbA1c, 0.002 for toxic load) are currently mechanistically inspired placeholders calibrated to maintain structural simulation boundaries and prevent mathematical trajectory explosions over a 120-month timeline. They do not represent exact hazard ratios derived from a specific empirical clinical trial repository.
-
Topological Cross-Talk Weights: The network node modifiers within the EnhancedCardiorenalTopology (e.g., endo_cardiac = 0.75, endo_renal = 0.65, inflam_endo = 0.55) are heuristically parameterized based on established qualitative pathophysiological cross-talk logic in cardiorenal syndrome, but they lack formal biological parameter estimation (system identification) from real-world paired biobank registries.
🔮 Roadmap for Empirical Alignment (v15.0 Blueprint)
To evolve EndoDecay-Sim from a bio-inspired mechanistic platform into an empirically calibrated digital twin, future major releases (v15.0) will implement a Data-Driven Parameter Estimation Pipeline:
-
Bayesian Inverse Problems: Utilizing Markov Chain Monte Carlo (MCMC) or Particle Filtering methods to map the placeholder weights directly against long-term real-world data (RWD) clinical trials (such as the UK Biobank, SPRINT, or EMPA-REG OUTCOME registries).
-
Neural SDE Optimizers: Deploying adjoint sensitivity methods to optimize the SDE coefficients via neural networks constrained by empirical biological laws.
🌐 Broader Implications for Chronic Disease Modeling and Multimorbidity
By introducing v14.12, EndoDecay-Sim sets a new paradigm for hybrid algorithmic medicine. By mathematically formalizing the reciprocal loops between cellular microvascular degradation and multi-organ failure (multimorbidity), the platform provides a robust framework to safely stress-test therapeutic boundaries, simulate complex receptor downregulation, project real-world clinical deterioration timelines, and uncover hidden biological bottlenecks before entering physical laboratory or clinical trial phases.
🔓 Open-Science and Licensing
Released under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. Developed as an independent research project to foster global computational reproducibility, in-silico validation, and open-access collaborative frameworks across mathematical endocrinology, cardiology, nefroloji, and computer science.
Repository Source: https://github.com/Myagizzavrak/endodecay-sim-app2-
Copyright (c) 2026 Muhammet Yağız Zavrak. All rights reserved.
Files
EndoDecay_Sim_v14_Final_Data.csv
Files
(2.0 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:176c3697dd15ce7c6eaa38f4f5dff9c5
|
9.0 kB | Download |
|
md5:7b223ad13d23559bfdac1dacc9e0ccef
|
18.3 kB | Download |
|
md5:6e509b1bb4ee20b338a69d944c69441f
|
2.0 MB | Preview Download |
|
md5:306c142e10ef0acb5d547a4387368d9b
|
349 Bytes | Preview Download |
|
md5:b14502ffaa62b56f766b152375233378
|
98 Bytes | Preview Download |
|
md5:e674d48007497d6ae18a09202dab28f4
|
2.8 kB | Preview Download |
|
md5:20c258a042809f7442c31d0fad591acd
|
81 Bytes | Preview Download |
Additional details
Software
- Programming language
- Python