Hybrid modeling of the human cardiovascular system using NeuralFMUs

Tobias Thummerer, Johannes Tintenherr, Lars Mikelsons

TL;DR

This paper introduces NeuralFMUs, a hybrid modeling framework that embeds physical simulations (Functional Mock-up Units) directly into neural networks. By applying this to the human cardiovascular system, the authors demonstrate how to "learn" complex physical effects like arterial elasticity from data, resulting in a model that is significantly more accurate than simplified physical models and roughly 3,750 times faster than high-fidelity reference simulations.

What Problem Does This Paper Address?

Modeling the human cardiovascular system is a classic "Goldilocks" problem.

On one hand, high-fidelity 1D-fluid models are accurate but computationally expensive, making them difficult to use in real-time applications like wearable tech or bedside monitoring. On the other hand, simplified white-box models (like static pipe models) are fast but miss crucial dynamic effects—specifically the elasticity of arterial walls—leading to significant errors in pressure wave predictions.

Pure machine learning (black-box) approaches could bridge this gap, but they require massive amounts of data and often ignore the fundamental laws of physics. This paper tackles the challenge of creating a hybrid model: one that keeps the robust foundation of physics while using Artificial Neural Networks (ANNs) to "fill in the blanks" of the missing dynamics.

Methods

The authors utilize a novel structure called a NeuralFMU. This is an evolution of the "Neural ODE" concept. While a standard Neural ODE uses an ANN to define a system's derivative, a NeuralFMU integrates a Functional Mock-up Unit (FMU)—a standardized, portable version of a physical model—into the loop.

The Workflow: 1. The Physical Backbone: They started with a simplified Modelica model of the arterial system (116 static pipes). Crucially, this model ignored elasticity to stay computationally light. 2. Placeholders: To give the neural network a "place" to inject learned dynamics, they added small physical placeholders (C-capacitors or LC-circuits) into the Modelica model at 10 key arterial segments. 3. The Hybrid Loop: The model was exported as an FMU and imported into the Julia programming language using FMI.jl and FMIFlux.jl. 4. Training: An ANN was trained to manipulate the state derivatives of the FMU. Essentially, the ANN learned the "pressure drop" and "elastic response" that the simplified physical model originally ignored.

Datasets

The study used the Pulse Wave Database (PWDB), which contains simulated data for 4,374 virtual healthy subjects aged 25–75.

  • Training: Data from "Subject #1" (specifically 10 arterial segments like the Thoracic Aorta and Brachial Artery).
  • Testing: Data from "Subject #2" (an "unknown" patient to the model) to evaluate generalization.
  • Reference: The "ground truth" was a high-fidelity 1D-fluid simulation performed with Nektar1D.

Key Insights and Ideas

  • Structural Integration over Residual Learning: Instead of just having a network predict the error of a physical model, the NeuralFMU puts the network inside the ODE solver. This allows the model to maintain physical consistency over time.
  • The Power of Placeholders: By adding LC-circuits (inductance-capacitance) as placeholders, the authors gave the ANN the mathematical "room" to learn phase-shifting in the pulse waves, which a simple static model cannot do.
  • Parameter Freezing: During training, the authors initially "locked" the derivative-calculating ANN. This forced a separate "state ANN" to first correct static offsets before the model tried to learn complex dynamics, preventing the system from becoming unstable early in the training process.
  • Efficiency vs. Precision: The authors argue that for many medical use cases (like wearables), a "good enough" approximation that runs in milliseconds is far more valuable than a perfect simulation that takes minutes.

Key Results

  • Massive Speedup: The high-fidelity reference model took ~75.6 seconds per pulse wave. The NeuralFMU took only ~0.02 seconds—a speedup factor of approximately 3,750x.
  • Improved Accuracy: The hybrid model significantly outperformed the simplified Modelica model. While the static Modelica model showed massive deviations in peak pressure, the NeuralFMU (especially with LC-placeholders) closely tracked the reference pulse wave shapes.
  • Generalization: When tested on a second, unobserved patient with a different heart rate, the model maintained its fit, proving it had learned generalized physical principles rather than just memorizing one patient's data.

Limitations and Future Work

  • Stability Risks: The authors note that while physical systems are usually stable by default, injecting an ANN into the loop can potentially destabilize the simulation. Developing "best practices" for stabilization is a key next step.
  • Small Training Sample: The current results are largely based on training on a single patient. Future work will involve training on a wider variety of the 4,000+ subjects in the PWDB to improve robustness.
  • Black-Box Components: While the model is "hybrid," the ANN portion remains a black box. The authors suggest that deeper or wider network topologies could further improve accuracy but might come at a computational cost.

Summary updated

BibTeX
@article{thummerer2021hybrid,
  author = {Tobias Thummerer and Johannes Tintenherr and Lars Mikelsons},
  title = {{Hybrid modeling of the human cardiovascular system using NeuralFMUs}},
  journal = {Journal of Physics Conference Series},
  year = {2021},
  doi = {10.1088/1742-6596/2090/1/012155},
}

Loading related content...

Figure