EHR-MPC: Inference-Time Control for Sepsis with Digital Twins

Discover how EHR-MPC optimizes sepsis treatment using generative digital twins and predictive control during inference, outperforming RL.

miércoles, 29 de julio de 2026 • 3 min read • Q2BSTUDIO Team

Control en tiempo de inferencia para sepsis con IA generativa

Sepsis remains a leading cause of hospital mortality, and defining optimal treatment policies continues to be an unresolved clinical challenge. Traditional reinforcement learning (RL) approaches learn fixed policies from historical data, but fail to adapt to changing clinical objectives during inference. In this context, the EHR-MPC (Electronic Health Record Model Predictive Control) framework proposes a revolutionary alternative: decoupling the learning of patient dynamics from treatment optimization by creating a patient digital twin in the form of a generative electronic health record model.

The digital twin not only replicates the patient's clinical evolution under different interventions, but also enables inference-time planning using model predictive control (MPC). Instead of executing a fixed policy, the system simulates multiple future trajectories and selects the sequence of actions that maximizes the expected outcome according to the clinician's current goals. This gives physicians a flexible tool that can be reconfigured on the fly, adapting to changes in patient response or therapeutic priorities.

Evaluated on a multicenter intensive care unit (ICU) cohort from the Mass General Brigham system, EHR-MPC shows comparable performance to RL methods in off-policy evaluations, but clearly outperforms them in on-policy simulations, where adaptive planning capability makes the difference. This result suggests that the future of clinical decision-support systems lies not in rigid policies, but in architectures that separate patient dynamics modeling from control optimization.

From a technical and business perspective, this approach opens the door to more robust and customizable AI solutions in healthcare. Building accurate digital twins requires advanced generative models (such as transformers or normalizing flows), trained on high-quality clinical data and deployed on scalable cloud infrastructure. This is where the expertise of companies like Q2BSTUDIO becomes key: we offer custom software services to integrate these models into real hospital environments, ensuring both cybersecurity of sensitive data and interoperability with legacy systems through AWS/Azure cloud.

Furthermore, implementing a system like EHR-MPC demands complex process orchestration: from ingesting and cleaning electronic health records to deploying AI agents that execute predictive control in real time. Business Intelligence (BI) capabilities with Power BI allow monitoring the digital twin's performance and adjusting simulation parameters without retraining the full model. The combination of these technologies —AI, cloud, BI, and cybersecurity— forms the ideal ecosystem to take personalized medicine to a new level.

Q2BSTUDIO, as a software and technology development company, provides comprehensive services covering the entire lifecycle of such projects. From initial consulting to define the data architecture to implementing machine learning pipelines on Azure or AWS, including designing interactive Power BI dashboards that visualize digital twin predictions. Our team has experience building autonomous AI agents that collaborate with clinicians, suggesting adaptive treatments without replacing human judgment.

Sepsis is just one example, but the inference-time control paradigm with digital twins is applicable to other areas such as oncology, chronic diseases, or even industrial process optimization. The key is to separate real-world modeling from decision-making, enabling continuous adaptation without costly retraining. This represents a mindset shift: instead of training a fixed policy, we train an environment simulator and then plan on it at each step.

For healthcare organizations, adopting this approach means investing in scalable cloud infrastructure, cybersecurity solutions to protect patient data, and multidisciplinary teams combining clinical knowledge with software engineering. At Q2BSTUDIO we accompany our clients through each of these stages, offering everything from custom application development to integrating AWS/Azure cloud services and implementing Business Intelligence layers with Power BI.

In conclusion, EHR-MPC represents a significant advancement in the application of artificial intelligence to medicine, offering dynamic and adaptive control that overcomes the limitations of classical RL methods. The combination of generative digital twins and model predictive control opens new possibilities for real-time treatment personalization. And with the right support from technology partners like Q2BSTUDIO, these innovations can be transferred from the lab to the patient's bedside in a secure, efficient, and scalable manner.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.