Background: AID algorithms require ongoing software updates and bug fixes. In co-adapted systems, where users tune settings around existing algorithmic behavior, bug fixes can paradoxically disrupt glycemic control. No principled framework evaluates the safety of AID algorithm updates. Methods: Our two-part framework classifies bugs and evaluates the clinical equivalence of AID system software updates. Bugs are classified as factual, heuristic, or computational, each with distinct management strategies. Classifications were validated from porting Trio's oref algorithm from Javascript to a bug-fixed Swift implementation. We compared implementations using shadow execution on 736,480 invocations from eight Trio users. The second component assesses clinical equivalence with error analysis on paired glucose values, applied to both Trio implementations using mechanistic in silico and data-driven replay simulation. Results: In mechanistic in silico simulation, the Swift and Javascript implementations produced nearly identical Time in Range (84.9% vs. 84.9%) and Glycemia Risk Index (23.5% vs. 23.9%), with more than 99% of paired glucose in Parkes Error Grid Zones A and B, meeting our clinical equivalence threshold. Shadow execution showed low mismatch rates in oref components (iob 0.43%, autosens 1.22%, determineBasal 0.07%, meal 0.01%), with clinically meaningful differences in 0.03% of iob invocations. Data-driven replay simulations of bugs revealed more than 99% of downstream paired glucose in Parkes Error Grid Zones A and B, also meeting our clinical equivalence threshold. Conclusions: Our framework integrates bug-fixing principles with multi-method clinical evaluation to assess AID algorithm update safety. It is system-agnostic and applicable to all widely used OS-AID systems, with case studies highlighting the need for systematic remediation of factual and computational bugs.
翻译:背景:自动胰岛素输注(AID)算法需要持续的软件更新和漏洞修复。在共同适应系统中,用户会根据现有算法行为调整参数设置,此时漏洞修复可能反直觉地破坏血糖控制效果。目前尚无原则性框架用于评估AID算法更新的安全性。方法:我们提出的双组成部分框架对漏洞进行分类,并评估AID系统软件更新的临床等效性。漏洞分为事实性、启发式和计算性三类,每类对应不同的管理策略。通过将Trio的oref算法从JavaScript移植到修复漏洞的Swift实现,对分类结果进行了验证。我们利用八位Trio用户生成的736,480次调用的影子执行对比两种实现。第二组成部分通过配对血糖值的误差分析评估临床等效性,并应用于两种Trio实现中,采用机制性计算机模拟和数据驱动回放仿真。结果:在机制性计算机模拟中,Swift与JavaScript实现产生的血糖达标时间比例(84.9% vs. 84.9%)和血糖风险指数(23.5% vs. 23.9%)几乎一致,超过99%的配对血糖值落在Parkes误差网格A区和B区,满足临床等效性阈值。影子执行显示oref组件的失配率较低(iob 0.43%、autosens 1.22%、determineBasal 0.07%、meal 0.01%),其中iob调用中0.03%的差异具有临床意义。针对漏洞的数据驱动回放仿真显示,超过99%的下游配对血糖值落在Parkes误差网格A区和B区,同样满足临床等效性阈值。结论:本框架将漏洞修复原则与多方法临床评估相结合,用于评估AID算法更新安全性。该框架具有系统无关性,适用于所有广泛使用的开源AID系统,案例研究凸显了对事实性和计算性漏洞进行系统性修复的必要性。