Papers
Topics
Authors
Recent
Search
2000 character limit reached

Signature-Based Test Statistics

Updated 4 December 2025
  • Signature-based test statistics are methods that transform raw data into signature sequences to reveal hidden structures and detect deviations.
  • They use techniques such as sorting, cumulative means, and weighted-runs to differentiate between unimodal and multimodal distributions with enhanced sensitivity.
  • These methods offer computational efficiency and improved performance in clustering, anomaly detection, and local deviation analysis compared to traditional tests.

Signature-based test statistics form a class of statistical methods designed to detect structured deviations from a null hypothesis by transforming and summarizing raw data using specific signatures—mathematical constructions that compactly encode key features or ordered structure in the data. These statistics offer distinctive sensitivity to non-global departures (such as local anomalies or multimodality) and are increasingly utilized in clustering, anomaly detection, and hypothesis testing. Two prominent approaches include the Signature Test (Sigtest) for unimodality and the weighted-runs statistic for local deviation detection (Shahbaba et al., 2014, Beaujean et al., 2010).

1. Mathematical Formulation and Problem Setting

Signature-based tests operate by mapping a collection of observed scalar samples, often denoted as y=[y1,…,yN]T∈RNy = [y_1,\dots,y_N]^T \in \mathbb{R}^N, to a signature sequence designed to expose structure hidden in the original data. The typical hypothesis testing scenario involves a composite hypothesis, such as:

H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}

or, in the context of evaluating local deviations,

H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}

Signature transformation techniques often exploit sorting, cumulative means, or runs of consecutive exceedances to reduce noise and concentrate statistical evidence relating to H1H_1. The transformation is governed by explicit forms such as order statistics, empirical quantiles, or cumulative averages.

2. Signature Test (Sigtest) for Unimodality

Sigtest specifically targets unimodality by transforming the data via absolute value sorting:

z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)

Two signatures are considered:

  • Identity signature: g1(zn)=zng_1(z_n) = z_n
  • Cumulative-mean signature: g2(zn)=1n∑j=1nzjg_2(z_n) = \frac{1}{n}\sum_{j=1}^n z_j

These signatures are chosen because, for data drawn from a unimodal distribution, their sequence exhibits sharply reduced variance. The method exploits pointwise probabilistic envelopes:

U(n)=E[gi(wn)]+γVar⁡(gi(wn)),L(n)=E[gi(wn)]−γVar⁡(gi(wn))U(n) = E[g_i(w_n)] + \gamma \sqrt{\operatorname{Var}(g_i(w_n))},\qquad L(n) = E[g_i(w_n)] - \gamma \sqrt{\operatorname{Var}(g_i(w_n))}

where wnw_n are the ideal sorted absolute values under H0H_0, and H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}0 calibrates the width of the confidence band. The following decision rule is applied:

H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}1

The null hypothesis H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}2 is rejected (evidence for multi-modality) if H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}3 for a chosen threshold H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}4 (Shahbaba et al., 2014).

3. Weighted-Runs Test Statistic for Local Deviation Detection

Motivated by the insensitivity of classical global statistics (such as H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}5) to clustering of deviations, the weighted-runs statistic tests for local, consecutive excesses:

  • An observation H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}6 is a "success", otherwise a "failure".
  • The sequence is partitioned into alternating maximal runs of successes/failures.
  • For each success run H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}7, compute the run-weight:

H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}8

  • The test statistic is

H0:The distribution of y is unimodalvs.H1:not unimodalH_0: \text{The distribution of } y \text{ is unimodal} \quad \text{vs.} \quad H_1: \text{not unimodal}9

where H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}0 is the number of success runs. H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}1 measures the size of the most extreme local deviation in the data, distinguishing it from the classical aggregate H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}2 which is order-invariant (Beaujean et al., 2010).

4. Sampling Distributions, P-value Computation, and Calibration

Both approaches provide exact or approximate null distributions for hypothesis testing:

  • Sigtest: Computes expected value and variance of the signature sequence under any unimodal distribution using classical order statistics theory. Confidence bands are calibrated deterministically via H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}3.
  • Weighted-runs: The null distribution is derived via combinatorial summation over all integer partitions of the number of successes, accounting for all possible run-length profiles. Explicit formulas relate the cumulative probability:

H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}4

where H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}5 is the number of runs of length H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}6 in the partition H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}7 and H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}8 is the chi-squared CDF. For H0:Xi∼N(μi,σi2) ∀i,H1:Existence of local structure or clusters of anomalous deviationsH_0: X_i \sim \mathcal{N}(\mu_i, \sigma_i^2) \ \forall i,\quad H_1: \text{Existence of local structure or clusters of anomalous deviations}9, exact H1H_10-values are tractable; for larger H1H_11, Monte Carlo methods or empirical pre-tabulation are used (Beaujean et al., 2010).

5. Computational Complexity and Empirical Performance

  • Sigtest: Sorting dominates with H1H_12 complexity. All signature and decision operations are H1H_13. This is markedly faster than Hartigan’s dip (H1H_14), KS, or AD tests, especially under calibration via resampling (Shahbaba et al., 2014).
  • Weighted-runs: Enumeration of all integer partitions grows nearly exponentially, H1H_15 (where H1H_16 is the partition function). For small to moderate H1H_17, this is feasible; for large H1H_18, the Monte Carlo approach offers H1H_19 complexity for z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)0 simulations (Beaujean et al., 2010).

Empirical results demonstrate the higher sensitivity of signature-based statistics to local and multimodal features. For instance, in the detection of weakly separated normal mixtures, Sigtest's detection rate dominates that of AD, KS, and dip tests, with sub-millisecond average computation times. Weighted-runs achieves up to 30–40 percentage points higher power than global z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)1 in detecting localized anomalies.

Test 2σ 2.25σ 2.5σ 2.8σ 3σ Time (s)
Sigtest₂ 56% 93% 99% 100% 100% 0.2×10⁻⁴
Sigtest₁ 69% 97% 100% 100% 100% 0.2×10⁻⁴
AD 29% 76% 97% 100% 100% 3.96×10⁻⁴
KS 10% 37% 74% 95% 100% 30×10⁻⁴
Dip 3% 8% 21% 82% 94% 2197×10⁻⁴

6. Applications in Clustering and Anomaly Detection

Signature-based tests are integrated within top-down hierarchical clustering workflows as splitting criteria. Projected data from a candidate cluster undergoes a signature transformation and is tested for unimodality. If Sigtest or a weighted-runs statistic rejects the unimodal or i.i.d. null, the cluster is split (commonly via z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)2-means). Empirical studies show that using Sigtest in place of classical methods yields improved clustering quality as measured by Variation of Information and Adjusted Rand Index. For example, on the Optical Digits UCI set, G-meansz=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)3 attains z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)4, z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)5, compared to z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)6, z=[z1,…,zN]T=sort(∣y∣)z = [z_1, \dots, z_N]^T = \text{sort}\left(|y|\right)7 for standard G-means (Shahbaba et al., 2014).

7. Theoretical Properties and Implementation Considerations

Theoretical justification derives from the variance-reducing effect of the signature mapping under the null hypothesis, which tightens confidence bands and magnifies sensitivity to departures (secondary modes, localized excesses). Practically, implementation requires careful numerical treatment (e.g., logarithmic evaluation of incomplete gamma functions for weighted-runs), and efficient algorithms for partition enumeration or simulation for larger data sizes. Both methods are robust to composite nulls if null simulations use fitted parameterizations, and can be implemented in a few dozens of lines in high-level scientific computing environments (Beaujean et al., 2010, Shahbaba et al., 2014).

A plausible implication is that signature-based statistics, given their computational efficiency and statistical power for structured alternatives, will continue to play a critical role in large-scale, high-dimensional inference. They are particularly well-suited as plug-in modules in clustering, signal segmentation, and local anomaly detection.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Signature-Based Test Statistics.