Reclaiming First Principles: A Differentiable Framework for Conceptual Hydrologic Models
Jasper A. Vrugt, Jonathan M. Frame, Ethan Bollman
TL;DR
This paper develops an exact analytic framework for differentiable hydrologic modeling by augmenting the governing ODEs with forward sensitivity equations to produce state-and-parameter Jacobians entirely analytically. The resulting gradients, computed as $\mathbf{g}_{n}(\boldsymbol{\uptheta}) = \mathbf{J}_{q}(\boldsymbol{\uptheta})^{\top} \boldsymbol{\updelta}_{n}(\boldsymbol{\uptheta})$, enable gradient-based calibration across diverse differentiable losses (e.g., $L_{1}$, $L_{2}$, NSE, KGE, Huber, FDC) without finite-difference noise or autodiff overhead. The method is demonstrated on Hymod, HMODEL, SACSMA, and Xinanjiang, showing near-perfect agreement with numerical Jacobians while delivering dramatic CPU-time speedups (roughly $70$–$500\times$) over finite differences and orders of magnitude faster gradients than automatic differentiation for long time series. The results jointly offer faster, more stable calibration, transparent sensitivity analyses, and insights into parameter identifiability and equifinality, with clear pathways to large-scale, data-driven hydrologic learning and uncertainty quantification. The framework preserves physical interpretability and can be embedded directly in existing hydrologic codes, avoiding opaque or CPU-intensive autodiff toolchains.
Abstract
Conceptual hydrologic models remain the cornerstone of rainfall-runoff modeling, yet their calibration is often slow and numerically fragile. Most gradient-based parameter estimation methods rely on finite-difference approximations or automatic differentiation frameworks (e.g., JAX, PyTorch and TensorFlow), which are computationally demanding and introduce truncation errors, solver instabilities, and substantial overhead. These limitations are particularly acute for the ODE systems of conceptual watershed models. Here we introduce a fully analytic and computationally efficient framework for differentiable hydrologic modeling based on exact parameter sensitivities. By augmenting the governing ODE system with sensitivity equations, we jointly evolve the model states and the Jacobian matrix with respect to all parameters. This Jacobian then provides fully analytic gradient vectors for any differentiable loss function. These include classical objective functions such as the sum of absolute and squared residuals, widely used hydrologic performance metrics such as the Nash-Sutcliffe and Kling-Gupta efficiencies, robust loss functions that down-weight extreme events, and hydrograph-based functionals such as flow-duration and recession curves. The analytic sensitivities eliminate the step-size dependence and noise inherent to numerical differentiation, while avoiding the instability of adjoint methods and the overhead of modern machine-learning autodiff toolchains. The resulting gradients are deterministic, physically interpretable, and straightforward to embed in gradient-based optimizers. Overall, this work enables rapid, stable, and transparent gradient-based calibration of conceptual hydrologic models, unlocking the full potential of differentiable modeling without reliance on external, opaque, or CPU-intensive automatic-differentiation libraries.
