A Primer on the Signature Method in Machine Learning
Extracted source text · arXiv 1603.03788
\documentclass[11pt,a4paper]{article}
\usepackage{jheppub}
\usepackage{amsmath,amsfonts,amstext,amssymb,amsthm}
\usepackage{epigraph}
\usepackage{mathtools}
\usepackage{epstopdf}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage{parskip}
\usepackage{verbatim}
\usepackage{comment}
%\usepackage[hypcap]{caption}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{dsfont}
\usepackage{shuffle}
\usepackage{graphics}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{epsfig}
\usepackage{multirow}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{graphicx,epsfig}%
%\usepackage{subfig}
\usepackage[mathscr]{euscript}
\usepackage{notoccite}
\usepackage{xhfill}
\usepackage{makecell}
%\usepackage[T1]{fontenc}
%\bibliographystyle{unsrtnat}
\usepackage[perpage]{footmisc}
\usepackage{diagbox}
%\usepackage[numbers,sort&compress]{natbib}
\cleardoublepage
\phantomsection
%The following is used with parskip package in order to put a gap between text and theorems
\makeatletter
\def\thm@space@setup{%
\thm@preskip=\parskip \thm@postskip=0pt
}
\makeatother
\def\be{\begin{equation}}
\def\ee{\end{equation}}
\def\ba{\begin{eqnarray}}
\def\ea{\end{eqnarray}}
\newcommand{\R}{\mathbb R}
\newcommand{\Shuffles}{\textnormal{Shuffles}}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\newcommand{\LLL}{\mathbf L}
\newcommand{\norm}[1]{\left|\left|#1 \right|\right|}
\newcommand{\fig}[1]{Fig.~\ref{#1}}
\newcommand{\ditto}[1][.4pt]{\xrfill{#1}~\textquotedbl~\xrfill{#1}}
\newcommand*{\dittoclosing}{---''---}
\def\shuffleNEW{\sqcup\mathchoice{\mkern-7mu}{\mkern-7mu}{\mkern-3.2mu}{\mkern-3.8mu}\sqcup}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
%\renewcommand{\thesection}{\Roman{section}}
\begin{document}
\title{A Primer on the Signature Method in Machine Learning}
%\preprint{DESY 14-XXX}
\author[a]{Ilya Chevyrev}
\author[a,b]{and Andrey Kormilitzin}
\affiliation[a]{Mathematical Institute, University of Oxford, Andrew Wiles Building,Woodstock Road, Oxford, OX2 6CG, UK}
\affiliation[b]{Oxford-Man Institute, University of Oxford, Eagle House, Walton Well Road, Oxford, OX2 6ED, UK}
\emailAdd{ilya.chevyrev@maths.ox.ac.uk}\emailAdd{andrey.kormilitzin@maths.ox.ac.uk}
\date{\today}
\abstract{
In these notes, we wish to provide an introduction to the signature method, focusing on its basic theoretical properties and recent numerical applications.
The notes are split into two parts. The first part focuses on the definition and fundamental properties of the signature of a path, or the {\it path signature}. We have aimed for a minimalistic approach, assuming only familiarity with classical real analysis and integration theory, and supplementing theory with straightforward examples. We have chosen to focus in detail on the principle properties of the signature which we believe are fundamental to understanding its role in applications. We also present an informal discussion on some of its deeper properties and briefly mention the role of the signature in rough paths theory, which we hope could serve as a light introduction to rough paths for the interested reader.
The second part of these notes discusses practical applications of the path signature to the area of machine learning. The signature approach represents a non-parametric way for extraction of characteristic features from data. The data are converted into a multi-dimensional path by means of various embedding algorithms and then processed for computation of individual terms of the signature which summarise certain information contained in the data. The signature thus transforms raw data into a set of features which are used in machine learning tasks. We will review current progress in applications of signatures to machine learning problems.
}
\maketitle
\section{Theoretical Foundations}\label{sec:First}
%We should write here some introductory stuff, motivation, a bit of history, practical application and further directions of study.
The purpose of the first part of these notes is to introduce the definition of the signature and present some of its fundamental properties. The point of view we take in these notes is that the signature is an object associated with a path which captures many of the path's important analytic and geometric properties.
The signature has recently gained attention in the mathematical community in part due to its connection with Lyons' theory of rough paths. At the end of this first part, we shall briefly highlight the role the signature plays in the theory of rough paths on an informal level. However one of the main points we wish to emphasize is that no knowledge beyond classical integration theory is required to define and study the basic properties of the signature. Indeed, K. T. Chen was one of the first authors to study the signature, and his primary results can be stated completely in terms of piecewise smooth paths, which already provide an elegant and deep mathematical theory.
While we attempt to make all statements mathematically precise, we refrain from going into complete detail. A further in-depth discussion, along with proofs of many of the results covered in the first part, can now be found in several texts, and we recommend the St. Flour lecture notes~\cite{Lyons07} for the curious reader.
\subsection{Preliminaries}
\subsubsection{Paths in Euclidean space}
\input{curves_and_paths}
\subsubsection{Path integrals}
\input{path_integrals}
%\subsubsection{Lyndon basis, tensor product and shuffles}
%\input{Lyndon_Shuffle}
\subsection{The signature of a path}
\subsubsection{Definition}
\input{definition}
\subsubsection{Examples}
\input{example_Sigs}
\subsubsection{Picard iterations: motivation for the signature}\label{subsubsec:Picard}
\input{picard_iterations}
\subsubsection{Geometric intuition of the first two levels}\label{subsubsec:geoIntuition}
\input{geometrical_intuition}
\subsection{Important properties of signature}
We now review several fundamental properties of the signature of paths. We do not provide all the details behind the proofs of these properties, but we emphasize that they are all straightforward consequences of classical integration theory. Several deeper results are discussed in the following Section~\ref{subsec:furtherTopics}, but only on an informal level.
\subsubsection{Invariance under time reparametrisations}
\input{time_repar}
\subsubsection{Shuffle product}\label{subsubsec:shuffle}
\input{shuffle_prod}
\subsubsection{Chen's identity}
\input{chen_identity}
\subsubsection{Time-reversal}
\input{time_reversal}
\subsubsection{Log signature}\label{subsubsec:logSig}
\input{log_Sig}
\subsection{Relation with rough paths and path uniqueness}\label{subsec:furtherTopics}
We conclude the first part of these notes with a brief discussion about the role of the signature in the theory of rough paths and the extent to which the signature is able to determine the underlying path. These topics are substantially more involved than the basic properties of the signature discussed above, and so we only offer an informal discussion.
\subsubsection{Rough paths}\label{subsubsec:roughPaths}
\input{rough_paths}
\subsubsection{Path uniqueness}
\input{path_uniqueness}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Practical Applications}
% or {\it polynomials of the signature}.
One of the practical applications of the signature transformation lies in the field of machine learning algorithms. As it has already been discussed, the signature summarizes important information about a path. When the path is composed of a sequential data stream $\{X_i\}$, the terms of the signature $S(X)^{ijk...}$ are good candidates for characteristic {\it features} of the data stream. The shuffle product property allows us to represent a non-linear function of the signature as a linear combination of iterated integrals. That is similar to basis function expansion and naturally applies to computations of regression models. In the next sections we will demonstrate numerical computations of signatures of paths from various data streams and applications of signatures to machine learning problems, regression and classification. Recently, the method of kernelization of the signature has been proposed \cite{kiraly2016kernels} and applied to hand movement classification problem \cite{sapsanis2013emg} from the UCI repository for machine learning.
%Section XX is devoted to application of signature to machine learning problems, regression and classification.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Elementary operations with signature transformation}
In the following sections we introduce the essential ingredients of the signature method and demonstrate how to perform basic computations with the signature.
\subsubsection{Paths from discrete data}
We start with basic computations of the signature applied to synthetic data streams. Consider three one-dimensional sequences of length four:
%
\begin{eqnarray}
\{X^1_i\}_{i=1}^4 &=& \{1,3,5,8\}\label{eq:twoOneDimSeq_1}\\
\{X^2_i\}_{i=1}^4 &=& \{1,4,2,6\}\label{eq:twoOneDimSeq_2}\\
\{t_i\}_{i=1}^4 &=& \{0,1,2,3\}\label{eq:twoOneDimSeq_3},
\end{eqnarray}
%
where the variable $\{t_i\}$ corresponds to the ordering of the terms in \eqref{eq:twoOneDimSeq_1}-\eqref{eq:twoOneDimSeq_2} and is normally interpreted as {\it time}. We are interested in transforming this discrete series into a continuous function - {\it a path}. Among various ways to find this transformation we focus on two main approaches:
%
\begin{enumerate}[label=(\alph*)]
\item piece-wise linear interpolation,
\item rectilinear interpolation (i.e. {\it axis path}).
\end{enumerate}
%
These two methods are present in Fig.~\ref{fig:twoInterpolations} for the 2-dim path comprised of \eqref{eq:twoOneDimSeq_2} and \eqref{eq:twoOneDimSeq_3}.
%
\begin{figure}[ht]
\centering
\captionsetup[subfigure]{justification=centering,singlelinecheck=false,position=top}
\begin{subfigure}[t]{0.45\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{pieceWise_X2}
\caption{Piece-wise linear interpolation of $\{t_i,X^2_i\}$.}
\label{fig:aLinear}
\end{subfigure}%%
\begin{subfigure}[t]{0.45\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{recti_X2}
\caption{Rectilinear interpolation of $\{t_i,X^2_i\}$.}
\label{fig:bRectilinear}
\end{subfigure}
\caption{Examples of two different interpolations.}
\label{fig:twoInterpolations}
\end{figure}
\noindent
%
The explicit parametrisations in Cartesian coordinates for the two methods read as~\eqref{eq:interpCartesian1} and~\eqref{eq:interpCartesian2}
%
\begin{align}
\{t_i,X^2_i\} &= \{(0,1),(1,4),(2,2),(3,6)\} \label{eq:interpCartesian1}\\
\{t_i,X^2_i\} &= \{(0,1),(1,1),(1,4),(2,4),(2,2),(3,2),(3,6)\}, \label{eq:interpCartesian2}
\end{align}
%
with three auxiliary points $\{(1,1),(2,4),(3,2)\}$ added to construct the rectilinear path in Fig.~\ref{fig:bRectilinear} denoted by empty red circles. For various numerical applications, the original data might be mapped into different forms to exhibit its structure. One of the examples of such a mapping is the \emph{cumulative sum}, or sequence of partial sums. More precisely the cumulative sum is defined as:
%
\begin{eqnarray}\label{eq:cumSumDef}
CS(\{X_i\}_{i=1}^{n}) = \{X_1,X_1+X_2,\dots,S_k,\dots,S_n\}\;;\;\;\;\;S_k = \sum_{i=1}^{k}X_i.
\end{eqnarray}
%
Using again the previous example \eqref{eq:twoOneDimSeq_2}, \eqref{eq:twoOneDimSeq_3}, a new path is:
%
\begin{eqnarray}
\{\tilde{X^2}\} = CS(X^2) &=& \{1, 5, 7, 13\}\\
\{t\} &=& \{0,1,2,3\},\nonumber
\end{eqnarray}
%
and applying the two different interpolations mentioned above, the paths are depicted in Fig.~\ref{fig:twoInterpolationsCumSum}, with added auxiliary points denoted by the empty red circles as in previous case.
%
%\begin{figure}[H]
%\captionsetup[subfigure]{justification=centering,singlelinecheck=false}
%\centering
% \subcaptionbox{Piece-wise linear interpolation of cumulative sum of $\{X^2_i\}$.\label{fig:aLinearCumSum}}%
% [.45\linewidth]{\includegraphics[width=0.35\linewidth]{pieceWise_CS_X2}}
% \subcaptionbox{Rectilinear path of cumulative sum of $\{X^2_i\}$.\label{fig:bRectilinearCumSum}}%
% [.45\linewidth]{\includegraphics[width=0.35\linewidth]{recti_CS_X2}}
%\caption{Examples of two different interpolations.}
%\label{fig:twoInterpolationsCumSum}
%\end{figure}
\begin{figure}[ht]
\centering
\captionsetup[subfigure]{justification=centering,singlelinecheck=false,position=top}
\begin{subfigure}[t]{0.33\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{pieceWise_CS_X2}
\caption{Piece-wise linear interpolation of $CS(X^2)$.}
\label{fig:aLinearCumSum}
\end{subfigure}%%
\begin{subfigure}[t]{0.33\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{recti_CS_X2}
\caption{Rectilinear interpolation of $CS(X^2)$.}
\label{fig:bRectilinearCumSum}
\end{subfigure}
\begin{subfigure}[t]{0.33\textwidth}
\centering
\includegraphics[width=0.9\linewidth]{new_LeadLag}
\caption{Lead-Lag transform of one-dimensional data $\{X^2_i\}$.}
\label{fig:newLeadLag}
\end{subfigure}
\caption{Examples of two different interpolations of $CS(X^2)$ (a)-(b) and Lead-Lag transform of $\{X^2_i\}$ (c).}
\label{fig:twoInterpolationsCumSum}
\end{figure}
\noindent
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{The lead-lag transformation}
%\input{lead_lag}
Another very important and interesting embedding is the \emph{Lead-Lag} transformation of data, which maps a one-dimensional path into a two-dimensional path. %: $\mathbb{R}\mapsto\{\mathbb{R},\mathbb{R}\}$.
Considering the sequence \eqref{eq:twoOneDimSeq_2}, the Lead-Lag mapping is given by:
%
\begin{equation}\label{eq:leadLagAlgo}
LeadLag\;:\;X^2 = \left\{1, 2, 4, 6\right\} \mapsto
\begin{cases}
X^{2,Lead}&= \left\{1, 4, 4, 2, 2, 6, 6\right\}\\
X^{2,Lag} &= \left\{1, 1, 4, 4, 2, 2, 6\right\}
\end{cases}
\end{equation}
%
and the resulting embedded path is presented in Fig.~\ref{fig:newLeadLag} with three additional points $\{(1,4),(4,2),(2,6)\}$.
%
%\begin{figure}[ht]
%\centering
% \includegraphics[width=0.4\linewidth]{new_LeadLag}
% \caption{Lead-Lag transform of $\{X^2_i\}$.}
% \label{fig:newLeadLag}
%\end{figure}
%\noindent
%
%We can define a {\it rectilinear} operator $\mathscr{R}$ which maps a discrete set of points into a continuous function on a rectangular grid:
%
%\begin{itemize}
%\item Rectilinear path (Fig.~\ref{fig:bRectilinear}): $\mathscr{R}(\{t_i, %X^2_i\})$
%\item Rectilinear cumulative sum path (Fig.~\ref{fig:bRectilinearCumSum}): $\mathscr{R}(\{t_i ,CS(X^2_i)\})$
%\item Lead-Lag path (Fig.~\ref{fig:newLeadLag}): $\mathscr{R}(\{X^{2,Lag}_i , %X^{2,Lead}_i\})$
%\end{itemize}
%
%This operator $\mathscr{R}$ increases the number of points in a sequence from $N$ to $2N-1$, resulting in additional coordinate points (indicated previously by empty red circles).
%: $\mathscr{R}: \{X^2_i\}_i=1^N\mapsto \{X^2_i\}_{i=1}^{2N-1}$
%We do not define here the operator $\mathscr{R}$ explicitly, but rather present the general idea. For real practical applications this operator is easily implemented with any programming software, being guided by the above examples.
%definition \eqref{eq:leadLagAlgo}.
%{\bf UNDERSTAND HOW TO DERIVE THIS OPERATOR $\mathscr{R}$ !!! Thanks Guy Flint.}
%
Consider two processes $\{X_t\}$ and $\{Y_t\}$ which follow each other's paths with a small time lag:
%
\begin{eqnarray}
X_{t+k} \propto Y_{t},\;\; k>0,
\end{eqnarray}
%
giving the name {\it Lead-Lag process}. Certain properties of the lead-lag process are easily captured by the signature of the path comprised of these processes $\{X_t,Y_t\}$~\cite{flint2015discretely}. This is demonstrated in the following example. Consider a path in $\mathbb{R}^2$ given by $X = \{X^1,X^2\}$. If an increase (resp. decrease) of the component $X^1$ is followed by an increase (resp. decrease) in the component $X^2$, then the area $A$ given by
\eqref{eq:LevyArea} is positive. If the relative moves of the components $X^1$ and $X^2$ are in the opposite direction, then the area $A$ is negative. In Fig.\ref{fig:exampleOfPositiveNEgativeArea} we can see how the area changes as we increase the endpoint.
%
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth]{curve_2.png}
\caption{Example of the change of the area enclosed by the curve and the chord at different endpoints.}
\label{fig:exampleOfPositiveNEgativeArea}
\end{figure}
\noindent
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{comment}
\begin{figure}[ht]
\centering
\captionsetup[subfigure]{justification=centering}
\begin{subfigure}[b]{0.45\linewidth}
\centering
\includegraphics[width=\linewidth]{curve_2}
\caption{Example of the change of the area enclosed by the curve and chord at different endpoints.}
\label{fig:exampleOfPositiveNEgativeArea}
\vspace{4ex}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=\linewidth]{rose}
\caption{Example of relative signs of data streams $\{X^1, X^2\} = \{\pm t, \pm t^2\}$ and their resulting signed areas.}
\label{fig:rose}
\vspace{4ex}
\end{subfigure}
\caption{Right panel (b): example of relative signs of data streams $\{X^1, X^2\} = \{\pm t, \pm t^2\}$ and their resulting signed areas. Red and blue areas correspond to positive and negative correlations respectively. The $``+,+"$ combination corresponds to the first quadrant $\{t, t^2\}$, $``-,+"$ corresponds to the second quadrant $\{-t, t^2\}$, and so on. Black arrows represent the direction of movement along the path.}
\label{fig:aabbcc}
\end{figure}
\noindent
\end{comment}
The notation here is: $A_{[X^1_i,X^1_f]}$ area between two points, where $(i,f)$ are {\it initial} and {\it final} endpoints along the direction of $X^1$. Moving at first from left to right (increasing the parameter $t$), $X^1$ and $X^2$ both increase, resulting in the increasing area $A_{ij}$: $A_{[0,3]} = 35$, $A_{[0,5]} = 179$. At some point ($X^1 = 6.72$) the area attains its maximum value $A_{[0,6.72]} = 296$ and after this point the area decreases as we increase the value of $X^1$. The total area between the two endpoints is $A_{[0,9]} = -393$.
The advantage of using the signature method is that any multivariate distribution of data could be represented as a path in a high-dimensional space $\mathbb{R}^d$. %If one is interested in the cross-correlation between different variables ($\{X^1_i\},\{X^2_i\},...\{X^d_i\}$) then one has to create a multi-dimensional path in $\mathbb{R}^d$.
For example, using the data \eqref{eq:twoOneDimSeq_1}-\eqref{eq:twoOneDimSeq_3} we can construct paths in $\mathbb{R}^2$ and $\mathbb{R}^3$ spaces, presented in Fig.~\ref{fig:2D} and Fig.~\ref{fig:3D} respectively.
%consider the linear piece-wise embedding of \eqref{eq:twoOneDimSeq_1}-\eqref{eq:twoOneDimSeq_3} in a 2-dim path $X(t) = \{X^1_i,X^2_i\}$ and 3-dim $X(t) = \{t_i,X^1_i,X^2_i\}$ which are plotted in Fig.~\ref{fig:2D} and Fig.~\ref{fig:3D} respectively.
%
\begin{figure}[ht]
\centering
\captionsetup[subfigure]{justification=centering}
\begin{subfigure}[b]{0.45\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{curve_2D}
\caption{2-dim path from two 1-dim paths $\{X^1_i,X^2_i\}$.}
\label{fig:2D}
\vspace{4ex}
\end{subfigure}%%
\begin{subfigure}[b]{0.5\linewidth}
\centering
\includegraphics[width=0.75\linewidth]{curve_3D}
\caption{3-dim path from three 1-dim paths $\{t_i,X^1_i,X^2_i\}$.}
\label{fig:3D}
\vspace{4ex}
\end{subfigure}
\caption{Examples of embedding a collection of one-dimensional paths into a single multi-dimensional path.}
% $\{\mathbb{R}_1,\mathbb{R}_2,...,\mathbb{R}_d\}\mapsto \{\mathbb{R}^d\}$.}
\label{fig:embedding2DAnd3D}
\end{figure}
\noindent
%In order to gain more intuition about the geometric properties of different embeddings, such as in Fig.~\ref{fig:twoInterpolations}, we should explore their properties in more details.
%The signed area of the embedded path (Fig.~\ref{fig:twoInterpolations}) is proportional to the relative {\it correlation} between the data streams. For example, two negatively (resp. positively) correlated data streams will result in a negative (resp. positive) area of the combined path.
%The following example demonstrates this idea.
%\begin{example}
%Consider the two dimensional data stream $\{X^1_t, X^2_t\}$ with $X^1(t) = t$, $X^2(t) = t^2$, ($t \in [0,10]$). Then there are four possibilities for embedding the data into a single path: $X = \{\pm t, \pm t^2\}$ which are depicted in Fig.~\ref{fig:rose}. A relative minus sign between $X^1$ and $X^2$ means that one component decreases while the other one increases, and vice versa.
%
%\begin{figure}[htb]
%\centering
%\includegraphics[scale=.4]{rose}
%\centering
%\caption{Example of relative signs of data streams $\{X^1, X^2\} = \{\pm t, \pm t^2\}$ and their resulting signed areas. Red and blue areas correspond to positive and negative correlations respectively. The $``+,+"$ combination corresponds to the first quadrant $\{t, t^2\}$, $``-,+"$ corresponds to the second quadrant $\{-t, t^2\}$, and so on. Black arrows represent the direction of movement along the path.}
%\label{fig:rose}
%\end{figure}
%\noindent
%This example illustrates the indicative property which relates the signed area of the embedded path to the relative correlation of individual data streams.
%\end{example}
%There are particular advantages and disadvantages of using different path parametrizations and the choice depends on the concrete application at hand. One of the widely used approaches is to compute the lead-lag transformation and use the axis path parametrization.
Another example of a multidimensional embedding involves the lead-lag transform. Here we include the time vector $t=\{0,1,2,3,4\}$ with $X=\{0,1,3,5,2\}$ and compute the lead-lag transform of $X$. The red dots represent the actual data points of the Cartesian ordered tuple:
%
\begin{eqnarray}
\{(t^{lead},X^{lead},X^{lag})_i\}\;=\;\{(0,0,0),(1,1,1),(2,3,3),(3,5,5),(4,2,2)\}.
\end{eqnarray}
%
Applying the axis-path interpolation, we get the path presented in Fig.~\ref{fig:3D_lead_lag_pic}.
%
\begin{figure}[ht]
\centering
\includegraphics[width=0.75\linewidth]{3D_lead_lag}
\caption{Example of a three dimensional lead-lag transform of the data $\{(t^{lead},X^{lead},X^{lag})_i\}$. The path is build by means of sequential increments along each Cartesian direction. This path allows to study the variance of $\{X\}$ as well as its time-dependent properties.}
\label{fig:3D_lead_lag_pic}
\end{figure}
\noindent
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{The signature of paths}
For a given path, one can compute its signature according to the rules and definition in the Sec.~\ref{sec:First}. We will present computations of signatures for various embeddings as presented in Figs.~\ref{fig:twoInterpolations}-\ref{fig:embedding2DAnd3D} and discuss their properties.
We start with the embedded path presented in Fig.~\ref{fig:embedding2DAnd3D}(a), for which the total increment and the signed area are depicted in Fig.~\ref{fig:signedArea1}.
%
\begin{figure}[ht]
\centering
\includegraphics[scale=0.4]{signed_area_1}
\caption{Example of signed area enclosed by the piece-wise linear path (blue) and the chord (red dashed line). The light blue area is negative and pink area is positive.}
\label{fig:signedArea1}
\end{figure}
\noindent
Computing the signature and the log signature of this path up to level $L=2$ gives:
%
\begin{eqnarray}
S(X) &=& (1, 7, 5, 24.5, 19, 16, 12.5) = (1,S^{(1)},S^{(2)},S^{(1,1)},S^{(1,2)},S^{(2,1)},S^{(2,2)})
\end{eqnarray}
%
and
\begin{eqnarray}
\log S(X) &=& (7, 5, 1.5) = (S^{(1)}, S^{(2)}, S^{[1,2]}),\nonumber
\end{eqnarray}
%
where the last term in $\log S(X)$ is given by $\frac{1}{2}(S^{(1,2)}-S^{(2,1)})$ and corresponds to the total area between the endpoints. The fact that it is positive means that the {\it pink} area is larger than the {\it light blue} one. The geometric interpretation of the second order terms $S^{(1,2)}$ and $S^{(2,1)}$ are presented in \fig{fig:areasS12andS21}.
\begin{figure}[htb]
\begin{minipage}{.45\linewidth}
\centering
\includegraphics[scale=.3]{area_S21_n}
\subcaption{Area given by the term $S^{(1,2)}$ = 19.\label{fig:areasS12andS21a}}
\end{minipage}%
\begin{minipage}{.45\linewidth}
\centering
\includegraphics[scale=.3]{area_S12_n}
\subcaption{Area given by the term $S^{(2,1)}$ = 16.}
\end{minipage}
\centering
\caption{The geometric meaning of the terms $S^{(1,2)}$ and $S^{(2,1)}$. The left panel (a) represents the area enclosed by the path and two perpendicular dashed lines passing through the endpoints of the path, while the right panel (b) shows another possibility for the area to be enclosed by the path and two perpendicular dashed lines passing through the endpoints.}
\label{fig:areasS12andS21}
\end{figure}
\noindent
Switching the order of integration over the path in the terms $S^{(1,2)}$ and $S^{(2,1)}$ gives rise to two areas which complete each other and add up to the total area of a rectangular with side lengths $X^1$ and $X^2$. This simple geometrical meaning is nothing but the shuffle product relation:
%
\begin{eqnarray}
S^{(1)}\cdot S^{(2)} &=& S^{(1,2)} + S^{(2,1)}\nonumber\\
5\cdot 7 &=& 19+16.
\end{eqnarray}
%
The geometric interpretation of the higher order terms is less intuitive and we omit this discussion.
%The geometric interpretation of the higher order terms is less intuitive, but one can think in terms of dimensional analysis: the first terms (which have a single index) correspond to a single integral, which has dimension of length to the power 1 (or \emph{length}): $S^{1},S^{2}\propto l^1$, second order terms contain two-fold iterated integrals, corresponding to length squared (or \emph{area}): $S^{i,j}\propto l^{2}$, third order terms correspond to three-fold integrals (or \emph{volume}): $S^{i,j,k}\propto l^3$. Continuing with this logic, one can view the signature transformation as an infinite expansion of hyper-volume objects: length, area, volume, etc. We leave further development of this intuition to the reader.
%
%
%\begin{eqnarray}
%logS(X) \propto (l^0,l^1,l^2,l_1^3,l_2^3,l_1^4,l_2^4,l_3^4,\dots)
%\end{eqnarray}
%
%but we leave further development of this intuition to the reader.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Rules for the sign of the enclosed area}
Before we continue, it is important to emphasize the significance of the direction in which we travel along a path and the sign of the area which it encloses. Consider the six possibilities in Fig.~\ref{fig:signedArePossibilities}
%
\begin{figure}[H]
\centering
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{pos_1}}
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{pos_2}}
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{pos_3}}
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{neg_1}}
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{neg_2}}
\subcaptionbox{}%
[.3\linewidth]{\includegraphics[height=3.5cm]{neg_3}}
\caption{Various possibilities of signed area. The first row (a)-(c) corresponds to counter clock-wise movement along the path, and the bottom row (d)-(f) to clock-wise movement.}
\label{fig:signedArePossibilities}
\end{figure}
\noindent
%
where we clearly see how direction of movement along the axis paths corresponds to the sign of the enclosed area. This is intimately related to the sign of the winding number of the path~\cite{BoedihardjoNi14}.
\begin{comment}
In order to gain more intuition about the geometric properties of different embeddings, such as in Fig.~\ref{fig:twoInterpolations}, we should explore their properties in more details. The signed area of the embedded path is proportional to the relative {\it correlation} between the data streams. For example, two negatively (resp. positively) correlated data streams will result in a negative (resp. positive) area of the combined path. The following example demonstrates this idea.
\begin{example}
Consider the two dimensional data stream $\{X^1_t, X^2_t\}$ with $X^1(t) = t$, $X^2(t) = t^2$, ($t \in [0,10]$). Then there are four possibilities for embedding the data into a single path: $X = \{\pm t, \pm t^2\}$ which are depicted in Fig.~\ref{fig:rose}. A relative minus sign between $X^1$ and $X^2$ means that one component decreases while the other one increases, and vice versa.
%
\begin{figure}[htb]
\centering
\includegraphics[scale=.4]{rose}
\centering
\caption{Example of relative signs of data streams $\{X^1, X^2\} = \{\pm t, \pm t^2\}$ and their resulting signed areas. Red and blue areas correspond to positive and negative correlations respectively. The $``+,+"$ combination corresponds to the first quadrant $\{t, t^2\}$, $``-,+"$ corresponds to the second quadrant $\{-t, t^2\}$, and so on. Black arrows represent the direction of movement along the path.}
\label{fig:rose}
\end{figure}
\noindent
This example illustrates an indicative property which relates the signed area of the embedded path to the relative correlation of individual data streams.
\end{example}
\end{comment}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Statistical moments from the signature}
Having established the basic rules we are ready to explore more important properties of the signature transformation. Combining several data streams $X = \{X_i\}$ into a single one allows us to compute statistical moments and cross correlations between the individual streams. In the next sections we present a close relation between the statistical moments of a set of data $X$ and the terms of signature $S(X)^{I}$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection*{Relationship between the lead-lag transformation and the variance of data}
Consider the lead-lag path Fig.~\ref{fig:newLeadLag} constructed from \eqref{eq:twoOneDimSeq_1}. We can decompose this figure into three right-angled isosceles triangles Fig.~\ref{fig:threeTriangls}. Note the direction of movement along this path, starting from the point $X^2_1$ and moving towards the end point $X^2_4$ corresponds to a negative sign, thus the total area will be negative. All three triangles have the same direction of movement resulting in the sum of their individual contributions.
\begin{figure}[H]
\centering
\includegraphics[scale = 0.3]{threeTriang}
\caption{Decomposition of the full lead-lag path into individual parts. The direction of movement along the path is shown by arrows.}
\label{fig:threeTriangls}
\end{figure}
\noindent
%
The absolute value of the total area is then given by:
%
\begin{eqnarray}\label{eq:areaExample}
|A| &=& \frac{1}{2}\left[\left(X^{2}_2 - X^{2}_1\right)\left(X^{2}_2 - X^{2}_1\right)+\right.\\\nonumber
&+& \left.\left(X^{2}_3 - X^{2}_2\right)\left(X^{2}_3 - X^{2}_2\right)+\right.\\\nonumber
&+& \left.\left(X^{2}_4 - X^{2}_3\right)\left(X^{2}_4 - X^{2}_3\right)\right]\\\nonumber
&=& \frac{1}{2}\left[(4-1)^2 + (2-4)^2 + (6-2)^2\right].
\end{eqnarray}
%
Let us write:
%
\begin{eqnarray}\label{eq:quadraticVar}
QV(X) = \sum_{i}^{N-1}\left(X_{i+1} - X_{i}\right)^2,
\end{eqnarray}
which has the simple meaning of the \emph{quadratic variation} of the path constructed from $\{X_i\}_{i=1}^N$ and is related to the \emph{variance} of the path. Thus one can generally write for any sequence $\{X_i\}_{i=1}^N$
%
\begin{eqnarray}\label{eq:qvar}
A_{Lead-Lag} = \frac{1}{2}QV(X).
\end{eqnarray}
%
The first order terms of the signature correspond to the total increments in each dimension, which are the same and equal to:
%
\begin{eqnarray}\label{eq:increas}
\Delta X^{2,Lead} = \Delta X^{2,Lag} = X^2_{4} - X^2_{1} = 6-1 = 5.
\end{eqnarray}
%
Putting all the terms together and omitting all unessential notation, we obtain the truncated log signature of $\{X^2\}$ from \eqref{eq:twoOneDimSeq_2} at level $L=2$:
%
\begin{eqnarray}\label{eq:logSigExampl}
\log S\left(X^2\right) = \left(\Delta X^2, \Delta X^2, \frac{1}{2}QV(X^2)\right) = (5,5,-14.5).
\end{eqnarray}
%
The only reason we are using the log signature above to present our result is because of its compactness and simplicity. One can easily rewrite the above result in terms of the signature with all the terms included:
%
\begin{eqnarray}
S(X^2) = (1, 5, 5, 12.5, -2, 27, 12.5).
\end{eqnarray}
%
We are free to work with either of these two representations of the signature, but certain applications will dictate the rationale behind a particular choice.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection*{The cumulative sum of a sequence}
Next we explore certain properties of paths which originate from embedding points using cumulative sums. Consider again the example \eqref{eq:twoOneDimSeq_2}. According to \eqref{eq:cumSumDef}, the cumulative sum of a sequence is:
%
\begin{eqnarray}
\tilde{X^2} &=& \{X^2_1,X^2_1+X^2_2,X^2_1+X^2_2+X^2_3,X^2_1+X^2_2+X^2_3+X^2_4\}\\
&=& \{1,5,7,13\}. \nonumber
\end{eqnarray}
%
Pairing the above with the time component \eqref{eq:twoOneDimSeq_3}, we get a 2-dim path as shown in Fig.~\ref{fig:bRectilinearCumSum}. Augmenting the original series $\{X_i\}$ with the zero value and truncating the signature of the new series $\{\tilde{X}\}$ at level $L$ will determine the statistical moments up to level $L$ of the original sequence. Explicitly, for any general sequence $\{X_i\}$:
%
\begin{eqnarray}\label{eq:zerocumSum}
\{X\}_i \rightarrow \{0,\{X\}_{i=1}^N\} \rightarrow CS(\{X\}_i) = \{\tilde{X}\}_{i=0}^N = \left\{0,X_1,X_1 + X_2,\dots \right\}.
\end{eqnarray}
%
One should pay attention to the indexing of the sequence, $i=1\rightarrow i=0$. As we have learnt from \eqref{eq:areaExample}-\eqref{eq:logSigExampl}, we can apply the lead-lag transform to the augmented sequence, compute the truncated signature at level $L=2$, and we will obtain quantities which are proportional to the first two statistical moments of the data points, namely \emph{mean} and \emph{variance}. For an arbitrary series $\{X\}_{i=1}^N$ and its cumulative sum representation $\{\tilde{X}\}_{i=1}^N$:
%
\begin{eqnarray}\label{eq:cumSumFirstTerm}
\Delta\tilde{X} &=& \sum_{i=1}^N X_i\\
QV(\tilde{X}) &=& \sum_{i=0}^{N-1}\left(\tilde{X}_{i+1} - \tilde{X}_{i}\right)^2 = \sum_{i=1}^{N} \left(X_i\right)^2
\end{eqnarray}
It is easy to see that these expressions are related to the {\it mean} and {\it variance} of $X$ if one makes use of the expected value. Namely, for a collection of data points $\{X_i\}_{i=1}^N$:
%
\begin{eqnarray}
%E[X]\;&=&\; \sum_{i=1}^N X_i \omega(X_i)\\
Mean(X)\;&=&\;E[X]\;=\;\frac{1}{N}\sum_{i=1}^N X_i\nonumber\;=\; \frac{\Delta\tilde{X}}{N}\;\;\;\text{(uniformly distributed data)}\\
Var(X)\;&=&\;E[\left( X-E[X]\right)^2]\;=\;E[X^2] - (E[X])^2\;=\;\frac{1}{N} \left( QV(\tilde{X}) - \frac{1}{N}(\Delta\tilde{X})^2\right)\nonumber
\end{eqnarray}
%
%where $\omega(X_i)$ is a distribution function (relative weight of each element) and, in the case of uniformly distributed $N$ values, equals to $\omega(X_i) = 1/N$.
Recall that the first two levels of the signature (log or full) correspond to the total increment and the L{\'e}vy area, which shows how these signature terms determine the first two statistical moments. Similarly, it is straightforward to demonstrate that the higher statistical moments can be obtained from the higher order signature terms.
\subsubsection*{Signature terms as a function of data points}
To make a closer connection and develop further the intuition behind the first terms of the signature of a data stream, we shall present two different examples of an embedding and the related signature terms. First, consider the cumulative lead-lag embedding of $N$ data points $\{X_i\}_{i=1}^N$ (according to \eqref{eq:zerocumSum}) into a continuous path [cf. Fig.~\ref{fig:newLeadLag}], then the resulting truncated signature at level $L=2$ is simply given by:
%
\begin{eqnarray}
S(\tilde{X})|_{L=2}\;=\;\left(1,S^{(1)},S^{(2)},S^{(1,1)},S^{(1,2)},S^{(2,1)},S^{(2,2)} \right)
\end{eqnarray}
%
with
%
\begin{eqnarray}\label{eq:cumsumLeadLagSigTerms}
S^{(1)}\;=\;S^{(2)}\;&=&\;\sum_{i}^NX_i\\
S^{(1,1)}\;=\;S^{(2,2)}\;&=&\;\frac{1}{2}\left(\sum_{i}^NX_i\right)^2\nonumber\\
S^{(1,2)}\;&=&\;\frac{1}{2}\left[\left(\sum_{i}^NX_i\right)^2 + \sum_{i}^NX_i^2\right]\nonumber\\
S^{(2,1)}\;&=&\;\frac{1}{2}\left[\left(\sum_{i}^NX_i\right)^2 - \sum_{i}^NX_i^2\right].\nonumber
\end{eqnarray}
%
Note that, although we computed the signature of the transformed data $\{\tilde{X}\}$, the final result is given in terms of the original untransformed data $\{X_i\}$.
Next, we consider the untransformed original data $\{X_i\}$ with the same lead-lag embedding which results in the following expression for the signature:
%
\begin{eqnarray}
S(X)|_{L=2}\;=\;\left(1,S^{(1)},S^{(2)},S^{(1,1)},S^{(1,2)},S^{(2,1)},S^{(2,2)} \right)
\end{eqnarray}
%
with
%
\begin{eqnarray}\label{eq:bareLeadLagSigTerms}
S^{(1)}\;=\;S^{(2)}\;&=&\;\sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\\
S^{(1,1)}\;=\;S^{(2,2)}\;&=&\;\frac{1}{2}\left(\sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\right)^2\nonumber\\
S^{(1,2)}\;&=&\;\frac{1}{2}\left[\left(\sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\right)^2 + \sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\right]\nonumber\\
S^{(2,1)}\;&=&\;\frac{1}{2}\left[\left(\sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\right)^2 - \sum_{i}^{N-1}\left(X_{i+1}-X_i\right)\right].\nonumber
\end{eqnarray}
%
Comparing \eqref{eq:cumsumLeadLagSigTerms} with \eqref{eq:bareLeadLagSigTerms}, one can immediately see how the cumulative sum of the terms affects the result. This observation is crucial for further applications of the signature approach, since each individual problem should be treated in the most suitable way. As an illustrative example, one can derive the empirical sample mean and sample variance from the signature terms. Considering data $\{X_i\}_{i=1}^N$ with the cumulative sum and the lead-lag embedding (as demonstrated in \eqref{eq:cumsumLeadLagSigTerms}), a bit of algebra brings us to:
%
\begin{eqnarray}
Mean(X)\;&=&\;\frac{1}{N}S^{(1)}\\
Var(X)\;&=&\;-\frac{N+1}{N^2}S^{(1,2)} + \frac{N-1}{N^2}S^{(2,1)},\nonumber
\end{eqnarray}
%
where $N$ is the total number of data points in the sample. The possible caveat here is the degeneracy in the terms of the signature, causing this representation not to be unique and introducing a problem of colinearity of the signature terms. One of the standard approaches to resolve this problem is the shrinkage techniques, such as the LASSO \cite{tibshirani1996regression}, ridge or their hybrid combination known as the elastic net regularization \cite{zou2005regularization}.
% but for the {\it feature selection} procedure this does not matter, since a penalisation scheme (for example LASSO) will choose the best linear combination. This example demonstrates how the usual statistical moments are given by linear combinations of the terms of the signature.
%, and, as previously mentioned, higher order statistical moments are obtained in a similar way (as linear combinations of the signature terms) from the truncated signature at higher levels.
\begin{comment}
Working with the terms of the signature represents a more general way of looking at the usual statistical moments. The signature terms
%, also known as signature {\it coordinates} or {\it projections}
serve as descriptive statistics of data embedded into a path. As we have seen above, different functions applied to the signature terms $S^I(X)$ can result in familiar quantities (like $mean$ and $variance$), whilst other non-linear combinations of these terms may unveil more information hidden in the data. This process can be roughly presented in Fig.~\ref{fig:statSigComparison}:
%
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{sigStat}
\caption{Conceptual comparison between the statistical approach to data and the signature approach. The signature transformation generates terms $S^I(X)$ which can be more flexible for data description.}
\label{fig:statSigComparison}
\end{figure}
\noindent
\end{comment}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%{\bf STILL UNCLEAR HOW TO RELATE SUM OF SQUARED ELEMENTS TO VARIANCE OR MOMENT}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{comment}
\subsubsection{Reconstruction of data from its signature}
For the rectilinear embedding of data points it is possible to get back the original data from the signature terms. We first briefly explain the theoretical background of the method \cite{lyons2011inversion,lyons2014inverting} and then demonstrate an application of this method to time-series. Consider a path embedded from some data points by a rectilinear interpolation. Such paths are also known as {\it axis} paths, since each movement along the path is parallel to the Euclidean coordinate axis. Consider first a path obtained from a single data point. Denoting the direction of axis by $\{e_1,e_2,\dots,e_d\}$ and the increment along each axis by $\{r_1,r_2,\dots,r_d\}$ in $d$-dimension, the endpoint of the path can be written as:
%
\begin{eqnarray}
X\;=\;r_1e_1 + r_2e_2 +\dots + r_de_d
\end{eqnarray}
%
then by multiplicativity, its full signature is given by:
%
\begin{eqnarray}
S(X)\;=\;e^{r_1 e_1}e^{r_2 e_2}\dots e^{r_d e_d}.
\end{eqnarray}
%
One can readily see that the signature term with the multi-index $I_k=\{e_1 e_2\dots e^2_k \dots e_d\}$ is given by:
%
\begin{eqnarray}
S^{I_k}\;=\;\frac{1}{2}r_1 r_2 \dots r_k^2\dots r_d,
\end{eqnarray}
%
from which it follows that:
%
\begin{eqnarray}
r_k\;=\;\frac{2 S^{I_k}(X)}{S^{I_0}(X)},
\end{eqnarray}
%
where $I_0 = \{e_1 e_2 e_3 \dots e_d\}$, thus recovering the length of each straight line component. Next we briefly review the example from \cite{levin2015learning} [cf. Section 4.1.1] where this method is presented in full detail.
Suppose that $0<m<n\le N$, $m,n\in \mathbb{N}$, then the signature of a time-series $\{t_i,X_i\}_{i=m}^n$ uniquely determines the time-series $\{t_,X_i\}_{i=m}^n$ itself. More precisely, given a rectilinear path consisting of $N$ points, the truncated signature at level $N+1$ can reconstruct the original path. Consider time-series presented in Fig.~\ref{fig:bRectilinear} and given by \eqref{eq:twoOneDimSeq_2}-\eqref{eq:twoOneDimSeq_3}, then:
%
\begin{eqnarray}
\Delta X = T^{-1} S,
\end{eqnarray}
%
where
%
\begin{eqnarray}
\Delta X = \left(\begin{matrix}
X_1\\
X_2 - X_1\\
X_3 - X_2\\
X_4 - X_3\\
\end{matrix}\right)\;;\;\;
T = \left(\begin{matrix}
1 & 1 & 1 & 1\\
t_1 & t_2 & t_3 & t_4\\
t_1^2 & t_2^2 & t_3^2 & t_4^2\\
t_1^3 & t_2^3 & t_3^3 & t_4^3
\end{matrix}\right)\;;\;\;
S = \left(\begin{matrix}
0!S^{2}(X)\\
1!S^{(1,2)}(X)\\
2!S^{1,1,2}(X)\\
3!S^{1,1,1,2}(X)
\end{matrix}\right).
\end{eqnarray}
%
One can see that the rectilinear embedding allows us to simplify computation of signature terms. Given a multi-index $I = \{1,1,...1,2\}$ with $k-1$ copies of $1$, results in:
%
\begin{eqnarray}
S^I\;=\; \frac{1}{k!}t_1^k X_1 + \sum_{i=1}^{n-1}\frac{1}{k!}t_i^k\left(X_{i+1} - X_i\right)
\end{eqnarray}
%
This result also means that time-series $\{X_i\}_{i=1}^n$ can be represented as a linear functional on its signature of the embedded path $\{t_i,X_i\}_{i=1}^n$.
\end{comment}
\subsection{The signature in machine learning}
\input{signature_in_machine_learning}
\subsubsection{Application of the signature method to data streams}
In this section we demonstrate an explicit example of an application of the signature method to classification of time-series. This method is moreover easily applied to analysis of sequential data of any type. In the next section we overview some of the recent applications of the signature method to various problem in machine learning.
We aim at learning a classifier which discriminates between two types of univariate time-series, synthetically simulated using the $ARMA(p,q)$ model. The difference between time-series is encoded in different value of the model parameters. Consider a collection of observations of time-series $\{Y_{i,j}\}$ labeled by two indices $i,j$, where the first index $i$ denotes each distinct time-series and the second index $j$ accounts for the measurement at time $t_j$. %It is convenient to organize this type of data set into a two-dimensional matrix of size $N\times P$, with $i = 1,...,N $ and $j = 1,...,P$. To demonstrate a toy-model example of time-series classification, we consider a general $ARMA$ model, where the difference between two models is characterized by different value of variables $(p,q)$.
The $ARMA(p,q)$ model is {\bf A}uto{\bf R}egressive {\bf M}oving {\bf A}verage model with parameters $p$ (the order of the autoregressive model) and $q$ (the order of the moving-average model). This is a superposition of the autoregressive $AR(p)$ and the moving-average $MA(q)$ models:
%
\begin{eqnarray}
\textit{AR(p)}\;&:& Y_t = \phi_0 + \phi_1 Y_{t-1} + \phi_2 Y_{t_2} + \dots + \phi_p Y_{t-p} + \epsilon_t \\
\textit{MA(q)}\;&:& Y_t = \mu + \epsilon_t + \theta_1\epsilon_{t-1} + \theta_2\epsilon_{t-2} + \dots + \theta_q \epsilon_{t-q}, \nonumber
%\textit{I(d)}\;&:&\;L^d Y_t = Y_{t-d}\nonumber
\end{eqnarray}
%
where $\mu$ is the mean of the series, $\theta_i$ with $\phi_i$ are the parameters of the models and $\epsilon_{t-i}$ is the white noise error term. We are not diving into the mathematical foundation of the model, but rather focus on its application. To demonstrate how the feature extraction method works in this case, we create a binary classification problem using the ARMA model. We generate 1000 distinct time-series (500 time-series of each class) of length 100. In this particular, the case two classes correspond to the following models:
%
\begin{eqnarray}\label{eq:arma101}
\textit{class ``0"}\;: Y_t - 0.4Y_{t-1}\;=\;0.5 + \epsilon_t + 0.5\epsilon_{t-1}\\
\textit{class ``1"}\;: Y_t - 0.8Y_{t-1}\;=\;0.5 + \epsilon_t + 0.7\epsilon_{t-1}\nonumber
\end{eqnarray}
%
where $\epsilon_t$ is normally distributed with zero mean and unit variance. An example of a time-series from each class is depicted in Fig.~\ref{fig:arimaTimeSeries}.
%
\begin{figure}[htb]
\centering
\includegraphics[width=0.5\linewidth]{arma_011}
\centering
\caption{Example of time-series $Y_{i}$ from two distinct classes generated from ARMA(1,1) model specified by \eqref{eq:arma101}.}
\label{fig:arimaTimeSeries}
\end{figure}
\noindent
%
To give a simple intuitive picture, the resulting two-classes time-series data $\{Y_i\}$ and their class labels are organised in a matrix form:
\begin{center}
\begin{tabular}{cccccc|c}
$t_{1}$ & $t_{2}$ & $t_{3}$ & $t_{4}$ & $\dots$ & $t_{100}$ & Class \\
\hline
$Y_{1,1}$ & $Y_{1,2}$ & $Y_{1,3}$ & $Y_{1,4}$ & $\dots$ & $Y_{1,100}$ & 0 \\
$Y_{2,1}$ & $Y_{2,2}$ & $Y_{2,3}$ & $Y_{2,4}$ & $\dots$ & $Y_{2,100}$ & 0 \\
$Y_{3,1}$ & $Y_{3,2}$ & $Y_{3,3}$ & $Y_{3,4}$ & $\dots$ & $Y_{3,100}$ & 0 \\
$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
$Y_{500,1}$ & $Y_{500,2}$ & $Y_{500,3}$ & $Y_{500,4}$ & $\dots$ & $Y_{500,100}$ & 0 \\
$Y_{1,1}$ & $Y_{1,2}$ & $Y_{1,3}$ & $Y_{1,4}$ & $\dots$ & $Y_{1,100}$ & 1 \\
$Y_{2,1}$ & $Y_{2,2}$ & $Y_{2,3}$ & $Y_{2,4}$ & $\dots$ & $Y_{2,100}$ & 1 \\
$Y_{3,1}$ & $Y_{3,2}$ & $Y_{3,3}$ & $Y_{3,4}$ & $\dots$ & $Y_{3,100}$ & 1 \\
$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
$Y_{500,1}$ & $Y_{500,2}$ & $Y_{500,3}$ & $Y_{500,4}$ & $\dots$ & $Y_{500,100}$ & 1 \\
\end{tabular}
\end{center}
%
We outline the essential steps of the procedure.
\begin{itemize}
\item create a continuous path $X_i$ from each time-series $\{Y_i\}$ (row-wise)
\item if needed, make use of the lead-lag transform to account for the variability in data
\item compute the truncated signature $S(X_i)|_L$ of the path $X_i$ up to level $L$
\item use the terms of signature $\{S_i^I\}$ as features
\end{itemize}
%
Following the aforementioned steps, each observation $\{Y_i\}$ is converted into a two-dimensional path. We also used a cumulative sum transformation \eqref{eq:zerocumSum}:
\begin{eqnarray}
X_i = \left\{\left(\tilde{Y}^{lead}_i,\tilde{Y}^{lag}_i\right)\right\},
\end{eqnarray}
%
and then the signature terms are computed:
\begin{eqnarray}
S(X_i)\;=\;\left(1, S_i^{(1)}, S_i^{(2)}, S_i^{(1,1)}, S_i^{(1,2)},\dots, S_i^{I},\dots\right).\end{eqnarray}
The resulting feature matrix has the form:
\begin{center}
\begin{tabular}{cccccc|c}
\multicolumn{6}{c}{Feature Set} & Class\\
%& & & & Feature & Set & Class \\
\hline
$\hat{S}_1^{(1)}$ & $\hat{S}_1^{(2)}$ & $\hat{S}_1^{(1,1)}$ & $\hat{S}_1^{(1,2)}$ & $\dots$ & $\hat{S}_1^{I}$ & 0 \\
$\hat{S}_2^{(1)}$ & $\hat{S}_2^{(2)}$ & $\hat{S}_2^{(1,1)}$ & $\hat{S}_2^{(1,2)}$ & $\dots$ & $\hat{S}_2^{I}$ & 0 \\
$\hat{S}_3^{(1)}$ & $\hat{S}_3^{(2)}$ & $\hat{S}_3^{(1,1)}$ & $\hat{S}_3^{(1,2)}$ & $\dots$ & $\hat{S}_3^{I}$ & 0 \\
$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
$\hat{S}_{500}^{(1)}$ & $\hat{S}_{500}^{(2)}$ & $\hat{S}_{500}^{(1,1)}$ & $\hat{S}_{500}^{(1,2)}$ & $\dots$ & $\hat{S}_{500}^{I}$ & 0 \\
$\hat{S}_1^{(1)}$ & $\hat{S}_1^{(2)}$ & $\hat{S}_1^{(1,1)}$ & $\hat{S}_1^{(1,2)}$ & $\dots$ & $\hat{S}_1^{I}$ & 1 \\
$\hat{S}_2^{(1)}$ & $\hat{S}_2^{(2)}$ & $\hat{S}_2^{(1,1)}$ & $\hat{S}_2^{(1,2)}$ & $\dots$ & $\hat{S}_2^{I}$ & 1 \\
$\hat{S}_3^{(1)}$ & $\hat{S}_3^{(2)}$ & $\hat{S}_3^{(1,1)}$ & $\hat{S}_3^{(1,2)}$ & $\dots$ & $\hat{S}_3^{I}$ & 1 \\
$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
$\hat{S}_{500}^{(1)}$ & $\hat{S}_{500}^{(2)}$ & $\hat{S}_{500}^{(1,1)}$ & $\hat{S}_{500}^{(1,2)}$ & $\dots$ & $\hat{S}_{500}^{I}$ & 1 \\
\end{tabular}
\end{center}
%
%where the element $S_i^I$ corresponds to $I$-th signature term of $i$-th times series observation.
It is usual practice to standardise the signatures column-wise, where the {\it hat} corresponds to standardised values, computed by subtracting from each value $S_i^I$ the column mean and dividing by the column standard deviation.
For sake of simplicity, we compute the truncated signature up to level $L=2$, remove the first constant term and thus produce a 6-dimensional feature space. The example of the signature and the log-signature terms projected on the two dimensional plane are presented in Fig.~\ref{fig:exampleOfSignature}.
\begin{figure}[H]
\centering
\subcaptionbox{\label{fig:sigfets}}%Mean and standard deviation as feature space for two classes.}%
[.47\linewidth]{\includegraphics[width=0.5\linewidth]{sigFeat_56_1}}
\centering
\subcaptionbox{\label{fig:logsigfets}}%Terms of log signature of path embedded from the data.}%
[.47\linewidth]{\includegraphics[width=0.5\linewidth]{logSigFeat_56}}
\caption{Feature extraction from ARMA(1,1) time-series. The left panel (a) represents two signature terms $S^{(1,2)}$ and $S^{(2,1)}$, while the right panel (b) shows the first and the third terms of log-signature $\log S^{1}$,$\log S^{[1,2]}$.}
\label{fig:exampleOfSignature}
\end{figure}
\noindent
%
Since we are not aiming to compare different classification algorithms, but rather to demonstrate the signature method at work, we arbitrarily choose a standard logistic regression algorithm with LASSO \cite{tibshirani1996regression} penalization scheme. The relevant features which are selected by LASSO are: $$\left\{S^{(1)}, S^{(2)}, S^{(1,2)}, S^{(2,1)}\right\}.$$ The classification results are summarised in Table~\ref{tab:tab2}.
\begin{table}[htb]
\centering
\subcaptionbox{Training data set (70$\%$)\\ with accuracy 0.92\label{tab:tabA}}
[.48\linewidth]
{
\begin{tabular}{|c|c|c|}
\hline
\diagbox[width=8em]{True}{Predicted} & 0 & 1 \\
\hline
0 & 326 & 20 \\
\hline
1 & 35 & 319 \\
\hline
\end{tabular}
}
\centering
\subcaptionbox{Testing data set (30$\%$)\\ with accuracy 0.90 \label{tab:tabB}}
[.47\linewidth]
{
\begin{tabular}{|c|c|c|}
\hline
\diagbox[width=8em]{True}{Predicted} & 0 & 1 \\
\hline
0 & 139 & 15 \\
\hline
1 & 14 & 132 \\
\hline
\end{tabular}
}
\caption{Confusion matrix of the classification showing both the training and the testing data sets results.}
\label{tab:tab2}
\end{table}
\noindent
Using the full signature for feature extraction is conceptually similar to working with basis functions. Having obtained the signature terms as representing features of data, one can continue further with standard methods in machine learning to solve problems.
\subsubsection{Dealing with missing data in time-series}
Sometimes sequential observations are not complete and some values might be missing due to various reasons. For example in medical follow up studies patients may not provide response data at required times due to personal reasons or clinical conditions. There are many ways to deal with missing data, for example imputing, various sophisticated interpolation methods, Gaussian smoothing kernels, and many more techniques are thoroughly studied and described in the literature. These methods might perform well and even result in robust analysis and predictions, but conceptually, imputing missing values may change the underlying information about initial data and thus create biased analysis which masks the original message.
One of the methods to treat missing values is to introduce a new binary variable: {\it indicator} matrix $R_{ij}$ along with observations $Y_{ij}$, where $i$ corresponds to individual time-series and $j$ denotes a time instance as explained in \cite{diggle2002analysis}. The elements of the indicator matrix are defined by:
%
\begin{eqnarray}
R_{ij}\;=\;
\left\{
\begin{array}{ll}
0 & \;\;\mbox{if } Y_{ij}\;\; \mbox{observed}, \\
1 & \;\;\mbox{if } Y_{ij}\;\; \mbox{is missing}.
\end{array}
\right.
\end{eqnarray}
%
The data might be of three major types:
%
\begin{itemize}
\item MCAR - missing completely at random: missingness does not depend on data at all $P(M|Y, \theta) = P(M|\theta)$
\item MAR - missing at random: missingness does not depend on the unobserved data,
but does depend on the observed values $P(M|Y, \theta) = P(M|Y_{obs}, \theta)$
\item NMAR - not missing at random: missingness depends on the unobserved data $P(M|Y, \theta) = P(M|Y_{miss}, \theta)$
\end{itemize}
A common approach to treat missing vales is to base inference on the likelihood function for the incomplete data by treating the indicator matrix $R_{ij}$ as a random variable. Specifying the joint distribution of $R_{ij}$ and $Y_{ij}$ together with the Expectation-Maximisation algorithm is usually the method of choice.
The signature framework naturally allows us to embed the indicator vector (a single row of the indicator matrix $R_{ij}$) into the path by lifting the path in to higher dimension. For example, consider a time-series with several missing values and its corresponding indicator vector (here the index $i$ is fixed):
%
\begin{eqnarray}%\label{eq:missing_data}
Y_j\;&=&\;\{1,3,\star,5,3,\star,\star,9,3,5\}\\
R_j\;&=&\;\{0,0,1,0,0,1,1,0,0,0\},\nonumber
\end{eqnarray}
%
where the symbol ``$\star$" denotes a missing value at the expected time point. The idea is to create a two dimensional path from this data. The evolution of the path is from the starting point towards the end and can be seen as propagation in three dimensional space; the first two dimensions are ``observed data" and ``missing data", while the third direction corresponds to time. At every time point where we have a missing point, we jump from the ``observed" to the ``missing" dimension and fill in the missing place with the same value as seen before (a.k.a {\it feed forward} method). The intuition is simple: unless we have any new information about the data, we continue walking along a ``missing" axis direction, which is in another dimension than the ``observed" data. The resulting path is given by \eqref{eq:missing_data}
%
\begin{eqnarray}\label{eq:missing_data}
\tilde{Y}_{j} = \{(0,1,0),(1,3,0),(2,{\bf 3},1),(3,5,1),(4,3,1),(5,{\bf 3},2),(6,{\bf 3},3),(7,9,3),(8,3,3),(9,5,3)\}.\nonumber\\
\end{eqnarray}
%
Here we introduce an auxiliary time parametrisation vector $t\;=\;\{0,1,2,\dots,9\}$ to account for the time propagation and create a path in three-dimensional space as depicted in Fig.~\ref{fig:missingData}. Red points represent the missing data. The path propagates from $t=0$ to $t=9$, and the observed points lie in the plane $\{t,Y\}$, while in the presence of a missing value, the path jumps along the increasing direction of $R$ axis.
\begin{figure}[htb]
\centering
\includegraphics[width=0.8\linewidth]{missVal_1}
\centering
\caption{Example of embedding of data with missing values into a single path. The red dots represent unobserved data.}
\label{fig:missingData}
\end{figure}
\noindent
This approach allows us to treat data streams with unobserved data at the same footing as complete data streams, which demonstrates another conceptual advantage of the signature framework.
\subsection{Computational considerations of the signature}
So far, we have presented a theoretical background and practical applications of this method, but nothing has been mentioned about exact numerical computations of the signature and iterated integrals of paths. As it has been defined in \eqref{eq:definSig}, the terms of the signature are iterated integrals of a path, while the path is normally constructed by an interpolation of data points. One can compute such iterated integrals using several computational algorithms(cubature methods) which are generally straightforward to implement. The research group at the Oxford-Man Institute (University of Oxford, UK) works with a particular implementation of such algorithms written in C++ ({\it CoRoPa} project) \footnote{http://coropa.sourceforge.net/} with Python wrapper package {\it sigtools}. Research groups from other universities have successfully implemented computations of iterated integrals with Matlab\texttrademark.
\subsection{Overview of recent progress of the signature method in machine learning}
We would like to devote this final section to an overview of the applications of the signature method to various problems in machine learning and data analysis which have appeared in the literature. The application areas are quite wide, including financial data, sound compression, time-series analysis, medical data, and image recognition tasks.
\subsubsection{Extracting information from the signature of a financial data stream}
Field {\it et al.}~\cite{gyurko2014extracting} have applied the signature transformation to financial data streams to find hidden patterns in trading strategies. The authors presented several examples of learning from data and further classification of unseen streams. The advantage of using the signature method is its ability to represent data using a small set of features which captures the most important properties of data in a non-parametric way without traditional statistical modelling. In their first experiment, the authors looked for atypical market behaviour across standard 30-minute time buckets obtained from the WTI crude oil future market. In the second experiment, they aimed to distinguish between orders generated by two different trade execution algorithms. We will overview their methodology and results.
As we have already seen, the basics steps within the signature approach is to convert data into paths and then compute the iterated integrals of the resulting paths. In~\cite{gyurko2014extracting}, the authors considered the following data streams:
%
\begin{itemize}
\item $P^a$ : best ask price
\item $P^b$ : best bid price
\item $V^a$ : number of orders at best ask price
\item $V^b$ : number of orders at best bid price
\item $C$\; : cumulative traded volume
\end{itemize}
%
The final path was constructed from an embedding of normalisations of these streams. The normalisation was introduced in order to standardise the data and remove any spurious patterns. The ask and bid prices were transformed into the {\it mid price} $p_{t}$ and the {\it spread} $s_t$. Also, they included normalised time as $u_t$ and imbalance $d_t$. The details of the normalisation and transformation are described in~\cite{gyurko2014extracting}. The path is then:
%
\begin{eqnarray}
X\;=\; \left\{\left(u_{t_i},p_{t_i},s_{t_i},d_{t_i},c_{t_i}\right)_{i=0}^N\right\}
\end{eqnarray}
%
In order to capture the quadratic variation of the price, the path is extended by means of a lead-lag transform:
%
\begin{eqnarray}\label{eq:6dim-path}
Z\;=\; \left\{\left(u_{t_i}^{lead},p_{t_i}^{lead},s_{t_i}^{lead},d_{t_i}^{lead},c_{t_i}^{lead},p_{t_i}^{lag}\right)_{i=0}^N\right\}
\end{eqnarray}
%
Notice, if one is interested in the quadratic variation of any other variables, then the ``lag" transformations of these variables should be included in the resulting path.
The aim is to learn a discriminant function which can classify new streams based on features extracted from signature of paths embedded from the data. The classification method was chosen as linear regression combined with LASSO shrinkage in order to select relevant terms in the signature. To measure the significance of separation, the authors used the non-parametric Kolmogorov-Smirnov test, and the receiver operating characteristic (ROC) curve and the area under the curve.
The objectives of the first experiment in~\cite{gyurko2014extracting} are WTI crude oil futures, sampled by minutes from standard 30-minutes interval between 09:30-10:00, 10:30-11.00, and 14:00-14:30. Considering the 6-dimensional input path \eqref{eq:6dim-path} and its truncated signature at level $L=4$, there are 1555 signature terms in total, but successful application of the LASSO algorithm allowed to select four terms which are the most informative. The results are illustrated in Fig~\ref{fig:GregsPics}. The upper panels show a visible separation between two groups plotted on the feature planes $S^{(1,5,1,5,)},S^{(5,1,5,1)}$ (\ref{fig:greg_1a}) and $S^{(5,1,5,1)},S^{(1,5,5,1)}$ (\ref{fig:greg_1b}) respectively. The bottom panels demonstrate estimated densities of regressed values with KS distance 0.9 (training) and 0.91 (out-of-sample) and 95$\%$ accuracy \ref{fig:greg_1c}. The ROC curve of the classifier with AUC = 0.986 (out-of-sample AUC 0.984) is presented in \ref{fig:greg_1d}.
%
\begin{figure}[H]
\centering
\subcaptionbox{\label{fig:greg_1a}}%
[.48\linewidth]{\includegraphics[width = 0.4\linewidth]{G_1}}
\subcaptionbox{\label{fig:greg_1b}}%
[.48\linewidth]{\includegraphics[width = 0.4\linewidth]{G_2}}
\subcaptionbox{\label{fig:greg_1c}}%
[.48\linewidth]{\includegraphics[scale=0.265]{G_10}}
\subcaptionbox{\label{fig:greg_1d}}%
[.48\linewidth]{\includegraphics[scale=0.355]{G_20}}
\caption{Visible separation between two groups projected onto $S^{(i,j,k,l)}$ feature plane (upper panels) and accuracy of separation (bottom panels). Courtesy of Field {\it et al.}~\cite{gyurko2014extracting}.}
\label{fig:GregsPics}
\end{figure}
\noindent
%
The results from the second experiment of classification of trading algorithms are presented in Fig.~\ref{fig:GregsPics2}. The aim is to classify the traces of trade execution algorithm. The data streams are sampled from the FTSE 100 index future market (NYSE Liffe) with the same transformation as described earlier. The beginning and the end of the streams are defined by the start and the end of parent orders generated by two different trade algorithms which are denoted by $A$ and $B$. Left panel \ref{fig:greg_2a} shows the estimated densities of regressed values with KS distance of 0.66 (0.518) with accuracy 82$\%$ (74.3$\%$) for training (out-of-sample) data sets. The right panel shows the ROC curve of the classifier with the AUC 0.892 (0.777) for training (out-of-sample) sets respectively.
%
\begin{figure}[H]
\centering
\subcaptionbox{\label{fig:greg_2a}}%
[.48\linewidth]{\includegraphics[scale=0.265]{G_ab_1}}
\subcaptionbox{\label{fig:greg_2b}}%
[.48\linewidth]{\includegraphics[scale=0.355]{G_ab_2}}
\caption{Result of classification of two trading algorithms. Courtesy of Field {\it et al.}~\cite{gyurko2014extracting}.}
\label{fig:GregsPics2}
\end{figure}
\noindent
%
The conclusions and numerical results of this work demonstrate a great potential for applications of the signature method to various problems in financial data.
\subsubsection{Sound compression - the rough paths approach}
This research project dates back to 2005, when T. Lyons and N. Sidorova worked on the application of rough paths theory to the problem of sound compression \cite{lyons2005sound}. They presented a new approach which turned out to be more effective than the traditional Fourier and wavelet transforms. The main difference between these methods is in the linearity of the Fourier approach, while the signature method accounts for non-linear dependencies. Consider a problem of digital compression of a continuous multi-dimensional signal $X$. Assuming that the signal is measured on a fine time scale, the signal can be seen as a continuous piece-wise linear path. Computing the signature of the resulting path, will produce signature terms $S^I(X)$ which represent the coefficients of compression of the original signal. The authors of~\cite{lyons2005sound} presented an efficient algorithm for reconstruction of the original signal $X$ from its signature terms.
\subsubsection{Character recognition}
Paths as geometric objects are legitimate candidates for applications to image recognition tasks. For example, hand written digits can be seen as continuous paths, and then the signature method becomes a natural approach to classification problems. The signature method has been successfully applied to the challenging problem of Chinese character recognition by B. Graham \cite{graham2013sparse}, and later by J. Lianwen \cite{yang2015deepwriterid} to a more general problem of hand written character recognition. Graham and Lianwen have shown (separately) that using signature terms as features of the image, for use in a convolutional neural network (CNN), significantly improved accuracy of online character recognition. This approach, which combines the signature and CNN methods, has won the ICDAR2013 Online Isolated Chinese Character recognition competition receiving $0.95530$ accuracy\footnote{http://tinyurl.com/nfvbdlk}. The group of J. Lianwen has developed the application\footnote{http://www.deephcr.net/en.html} with graphical user interface for character recognition. This application is based on the signature method for feature extraction from elements of images.
These successful results indicate that applications of the signature method combined with deep neural networks represent a new and efficient way to tackle challenges in the field of image recognition.
\subsubsection{Learning from the past, predicting the statistics for the future, learning an evolving system}
In~\cite{levin2015learning}, Levin, Lyons, and Ni address an application of the signature method to time-series analysis and develop a new regression method based on the expected signature of paths. This method of linear regression on the signature of data streams is general and allows explicit computations and predictions. The main goal of this approach is to identify the specific feature set of the observed data and linearise the functional relationships between them (features). The authors introduced {\it the expected signature model} as a linear mapping: $L: X\mapsto Y$
%
\begin{eqnarray}
Y = L(X) + \epsilon,
\end{eqnarray}
%
with $E[\epsilon]=0$ and $X\in T((\R^d)),\; Y\in T((\R^e))$, where
\begin{eqnarray}
T((\R^d)) = \bigoplus_{n=0}^{\infty} (\R^d)^{\otimes n}
\end{eqnarray}
%
is the algebra of tensor series over $\R^d$. We briefly outline the main idea of this model. Consider the univariate time-series ({\it returns}) denoted by $\{r_i\}_{i=1}^N$ and some fixed $k\in \mathbb{N}$, such that $1 < k < N$. Define the {\it p-past} returns up to time $t_k$ by $F_k = \{r_i\}_{i=k-p}^k$ and the {\it q-future} returns (from time $t_{k+1}$) by $G_{k+1} = \{r_i\}_{i=k+1}^{k+q}$. The signatures of $F_k$ and $G_{k+1}$ are respectively:
%
\begin{eqnarray}\label{eq:pastFutureSig}
X_k &=& S\left(\{t_i,r_i\}_{i=k-p}^k\right)\\
Y_k &=& S\left(\{t_i,r_i\}_{i=k+1}^{k+q}\right).\nonumber
\end{eqnarray}
%
The definition of the Expected Signature model $ES(p,q,n,m)$ states that the stationary time-series $\{r_i\}_{i=1}^N$ satisfies the assumptions of the $ES$ model with parameters $p,q,n,m$ if there exists a linear functional $f:T^n\left(\mathbb{R}^2\right) \mapsto T^n\left(\mathbb{R}^2\right)$ such that:
%
\begin{eqnarray}
\rho_m\left(S(\{r_{t+i}\}_{i=1}^q)\right) = f\left(\rho_m\left(S(\{r_{t-i}\}_{i=0}^p)\right)\right) + a_t,
\end{eqnarray}
%
where $N \geq p+q$ is a positive integer, $m$ is the depth of truncation of signature, and the residual term $a_t$ satisfies $E[a_t|F_t] = 0$. Let $\mu_k$ be the expectation of $S(\{t_i,r_i\}_{i=k+1}^{k+q})$
%
\begin{eqnarray}\label{eq:meanEq}
\mu_k = E[S(\{t_i,r_i\}_{i=k+1}^{k+q})|F_k].
\end{eqnarray}
%
It thus follows from the ES model that
%
\begin{eqnarray}
\mu_k = f(X_k),
\end{eqnarray}
%
where $X_k$ is defined in \eqref{eq:pastFutureSig} with both $\mu_k$ and $a_k$ in $T((\R^2))$. Next, the conditional covariance of the signature of the future return conditioned on $F_k$ is defined as
%
\begin{eqnarray}\label{eq:volatilEq}
\Sigma_k^2(I,J) = Cov\left(S^I(Y_k),S^J(Y_k)|F_k\right),
\end{eqnarray}
%
where $I,J$ are two multi-indexes as defined previously in the text. In time-series analysis, \eqref{eq:meanEq} corresponds to the mean equation for $Y_k$, and \eqref{eq:volatilEq} is the volatility equation for $Y_k$. The fundamental assumption of the ES model is the stationarity of the time-series $\{r_i\}$, which is common in time-series analysis.
It has been shown that many standard autoregressive models (AR, ARCH, GARCH, etc.) are special cases of the ES model. For example, given the time-series $\{t_i,r_i\}$ the mean equation and volatility are written as:
%
\begin{center}
\begin{tabular}{r l l}
& AR & ES \\
$m_k :$ & $E[r_{k+1}|F_k]$ & $S^{(2)}(\mu_k)$ \\
$\sigma^2_k :$ & $Var[r_{k+1}|F_k]$ & $2S^{(2,2)}(\mu_k) - \left(S^{(2)}(\mu_k)\right)^2$. \\
\end{tabular}
\end{center}
%
Several important properties linking the autoregressive models and ES model are proven in~\cite{levin2015learning}. One of them states that if a time-series $\{r_k\}$ satisfies the assumptions of ARCH(q) model and its mean equation is given by
%
\begin{eqnarray}
\mu_k = \beta_0 + \sum_{i=1}^Q\beta_i r_{k-i},
\end{eqnarray}
%
then there exists a sufficiently large integer $n$ such that the time-series $\{r_k\}$ satisfies the assumption of $ES(q+Q,1,n,2)$. Also, the model $ES(p,1,n,2)$ is considered as a classical time-series, where the signature of the past returns as an explanatory variable.
The work in~\cite{levin2015learning} provides explicit numerical benchmarks between various autoregressive models and the expected signature model for various set-ups and configurations of the models.
\subsubsection{Identifying patterns in MEG scans}
The project of Gyurko {\it et al.}~\cite{megConbrio} is devoted to an application of the signature method to pattern recognition in medical studies and neuroimaging ({\bf M}agneto{\bf E}ncephalo{\bf G}raphy). The patients are asked to press a button whenever they like, and their electromagnetic brain activity is constantly monitored during this trial. The data streams of the electric signal are shown in Fig.~\ref{fig:negCONBRIO} in the first two upper panels. For the sake of simplicity, Gyurko {\it et al.} considered only two channels from the MEG scanner as sources for the streaming data. The main goal was to identify a pattern in these two data streams which is able to predict the pressing of a button. The button-pressing instance was presented by a vector with binary outcome: ``1" and ``0" stand for the button being pressed and not being pressed respectively (Fig.~\ref{fig:negCONBRIO}, bottom panel). They used a rolling window analysis of time-series and regressed the button-pressing instances on signature of the data streams inside the rolling window.
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{meg_1}
\caption{Finding patterns in two-dimensional data stream (two upper panels). The bottom panel shows the binary vector of the button-state (pressed or not pressed). The horizontal axis is in time units. }
\label{fig:negCONBRIO}
\end{figure}
\noindent
%
The detection and prediction results were good: AUC of ROC: 0.92 (learning set) and AUC of ROC (out-of-sample) 0.93, which indicates good separability between the two states (1 and 0). This example shows that applications of the signature approach are fairly general and are not constrained to particular cases.
\subsubsection{Learning the effect of treatment on behavioural patterns of patients with bipolar disorder.}
This is another example of an application of the signature method to analysis of medical data. Our main goal of this project is to learn the behavioural patterns of patients suffering from bipolar disorder. The data are follow-up self-reported assessment scale collected by the True Colours\footnote{https://oxfordhealth.truecolours.nhs.uk/www/en/} web platform which is developed by the Department of Psychiatry at the University of Oxford and is used for the CONBRIO programme\footnote{http://conbrio.psych.ox.ac.uk/home}. Patients are encouraged to submit via this platform their answers to the self-assessment questionnaires. These questionnaires are standard clinical tools for assessment of the severity of depression (QIDS-SR$_{16}$)~\cite{rush200316} and mania (AMSR)~\cite{altman1997altman} symptoms. These questionnaires contain 16 and 5 questions and scales are ranged [0 27] and [0 25] for QIDS-SR$_{16}$ and AMSR respectively. In Fig.~\ref{fig:qidsScore}, an example of the QIDS score for 50 weeks follow-up observations is displayed.
%
\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{qids_1}
\caption{A typical example of the follow-up observations of the QIDS score.}
\label{fig:qidsScore}
\end{figure}
\noindent
%
As a part of our research programme, we analysed data from the CEQUEL clinical trial \cite{geddes2015comparative}. The primary objective is to compare the combination therapy of quetiapine plus lamotrigine with quetiapine monotherapy for treatment of bipolar depression. Among other interesting research questions, we focused on the behavioural pattern of patients in two different treatment groups: placebo and lamotrigine. Patients are asked to submit their self-assessment scores to the True Colours platform on a weekly basis. The system sends a scheduled prompt text every week and patients should reply within one week interval. If no response is received within a week, the system flags this week as a missing observation and sends a new prompt at the beginning of the next week. We analysed the delays - the time intervals between the prompt text and the patient's reply measured in integer units of days. The delays are presented schematically in the Fig.~\ref{fig:delays_old}.
%
\begin{figure}[H]
\centering
\includegraphics[width=0.7\linewidth]{delays_old}
\caption{Definition of the delays $d_i$. The time line is divided by the dashed lines into weekly intervals. The delay is defined as the time difference between the beginning of the week (dashed line) and the time when the response is received (red dot). This particular configuration of delays corresponds to: $\{d_i\} = \{4,2,5,0,5,0\}$.}
\label{fig:delays_old}
\end{figure}
\noindent
%
The delays of the QIDS data from the Fig.~\ref{fig:qidsScore} are shown in the Fig.~\ref{fig:delaysAll}.
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{delays_1}
\caption{Example of the delays $d_i$ of the QIDS scores presented in the Fig.~\ref{fig:qidsScore}. Submissions are denoted by the red dots.}
\label{fig:delaysAll}
\end{figure}
\noindent
We were interested in the question, whether the distribution of delays $\{d_i\}$ is different between the two different treatment groups, namely placebo and lamotrigine. To answer this question, we applied the signature method to time-series constructed from the delay data $\{d_{i}\}$ and used regularised logistic regression to discriminate between the two groups. The sample sizes of the two groups are: 18 and 11 patients in the placebo and the lamotrigine group respectively. We constructed continuous paths from the sequence of integer delays $\{d_i\}$ by means of two types of embeddings: the first is the three dimensional simple lead-lag transformation of the raw data $\{d_i\}$ with time stamps:
%
\begin{eqnarray}
X\;=\;\left\{\left(t^{lead}_i,d^{lead}_i,d^{lag}_i\right)_i\right\},
\end{eqnarray}
%
and the second embedding corresponds to the lead-lag transformation of the cumulative sum (partial sums) of the delays:
%
\begin{eqnarray}
S\;=\;\left\{\left(s^{lead}_i,s^{lag}_i\right)_i\right\}.
\end{eqnarray}
%
We computed signature terms from these two embeddings separately up to level $L$ and combined these terms in a single design matrix, which we used as the feature matrix for the logistic regression. The design matrix exhibited some degree of multicollinearity, thus we applied the elastic net regularisation scheme \cite{zou2005regularization} to the logistic regression. The elastic net allows a smooth regularisation, which benefits from both L$_1$ and L$_2$ norm shrinkage schemes, groups the correlated covariates, and removes the less relevant features. The choice of the $\alpha$ parameter of the elastic net is performed by the cross validated grid search, and estimated as $\alpha = 0.55$ giving the smallest deviance error as shown in Fig.~\ref{fig:kor3}.
%
\begin{figure}[H]
\centering
% \subcaptionbox{\label{fig:greg_2a}}%
% [.48\linewidth]
{\includegraphics[width=0.45\linewidth, height=5.3cm]{CVlassoPlot}}
% \subcaptionbox{\label{fig:greg_2b}}%
% [.48\linewidth]
\hfill
{\includegraphics[width=0.45\linewidth]{CVlassoPlotPaths}}
\caption{Statistical results of cross validated elastic net regularisation scheme.}
\label{fig:kor3}
\end{figure}
\noindent
%
The final classification model is chosen by the ``one-standard-error'' rule, denoted by the position of the blue dashed line, given the fact that the initial 10-dimensional feature set was shrunk to a 6-dimensional subset. Some of the features of this subset are displayed in the Fig.~\ref{fig:kor4}.
%
\begin{figure}[htb]
\centering
\includegraphics[width=\linewidth]{classif_3}
\centering
\caption{Examples of relevant features selected by the penalised logistic regression. These two groups denoted by ``0" and ``1" correspond to the placebo and the lamotrigine groups respectively.}
\label{fig:kor4}
\end{figure}
\noindent
%
The results of this project demonstrated the ability of the signature method to extract characteristic features from the data in a systematic way without introducing any {\it ad hoc} methods. The signature feature extraction method serves as an initial step in the machine learning pipeline. Once we transformed the raw data into a set of signature terms, we naturally proceed further with standard machine learning techniques and methodologies using these features as inputs.
\section*{Acknowledgement}
A.K. wishes to thank the Oxford-Man Institute of Quantitative Finance for the hospitality during the course of this work and gratefully acknowledges the support of the Welcome Trust grant No: 102616/Z/13/Z, ``CONBRIO".
%\section{Concluding Remarks and Further Reading}
%In these introductory notes, we presented a novel mathematical approach to machine learning and data analysis. The theory of the rough paths has evolved significantly since its inception by T. Lyons and its origins in the theory of iterated integrals of K.T. Chen. In 2014, Professor Martin Hairer from the University of Warwick has been awarded the Fields Medal\footnote{http://goo.gl/5UJsEl} for his contribution to the theory of stochastic partial differential equation and for the theory of regularity structure which is based on the theory of rough paths.
%
%A key feature of the theory of rough paths, known now as the \emph{universal limit theorem}, is that one is able to give meaning to differential equations where the driver $X$ belongs to a class of $p$-rough paths (know as geometric $p$-rough paths), and where the solution depends in a continuous way on the driver provided that the space of $p$-rough paths is equipped with a suitable topology (known as the $p$-variation metric).
%
%Representation of data in terms of paths in $\mathbb{R}^d$ space with further feature extraction by means of the iterated integrals of paths introduces a systematic approach to data analysis. The ideas in this work are presented in a concise way. We only scratched a surface of the very rich and fundamental theory of iterated integrals and rough paths. To understand these ideas better and deeper as well as to master the ability of practical knowledge, we would highly recommend the readers to look at the following list of books and texts.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\addcontentsline{toc}{chapter}{References}%change bibliography name to references
%\renewcommand{\bibname}{References}
%\bibliography{Refs} %use a bibtex bibliography file refs.bib
%\bibliographystyle{plain} %use the plain bibliography style
%\addcontentsline{toc}{chapter}{Bibliography}
%\newpage
\bibliographystyle{plain}
\bibliography{Refs}
\end{document}
Paths form one of the basic elements of this theory. A path $X$ in $\mathbb{R}^d$ is a continuous mapping from some interval $[a,b]$ to $\mathbb{R}^d$, written as $X:\;[a,b]\mapsto \mathbb{R}^d$. We will use the subscript notation $X_t = X(t)$ to denote dependence on the parameter $t \in [a,b]$.
For our discussion of the signature, unless otherwise stated, we will always assume that paths are piecewise differentiable (more generally, one may assume that the paths are of bounded variation for which exactly the same classical theory holds). By a smooth path, we mean a path which has derivatives of all orders.
%A $C^k$ path is $k$-time differentiable and has continuous derivatives on interval $[a,b]$.
%A curve is the {\it image} of the path and we say that path parametrizes a curve with some parameter $t$ which sometimes called a "proper-time" (or "self-time") which measures the {\it directed} propagation along the path with increasing $t$. The parametrization of a path might be continuous function of $t$ as well as a piece-wise (non-differentiable) parametrization.
Two simple examples of smooth paths in $\R^2$ are presented in Fig.\ref{fig:exampleOfPathsParametrization}:
\begin{eqnarray}
\text{left panel:}\;\;\;\; X_t &=& \{X^1_t,X^2_t\} = \{t, t^3\}\;,\;t\in[-2,2]\\
\text{right panel:}\;\;\;\; X_t &=& \{X^1_t,X^2_t\} = \{\cos t, \sin t\}\;,\;t\in[0,2\pi]\nonumber
\end{eqnarray}
%
\begin{figure}[H]
\centering
\begin{minipage}{.45\textwidth}
\includegraphics[height=5cm]{curve_02}
\end{minipage}
\begin{minipage}{.45\textwidth}
\includegraphics[height=5cm]{curve_01}
\end{minipage}
\caption{Example of two-dimensional smooth paths.}
\label{fig:exampleOfPathsParametrization}
\end{figure}
\noindent
%
This parametrisation generalizes in $d$-dimensions ($X_t\in\mathbb{R}^d$) as:
%
\begin{eqnarray}
X: [a,b]\mapsto\mathbb{R}^d\;,\;\;X_t=\left\{X^{1}_t,X^2_t,X^3_t,...,X^d_t\right\}.
\end{eqnarray}
%
An example of a piecewise linear path is presented in Fig.\ref{fig:exampleOfRandomPathsParametrization}:
%
\begin{eqnarray}
X_t = \{X^1_t,X^2_t\} = \{t,f(t)\}\;,\;t\in[0,1],
\end{eqnarray}
%
where $f$ is a piecewise linear function on the time domain $[0,1]$.
\begin{figure}[ht]
\centering
\includegraphics[height=5cm]{stoch_path_1}
\caption{Example of non-smooth stochastic path.}
\label{fig:exampleOfRandomPathsParametrization}
\end{figure}
\noindent
%
One possible example of the function $f$ is a stock price at time $t$. Such non-smooth paths may represent sequential data or time series, typically consisting of successive measurements made over a time interval.
We now briefly review the path (or line) integral. The reader may already be familiar with the common definition a path integral against a fixed function $f$ (also called a one-form). Namely, for a one-dimensional path $X : [a,b] \mapsto \R$ and a function $f : \R \mapsto \R$, the path integral of $X$ against $f$ is defined by
%
\begin{eqnarray}\label{eq:pathIntegral}
\int_a^b f(X_t)\,dX_t\;=\;\int_{a}^{b}f(X_t) \dot X_t dt,
\end{eqnarray}
%
where the last integral is the usual (Riemann) integral of a continuous bounded function and where we use the ``upper-dot'' notation for differentiation with respect to a single variable: $\dot X_t = dX_t/dt$.
In the expression \eqref{eq:pathIntegral}, note that $f(X_t)$ is itself a real-valued path defined on $[a,b]$. In fact, \eqref{eq:pathIntegral} is a special case of the Riemann-Stieltjes integral of one path against another. In general, one can integrate any path $Y : [a,b] \mapsto \R$ against a path $X : [a,b] \mapsto \R$. Namely, for a path $Y : [a,b] \mapsto \R$, we can define the integral
%
\begin{eqnarray}
\int_a^b Y_t\,dX_t\;=\;\int_{a}^{b} Y_t \dot X_t dt.
\end{eqnarray}
%
As previously remarked, we recover the usual path integral upon setting $Y_t = f(X_t)$.
\begin{example}
Consider the constant path $Y_t = 1$ for all $t \in [a,b]$. Then the path integral of $Y$ against any path $X : [a,b] \mapsto \R$ is simply the increment of $X$:
\begin{eqnarray}
\int_a^b dX_t\;=\;\int_{a}^{b} \dot X_t \,dt \;=\; X_b - X_a.
\end{eqnarray}
\end{example}
\begin{example}
Consider the path $X_t = t$ for all $t \in [a,b]$. It follows that $\dot X_t = 1$ for all $t \in [a,b]$, and so the path integral for any $Y : [a,b] \mapsto \R$ is the usual Riemann integral of $Y$:
\begin{eqnarray}
\int_a^b Y_t dX_t\;=\;\int_{a}^{b} Y_t \,dt.
\end{eqnarray}
\end{example}
\begin{example}
We present an example involving numerical computations. Consider the two-dimensional path
\begin{eqnarray}
X_t = \{X^1_t,X^2_t\} = \{t^2,t^3\},\;\;\; t \in [0,1].
\end{eqnarray}
%
Then we can compute the path integral
\begin{eqnarray}
\int_0^1 X^1_t dX^2_t\;=\; \int_0^1 t^2 3t^2 dt \;=\;\frac{3}{5}.
\end{eqnarray}
%
The above example is a special case of an iterated integral, which, as discussed in the following section, is central to the definition of the path signature.
\end{example}
%To conclude this section, we remind the reader a general structure of iterated integrals. Consider an arbitrary parametric function $\omega_i(t)$, $i = 1,2,\dots$ then the iterated integrals over interval $t \in [a,b]$ defined recursively as:
%%
%\begin{eqnarray}
%I_1 &=& \int_a^b \omega_1(t)dt = \int_{a < t < b} \omega_1(t)dt\\
%I_{1,2} &=& \int_a^b I_1(t) \omega_2(t)dt = \int_a^b \left[\int_a^t \omega_1(s)ds \right]\omega_2(t)dt\nonumber = \int_{a < s < t < b} \omega_1(s)ds\, \omega_2(t)dt\nonumber \\
%I_{1,2,3} &=& \int_a^b I_{1,2}(t) \omega_3(t)dt = \int_a^b \left[\int_a^t \left[\int_a^s\omega_1(r)dr \right]\omega_2(s)ds\right]\omega_3(t)dt = \nonumber \\ &=& \int_{a < r < s < t < b} \omega_1(r)dr\,\omega_2(s)ds\, \omega_3(t)dt\nonumber
%\end{eqnarray}
%%
%and so on for higher iterations.
%
%The simplest example to demonstrate this concept is presented bellow. Consider a two dimensional curve given by the following parametrization:
%%
%\begin{eqnarray}\label{eq:exampleOfParametrizationN1}
%X_t\;&=&\;\left\{X^1_t,X^2_t\right\}\in \mathbb{R}^2\\
%&=&\;\left\{t,t^2\right\}, t\in[0,1]\nonumber,
%\end{eqnarray}
%%
%and the integral against the constant path $Y_t = 1$ for all $t \in [0,1]$:
%%
%\begin{eqnarray}
%I=\;\int_{0}^{1}\left|\dot X_t \right|dt
%\end{eqnarray}
%%
%The Jacobian of the parametrization $\left|\dot X_t\right|$ or "speed" is given simply by the "length" of the derivative of the curve $X_t$, namely:
%%
%\begin{eqnarray}
%\left|\dot X_t\right|\;=\;\sqrt{\left[\dot X^{1}_t\right]^2+\left[\dot X^{2}_t\right]^2},
%\end{eqnarray}
%%
%or in general case $X\in\mathbb{R}^d$:
%%
%\begin{eqnarray}
%\left|\dot X_t\right|\;=\;\sqrt{\sum_{i=1}^{d}\left[\dot X^{i}_t\right]^2}.
%\end{eqnarray}
%%
%Putting all together, we get:
%%
%\begin{eqnarray}
%I=\int_{0}^{1}\left|\dot X_t\right|dt\;=\;\int_{0}^{1}\sqrt{1+4t^2}\,dt\;\approx\;1.48
%\end{eqnarray}
%%
%this is simply the "arc length" of the parabola $\in$ [0,1] as defined in \eqref{eq:exampleOfParametrizationN1}.
%The concept of path integrals plays a crucial role in the definition of the signature of the path.
Having recalled the path integral of one real-valued path against another, we are now ready to define the signature of a path. For a path $X : [a,b] \mapsto \R^d$, recall that we denote the coordinate paths by $(X^1_t, \ldots X^d_t)$, where each $X^i : [a,b] \mapsto \R$ is a real-valued path. For any single index $i \in \{1,\ldots, d\}$, let us define the quantity
\begin{eqnarray}\label{singInteg}
S(X)^i_{a,t} = \int_{a < s < t} dX^i_s = X^i_t - X^i_0,
\end{eqnarray}
%
which is the increment of the $i$-th coordinate of the path at time $t \in [a,b]$. We emphasise that $S(X)^i_{a,\cdot} : [a,b] \mapsto \R$ is itself a real-valued path. Note that $a$ in the subscript of $S(X)^i_{a,t}$ is only used to denote the starting point of the interval $[a,b]$.
Now for any pair $i,j \in \{1, \ldots, d\}$, let us define the {\it double-iterated} integral
\begin{eqnarray}\label{doublInteg}
S(X)^{i,j}_{a,t} = \int_{a < s < t} S(X)^i_{a,s} dX^j_s\;=\;\int_{a < r < s < t} dX^i_{r}\,dX^j_{s},
\end{eqnarray}
%
where $S(X)^i_{a,s}$ is given by~\eqref{singInteg} and the integration limits are simply:
%
\begin{equation}\label{triangle}
a < r < s < t = \begin{cases}
a < r < s \\
a < s < t.
\end{cases} \quad
\end{equation}
%
The integration limits~\eqref{triangle} also correspond to integration over a triangle (or, more generally, over a simplex in higher dimension). We emphasise again that $S(X)^i_{a,s}$ and $X^j_s$ are simply real-valued paths, so the expression~\eqref{doublInteg} is a special case of the path integral, and that $S(X)^{i,j}_{a,\cdot} : [a,b] \mapsto \R$ is itself a real-valued path.
%Remark moreover that $S(X)^{i,j}_{a,t}$ may equivalently be written as
%\[
%S(X)^{i,j}_t = \int_{a < t_1 < t} \int_{a < t_2 < t_1} dX^i_{t_2} dX^j_{t_1}.
%\]
%
Likewise for any triple $i,j,k \in \{ 1, \ldots, d\}$ we define the {\it triple-iterated} integral
\begin{eqnarray}
S(X)^{i,j,k}_{a,t} = \int_{a < s < t} S(X)^{i,j}_{a,s} dX^k_s \;=\;\int_{a < q < r < s < t} dX^i_{q}dX^j_{r}\,dX^k_{s}.
\end{eqnarray}
%
Again, since $S(X)^{i,j}_{a,s}$ and $X^k_s$ are real-valued paths, the above is just a special case of the path integral, and $S(X)^{i,j,k}_{a,\cdot} : [a,b] \mapsto \R$ is itself a real-valued path.
%
%\[
%S(X)^{i,j}_{a,t} = \int_{a < t_1 < t} \int_{a < t_2 < t_1} \int_{a < t_3 < t_2} dX^i_{t_3} dX^j_{t_2} dX^k_{t_1}.
%\]
%
We can continue recursively, and for any integer $k \geq 1$ and collection of indexes $i_1, \ldots, i_k \in \{ 1, \ldots, d\}$, we define
\begin{eqnarray}
S(X)^{i_1,\ldots, i_k}_{a,t} = \int_{a< s < t} S(X)^{i_1,\ldots, i_{k-1}}_{a,s} dX^{i_k}_s.
\end{eqnarray}
%
As before, since $S(X)^{i_1,\ldots, i_{k-1}}_{a,s}$ and $X^{i_k}_s$ are real-valued paths, the above is defined as a path integral, and $S(X)^{i_1,\ldots, i_k}_{a,\cdot} : [a,b] \mapsto \R$ is itself a real-valued path. Observe that we may equivalently write
\begin{eqnarray}
S(X)^{i_1,\ldots, i_k}_{a,t} = \int_{a < t_k < t} \ldots \int_{a < t_1 < t_{2}} dX^{i_1}_{t_1} \ldots dX^{i_k}_{t_k}.
\end{eqnarray}
%
The real number $S(X)^{i_1,\ldots, i_k}_{a,b}$ is called the \emph{k-fold iterated integral} of $X$ along the indexes $i_1,\ldots, i_k$.
%
\begin{definition}[Signature]
The \emph{signature} of a path $X : [a,b] \mapsto \R^d$, denoted by $S(X)_{a,b}$, is the collection (infinite series) of all the iterated integrals of $X$. Formally, $S(X)_{a,b}$ is the sequence of real numbers
\begin{eqnarray}\label{eq:definSig}
S(X)_{a,b}\;=\; (1, S(X)^1_{a,b}, \ldots, S(X)^d_{a,b}, S(X)^{1,1}_{a,b}, S(X)^{1,2}_{a,b}, \ldots)
\end{eqnarray}
where the ``zeroth'' term, by convention, is equal to $1$, and the superscripts run along the set of all \emph{multi-indexes}
\begin{eqnarray}
W = \{(i_1,\ldots, i_k) \mid k \geq 1, i_1,\ldots, i_k \in \{1,\ldots, d\}\}.
\end{eqnarray}
\end{definition}
The set $W$ above is also frequently called the set of \emph{words} on the \emph{alphabet} $A = \{1,\ldots, d\}$ consisting of $d$ letters.
%
\begin{example}
Consider an alphabet consisting of three letters only: $\{1,2,3\}$. There is infinite number of words which could be composed from this alphabet, namely:
\begin{equation}
\{1,2,3\} \rightarrow (1,2,3,11,12,13,21,22,23,31,32,33,111,112,113,121,\dots).
\end{equation}
\end{example}
%The case $k=0$ in the above definition corresponds to the empty multi-index, often denoted $S(X)^0_T$, which we define by convention as $S(X)^0_T = 1$.
An important property of the signature which we immediately note is that the iterated integrals of a path $X$ are independent of the starting point of $X$. That is, if for some $x \in \R^d$, we define the path $\widetilde X_t = X_t + x$, then $S(\widetilde X)^{i_1,\ldots, i_k}_{a,b} = S(X)^{i_1,\ldots,i_k}_{a,b}$.
We shall often consider the \emph{$k$-th level} of the signature, defined as the finite collection of all terms $S(X)^{i_1,\ldots,i_k}_{a,b}$ where the multi-index is of length $k$. For example, the first level of the signature is the collection of $d$ real numbers $S(X)^1_{a,b}, \ldots, S(X)^d_{a,b}$, and the second level is the collection of $d^2$ real numbers
\begin{eqnarray}
S(X)^{1,1}_{a,b}, \ldots, S(X)^{1,d}_{a,b}, S(X)^{2,1}_{a,b}, \ldots, S(X)^{d,d}_{a,b}.
\end{eqnarray}
\begin{example}
The simplest example of a signature which one should keep in mind is that of a one-dimensional path. In this case our set of indexes (or alphabet) is of size one, $A = \{1\}$, and the set of multi-indexes (or words) is $W = \{(1,\ldots, 1) \mid k \geq 1 \}$, where $1$ appears $k$ times in $(1,\ldots, 1)$.
Consider the path $X : [a,b] \mapsto \R$, $X_t = t$. One can immediately verify that the signature of $X$ is given by
\begin{align}
S(X)^1_{a,b} &= X_b - X_a, \\
S(X)^{1,1}_{a,b} &= \frac{(X_b - X_a)^2}{2!}, \nonumber\\
S(X)^{1,1,1}_{a,b} &= \frac{(X_b - X_a)^3}{3!}, \nonumber\\
\vdots \;.\nonumber
\end{align}
One can in fact show that the above expression of the signature remains true for any path $X : [a,b] \mapsto \R$. Hence, for one-dimensional paths, the signature depends only on the increment $X_b - X_a$.
\end{example}
\begin{example}
We present now a more involved example of the signature for a two-dimensional path. Our set of indexes is now $A = \{1,2\}$, and the set of multi-indexes is
\begin{equation}
W = \{(i_1,\ldots, i_k) \mid k \geq 1, i_1,\ldots, i_k \in \{1,2\} \},
\end{equation}
the collection of all finite sequences of $1$'s and $2$'s.
%In contrast to the previous example, we will see that the signature does not only depend on the increment of the path.
Consider a parabolic path in $\mathbb{R}^2$ as depicted in Fig.\ref{fig:exampleOf2DimPath}.
%
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{parabolicPath_n.png}
\caption{Example of a two dimensional path parametrized in \eqref{eq:differentialsOfPath}.}
\label{fig:exampleOf2DimPath}
\end{figure}
\noindent
Explicitly:
%
\begin{eqnarray}\label{eq:differentialsOfPath}
X_t\;&=&\;\{X^1_t,X^2_t\}\;=\;\{3+t,(3+t)^2\}\;\;\;t\in[0,5]\;,\;(a=0, b=5),\\
dX_t\;&=&\;\{dX^1_t,dX^2_t\}\;=\;\{dt,2(3+t)dt\}.\nonumber
\end{eqnarray}
%
A straightforward computation gives:
%
\begin{eqnarray}\label{eq:coefficientsOfPath_Example}
S(X)^1_{0,5}\;&=&\;\int_{0<t<5}dX^{1}_t\;=\;\int_{0}^{5}dt\;=\;X^1_5-X^1_0\;=\;5,\\\nonumber
S(X)^2_{0,5}\;&=&\;\int_{0<t<5}dX^{2}_t\;=\;\int_{0}^{5}2\,(3+t)\,dt\;=\;X^2_5-X^2_0\;=\;55,\\\nonumber
S(X)^{1,1}_{0,5}\;&=&\;\iint_{0<t_1<t_2<5}dX^{1}_{t_1} dX^{1}_{t_2}\;=\;\int_{0}^5\left[\int_{0}^{t_2}dt_1\right]dt_2\;=\;\frac{25}{2},\\\nonumber
S(X)^{1,2}_{0,5} \;&=&\;\iint_{0<t_1<t_2<5}dX^{1}_{t_1} dX^{2}_{t_2}\;=\;\int_{0}^5\left[\int_{0}^{t_2}dt_1\right]2\,(3+t_2)\,dt_2\;=\;\frac{475}{3}, \\\nonumber
S(X)^{2,1}_{0,5} \;&=&\;\iint_{0<t_1<t_2<5}dX^{2}_{t_1} dX^{1}_{t_2}\;=\;\int_{0}^5\left[\int_{0}^{t_2}2\,(3+t_1)\,dt_1\right]dt_2\;=\;\frac{350}{3}, \\\nonumber
S(X)^{2,2}_{0,5} \;&=&\;\iint_{0<t_1<t_2<5}dX^{2}_{t_1} dX^{2}_{t_2}\;=\;\int_{0}^5\left[\int_{0}^{t_2}2\,(3+t_1)\,dt_1\right]2\,(3+t_2)\,dt_2=\frac{3025}{2},\\\nonumber
S(X)^{1,1,1}_{0,5}\;&=&\;\iiint_{0<t_1<t_2<t_3<5}dX^{1}_{t_1} dX^{1}_{t_2}dX^{1}_{t_3}=\int_0^1\left[\int_{0}^{t_3}\left[\int_{0}^{t_2}dt_1\right]dt_2\right]dt_3=\frac{125}{6},\\\nonumber
&\vdots&.
\end{eqnarray}
%
Continuing this way, one can compute every term $S(X)^{i_1,\ldots,i_k}_{0,5}$ of the signature for every multi-index $(i_1,\ldots, i_k)$, $i_1,\ldots, i_k \in \{1,2\}$.
%Since the number of terms in signature is infinite (the number of all possible words composed iteratively from two letters), we may {\it truncate} the signature at level $L$ which corresponds to the maximal number of iterated integral or the length of the words. For example, truncated signature at level 2 of the path $X(t)\;=\;\{t,t^2\}, t\in[0,5]$ is given by the collection of coefficients $\mu_{ij}$:
%%
%\begin{eqnarray}
%S^{(L=2)}(X)\;&=&\;\left(1,\mu_1,\mu_2,\mu_{11},\mu_{12},\mu_{21},\mu_{22}\right)\\
%&=&\;\left(1,5,55,\frac{25}{2},\frac{475}{3},\frac{350}{3},\frac{3025}{2}\right)\nonumber
%\end{eqnarray}
%%
%It is worth emphasizing the fact that the first term of signature is always unity.
\end{example}
Before reviewing the basic properties of the signature, we take a moment to show how the signature arises naturally in the classical theory of ordinary differential equations (ODEs). In a sense, this provides one of the first reasons for our interest in the signature. We do not provide all the details, but hope that the reader finds the general idea clear.
%Before we dive into proper mathematical description of signature,
It is instructive to start the discussion with an intuitive and simplistic example of Picard's method. Let us consider the first order ODE
%
\begin{eqnarray}\label{exampleODE_1}
\frac{dy}{dx} = f(x,y), \;\;\;\;\; y(x_0) = y_0,
\end{eqnarray}
%
where $y(x)$ is a real valued function of a scalar variable $x$. Picard's method allows us to construct an approximated solution to \eqref{exampleODE_1} in the form of an iterative series. The integral form of \eqref{exampleODE_1} is given by
%
\begin{eqnarray}
y(x) = y(x_0) + \int_{x_0}^x f(t,y(t))\,dt.
\end{eqnarray}
We now define a sequence of functions $y_k(x)$, $k = 0, 1, \ldots$, where the first term is the constant function $y_0(x) = y(x_0)$, and for $k \geq 1$, we define inductively
%
\begin{eqnarray}
y_{k}(x)\;=\;y(x_0) + \int_{x_0}^x f(t,y_{k-1}(t))\,dt.
\end{eqnarray}
%
The classical Picard–-Lindel{\"o}f theorem states that, under suitable conditions, the solution to \eqref{exampleODE_1} is given by $y(x) = \lim_{k\rightarrow\infty} y_k(x)$.
%
\begin{example}
Consider the ODE:
%
\begin{eqnarray}\label{exampleODE_2}
\frac{dy}{dx} = y(x), \;\;\; y(0)=1.
\end{eqnarray}
%
The first $k$ terms of the Picard iterations are given by:
%
\begin{eqnarray}
y_0(x) &=& 1\\
y_1(x) &=& 1 + \int_{0}^x y_0(t)dt = 1 + x\nonumber\\
y_2(x) &=& 1 + \int_{0}^x y_1(t)dt = 1 + x + \frac{1}{2}x^2\nonumber\\
y_3(x) &=& 1 + \int_{0}^x y_2(t)dt = 1 + x + \frac{1}{2}x^2 + \frac{1}{6}x^3\nonumber\\
y_4(x) &=& 1 + \int_{0}^x y_3(t)dt = 1 + x + \frac{1}{2}x^2 + \frac{1}{6}x^3 + \frac{1}{24}x^4\nonumber\\
&\vdots &\nonumber\\
y_k(x) &=& \sum_{n=0}^k \frac{1}{n!}x^n,\nonumber
\end{eqnarray}
%
which converges to $y(x) = e^x$ as $k\rightarrow\infty$, which is indeed the solution to~\eqref{exampleODE_2}. These approximations are plotted in Fig.~\ref{fig:Picard_approximation}.
\end{example}
%
\begin{figure}[ht]
\centering
\includegraphics[width=0.75\linewidth]{pic_examp}
\caption{Example of sequential Picard approximation to the true solution.}
\label{fig:Picard_approximation}
\end{figure}
\noindent
%
We are now ready to consider a controlled differential equation and the role of the signature in its solution. Consider a path $X : [a,b] \mapsto \R^d$. Let $\LLL(\R^d, \R^e)$ denote the vector space of linear maps from $\R^d$ to $\R^e$. Equivalently, $\LLL(\R^d, \R^e)$ can be regarded as the vector space of $d \times e$ real matrices. For a path $Z : [a,b] \mapsto \LLL(\R^d, \R^e)$, note that we can define the integral
\begin{equation}\label{eq_pathInt}
\int_a^b Z_t dX_t
\end{equation}
as an element of $\R^e$ in exactly the same way as the usual path integral. For a function $V : \R^e \mapsto \LLL(\R^d, \R^e)$ and a path $Y : [a,b] \mapsto \R^e$, we say that $Y$ solves the controlled differential equation
\begin{equation}
dY_t = V(Y_t)dX_t, \; \; Y_a = y \in \R^e,
\end{equation}
precisely when for all times $t \in [a,b]$
\begin{equation}\label{eq_diffEq}
Y_t = y + \int_a^t V(Y_s)dX_s.
\end{equation}
The map $V$ in the above expression is often called a collection of \emph{driving vector fields}, the path $X$ is called the \emph{control} or the \emph{driver}, and $Y$ is called the \emph{solution} or the \emph{response}.
A standard procedure to obtain a solution to~\eqref{eq_diffEq} is through Picard iterations. For an arbitrary path $Y : [a,b] \mapsto \R^e$, define a new path $F(Y) : [a,b] \mapsto \R^e$ by
\begin{equation}
F(Y)_t = y + \int_a^t V(Y_s)dX_s.
\end{equation}
Observe that $Y$ a solution to~\eqref{eq_diffEq} if and only if $Y$ is a fixed point of $F$. Consider the sequence of paths $Y^n_t = F(Y^{n-1})_t$ with initial arbitrary path $Y^0_t$ (often taken as the constant path $Y^0_t = y$). Under suitable assumptions, one can show that $F$ possesses a unique fixed point $Y$ and that $Y^n_t$ converges to $Y$ as $n \rightarrow \infty$.
Consider now the case when $V : \R^e \mapsto \LLL(\R^d, \R^e)$ is a linear map.
%and let us examine the sequence of paths $Y^n_t$.
Note that we may equivalently treat $V$ as a linear map $\R^d \mapsto \LLL(\R^e, \R^e)$, where $\LLL(\R^e, \R^e)$ is the space of all $e\times e$ real matrices. Let us start the Picard iterations with the initial constant path $Y^0_t = y$ for all $t \in [a,b]$. Denoting by $I_e$ the identity operator (or matrix) in $\LLL(\R^e,\R^e)$, it follows that the iterates of $F$ can be expressed as follows:
\begin{align}
Y^0_t &= y, \\
Y^1_t &= y + \int_a^t V(Y^0_s)dX_s = \left(\int_a^t dV(X_s) + I_e\right)(y), \nonumber\\
Y^2_t &= y + \int_a^t V(Y^1_s)dX_s = \left(\int_a^t \int_a^s dV(X_u)dV(X_s) + \int_a^t dV(X_s) + I_e\right)(y), \nonumber\\
&\vdots \nonumber\\
Y^n_t &= y + \int_a^t V(Y^{n-1}_s)dX_s = \left(\sum_{k = 1}^n \int_{a < t_1 < \ldots < t_k < t} dV(X_{t_1})\ldots dV(X_{t_k}) + I_e\right)(y),\nonumber\\
&\vdots \; \nonumber
\end{align}
Due to the fact that $\LLL(\R^e, \R^e)$ is an algebra of matrices, each quantity
\begin{equation}
\int_{a < t_1 < \ldots < t_k < t} dV(X_{t_1})\ldots dV(X_{t_k})
\end{equation}
can naturally be defined as an element of $\LLL(\R^e, \R^e)$, which, one can check, is completely determined (in a linear way) by the $k$-th level of the signature $S(X)_{a,t}$ of $X$ at time $t \in [a,b]$.
%The second point is that this procedure can readily be shown to converge provided that $X$ has finite length. More specifically, equipping $\LLL(\R^e,\R^e)$ with the operator norm and denoting the length of $X$ by $\norm{X}_{[0,T]}$, one can show that for all $k \geq 1$
%\[
%\norm{\int_{0 < t_k < \ldots < t_1 < t} dV(X_{t_k})\ldots dV(X_{t_1})} \leq \frac{\norm{V}^k \norm{X}_{[0,T]}^k}{k!}.
%\]
%The factorial decay of series guarantees that the iterations $Y^n_t$ converge to a limit, which indeed solves~\eqref{eq_diffEq}.
The conclusion we obtain is that the solution $Y_t$ is completely determined by the signature $S(X)_{a,t}$ for every $t \in [a,b]$. In particular, if the signatures of two controls $X$ and $\widetilde X$ coincide at time $t \in [a,b]$, that is, $S(X)_{a,t} = S(\widetilde X)_{a,t}$, then the corresponding solutions to~\eqref{eq_diffEq} will also agree at time $t$ for any choice of the linear vector fields $V$.
An important, but far less obvious result, is that the same conclusion holds true for non-linear vector fields $V$. This result was first obtained by Chen~\cite{Chen58} for a certain class of piecewise smooth paths, and recently extended by Hambly and Lyons~\cite{Hambly10} to paths of bounded variation, and by Boedihardjo, Geng, Lyons and Yang~\cite{Boedihardjo14} to a completely non-smooth setting of geometric rough paths for which the signature is still well-defined (see Section~\ref{subsec:furtherTopics} for further discussion). The latter class of paths is of particular interest from the point of view of stochastic analysis.
While the signature is defined analytically using path integrals, we briefly discuss here the geometric meaning of the first two levels. As already mentioned, the first level, given by the terms $(S(X)^1_{a,b},\ldots, S(X)^d_{a,b})$, is simply the increment of the path $X : [a,b] \mapsto \R^d$.
% (as can be seen, for example, in~\eqref{eq:coefficientsOfPath_Example}).
For the second level, note that the term $S(X)^{i,i}_{a,b}$ is always equal to $(X^i_b-X^i_a)^2/2$. This relation is a special case of the shuffle product which we shall review in Section~\ref{subsubsec:shuffle}. To give meaning to the term $S(X)^{i,j}_{a,b}$ for $i \neq j$, consider the {\it L\'evy area} (illustrated in Fig.\ref{fig:exampleOfSignedLevyArea})% for $i=1$ and $j=2$)
, which is a {\it signed} area enclosed by the path (solid red line) and the chord (blue straight dashed line) connecting the endpoints. The L{\'e}vy area of the two dimensional path $\{X^1_t,X^2_t\}$ is given by:
%
\begin{eqnarray}\label{eq:LevyArea}
A\;=\;\frac{1}{2}\left(S(X)^{1,2}_{a,b}-S(X)^{2,1}_{a,b}\right).
\end{eqnarray}
%
%In the next Fig.\ref{fig:exampleOfSignedLevyArea} we demonstrate the signed area enclosed by a path $X : [a,b] \mapsto \R^2$ (red) and a straight line (blue dotted chord) connecting the two endpoints.
The signed areas denoted by $A_{-}$ and $A_{+}$ are the negative and positive areas respectively, and $\Delta X^1$ and $\Delta X^2$ represent the increments along each coordinate.
%
\begin{figure}[H]
\centering
\includegraphics[scale=0.45]{curve_1.png}
\caption{Example of signed L\'evy area of a curve. Areas above and under the chord connecting two endpoints are negative and positive respectively.}
\label{fig:exampleOfSignedLevyArea}
\end{figure}
\noindent
%The higher order terms in signature are less intuitively interpretable in terms of geometrical objects, so we will not seek any explanations beyond the second level of truncation. Concluding this part, we would like to draw readers' attention to the fact, that the explicit computation of all infinite terms of signature are straightforward and conceptually clear. Computing more terms of signature will reveal more information about the path in close analogy to Taylor approximation of functions, where more terms of expansion approximate better the original function. It was shown [cite Terry and others] that using non-truncated signature (which contains infinite number of terms) one can recover the original path $X$ from the inverse transformation of signature if this path, namely:
We call a surjective, continuous, non-decreasing function $\psi : [a,b] \mapsto [a,b]$ a \emph{reparametrization}. For simplicity, we shall only consider smooth reparametrizations, although, just like in the definition of the path integral, this is not strictly necessary.
Let $X, Y : [a,b] \mapsto \R$ be two real-valued paths and $\psi : [a,b] \mapsto [a,b]$ a reparametrization. Define the paths $\widetilde X, \widetilde Y : [a,b] \mapsto \R$ by $\widetilde X_t = X_{\psi(t)}$ and $\widetilde Y_t = Y_{\psi(t)}$. Observe that
\begin{eqnarray}
\dot{\widetilde X}_t = \dot{X}_{\psi(t)} \dot{\psi}(t),
\end{eqnarray}
from which it follows that
\begin{eqnarray}
\int_a^b \widetilde Y_t d\widetilde X_t = \int_a^b Y_{\psi(t)} \dot{X}_{\psi(t)} \dot{\psi}(t) dt = \int_a^b Y_u dX_u,
\end{eqnarray}
where the last equality follows by making the substitution $u = \psi(t)$. This shows that path integrals are invariant under a time reparametrization of both paths.
Consider now a multi-dimensional path $X : [a,b] \mapsto \R^d$ and a reparametrization $\psi:[a,b] \mapsto [a,b]$. As before, denote by $\widetilde X :[a,b] \mapsto \R^d$ the reparametrized path $\widetilde X_t = X_{\psi(t)}$. Since every term of the signature $S(X)^{i_1,\ldots,i_k}_{a,b}$ is defined as an iterated path integral of $X$, it follows from the above that
\begin{eqnarray}
S(\widetilde X)^{i_1,\ldots,i_k}_{a,b} = S(X)^{i_1,\ldots,i_k}_{a,b}, \; \; \forall k \geq 0, \; i_1,\ldots, i_k \in \{1,\ldots, d\}.
\end{eqnarray}
That is to say, the signature $S(X)_{a,b}$ remains invariant under time reparametrizations of $X$.
One of the fundamental properties of the signature, shown originally by Ree~\cite{Ree58}, is that the product of two terms $S(X)^{i_1,\ldots, i_k}_{a,b}$ and $S(X)^{j_1,\ldots, j_m}_{a,b}$ can always be expressed as a sum of another collection of terms of $S(X)_{a,b}$ which only depends on the multi-indexes $(i_1,\ldots, i_k)$ and $(j_1,\ldots, j_m)$.
To make this statement precise, we define the shuffle product of two multi-indexes. First, a permutation $\sigma$ of the set $\{1,\ldots, k+m\}$ is called a $(k,m)$-shuffle if $\sigma^{-1}(1) < \ldots < \sigma^{-1}(k)$ and $\sigma^{-1}(k+1) < \ldots < \sigma^{-1}(k+m)$. The list $(\sigma(1),\ldots, \sigma(k+m))$ is also called a shuffle of $(1,\ldots, k)$ and $(k+1,\ldots, k+m)$. Let $\Shuffles(k,m)$ denote the collection of all $(k,m)$-shuffles.
\begin{definition}[Shuffle product]
Consider two multi-indexes $I = (i_1,\ldots, i_k)$ and $J = (j_1,\ldots, j_m)$ with $i_1,\ldots,i_k,j_1,\ldots, j_m \in \{ 1,\ldots, d\}$. Define the multi-index
\begin{eqnarray}
(r_1,\ldots, r_k, r_{k+1}, \ldots r_{k+m}) = (i_1,\ldots, i_k, j_1,\ldots, j_m).
\end{eqnarray}
The shuffle product of $I$ and $J$, denoted $I \shuffle J$, is a finite set of multi-indexes of length $k+m$ defined as follows
\begin{eqnarray}
I \shuffle J = \{(r_{\sigma(1)},\ldots, r_{\sigma(k+m)}) \mid \sigma \in \Shuffles(k,m) \}.
\end{eqnarray}
\end{definition}
\begin{theorem}[Shuffle product identity]
For a path $X : [a,b] \mapsto \R^d$ and two multi-indexes $I = (i_1,\ldots, i_k)$ and $J = (j_1,\ldots, j_m)$ with $i_1,\ldots,i_k,j_1,\ldots, j_m \in \{ 1,\ldots, d\}$, it holds that
\begin{eqnarray}
S(X)^I_{a,b} S(X)^J_{a,b} = \sum_{K \in I \shuffle J} S(X)^K_{a,b}.
\end{eqnarray}
\end{theorem}
\begin{example}
To make things more clear, let us consider a simple example of a two-dimensional path $X : [a,b] \mapsto \R^2$. The shuffle product implies that
\begin{eqnarray}
S(X)^1_{a,b} S(X)^2_{a,b} &=& S(X)^{1,2}_{a,b} + S(X)^{2,1}_{a,b},\\
S(X)^{1,2}_{a,b} S(X)^1_{a,b} &=& 2 S(X)^{1,1,2}_{a,b} + S(X)^{1,2,1}_{a,b}.\nonumber
\end{eqnarray}
\end{example}
%
The shuffle product in particular implies that the product of two terms of the signature can be expressed as a linear combination of higher order terms. This fact will be useful for practical applications of the signature to regression analysis which will be further discussed in Chapter 2.
We now describe a property of the signature known as Chen's identity, which provides an algebraic relationship between paths and their signatures. To formulate Chen's identity, we need to introduce the algebra of formal power series, which we have not mentioned thus far, but which should appear natural in light of the definition of the signature.
\begin{definition}[Formal power series]
Let $e_1,\ldots, e_d$ be $d$ formal indeterminates. The algebra of (non-commuting) \emph{formal power series} in $d$ indeterminates is the vector space of all series of the form
\begin{eqnarray}
\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \lambda_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k},
\end{eqnarray}
where the second summation runs over all multi-indexes $(i_1,\ldots, i_k)$, $i_1,\ldots, i_k \in \{1,\ldots, d\}$, and $\lambda_{i_1,\ldots, i_k}$ are real numbers.
\end{definition}
A (non-commuting) formal polynomial is a formal power series for which only a finite number of coefficients $\lambda_{i_1,\ldots, i_k}$ are non-zero. The terms $e_{i_1}\ldots e_{i_k}$ are called monomials. The term corresponding to $k = 0$ is simply just a real number $\lambda_0$.
The space of formal power series is often also called the \emph{tensor algebra} of $\R^d$.
We stress that the power series we consider are non-commutative; for example, the elements $e_1e_2$ and $e_2e_1$ are distinct.
Observe that the space of formal power series may be naturally equipped with a vector space structure by defining addition and scalar multiplication as
\begin{multline}
\left(\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \lambda_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k}\right) +
\left(\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \mu_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k}\right) \\
= \sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} (\lambda_{i_1,\ldots,i_k} + \mu_{i_1,\ldots, i_k})e_{i_1}\ldots e_{i_k}
\end{multline}
and
\begin{eqnarray}
c\left(\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \lambda_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k}\right)
= \sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} c\lambda_{i_1,\ldots,i_k}e_{i_1}\ldots. e_{i_k}.
\end{eqnarray}
Moreover, one may define the product $\otimes$ between monomials by joining together multi-indexes
\begin{eqnarray}
e_{i_1}\ldots e_{i_k} \otimes e_{j_1}\ldots e_{j_m} = e_{i_1}\ldots e_{i_k}e_{j_1}\ldots e_{j_m}.
\end{eqnarray}
The product $\otimes$ then extends uniquely and linearly to all power series. We demonstrate the first few terms of the product in the following expression
\begin{multline}
\left(\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \lambda_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k}\right)
\otimes \left(\sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \mu_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k} \right) \\
= \lambda_0\mu_0 + \sum_{i=1}^d (\lambda_0\mu_i + \lambda_i\mu_0)e_i + \sum_{i,j=1}^d \left( \lambda_0 \mu_{i,j} + \lambda_i\mu_j + \lambda_{i,j}\mu_0\right)e_ie_j + \ldots.
\end{multline}
The space of formal power series becomes an algebra when equipped with this vector space structure and the product $\otimes$.
The reader may have noticed that the indexing set of the monomials $e_{i_1}\ldots e_{i_k}$ coincides with the indexing set of the terms of the signature of a path $X : [a,b] \mapsto \R^d$, namely the collection of all multi-indexes $(i_1,\ldots, i_k)$, $i_1,\ldots, i_k \in \{1,\ldots, d\}$. It follows that a convenient way to express the signature of $X$ is by a formal power series where the coefficient of each monomial $e_{i_1}\ldots e_{i_k}$ is defined to be $S(X)^{i_1,\ldots, i_k}_{a,b}$. We use the same symbol $S(X)_{a,b}$ to denote this representation
\begin{eqnarray}
S(X)_{a,b} = \sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} S(X)^{i_1,\ldots, i_k}_{a,b} e_{i_1}\ldots e_{i_k},
\end{eqnarray}
where, as before, we set the ``zero-th'' level of the signature $S(X)^0_{a,b} = 1$ (corresponding to $k=0$).
To state Chen's identity, it remains to define the concatenations of paths.
\begin{definition}[Concatenation]
For two paths $X : [a,b] \mapsto \R^d$ and $Y: [b,c] \mapsto \R^d$, we define their \emph{concatenation} as the path $X * Y : [a,c] \mapsto \R^d$ for which $(X * Y)_t = X_t$ for $t \in [a,b]$ and $(X * Y)_t = X_b + (Y_t - Y_b)$ for $t \in [b,c]$.
\end{definition}
Chen's identity informally states that the signature turns the ``concatenation product'' $*$ into the product $\otimes$. More precisely, we have the following result.
\begin{theorem}[Chen's identity]
Let $X : [a,b] \mapsto \R^d$ and $Y: [b,c] \mapsto \R^d$ be two paths. Then
\begin{eqnarray}
S(X * Y)_{a,c} = S(X)_{a,b} \otimes S(Y)_{b,c}.
\end{eqnarray}
\end{theorem}
The time-reversal property informally states that the signature $S(X)_{a,b}$ of a path $X : [a,b] \mapsto \R^d$ is precisely the inverse under the product $\otimes$ of the signature obtained from running $X$ backwards in time. To make this precise, we make the following definition.
\begin{definition}[Time-reversal]
For a path $X : [a,b] \mapsto \R^d$, we define its time-reversal as the path $\overleftarrow X : [a,b] \mapsto \R^d$ for which $\overleftarrow X_t = X_{a + b-t}$ for all $t \in [a,b]$.
\end{definition}
\begin{theorem}[Time-reversed signature]
For a path $X : [a,b] \mapsto \R^d$, it holds that
\begin{eqnarray}
S(X)_{a,b} \otimes S(\overleftarrow X)_{a,b} = 1.
\end{eqnarray}
\end{theorem}
The element $1$ in the above expression should be understood as the formal power series where $\lambda_0 = 1$ and $\lambda_{i_1,\ldots, i_k} = 0$ for all $k \geq 1$ and $i_1,\ldots, i_k \in \{1,\ldots, d\}$, which is the identity element under the product $\otimes$.
We now define a transform of the path signature called the log signature. The log signature essentially corresponds to taking the formal logarithm of the signature in the algebra of formal power series.
To this end, for a power series
\begin{eqnarray}
x = \sum_{k = 0}^\infty \sum_{i_1,\ldots, i_k \in \{1,\ldots d\}} \lambda_{i_1,\ldots,i_k}e_{i_1}\ldots e_{i_k}
\end{eqnarray}
for which $\lambda_0 > 0$, define its logarithm as the power series given by
\begin{eqnarray}
\log x = \log(\lambda_0) + \sum_{n \geq 1}\frac{(-1)^n}{n}\left(1 - \frac{x}{\lambda_0}\right)^{\otimes n},
\end{eqnarray}
where $\otimes n$ denotes the $n$-th power with respect to the product $\otimes$.
For example, for a real number $\lambda \in \R$ and the series
\begin{eqnarray}
x = 1 + \sum_{k \geq 1} \frac{\lambda^k}{k!} e_{1}^{\otimes k},
\end{eqnarray}
one can readily check that
\begin{eqnarray}
\log x = \lambda e_1.
\end{eqnarray}
Observe that, in general, $\log x$ is a series with an infinite number of terms, however for every multi-index $(i_1,\ldots, i_k)$, the coefficient of $e_{i_1}\ldots e_{i_k}$ in $\log x$ depends only on the coefficients of $x$ of the form $\lambda_{j_1,\ldots,j_m}$ with $m \leq k$, of which there are only finitely many, so that $\log x$ is well-defined without the need to consider convergence of infinite series.
\begin{definition}[Log signature]
For a path $X : [a,b] \mapsto \R^d$, the log signature of $X$ is defined as the formal power series $\log S(X)_{a,b}$.
\end{definition}
For two formal power series $x$ and $y$, let us define their Lie bracket by
\begin{eqnarray}
[x,y] = x\otimes y - y \otimes x.
\end{eqnarray}
A direct computation shows that the first few terms of the log signature are given by
\begin{eqnarray}
\log S(X)_{a,b} = \sum_{i=1}^d S(X)^i_{a,b}e_i + \sum_{1 \leq i < j \leq d} \frac{1}{2}\left(S(X)^{i,j}_{a,b}-S(X)^{j,i}_{a,b}\right)[e_i,e_j] + \ldots.
\end{eqnarray}
In particular one can see that the coefficient of the polynomials $[e_i,e_j]$ in the log signature is precisely the L{\'e}vy area introduced in Section~\ref{subsubsec:geoIntuition}.
\begin{example}
Consider the two-dimensional path
\begin{eqnarray}
X : [0,2] \mapsto \R^2, \; \; X_t =
\begin{cases} \{t,0\} &\mbox{if } t \in [0,1], \\
\{1,t-1\} &\mbox{if } t \in [1,2].
\end{cases}
\end{eqnarray}
Note that $X$ is the concatenation of the two linear paths, $Y : [0,1] \mapsto \R^2$, $Y_t = \{t,0\}$, and $Z:[1,2] \mapsto \R^2$, $Z_t \mapsto \{0,t-1\}$. One can readily check that the signatures of $Y$ and $Z$ (as formal power series) are given by
\begin{eqnarray}
S(Y)_{0,1} = 1 + \sum_{k \geq 1} \frac{1}{k!}e_{1}^{\otimes k}, \; \; S(Z)_{1,2} = 1 + \sum_{k \geq 1} \frac{1}{k!}e_{2}^{\otimes k}.
\end{eqnarray}
It follows by Chen's identity that
\begin{eqnarray}
S(X)_{0,2} = S(Y)_{0,1} \otimes S(Z)_{1,2} = 1 + e_1 + e_2 + \frac{1}{2!}e_1 + \frac{1}{2!}e_2 + e_1e_2 + \ldots.
\end{eqnarray}
Hence the first few terms of the log signature of $X$ are
\begin{eqnarray}
\log S(X)_{0,2} = e_1 + e_2 + \frac{1}{2}[e_1,e_2] + \ldots.
\end{eqnarray}
\end{example}
In fact, one can readily check that coefficients of $\log S(X)_{0,2}$ in the above example are given precisely by the classical Campbell-Baker-Hausdorff formula.
The above example in fact demonstrates the general fact that the log signature can always be expressed as a power series composed entirely of so-called Lie polynomials. This is the content of the following theorem due to Chen~\cite{Chen57}, which generalises the Campbell-Baker-Hausdorff theorem.
\begin{theorem}
Let $X : [a,b] \mapsto \R^d$ be a path. Then there exist real numbers $\lambda_{i_1,\ldots, i_k}$ such that
\begin{eqnarray}
\log S(X)_{a,b} = \sum_{k \geq 1} \sum_{i_1,\ldots, i_k \in \{1,\ldots, d\}} \lambda_{i_1,\ldots, i_k} [e_{i_1},[e_{i_2},\ldots,[e_{i_{k-1}},e_{i_k}]\ldots ]].
\end{eqnarray}
\end{theorem}
Note that the coefficients $\lambda_{i_1,\ldots, i_k}$ are in general not unique since the polynomials of the form $[e_{i_1},[e_{i_2},\ldots,[e_{i_{k-1}},e_{i_k}]\ldots ]]$ are not linearly independent (e.g., $[e_1,e_2] = -[e_2,e_1]$).
Our discussion of the signature has so far been restricted to paths which are piecewise differentiable (or more generally of bounded variation). This restriction was needed to ensure that the iterated integrals of the path existed as Riemann-Stieltjes integrals. More generally, one can define the iterated integrals of a path using the Young integral for any path of finite $p$-variation with $1 \leq p < 2$. The Young integral goes beyond the ``classical'' definition of the integral and is already able to cover a class of paths substantially more irregular than those of bounded variation.
%However its role in stochastic analysis remains limited due to the fact that sample paths of Brownian motion have almost surely infinite $p$-variation for $p \leq 2$ (but have almost surely finite $p$-variation for any $p > 2$). remains limited in stochastic analysis due to the properties of
A problem that arises for paths of infinite $p$-variation for all $p < 2$ (which is a situation of great interest in stochastic analysis due to the fact that the sample paths of Brownian motion have almost surely finite $p$-variation if and only if $p > 2$), is that one can show there is no well-defined notion of an iterated integral for such paths. We stress that this is not due to any technical limitation of the Young integral, but rather due to the fact that there is no unique candidate for the iterated integrals. That is to say, there is not necessarily only one unique way to define the iterated integrals.
One of the key observations of T. Lyons in his introduction of rough paths in~\cite{Lyons1998} was that if one \emph{defines} the first $\floor{p}$ iterated integrals of a path $X$ of finite $p$-variation, then there is indeed a unique way to obtain all the other iterated integrals, and hence the signature of $X$. This notion of a path of finite $p$-variation, along with its first $\floor p$ iterated integrals (which may be defined arbitrarily provided that they satisfy Chen's identity and possess finite $p$-variation), is precisely the definition of a $p$-rough path.
A key feature of the theory of rough paths, known now as the \emph{universal limit theorem}, is that one is able to give meaning to controlled differential equations where the driver belongs to a special class of $p$-rough paths (know as geometric $p$-rough paths), and where the solution depends in a continuous way on the driver provided that the space of $p$-rough paths is equipped with a suitable topology (known as the $p$-variation metric).
For the reader interested, we strongly recommend the St. Flour lecture notes of Lyons, Caruana, and L{\'e}vy~\cite{Lyons07} for an introduction to the theory of rough paths, and the monograph of Friz and Hairer~\cite{FrizHairer14} for a more recent treatment of the topic and an introduction to Hairer's emerging theory of regularity structures in the study of stochastic partial differential equations.
As discussed in Section~\ref{subsubsec:Picard}, the signature of a path $X : [a,b] \mapsto \R^d$ is all that is needed to determine the endpoint of the solution to a linear (and, less trivially, non-linear) differential equation driven by $X$, which was first shown by Chen~\cite{Chen58} in the smooth setting, and later extended by Hambly and Lyons~\cite{Hambly10} and Boedihardjo et al.~\cite{Boedihardjo14} to less regular paths. The works of these authors in fact shows that the signature captures deep geometric properties of a path, which we briefly discuss here.
A natural question one may ask is the following: is a path completely determined by its signature? In light of the time-reversal property and Chen's identity, as well as the invariance of the signature under time reparametrizations, the answer, in general, is no. For example, one can never recover from the signature the exact speed at which the path is traversed (due to invariance under time reparametrizations), nor can one tell apart the signature of a trivial constant path and that of a path concatenated with its time-reversal.
However, a far less elementary fact is that this is essentially the only information one loses from the signature. For example, for a path $X$ which never crosses itself, the signature is able to completely describe the image and direction of traversal of the path (that is, all the points that $X$ visits and the order in which it visits them).
This demonstrates the signature's ability to completely determine the geometric properties of a path which does not possess degeneracies of a certain kind consisting of movements going directly back onto itself (this is made precise using the notion of a \emph{tree-like path} introduced in~\cite{Hambly10}).
We emphasise however that the question of how one may effectively recover various properties of a path from its signature currently remains a challenging area of research. For recent progress on this topic, see Lyons and Xu~\cite{LyonsXu15I, LyonsXu15II}) and Geng~\cite{Geng15}.
The main idea of using the signature transformation for machine learning problems is motivated by its ability to extract characteristic features from data. As already discussed, embedding data into a path and computing its signature provides us with important information about the original data. The workflow is simple and is summarised in the following algorithm:
%
$$ \text{{\it data}} \rightarrow \text{{\it path}} \rightarrow \text{{\it signature of path}} \rightarrow \text{{\it features of data}} $$
%
This algorithm is absolutely general and works for any type of sequential data which can be embedded into a continuous path. The extracted features might be used for various types of machine learning applications, including both supervised and unsupervised learning. For example, one can classify time-series or distinguish clusters of data. One of the advantages of feature extraction with the signature method is that the signature is sensitive to the geometric shape of a path.
%For example, if two data sets possess identical statistical moments, signature will generate distinct features.
Sensitivity to the geometric shape of the input data has lead to a successful application of the signature method to Chinese character recognition problem \cite{graham2013sparse}. One of the most known and natural applications of the signature method is in quantitative finance, namely analysis of time-series data \cite{gyurko2014extracting,levin2015learning}. Time-series data represent ordered sequential data which is an ideal candidate for creating a path from data, followed by computing the signature and applying machine learning algorithms for further analysis. Any type of time-ordered sequential data naturally fits into the signature framework. Moreover, if the input data come from several parallel sources, this will result in a multi-dimensional path. An example for such a type of data is {\it panel} data (in Econometrics) or {\it longitudinal} data (in Medicine, Psychology, Biostatistics etc.) which involve repeated observations of the same quantity over periods of time.
\begin{comment}
We would like to quote Prof. Terry Lyons here and express his point of view on geometric paths: {\it ``Our mathematical study of these objects does not encourage us to think
broadly about the truly enormous range of ``paths'' that occur. Although
most mathematicians would agree on the definition of a path, most have a
rather stereotyped and limited imagination about the variety of paths that
are ``in the wild''.''}
\end{comment}
Concluding this brief introduction to applications of the path signature method to machine learning problems, we emphasise that this novel method introduces a new concept of dealing with data: thinking of data as geometric paths and using the path signature method in data analysis. In the following sections we will elaborate on these statements and demonstrate practical applications of the signature method.
%{\it ``Our mathematical study of these objects does not encourage us to think
%broadly about the truly enormous range of "paths" that occur. Although
%most mathematicians would agree on a definition of a path, most have a
%rather stereotyped and limited imagination about the variety of paths that
%are "in the wild"." --- Terry Lyons}
\begin{thebibliography}{10}
\bibitem{altman1997altman}
Edward~G Altman, Donald Hedeker, James~L Peterson, and John~M Davis.
\newblock The altman self-rating mania scale.
\newblock {\em Biological psychiatry}, 42(10):948--955, 1997.
\bibitem{Boedihardjo14}
Horatio Boedihardjo, Xi~Geng, Terry Lyons, and Danyu Yang.
\newblock The signature of a rough path: Uniqueness.
\newblock arXiv:1406.7871, August 2014.
\newblock Preprint.
\bibitem{BoedihardjoNi14}
Horatio Boedihardjo, Hao Ni, and Zhongmin Qian.
\newblock Uniqueness of signature for simple curves.
\newblock {\em J. Funct. Anal.}, 267(6):1778--1806, 2014.
\bibitem{Chen57}
Kuo-Tsai Chen.
\newblock Integration of paths, geometric invariants and a generalized
{B}aker-{H}ausdorff formula.
\newblock {\em Ann. of Math. (2)}, 65:163--178, 1957.
\bibitem{Chen58}
Kuo-Tsai Chen.
\newblock Integration of paths---a faithful representation of paths by
non-commutative formal power series.
\newblock {\em Trans. Amer. Math. Soc.}, 89:395--407, 1958.
\bibitem{diggle2002analysis}
Peter Diggle, Patrick Heagerty, Kung-Yee Liang, and Scott Zeger.
\newblock {\em Analysis of longitudinal data}.
\newblock Oxford University Press, 2002.
\bibitem{gyurko2014extracting}
Jonathann Field, Lajos~Gergely Gyurk{\'o}, Mark Kontkowski, and Terry Lyons.
\newblock Extracting information from the signature of a financial data stream.
\newblock arXiv:1307.7244, July 2014.
\newblock Preprint.
\bibitem{flint2015discretely}
Guy Flint, Ben Hambly, and Terry Lyons.
\newblock Discretely sampled signals and the rough hoff process.
\newblock {\em arXiv preprint arXiv:1310.4054}, 2015.
\bibitem{FrizHairer14}
Peter~K. Friz and Martin Hairer.
\newblock {\em A course on rough paths}.
\newblock Universitext. Springer, Cham, 2014.
\newblock With an introduction to regularity structures.
\bibitem{geddes2015comparative}
John~R Geddes, Alexandra Gardiner, Jennifer Rendell, Merryn Voysey, Elizabeth
Tunbridge, Christopher Hinds, Ly-Mee Yu, Jane Hainsworth, Mary-Jane
Attenburrow, Judit Simon, et~al.
\newblock Comparative evaluation of quetiapine plus lamotrigine combination
versus quetiapine monotherapy (and folic acid versus placebo) in bipolar
depression (cequel): a 2$\times$ 2 factorial randomised trial.
\newblock {\em The Lancet Psychiatry}, 2015.
\bibitem{Geng15}
Xi~Geng.
\newblock Reconstruction for the signature of a rough path.
\newblock arXiv:1508.06890, August 2015.
\newblock Preprint.
\bibitem{graham2013sparse}
Benjamin Graham.
\newblock Sparse arrays of signatures for online character recognition.
\newblock arXiv:1308.0371, December 2013.
\newblock Preprint.
\bibitem{megConbrio}
Lajos~Gergely Gyurko, Terry Lyons, and Harald Oberhauser.
\newblock Identifying patterns via the signature for the comnbrio project.
\newblock University of Oxford, 2014.
\bibitem{Hambly10}
Ben Hambly and Terry Lyons.
\newblock Uniqueness for the signature of a path of bounded variation and the
reduced path group.
\newblock {\em Ann. of Math. (2)}, 171(1):109--167, 2010.
\bibitem{kiraly2016kernels}
Franz~J Kir{\'a}ly and Harald Oberhauser.
\newblock Kernels for sequentially ordered data.
\newblock {\em arXiv preprint arXiv:1601.08169}, 2016.
\bibitem{levin2015learning}
Daniel Levin, Terry Lyons, and Hao Ni.
\newblock Learning from the past, predicting the statistics for the future,
learning an evolving system.
\newblock arXiv:1309.0260, September 2015.
\newblock Preprint.
\bibitem{LyonsXu15I}
Terry Lyons and Weijun Xu.
\newblock Hyperbolic development and inversion of signature.
\newblock arXiv:1507.00286, July 2015.
\newblock Preprint.
\bibitem{LyonsXu15II}
Terry Lyons and Weijun Xu.
\newblock Inverting the signature of a path.
\newblock arXiv:1406.7833, July 2015.
\newblock Preprint.
\bibitem{Lyons1998}
Terry~J. Lyons.
\newblock Differential equations driven by rough signals.
\newblock {\em Rev. Mat. Iberoamericana}, 14(2):215--310, 1998.
\bibitem{Lyons07}
Terry~J. Lyons, Michael Caruana, and Thierry L{\'e}vy.
\newblock {\em Differential equations driven by rough paths}, volume 1908 of
{\em Lecture Notes in Mathematics}.
\newblock Springer, Berlin, 2007.
\bibitem{lyons2005sound}
Terry~J Lyons and Nadia Sidorova.
\newblock Sound compression: a rough path approach.
\newblock In {\em Proceedings of the 4th international symposium on Information
and communication technologies}, pages 223--228. Trinity College Dublin,
2005.
\bibitem{Ree58}
Rimhak Ree.
\newblock Lie elements and an algebra associated with shuffles.
\newblock {\em Ann. of Math. (2)}, 68:210--220, 1958.
\bibitem{rush200316}
A~John Rush, Madhukar~H Trivedi, Hicham~M Ibrahim, Thomas~J Carmody, Bruce
Arnow, Daniel~N Klein, John~C Markowitz, Philip~T Ninan, Susan Kornstein,
Rachel Manber, et~al.
\newblock The 16-item quick inventory of depressive symptomatology (qids),
clinician rating (qids-c), and self-report (qids-sr): a psychometric
evaluation in patients with chronic major depression.
\newblock {\em Biological psychiatry}, 54(5):573--583, 2003.
\bibitem{sapsanis2013emg}
Christos Sapsanis, George Georgoulas, and Anthony Tzes.
\newblock Emg based classification of basic hand movements based on
time-frequency features.
\newblock In {\em Control \& Automation (MED), 2013 21st Mediterranean
Conference on}, pages 716--722. IEEE, 2013.
\bibitem{tibshirani1996regression}
Robert Tibshirani.
\newblock Regression shrinkage and selection via the lasso.
\newblock {\em Journal of the Royal Statistical Society. Series B
(Methodological)}, pages 267--288, 1996.
\bibitem{yang2015deepwriterid}
Weixin Yang, Lianwen Jin, and Manfei Liu.
\newblock Deepwriterid: An end-to-end online text-independent writer
identification system.
\newblock {\em arXiv preprint arXiv:1508.04945}, 2015.
\bibitem{zou2005regularization}
Hui Zou and Trevor Hastie.
\newblock Regularization and variable selection via the elastic net.
\newblock {\em Journal of the Royal Statistical Society: Series B (Statistical
Methodology)}, 67(2):301--320, 2005.
\end{thebibliography}