Kernels for sequentially ordered data

Franz J. Király, Harald Oberhauser

Abstract

Sequential data, such as time series, strings, and graphs, presents a significant challenge for machine learning due to varying lengths and complex internal dependencies. This paper introduces a universal framework for constructing kernels for sequential data by leveraging "signature features" from rough path theory. The authors provide a mathematically rigorous method to "sequentialize" any static kernel, unifying existing approaches like string and alignment kernels while ensuring positive definiteness. To facilitate practical application, the paper introduces efficient dynamic programming algorithms and low-rank approximations that allow the framework to scale to large datasets.

Introduction

Sequential data is ubiquitous in modern data science, yet it remains difficult to process effectively. Traditional approaches often rely on manual feature engineering, ad-hoc distance metrics like Dynamic Time Warping (DTW), or domain-specific kernels. However, these methods frequently lack a unifying theoretical foundation. A notable issue in the field is that popular methods, such as the global alignment kernel, are often not positive definite, which can lead to unpredictable behavior or failure in algorithms like Support Vector Machines (SVMs).

In "Kernels for sequentially ordered data," Franz J. Király and Harald Oberhauser address these challenges by bridging stochastic analysis and machine learning. They propose a universal, mathematically sound kernel framework that avoids manual feature extraction and scales efficiently through a process of "double kernelization."

Methodology

Signatures and Rough Path Theory

The core of the proposed framework is the concept of a signature from rough path theory. A signature can be viewed as an ordered, non-commutative collection of sample moments (analogous to mean, variance, and skewness) that preserves the chronological order of changes within a sequence. These signatures provide a comprehensive representation of the data's path.

Double Kernelization

To make signatures computationally viable for machine learning, the authors employ a two-step kernelization strategy:

  1. Kernelizing the Signature: Directly computing signature features is combinatorially expensive. The authors bypass this by computing the inner product of the signatures directly, referred to as the "Signature Kernel."
  2. Sequentializing Static Kernels: The framework allows for the "lifting" of any primary kernel defined on static objects (such as a Gaussian kernel for images) into a sequential kernel for sequences of those objects. This allows the model to inherit the strengths of established static kernels while accounting for temporal or sequential structure.

Algorithmic Efficiency

To handle the computational demands, the authors introduce dynamic programming algorithms—similar in spirit to Horner's method—that compute the sequential kernel in polynomial time. For massive datasets, they provide low-rank approximations that reduce computational complexity to scale linearly with the number of sequences.

Theoretical Contributions

A Unified Framework

The authors demonstrate that many well-known sequence kernels, including string kernels and ANOVA kernels, are special cases of their signature-based sequential kernel. This provides a "Grand Unification" of previously disparate methods under a single theoretical umbrella.

Correcting the Alignment Kernel

The paper identifies the mathematical reason why global alignment kernels often fail to be positive definite: they typically omit certain "zero-increment" terms. By applying the lens of signatures, the authors naturally incorporate these missing terms, resulting in a modified alignment kernel that is mathematically valid and robust for use with kernel-based learners.

Universality and Robustness

Mathematical theorems provided in the paper guarantee that signature features capture nearly all relevant information about a sequence (up to "tree-like equivalence"). Furthermore, the framework is designed to be robust to noise; by utilizing higher-order rough path approximations, the kernel can effectively handle irregular data, such as Brownian motion.

Experimental Results

The framework was validated on two real-world classification tasks from the UCI repository:

  • UCI Hand Movement Dataset: This task involved sEMG recordings of hand movements. The sequentialized Euclidean kernel achieved F1-scores between 0.86 and 0.96. This significantly outperformed non-sequential baselines (0.27–0.70) and mean aggregation methods (0.17–0.20), highlighting the importance of preserving temporal order.
  • UCI Pendigits Dataset: For pen trajectories of handwritten digits, the sequentialized Gaussian kernel achieved an F1-score of 0.97. This result matched established baseline performances without requiring any domain-specific preprocessing or manual feature engineering.

In terms of speed, the dynamic programming approach reduced the complexity to $O(N^2 \cdot L^2 \cdot M)$, where $N$ is the number of sequences, $L$ is sequence length, and $M$ is the truncation degree. The low-rank simultaneous method further optimized this for large-scale applications.

Conclusion and Future Work

This research provides a powerful, theoretically grounded alternative to ad-hoc sequence modeling. While the computational cost for very long sequences ($O(L^2)$) remains a factor, the proposed low-rank approximations offer a viable path forward. The authors intend to expand this work by conducting broader benchmarking against deep learning models like LSTMs and Transformers, and by releasing toolbox-compatible implementations to facilitate wider adoption in the machine learning community.

Summary updated

BibTeX
@article{kiraly2019kernels,
  author = {Franz J. Király and Harald Oberhauser},
  title = {{Kernels for sequentially ordered data}},
  journal = {J. Mach. Learn. Res.},
  year = {2019},
}
Figure