ADEPTS: An auto-differentiable framework for time-dependent nonlinear thermo-chemical mantle convection inversion
Abstract. Time-dependent mantle-dynamics inversion must simultaneously address the high dimensionality of the initial state, nonlinear rheology, and the complex propagation of gradients through long-term thermo-mechanical evolution. Here, we develop a geodynamic inversion framework ADEPTS based on a two-dimensional staggered-grid finite-difference discretization and automatic differentiation, with the aim of jointly constraining the initial temperature field and mantle material properties. The forward model solves the incompressible Stokes equations, the temperature advection–diffusion equation, and the compositional advection equation, while accounting for temperature- and strain-rate-dependent nonlinear viscosity and plastic yielding. For the nonlinear Stokes system arising at each time step, we implement two gradient-computation strategies: unrolled differentiation through a fixed number of Picard iterations and implicit differentiation based on the sufficiently converged discrete nonlinear residual equations. Numerical experiments show that unrolled differentiation enables stable inversion even when the nonlinear solve has not fully converged, while the accuracy of implicit differentiation depends on sufficient convergence of the nonlinear Stokes system. When the nonlinear solve is insufficiently accurate, both gradient consistency and optimization convergence deteriorate for implicit differentiation, whereas sufficiently converged nonlinear solves recover the expected gradient accuracy and yield reconstruction results comparable to those obtained with unrolled differentiation. Under idealized noise-free twin-experiment conditions, we further test the joint inversion of the initial temperature field and physical parameters. The joint inversion recovers the initial temperature field together with the density of a compositional anomaly, the reference viscosity, and the stress exponent, while simultaneously fitting observations of the final-time temperature field, surface horizontal velocity, and surface normal stress. The two differentiation strategies impose different requirements on the accuracy of the nonlinear Stokes solve, but both can be used for gradient computation and inversion within a differentiable time-dependent mantle-dynamics framework.
The manuscript presents ADEPTS, a differentiable framework for time-dependent thermo-chemical mantle convection inversion. The Stokes solver is based on a staggered-grid finite-difference discretization. Most of the forward model is differentiated directly with reverse-mode automatic differentiation (AD), while the nonlinear Stokes solve is treated with one of two approaches: unrolled differentiation and implicit differentiation. Unrolled differentiation backpropagates with AD through a fixed number of Picard iterations. Implicit differentiation uses the converged nonlinear residual: the sparse Jacobian is assembled via AD, an adjoint system with the transposed Jacobian is solved and the final vector-Jacobian products for the adjoint gradient evaluation are calculated with reverse-mode AD. The framework is demonstrated in three synthetic, noise-free twin-experiment setups of increasing complexity: a sinking lithospheric drip, a thermal subduction model and a joint inversion of the initial temperature field, compositional density and rheological parameters in a thermo-chemical subduction model. The core of the manuscript compares unrolled and implicit differentiation in terms of gradient accuracy and inversion convergence. Computational efficiency and memory use are discussed only qualitatively.
Overall, the manuscript is relevant to a broad geoscientific community, fits well within the scope of the journal and is therefore worth publishing. However, to support its main contribution, the comparison between unrolled and implicit differentiation, the manuscript needs a thorough quantitative comparison of both methods. Provided this and the comments below are addressed, I recommend publication after major revisions.
General comments:
The manuscript lacks a quantitative comparison of the unrolled and implicit differentiation approaches in terms of wall time, memory requirements, etc. That should be done by using a fixed solver tolerance for both cases to ensure a fair comparison. This point is very important as in the manuscript there are many claims like ‘Both memory use and reverse-mode differentiation cost increase with the iteration count K’ (ll. 283 - 285), ‘additional cost’ (l. 564) or ‘main drawback is memory and computational cost’ (ll. 661-662). These and other claims like that should be quantified and properly compared. A comparison with the existing literature on this topic is also missing, as similar approaches have been proposed in previous studies outside the geoscientific community.
Generally, it should be discussed how useful gradients of an uncoverged forward solution are. Could they be used in the beginning stage of an inversion, where one would later switch to the fully converged solution and its gradients?
The manuscript is very detailed, some sections should be condensed. The Results section, in particular, contains overlapping descriptions that could be merged or removed. I do not think that every example figure needs to show the time evolution of the reference state. Some of this material could also be moved to the appendix or removed altogether.
In general, references are often missing. For example, the Methods section mentions many concepts without referencing previous work. Here some examples (not the only ones), where one or multiply references are missing: l.75, l.286, ll. 334-335, ll. 347-350, ll. 718-719.
The last example, the ‘thermo-chemical subduction model’ and its inversion design, is very specific and lacks broad applicability, particularly with regard to the cost function used. A time series of stress is part of the objective function. For inversions of real data, this could be problematic, as surface stress data from the past would be difficult to obtain. The applicability of this example (and this cost function) to real data should therefore be discussed. Alternatively, to fully demonstrate the potential of the method, the inversion should be carried out with data that are realistically available.
Specific comments:
Minor comments:
Literature :
Griewank, A., & Walther, A. (2000). Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation. ACM Transactions on Mathematical Software (TOMS), 26(1), 19-45.