which corresponds to a gEMD between the samples in X p . This measures the minimal cost required to match x p,a to x p,b informed by the tensor product of the trees T 0 z and T 0 t . This process allows us to efficiently compute this gEMD based solely on nonlocal averaging filters induced by the partition trees at the current iteration level (see main text). Diffusion maps on the samples X p , utilizing the gEMD metric, can be used for an updated affinity matrix and an updated parameter axis embedding Ψ p . This additional nonlinear stage aggregates the local information conveyed by the gEMD into a more global metric between the samples.