# Reach-Calibrated Topology Tokens

- ID: 1201
- Canonical URL: https://synthcore.org/idea/1201/reach-calibrated-topology-tokens
- API JSON: https://synthcore.org/api/idea/1201.json
- API Markdown: https://synthcore.org/api/idea/1201.md
- Verification status: unverified
- Source: [arXiv:2607.20844](https://arxiv.org/abs/2607.20844)
- Category: architecture
- Solves: accuracy, stability, scalability
- ML areas: graph-nn, embedding, tokenizer, regularization
- Math tags: geometry, metric-geometry, topology, combinatorics
- Ratings: usefulness 5/10; difficulty 5/10; novelty 7/10

## Idea description

Add a finite-resolution geometric code to a 3D neural encoder: quantized lattice occupancy, local barycenters, and tangent directions are converted into structural tokens alongside ordinary point or mesh features. Choose lattice spacing from estimated local reach so that small perturbations do not change the code, and train the continuous encoder to agree with this discrete structural representation.

## Mathematical statement

The paper's finite-code recovery principle states that if two bounded-geometry pairs receive the same sufficiently fine layered code, then they have the same ambient pair-isotopy type. Here, $\varepsilon>0$ is the spatial lattice resolution, $\tau>0$ is a lower bound on surface thickness or Federer reach, and $c>0$ is a universal encoding constant; the required scale condition is $\varepsilon\leq c\min\{1,\tau\}$. For two encoded objects $(\gamma_0,F_0)$ and $(\gamma_1,F_1)$ with the same code, the paper gives $d_H(\gamma_0,\gamma_1)\leq4\varepsilon$ and $d_H(\overline{F_0},\overline{F_1})\leq4\varepsilon$, where $d_H$ is Hausdorff distance and $\overline F$ includes the boundary. If $\delta_\gamma$ and $\delta_F$ are angular quantization errors for curve tangents and surface tangent planes, corresponding directions satisfy $\angle(\gamma_0',\gamma_1')\leq C_{\mathrm{enc}}(\delta_\gamma+\varepsilon)$ and $\angle(TF_0,TF_1)\leq C_{\mathrm{enc}}(\delta_F+\varepsilon/\tau)$. The neural adaptation uses these bounds to set resolution and augmentation scales; topology preservation for learned or noisy data is tested empirically.

## Key formulas

- $$0<\varepsilon\leq c\min\{1,\tau\}$$
- $$d_H(\gamma_0,\gamma_1)\leq 4\varepsilon,\qquad d_H(\overline{F_0},\overline{F_1})\leq 4\varepsilon$$
- $$\angle(TF_0,TF_1)\leq C_{\mathrm{enc}}\bigl(\delta_F+\varepsilon/\tau\bigr),\qquad \angle(\gamma_0',\gamma_1')\leq C_{\mathrm{enc}}(\delta_\gamma+\varepsilon)$$
- $$\mathcal{L}_{\mathrm{code}}=\operatorname{CE}(q_{\mathrm{occ}}(X),q_{\mathrm{occ}}(\widetilde X))+\lambda_T\|q_T(X)-q_T(\widetilde X)\|_2^2+\lambda_B\operatorname{BCE}(q_{\partial}(X),q_{\partial}(\widetilde X))$$

## Implementation notes

(1) Integration point: place this module before the main point-cloud, mesh, or implicit-surface encoder. Given sampled surface points $X=\{(x_i,n_i)\}$, estimate a global or local thickness $\hat\tau$ and choose $\varepsilon=\alpha\min(1,\hat\tau)$ with $\alpha\in[0.1,0.25]$. Hash every point into a cubic lattice cell. For each occupied cell, compute its centroid, averaged normal or tangent plane, boundary flag, neighboring occupied-cell offsets, and optional curve occupancy for a 1D embedded object. Quantize normals into a fixed angular codebook and embed each record with a small Transformer or graph encoder. Concatenate these structural tokens with continuous features or let the main encoder cross-attend to them.

(2) Pseudocode:
```text
inputs: points X, normals N, optional boundary labels B
estimate tau_hat = median_i(kNN_distance_i) or local reach proxy
eps = alpha * min(1, tau_hat)
cells = floor(X / eps)
for cell c in unique(cells):
    centroid[c] = mean(X[c])
    tangent[c] = normalize(mean(N[c]))
    qT[c] = nearest_normal_code(tangent[c])
    qocc[c] = 1
    qboundary[c] = max(B[c])
edges = neighboring occupied-cell pairs
tokens = Embed(qocc, qT, qboundary, centroid/eps, edges)
z = MainEncoder(X,N) cross-attended with tokens
```
Train with the ordinary task loss plus the displayed code-consistency loss between an object and an augmented version $\widetilde X$ under jitter, resampling, small elastic deformation, and rotation. Keep augmentation displacement below approximately $4\varepsilon$ and monitor normal perturbations relative to $\varepsilon/\hat\tau$.

(3) Computed from the mathematics: lattice occupancy, cell centroids, tangent quantization, adjacency, resolution scaling, and perturbation targets. Estimated empirically: $\hat\tau$, the constant $c$, code collision rates, and whether equal codes preserve the target topology for the chosen data distribution. Compute connected components, Euler characteristic, and, where feasible, Betti numbers on reconstructed meshes.

(4) First experiment: train PointNet++ or a small mesh GNN on ModelNet40 plus synthetic spheres, tori, and multi-handle surfaces. Compare the baseline encoder with the structural-token branch at matched parameter count under point dropout, Gaussian coordinate noise, and remeshing. Measure clean and corrupted accuracy, embedding consistency, token count, code collision rate between different topologies, and topology error after decoding. Success is a substantial reduction in topology errors or corruption-induced accuracy loss at equal FLOPs, while using far fewer tokens than dense voxelization.

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
