- 256bins in the shared-memory histogram that finds the median distance
- 0.4%resolution of that median, held in 10 KB of shared memory
- 2,000members, the most the CPU spectral metrics will report on
A length scale from a histogram median
One family of my cluster metrics treats a cluster of embeddings as a field rather than a point set. Each member contributes a Gaussian kernel of its distance, the width of the kernel is a per-cluster length scale, and the shape of the resulting potential describes the cluster. The family runs in the Inference Fabric's CUDA engine and is told in Physics as a lens on embeddings.
The length scale is a constant times the median pairwise distance of the cluster, clamped to a documented range. A per-cluster scale makes the metrics independent of the embedding model's units. A tiled kernel bins every distance into a shared-memory histogram and reads the midpoint from the cumulative counts, a histogram median instead of a sort.
- store every pairwise distance
- sort them
- take the middle one
the first bin whose running count crosses half; the error is one bin width
Five metrics in one pass, one tiled
The field metrics come from that scale in two kernels. A streaming pass over the members produces five of them, and the one quadratic metric is tiled and bounded.
Superposition and interference come from the same pass: the spread of member distances and the mean cosine to the centroid. Both stay unclamped; their sign carries information.
Entanglement, the mean off-diagonal kernel, from the upper triangle only. The Gram matrix is never formed.
Three metrics kept off the GPU
Three spectral metrics do need the Gram matrix, so they exist as CPU reference code with an explicit limit.
GPU, every member
CPU, need the Gram matrix
I left three metrics off the GPU until they can run without a hidden cap.