Objective. Algorithmic differentiation (AD) can be a useful technique to numerically optimize design and algorithmic parameters by, and quantify uncertainties in, computer simulations. However, the effectiveness of AD depends on how "well-linearizable" the software is. In this study, we assess how promising derivative information of a typical proton computed tomography (pCT) scan computer simulation is for the aforementioned applications. Approach. This study is mainly based on numerical experiments, in which we repeatedly evaluate three representative computational steps with perturbed input values. We support our observations with a review of the algorithmic steps and arithmetic operations performed by the software, using debugging techniques. Main results. The model-based iterative reconstruction (MBIR) subprocedure (at the end of the software pipeline) and the Monte Carlo (MC) simulation (at the beginning) were piecewise differentiable. Jumps in the MBIR function arose from the discrete computation of the set of voxels intersected by a proton path. Jumps in the MC function likely arose from changes in the control flow that affect the amount of consumed random numbers. The tracking algorithm solves an inherently non-differentiable problem. Significance. The MC and MBIR codes are ready for the integration of AD, and further research on surrogate models for the tracking subprocedure is necessary.
翻译:目的:算法微分(AD)可作为一种有效技术,用于对计算机模拟中的设计与算法参数进行数值优化,并量化其不确定性。然而,算法微分的效果取决于软件的“可线性化”程度。本研究评估了典型质子计算机断层扫描(pCT)计算机模拟的导数信息在前述应用中的潜力。方法:本研究主要基于数值实验,通过扰动输入值反复评估三个代表性计算步骤。我们利用调试技术审查软件执行的算法步骤与算术运算,以支持观察结论。主要结果:基于模型的迭代重建(MBIR)子程序(位于软件流程末端)与蒙特卡洛(MC)模拟(位于流程起始端)具有分段可微性。MBIR函数的跳跃源于质子路径穿过的体素集合的离散计算,而MC函数的跳跃可能源于控制流变化导致的随机数消耗量改变。追踪算法求解的本质上是一个不可微问题。意义:MC与MBIR代码已具备集成算法微分(AD)的条件,但需进一步研究针对追踪子程序的代理模型。