Introduction
Determining whether two sets of time series data originate from the same underlying stochastic process is a fundamental challenge in statistics and machine learning. While the Maximum Mean Discrepancy (MMD) has established itself as a gold standard for comparing probability distributions in finite-dimensional spaces, its application to path-valued data—such as financial tick data or physiological signals—is non-trivial. These "paths" are inherently infinite-dimensional and characterized by complex temporal dependencies.
The Signature Maximum Mean Discrepancy (sig-MMD) offers a solution by leveraging the signature kernel to extend MMD to the space of paths. However, a significant practical hurdle remains: the terms within a path's signature decay factorially ($1/m!$). This mathematical property causes lower-order moments, such as the mean, to dominate the metric, while higher-order moments, such as volatility, skewness, or kurtosis, are effectively "buried." Consequently, standard sig-MMD tests often suffer from high Type 2 error rates (false negatives), failing to distinguish between processes that differ only in their higher-order dynamics.
Methodology
To address the limitations of standard sig-MMD, this research proposes a roadmap of techniques designed to "zoom in" on distributional differences. The authors frame sig-MMD as a test statistic for a two-sample hypothesis test ($H_0: P_X = P_Y$) and introduce several key enhancements:
Path Scaling and $\phi$-Signature Kernels
The authors utilize a generalized version of the signature kernel where different signature levels can be weighted. A critical theoretical contribution is the proof that scaling input paths by a constant $\sqrt{\theta}$ is mathematically equivalent to weighting the $m$-th level of the signature by $\theta^m$. This allows researchers to use the scaling factor $\theta$ as a "magnifying glass" to prioritize higher-order terms that would otherwise be negligible.
Lead-Lag Transformation
For processes where the primary difference lies in variance or volatility, the authors employ the lead-lag transformation. This preprocessing step transforms a one-dimensional path into a two-dimensional path, effectively capturing the quadratic variation of the process within the signature framework. Without this transformation, volatility information is often invisible to the signature kernel.
Feature Space Lifting
In complex scenarios, the data is "lifted" into an infinite-dimensional Hilbert space using a Radial Basis Function (RBF) kernel before the signature is computed. This RBF-lifting helps capture non-linear dependencies that raw path signatures might miss.
Statistical Estimators
The framework compares biased and unbiased MMD estimators, utilizing bootstrapping techniques to approximate the null and alternative distributions of the test statistic. This ensures that the resulting p-values are robust and reliable.
Experimental Evaluation
The effectiveness of these techniques was evaluated across several synthetic and real-world datasets:
- Scaled Brownian Motion: Two processes differing only in their volatility parameter ($\sigma$).
- GARCH Models: Financial models exhibiting volatility clustering, where the mean remains constant but the conditional variance changes.
- Mixture Models: A complex combination of Geometric Brownian Motion (GBM) and Ornstein-Uhlenbeck (OU) processes, specifically designed to match in the first two moments but differ in the third.
- Real-World Financial Data: A comparison of percentage returns from the Technology and Consumer sectors (2014–2024).
Key Insights and Results
Overcoming the Factorial Decay Trap
The experiments confirmed that sig-MMD is naturally biased toward detecting differences in the mean. In the Scaled Brownian Motion test, a standard unbiased estimator resulted in a staggering 85.8% Type 2 error rate. However, by applying a scaling factor of $\theta=3$, the error rate plummeted to 6.6%, demonstrating the power of re-weighting signature levels.
The Necessity of Lead-Lag
For GARCH models, which are defined by their volatility structures, the lead-lag transformation proved essential. Without scaling, the test failed to distinguish different GARCH processes 90.2% of the time. Applying a scaling factor of 5.5—the identified "sweet spot"—reduced the Type 2 error to 0.0%.
The Parabolic Power Curve
The relationship between scaling and test power is not strictly linear. In cases involving RBF-lifted mixture models, the authors observed a parabolic power curve. While increasing $\theta$ initially improves the test's ability to detect differences, excessive scaling can cause the variance of the estimator to explode, eventually degrading the test's reliability. This suggests an optimal range for hyperparameters exists for every dataset.
Real-World Application
In the "uncontrolled" test of Tech vs. Consumer stocks, raw returns initially showed a 99% probability of Type 2 error, suggesting the distributions were identical. Only after the simultaneous application of lead-lag transformations, RBF lifting, and optimal scaling did the test correctly conclude that the two sectors follow distinct distributions.
Conclusion
While sig-MMD is a potent tool for path-valued data, its raw application is often insufficient for detecting subtle distributional differences. By employing path scaling and lead-lag transformations, researchers can significantly increase the power of two-sample tests.
Future work remains in addressing the computational bottleneck of signature kernels and developing automated methods for hyperparameter calibration. Currently, the authors recommend a "calibration phase" (e.g., an 80/20 data split) to identify the scaling factors and RBF parameters that minimize Type 2 error before performing the final statistical test.
Summary updated