Matrix Factorisation Techniques for Path Signatures
Path signature transforms have become an increasingly popular tool in the analysis of sequential data. Efficient computation is essential for their use in practical applications. We propose algorithms based on matrix multiplication for the computation of truncated signatures and individual signature coefficients. For a path with $n$ linear segments in fixed dimension $d\geq2$, the forward and backward passes for its depth-$m$ truncated signature each use $\mathcal{O}_d(nd^{(ω-1)m/2})$ arithmetic operations when $m\geq2$ and $n\geq d^{m/2}$, assuming that $q \times q$ matrices can be multiplied in $\mathcal{O}(q^ω)$ operations for some $2<ω<3$. The algorithm achieves an asymptotic speedup as $m\to\infty$ over Horner's algorithm, which requires $\mathcal{O}(nd^m)$ operations. For a single level-$m$ coefficient, our proposed algorithm uses $\tfrac12 nm^2+\mathcal{O}(nm)$ multiplications, compared to $nm^2+\mathcal{O}(nm)$ for Horner's recurrence. We derive backpropagation algorithms for our methods and compare their performance with Horner's algorithm on CPU and GPU.