# A Kernel Two-sample Test for Dynamical Systems

arXiv: https://arxiv.org/abs/2004.11098 · HTML: https://mlsanity.com/paper/2004.11098/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 23 Apr 2020.

## Built on by (most cited first, 7 of 7)

- [Change Detection of Markov Kernels with Unknown Pre and Post Change Kernel](https://mlsanity.com/paper/2201.11722/) (2022)
- [Data-Driven Observability Analysis for Nonlinear Stochastic Systems](https://mlsanity.com/paper/2302.11979/) (2023)
- [Neural Network Approximation for Pessimistic Offline Reinforcement Learning](https://mlsanity.com/paper/2312.11863/) (2023)
- [Safe reinforcement learning in uncertain contexts](https://mlsanity.com/paper/2401.05876/) (2024)
- [Improving the Performance of Robust Control through Event-Triggered Learning](https://mlsanity.com/paper/2207.14252/) (2022)
- [Multimodal Multi-User Surface Recognition with the Kernel Two-Sample Test](https://mlsanity.com/paper/2303.04930/) (2023)
- [Machine Learning for Two-Sample Testing under Right-Censored Data: A Simulation Study](https://mlsanity.com/paper/2409.08201/) (2024)

## Abstract (arXiv)

Evaluating whether data streams are drawn from the same distribution is at the heart of various machine learning problems. This is particularly relevant for data generated by dynamical systems since such systems are essential for many real-world processes in biomedical, economic, or engineering systems. While kernel two-sample tests are powerful for comparing independent and identically distributed random variables, no established method exists for comparing dynamical systems. The main problem is the inherently violated independence assumption. We propose a two-sample test for dynamical systems by addressing three core challenges: we (i) introduce a novel notion of mixing that captures autocorrelations in a relevant metric, (ii) propose an efficient way to estimate the speed of mixing relying purely on data, and (iii) integrate these into established kernel two-sample tests. The result is a data-driven method that is straightforward to use in practice and comes with sound theoretical guarantees. In an example application to anomaly detection from human walking data, we show that the test is readily applicable without any human expert knowledge and feature engineering.
