math.STJul 16, 2026

Measuring Spatial Clustering via Metropolis-Hastings Diffusion Distance

Authors: Thomas WeighillChidinma Williams

Organizations: Department of Mathematics and Statistics, University of North Carolina at Greensboro, Greensboro, NC 27402

Abstract

We propose a novel measure of the discrepancy between two probability distributions ff and gg on a graph - which we call the diffusion distance - that measures the rate of convergence of ff to gg under a graph-constrained Markov chain with stationary distribution gg. As a default choice for this Markov chain, we use the Metropolis-Hastings transition matrix targeting gg with proposals given by a random walk on the graph. Our primary case of interest is when the second distribution gg is uniform, in which case the diffusion distance becomes a measure of spatial clustering in ff. Used in this way, (Metropolis-Hastings) diffusion distance to uniformity extends Moran's II-type measures of spatial autocorrelation by incorporating global graph geometry rather than just local patterns. Indeed, Moran's II, the most well-known measure of spatial autocorrelation, can be viewed as a one-step heuristic for diffusion distance, so long as specific spatial weights are used. We establish theoretical bounds and a stability result for our measure, connecting it to graph spectra and optimal transport. We then turn our attention to outlining a statistical test for spatial clustering using diffusion distance. Under permutation null models, we derive high-probability bounds on diffusion distance underpinned by exact spectral formulas for convergence of distributions, enabling an efficient statistical test for spatial clustering on large datasets. We empirically compare diffusion distance to Moran's II both as a numerical measure and as a statistical test. We show that diffusion distance exhibits higher power on synthetic data using a stochastic block model. Empirical analysis of Black population distributions for 100 U.S. cities shows that diffusion distance detects subtle differences in urban segregation patterns that Moran's II does not.

Explore similar work

Jul 7, 2026cs.LG

Diffusion enabled Optimal Transport distances for graph matching

This paper introduces Diffusion Semi-Relaxed Fused Gromov-Wasserstein (DsrFGW), a novel method for graph comparison that unifies node features and structural connectivity through optimal transport. While traditional Gromov-Wasserstein and semi-relaxed variants (srGW, srFGW) capture graph structure, they often struggle with sparse, noisy, or partially observed graphs. Inspired by Graph Diffusion Distance, which posits graphs are similar if they enable similar information transmission patterns, DsrFGW incorporates diffusion processes allowing information propagation across nodes, capturing local and global structural patterns while reducing sensitivity to noise or missing edges. An extensive evaluation on 36 synthetic pairwise graph matching tasks (easy, medium, hard) demonstrates consistent superiority over srFGW, achieving accuracy improvements of 0-20 percentage points and dramatic Adjusted Rand Index (ARI) gains: in medium-difficulty scenarios, srFGW often achieves negative ARI (worse than random) while DsrFGW offers better performance in terms of both internal and external clustering quality measures (i.e., Adjusted Rank Index and Accuracy with respect to the true underlying clusters, respectively). Even under severe noise, DsrFGW improves clustering quality in 92% of the synthetic tasks with optimal diffusion scales adapting to problem difficulty, establishing DsrFGW as a robust framework for graph comparison under structural uncertainty.
Iman Seyedi, Francesco Archetti
Jul 2, 2026cs.DS

Scalable and Distributed Silhouette Approximation

The silhouette is one of the most widely used measures to assess the quality of a kk-clustering of a dataset of nn elements. Its evaluation requires no information beyond the clustering assignment. In addition, the silhouette is extremely easy to interpret, providing a score to measure the quality of a clustering as a whole or for each element. The exact computation of the: (i) silhouette of each element of a dataset; and (ii) the global silhouette of the clustering; require Θ(n2)Θ(n^2) distance calculations, under general metrics. The quadratic complexity Θ(n2)Θ(n^2) is extremely prohibitive, especially on massive modern datasets. Surprisingly, existing approximate methods using O(n2)O(n^2) distance calculations are heuristics not offering provable and controllable guarantees on the quality of their results. We introduce the first rigorous and efficient algorithms to estimate: (i) the (local) silhouette of each element of a dataset; and (ii) the (global) silhouette; of any metric kk-clustering. Our methods, based on sampling, perform O(nkε2ln(nk/δ))O(nk\varepsilon^{-2}\ln (nk/δ)) distance computations, and provide estimates with additive error O(ε)O(\varepsilon) with probability at least 1δ1-δ. That is, parameters ε\varepsilon and δδ in (0,1)(0,1) control the trade-off between accuracy and efficiency. We also introduce a scalable and distributed design of our methods for the MapReduce and Massively Parallel Computing (MPC) frameworks. Our distributed algorithms use a constant number of rounds and sublinear local memory. Finally, we perform extensive experiments against state-of-the-art approaches. The results show that our new techniques yield the best trade-off between accuracy and efficiency for both local and global silhouette estimation. In addition, our methods scale efficiently to massive datasets for which an exact computation of the silhouette is not practical.
Ilie Sarpe, Federico Altieri, Andrea Pietracaprina +2
Apr 15, 2025stat.CO

Efficient and Stable Multi-Dimensional Kolmogorov-Smirnov Distance

We revisit extending the Kolmogorov-Smirnov distance between probability distributions to the multi-dimensional setting, and make new arguments about the proper way to approach this generalization. Our proposed formulation maximizes the difference over orthogonal dominating rectangular ranges (d-sided rectangles in R^d), and is an integral probability metric. We also prove that the distance between a distribution and a sample from the distribution converges to 0 as the sample size grows, and bound this rate. Moreover, we show that one can, up to this same approximation error, compute the distance efficiently in 4 or fewer dimensions; specifically, the runtime is near-linear in the size of the sample needed for that error. With this, we derive a delta-precision two-sample hypothesis test using this distance. Finally, we show these metrics and approximation properties do not hold for other popular variants.
Peter Matthew Jacobs, Foad Namjoo, Jeff M. Phillips