NAMay 9
Explicit and Effectively Symmetric Runge-Kutta MethodsDaniil Shmelev, Kurusch Ebrahimi-Fard, Nikolas Tapia et al.
Symmetry is a key property of numerical methods. The geometric properties of symmetric schemes make them an attractive option for integrating Hamiltonian systems, whilst their ability to exactly recover the initial condition without the need to store the entire solution trajectory makes them ideal for the efficient implementation of Neural ODEs. In this work, we present a Hopf algebraic approach to the study of symmetric B-series methods. We show that every B-series method can be written as the composition of a symmetric and "antisymmetric" component, and explore the structure of this decomposition for Runge-Kutta schemes. A major bottleneck of symmetric Runge-Kutta schemes is their implicit nature, which requires solving a nonlinear system at each step. By introducing a new set of order conditions which minimise the antisymmetric component of a scheme, we derive what we call Explicit and Effectively Symmetric (EES) schemes -- a new class of explicit Runge-Kutta schemes with near-symmetric properties. We present examples of second-order EES schemes and demonstrate that, despite their low order, these schemes readily outperform higher-order explicit schemes such as RK4 and RK5, and achieve results comparable to implicit symmetric schemes at a significantly lower computational cost.
CVMay 12
Stable and Near-Reversible Diffusion ODE Solvers for Image EditingBarbora Barancikova, Daniil Shmelev, Cristopher Salvi
The inversion of diffusion models plays a central role in image editing. Algebraically reversible ODE solvers provide an appealing approach to diffusion inversion for text-guided image editing, by eliminating the inversion error inherent in DDIM-based editing pipelines. However, empirical results indicate that reversibility alone is insufficient. As edits require larger semantic or visual changes, reversible diffusion solvers often exhibit instabilities and suffer sharp drops in output quality. In this paper, we show that the trade-off between exact reversibility and numerical stability manifests empirically as a trade-off between background preservation and prompt alignment in image editing. We then investigate the use of near-reversible Runge-Kutta methods as a more stable alternative to exactly reversible diffusion schemes. When combined with a vector-field smoothing strategy, the resulting approach improves edit fidelity, remains stable under large edits, and largely retains the background-preservation benefits of reversible solvers.
LGSep 24, 2025
Explicit and Effectively Symmetric Schemes for Neural SDEsDaniil Shmelev, Cristopher Salvi
Backpropagation through (neural) SDE solvers is traditionally approached in two ways: discretise-then-optimise, which offers accurate gradients but incurs prohibitive memory costs due to storing the full computational graph (even when mitigated by checkpointing); and optimise-then-discretise, which achieves constant memory cost by solving an auxiliary backward SDE, but suffers from slower evaluation and gradient approximation errors. Algebraically reversible solvers promise both memory efficiency and gradient accuracy, yet existing methods such as the Reversible Heun scheme are often unstable under complex models and large step sizes. We address these limitations by introducing a novel class of stable, near-reversible Runge--Kutta schemes for neural SDEs. These Explicit and Effectively Symmetric (EES) schemes retain the benefits of reversible solvers while overcoming their instability, enabling memory-efficient training without severe restrictions on step size or model complexity. Through numerical experiments, we demonstrate the superior stability and reliability of our schemes, establishing them as a practical foundation for scalable and accurate training of neural SDEs.
LGSep 12, 2025
pySigLib -- Fast Signature-Based Computations on CPU and GPUDaniil Shmelev, Cristopher Salvi
Signature-based methods have recently gained significant traction in machine learning for sequential data. In particular, signature kernels have emerged as powerful discriminators and training losses for generative models on time-series, notably in quantitative finance. However, existing implementations do not scale to the dataset sizes and sequence lengths encountered in practice. We present pySigLib, a high-performance Python library offering optimised implementations of signatures and signature kernels on CPU and GPU, fully compatible with PyTorch's automatic differentiation. Beyond an efficient software stack for large-scale signature-based computation, we introduce a novel differentiation scheme for signature kernels that delivers accurate gradients at a fraction of the runtime of existing libraries.