stat.MLOct 8, 2026

Efficient quadratic entropy with distance sketches

Authors: Steve Huntsman

Abstract

We detail scalable methods for approximating the quadratic entropy pTdpp^T d p for arbitrary distributions pp and common distances dd of negative type. We focus on the Euclidean and spherical geodesic cases, which both use random feature embeddings and projections to dramatically improve computational complexity within a simple framework. Amortization of a single large matrix multiplication and control variates further enable computation at large scale with low memory and runtime in situations where dd is held constant while pp varies. We demonstrate this with a comparison against direct pair sampling and bibliometric/scientometric examples on Open Graph Benchmark datasets, revealing papers, fields, and institutions with both particularly narrow and broad interdisciplinary reach from their citations and text features alone.

Figures & tables

Explore similar work

May 22, 2026cs.DS

Entropy Equivalence Testing

We introduce the problem of \emph{entropy equivalence testing} for probability distributions, a relaxation of the well-studied closeness testing problem, where the distribution testing algorithm is now only required to distinguish, given samples from two unknown distributions p,qp,q and a parameter ε∈(0,1/2]\varepsilon \in(0,1/2], between p=qp=q and ∣H(p)−H(q)∣≥ε|H(p)-H(q)| \geq \varepsilon (where HH denotes the Shannon entropy). We provide a time- and sample-efficient algorithm for this task, showing that the optimal sample complexity for this task can be significantly lower than that of closeness testing. As an application, we leverage this result to provide the first non-trivial testing algorithm for (standard) closeness of low-degree \emph{Bayesian networks}, which significantly improves on either the sample or time complexity of a baseline based on full learning.
May 27, 2026cs.AI

Clark Hash: Stateless Sparse Johnson-Lindenstrauss Quantization for Neural Embeddings

Clark Hash is a small method for storing neural embeddings in less space. It normalizes each database vector, applies a deterministic sparse signed Johnson-Lindenstrauss projection, clips the result, and stores a fixed-width scalar-quantized code. Queries stay in floating point and are scored against the stored sketches. In the default 384-dimensional sentence-embedding setting, Clark Hash stores a cosine-search vector in 48 bytes instead of 1536 bytes for dense f32 storage. This is 32x smaller. The method does not need a training pass, learned codebooks, rotations, or corpus statistics before new vectors can be stored. We describe the codec, the Rust implementation, and a multilingual sentence-similarity evaluation on 9,304 labeled pairs from 29 subsets. With a multilingual MiniLM encoder, the 48-byte sketches reached 0.910 and 0.946 macro Pearson correlation with dense cosine scores on STS17 and STS22. Clark Hash is not a new Johnson-Lindenstrauss theorem and it is not a replacement for approximate nearest-neighbor indexes. It is a simple stateless codec for compact embedding storage.
May 19, 2026stat.ML

Optimizing Computational-Statistical Runtime for Wasserstein Distance Estimation

Squared Wasserstein distance is a frequently used tool to measure discrepancy between probability distributions. This distance is typically computed between empirical measures of size nn from two underlying random samples. Unfortunately, even in lower dimensional Euclidean space problems (d∈{2,3})\left( d \in \{2,3\} \right), algorithms for Wasserstein distance computation with approximate or exact precision guarantees scale poorly in the runtime as a function of nn and the desired precision. In response, we consider the computational-statistical runtime, where the goal is to estimate from samples the Wasserstein distance between potentially smooth measures up to εε-additive error in expectation with respect to the sampling; we allow O(1)O(1) computational cost for collecting a sample. Towards this, we develop a Sample-Sketch-Solve paradigm where we introduce a regular cartesian grid sketch of the samples. We show that (especially under αα-Hölder smooth distributions) this can compress the data without increasing asymptotic error, and also regularizes the structure which enables faster exact algorithms. Ultimately, we approximate W22(P,Q)W_2^2(P,Q) within εε error in ε−max⁡(2,d+1+o(1)1+α)ε^{-\max(2,\frac{d+1+o(1)}{1+α})} time for 0<α<10 < α< 1 Hölder smooth distributions P,QP,Q on (0,1)d(0,1)^{d}; an optimal Θ(ε−2)Θ(ε^{-2}) for α>1/2α> 1/2 when d=2d=2 and nearly optimal as α→1α\to 1 when d=3d = 3.