Rough Path Signature

This app will compute the signature of the path you draw below. Source code.

What am I seeing?

The truncated signature (5 levels) of the path you've drawn. The signature is a method to summarize a path. It is a collection of iterated integrals. Here, we sample points of your mouse's movement and linearly interpolate between the points to obtain a continuous path and calculate its signature.

For instance, the values under S1 represent the total displacement (end point minus starting point) of the drawn path, while S2 contains information about the area enclosed by the path.

The signature has two important properties:

• it is independent of the parametrization of the path;
• it is independent of starting point of the path.

The colors help with visualization by indicating whether a value is negative (blue), neutral (yellow) or positve (red).

Why is this useful?

The signature is a powerful method to represent data. It has nice properties that can be used for machine learning, for instance in character recognition. See the resources below.

Some more background

Mathematically, for a continuous path $X \colon [0,1] \to \mathbb{R}^d$ of bounded variation, the signature of $X$ is defined as $S(X)_{0,1} = \left (1, \: S^1(X)_{0,1}, \: S^2(X)_{0,1}, \dots \right),$ where $S^k(X)_{0,1} = \int_{0 < s_1 < \dots < s_k < 1} \, d X_{s_1} \otimes \dots \otimes d X_{s_k}.$ Here, the integral is taken to be the Stieltjes integral. The signature is an element of the tensor algebra $\bigoplus_{k=0}^\infty \left(\mathbb{R}^{d}\right)^{\otimes k} = \mathbb{R} \oplus \mathbb{R^d} \oplus \left(\mathbb{R^d} \otimes \mathbb{R^d}\right) \oplus \dots$.

In coordinates, we have explicitly $S(X)^{i_1,\dots,i_k}_{0,1} = \int_{0 < s_1 < \dots < s_k < 1} \, d X_{s_1}^{i_1} \dots d X_{s_k}^{i_k},$ in which the indices $i_j$ take value in $\{1, \dots, d\}$.

In our case $d = 2$ and we truncate the signature at level 5. The $k$th level is an element of a vector space of dimension $d^k$, so the $k$th table above contains $2^k$ values. You can hover over the cells to see the corresponding indices.