Simulation-based optimization using agent-based models is typically carried out under the assumption that the gradient describing the sensitivity of the simulation output to the input cannot be evaluated directly. To still apply gradient-based optimization methods, which efficiently steer the optimization towards a local optimum, gradient estimation methods can be employed. However, many simulation runs are needed to obtain accurate estimates if the input dimension is large. Automatic differentiation (AD) is a family of techniques to compute gradients of general programs directly. Here, we explore the use of AD in the context of time-driven agent-based simulations. By substituting common discrete model elements such as conditional branching with smooth approximations, we obtain gradient information across discontinuities in the model logic. On the example of microscopic traffic models and an epidemics model, we study the fidelity and overhead of the differentiable models, as well as the convergence speed and solution quality achieved by gradient-based optimization compared to gradient-free methods. In traffic signal timing optimization problems with high input dimension, the gradient-based methods exhibit substantially superior performance. Finally, we demonstrate that the approach enables gradient-based training of neural network-controlled simulation entities embedded in the model logic.
翻译:使用基于代理商的模型进行模拟优化的典型假设是,描述模拟输出对输入的敏感度的梯度无法直接评估。 仍然应用基于梯度的优化方法,可以有效地引导优化达到局部最佳度, 但是,如果输入层面较大, 需要许多模拟运行才能获得准确的估计数。 自动区分( AD) 是直接计算一般程序梯度的一组技术。 在这里, 我们探索在时间驱动代理商模拟中使用自动调整法。 通过以平稳近似取代条件分枝等常见离散模型元素, 我们获得了模型逻辑不连续的梯度信息。 以微分模型和流行病模型为例, 我们研究了不同模型的忠实性和间接性, 以及梯度优化与无梯度方法相比所实现的趋同速度和解决方案质量。 在具有高投入层面的通信信号时间优化问题中, 基于梯度的方法表现非常优异。 最后, 我们证明该方法有助于对嵌入模型逻辑的神经网络控制的模拟实体进行基于梯度的培训。