# Green-balanced spherical prototypes

- ID: 1696
- Canonical URL: https://synthcore.org/idea/1696/green-balanced-spherical-prototypes
- API JSON: https://synthcore.org/api/idea/1696.json
- API Markdown: https://synthcore.org/api/idea/1696.md
- Verification status: unverified
- Source: [arXiv:2608.02120](https://arxiv.org/abs/2608.02120)
- Category: regularization
- Solves: accuracy, stability, generalization
- ML areas: embedding, attention, moe-routing, regularization
- Math tags: geometry, differential-geometry, probability, optimization
- Ratings: usefulness 6/10; difficulty 4/10; novelty 6/10

## Idea description

Represent prototypes or attention keys by points p_i on the unit sphere and regularize their configuration with a Green-potential log-partition objective inspired by the TPMS branch-point formulation. The objective penalizes configurations whose positive and negative Gibbs-weighted potentials are concentrated in different regions, providing a smoother alternative to pairwise repulsion or uniformity losses.

## Mathematical statement

The paper encodes a genus-three surface by eight branch points p_i in the complex plane, with hyperelliptic surface w^2=P(z)=\prod_{i=1}^{8}(z-p_i), and evaluates its variance objective through integrals I^{\pm}_{\varepsilon}=\int_{\Omega_{\varepsilon}}\exp(\pm u)\,dA. Here \Omega_{\varepsilon}=\mathbb{S}^{2}\setminus\bigcup_iD^i_{\varepsilon} removes spherical disks around singular points, u is the Green-function potential generated by the branch-point configuration, and dA is spherical area. The normalized measures \rho^{\pm}_{\varepsilon}=\exp(\pm u)/I^{\pm}_{\varepsilon} define probability densities. The gradient calculation differentiates log I^{\pm}_{\varepsilon} with respect to a point p_i and contains the expectation of the Green-function derivative under \rho^{\pm}_{\varepsilon}: \langle
abla_{p_i}\log I^{\pm}_{\varepsilon},v_i\rangle=(1/I^{\pm}_{\varepsilon})[\int_{\Omega_{\varepsilon}}\langle\pm2\pi
abla_{p_i}G_i,v_i\rangle e^{\pm u}dA+    ext{boundary term}]. For an ML adaptation, use the sphere Green kernel G(x,p)=-(1/(4\pi))\log(1-x^{    op}p+\delta), with x,p\in\mathbb{S}^{d-1}, and define u(x)=\sum_i q_iG(x,p_i), where q_i are fixed or learnable charges. Minimize L_{GB}=\log I^+ + \log I^- or its sampled Monte Carlo estimate; this is a finite-dimensional surrogate for balancing the two exponential Green-function integrals.

## Key formulas

- $$w^{2}=P(z)=\prod_{i=1}^{8}(z-p_{i})$$
- $$I^{\pm}_{\varepsilon}=\int_{\Omega_{\varepsilon}}\exp(\pm u)\,{\rm d}A,\qquad \Omega_{\varepsilon}=\mathbb{S}^{2}\setminus\bigcup_{i=1}^{n}D^{i}_{\varepsilon}$$
- $$\rho_{\varepsilon}^{\pm}=\frac{\exp(\pm u)}{I^{\pm}_{\varepsilon}},\qquad \left\langle\nabla_{p_i}\log I^{\pm}_{\varepsilon},v_i\right\rangle=\frac{1}{I^{\pm}_{\varepsilon}}\left(\int_{\Omega_{\varepsilon}}\left\langle\pm2\pi\nabla_{p_i}G_i,v_i\right\rangle e^{\pm u}\,dA+\oint_{\partial D^i_\varepsilon}e^{\pm u}\langle n_i,\tilde v_i\rangle\right)$$
- $$G(x,p)=-\frac{1}{4\pi}\log\!\left(1-x^{\top}p+\delta\right),\quad u(x)=\sum_{i=1}^{m}q_iG(x,p_i),\quad L_{\mathrm{GB}}=\log\!\int e^{u(x)}d\nu(x)+\log\!\int e^{-u(x)}d\nu(x)$$

## Implementation notes

Integrate this at the prototype or key tensor: replace an unconstrained matrix P\in\mathbb{R}^{m    imes d} by normalized rows p_i=P_i/(\|P_i\|_2+10^{-8}), either for class prototypes in a contrastive classifier, attention keys, or MoE router centroids. During training, add \lambda L_{GB} to the task loss. Approximate the sphere integrals using B uniform random directions x_j\sim\mathrm{Unif}(\mathbb{S}^{d-1}) plus optional data embeddings; for numerical stability compute log-sum-exp: log I^+\approx\operatorname{LSE}_j(u(x_j))-\log B and log I^-\approx\operatorname{LSE}_j(-u(x_j))-\log B. Use u(x_j)=\sum_i q_i[-(4\pi)^{-1}\log(1-x_j^    op p_i+\delta)], with q_i=1 initially, \delta=10^{-4}, and resample x_j every optimizer step or every 10 steps. Backpropagation through normalized p_i and the kernel supplies the point gradients; no boundary correction is needed because the practical kernel is regularized by \delta. Pseudocode: normalize P; sample X; compute S=X@P.T; U=sum_i q_i*(-log(1-S+delta)/(4*pi)); Lgb=logsumexp(U)-log(B)+logsumexp(-U)-log(B); loss=task_loss+lambda*Lgb; update network. Compare against no regularizer and standard hyperspherical uniformity loss on CIFAR-100 with a 2-layer normalized-prototype classifier, then on a small Transformer with spherical attention keys. Measure prototype nearest-neighbor cosine similarity, class-balanced accuracy, calibration, gradient variance, and task loss at equal FLOPs. Success means lower key/prototype collapse and improved validation accuracy or stability without a significant throughput penalty.

## Disclaimer

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