Source-linked AI summary

Deep Signature Transforms

Patric Bonnier, Patrick Kidger, Imanol Perez Arribas, Cristopher Salvi, Terry Lyons

arXiv:1905.08494v2cs.LGstat.ML

TL;DR

The paper addresses the limitation of treating the signature as a fixed feature transformation when selecting informative terms or augmentations. It makes the augmentation learnable and places signature transforms within neural networks as pooling layers, with experiments spanning generative modeling, supervised learning, and reinforcement learning. The reported experiments show strong performance for deep signature models, including an order-of-magnitude advantage in one supervised comparison and successful Mountain Car learning where the RNN failed.

  • Problem

    Truncating signatures to their first N terms can discard information from higher degrees, while fixed augmentation choices may not suit the data.

  • Method

    The paper learns data-dependent stream augmentations with neural networks and uses signature transforms as layers or pooling operations within neural networks.

  • Results

    Deep signature models outperformed other models by at least an order of magnitude in supervised learning, generated nearly indistinguishable Ornstein–Uhlenbeck paths, and solved Mountain Car while the RNN failed.

  • Takeaways & Limitations

    The signature transform can be integrated more generally into neural networks rather than being limited to preprocessing, combining its mathematical theory with neural-network learning.

  • Takeaways & Limitations

    Applying a signature to reshaped non-stream data lacks an underlying path and therefore lacks the mathematical guarantees normally associated with the transform.

Abstract

from arXiv · show

The signature is an infinite graded sequence of statistics known to characterise a stream of data up to a negligible equivalence class. It is a transform which has previously been treated as a fixed feature transformation, on top of which a model may be built. We propose a novel approach which combines the advantages of the signature transform with modern deep learning frameworks. By learning an augmentation of the stream prior to the signature transform, the terms of the signature may be selected in a data-dependent way. More generally, we describe how the signature transform may be used as a layer anywhere within a neural network. In this context it may be interpreted as a pooling operation. We present the results of empirical experiments to back up the theoretical justification. Code available at https://github.com/patrick-kidger/Deep-Signature-Transforms.

1 Introduction

The paper motivates learning data-dependent augmentations before signature transforms and embedding signature transforms as pooling layers within neural networks. This extends signatures from fixed preprocessing features to reusable components that can support multiple layers and domains.

  • Motivation: The signature characterises paths richly and supports approximating continuous path functions, making it an attractive feature transformation for machine learning.Its terms provide a basis for functions on paths rather than a parameterisation of the path itself.
  • Limitation of fixed transforms: Truncating the infinite signature to its first N terms can discard information when the target function depends on higher-degree terms.The usual truncation relies on factorial decay, but higher-order information may still be essential.
  • Learned augmentation: A pointwise augmentation before the signature can encode higher-order stream information in lower-degree terms, but choosing that augmentation manually remains difficult.Fixed maps may be selected arbitrarily or through experimentation rather than learned from data.
  • Learned augmentation: The proposed approach learns the augmentation, potentially with a neural network, so the signature terms are selected in a data-dependent way rather than used only as fixed features.The learned augmentation need not be pointwise or have the form (x, ϕ(x)).
  • Signature layers: Within a neural network, the signature maps a batch of paths from shape (b, d, n) to pooled truncated-signature features and can therefore serve as a pooling operation.The output shape is (b, (dN+1−1)/(d−1)), where N is the number of retained terms.
  • Multiple signature layers: Lifts convert streams into streams of streams, allowing signatures to be applied repeatedly and elevated from one-time preprocessing to first-class neural-network layers.The paper combines this layered use of signatures with neural networks and reports applications in generative, supervised, and reinforcement learning.

2 Related Work

Related work includes signature-layer architectures, fixed feature maps, and universal-nonlinearity arguments. The paper distinguishes its approach by making the feature map learnable and by addressing the practical constraints of truncated signatures.

  • Signature-based architectures: Existing signature models include recurrent baselines and simple architectures that place a signature layer within a neural-network model.Figure 1 presents two simple signature-layer architectures.
  • Theoretical basis and truncation: The universal-nonlinearity property gives a theoretical basis for simple signature models, but truncation makes the choice of depth N a practical concern.A nonlinear learned function is proposed as a more practical alternative to restricting the network to a linear layer.
  • Fixed feature maps: Prior work applies a pointwise feature map Φ before the signature so the transformed stream may capture properties useful for prediction.The transformed d-dimensional stream lies in S(R^e) when Φ maps R^d to R^e.

3 The signature transform as a layer in a neural network

The paper makes the signature transform a learnable neural-network layer by learning stream augmentations and preserving stream structure through lifts, enabling repeated signature applications. The resulting deep signature model has universal approximation properties, while arbitrary reshaping without an underlying path forfeits the signature’s usual guarantees.

  • A learnable feature map Φθ replaces fixed augmentation, allowing the signature’s retained terms to be selected in a data-dependent way.
  • The signature layer maps sampled paths to finite-dimensional truncated-signature tensors and functions as a pooling operation within a neural network.It can be differentiated through using standard tensor operations.
  • Pointwise, convolutional, and recurrent networks can augment streams while preserving the stream-like structure required by a subsequent signature transform.The recurrent construction carries memory while producing a stream of transformed observations.
  • 3.2 Stream-like data: Reshaping a tensor without stream-like meaning and then applying a signature lacks an underlying path and therefore lacks the signature’s usual mathematical guarantees.
  • 3.3 Stream-preserving signatures, using lifts: Lifts construct streams of signatures from expanding windows, pieces, or sliding windows, preserving stream structure so signature layers can be composed repeatedly.The shortest meaningful input stream has length two, so no signature is taken for a one-point prefix.
  • 3.4 Multiple signature layers: The deep signature model combines learned transformations, signature layers, and lifts, and it exhibits the universal approximation property.The model is summarized in Figure 2 and the approximation claim follows from neural-network universality and signature nonlinearity.

4 Numerical experiments

The experiments apply deep signature models to generative, supervised, and non-Markovian reinforcement-learning tasks. Results include statistically near-indistinguishable Ornstein–Uhlenbeck paths, order-of-magnitude gains in Hurst-parameter estimation, and successful learning where a comparable RNN fails.

  • Generative model: The generative model uses signatures in both the generator and discriminator, with Brownian motion as its random-noise input.The generator-discriminator pair is presented as an instance of the deep signature framework.
  • Generative model: 6.6 × 10−4 loss on 1024 Ornstein–Uhlenbeck realisations implied generated paths were statistically almost indistinguishable from the real process.Figure 5 compares generated paths with original paths.
  • Supervised learning with fractional Brownian motion: Deep signature models outperformed all other models by at least an order of magnitude when estimating the Hurst parameter.Traditional signature models performed slightly worse than traditional recurrent models; DeepSigNet and DeeperSigNet used one large or three smaller Neural-Lift-Signature blocks, respectively.
  • Non-Markovian deep reinforcement learning: A residual deep signature architecture was interpreted as using signatures as recurrent-network memory for a non-Markovian reinforcement-learning task.With only the car’s position observed, the model learned to solve the task within the specified episode limit, whereas a comparable RNN failed.

5 Conclusion

The paper brings signature transforms and neural networks together in a general framework, extending signatures beyond preprocessing to deeper network use across domains.

  • The paper combines the theoretical motivation for signature transforms with the empirical success of neural networks.
  • The paper provides examples of applying this general principle across a variety of domains.
  • Stream-preserving neural networks enable signature transforms to be used deeper within a network rather than only as feature transformations.
  • Lifts enable the use of multiple signature transforms within the framework.
  • The signature transform can serve as a universal nonlinearity and pooling layer within a neural network.

A.1 Signatures of paths

The signature maps a path to iterated-integral statistics with strong structural properties, including essential uniqueness, universal approximation through linear functionals, and time-reparameterisation invariance.

  • The signature is defined as a collection of iterated integrals of a continuous piecewise-smooth path.
  • The signature is essentially invariant to translations because it uniquely determines a path up to translation.
  • Signature terms decay factorially in degree, motivating finite truncations for practical use.
  • Every continuous function on a compact set of suitably normalised paths can be approximated by a linear functional of the signature.
  • The signature is invariant under increasing time reparameterisations, so it preserves data order without depending on the precise arrival times.
  • Time augmentation retains parameterisation-dependent information when such dependence is desired, whereas using the unaugmented path preserves time-reparameterisation invariance.

A.2 Signatures of streams of data

A data stream is interpreted as a piecewise-linear path, whose truncated signature is well-defined independently of interpolation and has finite dimension determined by input dimension and truncation depth.

  • A stream of data is interpreted as a discretisation of a path using linear interpolation between observations.
  • The stream signature is defined from any linear interpolation, and the result is independent of the interpolation choice.
  • The truncated signature maps the infinite-dimensional stream space into a finite-dimensional space of dimension (dN+1 −1)/(d −1).
  • Its number of components does not depend on stream length, making it suitable for long or variable-length streams and streams with missing data.

A.3 Computing the signature

The signature is organised in tensor levels and computed efficiently through Chen’s identity, while its tensor operations support ordinary backpropagation with an unresolved rough-path perturbation issue.

  • The signature contains tensor-valued terms whose kth level lies in (R^d)^⊗k, with the zeroth term equal to 1.
  • Tensor products provide the multiplication structure used in the tensor algebra containing signatures.
  • Chen’s identity states that concatenating paths corresponds to tensor multiplication of their signatures.
  • A stream signature can be computed by iteratively applying Chen’s identity across its path segments.
  • When additional data arrive, the existing signature can be tensor-multiplied by the signature of the new segment.
  • Signature computation uses ordinary tensor operations and can be backpropagated through, but the correct perturbation notion for sufficiently rough paths remains unresolved.

B Implementation Details

The implementation used PyTorch with Adam and ReLU activations, alongside the iisignature package for signature calculations. Experiments ran on two GPU-equipped computers.

  • Models were implemented in PyTorch and trained with the Adam optimiser.
  • All activation functions were ReLU.
  • Signature calculations used the iisignature package because Signatory had not yet been developed.
  • Computations used two computers, including one equipped with two Tesla K40m GPUs.
  • The appendix notation matches the notation used in the corresponding main-document sections.

B.1 A generative model for a stochastic process

The generative model was trained on Ornstein–Uhlenbeck paths using a truncated signature architecture. Its training required informal hyperparameter searching, and overly simple stream transformations could lead to poor solutions.

  • The training data comprised 1024 Ornstein–Uhlenbeck realisations, sampled at 100 points over [0, 1], with 500 training epochs and no minibatching.
  • The generator used a pointwise neural layer that preserved the original time-augmented stream, an expanding-window lift, a depth-3 signature, and a pointwise linear output map.The truncated signature contained 84 scalar nonconstant terms, while the discriminator used depth 4.
  • Informal hyperparameter searching was necessary; insufficiently complex transformations that discarded the original stream could trap training in poor local minima.

B.2 Supervised learning with fractional Brownian motion

The fractional-Brownian-motion experiments compared feedforward, signature-based, recurrent, and deep signature models under roughly matched parameter counts. Deep signature models achieved the strongest reported performance, while configurations were not formally fine-tuned.

  • The experiments used 600 training and 100 test samples of fractional Brownian motion, each sampled at 300 time steps, with Hurst parameters in [0.2, 0.8].Models were trained for 100 epochs using mean squared error, with batches of 128 samples.
  • Models were compared at approximately equal parameter counts, without formal hyperparameter tuning for the task.
  • The feedforward, Neural-Sig, RNN, LSTM, and GRU baselines used progressively distinct architectures for raw-data, signature, and recurrent processing.The Feedforward and Neural-Sig architectures are specified in the cited passages; the recurrent baselines used recurrent layers over the raw data.
  • DeepSigNet used one Neural-Lift-Signature block, while DeeperSigNet used three blocks with feedforward and recurrent neural components.

B.3 Non-Markovian deep reinforcement learning

The reinforcement-learning experiment evaluated deep signature and recurrent models on Mountain Car using Deep Q Learning. The deep signature model learned to solve the task, while the RNN did not succeed within the evaluation budget.

  • The Mountain Car setup ran 300-step episodes, gave each model 2000 learning episodes, and offered left, right, or no engine action.The reward was the car’s position in (−1.2, 0.6), with a +1 goal bonus.
  • The models had approximately matched parameter counts, with limited ad hoc hyperparameter searching; no RNN achieved appreciable success during selection.The eventual deep signature model had 5769 parameters, compared with 5475 for the RNN.
  • The deep signature model used a learned linear stream transformation that preserved the time-augmented input, a depth-3 signature, and a three-action output layer.
  • Deep Q Learning used ε-greedy action selection with ε = 0.2 and discount factor γ = 0.99.
  • The deep signature model consistently solved the problem at around 1500 episodes, whereas the RNN failed within 2000 episodes across three test runs.
Loading 1905.08494v2…