提出直接对求解器本身求导的新方法,提升模拟可微性的效率与精度。
Differentiate the Solver, Not the Equation: Reverse-Sweep Adjoints for Block Implicit Simulation

- 直接对求解器的执行过程求导,不依赖全局方程求解。
- 在10^6个软体上实现高效可微弹性动力学,速度比传统方法快33倍。
- 适合需要高精度梯度的物理模拟、学习与控制任务。
可微模拟是学习、控制和反问题中的关键技术,需对非线性隐式求解器求梯度。现有方法要么依赖展开自动微分(内存随求解深度增长),要么基于方程级隐式微分(组装全局雅可比矩阵并求解大型稀疏伴随系统),牺牲了前向求解器的局部性——实际计算的是收敛后的方程而非真实执行的有限计算过程。本文提出求解器级微分,直接对实际执行的求解器求导。当求解器由块隐式更新组成时,其离散伴随通过逆序应用对应伴随更新获得,形成反向传播结构,与前向求解器完全匹配。从算子角度看,前向实现有序局部求解近似逆,后向通过逆序局部伴随求解实现其转置,无需构建全局系统。我们在顶点块下降法(Vertex Block Descent)上实现该思想,得到一个可微求解器,其反向彩色高斯-赛德尔扫描完全由局部3×3伴随求解构成。后向传播在所有求解深度下均与展开自动微分结果精确一致(机器精度),而方程级伴随在一阶迭代后误差达37%;在同一代码库、同一GPU对比中,本方法快33倍,内存减少71倍;该构造在投影动力学与扩展位置型动力学中亦为精确。我们成功将可微弹性动力学扩展至单卡上10^6个接触耦合软体(800万顶点)。总体而言,本工作强调求解器结构作为高效可微模拟的实用组织原则。
原文摘要 · Abstract (English)
Differentiable simulation is a key component in learning, control, and inverse problems, where gradients through nonlinear implicit solvers are required. Existing approaches either rely on unrolled automatic differentiation, whose memory grows with solver depth, or on equation-level implicit differentiation, which assembles global Jacobians and solves large sparse adjoint systems, discarding the locality of the forward solver -- and differentiating the converged equation rather than the finite computation that actually ran. We propose solver-level differentiation, which differentiates the executed solver itself. When a solver is composed of block implicit updates, its discrete adjoint is obtained by applying the corresponding adjoint updates in reverse order, yielding a reverse-sweep formulation whose backward pass mirrors the forward solver. From an operator perspective, the forward pass realizes an approximate inverse through ordered local solves, and the backward applies its transpose through reverse local adjoint solves, constructing no global system. We instantiate this idea on Vertex Block Descent, yielding a differentiable solver whose reverse colored Gauss-Seidel sweeps are composed entirely of local $3\times 3$ adjoint solves. The backward matches automatic differentiation through the identical executed forward to machine precision at every solver depth, where the equation-level adjoint is off by 37% after one sweep; in a controlled same-codebase, same-GPU comparison it is 33x faster and uses 71x less memory than unrolled automatic differentiation; and the same construction is exact on projective dynamics and extended position-based dynamics. We scale differentiable elastodynamics to $10^6$ contact-coupled soft bodies (8M vertices) on one GPU. Overall, this work highlights solver structure as a practical organizing principle for efficient differentiable simulation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。