# Half-Idleness Curvature Attention

- ID: 1864
- Canonical URL: https://synthcore.org/idea/1864/half-idleness-curvature-attention
- API JSON: https://synthcore.org/api/idea/1864.json
- API Markdown: https://synthcore.org/api/idea/1864.md
- Verification status: unverified
- Source: [arXiv:2608.05939](https://arxiv.org/abs/2608.05939)
- Category: architecture
- Solves: accuracy, stability
- ML areas: graph-nn, attention
- Math tags: optimal-transport, metric-geometry, graph-theory
- Ratings: usefulness 6/10; difficulty 5/10; novelty 5/10

## Idea description

Compute each graph edge's Lin–Lu–Yau curvature exactly from one p=1/2 Wasserstein problem, then use the resulting scalar as an edge bias or multiplicative gate in graph attention. Positive-curvature edges receive stronger message exchange while negatively curved edges are attenuated, giving the network a geometry-derived inductive bias rather than requiring the model to learn all edge importance from scratch.

## Mathematical statement

For a locally finite graph G=(V,E), let d_x be the degree of vertex x, and define the lazy neighbor measure mu_tilde_x^p by mu_tilde_x^p(x)=p, mu_tilde_x^p(z)=(1-p)/d_x for z adjacent to x, and zero otherwise. For an edge xy, the p-Ollivier curvature is kappa_tilde_p(x,y)=1-W_1(mu_tilde_x^p,mu_tilde_y^p), where W_1 is Wasserstein-1 distance using graph distance. The Lin–Lu–Yau curvature is kappa_tilde_LLY(x,y)=lim_{p approaches 1 from below} kappa_tilde_p(x,y)/(1-p). The paper's equivalence states that for weighted graphs and p greater than or equal to 1/2, kappa_tilde_p(x,y)=(1-p)kappa_tilde_LLY(x,y). Therefore kappa_tilde_LLY(x,y)=2[1-W_1(mu_tilde_x^(1/2),mu_tilde_y^(1/2))]. The transferable asset is exact finite-p evaluation, which avoids unstable numerical differentiation near p=1. For implementation, normalize curvature using s=median_e(abs(kappa_e))+epsilon and set kappa_bar_e=clip(kappa_e/s,-c,c).

## Key formulas

- $$\tilde{\mu}_{x}^{p}(z)=\begin{cases}p,&z=x\\\frac{1-p}{d_x},&z\sim x\\0,&\text{otherwise},\end{cases}$$
- $$\tilde{\kappa}_{p}(x,y)=1-W_{1}(\tilde{\mu}_{x}^{p},\tilde{\mu}_{y}^{p}),\qquad \tilde{\kappa}_{\rm LLY}(x,y)=\lim_{p\rightarrow 1^-}\frac{\tilde{\kappa}_{p}(x,y)}{1-p},$$
- $$\tilde{\kappa}_{p}(x,y)=(1-p)\tilde{\kappa}_{\rm LLY}(x,y)\quad\left(p\geq\tfrac12\right),\qquad \tilde{\kappa}_{\rm LLY}(x,y)=2\left[1-W_1(\tilde\mu_x^{1/2},\tilde\mu_y^{1/2})\right].$$
- $$\alpha_{uv}=\operatorname{softmax}_{v\in N(u)}\left(\frac{q_u^\top k_v}{\sqrt d}+\beta\bar\kappa_{uv}\right),\qquad m_u=\sum_{v\in N(u)}\alpha_{uv}Vh_v.$$

## Implementation notes

Integrate this at the edge-logit stage of a GAT or graph-transformer layer. First construct, for every edge (u,v), the graph-distance cost matrix between the support sets {u} union N(u) and {v} union N(v). Set p=0.5. Assign mass 0.5 to each endpoint and distribute the remaining mass uniformly across its neighbors; for a weighted graph, distribute neighbor mass proportionally to the edge weights after normalizing them to sum to one. Solve the resulting small discrete Wasserstein-1 linear program and cache W_1 for every edge. Set kappa[u,v]=2*(1-W), using the theorem's exact p=1/2 identity. Compute s=median(abs(kappa))+1e-6 over all directed edges, then kappa_norm=clip(kappa/s,-3,3). In each attention layer replace the usual logit q_u transpose k_v divided by sqrt(d) with q_u transpose k_v divided by sqrt(d) plus beta times kappa_norm[u,v], where beta is a learned scalar initialized to zero so the model initially matches ordinary attention. Compact pseudocode is: `for (u,v) in edges: mu_u,mu_v=lazy_measure(u,v,p=0.5); W=wasserstein1(mu_u,mu_v,graph_distance); kappa[u,v]=2*(1-W)`; then `logits=QK/sqrt(d)+beta*kappa_norm`. The theorem determines the factor 2 and the valid p threshold; LP solver choice, clipping, and normalization are engineering decisions. Start with Cora, Citeseer, or a small molecular graph benchmark, using a two-layer GAT with matched parameter count. Compare ordinary GAT, degree-biased GAT, curvature-biased GAT, and randomized-curvature GAT over at least five seeds. Success means higher validation accuracy or calibration at equal training FLOPs, especially on heterophilous edges, without optimization instability. Also report one-time curvature preprocessing cost and an ablation showing that learned beta is nonzero and that shuffled curvature removes the gain.

## Disclaimer

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