Lecture notes on rough paths and applications to machine learning

Thomas Cass, Cristopher Salvi

Introduction

These lecture notes introduce a mathematical concept, that of describing a path through its iterated integrals, and explain how the resulting theory can be used in data science and machine learning tasks involving streamed data. The study of iterated integrals has deep-seated roots in both mathematics and physics, with the early mathematical work stretching back at least to a series of papers by K-T. Chen, see e.g. . Chen’s contribution spanned various domains, with a central emphasis being on homotopy theory and the use of path space integration to illuminate the interplay between topology and analysisAn overview of Chen’s contributions can be found in the introduction to his collected works . Without providing an exhaustive historical narrative, related contemporaneous developments also appeared in physics, in the form of the Dyson exponential , and the subsequent work of W. Magnus . Later insights revealed how similar principles can be applied in the control theory of nonlinear systems, catalysed by the work of Fliess . Consequently, what we term the “signature” often appears as the eponymous Chen-Fliess series in certain parts of the literature.

By building on these foundations, B. Hambly and T. Lyons showed in a landmark 2010 paper how, for two continuous paths of finite 1-variation, the agreement of signatures coincides with the notion that the pair of paths are tree-like equivalent. The collection of iterated integrals thus determines a path up to tree-like equivalence analogously to the way in which integrable functions on the circle are determined by their Fourier coefficients, up to Lebesgue-null sets.

A later, no less influential development was the theory of rough paths, which was developed by T. Lyons as a branch of stochastic analysis in the 1990s , . A core achievement of this theory is to show how a path-by-path and robust notion of solution can be ascribed to differential equations of the form:

This construction holds even in cases where the input path xx may be highly irregular as a function of time. The crux is to enhance xx with iterated integral type terms, up to certain order, to form a rough path. The Hambly and Lyons theorem allows an extension to the setting of (geometric) rough paths . A breakthrough in merging these ideas with modern data science tools came in 2013, when B. Graham combined the signature features of pen strokes with sparse neural network methods to win part of an international competition on Chinese handwriting recognition.

The purpose of these notes is thus to give an account of the extraordinarily rapid progress of the application of this mathematics to data science since these initial developments. By adopting simplifications, opting for a streamlined treatment over generality, we hope that this text can be used by researchers and graduate students seeking a quick introduction to the subject from a cross section of disciplines including mathematics, data science, computer science statistics and engineering.

Our presentation proceeds in the order of abstraction-first, applications-second. Accordingly, our first section treats the fundamental mathematical underpinnings of the theory, focusing on the core properties of the signature transform. We freely make compromises to maintain the tempo. One such concession is to develop the theory specifically for continuous, finite-length paths, and not the more delicate cases of (geometric) rough paths or discontinuous paths. In the same vein, we keep algebraic notions to a minimum. A pivotal theme throughout the section is how the iterated integral perspective on signatures can be enriched by treating the ensemble as the solution to a particular controlled differential equation. This observation often facilitates simpler and more direct proofs. It also highlights another key theme of the subject: the idea of controlled differential equations as paradigmatic examples of functions on path space. The coordinate iterated integrals emerge as a universal feature set, or “basis”, for functions on path space, and serve as a foundation for functional approximation. To capture this idea using mathematics, we need to introduce unparametrised path space and understand some elementary topology on this space. The section culminates in a practical demonstration illustrating how this concept can be applied to execute nonlinear regression on path space using signature features.

Signature methods offer powerful techniques for handling streamed data, although they pose challenge themselves due to the inherently high dimensionality of the feature space. In statistical learning, kernel methods have emerged as effective tools for managing such difficulties for vector-valued data in an inner product space. Kernel methods, including signature kernel methods, can be applied in tasks where it is sufficient to know only the inner products of observations and not the exact values of the features themselves. Our second section develops the core concepts behind signature kernel methods building upon the foundations established in the first section. The exposition deliberately mirrors that of classical kernel methods for vector-valued data. We establish the main theoretical properties of these kernels – universality and characteristicness – and illustrate their practical implications for concrete applications, such as distribution regression for streamed data. Computational considerations predominate when assessing the effectiveness of a kernel; a kernel only becomes useful if there is an efficient means for evaluating it at a pair of observations. For a certain class of signature kernels, this can be achieved through solving a partial differential equation known as the signature kernel PDE. This approach is particularly effective for sufficiently smooth input paths, allowing for efficient computation of inner products.

The concluding section provides an overview of the theory of rough differential equations, which naturally extends the concept of a controlled differential equation. In deep learning, neural ordinary differential equation (Neural ODE) models have recently emerged, offering a continuous-time approach for modelling the latent state of residual neural networks. Neural controlled differential equations (Neural CDEs) are continuous-time analogues of recurrent neural networks and provide a memory-efficient way to model functions of incoming data streams. When the driving signal is Brownian, the resulting neural stochastic differential equations (Neural SDEs) can be used as powerful generative models for time series. These models can be studied in a unified way by using the overarching framework of neural rough differential equation (Neural RDEs). We provide an overview of the fundamental constituents of rough path theory, placing emphasis on how they are used in practice through numerical schemes, such as the log-ODE method, for the training of Neural CDEs, SDEs and RDEs.

These notes have emerged from a series of lecture courses delivered at Imperial College London by the authors during the periods of 2020 to 2021, initially by TC and then, from 2022 to 2024, by CS. We extend our gratitude to successive cohorts of students in the MSc in Mathematics and Finance programme, as well as the students in the EPSRC CDT in the Mathematics of Random Systems, whose insightful comments and feedback have enriched these sessions and hardened up the presentation of these notes. Special acknowledgments are owed to Nicola Muca Cirone, Francesco Piatti, Will Turner, and Nikita Zozoulenko for their invaluable feedback and discussions on earlier versions of these notes. TC is grateful to the Institute of Advanced Study where he spent the academic year 2023-24, with the generous support of a Erik Ellentuck Fellowship, and where a first draft of these notes were finalised.

Thomas Cass, Princeton Cristopher Salvi, London

Chapter 1 The signature transform

We will refer to (1.1) as a controlled differential equation (CDE), usually adopting the more concise notation expressed in terms of differentials

This notation makes it apparent that the role of the function ff is to model how, at every point along the output trajectory, changes in yy are brought about by changes in xx. Before we develop these points, we recall the definition of a vector field.

If we assume that ff in equation (1.2) is CkC^{k}, ff can be equivalently defined as a linear map v↦fvv\mapsto f_{v} from VV into the (real) vector space Tk(W)\mathcal{T}^{k}\left(W\right) of CkC^{k}-vector fields on WW, where fvf_{v} and ff are related by

With this point of view, one can use the alternative notation for the CDE (1.2)

In particular, if the driving path xx is differentiable, then this CDE becomes y˙t=fx˙t(yt)\dot{y}_{t}=f_{\dot{x}_{t}}\left(y_{t}\right) so that yy is the integral curve of the time-dependent vector field

The CDE terminology originates from optimal control theory, where typically some desired feature of the output yy is realised by appropriately selecting some control x˙\dot{x}.

A vector field hh in T(W)\mathcal{T}\left(W\right), defined below as a smooth function from WW to itself, can equivalently be defined as a first-order differential operator acting on functions in C∞(W).C^{\infty}(W). From this point of view h:C∞(W)→C∞(W)h:C^{\infty}(W)\rightarrow C^{\infty}(W) is the linear map

A choice of basis {bi}i=1n\left\{b_{i}\right\}_{i=1}^{n} for WW gives rise to a global coordinate system w=(w1,...,wn)\ w=\left(w^{1},...,w^{n}\right) on W ,W\,, which then allows us to write hϕh\phi in terms of partial derivatives

It can be convenient to write as hϕ=hi∂iϕh\phi=h^{i}\partial_{i}\phi, implicitly summing over repeated indices.

Viewing vector fields as differential operators allows us to consider their composition as well as the important operation of taking their Lie brackets.

Suppose that gg and hh are two vector fields in T(W),\mathcal{T}\left(W\right), then the composition ghgh is the differential operator defined by (gh)ϕ=g(hϕ)\left(gh\right)\phi=g\left(h\phi\right) for all ϕ\phi in C∞(W).C^{\infty}\left(W\right). Furthermore, the Lie bracket of ff and gg is the differential operator defined by [g,h]ϕ=(gh−hg)ϕ\left[g,h\right]\phi=\left(gh-hg\right)\phi for all ϕ\phi in C∞(W).C^{\infty}\left(W\right).

The Lie bracket [g,h]\left[g,h\right] is in fact another vector field in the sense that it is a first-order differential operator, as can be seen from the fact that the terms involving second-order derivatives disappear:

As a consequence [⋅,⋅]:T(W)×T(W)→T(W)\left[\cdot,\cdot\right]:\mathcal{T}\left(W\right)\times\mathcal{T}\left(W\right)\rightarrow\mathcal{T}\left(W\right) is a bilinear map.

One of the achievements of rough path theory is to give a framework for interpreting solutions to controlled differential equations when the driving signal xx is very far from differentiable. The focus of this chapter and the next will not be on this theory, but many of the underpinning ideas are nonetheless inspired by it. A common theme is the central role will be played by the collection of iterated integrals of the path xx, and it is with an our account of their properties that we begin.

1.1 Coordinate iterated integrals

To understand why iterated integrals emerge from studying CDEs, we recall the classical method of Picard iteration for constructing solutions to CDEs. The basic idea is to inductively define a sequence of paths (yn)n=0∞\left(y^{n}\right)_{n=0}^{\infty}, the Picard iterates, as follows

Provided sufficient regularity of the data ff and xx is assumed, the sequence of Picard iterates can be shown to converge to a limit in a suitable sense. A final step is then to show that this limit solves (1.1), and to understand whether this solutions is unique.

We consider a simple special case of this scheme when f:W→L(V,W)f:W\rightarrow L\left(V,W\right) is a linear function; that is, when ff belongs to the space L(W,L(V,W)))L\left(W,L\left(V,W)\right)\right). If we allow that xx is differentiable, a general Picard iterate then has the form

where f(0)=f^{\left(0\right)}=idW,{}_{W}, the identity function on W W\,, and f⊗k(y):V×V×....×V→Wf^{\otimes k}\left(y\right):V\times V\times....\times V\rightarrow W is the kk-fold multilinear map defined by

Multilinear maps can be better understood through the notion of tensor product that we now recall.

Let SS and TT be two vector spaces. The tensor product of SS and TT is a vector space S⊗TS\otimes T together with a bilinear map from S×TS\times T to S⊗T ,S\otimes T\,, whose action is denoted by (s,t)↦s⊗t,\left(s,t\right)\mapsto s\otimes t, which has the universal property that for any bilinear function ϕ:S×T→U\phi:S\times T\rightarrow U into another vector space UU there exists a unique linear map ϕ^:S⊗T→U\hat{\phi}:S\otimes T\rightarrow U such that ϕ(s,t)=ϕ^(s⊗t).\phi\left(s,t\right)=\hat{\phi}\left(s\otimes t\right).

We will most often use this in the case V=S=TV=S=T when we will write V⊗2V^{\otimes 2} as short hand for V⊗V.V\otimes V. The definition is associative, V1⊗(V2⊗V3)V_{1}\otimes(V_{2}\otimes V_{3}) and (V1⊗V2)⊗V3\left(V_{1}\otimes V_{2}\right)\otimes V_{3} are isomorphic, and hence we can write V⊗kV^{\otimes k} unambiguously to denote the kk-fold tensor product of V.V. Under this isomorphism we have that v1⊗(v2⊗v3)=(v1⊗v2)⊗v3v_{1}\otimes\left(v_{2}\otimes v_{3}\right)=\left(v_{1}\otimes v_{2}\right)\otimes v_{3} and thus v1⊗v2⊗v3v_{1}\otimes v_{2}\otimes v_{3} is also well defined. As a consequence of the universal property, the multilinear map f⊗k(y)f^{\otimes k}\left(y\right) in (1.5) is such that

for a unique linear map f⊗k(y)^:V⊗k→W\widehat{f^{\otimes k}\left(y\right)}:V^{\otimes k}\to W. To ease the notational burden we abuse notation and refer to this map also as f⊗k(y)f^{\otimes k}\left(y\right). It will also be unwieldy to write ⊗\otimes each time a tensor product of vectors occurs and so we adopt the more concise notation v1...vkv_{1}...v_{k} instead of v1⊗...⊗vkv_{1}\otimes...\otimes v_{k}. Using this and the linearity of the integral we write the nthn^{\text{th}} Picard iterate (1.4) as

is the kk-fold iterated integral of x.x. The assumption that xx is differentiable is an unnecessarily strong one to define these iterated integrals. For a less restrictive notion, we will need the following way to quantify the regularity of a path.

Let p≥1p\geq 1 be a real number. The pp-variation of a path x:[a,b]→Vx:[a,b]\to V be on any subinterval [s,t]⊂[a,b][s,t]\subset[a,b] is the following quantity

where ∣∣⋅∣∣||\cdot|| is any norm on VV, and the supremum is taken over all partitions D\mathcal{D} of the interval [s,t][s,t], i.e. over all increasing finite sequences such that D={s=k0<k1<...<kr=t}\mathcal{D}=\{s=k_{0}<k_{1}<...<k_{r}=t\}. We say that xx has finite pp-variation on [s,t][s,t] if ∥x∥p,[s,t]<∞\left\lVert x\right\rVert_{p,[s,t]}<\infty. If xx has finite 11-variation we will say that xx has bounded variation (or has finite length).

We will denote by Cp([a,b],V)C_{p}([a,b],V), to be the space of continuous paths from the interval [a,b][a,b] to VV which have finite pp-variation. If the intervals can be understood from the context, then we use the abridged notation ∥x∥p\left\lVert x\right\rVert_{p} and Cp(V)C_{p}(V) respectively in place of ∥x∥p,[s,t]\left\lVert x\right\rVert_{p,[s,t]} and Cp([a,b],V)C_{p}([a,b],V).

Using the definition of integration theory due to Young (e.g. [37, Chapter 6]), the integrals in equation (1.7) will continue to exist whenever xx is in Cp([a,b],V)C_{p}([a,b],V) and for any 1≤p<21\leq p<2. As these objects will appear repeatedly, we introduce the notation

to denote the kk-fold iterated integral in (1.7). A central theme in the sequel will be the way in which the collection of all such iterated integrals determines the effect of the path xx on general non-linear CDEs.

For any path x∈Cp([a,b],V)x\in C_{p}([a,b],V) with p∈[1,2)p\in[1,2) and any subinterval [s,t]⊂[a,b][s,t]\subset[a,b], the signature transform (ST) S(x)[s,t]S(x)_{[s,t]} of xx on [s,t][s,t] is defined as the following collection of iterated integrals

When it is clear from the context, we will suppress the dependence on the interval and instead denote the ST of xx by S(x)S(x).

As with the ST, we omit reference to the interval Sn(x)S_{n}\left(x\right) when the interval can be inferred from the context.

The iterated integrals characterized by the ST have been the object of numerous mathematical studies prior to rough paths. Initially presented in a geometric framework by Chen in and later by Fliess and Kawski in control theory, many researchers explored this sequence of iterated integrals of a path to derive pathwise Taylor series for solutions of differential equations. In fact, the ST is sometime referred to as the ”Chen-Fliess series”. This book delves into integrating the ST in machine learning to model functions on sequential data.

1.2 Algebras of tensors

In this book we are interested in the setting where UU is the set of continuous paths of bounded pp-variation for p∈[1,2)p\in[1,2). Monomials will be given by terms of the ST. This motivates the need to study the algebraic structure of the space of tensors ∏i=0∞V⊗i\prod_{i=0}^{\infty}V^{\otimes i}. Subsequently, the algebraic and anlytic properties of the ST will yield the fundamental approximation result for the ST in Theorem 1.4.7 which will be derived as a simple consequence of the Stone-Weierstrass Theorem.

It will be important to have the structure of an algebra on the product space ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i}. To introduce this, we observe from the universal property of the tensor product that the space V⊗n⊗V⊗mV^{\otimes n}\otimes V^{\otimes m} is isomorphic to V⊗(n+m)V^{\otimes\left(n+m\right)} and therefore that vmvnv_{m}v_{n} is a well-defined element of V⊗(n+m).V^{\otimes\left(n+m\right)}. This allows to define an associative product on ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i} which is compatible with the tensor products on the individual levels V⊗iV^{\otimes i}. By this we mean that if in:V⊗n↪\mathfrak{i}_{n}:V^{\otimes n}\hookrightarrow ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i} denotes the canonical inclusion, then the tensor product on ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i} satisfies

for every nn and m.m. The following definition provides this.

Suppose that v=(v0,v1,...)v=\left(v_{0},v_{1},...\right) and w=(w0,w1,...)w=\left(w_{0},w_{1},...\right) are two elements of ∏i=0∞V⊗i.{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i}. Then we define the (extended) tensor product v⋅w=(z0,z1,...)v\cdot w=\left(z_{0},z_{1},...\right) as

The product space ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i} equipped with the product ⋅\cdot is an algebra. Sometimes it is convenient to interpret elements of ∏i=0∞V⊗i{\textstyle\prod\nolimits_{i=0}^{\infty}}V^{\otimes i} as formal series of tensors; that is, to identify v=(v0,v1,...)v=\left(v_{0},v_{1},...\right) with ∑i=0∞vi\sum_{i=0}^{\infty}v_{i}. We denote by T((V))T\left(\left(V\right)\right) the algebra of formal tensor series with the product (1.11).

The tensor algebra T(V)T(V) has the following universal property, which in fact can be used as an alternative way to uniquely characterise it (up to isomorphism).

Let AA be an associative algebra and let F:V→AF:V\rightarrow A be a linear map. Then there exists a unique algebra homomorphism F^:T(V)→A\hat{F}:T\left(V\right)\rightarrow A which extends FF in the sense that F=F^∘i1,F=\hat{F}\circ\mathfrak{i}_{1},where i1:V↪T(V)\mathfrak{i}_{1}:V\hookrightarrow T\left(V\right) is the canonical inclusion.

Let End(W)=L(W,W)\left(W\right)=L\left(W,W\right) denote the algebra of endomorphisms of WW with an (associative) product given by A∗B=B∘AA\ast B=B\circ A where ∘\circ denotes the usual composition of linear maps. In the case of our earlier discussion of a differential equation with linear vector fields we used ff in L(W,L(V,W))L\left(W,L\left(V,W\right)\right). Any such ff is determined by the map FF in L(V,End(W))L\left(V,\text{End}\left(W\right)\right) through F(v)(w)=f(w)(v).F\left(v\right)\left(w\right)=f\left(w\right)\left(v\right). By using the universal property of the tensor algebra, we can extend FF to an algebra homomorphism F^\hat{F} on T(V)T\left(V\right) into ((End(W),∗).\left(W\right),\ast). We note that for any kk this map is determined by

With this formulation, we can further simplify the nthn^{th} Picard iterate (1.6) by writing

Given inner products on VV and WW, we can endow V⊗WV\otimes W with a canonical inner product.

Let V,WV,W be vector spaces endowed with the inner-products ⟨⋅,⋅⟩V\left\langle\cdot,\cdot\right\rangle_{V} and ⟨⋅,⋅⟩W\left\langle\cdot,\cdot\right\rangle_{W} respectively. Define the (Hilbert-Schmidt) inner product on V⊗WV\otimes W by

for any v1,v2∈Vv_{1},v_{2}\in V and w1,w2∈Ww_{1},w_{2}\in W.

Thus, we can equip V⊗kV^{\otimes k} with the norm determined by

In the sequel, we will consider Banach spaces E⊂T((V))E\subset T((V)) defined as follows

in which the norm will typically be an lql_{q}-norm, with qq in [1,∞)[1,\infty), of the form

Two cases are of particular interest. When q=2q=2 the resulting space is a Hilbert space with the inner product given by

If q=1q=1 then (E,∥⋅∥)(E,\left\lVert\cdot\right\rVert) is a Banach algebra, i.e. ∥ab∥≤∥a∥∥b∥\left\lVert ab\right\rVert\leq\left\lVert a\right\rVert\left\lVert b\right\rVert, as is easily verified.

1.3 Functions on the range of the signature transform

In this section we outline how the dual space T(V)∗T(V)^{*} of the tensor algebra T(V)T(V) can be constructed from the dual space V∗V^{*} of VV. Dual elements in T(V)∗T(V)^{*}, when restricted to functionals on the range of the ST, will furnish the main building blocks (or monomials) of our Taylor expansion for functions on path space.

and by linearity. In particular, we see that ei∗(v)=vie_{i}^{\ast}\left(v\right)=v_{i} when v=∑i=1dviei.v=\sum_{i=1}^{d}v_{i}e_{i}. This leads naturally to a dual basis for (V∗)⊗k\left(V^{\ast}\right)^{\otimes k}.

Given a multi-index I=(i1,...,ik)I=\left(i_{1},...,i_{k}\right) of length ∣I∣=k\left|I\right|=k and a basis for VV as above, we denote eI=ei1...eike_{I}=e_{i_{1}}...e_{i_{k}}. The set {eI:∣I∣=k}\left\{e_{I}:\left|I\right|=k\right\} is a basis for V⊗kV^{\otimes k} and so it also has a dual basis whose elements we denote by eI∗.e_{I}^{\ast}.

Any choice of basis for VV induces a vector space isomorphism between (V⊗k)∗\left(V^{\otimes k}\right)^{\ast} and (V∗)⊗k\left(V^{\ast}\right)^{\otimes k} which is characterised by

This isomorphism is, in fact, independent of the original choice of basis for VV, as can be easily shown, and as such we will often implicitly identify elements of (V⊗k)∗\left(V^{\otimes k}\right)^{\ast} with the corresponding element of (V∗)⊗k\left(V^{\ast}\right)^{\otimes k} under this canonical isomorphism. A similar observation can be made for the dual space T(V)∗T\left(V\right)^{\ast}, although more care is needed because T(V)T(V) is infinite dimensional; the follow lemma describes the situation.

The vector spaces T((V∗))T\left(\left(V^{\ast}\right)\right) and T(V)∗ T\left(V\right)^{\ast\ }can be identified through the explicit isomorphism Φ:T((V∗))→T(V)∗ \Phi:T\left(\left(V^{\ast}\right)\right)\rightarrow T\left(V\right)^{\ast\ }

Note that here fkf_{k} in (V∗)⊗k\left(V^{\ast}\right)^{\otimes k} is identified with (V⊗k)∗\left(V^{\otimes k}\right)^{\ast} in the way described above.

By considering the restriction of the linear map (1.13) to T(V∗)T\left(V^{\ast}\right) we can identify T(V∗)T\left(V^{\ast}\right) with a subspace of T((V))∗T\left(\left(V\right)\right)^{\ast}. This is because Φf\Phi_{f} can be extended to T((V))∗T\left(\left(V\right)\right)^{\ast} whenever ff is a tensor polynomial.

By regarding eI∗∈(V⊗k)∗≅(V∗)⊗ke_{I}^{\ast}\in\left(V^{\otimes k}\right)^{\ast}\cong\left(V^{\ast}\right)^{\otimes k} as an element of T(V∗)T\left(V^{\ast}\right) under the usual inclusion of (V∗)⊗k\left(V^{\ast}\right)^{\otimes k} into T(V∗),T\left(V^{\ast}\right), the previous remark allows us to define a collection of scalars

as II ranges over all multi-indices II of finite length. This offers another view on the signature which is captured by the following definition.

Let {ei}i=1,..,d\{e_{i}\}_{i=1,..,d} be a basis for VV with corresponding dual basis {ei∗}i=1,...d\{e_{i}^{*}\}_{i=1,...d} and suppose that 1≤p<21\leq p<2. If xx is in Cp(V)C_{p}(V) and I=(i1,...,ik)I=\left(i_{1},...,i_{k}\right) is a multi-index of integers from {1,...,d}\{1,...,d\}, then the coordinate iterated integral S(x)IS(x)^{I} is the real number given by S(x)I=eI∗(S(x))S(x)^{I}=e_{I}^{*}(S(x)).

2 Analytical properties

We will now apply the tools we have developed for studying tensors to understand some important analytic properties of the ST. Firstly, the ST exhibits invariance under reparameterizations; this essentially allows the ST to act as a filter that removes an infinite dimensional group of symmetries given by time reparameterizations. Secondly, the factorial decay of the terms in the ST implies that truncating the ST at a sufficiently high level retains the bulk of the critical information. This is especially pertinent for describing solutions to CDEs, as the omitted infinite number of ST coefficients diminish in importance factorially. Finally, the uniqueness of ST for a certain class of paths, ensuring a one-to-one identifiability of a path with its ST.

Suppose that 1≤p<21\leq p<2 and let xx be in Cp([a,b],V)C_{p}([a,b],V) and let [a,b][a,b] and assume that λ:[c,d]→[a,b]\lambda:[c,d]\to[a,b] is a continuous non-decreasing surjection. Then S(x)[a,b]=S(x∘λ)[c,d]S(x)_{[a,b]}=S(x\circ\lambda)_{[c,d]}.

We prove the result first under the assumption that p=1p=1. Let xλ:=x∘λx^{\lambda}:=x\circ\lambda denote the reparameterisation of xx by λ\lambda. We prove the statement by an induction on the level of the ST. The 1st1^{st}-order iterated integral is the increment, and so we have

which holds for all t∈[c,d]t\in[c,d]. Fixing a basis {vi:i=1,...,d}\{v_{i}:i=1,...,d\} for VV, we assume that for any k≥0k\geq 0 and any multi-index (i1,...,im)(i_{1},...,i_{m}) of integers from {1,...,d}\{1,...,d\} of length m≤km\leq k, we have equality of the coordinate iterated integrals defined with respect to this basis, i.e.

We then consider an arbitrary multi-index (i1,...,ik,ik+1)(i_{1},...,i_{k},i_{k+1}) of length k+1k+1. For any t∈[c,d]t\in[c,d] we can use the induction hypothesis to write

see, e.g., Theorem 3.6 of . By applying this result with the choices f(r)=S(x)[a,r](i1,...,ik)f(r)=S(x)_{[a,r]}^{(i_{1},...,i_{k})} and i=ik+1i=i_{k+1} we obtain

whereupon the induction step is complete.

The case 1<p<21<p<2 can be obtained using a simple approximation argument by combining the fact that the closure of C1(V)C_{1}(V) in Cq(V)C_{q}(V) contains Cp(V)C_{p}(V) for any p<qp<q. The argument is then concluded by considering such qq with q<2q<2 and then using the joint continuity, in qq-variation, of the Young integral map (e.g. [37, Prop. 6.11])

It is left to the reader to fill in the fine details. ∎

It is useful sometimes to work with re-parameterisations which may fail to be continuous or even surjective. In these cases, it is possible for a version of the previous theorem to still hold. For example, suppose that xx is a path in C1([a,b],V)C_{1}\left([a,b],V\right) of length L=∣∣x∣∣1;[a,b]L=\left|\left|x\right|\right|_{1;\left[a,b\right]} then we can define a right-continuous function τ:[0,L]→[a,b]\tau:\left[0,L\right]\rightarrow[a,b]

with the convention that inf⁡∅=b\inf\emptyset=b. In spite of the lack of continuity of τ,\tau, it can be seen easily that x∘τx\circ\tau is itself still continuous and indeed still has finite length. In fact more is true: under this choice of reparameterisation, the path x∘τx\circ\tau is Lipschitz continuous. The reader is invited to prove this in Exercise 1.6.6. The steps in the proof of the previous theorem can be retraced in this case to show again that S(xτ)=S(x)S\left(x^{\tau}\right)=S\left(x\right).

2.2 Fast decay in the magnitude of coefficients

As an application of this property we now prove two key results which expose properties of the ST, and which we will use repeatedly. The first, the so-called factorial decay estimate, quantifies the magnitude of the terms S(x)(k)S\left(x\right)^{\left(k\right)} with respect to appropriate terms norms. We state it for paths of finite length, although generalisations to less regular paths are possible, see for instance [37, Sec. 9.1.1].

Set L:=∥x∥1,[a,b]L:=\left\lVert x\right\rVert_{1,[a,b]} to be the 11-variation of xx, or its length. Let τ\tau be the reparamterisation defined by (1.14) then xτ=x∘τx^{\tau}=x\circ\tau :[0,L]→V:\left[0,L\right]\rightarrow V is Lipschitz continuous; see 1.6.6. Using Remark 1.2.2 we have that S(x)=S(xτ)S\left(x\right)=S\left(x^{\tau}\right) and, as the length of xx is also a parameterisation-invariant quantity, it suffices to work with xτx^{\tau} in place of xx when proving (1.15). Any Lipschitz continuous function is absolutely continuous and hence, by the Radon-Nikodym Theorem (e.g. [35, Thm. 3.8]), there exists an integrable function (xτ)′\left(x^{\tau}\right)^{\prime} in L1([0,L],V)L^{1}\left(\left[0,L\right],V\right) such that

for all [u,v]\left[u,v\right] in [0,L].\left[0,L\right]. The derivative of xtτx_{t}^{\tau} exists for almost every tt in [0,L]\left[0,L\right] and it equals (xrτ)′\left(x_{r}^{\tau}\right)^{\prime}; the fact that xτx^{\tau} has Lipschitz norm bounded by one, cf. (1.42), then shows that ∣∣(xτ)′∣∣≤1||\left(x^{\tau}\right)^{\prime}||\leq 1 almost everywhere. Using these observations, together with Fubini’s Theorem (e.g. [35, Thm. 2.37]), it is easy to see that

2.3 Uniqueness

The next result we show is that for any two paths xx and yy in Cp(V)C_{p}\left(V\right) which share an identical, strictly monotone coordinate, one has S(x)=S(y)S\left(x\right)=S\left(y\right) if and only if the paths xx and yy are identically equal. This is the first instance of a result, which we will revisit later in a more general form, which validates that the ST is injective.

Suppose that xx and yy are two paths in Cp([a,b],V)C_{p}\left([a,b],V\right), with p∈[1,2)p\in[1,2), for some choice of basis for V,V, their expression in these coordinates x=(x1,...,xd)x=\left(x^{1},...,x^{d}\right) and y=(y1,...,yd)y=\allowbreak\left(y^{1},...,y^{d}\right) are such that

for some strictly monotone path ρ.\rho. Suppose that xa=yax_{a}=y_{a}, then

It is obvious that two identical paths have the same ST. To prove the converse we first notice, by considering −x-x and −y-y if necessary, that it is sufficient to prove the result assuming that ρ\rho is strictly increasing. Further by reparameterising xx and yy by the (necessarily continuous and strictly increasing) function σ=ρ−1\sigma=\rho^{-1} we can assume that the first coordinate of both xx and yy is the identity function i(t)≡ti\left(t\right)\equiv t. By making these simplification, we can write

for every kk and every jj. For simplicity we drop the index jj and refer only to x−x^{-}. Integration-by-part then yields that

Noting that xa=yax_{a}=y_{a} together with xa,b=S(x)a,b(1)=S(y)a,b(1)=ya,bx_{a,b}=S\left(x\right)_{a,b}^{\left(1\right)}=S\left(y\right)_{a,b}^{\left(1\right)}=y_{a,b} results in

and hence that x−−y−x^{-}-y^{-} as an element of L2([a,b])L^{2}\left(\left[a,b\right]\right) is in the orthogonal complement P⊥\mathcal{P}^{\perp} of the space P\mathcal{P} of finite degree polynomials. Since P\mathcal{P} is dense subspace of L2([a,b])L^{2}\left(\left[a,b\right]\right) it follows that P⊥={0}\mathcal{P}^{\perp}=\left\{0\right\} and hence x−=y−x^{-}=y^{-} almost everywhere. Using the continuity of x−x^{-} and y−y^{-} then gives that x−x^{-}and y−y^{-} are identically equal. ∎

So far we have seen that the ST satisfies two important analytic properties: the factorial decay allows for fast approximation of solutions of differential equations, while the invariance to reparameterization allows to remove possibly detrimental symmetries from the data. The ST also benefits from a rich algebraic structure which allow for efficient computations as we shall see next.

3 Algebraic properties

At first sight, the ST looks like an object very difficult to compute in practice. However, it turns out that these computations can be carried out elegantly and efficiently by using simple classes of paths as building blocks for more complicated paths. To do this we will make use of an algebraic property of the ST called Chen’s relation. We will later refine our view on this point but, for the moment, we assume that x∈C1([a,b],V)x\in C_{1}([a,b],V) is a linear path, i.e. a straight line, so that for any t∈[a,b]t\in[a,b]

Denote by xa,b:=i1(xb−xa)x_{a,b}:=i_{1}(x_{b}-x_{a}), where i1:V→T((V))i_{1}:V\to T((V)) is the canonical inclusion. Then, in this special case, we can calculate the ST of xx over [a,b][a,b] very easily and show that

where the map exp⁡:T((V))→T1((V))\exp:T((V))\to T_{1}((V)) is the tensor exponential defined as

where T1((V))={v∈T((V)):π0v=1}.T_{1}\left(\left(V\right)\right)=\left\{v\in T\left(\left(V\right)\right):\pi_{0}v=1\right\}.

The proof of this observation follows because the derivative of xx is the constant vector xb−xa(b−a)\frac{x_{b}-x_{a}}{(b-a)} on [a,b][a,b], and therefore

Suppose we now have two paths xx in Cp([a,b],V)C_{p}([a,b],V) and yy in Cp([b,c],V)C_{p}([b,c],V). Then there is a very natural binary operation on these paths which allows us to combine xx and yy into a single path. We define the concatenation of xx and yy, which we denote by x∗yx\ast y, to be the path in Cp([a,c],V)C_{p}([a,c],V) given by

An important property is that the ST S(x∗y)S(x*y) can be described in terms of the ST of xx and the ST of yy and, in fact, it equals the tensor product S(x)⋅S(y)S(x)\cdot S(y). This property, which is called Chen’s relation, is the content of the following lemma.

Let 1≤p<21\leq p<2. Suppose that xx is in Cp([a,b],V)C_{p}([a,b],V) and yy is in Cp([b,c],V)C_{p}([b,c],V). Then

We prove the result in the case p=1p=1; the identity for arbitrary 1<p<21<p<2 can be obtained by the now-familiar routine of approximating xx and yy in CqC_{q} with p<q<2p<q<2 by respective sequences bounded variation paths. See the final paragraph of the proof of 1.2.1. The identity (1.19) for p=1p=1 then carries over to general pp by the continuity of Young integration in the qq-variation topology. With this simplification being understood, we let z:=x∗yz:=x\ast y. Then, for each k≥1k\geq 1, the level kk of the ST

By Fubini’s theorem, this is equivalent to

On each sub-interval [ti,ti+1][t_{i},t_{i+1}] the path xx is linear, therefore eq. 1.16 yields

Expression (1.20) is leveraged in all the main python packages for computing signatures such as esig , iisignature and signatory .

We conclude this section by showing that at any level of truncation, the truncated tensor algebra coincides with the linear span of signatures truncated at that level. Several proofs of this statement can be found in the literature, see for example [26, Lemma 3.4]. The one we propose below, (which one of us learnt from Bruce Driver), solely requires tools introduced so far in this chapter and the well-known fact that the exponential map in (1.17) and the tensor logarithm log⁡:T1((V))→T((V))\log:T_{1}((V))\to T((V)) defined as

where (xa)∗l(x^{a})^{*l} is the path xax^{a} concatenated with itself ll times and where the fifth equality follows from the Chen’s identity of Lemma 1.3.1. From this we have

where i1N:V→TN(V)i_{1}^{N}:V\to T_{N}(V) is the canonical inclusion. A variation on the same idea yields for n≤Nn\leq N that

for any collection a1,....,ana_{1},....,a_{n} in V.V.

From this it follows as above that TN(V)⊂T_{N}\left(V\right)\subset span(SN).\left(\mathcal{S}_{N}\right). ∎

In Proposition 2.1.14 in the next chapter we will show that this statement not only holds for the TST, but also for the (untruncated) ST.

3.2 The signature as a controlled differential equation

Many of the important properties of the ST of a path xx can be derived most easily by observing that it is the solution of a specific CDE driven by xx. Indeed, we will see that we could have used this as a starting point to define the ST without ever introducing iterated integrals. Formally this CDE reads

where we continue to use ⋅\cdot to denote the multiplication in T((V))T((V)). We will shortly introduce the analysis needed to ensure that the equation is well posed and then explore some of its properties. For the moment, we comment on the structure of the equation by observing that it is a linear CDE.

If the tensor product ⋅\cdot in equation (1.22) were replaced by a commutative product, then we would expect the resulting solution to be the exponential of the driving signal xx. This allows us to view the signature, at least impressionistically, as a form of non-commutative exponential. The analysis below develops the tools needed to put this intuition on a firmer foundation. A key eventual goal will be to show, in a precise sense, the universality of the ST: under certain conditions, all continuous input-response relationships are expressible in terms of it. This class contains a wide family of CDEs, the canonical example with which we started this chapter. The reader may find is useful to look ahead at the statement of Theorem 1.4.7 at this stage.

We begin by introducing some notation for the range of the signature map, which will be heavily used throughout the rest of this chapter.

Let 1≤p<21\leq p<2. We use Sp⊂T((V))\mathcal{S}_{p}\subset T((V)) to denote the image of Cp(V)C_{p}(V) under the ST.

The following result then makes precise the CDE-formulation of the signature which we described above.

Suppose that xx is in Cp([a,b],V)C_{p}([a,b],V) for some pp in [1,2)[1,2). Let (E,∣∣⋅∣∣)(E,\left|\left|\cdot\right|\right|) be a Banach algebra which is a subalgebra of T((V))T((V)) with the property that Sp⊂E\mathcal{S}_{p}\subset E. Then the controlled differential equation

admits a unique solution in EE which is given explicitly by Yt=A⋅S(x)[a,t]Y_{t}=A\cdot S(x)_{[a,t]}. In particular, if A=1=(1,0,...)A=\mathbf{1}=(1,0,...) then the ST uniquely solves (1.23).

For instance EE could be taken as the Banach algebra described in Example 1.1.14.

The map f:E→L(V,E)f:E\rightarrow L\left(V,E\right) given by f(Y)=Y⋅af\left(Y\right)=Y\cdot a is well defined; it takes values in EE as EE is a Banach algebra and, by virtue of being linear in YY, ff can easily been seen to satisfy the conditions of the classical versions of Picard theorem for Young CDEs (e.g. [67, Thm. 1.28]). A solution to (1.23) thus exists uniquely in EE. On the other hand, any solution Yt=(Yt0,Yt1,Yt2,...)Y_{t}=\left(Y_{t}^{0},Y_{t}^{1},Y_{t}^{2},...\right) to (1.23) must satisfy

We give an example of how this characterisation of the ST can be used to extract useful algebraic properties. To do so we first observe that, in addition to the binary operation of concatenating two paths, there is another natural unary operation consisting of running the path backwards starting from its end point. Symbolically, given x∈Cp([a,b],V)x\in C_{p}([a,b],V) we define the time reversal of xx to be x←\overleftarrow{x} where

It is easily verified that x←\overleftarrow{x} again belongs to Cp([a,b],V)C_{p}([a,b],V). The following result shows that the signature of x←\overleftarrow{x} is the mutliplicative inverse of the ST of xx in T((V))T((V)).

Let p∈[1,2)p\in[1,2) and let x∈Cp([a,b],V)x\in C_{p}([a,b],V). Then

Let A=S(x)[a.b]A=S\left(x\right)_{[a.b]} then, by using Theorem 1.3.5, we have Ut=A⋅S(x←)[a,t]U_{t}=A\cdot S\left(\overleftarrow{x}\right)_{[a,t]} uniquely solves the CDE

We need to prove that Ub=1.U_{b}=\mathbf{1.} To do this we define Vt:=Ua+b−tV_{t}:=U_{a+b-t} for tt in [a,b]\left[a,b\right] and observe that VV solves

Because Vb=S(x)[a,b]V_{b}=S\left(x\right)_{\left[a,b\right]} and S(x)[a,⋅]S\left(x\right)_{\left[a,\cdot\right]} solves (1.24) we have by uniqueness that Va=S(x)[a,a]=1.V_{a}=S\left(x\right)_{\left[a,a\right]}=\mathbf{1.} It follows that S(x)[a,b]S\left(x\right)_{\left[a,b\right]} ⋅S(x←)[a,b]=1\cdot S\left(\overleftarrow{x}\right)_{[a,b]}=\mathbf{1} for any xx. The fact that x←←=x\overleftarrow{\overleftarrow{x}}=x completes the proof. ∎

Readers who may be sceptical about the advantages of working with the analytical, CDE approach to the signature are invited to compare the proof of this result with the same proof attempted using algebraic methods.

3.3 The shuffle identity

The tensor product ⋅\cdot is not the only product that makes sense on T((V))T((V)). In this section we will discuss another product, called the shuffle product \shuffle\shuffle, which will turn out to be a fundamental tool for some more advanced manipulations of the ST, and is an important tool underpinning many version of the universal approximation theorems using signature features that arise in machine learning.

We first defined this product, and then explain through examples how it is used.

We define \shuffle:T(V)×T(V)↦T(V)\shuffle:T(V)\times T(V)\mapsto T(V) by

for any f∈V⊗kf\in V^{\otimes k} and g∈V⊗lg\in V^{\otimes l} of the form f=f−⋅af=f_{-}\cdot a and g=g−⋅bg=g_{-}\cdot b, where aa and bb are in VV. Given this definition, \shuffle\shuffle extends uniquely to an algebra product on T(V)×T(V)T(V)\times T(V) by linearity in each term of the product.

For reasons that will be clear soon, it will be useful to work with the \shuffle\shuffle on the co-tensor algebra T(V∗)T(V^{*}). This does not affect the definition above, which holds when VV is an arbitrary vector space (and so, in particular can be taken to be V∗V^{*}).

Why is the shuffle product relevant to the ST? One important tool which we encounter in foundational calculus is integration-by-parts. To put this familiar result in the present context, suppose that xx is a smooth path in VV and that ff and gg are linear functionals in V∗V^{*}, then classical integration-by-parts is the identity

and this be rewritten in terms of shuffle products as

This observation can be generalised: products of iterated integrals can be re-expressed as a linear combination of higher order iterated integrals using integration-by-parts. The shuffle product can be used to succinctly capture the algebraic identities which result from this observation.

Suppose that x∈Cp([a,b],V)x\in C_{p}([a,b],V) for pp in [1,2)[1,2). For any two linear functionals ff and gg in T((V))∗≅T(V∗)T((V))^{*}\cong T(V^{*}) it holds that

It suffices to prove the result for arbitrary ff ∈V∗⊗k\in V^{\ast\otimes k} and g∈V∗⊗lg\in V^{\ast\otimes l} the general result then follows from the distributivity of the shuffle product.

We will prove, by double induction, the following statement

H(m,n)H(m,n): ∀0≤k≤m,0≤l≤n\forall 0\leq k\leq m,0\leq l\leq n, identity (1.26) holds ∀f∈V∗⊗k,g∈V∗⊗l.\forall f\in V^{\ast\otimes k},g\in V^{\ast\otimes l}.

We can check that H(m,0)H(m,0) and H(0,n)H(0,n) hold using elementary properties of scalar multiplication in T(V∗)T\left(V^{\ast}\right). We assume therefore that H(m−1,n)H(m-1,n) and H(m,n−1)H(m,n-1) hold and verify H(m,n)H(m,n). To do so, take f∈V∗⊗mf\in V^{\ast\otimes m} and g∈V∗⊗ng\in V^{\ast\otimes n} and use the definition of the shuffle product to see that

where f=f−⋅pf=f_{-}\cdot p and g=g−⋅q.g=g_{-}\cdot q. We can then simplify the first term by using H(m−1,n)H(m-1,n) and the second using H(m,n−1)H(m,n-1) to obtain

with Fs:=(f,S(x)a,s)F_{s}:=\left(f,S\left(x\right)_{a,s}\right) and Gs:=(g,S(x)a,s).G_{s}:=\left(g,S\left(x\right)_{a,s}\right). Integration-by-parts then yields the desired conclusion

Given a basis {fi}i=1d\{f_{i}\}_{i=1}^{d} for V∗V^{*} we could also define the shuffle product directly on T(V∗)T(V^{*}) by letting I=(i1,...in)I=(i_{1},...i_{n}) and J=(in+1,...in+m)J=(i_{n+1},...i_{n+m}) be arbitrary multi-indices in {i,...,d}\{i,...,d\} and then, recalling Notation 1.1.15, by defining

The summation is over all (n,m)(n,m)-shuffles ; that is over the subset of the permutations of the {1,...,n+m}\{1,...,n+m\} which satisfy σ(1)<...<σ(n)\sigma(1)<...<\sigma(n) and σ(n+1)<...<σ(n+m)\sigma(n+1)<...<\sigma(n+m). It can be verified that this defines an element of T(V∗)T(V^{*}) in a way that does not depend on the choice of basis. The resulting definition coincides with Definition 1.3.9.

If we work with a particular basis {ei}i=1d\{e_{i}\}_{i=1}^{d} of VV, then the shuffle product identity for the ST can be expressed more tersely in terms coordinate iterated integrals by

This expression holds for any pair of multi-indices II and JJ; the term S(x)[a,b]I\shuffleJS(x)^{I\shuffle J}_{[a,b]} is defined to be (eI∗\shuffleeJ∗,S(x)[a,b])(e_{I}^{*}\shuffle e_{J}^{*},S(x)_{[a,b]}).

We elucidate this definition with an example.

Let {ei}i=1d\{e_{i}\}_{i=1}^{d} be a basis of VV and let its dual basis be denoted by {ei∗}i=1d\{e_{i}^{*}\}_{i=1}^{d}. Suppose that ei∗ej∗e_{i}^{*}e_{j}^{*} and ek∗e_{k}^{*} are elements of (V∗)⊗2(V^{*})^{\otimes 2} and V∗V^{*} respectively, then

This expression can be rewritten as the sum of three third-order iterated integrals by ”shuffling” the integrands

Note that the tuples (i,j,k),(i,k,j),(k,i,j)(i,j,k),(i,k,j),(k,i,j) indexing the dual basis elements appearing in this expansion are obtained by shuffling (i,j)(i,j) and (k)(k) while retaining the order of the indices within each tuple, thus explains the nomenclature of the shuffle product.

The shuffle property can be used to prove the following useful lemma.

Let 1≤p<21\leq p<2 and suppose h1,..,hnh_{1},..,h_{n} is a finite collection of distinct elements of Sp⊂T((V)).\mathcal{S}_{p}\subset T\left(\left(V\right)\right). Then there exists a linear functional ff in T((V))∗T\left(\left(V\right)\right)^{\ast} such that f(h1)=1f\left(h_{1}\right)=1 and f(hi)=0f\left(h_{i}\right)=0 for all i=2,...,n.i=2,...,n.

An important consequence of this is the following result.

Suppose 1≤p<21\leq p<2. Any finite set of distinct elements {h1,..,hn}⊂Sp\left\{h_{1},..,h_{n}\right\}\subset\mathcal{S}_{p} is a linearly independent subset of T((V)).T\left(\left(V\right)\right).

Suppose that h=∑i=1nλihi=0h=\sum_{i=1}^{n}\lambda_{i}h_{i}=0 in T((V))T\left(\left(V\right)\right) and assume that λj\lambda_{j} is non-zero for some jj. By relabelling the hi h_{i}\,s if necessary we can assume that λ1≠0.\lambda_{1}\neq 0. Then, letting ff be the linear functional in Lemma 1.3.13, we arrive at the contradiction 0=f(h)=λ1.0=f\left(h\right)=\lambda_{1}. It follows that λi=0\lambda_{i}=0 for every i=1,..,n.i=1,..,n. ∎

As an immediate corollary we can obtain that any discrete Sp\mathcal{S}_{p}-valued random variable is uniquely characterised by its expected value.

Let GG be another random variable with law ν=∑j=1mqjδgj\nu=\sum_{j=1}^{m}q_{j}\delta_{g_{j}} supported on distinct g1,...,gmg_{1},...,g_{m} in Sp.\mathcal{S}_{p}. By Proposition 1.3.14 we see that ∑i=1npihi=∑j=1mqjgj\sum_{i=1}^{n}p_{i}h_{i}=\sum_{j=1}^{m}q_{j}g_{j} if and only if both n=mn=m and the sets

4 Unparameterised paths

We have seen in Lemma 1.2.1 that the ST of a path xx is invariant under reparameterisation. It is also immediate from its definition that when xx is translated by any constant path its signature will be unchanged. Nothing is lost therefore by only considering signatures of paths in C0,p(V)C_{0,p}(V), the subspace of Cp(V)C_{p}(V) consisting of paths which start at the zero vector 0∈V0\in V, and we will do this throuhgout this section. A special role will be played by oo, the path that is constantly zero o≡0o\equiv 0.

The notion of ST allows us define a relation on C0,p(V)C_{0,p}(V) by declaring two paths to be related if they have the same signature. It is easily proved that this is an equivalence relation which we will denote by ∼\sim. We denote the equivalence class containing a path xx by [x][x]. A natural question prompted by this discussion is: what elements does [x][x] contain? We know already that distinct paths can have equal signatures; using Lemma 1.2.1 any reparameterisation of xx will have the same signature as xx but will, in general, be distinct from xx as an element of Cp(V)C_{p}(V). It can happen however that two paths share the same signature while not being re-parameterisations of one another in the strict sense of Lemma 1.2.1. For example, if x≠ox\neq o we have that x∗x←≠ox*\overleftarrow{x}\neq o, while from Lemma 1.3.7 we have

More generally, by Chen’s identity any path which contains segments that exactly retrace themselves will have the same signature as the path obtained by excising both of those segments. We note also that, again in view of Lemma 1.3.7, ∼\sim could also be defined by saying that x∼yx\sim y if

which, when it holds, also means that S(y∗x←)=1S(y*\overleftarrow{x})=\mathbf{1}. Elements of the equivalence class [o][o] are called tree-like paths.

It turns out that ∼\sim-equivalence coincides with an ostensibly-unconnected equivalence relation called tree-like equivalence. This latter notion makes no direct reference to the ST and is formulated purely in term of the properties of the path. Nonetheless the two notions are the same and can be viewed as a general notion of reparameterisation which simultaneously captures both the classical concept of Lemma 1.2.1 and the idea of excising retracings expressed in the example (1.29). We will not use the notion of tree-like equivalence in what follows; the key result is the following and the interested reader can consult the references given.

Let 1≤p<21\leq p<2, then tree-like equivalence defines an equivalence relation on C0,p(V)C_{0,p}(V). It coincides with the equivalence relation ∼\sim defined by the equality of signatures. In the case p=1p=1, there exists an element of each tree-like equivalence class [x][x] which has minimal length. This element in unique up to parameterisation and is called the tree-reduced representative of [x][x].

We now introduce the space of unparameterised paths.

Suppose 1≤p<21\leq p<2. We define the space of pp-unparameterised paths, denoted by Cp\mathcal{C}_{p}, to be the quotient space

There is a natural group structure on the space of unparameterised paths.

Suppose 1≤p<21\leq p<2. The concatenation operation ∗* on Cp(V)C_{p}(V) induces a well defined binary operation on Cp\mathcal{C}_{p} by [x]∗[y]=[x∗y][x]*[y]=[x*y]. Moreover (Cp,∗)(\mathcal{C}_{p},*) is a group in which the identity element is [o][o] and where [x←][\overleftarrow{x}] is the well-defined inverse of [x][x].

That ∗* is well defined on Cp\mathcal{C}_{p} amounts to showing that [x∗y]=[x′∗y′][x*y]=[x^{\prime}*y^{\prime}] for any x′∈[x]x^{\prime}\in[x] and y′∈[y]y^{\prime}\in[y] and this is a direct consequence of Chen’s relations, Lemma 1.3.1. The group axioms can be verified similarly using properties of the tensor product, and the final assertion about the inverse is obtained from Lemma 1.3.7. ∎

We will be interested to use the ST representation of a path to learn functions on path space. An immediate obstacle to implementing this idea is that the ST cannot distinguish between different paths in the same tree-like equivalence class. This compels us to work for the moment on functions defined on unparameterised path space.

Suppose that XX is a set and let 1≤p<21\leq p<2. We use XCpX^{\mathcal{C}_{p}} to denote the set of functions from Cp\mathcal{C}_{p} into X.X.

One way to obtain functions in XCpX^{\mathcal{C}_{p}} is to study the subset of functions on the original space C0,p(V)C_{0,p}(V) which are invariant under tree-like equivalence. Fortunately there is an abundance of such functions; the examples covered by the results below describe an immediately-useful collection of them.

The following fundamental result underpins the conceptual framework of using the signature features to approximate continuous functions on unparameterised paths.

Let 1≤p<21\leq p<2 and suppose that χ\chi is a collection of subsets which form a topology on Cp\mathcal{C}_{p}. Assume that KK is a compact subspace of Cp\mathcal{C}_{p} and, for f∈T((V))∗f\in T((V))^{*}, let Φf∣K\Phi_{f}|_{K} denote the restriction of the function (1.31) to KK. Let C(K)C(K) denote the space of continuous functions on KK with the topology of uniform convergence. If the set AK:={Φf∣K:f∈T((V))∗}\mathcal{A}_{K}:=\{\Phi_{f}|_{K}:f\in T((V))^{*}\} is a subset of C(K)C(K), then it is a dense subset.

By using an identical argument as in the proof of Lemma 1.4.6, it is easily seen that A∣K\mathcal{A}|_{K} is a subalgebra of C(K)C(K) which separates points and contains the constant functions. That A∣K\mathcal{A}|_{K} is dense then follows from the Stone-Weierstrass Theorem. ∎

Versions of the Stone-Weierstrass Theorem hold under weaker assumptions on KK. For example, if KK is only assumed to be locally compact then the same reasoning allows one to prove that A∣K\mathcal{A}|_{K} is dense in the uniform topology in the space of continuous functions which vanish at infinity.

We return to the motivating example which which we started this chapter, namely the controlled differential equation (1.2)

in which recall that WW is a finite-dimensional vector space and f:V→T(W)f:V\rightarrow\mathcal{T}\left(W\right) is a linear map into the space of smooth vector fields on WW. In the context of our present discussion it is relevant to ask whether the function which maps xx to the solution of the CDE at t=bt=b,

descends to a function from Cp\mathcal{C}_{p} into WW. This amounts to showing that the function (1.33) is constant on on every equivalence class of ∼τ\sim_{\tau}.

where ∣∣⋅∣∣\left|\left|\cdot\right|\right| denotes the operator norm and I:W→WI:W\to W is the identity function on W.W. Then one can easily show by induction that

Condition (1.34) together with the estimate of Lemma 1.15 ensures that

By taking the limit as N→∞N\to\infty we have that yby_{b} is the convergent series

and therefore in particular the map x↦ybx\mapsto y_{b} will be constant on every set [x][x].

4.2 Topology on unparameterised paths

To use Theorem 1.4.7 we need to make a choice a topology on Cp\mathcal{C}_{p}. There is no canonical way to do this – we must choose one which is suited to the task at hand – and different choices will present different classes of continuous functions and of compact subspaces. In the next chapter on signature kernels we will see a situation where a choice of topology is suggested by the application but, for the moment, we work with a minimal selection which reflects the fact that Theorem 1.4.7 requires that all the functions in the class A\mathcal{A} must all be continuous.

The product topology on T((V)):=∏i=0∞V⊗iT((V)):=\prod_{i=0}^{\infty}V^{\otimes i} is the weakest topology (i.e. the one having fewest open sets) such that all the canonical projections πk:T((V))↦V⊗k\pi_{k}:T((V))\mapsto V^{\otimes k} are continuous. This then induces a topology on Cp\mathcal{C}_{p} by equipping Sp\mathcal{S}_{p} with the subspace topology of the product topology on T((V))T((V)), and then by requiring that signature is a topological embedding when viewed as a map from Cp\mathcal{C}_{p} onto Sp{S}_{p}. With a mild abuse of terminology, we will refer to this as the product topology on Cp\mathcal{C}_{p} and use the notation χpr\chi_{{}_{\text{pr}}} to refer to the collection of open subsets it defines.

The continuity of the canonical projections defining the product topology immediately gives that linear functional on T((V))T((V)) induces a continuous function on Cp\mathcal{C}_{p}.

With respect to a dual basis we can write any f∈T((V))∗f\in T((V))^{*} as a sum f=∑IaIeI∗f=\sum_{I}a_{I}e_{I}^{*} in which all but finitely many of the aIa_{I} are zero. It then follows that

(Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) is a Hausdorff space.

This follows at once from the fact that the functions in A\mathcal{A} separate points in Cp\mathcal{C}_{p} and are continuous with respect to (Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) ∎

The following lemma captures some further basic facts about this product topology.

The topological space (Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) is both separable and metrisable.

We need to prove that Sp\mathcal{S}_{p}, endowed with the subspace topology in ∏i=0∞V⊗i\prod_{i=0}^{\infty}V^{\otimes i}, has these properties. Recall that a Polish space is a topological space that is separable and completely metrisable. Then the fact that the product of a countable collection of Polish spaces is itself a Polish space (with the product topology) shows that ∏i=0∞V⊗i\prod_{i=0}^{\infty}V^{\otimes i} is Polish. That any subspace of a Polish space is also separable and metrisable allows us to conclude the argument. ∎

Convergence of a sequence ([xn])n=1∞([x_{n}])_{n=1}^{\infty} in (Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) is characterised by pointwise convergence of the terms in the ST, i.e. [xn]→[x][x_{n}]\rightarrow[x] as n→∞n\rightarrow\infty if and only if

This choice of topology also ensures that the group operations on unparameterised path sapce are continuous.

The space (Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) with the operations [γ]⋅[σ]:=[γ∗σ]\left[\gamma\right]\cdot\left[\sigma\right]:=\left[\gamma\ast\sigma\right] and [γ]−1:=[γ←]\left[\gamma\right]^{-1}:=\left[\overleftarrow{\gamma}\right] is a topological group.

We provide a proof from first principles. First for [⋅]−1\left[\cdot\right]^{-1}, we define a map on T1((V))={a∈T((V)):a0=1}T_{1}((V))=\{a\in T((V)):a_{0}=1\} by:

which has the property that (ψ∘S)(x)=S(x←)(\psi\circ S)(x)=S(\overleftarrow{x}) allowing us to write

where S−1S^{-1} denote the inverse of the signature when regarded as function from Cp\mathcal{C}_{p} onto Cp\mathcal{C}_{p}. The definition of the product topology ensures that S\mathcal{S} and S−1S^{-1} are both continuous. It therefore suffices to show continuity of ψ\psi on T1((V))T_{1}((V)) again in the subspace topology with respect to T((V))T((V)) and, by definition of the product topology, the amounts to show continuity of the projection onto each V⊗nV^{\otimes n} of ψ\psi. It is not difficult to see that if a=(1,a1,a2,...)a=(1,a_{1},a_{2},...) then (πn∘ψ)(a)(\pi_{n}\circ\psi)(a) depends only on a1,....ana_{1},....a_{n}, indeed we have the explicit formula

4.3 Compact sets in the product topology

To work with Theorem 1.4.7 it is important to have an understanding of the compact subsets of Cp\mathcal{C}_{p} in the chosen topology. To describe particular examples of such sets in the case p=1p=1, we recall from Theorem 1.4.1 that each equivalence class [x][x] contains a tree-reduced representative of minimal length. This tree-reduced path is unique up to reparametisation; we will make frequent use of the its constant-speed parameterisation and so we adopt a notation to refer to it.

We use x∗x^{*} to denote the tree-reduced representative of the equivalence class [x][x], which is parameterised at constant speed.

We note that x∗x^{*} will be Lipschitz continuous with Lipschitz norm bounded by the tree-reduced length of xx; see Remark 1.2.2. We now define the subset B(r)⊂C1B(r)\subset\mathcal{C}_{1} to be the set of unparameterised paths for which the tree-reduced length is bounded by the prescribed potive real number rr. That these sets are compact subspaces of (Cp,χpr)(\mathcal{C}_{p},\chi_{{}_{\text{pr}}}) is the context of the next result.

Let pp be in [1,2)[1,2) and r>0r>0. Then the set B(r)B\left(r\right) is a compact subspace of (Cp,χpr)(\mathcal{C}_{p},\chi_{\text{pr}}).

We have seen in Lemma 1.4.13 that the product topology is metrisable and it therefore suffices to prove that B(r)B(r) is sequentially compact. Let ([xn])n=1∞\left(\left[x_{n}\right]\right)_{n=1}^{\infty} be a sequence in B(r)B\left(r\right) then the sequence (xn∗)n=1∞\left(x_{n}^{\ast}\right)_{n=1}^{\infty} of tree-reduced representatives satisfies

and this collection of paths is therefore equicontinuous. The Arzela-Ascoli theorem gives that there exists a uniformly convergent subsequence of (xn∗)n=1∞\left(x_{n}^{\ast}\right)_{n=1}^{\infty} which we again call (xn∗)n=1∞\left(x_{n}^{\ast}\right)_{n=1}^{\infty} for convenience.

We denote this uniform limit by xx and observe, by using (1.36), that ∣∣x∣∣1≤r\left|\left|x\right|\right|_{1}\leq r so that ∣∣x∗∣∣1≤r\left|\left|x^{\ast}\right|\right|_{1}\leq r, and therefore [x]\left[x\right] is in B(r).B\left(r\right). Let 1<q<2,1<q<2, then a standard inequality interpolating between 1−1- and q−q- variation norms gives that

This allows us to deduce that conclude that (xn∗)n=1∞\left(x_{n}^{\ast}\right)_{n=1}^{\infty} is a Cauchy sequence and thus convergent to xx in qq-variation. For each mm the map

is continuous. It thus holds that Sm(xn∗)→Sm(x)S_{m}\left(x_{n}^{\ast}\right)\rightarrow S_{m}\left(x\right) as n→∞n\rightarrow\infty and hence [xn]→[x]\left[x_{n}\right]\rightarrow\left[x\right] in B(r)B\left(r\right) as n→∞n\rightarrow\infty in the product topology. ∎

The space (C1,χpr)(\mathcal{C}_{1},\chi_{\text{pr}}) is σ\sigma-compact.

This is immediate from the previous proposition and the fact that C1=∪r=1∞B(r)\mathcal{C}_{1}=\cup_{r=1}^{\infty}B(r). The latter being the case since, in view of Theorem 1.4.1, we know that every continuous and finite length path has a tree-reduced representative (which trivially must also have finite length). ∎

With the understanding developed through the previous results, we now revisit the setting of Example 1.4.9 and investigate whether the family of controlled differential equations, presented there as functions on C1\mathcal{C}_{1}, are continuous on the sets B(r)B(r).

Suppose that WW is a finite-dimensional vector space. Let f:V→T(W)f:V\rightarrow\mathcal{T}\left(W\right) be a linear map which satisfies the conditions described in Example 1.4.9. There we considered the map x↦ybx\mapsto y_{b}, showing that

To prove continuity on B(r)B\left(r\right) we take a sequence [xn]→[x]\left[x_{n}\right]\rightarrow\left[x\right] in B(r)B\left(r\right), and then making the dependence of yy on [x][x] explicit by writing y([x])y([x]), we note that for any N≥1N\geq 1 the above estimates easily yield that

By letting n→∞n\rightarrow\infty and then N→∞N\rightarrow\infty in this estimate we establish the convergence of y([xn])y([x_{n}]) to y([x])y([x]) as n→∞n\to\infty.

The following lemma provides a class of examples of tree-reduced paths.

For v1,v2,...,vm∈Vv_{1},v_{2},...,v_{m}\in V, let xvix_{v_{i}} denote the linear path in C1C_{1} whose derivative xvi′≡vx^{\prime}_{v_{i}}\equiv v on $.Let. Letx:\left[0,1\right]\rightarrow VininC_{1}bethepiecewiselinearpathobtainedbyconcatenatingtheselinearpiecesbe the piecewise linear path obtained by concatenating these linear pieces\gamma=\gamma_{v_{1}}*\gamma_{v_{2}}*\dots*\gamma_{v_{m}}.Assumefurtherthatforeveryconsecutivepairofvectors. Assume further that for every consecutive pair of vectors\left\langle v_{i},v_{i+1}\right\rangle=0forfori=1,\dots,m-1.Then. Then\gamma$ is tree reduced.

The following construction can be found in . It illustrates how the class of paths considered in the previous lemma can be used to construct a sequence of pairs of distinct paths whose signatures agree up to some level; the details are worked through in Exercise 1.6.11. The example can be used to exhibit a feature of the product topology.

See Figure 1.2 below for visualisations of the first two pairs of paths in this sequence. If two consecutive line segments viv_{i} and vi+1v_{i+1} are positively co-linear, then by replacing γvi∗γvi+1\gamma_{v_{i}}*\gamma_{v_{i+1}} with γvi+vi+1\gamma_{v_{i}+v_{i+1}}, we may write each path in the form required for Lemma 1.4.19. By this same Lemma, each of these paths is tree-reduced. For every nn, the paths ρn\rho_{n} and σn\sigma_{n} have length 2n2^{n} and it was further shown in that the terms in their STs coincide up to degree nn, i.e.

Moreover, it can be shown that Sn+1(ρn)S_{n+1}(\rho_{n}) and Sn+1(σn)S_{n+1}(\sigma_{n}) are not equal for any nn. Consequently, each tree-reduced path Γn:=σn∗ρ←n\Gamma_{n}:=\sigma_{n}*\overleftarrow{\rho}_{n} has length 2n+12^{n+1} and satisfies

We can use this construction to prove the following property of the product topology, which we will later use.

The function d([x])=∣∣x∗∣∣d([x])=||x^{*}|| is unbounded on every non-empty open set in (C1,χpr)(\mathcal{C}_{1},\chi_{\text{pr}})

4.4 Probability on unparameterised paths

A natural next step is to develop tools for studying probability measures on the measurable space (Cp,B(Cp))(\mathcal{C}_{p},\mathcal{B}(\mathcal{C}_{p})) which is obtained from the Borel σ\sigma-algebra of the topology τpr\tau_{\text{pr}}. We first gather some fundamental facts from elementary topology. Recall that a Polish space is a separable topological space that is completely metrisable, while a Lusin space is topological space that is homeomorphic to closed subset of a compact metric space. Every Polish space is a Lusin space, and every subspace of Lusin space is a Lusin space if and only if it is a Borel set. We have the following.

The space (C1,τpr)(\mathcal{C}_{1},\tau_{\text{pr}}) is a Lusin space.

Any Borel subset of a Polish space is a Lusin space, and so noting that the space X=∏i=0∞V⊗iX=\prod_{i=0}^{\infty}V^{\otimes i} is a Polish space, as we have already seen in the proof of Lemma 1.4.13, we aim to show that S\mathcal{S} is a Borel subset of XX. The inclusion map ι:S→X\iota:\mathcal{S}\to X is continuous and hence the sets B(r)B(r) from Proposition 1.4.16 are also compact subsets of XX. They are therefore closed in XX and hence also Borel subsets of XX. Thus S\mathcal{S} being a countable union of Borel subsets is itself a Borel subset. ∎

Assuming (at least) that XX is a Lusin space, we will use P(X)\mathcal{P}(X) to denote the space of probability measures on (X,B(X))(X,\mathcal{B}(X)). A widely-used topology on P(X)\mathcal{P}(X) is the topology of weak convergence, and we recall it definition here. As preparation we introduce Cb(X)C_{b}(X) denote the set of continuous, bounded real-valued function on XX and use the notation μ(f)\mu(f) to denote the integral

Suppose that ν\nu is in P(X)\mathcal{P}(X). We define a topology on P(X)\mathcal{P}(X) by letting a neighbourhood base of the point ν\nu consist of set of the form

It is an important fact that for every Lusin space XX, the topology of weak convergence on P(X)\mathcal{P}(X) is metrisable. This means that we can characterise the topology of weak convergence using sequences where (μn)n=1∞(\mu_{n})_{n=1}^{\infty} converges to μ\mu if μn(f)→μ(f)\mu_{n}(f)\rightarrow\mu(f) as n→∞n\rightarrow\infty for every f∈Cb(X)f\in C_{b}(X). As is usual in this case, we write μn⇒μ\mu_{n}\Rightarrow\mu as n→∞n\rightarrow\infty. The following result, known as Prohorov’s Theorem, describes a sufficient condition for a subset of probability measure to be relatively compact in the the topology of weak convergence. When the underlying space XX is a Polish space, then this condition is also necessary.

Suppose XX is a Lusin space. Then a subset HH of P(X)\mathcal{P}(X) is relatively compact in the topology of weak convergence if HH is tight in the sense that for any ϵ>0\epsilon>0 there exists compact subset KK of XX such that μ(Kc)<ϵ\mu(K^{c})<\epsilon for all μ\mu in HH.

From the point of view of these results, it would desirable for the property of Polishness to hold in the case X=CpX=\mathcal{C}_{p}. This fails however for the product topology as the following result shows. In fact we show more, namely that for p=1p=1 the topological space (C1,τpr)(\mathcal{C}_{1},\tau_{\text{pr}}) is not a Baire space. We recall this means that any countable union of closed sets with empty interior itself has empty interior. Any (pseudo-)metrisable space is a Baire space, and in particular any Polish space is a Baire space. The proof we give here relies on the Lyons-Xu construction discussed in Example 1.4.21, which the reader may wish to re-read before diving into the details.

The topological space (C1,τpr)(\mathcal{C}_{1},\tau_{\text{pr}}) is not a Baire space and so not completely metrisable. In particular, it is not a Polish space.

Proposition 1.4.16 gives us that C1=⋃r=1∞B(r)\mathcal{C}_{1}=\bigcup_{r=1}^{\infty}B(r) where B(r)B(r) is the compact subspace of χpr\chi_{\text{pr}}. As (C1,τpr)(\mathcal{C}_{1},\tau_{\text{pr}}) is a Hausdorff space, these sets must also be closed. By definition, each element of B(r)B(r) has tree-reduced length bounded by rr, and, by Proposition 1.4.22, B(r)B(r) cannot therefore contain any non-trivial open subset. It follows that C1\mathcal{C}_{1} is the countable union of closed sets each having empty interior and thus is not a Baire space. ∎

One might ask whether by selecting a different induced topology more desirable properties could be arrived at. The following lemma shows that this is not the case; the conclusion remains stable across a generally class of metrisable topologies induced via embedding S\mathcal{S} as a subspace of T((V))T((V)).

Assume that E⊂T((V))E\subset T((V)) and that τ\tau defines a metrisable topology on EE. Suppose that there exists pp in (1,2)(1,2) such that Sp⊂E\mathcal{S}_{p}\subset E and such that S:Cp→ES:C_{p}\to E is continuous. Let χ\chi denote the induced topology on C1\mathcal{C}_{1} defined as the unique topology which makes S:C1→SS:\mathcal{C}_{1}\rightarrow\mathcal{S} a homeomorphism when S\mathcal{S} is given the subspace topology of τ\tau. Then (C1,χ)(\mathcal{C}_{1},\chi) is σ−\sigma-compact but is not a Baire space, and so is neither a Polish space nor a locally compact space.

The same arguments found in Proposition 1.4.16 show the sets B(r)B(r) are compact in χ\chi. We can show again that every χ\chi-open set must contain unparameterised paths of arbitrarily large tree-reduced length. This again shows that they have empty interior in χ\chi and the remaining conclusion settled as above. ∎

5 Learning with the signature transform

Suppose the law of Γ\Gamma is given by a Borel probability measure on S\mathcal{S} and is denoted by μ.\mu. Then, as we will see in Corollary 1.5.1, by a version of Lusin’s Theorem , the function ff in (1.37) is almost continuous in the sense that for any δ>0\delta>0 there exists a compact set K=KδK=K_{\delta} such that μ(S∖K)<δ\mu\left(\mathcal{S}\setminus K\right)<\delta and such that ff is continuous on K.K. By Theorem 1.4.7, it is then reasonable to adopt the model

Consider the setup as in Proposition 1.4.9, and let μ\mu be a Borel probability measure on (C1,χpr)(\mathcal{C}_{1},\chi_{{}_{\text{pr}}}). Then, for every δ>0\delta>0, there is a compact set K⊂C1K\subset\mathcal{C}_{1} such that μ(C1∖K)<δ\mu(\mathcal{C}_{1}\setminus K)<\delta and the function [x]↦yb[x]\mapsto y_{b} is continuous on KK.

Since C1\mathcal{C}_{1} is σ−\sigma-compact with respect to χpr\chi_{{}_{\text{pr}}}, μ\mu is tight. Separability of (C1,χpr)(\mathcal{C}_{1},\chi_{{}_{\text{pr}}}) and [5, Proposition 7.2.2] then imply μ\mu is a Radon measure. Measurability of Ψy0,f\Psi_{y_{0},f} and Lusin’s Theorem for finite Radon measures [5, Theorem 7.1.13] shows the existence of compact sets with the desired property. ∎

The ST method for time series regression consists of minimising the mean squared error

In the overparameterised regime where M>NM>N, the M×MM\times M matrix GG⊤GG^{\top} is never invertible, therefore if a solution exists it is not unique. In the underparameterised regime where M≤NM\leq N, if GG⊤GG^{\top} is invertible the solution ω∗=G(G⊤G)−1y\omega^{*}=G(G^{\top}G)^{-1}y is unique.

which can be solved in an analogous way as the univariate case.

To promote simpler solutions it is typical to add a reguraliser to the mean squared error (1.38), for example in the form of Tikhonov regularisation

for some tuning parameter λ>0\lambda>0, which admits a unique solution ω∗=(GG⊤+λ2IM)−1Gy\omega^{*}=(GG^{\top}+\lambda^{2}I_{M})^{-1}Gy.

The issue of overfitting arises when the model is too complex given the amount of available data, and is typical in the overparameterised regime. One standard way to mitigate the effect of overfitting is to use a L1L^{1} penalty on the weights ω\omega instead of penalising using the L2L^{2} norm. This leads to the LASSO regularisation

Indeed, it can be shown that (1.40) induces a sparse solution with a few nonzero entries (exercise).

If the labels {yi}i=1N\{y_{i}\}_{i=1}^{N} are categorical then the inference task becomes a classification task, which can be addressed by a similar regression approach by simply predicting a vector of likelihoods of belonging to a given class. For example, in a binary classification problem with labels y1,...,yN∈{−1,+1}y_{1},...,y_{N}\in\{-1,+1\} one can consider a logistic loss and minimise the negative log-likelihood

We note that the ST has been used in machine learning in a variety of contexts dealing with time series, well beyond simple linear regression. For example, embed the ST as an autodifferentiable non-linearity within path-preserving layers of a deep neural network.

6 Exercises

Show directly that the right-hand side of (1.3) is independent of the basis chosen.

Show that the Lie bracket satisfies: (anti-symmetry) [g,h]=−[h,g]\left[g,h\right]=-[h,g] and (Jacobi’s identity) [g,[h,k]]+[k,[g,h]]+[h,[k,g]]=0.\left[g,\left[h,k\right]\right]+\left[k,\left[g,h\right]\right]+\left[h,\left[k,g\right]\right]=0.

Show that any two vector spaces S,TS,T which satisfy the property in Definition 1.1.8 must be isomorphic, and so that Definition 1.1.8 characterises S⊗TS\otimes T up to isomorphism.

Assume that {sa:a∈A}\{s_{a}:a\in A\} and {tb:b∈B}\{t_{b}:b\in B\} are bases for SS and TT respectively. Show that {sa⊗tb:a∈A,b∈B}\{s_{a}\otimes t_{b}:a\in A,b\in B\} is a basis for S⊗TS\otimes T.

Let (V,⟨⋅,⋅⟩V)(V,\langle\cdot,\cdot\rangle_{V}) and (W,⟨⋅,⋅⟩W)(W,\langle\cdot,\cdot\rangle_{W}) be two inner product spaces. Show that ⟨a,b⟩V⊗W\left\langle a,b\right\rangle_{V\otimes W} is well defined, independent of the representations of aa and b,b,and check that it is an inner-product. Prove that the norm ∣∣a∣∣V⊗W:=⟨a,a⟩V⊗W1/2\left|\left|a\right|\right|_{V\otimes W}:=\left\langle a,a\right\rangle_{V\otimes W}^{1/2} which is derived from ⟨⋅,⋅⟩V⊗W\left\langle\cdot,\cdot\right\rangle_{V\otimes W} is a cross norm on V⊗WV\otimes W, i.e.

In the setting of Remark 1.2.2, show that xτ≡x∘τx^{\tau}\equiv x\circ\tau is Lipschtiz continuous with

Recall the notation Sp⊂T((V))\mathcal{S}_{p}\subset T((V)) to denote the image of Cp(V)C_{p}(V) under the ST. Prove the strict inclusion Sp⊂Sq\mathcal{S}_{p}\subset\mathcal{S}_{q} for any p<qp<q.

Prove that \shuffle\shuffle is an associative and commutative product on T(V)T(V)

Let 0≤U(1)≤U(2)≤....≤U(n)≤10\leq U_{\left(1\right)}\leq U_{\left(2\right)}\leq....\leq U_{\left(n\right)}\leq 1 be a sample of nn independent, ordered, uniform random variables on $.Provethatthe. Prove that then^{\text{th}}$ level of the ST

where (V(i))i=1n\left(V_{\left(i\right)}\right)_{i=1}^{n} is another independent samples of order statistics from the uniform distribution on $,alsoindependentof, also independent of\left(U_{\left(i\right)}\right)_{i=1}^{n}$.

It can be shown that for all ϵ>0\epsilon>0 and nn

Suppose that v1=ei1,...,vn=einv_{1}=e_{i_{1}},...,v_{n}=e_{i_{n}}. Define the following quantity

Show that CX(i1,...,in)=λ1...λnC_{X}(i_{1},...,i_{n})=\lambda_{1}...\lambda_{n}.

Assume that ej1⊗...⊗ejme_{j_{1}}\otimes...\otimes e_{j_{m}} is the unique, longest, square-free basis element such that CX(j1,...,jm)≠0C_{X}(j_{1},...,j_{m})\neq 0. Show that m=nm=n.

Define two sequences of paths as follows: Y1=(t,0),Z1=(0,t)Y^{1}=(t,0),Z^{1}=(0,t) and for any n≥1n\geq 1

Show that Yn+1Y^{n+1} and Zn+1Z^{n+1} are distinct axis paths.

Prove that the ST of YnY^{n} and ZnZ^{n} coincide up to level nn.

Let Bt=(Bt1,...,Btd)t∈[0,1]B_{t}=\left(B_{t}^{1},...,B_{t}^{d}\right)_{t\in\left[0,1\right]} be a standard d−d-dimensional Brownian motion. Suppose that

is the step-NN TST of Brownian motion using Stratonovich integration (denoted by ∘\circ). Remember the relationship between Ito and Stratonovich integration:

for continuous semimartingales MM and N,N, where [M,N]\left[M,N\right] is their quadratic covariation.

Using the fact that SN(B)0,1/2⊗SN(B)1/2,1=S_{N}\left(B\right)_{0,1/2}\otimes S_{N}\left(B\right)_{1/2,1}= SN(B)0,1S_{N}\left(B\right)_{0,1} prove that the expected ST

Prove that Ak=0A_{k}=0 for all odd kk. (Hint: use the fact that BB and −B-B have the same distribution).

Use part (a) to prove the recurrence relation

for n≤⌊N/2⌋n\leq\left\lfloor N/2\right\rfloor and hence prove that

The expected signature of other Gaussian process can be computed as well; see for details. See also 2.5.6 in the next chapter for a continuation of this exercise.

Let XX be a mm-dimensional Itô diffusion on $withlineardriftanddiffusionfunctionsstartedatwith linear drift and diffusion functions started atX_{0}=xanddrivenbyand driven byn$-dimensional Brownian motion, i.e. with coordinates satisfying the linear Itô SDE

Show that for any t∈t\in and τ∈[0,t]\tau\in[0,t] the process

is a martingale, where Fτ=σ(Xu,u≤τ)\mathcal{F}_{\tau}=\sigma(X_{u},u\leq\tau) denotes the natural filtration generated by the process XX up to time τ\tau. Furthermore, show that

where the ST S(X)S(X) is defined as the solution of the Stratonovich SDE

Show that the process MτM_{\tau} satisfies the following Itô SDE

where ⟨X(i),X(j)⟩τ\langle X^{(i)},X^{(j)}\rangle_{\tau} denotes the quaratic variation of X(i)X^{(i)} and X(j)X^{(j)}.

Show that the drift term of MτM_{\tau} can be written as

and justify why it is equal to for any τ∈[0,t]\tau\in[0,t].

Define the half-shuffle product ≺:T(V∗)×T(V∗)↦T(V∗)\prec:T(V^{*})\times T(V^{*})\mapsto T(V^{*}) by

for any f∈V⊗kf\in V^{\otimes k} and g∈V⊗lg\in V^{\otimes l} of the form f=a⋅f−f=a\cdot f_{-}, where a∈Va\in V. Given this definition, ≺\prec extends uniquely to an algebra product on T(V∗)×T(V∗)T(V^{*})\times T(V^{*}) by linearity.

Define the product area:T(V∗)×T(V∗)→T(V∗)\text{area}:T(V^{*})\times T(V^{*})\to T(V^{*}) as follows

Let f,g,h∈T(V∗)f,g,h\in T(V^{*}) such that ⟨f,e⟩=⟨g,e⟩=⟨h,e⟩=0\langle f,e\rangle=\langle g,e\rangle=\langle h,e\rangle=0. Show that the following three identities hold:

f≺(g≺h)=(f≺g)≺h+(g≺f)≺h.f\prec(g\prec h)=(f\prec g)\prec h+(g\prec f)\prec h.

For any i,j∈{1,...,d}i,j\in\{1,...,d\}, i≠ji\neq j and n≥1n\geq 1, define the following elements of T(V∗)T(V^{*})

and PnP_{n} is the nthn^{th} shifted Legendre polynomial.

[Hint: you may use the fact that shifted Legendre polynomials satisfy the following recursive relation on $$

Repeat the same analysis as in 1.6.15 replacing Legendre polynomials by Chebyshev polynomials.

Suppose x∈Cp([a,b],V)x\in C_{p}([a,b],V) is time-augmented in the sense that there exists a basis for VV such that in one of the coordinates xx is the path [a,b]∋t↦t[a,b]\ni t\mapsto t. Prove that xx must be a tree-reduced path.

Set δ=10−3\delta=10^{-3} and consider the following uniform partition of $$

Write a python function CDE_Picard_solve(γ\gamma, A, n) to solve equation (1.43) numerically using the Picard iteration from the previous question.

Using any publicly available signature python package, run a LASSO regression from scikit-learn, with penalty parameter λ\lambda, from the signature of γi\gamma^{i} truncated at level n=0,1,...,8n=0,1,...,8 to pip^{i} by performing a grid-search over the hyperparameters n,λn,\lambda (or any other you might need) using only the training and test datasets.

Using the calibrated signature linear regression model, report mean-squared-error between the predicted pip^{i} and the true pip^{i} on the validation set.

Chapter 2 Signature kernels

Kernel methods form a well-established class of algorithms that constitute the essential building blocks of several machine learning models such as Support Vector Machines (SVMs) and Gaussian Processes (GPs) in Bayesian inference. These models have been successfully employed in a wide range of applications including bioinformatics , genetics , natural language processing and speech recognition .

The central idea of kernel methods is to transform input data points in a typically low dimensional space to a higher (possibly infinite) dimensional one by means of a nonlinear function which is called a feature map. In many cases the higher dimensional space will be a Hilbert space, allowing a kernel to be defined on pairs of input points by taking the inner product of the images of these two points under the feature map.

The advantage of this approach can be seen in typical non-linear, infinite-dimensional regression or classification tasks. These can sometimes be formulated as optimisation problem expressed only in terms of kernel evaluations at pairs of points in a training set, as we will illustrate in Section 2.4.1. In many situations, the kernel can be efficiently evaluated with no reference to the feature map, a property commonly referred to as kernel trick. This property allows one to benefit from the advantages of working in a higher dimensional feature space without the associated drawbacks.

The selection of an effective kernel will usually be task-dependent problem, and this challenge is exacerbated when the data are sequential. This chapter builds on the fundamentals presented in the previous chapter to lay out the mathematical foundations of signature kernels, a class of kernels tailored for tasks that involve sequential data, and which have received attention in recent years .

for any v=(v1,...,vk),w=(w1,...,wk)v=(v_{1},...,v_{k}),w=(w_{1},...,w_{k}) in V⊗kV^{\otimes k}.

As a first step before introducing the definition of signature kernels, we observe how the linearity of the tensor algebra T(V)=⨁k=0∞V⊗kT(V)=\bigoplus_{k=0}^{\infty}V^{\otimes k} allows us to construct a family of weighted inner products.

for any v=(v0,v1,...),w=(w0,w1,...,)v=(v_{0},v_{1},...),w=(w_{0},w_{1},...,) in T(V)T(V). We will denote by Tϕ((V))T_{\phi}((V)) the Hilbert space obtained by completing T(V)T(V) with respect to ⟨⋅,⋅⟩ϕ\langle\cdot,\cdot\rangle_{\phi}.

We will make use of a topology on these Hilbert spaces and, unless otherwise stated, we will assume that we work with the norm topology.

Recall that S\mathcal{S} denotes the image of C\mathcal{C} by the ST. The following result present a condition on the weighting function ϕ\phi which ensures that S⊂Tϕ((V))\mathcal{S}\subset T_{\phi}((V)).

For any path x∈Cx\in\mathcal{C}, the factorial decay of Proposition 1.2.3 yields

The summability condition guarantees that the series is finite. ∎

1.2 Weighted signature kernels

We first define a weighted signature kernels as ϕ\phi-inner products of a pair of STs.

for any two unparameterised paths [x],[y]∈C[x],[y]\in\mathcal{C}.

To simplify the notation, we will omit reference to equivalence classes and write kϕ(x,y)k_{\phi}\left(x,y\right) instead of kϕ([x],[y])k_{\phi}\left(\left[x\right],\left[y\right]\right). Similarly, in computations it is usually desirable to define signature kernels directly on representative paths rather than equivalence classes. Definition 2.1.3 can be immediately extended to two continuous paths of bounded variation x∈C1([a,b],V)x\in C_{1}([a,b],V) and y∈C1([c,d],V)y\in C_{1}([c,d],V)

The fact that the ϕ\phi- and ϕ+\phi_{+}-signature kernels are well defined follows from the summability condition of Lemma 2.1.2. To show the stated relation we observe that

where the first and last equalities follow from the definitions of kϕk_{\phi} and k∣ϕ∣k_{|\phi|} respectively, the second equality follows from the same arguments as in the proof of Theorem 1.3.5, in the third equality integral and sums can be exchanged thanks to the factorial decay of the terms in the ST, the fourth equality follows from a change of variable, and finally the fifth holds because for any A,B∈V⊗i−1A,B\in V^{\otimes i-1} and a,b∈Va,b\in V one has

The special case where ϕ=ϕ(0)\phi=\phi(0) is constant was treated in . In this case, one has that ϕ+=ϕ\phi_{+}=\phi, hence equation (2.2) reduces to the following integral equation

Moreover, if x,yx,y are differentiable and ϕ≡1\phi\equiv 1 one can differentiate both sides of (2.3) with respect to ss and tt and obtain the following linear hyperbolic PDE

with boundary conditions kx,y(0,t)=kx,y(s,0)=1k^{x,y}(0,t)=k^{x,y}(s,0)=1 for all s,t∈[a,b]s,t\in[a,b].

The PDE (2.4) belongs to a class of hyperbolic PDEs introduced in and known as Goursat problems. The existence and uniqueness of solutions of the PDE (2.4) follow from [61, Theorems 2 & 4]. The integral equation also extends beyond the case of differentiable paths to geometric rough paths, see again and .

It is clear from Equation 2.2 that for general weight functions ϕ\phi, the ϕ\phi-signature kernel kϕ(x,y)k_{\phi}(x,y) will not solve a PDE of the type (2.4). Nonetheless, later in the chapter we will provide several examples of weight functions for which an efficient evaluation is still possible.

1.3 Reproducing signature kernel Hilbert spaces

In functional analysis, a reproducing kernel Hilbert space (RKHS) is abstractly defined as a Hilbert space of functions where all evaluation functionals are continuous. In practice, an RKHS is uniquely associated with a positive semidefinite kernel that ”reproduces” every function in the RKHS, in the sense of equation (2.5) below.

A Hilbert space H\mathcal{H} of functions defined on a set X\mathcal{X} is called reproducing kernel Hilbert space (RKHS) over X\mathcal{X} if, for each x∈Xx\in\mathcal{X}, the point evaluation functional at xx, f↦f(x)f\mapsto f(x), is a continuous linear functional, i.e. there exists a constant Cx≥0C_{x}\geq 0 such that

Given a RKHS H\mathcal{H}, the Riesz representation theorem (e.g. [35, Thm. 5.25]) implies that there exists a unique functional k(x,⋅)k(x,\cdot) in H\mathcal{H} such that

Note that ⟨k(x,⋅),k(y,⋅)⟩H=k(x,⋅)(y)=k(y,⋅)(x)\left\langle k(x,\cdot),k(y,\cdot)\right\rangle_{\mathcal{H}}=k(x,\cdot)(y)=k(y,\cdot)(x) so that the element k(x,⋅)k(x,\cdot) of H\mathcal{H} really is the same as the function k(x,⋅)k(x,\cdot) obtained from the slices of the kernel function.

By virtue of (2.5), the kernel kk is said to have the reproducing property.

We next define kernels with the additional property of being positive semidefinite.

In particular, this property holds for signature kernels as we show in the next lemma.

yields the claimed positive semidefiniteness. ∎

A natural question to ask is whether, for a given kernel kk, there exists a RKHS of functions such that the kernel kk has the reproducing property (2.5). A positive answer is provided by the Moore-Aronszajn theorem.

For functions f=∑i=1mαikϕ(xi,⋅)f=\sum_{i=1}^{m}\alpha_{i}k_{\phi}(x_{i},\cdot) and g=∑j=1nβjkϕ(yj,⋅)g=\sum_{j=1}^{n}\beta_{j}k_{\phi}(y_{j},\cdot) in Hϕ0\mathcal{H}^{0}_{\phi} the expression

defines an inner product on Hϕ0\mathcal{H}^{0}_{\phi}. Equation 2.7 immediately yields the reproducing property on Hϕ0\mathcal{H}^{0}_{\phi}, i.e.

By the Cauchy-Schwarz inequality, for any x∈Cx\in\mathcal{C}

From this discussion we see that we can identify the completion Hϕ\mathcal{H}_{\phi} with the set of functions on C\mathcal{C} which are pointwise limits of a Cauchy sequence in Hϕ0\mathcal{H}^{0}_{\phi}:

The inner product (2.7) can then be extended to the following inner product on Hϕ\mathcal{H}_{\phi}

which allows to conclude that Hϕ\mathcal{H}_{\phi} is complete and is therefore a Hilbert space. It is easily checked that (2.8) holds also for any f∈Hϕf\in\mathcal{H}_{\phi} so that Hϕ\mathcal{H}_{\phi} is a RKHS.

then the linear span of HE0:={kE(x,⋅):x∈C}\mathcal{H}_{E}^{0}:=\left\{k_{E}(x,\cdot):x\in\mathcal{C}\right\} is a dense subspace of HE\mathcal{H}_{E}.

The reproducing property holds, i.e. for every xx and yy in C\mathcal{C}

Let W=span(S)‾W=\overline{\text{span}\left(\mathcal{S}\right)} where the closure is taken in Tϕ((V))T_{\phi}\left(\left(V\right)\right) and let W⊥W^{\perp} be the orthogonal complement of WW in Tϕ((V))T_{\phi}\left(\left(V\right)\right). We first show that W⊥={0}W^{\perp}=\left\{0\right\} is the trivial subspace so that W=Tϕ((V))W=T_{\phi}((V)). To do so, we take u=∑k=0∞uku=\sum_{k=0}^{\infty}u_{k} in W⊥W^{\perp} and then for any xx in C\mathcal{C} observe that the function

therefore it extends uniquely to an isomorphism, from which the assertion follows. ∎

2 Universal and characteristic signature kernels

As we have learnt from the preceding discussion, the choice of kernel will dictate the resulting RKHS; in Example 2.2.5 below we will describe an explicit function which belongs to Hϕ\mathcal{H}_{\phi} for certain choices of ϕ\phi but not others. In other situations we will be interested to understand how well an RKHS can approximate a function in a given class. One important such class is the family of continuous functions on compact sets, and this lead to the following notion of a universal kernel.

This notion is sometimes called cc-universality, see . The following proposition gives an equivalent characterisations of this concept. We again specialise to the case of signature kernels, but the argument can be repurposed to a general setting by making appropriate modifications.

As a preliminary, we will adopt the notation kϕh:=⟨h,S(⋅)⟩ϕk_{\phi}^{h}:=\langle h,S(\cdot)\rangle_{\phi}, for any h∈Tϕ((V))h\in T_{\phi}\left((V)\right).

Let kϕk_{\phi} denote a signature kernel determined by a weight function ϕ\phi such that the conditions of Lemma 2.1.2 hold, and let Hϕ\mathcal{H}_{\phi} be the associated RKHS. Assume that C\mathcal{C} is equipped with a topology for which the ST S:C→Tϕ((V))S:\mathcal{C}\rightarrow T_{\phi}\left((V)\right) is continuous. Then kϕk_{\phi} is universal if and only if for any compact subset K⊂C\mathcal{K}\subset\mathcal{C}, the set

is dense in C(K)C\left(\mathcal{K}\right) for the topology of uniform convergence, wherein kϕh∣Kk_{\phi}^{h}|_{\mathcal{K}} denotes the restriction to K\mathcal{K} of kϕhk_{\phi}^{h}.

That the condition is sufficient to ensure that kϕk_{\phi} is universal is clear from the inclusion S⊂Tϕ((V)).\mathcal{S\subset}T_{\phi}\left((V)\right). To show that it is also necessary we will prove that for any h∈Tϕ((V))h\in T_{\phi}\left((V)\right) the function kϕhk_{\phi}^{h} belongs to the closure of the span of {kϕ(γ,⋅):γ∈K}\left\{k_{\phi}(\gamma,\cdot):\gamma\in\mathcal{K}\right\} in the uniform topology on C(K).C\left(\mathcal{K}\right). To this end, we fix ϵ>0\epsilon>0 and make use of the compactness of K\mathcal{K} to first find a finite collection {γi}i=1n⊂K\left\{\gamma_{i}\right\}_{i=1}^{n}\subset\mathcal{K} such that K\mathcal{K} is covered by the open sets

We note that the openness of UiU_{i} in K\mathcal{K} is guaranteed by the continuity of the ST S:S: C→Tϕ((V))\mathcal{C}\rightarrow T_{\phi}\left(\left(V\right)\right) from which we also have

The compactness of K\mathcal{K} also ensures the existence of a continuous partition of unity {ρi}i=1n\left\{\rho_{i}\right\}_{i=1}^{n} which is subordinate to the cover {U}i=1n.\left\{U\right\}_{i=1}^{n}. This means that each ρi:K→[0,1]\rho_{i}:\mathcal{K\rightarrow}\left[0,1\right] belongs to C(K),C\left(\mathcal{K}\right), is such that suppρi⊂Ui,\rho_{i}\subset U_{i}, and that ∑i=1nρi(γ)=1\sum_{i=1}^{n}\rho_{i}\left(\gamma\right)=1 for all γ\gamma in K \mathcal{K\,}. The universality of kϕk_{\phi} guarantees that we can find gig_{i} in Tϕ((V))T_{\phi}\left((V)\right) for every i=1,...,ni=1,...,n so that

We can then define a function ff in the span of {kϕ(γ,⋅):γ∈K}\left\{k_{\phi}(\gamma,\cdot):\gamma\in\mathcal{K}\right\} by

While for each γ\gamma in UiU_{i} we have the bound

which we can use in (2.12) with (2.10), (2.11) and the estimate ∣kϕ(γi,γ)∣≤K∥S(γi)∥ϕ\left|k_{\phi}(\gamma_{i},\gamma)\right|\leq K\left\|S\left(\gamma_{i}\right)\right\|_{\phi} to obtain

We prove that the class of signature kernels we have considered are universal in the sense defined above.

(Universality of signature kernels) Let kϕk_{\phi} denote a signature kernel determined by a weight function ϕ\phi such that the conditions of Lemma 2.1.2 hold, and let Hϕ\mathcal{H}_{\phi} denote the associated RKHS. Assume that C\mathcal{C} is equipped with a topology with respect to which the ST S:C→Tϕ((V))S:\mathcal{C}\rightarrow T_{\phi}\left((V)\right) is continuous. Then, kϕk_{\phi} is universal in the sense of Definition 2.2.1.

where \shuffleϕ:T(V)×T(V)→T(V)\shuffle_{\phi}:T\left(V\right)\times T\left(V\right)\rightarrow T\left(V\right) is the bilinear map determined by

Note that when ϕ≡1\phi\equiv 1 this is just the usual shuffle product.

From this it follows that {kϕh∣K:h∈Tϕ((V))}\left\{k^{h}_{\phi}|_{\mathcal{K}}:h\in T_{\phi}\left((V)\right)\right\} contains the algebra

We can then conclude by using the Stone-Weierstrass Theorem, since A\mathcal{A} can be seen to contain the constant function kϕ1∣Kk_{\phi}^{\mathbf{1}}|_{\mathcal{K}} and also to separate points in K\mathcal{K}.

There are different ways to choose a topology on C\mathcal{C}. We have seen some discussion of this already in Section 1.4.2; we refer to for a deeper discussion.

Beyond consideration of its universality, an important factor in the selection of an appropriate kernel is the efficiency with which its RKHS can represent functions of interest. In principle functions which can be represented by a single element of Hϕ\mathcal{H}_{\phi} for one choice of ϕ\phi may have a much more complex (and only approximate) representation using RHKS elements for another choice. The following example, which is originally from , gives a concrete illustration of the principle.

There exists a unique solution y=(yi,j)i,j=1,...,Ny=\left(y^{i,j}\right)_{i,j=1,...,N} in MN\mathcal{M}_{N} to the CDE

where ⋅\cdot denotes matrix multiplication and INI_{N} is the identity matrix in MN\mathcal{M}_{N}. The real-valued function defined by

where S(∘B)0,1S\left(\circ B\right)_{0,1} denotes the Stratonovich ST of dd-dimensional standard Brownian motion. Using the Fawcett-Lyons-Victoir formula (see Exercise 1.6.12) we have that

which is easily verified to be in Tϕ((V))T_{\phi}\left((V)\right) and hence Ψ\Psi is in Hϕ\mathcal{H}_{\phi}.

where πn:T((V))↦V⊗n\pi_{n}:T((V))\mapsto V^{\otimes n} is the canonical projection. This would imply that

2.2 Characteristic kernels

Another important property that a kernel can possess is that of being characteristic. Loosely speaking, a kernel kk is said characteristic to a topological space if for any (Borel) probability measure μ\mu on that space, the μ\mu-expectation of the feature map k(x,⋅)k(x,\cdot) uniquely characterises μ\mu, i.e it distinguishes the measure from any other measure. In what follows we make this statement rigorous for signature kernels.

Throughout this section we will assume that that ϕ\phi is a weight function satisfying the conditions of Lemma 2.1.2 and that C\mathcal{C} is equipped with a topology with respect to which the ST S:C→Tϕ((V))S:\mathcal{C}\rightarrow T_{\phi}\left((V)\right) is continuous. We denote by P(K)\mathcal{P}(\mathcal{K}) the set of Borel probability measures on a compact set K⊂C\mathcal{K}\subset\mathcal{C}, which by the Riesz representation theorem is the dual space of C(K)C(\mathcal{K}). Unless stated otherwise, we endow P(K)\mathcal{P}(\mathcal{K}) with the topology of weak convergence. Because any continuous function on a compact set is also bounded, for any measure μ∈P(K)\mu\in\mathcal{P}(\mathcal{K}) the following condition holds

To define what we mean by characteristic kernel, it is convenient to introduce the notion of kernel mean embedding (KME).

The ϕ\phi-signature kernel mean embedding (KME) is the function Mϕ:P(K)→HϕM^{\phi}:\mathcal{P}(\mathcal{K})\to\mathcal{H}_{\phi} that maps a Borel probability measure μ∈P(K)\mu\in\mathcal{P}(\mathcal{K}) to the element

which is well-defined as a Bochner integral since the condition (2.13) holds. We say that the ϕ\phi-signature kernel kϕk_{\phi} is characteristic to the compact set K\mathcal{K} if the map MϕM^{\phi} is injective on P(K)\mathcal{P}(\mathcal{K}).

An important result from the theory of kernels relates to the equivalence between the notions of universality, characteristicness and strict positive-definiteness of a kernel. In fact, these three notions can be shown to be equivalent for kernels defined over general locally convex topological vector spaces [88, Theorem 6]. In the following result we consider the simplified setting of compact sets of unparameterised paths.

[88, Simplified version of Theorem 6] The following three statements are equivalent:

kϕk_{\phi} is characteristic to P(K)\mathcal{P}(\mathcal{K}).

kϕk_{\phi} is strictly positive definite on K\mathcal{K}.

We note that the previous result holds under the assumption that the RKHS Hϕ∣K↪C(K)\mathcal{H}_{\phi}|_{\mathcal{K}}\hookrightarrow C(\mathcal{K}) is continuously embedded in C(K)C(\mathcal{K}), i.e. that Hϕ∣K⊂C(K)\mathcal{H}_{\phi}|_{\mathcal{K}}\subset C(\mathcal{K}) and that the topology of Hϕ∣K\mathcal{H}_{\phi}|_{\mathcal{K}} is stronger than the topology induced by C(K)C(\mathcal{K}). The reader is invited to show this statement in 2.5.5.

The RKHS distance between two KMEs yields a semi-metric on measures, often called the maximum mean discrepancy (MMD), which has found numerous applications in machine learning and nonparametric testing and that we introduce next.

For any two Borel probability measures μ,ν∈P(K)\mu,\nu\in\mathcal{P}(\mathcal{K}), the maximum mean discrepancy (MMD) is defined as

where F\mathcal{F} is the unit ball in Hϕ\mathcal{H}_{\phi}

It is possible to show (see 2.5.7) that, under appropriate assumptions, the MMD in equation (2.15) admits the following equivalent expression

Thus, the squared MMD admits the following expression

where x′,y′x^{\prime},y^{\prime} are independent copy of x,yx,y with distribution μ,ν\mu,\nu, respectively.

Consequently, given mm sample paths {xi}i=1m∼μ\{x^{i}\}_{i=1}^{m}\sim\mu and nn sample paths {yj}j=1n∼ν\{y^{j}\}_{j=1}^{n}\sim\nu, an unbiased estimator of the MMD is given by the following expression

For any Borel probability measures μ,ν∈P(K)\mu,\nu\in\mathcal{P}(\mathcal{K}) the following holds

(Adapted from ) Clearly, if μ=ν\mu=\nu then dϕ(μ,ν)=0d_{\phi}(\mu,\nu)=0. By Theorem 2.2.3, the ϕ\phi signature kernel kϕk_{\phi} is universal, hence for any ϵ>0\epsilon>0 and f∈C(K)f\in C(\mathcal{K}) there exists g∈Hϕg\in\mathcal{H}_{\phi} such that sup⁡x∈K∣f(x)−g(x)∣<ϵ.\sup_{x\in\mathcal{K}}|f(x)-g(x)|<\epsilon. By the triangle inequality

because by assumption dϕ(μ,ν)=0d_{\phi}(\mu,\nu)=0, therefore Mμϕ=MνϕM^{\phi}_{\mu}=M^{\phi}_{\nu}. Hence

where pMp_{M} is the density of the lognormal MM. It is easy to see that the expected STs of XX and YY coincide and therefore that dϕ(μX,μY)=0d_{\phi}(\mu_{X},\mu_{Y})=0, although X,YX,Y have different laws μX≠μY\mu_{X}\neq\mu_{Y}. We note that it is nonetheless possible to restore characteristicness of the signature kernel in several ways; we refer the interested reader to .

The kernel mean embedding MϕM^{\phi} is a continuous map from P(K)\mathcal{P}(\mathcal{K}) endowed with the topology of weak convergence to Hϕ\mathcal{H}_{\phi} with its Hilbert norm topology.

as n→+∞n\to+\infty. Thus, ∥Mμnϕ−Mμϕ∥Hϕ2→0\left\lVert M^{\phi}_{\mu_{n}}-M^{\phi}_{\mu}\right\rVert_{\mathcal{H}_{\phi}}^{2}\to 0 as n→+∞n\to+\infty concluding the proof.

ϕ\phi-signature kernels metrize the weak topology on P(K)\mathcal{P}(\mathcal{K}), i.e. the ϕ\phi-signature kernel MMD is equivalent to the topology of weak convergence on P(K)\mathcal{P}(\mathcal{K}).

2.3 Hypothesis testing

This approach, and variants of it, have been used in the kernel learning to propose statistics for goodness-of-fit tests, see e.g. . The goal in these tasks is to use the MMD to design the rejection regions for hypothesis tests to determine whether an observed sample is drawn from a known target distribution.

In the setting which is of interest to us, namely when the distributions are supported on (compact sets of) unparameterised paths, one is given i.i.d. sample paths {x1,...,xm}∼μ\{x^{1},...,x^{m}\}\sim\mu and {y1,...,yn}∼ν\{y^{1},...,y^{n}\}\sim\nu we are interested in testing the null hypothesis H0:μ=νH_{0}:\mu=\nu against the alternative hypothesis H1:μ≠νH_{1}:\mu\neq\nu. This is achieved by comparing the test statistics d^ϕ(μ,ν)\hat{d}_{\phi}(\mu,\nu) with a particular threshold: if the threshold is exceeded, then the test rejects the null hypothesis.

The acceptance region of the test is the set of scalars below the threshold. A type I error is when H0H_{0} is rejected despite being true. A type II error is when H0H_{0} is accepted despite being false. The level α\alpha of a test is an upper bound on the probability of a Type I error: this is a design parameter of the test which must be set in advance, and is used to determine the threshold to which we compare the test statistic. The power of a statistical test is defined as 11 minus the type II error. A test of level α\alpha is consistent if it achieves a zero type II error in the limit of infinite data samples.

[42, Theorem 10] states that the estimator (2.18) is consistent, which means that it converges in probability to the true value of the MMD when the number of sample paths goes to infinity. Assuming for simplicity that m=nm=n and that kϕ(xi,yj)<Mk_{\phi}(x_{i},y_{j})<M for all i=1,...,mi=1,...,m and j=1,...,nj=1,...,n, [42, Corollary 11] states that the MMD-based hypothesis test of level α\alpha for the null hypothesis H0H_{0} has the acceptance region

We note that the above considerations do not immediately apply to the special case where μ\mu is determined by the Wiener measure, because the latter is not compactly supported. Nonetheless, the result of ensures that dϕ(W,ν)=0d_{\phi}\left(\mathcal{W},\nu\right)=0 if and only if W=ν\mathcal{W=\nu} still holds. The estimation d^ϕ(μ,ν)\hat{d}_{\phi}(\mu,\nu) from a sample {y1,...,yn}\left\{y^{1},...,y^{n}\right\} drawn from ν\nu involves especially handling the term

which is a statistic than can be used as a goodness-of-fit test to assess how likely are sample paths {y1,...,yn}\left\{y^{1},...,y^{n}\right\} to be Brownian paths. Example 2.2.5 can be extended to derive a closed-form formula for this expression across a selection of weighted signature kernels. See also 2.5.6 for an application to cubature on Wiener spaces.

Other types of hyptothesis tests can be constructed using the signature kernel to test independence and conditional independence for path-valued random variables.

2.4 Distribution regression

Distribution Regression (DR) refers to the supervised learning problem of regressing from probability measures to scalar targets. In practice, DR becomes useful when labels are only available for groups of inputs rather than for individual inputs.

Here, we are interested in the case where inputs are Borel probability measures on C\mathcal{C}. For instance, in thermodynamics one may be interested in determining the temperature of a gas from the set of trajectories described by its particles as depicted in Figure 2.1. For other examples we refer the reader to . To address the challenge of DR on paths, we will make use of signature kernels to define a universal kernel on Borel probability measures on C\mathcal{C}. The following is [63, Theorem 3.3] adapted to the setting of ϕ\phi-signature kernels

is dense in C(K^)C(\widehat{\mathcal{K}}) in the topology of uniform convergence. If K⊂C\mathcal{K}\subset\mathcal{C} is a compact set of unparameterised paths, then the set P(K)\mathcal{P}(\mathcal{K}) is weakly-compact (e.g. [95, Theorem 10.2]). By Lemma 2.2.12 the signature kernel mean embedding map is injective and weakly continuous. Furthermore Hϕ\mathcal{H}_{\phi} is a Hilbert space with a countable basis, hence it is separable. Setting K^=P(K),H=Hϕ\widehat{\mathcal{K}}=\mathcal{P}(\mathcal{K}),\mathcal{H}=\mathcal{H}_{\phi} and ρ:μ→Mμϕ\rho:\mu\to M^{\phi}_{\mu} concludes the proof. ∎

By Theorem 2.2.15, the following Gaussian type kernel

is a universal kernel on P(C)\mathcal{P}(\mathcal{C}), where dϕd_{\phi} is the ϕ\phi-signature MMD of equation (2.15).

In light of Theorem 2.2.15, DR on sequential data can be performed via any kernel method for regression such as SVM, kernel ridge etc. For examples of DR on streams from thermodynamics, mathematical finance and agricultural science we refer the interested reader to and to for an application to cybersecurity.

3 Computing signature kernels

In this section we present various approaches for computing signature kernels.

The following lemma states that the truncated ϕ\phi-signature kernel converges to the ϕ\phi-signature kernel as the truncation nn goes to infinity.

where the last inequality follows from Proposition 1.2.3. The fact that this sum is finite is a consequence of the summability assumption on ϕ\phi. ∎

Computing signature kernels by taking inner products of truncated signatures is somewhat unsatisfying because it still relies on some means of computing iterated integrals. This in general is both computationally expensive from a space complexity viewpoint but is also goes against the general philosophy of of kernel methods which is to avoid a direct evaluation of the underlying feature map. These drawback are particularly apparent in situations where the input streams take their values in a high dimensional space VV due to the exponential explosion of terms in the ST. It also affects considerations of accuracy. As can be see from the estimate in (2.20) the nn-truncated signature kernel will be good approximation to its untruncated counterpart only when n!n! starts to dominates the nthn^{\text{th}} power of the product of the length of the two paths xx and yy. In particular, for paths having very large 11-variation a significant number of signature levels may be needed.

3.2 Finite difference schemes for the signature kernel PDE

In view of our prior discussion, it is natural to ask whether it is possible to obtain a kernel trick allowing to compute the signature kernel without referring back to the ST. In the case where the weight function is constant, we have already established that, for any two paths x,y∈C1([a,b],V)x,y\in C_{1}([a,b],V), the ϕ\phi-signature kernel kx,yk^{x,y} satisfies the integral equation (2.3), which is equivalent to PDE (2.4) if the paths are differentiable.

Consider the practical situation where x,yx,y are obtained by piecewise linear interpolation of two time series x=((s0,x0),...,(sm,xm))\mathbf{x}=((s_{0},\mathbf{x}_{0}),...,(s_{m},\mathbf{x}_{m})) and y=((t0,y0),...,(tn,tn))\mathbf{y}=((t_{0},\mathbf{y}_{0}),...,(t_{n},\mathbf{t}_{n})), with s0=t0=as_{0}=t_{0}=a and sm=tn=bs_{m}=t_{n}=b.

Because for any 0≤i≤m0\leq i\leq m and 0≤j≤n0\leq j\leq n the restrictions x∣[si,si+1]x|_{[s_{i},s_{i+1}]} and y∣[si,si+1]y|_{[s_{i},s_{i+1}]} are linear paths in VV, for si≤u≤s≤si+1s_{i}\leq u\leq s\leq s_{i+1} and tj≤v≤t≤tj+1t_{j}\leq v\leq t\leq t_{j+1}, the signature kernel integral equation (2.3) becomes

where C=⟨x˙s,y˙t⟩VC=\left\langle\dot{x}_{s},\dot{y}_{t}\right\rangle_{V} is a constant. The double integral in equation (2.21) can be approximated using numerical integration methods (see ). For example, using a trapezoidal rule, (2.21) is approximated by the following explicit finite difference scheme

It is shown in [81, Theorem 3.5] that be the resulting numerical solution k^λx,y\hat{k}^{x,y}_{\lambda} converges globally on [a,b]2[a,b]^{2} to the true signature kernel kx,yk^{x,y} with the following uniform error rates

3.3 Weighted signature kernels as averaged PDE solutions

In this section we show how ϕ\phi-signature kernels can be represented, under suitable integrability conditions, as the average of rescaled PDE solutions whenever the sequence {ϕ(k):k=0,1,...}\{\phi(k):k=0,1,...\} coincides with the sequence of moments of a random variable. We have already seen that, in the special case where ϕ\phi is constant, the computation collapses to solving a single PDE, making the resulting signature kernel particularly appealing for scaling computations to large datasets.

Next we prove that the ϕ\phi-signature kernel can be computed as the average of rescaled PDE solutions whenever the sequence (ϕ(n))n∈N(\phi(n))_{n\in N} coincides with the sequence of moments of a random variable. This result is due to .

Let π\pi be a real-valued random variable with finite moments of all orders. Consider the weight functions

such that ψ\psi satisfies the condition of Lemma 2.1.2. Then, for any x,y∈C1([a,b],V)x,y\in C_{1}([a,b],V) the ϕ\phi-signature kernel is well-defined and satisfies

The function ∣ϕ∣|\phi| satisfies the condition of Lemma 2.1.2 because ψ\psi does, therefore the ϕ\phi-signature kernel is well-defined. In addition we have

where the first and last equalities follow from the definition of ϕ\phi- and ordinary signature kernels respectively, the second equality holds by Fubini’s theorem which is applicable because ψ\psi satisfies the condition of Lemma 2.1.2 and the third follows from the same arguments as in the proof of 2.5.2. ∎

If the random variable π\pi has a known probability density function to sample from, the expectation in equation (2.24) can be computed by numerical methods such as Monte Carlo method or Gaussian quadrature procedure by averaging PDE numerical solutions presented in Section 2.3.2.

The integral in Proposition 2.3.3 can be numerically approximated by making repetitive calls to the finite difference scheme of Section 2.3.2 and then averaging PDE solutions using Gaussian Quadrature rules (see for example ). For a general weight function ψ∈L1((α,β))\psi\in L^{1}((\alpha,\beta)), consider a family of polynomials {Pn:n≥0}\{P_{n}:n\geq 0\} that are orthogonal in L2(ψ(ω)dω,(α,β))L^{2}(\psi(\omega)d\omega,(\alpha,\beta)). Then, classical Gaussian Quadrature produces a set of points ω0,...,ωn\omega_{0},...,\omega_{n} (the roots of Pn+1P_{n+1}) and a set of weights ψ1,...,ψn\psi_{1},...,\psi_{n} such that

For explicit error rates of such approximation see [7, Section 4].

4 Learning with signature kernels

The celebrated representer theorem states that a large class of optimization problems with RKHS regularizers have solutions that can be expressed as finite linear combinations of kernel evaluations centered at training points.

We present this result in the context of unparameterised ϕ\phi-signature kernels.

if it exists, is such that f∗∈Af^{*}\in\mathcal{A} where

The proof of a representer theorem of this form is classical, see for example . The overall idea goes as follows. First one notes that any f∈Hϕ=A⊕A⊤f\in\mathcal{H}_{\phi}=\mathcal{A}\oplus\mathcal{A}^{\top} can be decomposed as f=g+f⊥f=g+f^{\perp} where g∈Ag\in\mathcal{A} and f⊥∈A⊤f^{\perp}\in\mathcal{A}^{\top}. Hence, f⊥(xj)=0f^{\perp}(x^{j})=0, and so f(xj)=g(xj)f(x^{j})=g(x^{j}), for all j=1,...,Nj=1,...,N, from which it follows that L(g)=L(f)\mathcal{L}\left(g\right)=\mathcal{L}\left(f\right). In addition, any ff in Hϕ\mathcal{H}_{\phi} satisfies ∣∣f∣∣Hϕ≥∣∣g∣∣Hϕ\left|\left|f\right|\right|_{\mathcal{H}_{\phi}}\geq\left|\left|g\right|\right|_{\mathcal{H}_{\phi}}, which leads to the inequality

Several popular techniques can be cast in such regularization framework.

Regularised least squares, also known as (kernel) ridge regression, corresponds to the following choice of functional in equation (2.25)

Given binary labels yi=±1y^{i}=\pm 1, the support vector machine (SVM) classifier can be interpreted as a regularization method corresponding to the following choice of functional in equation (2.25)

5 Exercises

Let x,y∈C1([a,b],V)x,y\in C_{1}([a,b],V) be two linear paths with (constant) derivatives x˙≡dx\dot{x}\equiv d_{x} and y˙≡dy\dot{y}\equiv d_{y}.

Show that the 1\mathbf{1}-signature kernel satisfies the following PDE

and with boundary conditions kx,y(0,t)=kx,y(s,0)=1k^{x,y}(0,t)=k^{x,y}(s,0)=1 for all s,t∈[a,b]s,t\in[a,b].

where I0I_{0} is the modified Bessel function of the first kind of order .

Recall that I0I_{0} satisfies z2I0′′(z)+zI0′(z)−z2I0(z)=0.z^{2}I_{0}^{\prime\prime}\left(z\right)+zI_{0}^{\prime}\left(z\right)-z^{2}I_{0}\left(z\right)=0. Taking x=yx=y and s=ts=t, and h(t)=kx,x(t,t)h\left(t\right)=k^{x,x}\left(t,t\right), find a second-order differential equation satisfied by hh.

Show that the solution to the following PDE

with (s,t)∈[a,b]×[c,d](s,t)\in[a,b]\times[c,d] and nonlinear boundary conditions

such that f,gf,g are differentiable functions, is given by

How does the analysis change for ϕ\phi-signature kernel kϕx,yk_{\phi}^{x,y} with ϕ(k)=k!\phi(k)=k!

where the path θx∈C1([a,b],V)\theta x\in C_{1}([a,b],V) is obtained by pointwise multiplication of the path xx by the scalar θ\theta.

Show that if ϕ(k)=(k/2)!\phi(k)=(k/2)! then the ϕ\phi-signature kernel satisfies equation (2.24) where π∼Exp(1)\pi\sim\text{Exp}(1) is an exponential random variable.

Suppose that x,y∈C1(V)x,y\in C_{1}(V) are differentiable and let

Show that (fω,gω)(f_{\omega},g_{\omega}) solves a two-dimensional PDE.

Let ϕ\phi be a weight function satisfying the conditions of Lemma 2.1.2. Assume that C\mathcal{C} is equipped with a topology with respect to which the ST S:C→Tϕ((V))S:\mathcal{C}\rightarrow T_{\phi}\left((V)\right) is continuous. Let K⊂C\mathcal{K}\subset\mathcal{C} be a compact set. Show that the RKHS Hϕ∣K↪C(K)\mathcal{H}_{\phi}|_{\mathcal{K}}\hookrightarrow C(\mathcal{K}) is continuously embedded in C(K)C(\mathcal{K}), i.e. that Hϕ∣K⊂C(K)\mathcal{H}_{\phi}|_{\mathcal{K}}\subset C(\mathcal{K}) and that the topology of Hϕ∣K\mathcal{H}_{\phi}|_{\mathcal{K}} is stronger than the topology induced by C(K)C(\mathcal{K}).

Let μ,ν\mu,\nu be two Borel probability measures on C\mathcal{C} and let ϕ\phi be a weight function satisfying the condition of Lemma 2.1.2. Assume that

Show that the ϕ\phi-MMD of equation (2.16) admits the following expression

where Mμϕ,Mνϕ∈HϕM^{\phi}_{\mu},M^{\phi}_{\nu}\in\mathcal{H}_{\phi} are the ϕ\phi-kernel mean embeddings of μ,ν\mu,\nu respectively.

Show that the squared MMD has the following expression

where where x′x^{\prime} (resp. y′y^{\prime}) is an independent copy of xx (resp. yy) with the same distribution μ\mu (resp. ν\nu).

Given mm sample paths {xi}i=1m∼μ\{x^{i}\}_{i=1}^{m}\sim\mu and nn samples {yj}j=1n∼ν\{y^{j}\}_{j=1}^{n}\sim\nu, show that the following expression provides an unbiased estimator of the MMD

Show that the estimator obtained in 3. is asymptotically consistent, i.e. that it converges in probability to the squared MMD dϕ(μ,ν)2d_{\phi}(\mu,\nu)^{2} as m,n→+∞m,n\to+\infty.

Show that the kernel in (2.29) satisfies the following relation

Let Hψ\mathcal{H}_{\psi} be the completion of this space.

Hence deduce that FF is an isomorphism between the Hilbert spaces Tψ((V))T_{\psi}\left(\left(V\right)\right) and Hψ\mathcal{H}_{\psi}

Using the same choice of ψ\psi as previously, show that kk is associated to the feature map ϕ:\phi: C→Hψ\mathcal{C\rightarrow H}_{\psi} defined by ϕ(γ)=∑A∈Aϕ(γ)A\phi\left(\gamma\right)=\sum_{A\in\mathcal{A}}\phi\left(\gamma\right)_{A}where

where k1x,yk^{x,y}_{1} is the original signature kernel.

For an extension to the non-Gaussian case and other classes of random matrix ensembles, the reader can consult .

Chapter 3 Rough paths and deep learning

The symbiosis of differential equations and deep learning has become a topic of great interest in recent years. In particular, neural differential equations (NDEs) demonstrate that neural networks and differential equation are two sides of the same coin . Traditional parameterised differential equations are a special case. Many popular neural networks, such as residual and recurrent networks, are discretisations of differential equations. There are many types of NDEs. Rough path theory offers a way of analysing them under the same theoretical frameworks. For a brief account of recent applications of rough path theory to machine learning we refer the reader to .

understood as a Riemann-Stieltjes integral equation

Existence and uniqueness results for solutions of the CDE (3.1) are classical and not the main objective of this book. For completeness, we provide only a summary here, and refer the interested reader to [37, Chapter 3] for details about the proofs.

Global existence is guaranteed if the vector fields ff are continuous and bounded [37, Theorem 3.4].

If the vector fields are 11-Lipschitz, then a unique global solution exists [37, Theorem 3.8], while if they are only locally 11-Lipschitz then a unique solution exists up to a possible explosion time [37, Corollary 3.9]. Explosion can be ruled out also under an additional linear-growth condition similar to the above.

We denote by ⌊p⌋\lfloor p\rfloor the largest integer which is less than or equal to p, and by ΔT\Delta_{T} the following set

A continuous control is a continuous non-negative function ω:ΔT→[0,+∞)\omega:\Delta_{T}\to[0,+\infty) which is super-additive in the sense that

and for which ω(t,t)=0\omega(t,t)=0 for all t∈[0,T]t\in[0,T].

xs,u⊗xu,t=xs,t\mathbf{x}_{s,u}\otimes\mathbf{x}_{u,t}=\mathbf{x}_{s,t} for all 0≤s≤u≤t≤T0\leq s\leq u\leq t\leq T;

it has finite pp-variation on ΔT\Delta_{T} controlled by ω\omega, in the sense

where C>0C>0 is a constant that does not depends on x\mathbf{x}.

where the supremum is taken over all partitions D\mathcal{D} of the interval [0,T][0,T].

It can be observed from Definition 3.1.2 that the less regular the rough path x\mathbf{x} is the more terms are needed to describe it in addition to the underlying path increments xs,t(1)\mathbf{x}^{(1)}_{s,t}. The next theorem is an important result in rough path theory. It states that a pp-rough path can be extended uniquely to a qq-rough path if p≤qp\leq q.

[67, Theorems 3.7] Let x\mathbf{x} be a pp-rough path controlled by a control ω\omega. Let q≥pq\geq p. Then, there exists a unique extension of x\mathbf{x} denoted by

S⌊q⌋(x)s,u⊗S⌊q⌋(x)u,t=S⌊q⌋(x)s,tS^{\lfloor q\rfloor}(\mathbf{x})_{s,u}\otimes S^{\lfloor q\rfloor}(\mathbf{x})_{u,t}=S^{\lfloor q\rfloor}(\mathbf{x})_{s,t} for all 0≤s≤u≤t≤T0\leq s\leq u\leq t\leq T;

∥πiS⌊q⌋(x)s,t∥V⊗ii≤Cω(s,t)i/p\|\pi_{i}S^{\lfloor q\rfloor}(\mathbf{x})_{s,t}\|^{i}_{V^{\otimes i}}\leq C\omega(s,t)^{i/p}, for some C>0C>0, and all (s,t)∈ΔT(s,t)\in\Delta_{T}, i≤⌊q⌋i\leq\lfloor q\rfloor;

π≤⌊p⌋xs,t=π≤⌊p⌋S⌊q⌋(x)s,t\pi_{\leq\lfloor p\rfloor}\mathbf{x}_{s,t}=\pi_{\leq\lfloor p\rfloor}S^{\lfloor q\rfloor}(\mathbf{x})_{s,t} for all (s,t)∈ΔT(s,t)\in\Delta_{T}.

The solution theory for rough differential equations originally developed in makes use of the following subset of rough paths.

driven by a geometric rough path x\mathbf{x}. In addition to Lyons’ original work , various approaches to solve RDEs have been introduced in the literature. They can be split into methods that define solutions as either

limit of solutions of ODEs or discrete approximations .

The precise treatment of these different appraches to RDEs is beyond the scope of this book. We will discuss the first approach informally, while the second approach will be presented in more details. Our choice is justified by the fact that it will be more convenient to use the second approach to develop efficient backpropagation procedures for neural RDEs discussed in the next section.

The basic idea of is to transform the RDE (3.6) into an integral equation of the form

hold for all (s,t)∈ΔT(s,t)\in\Delta_{T}. One can interpret (3.8) as a generalisation of Taylor’s theorem where the path yy is not approximated by polynomials but by the homogeneous terms of the rough path x\mathbf{x}. One can then define integrals of controlled rough paths (and functions thereof) with respect to the reference path x\mathbf{x}. Therefore, we can rewrite the RDE (3.6) in integral form

and treat this equation as a fixed point equation in the space of controlled rough paths and apply a Picard iteration to obtain a solution. It turns out [37, Theorem 8.4] that if yy solves (3.9), then y′y^{\prime} is given by ys′=f(ys)y_{s}^{\prime}=f\left(y_{s}\right). The concept of controlled rough paths has been further extended to signals evolving in time and space in regularity structures , which provides a solution theory to a large class of singular partial differential equations.

1.2 RDE solutions as limits of approximations

The main idea here is to approximate the rough path x\mathbf{x} by limit points of sequences of smooth paths in pp-variation. The solution of the original RDE can then be defined as the uniform limit of the smooth CDE solutions in the sense of Theorem 3.1.7 below. Before stating it we recall the definition of γ\gamma-Lipschitz function (in the sense of Stein).

Let V,WV,W be two normed space and let γ>0\gamma>0. A function g:V→Wg:V\to W is called γ\gamma-Lipschitz if gg is ⌊γ⌋\lfloor\gamma\rfloor times continuously differentiable and such that there exists a constant M≥0M\geq 0 such that the supremum norm of its kthk^{th} derivative, k=0,...,⌊γ⌋k=0,...,\lfloor\gamma\rfloor, and the (γ−⌊γ⌋)(\gamma-\lfloor\gamma\rfloor)-Hölder norm of its ⌊γ⌋th\lfloor\gamma\rfloor^{th} derivative are bounded by MM. The smallest MM satisfying these conditions is the γ\gamma-Lipschitz norm of gg, denoted by ∥g∥Lipγ:=∥g∥Lipγ(V,W)\left\lVert g\right\rVert_{Lip^{\gamma}}:=\left\lVert g\right\rVert_{Lip^{\gamma}(V,W)}. We denote by Lipγ(V,W)\text{Lip}^{\gamma}(V,W) the space of γ\gamma-Lipschitz functions from VV to WW.

converges uniformly to yy on [0,T][0,T]. Furthermore, the map (y0,f,x)↦y(y_{0},f,\mathbf{x})\mapsto y is (at least) locally Lipschitz continuous in all its parameters.

Theorem 3.1.7 yields the following notion of solution to a RDE.

if there exists a sequence {xN}\{x^{N}\} of continuous bounded variation paths such that the sequence (π≤⌊p⌋∘S(xN))(\pi_{\leq\lfloor p\rfloor}\circ S(x^{N})) converges in pp-variation to x\mathbf{x} and such that the sequence (y0⋅π≤⌊p⌋∘S(yN))(\mathbf{y}_{0}\cdot\pi_{\leq\lfloor p\rfloor}\circ S(y^{N})) converges uniformly on [0,T][0,T] to y\mathbf{y} as N→∞N\to\infty, where {yN}\{y^{N}\} are the solutions to the CDEs (3.10), with y0=π1y0y_{0}=\pi_{1}\mathbf{y}_{0}.

As remarked in [37, Theorem 10.38], (full) RDE solutions are simply RDE solutions in the sense of Definition 3.1.9 but along modified vector fields as

1.3 Stratonovich SDEs as RDEs

[37, Corollary 13.22] Let WW be a standard dd-dimensional Brownian motion and BNB^{N} be the piecewise linear path with NN pieces that coincides with WW on the uniform partition DN:={0=t0<t1<....<tN=1}\mathcal{D}_{N}:=\{0=t_{0}<t_{1}<....<t_{N}=1\}, with tk=kht_{k}=kh and step-size h=1/Nh=1/N. Then, there exists a random geometric pp-rough path W\mathbf{W} with p∈[2,3)p\in[2,3) such that for almost all ω∈Ω\omega\in\Omega

where the stochastic integral is in the Stratonovich sense. The geometric rough path W\mathbf{W} is often referred to as Stratonovich enhanced Brownian motion.

Note that the piecewise linear interpolation in Theorem 3.1.11 can be replaced by other kinds of approximation and the same convergence holds. Also, it is not necessary for the partition to be uniform; other examples include dyadic [36, Proposition 3.6].

To put simply, this theorem states that Brownian motion can be approximated (in a rough path sense) by a sequence of bounded variation paths. This is particularly helpful within stochastic analysis as it allows one to construct pathwise solutions for SDEs governed by sufficiently regular vector fields. Importantly for us, the above theory applies directly to (Stratonovich) SDEs as Brownian motion can be viewed as a geometric pp-rough path with p∈(2,3)p\in(2,3) by Theorem 3.1.11.

The following is a consequence of the universal limit theorem 3.1.7 for SDEs.

2 Numerical RDE solvers

where the right-hand-side is understood as the composition of smooth differential operators.

A natural step-NN approximation for the solution of the RDE

is given by the step-NN Euler scheme yt≈Es,tN(ys;f,x)y_{t}\approx\mathcal{E}_{s,t}^{N}(y_{s};f,\mathbf{x}) where

The reader is invited to derive a first error estimate for the Euler scheme in 3.4.4 for paths of bounded variation. It turns out that a similar error estimate also holds for RDEs driven by geometric rough paths as stated in the following lemma.

Iterations of the step-NN Euler scheme over a partition D={0=t0<t1<...<tn=T}\mathcal{D}=\{0=t_{0}<t_{1}<...<t_{n}=T\} leads to an approximate solution yEuler;N,Dy^{\text{Euler};N,\mathcal{D}} over the entire interval [0,T][0,T] defined for any N≥pN\geq p and at any tk∈Dt_{k}\in\mathcal{D} as

[37, Theorem 10.33] Under the assumptions as in Lemma 3.2.1, there exists a constant C=C(p,γ)C=C(p,\gamma) such that

with the control ω(s,t)=∥f∥Lip⁡γp∥x∥p−var;[s,t]p\omega(s,t)=\|f\|^{p}_{\operatorname{Lip}^{\gamma}}\|\mathbf{x}\|^{p}_{p-var;[s,t]}.

Runge-Kutta schemes for RDEs have been studied in .

2.2 The log-ODE method

The log-ODE method is an effective method for approximating the solution of a CDE by reducing it to an ODE . This method is based on another path-transform, called log-signature transform (logST) which efficiently encodes the same integral information as the ST but it removes certain polynomial redundancies, such as

where μ\mu the Möbius function. Bases of this space are known as Hall bases . One of the most well-known bases is the Lyndon basis, denoted by BN\mathcal{B}^{N}, and indexed by Lyndon words. A Lyndon word is any word which occurs lexicographically strictly earlier than any word obtained by cyclically rotating its elements.

The image of a signature under the logarithm (or its representation in a Hall basis) is called the log-signature transform (logST). Note that β(m,N)<N\beta(m,N)<N, i.e. that the truncated log-signature can store the same amount of information as the truncated signature but it requires less storage memory.

The step-NN log-ODE method of the RDE (3.6) over an interval [s,t][s,t] is given by

The next theorem quantifies the approximation error of the log-ODE method in terms of the regularity of the systems vector field ff and control path x\mathbf{x}.

Secondly, the step-⌊γ⌋\lfloor\gamma\rfloor Euler scheme defined in (3.16) and applied to the log-ODE (3.19) reads

By 3.4.4, there exists a constant C1=C1(γ)C_{1}=C_{1}(\gamma) such that

Furthermore, by Lemma 3.2.1 there exists a constant C2=C2(γ,p)C_{2}=C_{2}(\gamma,p) such that

where Es,t⌊γ⌋(ys;f,x)\mathcal{E}_{s,t}^{\lfloor\gamma\rfloor}(y_{s};f,\mathbf{x}) is the step-⌊γ⌋\lfloor\gamma\rfloor Euler scheme applied to the RDE (3.6).

Note that if the vector fields f=(f1,⋯ ,fd)f=(f_{1},\cdots,f_{d}) are linear, then FF is also linear, and so the log-ODE (3.19) also becomes linear. Therefore, the log-ODE solution exists and is explicitly given as the exponential of the matrix FNF^{N}, i.e. zu=exp⁡(uFN)zsz_{u}=\exp(uF^{N})z_{s}.

Iterations of the log-ODE method over a partition D={0=t0<t1<...<tn=T}\mathcal{D}=\{0=t_{0}<t_{1}<...<t_{n}=T\} leads to an approximate solution ylog-ODE;N,Dy^{\text{log-ODE};N,\mathcal{D}} over the entire interval [0,T][0,T] defined for any N≥pN\geq p and at any tk∈Dt_{k}\in\mathcal{D} as

Given the local error estimate (3.21) for the log-ODE method, global error estimates similar to the one for the Euler scheme in (3.17) were developed in [45, Theorem 3.2.1] and [52, Theorem 5.8]. We refer to these two PhD theses for a proof of the following statement. Thus, we see that higher convergence rates can be achieved through using more terms in each log-signature. Also, as for the Euler scheme, it is unsurprising that the error estimate (3.17) increases with the “roughness” of the driving rough path. Hence, the accuracy performance of the log-ODE method can be improved by choosing an appropriate step size and depth of log-signature.

3 Differential equations and deep learning

We begin this section by recalling some basic facts about classical neural networks. The emphasis of the first section will be on brevity over completeness and some familiarity with deep learning concepts is assumed from the reader.

In what follows we will consider the activation function σ\sigma to be among the following functions: identity, logistic: 11+e−x\frac{1}{1+e^{-x}}, tanh⁡\tanh, ReLU: max⁡{0,x}\max\{0,x\}.

where L\mathcal{L} is a loss function, e.g. mean-squared error L=1N∑i=1N∥fθ(xi)−yi∥2\mathcal{L}=\frac{1}{N}\sum_{i=1}^{N}\left\lVert f_{\theta}(x_{i})-y_{i}\right\rVert^{2}, cross-entropy etc. The quantities we are interested in computing for backpropagation are the gradients of the loss L\mathcal{L} with respect to the model weights θ\theta. To incorporate the bias terms b(k)b^{(k)} into the weights we will denote a0,i(k)=bi(k)a_{0,i}^{(k)}=b^{(k)}_{i}, where A(k)={ai,j(k)}A^{(k)}=\{a^{(k)}_{i,j}\}, and z0(k)=1z^{(k)}_{0}=1. By definition we have

Remembering the definition of cp(k+1)=∑q=1rkaq,p(k+1)σ(cq(k))c^{(k+1)}_{p}=\sum_{q=1}^{r_{k}}a^{(k+1)}_{q,p}\sigma(c^{(k)}_{q}), we have that

This equation is where backpropagation gets its name. Namely, the ”error” term δj(k)\delta^{(k)}_{j} at layer kk is dependent on the terms δp(k+1)\delta^{(k+1)}_{p} at the next layer k+1k+1. Thus, errors flow backward, from the last layer to the first layer. Note that all the values of cj(k)c^{(k)}_{j} and zi(k−1)z^{(k-1)}_{i} need to be computed before the backward pass can begin and need to be saved in memory during the forward pass in order to be reused during the backward pass.

3.2 Neural ODEs

A neural ordinary differential equation (Neural ODE) is an ODE using a neural network to parameterise the vector field

As noted in , the Euler discretization of the Neural ODE (3.22) matches the definition of a residual neural network

To optimize LL we require the gradients ∂θL(yT)\partial_{\theta}L(y_{T}).

The first option is simply to backpropagate through the internal operations of the differential equation solver. A differential equation solver internally performs the usual arithmetic operations of addition, multiplication, and so on, each of which is differentiable. This method is known as discretise-then-optimise. Generally speaking, this approach is fast to evaluate and produces accurate gradients, but it is memory-inefficient, as every internal operation of the solver must be recorded. We refer to for further details on computational efficiency.

It is possible to compute gradients of a scalar-valued loss with respect to all inputs of any ODE solver, without backpropagating through the operations of the solver. Not storing any intermediate quantities of the forward pass allows to train models with constant memory cost as a function of depth, a major bottleneck for training deep models. Indeed, one can treat the ODE solver as a black box, and compute gradients by deriving a backwards-in-time differential equation, known as adjoint equation, which is then solved numerically. This method is known as optimise-then-discretise. In the sequel, we will state and prove analogous theorems for neural differential equation driven by rough paths.

where at⊤∇fθ(yt)a_{t}^{\top}\nabla f_{\theta}(y_{t}) is a vector-Jacobian product. We do not provide a proof here as we will prove an anlogous result for the more general setting of CDEs in the next section.

Equation (3.25) can be solved numerically by another call to the ODE solverHere, we assumed that the loss function LL depends only on the last time point t1t_{1}. If LL depends also on intermediate time points s0=t0<s1<...<sN=t1s_{0}=t_{0}<s_{1}<...<s_{N}=t_{1}, we can repeat the adjoint step for each of the intervals [sk−1,sk][s_{k-1},s_{k}] in the backward order and sum up the obtained gradients., run backwards-in-time starting from aT:=∇L(yT)a_{T}:=\nabla L(y_{T}), in full analogy with the concept of backpropagation for training standard neural networks:

The final step is to compute the gradients of LL with respect to the parameters θ\theta. For this, we define atθ:=∂θL(yt)a^{\theta}_{t}:=\partial_{\theta}L(y_{t}). Then, equation (3.25) applied to the augmented variable (at,atθ)⊤(a_{t},a_{t}^{\theta})^{\top} reads

where F(y,θ)=(fθ(y),0)F(y,\theta)=(f_{\theta}(y),0) so that

The first term is the adjoint we have already mentioned, while the second term reads

Hence, the gradient of the loss with respect to the parameters can be computed by another call to the ODE solver.

Adjoint-based methods are usually slightly slower to evaluate because one needs to recalculate yty_{t} in the backward pass. Also, they might introduce small errors compared to direct backpropagation through the ODE solver, so they should generally be used when memory is a concern. We refer again the interested reader to for further details on these computational aspects.

There is a third way of backpropagating through Neural ODEs given by reversible ODE solvers, i.e. numerical solvers where (yk,ak)(y_{k},a_{k}) can bealgebraically recovered exactly from (yk+1,ak+1)(y_{k+1},a_{k+1}). These solvers offer both memory efficiency and accuracy of the computed gradients. Like optimise-then-discretise, they do require a small amount of extra computational work, to recompute the forward solution during backpropagation. This is a topic still in its infancy and beyond the scope of this book. We refer to [54, Section 5.3.2] for further details on this topic.

For examples and python implementation, we refer the reader to the documentation of the PyTorch library torchdiffeqhttps://github.com/rtqichen/torchdiffeq or the JAX library diffraxhttps://docs.kidger.site/diffrax/.

3.3 Neural CDEs

Consider the subspace C1,0,t⊂C1C_{1,0,t}\subset C_{1} of paths started at with one coordinate-path (without loss of generality, the first) corresponds to time, i.e. xt(1)=tx^{(1)}_{t}=t.

The next result states the universality of linear functionals on the solution of Linear Neural CDEs. Thanks to the density results of neural networks (Theorem 3.3.1 and Theorem 3.3.2), the same result holds if the linear vector fields are replaced by non-linear neural networks. This result was first proved by .

is a dense subset of C(K)C(K) with the topology of uniform convergence.

As for Neural ODEs, there are two main options to backpropagate through a Neural CDE. The first option is simply to backpropagate through the internal operations of the differential equation solver. The second method involves deriving a backwards-in-time adjoint equation.

We generalise our notation for Neural CDEs by writing ys,a,xy^{s,a,x} to mean the solution to

It is well-known that the flow map Φt(s,a,x)≡yts,a,x\Phi_{t}(s,a,x)\equiv y_{t}^{s,a,x} is differentiable in aa (e.g. by [37, Theorem 4.4]) and the Jacobian

To simplify notation, we remove the dependence on aa and xx from the Jacobian which simply denote by JtsJ_{t}^{s} from now on. If s=0s=0 we will simply write JtJ_{t}. By letting

we can re-write equation (3.27) as a linear CDE driven by zz

The following lemma shows that the Jacobian admits an inverse and that this inverse also solves a linear CDE driven by zz.

For every t∈[0,T]t\in[0,T] the matrix JtJ_{t} is non-singular. Furthermore, its inverse Mt=Jt−1M_{t}=J_{t}^{-1} is the solution to the equation

Define MM to be the unique solution to (3.28) then At:=Jt⋅MtA_{t}:=J_{t}\cdot M_{t} satisifes

so that Ie=Jt⋅Mt=Mt⋅JtI_{e}=J_{t}\cdot M_{t}=M_{t}\cdot J_{t} for all tt in [0,T][0,T]. ∎

We use Lemma 3.3.6 to prove the following theorem, which provides a differential equation for the ajoint process of a Neural CDE. The proof is slightly different from the one proposed in [54, Appedix C.3].

By definition of the adjoint process and by the chain rule we have

Applying this with the choice u=JT⊤∇L(yT)u=J_{T}^{\top}\nabla L\left(y_{T}\right) we obtain that a⊤=Ya^{\top}=Y so that

For examples of python implementation we refer the reader to the documentation of the PyTorch library torchcdehttps://github.com/patrick-kidger/torchcde or the JAX library diffraxhttps://docs.kidger.site/diffrax/.

The adjoint equation (3.30) for Neural CDEs driven by bounded variation paths can be generalised to neural differential equations driven by (geometric) rough paths, dubbed Neural RDEs, which we discuss next.

3.4 Neural RDEs

where the solution is in the sense of Definition 3.1.9. Next, we derive the adjoint equation for the Neural RDE (3.31). A variant of the proof for Neural SDEs appear in [54, Appendix C.3].

Let {yN}N≥1\{y^{N}\}_{N\geq 1} be the sequence of solutions to the following CDEs

where (xN)(x^{N}) is a sequence of continuous bounded variation paths such that the sequence (π≤⌊p⌋∘S(xN))(\pi_{\leq\lfloor p\rfloor}\circ S(x^{N})) converges to the rough path x\mathbf{x} in pp-variation. Then, by Theorem 3.1.7, we have that the corresponding sequence of CDE solutions {yN}N≥1\{y^{N}\}_{N\geq 1} converges in pp-variation to the solution yy of the RDE (3.31).

By Theorem 3.3.7, each adjoint process atN:=∂ytNL(yTN)a_{t}^{N}:=\partial_{y^{N}_{t}}L(y^{N}_{T}) satisfies the backwards-in-time linear CDE

As in the proof of Theorem 3.3.7, by letting

we can rewrite the adjoint equation for aNa^{N} as follows

Note that since fθf_{\theta} is bounded, the path t↦ztNt\mapsto z^{N}_{t} is of bounded variation.

It remains to show that at=∂ytL(yT)a_{t}=\partial_{y_{t}}L(y_{T}).

Recall that by [37, Theorem 4.4] the Jacobians Jts,ysN,x,N=Jts,NJ_{t}^{s,y_{s}^{N},x,N}=J_{t}^{s,N} satisfy the CDEs

Similarly, by Lemma 3.3.6, the inverses Ms,N:=(Js,N)−1M^{s,N}:=(J^{s,N})^{-1} exist and satisfy the CDEs

Because LL is continuously differentiable, we have that the sequence

as N→∞N\to\infty, which concludes the proof. ∎

3.5 Neural SDEs as generative models for time series

Informally, given a target distribution ytruey^{\text{true}} on pathspace, the Neural SDE model (3.34) can be trained so that yy should have approximately the same distribution as the target ytruey^{\text{true}}, for some notion of closeness in the space of distributions on path space. So a Neural SDE can be seen as a natural generative model for time series data. We only summarise the main approaches that have been proposed in the literature and refer the interested reader to the relevant papers for further details about the implementations of these models.

In the authors propose to train a Neural SDE by minimizing the objective

where FϕF_{\phi} is the solution map of a Neural CDE parameterised by some parameters ϕ\phi.

In the vector fields of a Neural SDEs are replaced by a linear functional on the signature of the driving Brownian motion. The resulting Sig-SDE model is fit to financial data by matching option prices observed in the market.

4 Exercises

Show that the map X:ΔT→T2(V)\mathbf{X}:\Delta_{T}\to T^{2}(V) defined as

Consider the two sequence of paths of bounded variation

where Es,t⌊γ⌋(ys;f,x)\mathcal{E}^{\lfloor\gamma\rfloor}_{s,t}(y_{s};f,x) is the Euler scheme defined in equation (3.16).

coincides with the solution of the following backwards-in-time linear Stratonovich SDE

The law of ztnz_{t}^{n} admits a differentiable density ptnp_{t}^{n}, given by

The path t↦log⁡pt(zt)t\mapsto\log p_{t}\left(z_{t}\right) is the unique solution to the rough differential equation

Bibliography