Abstract
The Hartigan Dip-test is a powerful tool for identifying multimodality in data, yet its application in modern machine learning is hindered by computational inefficiency and non-differentiability. This paper introduces a differentiable generalized logistic function to approximate Dip-test p-values, replacing slow bootstrapping and look-up tables. This analytical approach enables gradient-based optimization for subspace clustering, leading to the development of the Dip’n’Sub algorithm. Experimental results demonstrate that this method significantly improves efficiency and clustering accuracy across diverse synthetic and real-world datasets.
Introduction
Identifying peaks in data density, or "modes," is a core strategy for cluster discovery. The Hartigan Dip-test is a parameter-free statistical test that measures a distribution's departure from unimodality. However, the test has two major practical limitations:
- Sample Size Dependency: The raw "Dip-value" varies significantly with the number of samples ($N$), necessitating conversion to a p-value for reliable interpretation.
- Computational Bottlenecks: Traditional p-value conversion relies on bootstrapping or static look-up tables, which are slow and non-differentiable, precluding the use of gradient-based optimization techniques like Stochastic Gradient Descent (SGD).
Methodology
The authors propose a three-fold solution to integrate the Dip-test into modern optimization workflows.
Analytical Sigmoid Fit
By generating an extensive bootstrapped look-up table, the researchers fit a generalized logistic function to approximate p-values. Crucially, they modeled the parameters of this sigmoid as functions of $\sqrt{N}$, providing a smooth, differentiable formula for any sample size.
This differentiable fit allows an algorithm to "rotate" its view of high-dimensional data until clusters are most clearly separated. The modeling of parameters across $N$ ensures a "gapless" transition, avoiding the interpolation errors of traditional tables.
TailoredDip and Dip’n’Sub
The authors also introduced TailoredDip, an improvement that better handles distribution tails and noise. These components are combined in the Dip’n’Sub algorithm, which uses the gradient of the p-value function to iteratively search for projection axes where the data is most multimodal. Dip’n’Sub automatically determines both the relevant subspace and the number of clusters ($k$).
Key Results
- Efficiency: The proposed method is significantly faster than bootstrapping. For the SkinnyDip algorithm, using the new function reduced runtime by up to 99%.
- Accuracy: The analytical fit achieved lower Mean Squared Error (MSE) than traditional look-up tables when compared against ground-truth bootstrapping.
- Clustering Performance: Dip’n’Sub ranked first or second in Normalized Mutual Information (NMI) across most benchmarks, including BANK, HTRU2, and ALOI, outperforming methods like PCA+K-Means and ICA.
Conclusion
By making the Dip-test p-value calculation differentiable, the authors bridge the gap between classical statistics and modern optimization. This work paves the way for integrating unimodality tests directly into Deep Learning frameworks as loss functions, encouraging the discovery of well-separated latent representations.
Summary updated