Random Half-Space Geometry Layer
Implementation & benchmark of arXiv:2607.27514 — Sample Complexity for the 2-Gromov-Wasserstein Distance
Source paper: Sample Complexity for the 2-Gromov-Wasserstein Distance arXiv:2607.27514 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Represent each Euclidean input point by its responses to randomly sampled half-spaces, then center those responses by the minibatch or source-distribution half-space occupancy. Use squared distances between these representations as a geometry-preserving substitute for raw Euclidean distances in graph-NN edge construction, cross-domain retrieval, or geometry-aware attention. The layer can compare point clouds from different ambient dimensions because each domain has its own half-space dictionary while the downstream alignment operates on the induced distance structure.
Formulas
Mathematical statement
For a compact set \(\mathcal X\subset B_R^d(0)\), let \(\xi=(\theta,t)\in\mathbb S^{d-1}\times[-R,R]\), define the half-space \(H_\xi=\{z\in\mathbb R^d:\langle\theta,z\rangle\ge t\}\), and sample \(\xi\) from \(\lambda_{\mathcal X}(d\theta,dt)=(2R)^{-1}d\sigma_{d-1}(\theta)dt\). The paper's compact half-space representation states \(\|x-x'\|=\kappa_{\mathcal X}\int(\mathbf 1_{H_\xi}(x)-\mathbf 1_{H_\xi}(x'))^2d\lambda_{\mathcal X}(\xi)\), where \(\kappa_{\mathcal X}=2R/a_d\) and \(a_d\) is the dimension-dependent geometric constant in the Crofton identity. For a probability measure \(\mu\), define \(U_x^\mu(\xi)=\sqrt{\kappa_{\mathcal X}}(\mathbf 1_{H_\xi}(x)-\mu(H_\xi))\); then \(\|x-x'\|=\|U_x^\mu-U_{x'}^\mu\|_{L^2(\lambda_{\mathcal X})}^2\). The implementation uses a Monte Carlo approximation with \(m\) half-spaces and replaces hard indicators by a temperature-controlled sigmoid when gradients with respect to coordinates are required.
Implementation notes
Integrate the layer immediately before a graph-NN adjacency computation, cross-domain point-cloud matching block, or geometry-aware attention module. For each domain, normalize inputs into a known ball \(B_R^d(0)\), draw \(m\) fixed or periodically resampled directions \(\theta_j\sim\mathrm{Unif}(\mathbb S^{d-1})\) and thresholds \(t_j\sim\mathrm{Unif}[-R,R]\), and compute logits \(z_{ij}=\langle\theta_j,x_i\rangle-t_j\). During training use \(h_{ij}=s_\tau(z_{ij})\); for nondifferentiable preprocessing, use \(h_{ij}=\mathbf 1[z_{ij}\ge0]\). Compute the batch-centered feature \(\widehat U_i(j)=\sqrt{\kappa/m}(h_{ij}-B^{-1}\sum_bh_{bj})\). Replace raw squared distances in the target module by \(\widehat d_m^2(i,k)=\sum_j(\widehat U_i(j)-\widehat U_k(j))^2\), or feed \(\widehat U_i\) as the key/query representation while adding a geometry-preservation loss \(L_{geo}=B^{-2}\sum_{i,k}(\widehat d_m(i,k)-\|x_i-x_k\|)^2\). In pseudocode: sample \((\theta_j,t_j)\); compute \(H=\mathrm{sigmoid}((X\Theta^T-T)/\tau)\); set \(U=\sqrt{\kappa/m}(H-\mathrm{mean}(H,axis=0))\); form pairwise squared distances from \(U\); pass them to the graph or attention block; backpropagate the task loss plus optional \(\lambda L_{geo}\). The paper supplies the exact integral representation and centering construction; the engineer estimates \(\mu(H_\xi)\) with the minibatch mean, estimates \(a_d\) once by Monte Carlo calibration so that the median \(\widehat d_m\) matches Euclidean distance, and tunes \(m\), \(\tau\), and resampling frequency empirically. First test on ModelNet40 or synthetic point clouds with random rotations, comparing a PointNet or graph-NN baseline using Euclidean pairwise distances against the half-space layer at equal pairwise-computation budget. Measure classification accuracy, nearest-neighbor retrieval accuracy, distance distortion \(\mathbb E|\widehat d_m-\|x-x'\||\), and wall-clock cost. Success means improved cross-domain retrieval or rotation robustness at equal \(m\)-dependent FLOPs, or comparable accuracy with a substantially smaller geometric representation than a full pairwise distance matrix.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.