Memory-Efficient Sampling for Minimax Distance Measures

Fazeleh Sadat Hoseini, Morteza Haghir ChehreghaniarXiv 2020

Introduction

In unsupervised learning and manifold clustering, capturing the underlying structure of data is paramount. Standard Euclidean distances often fail when data lies on complex, non-linear manifolds. Minimax distance (also known as path-based distance) offers a robust alternative. It defines the distance between two points as the minimum possible "maximum jump" along any path connecting them. Conceptually, it identifies the path of least resistance through a dataset, making it ideal for identifying elongated or curved clusters like spirals.

However, the computational cost of Minimax distance has historically limited its application. Calculating all-pairs distances for a dataset of size $N$ requires $O(N^2)$ memory. For large-scale datasets or resource-constrained "Edge" devices, this quadratic requirement is a dealbreaker. Recent research introduces a novel sampling framework that reduces this memory footprint to linear $O(N)$, enabling high-quality manifold learning on a much larger scale.

The MM Sampling Framework

The proposed solution centers on a new technique called Minimax (MM) Sampling. The goal is to select a subset of $\sqrt{N}$ representative points such that the total memory used for distance calculations remains $O(\sqrt{N} \times \sqrt{N}) = O(N)$.

The core of the framework relies on the theoretical insight that a Minimum Spanning Tree (MST) is a sufficient statistic for computing Minimax distances. The algorithm proceeds in four main steps:

  1. Incremental MST Construction: Using an optimized version of Prim’s algorithm, the system builds an MST of the entire dataset without ever storing the full distance matrix, maintaining $O(N)$ space complexity.
  2. Adaptive Grouping: MST edges are sorted by weight. The algorithm iteratively merges points connected by the smallest edges until exactly $\sqrt{N}$ clusters remain.
  3. Representative Selection: Each cluster is treated as a single sample. By merging the smallest edges first, the algorithm ensures that internal distances within these samples are minimized, effectively "compressing" the manifold while preserving its global topology.
  4. Spectral Embedding: These samples are embedded into a Euclidean space using a Mercer kernel, allowing for standard clustering techniques like Gaussian Mixture Models (GMM) to be applied.

Manifold Awareness and Spectral Properties

Unlike traditional sampling methods like $k$-means or random sampling, MM Sampling is "manifold-aware." While $k$-means seeks central points to minimize variance, MM Sampling follows the connectivity of the data. This difference is clearly visible in the spectral properties of the resulting kernel matrices.

Eigenvalue distributions for different sampling methods. MM Sampling (a) retains significantly more structural information, as evidenced by the slower decay of eigenvalues compared to k-means (b), DPP (c), and Random (d) sampling.

As shown in the figure above, the eigenvalue distribution for MM Sampling decays much more slowly than its competitors. This indicates that MM Sampling captures a richer set of structural features from the underlying manifold, whereas other methods collapse the data's complexity too early, losing vital information.

Empirical Performance

The researchers evaluated the framework on synthetic benchmarks, real-world UCI datasets, and image segmentation tasks. The most striking results appeared in the "Spiral" dataset, a classic test for manifold clustering.

Clustering results on the Spiral dataset. MM Sampling (a) achieves near-perfect separation of the three arms, while k-means (b), DPP (c), and Random (d) sampling fail to capture the non-linear structure.

In these tests, MM Sampling achieved a 100% Rand score on the Spiral dataset, while $k$-means and Random sampling failed completely (scoring below 10%). Furthermore, the accuracy loss compared to using the full $O(N^2)$ dataset was negligible across most benchmarks. For instance, on the Pathbased dataset, MM Sampling achieved 61.05% accuracy compared to 62.11% for the full-matrix approach—a minor trade-off for a massive gain in scalability.

Conclusion and Future Directions

By reducing the memory requirements of Minimax distances from quadratic to linear, this framework transforms a powerful but computationally expensive tool into a practical solution for big data. The use of an incremental MST ensures that the "shape" of the data is preserved even when the vast majority of points are discarded during sampling.

Future work may explore even more aggressive sampling rates (e.g., $O(\log N)$) and further optimizations to reduce the computational runtime of the MST construction. Nevertheless, this approach provides a vital bridge for deploying sophisticated manifold learning algorithms on everything from cloud servers to low-power IoT devices.

Summary updated

BibTeX
@misc{hoseini2020memory,
  author = {Fazeleh Sadat Hoseini and Morteza Haghir Chehreghani},
  title = {{Memory-Efficient Sampling for Minimax Distance Measures}},
  year = {2020},
  eprint = {2005.12627},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.12627},
}
Figure