# Square-Root Boundary-Temperature Attention

- ID: 1868
- Canonical URL: https://synthcore.org/idea/1868/square-root-boundary-temperature-attention
- API JSON: https://synthcore.org/api/idea/1868.json
- API Markdown: https://synthcore.org/api/idea/1868.md
- Verification status: unverified
- Source: [arXiv:2608.06006](https://arxiv.org/abs/2608.06006)
- Category: architecture
- Solves: accuracy, stability, generalization
- ML areas: attention, transformer, graph-nn, regularization
- Math tags: statistical-mechanics, geometry, information-theory, dynamical-systems
- Ratings: usefulness 5/10; difficulty 4/10; novelty 7/10

## Idea description

Add a measurement-conditioned attention layer with two explicitly separated fields: a geometry-only inverse-temperature profile that controls interaction strength and an outcome-dependent chemical-potential bias. For a region bounded by coordinates a and b, force the interaction gate to vanish as the square root of the distance from either boundary, while allowing a separate potential channel to encode measured values.

## Mathematical statement

The paper writes the reduced state as ρ_A = Z^(-1) exp(-K_A), where K_A is an entanglement Hamiltonian. Its local form is K_A = ∫_a^b dx β(x)[h(x) - μ(x)n(x)], where h(x) is local energy density, n(x) is local occupation or charge density, β(x) is a geometry-controlled inverse temperature, μ(x) is an outcome-dependent chemical potential, and Z is the normalization. Near the boundaries, β(x) is proportional to sqrt(x-a) as x approaches a from the right and proportional to sqrt(b-x) as x approaches b from the left. For neural positions x_i, use β_i = β_0[((x_i-a)(b-x_i))/(b-a)^2]^(1/4), which has square-root scaling at both boundaries. Use attention logits L_ij = β_i β_j(q_i transposed k_j / sqrt(d)) + u_i + u_j, where q_i and k_j are query and key vectors, d is head dimension, and u_i = w_μ transposed z_i is an outcome-dependent potential bias from measurement features z_i. The multiplicative β factors suppress geometric coupling near boundaries, while u carries measurement information independently.

## Key formulas

- ρ_A = Z^(-1) exp(-K_A),    K_A = ∫_a^b dx β(x)[h(x) - μ(x)n(x)]
- β(x) ~ C_a sqrt(x-a) as x approaches a from the right,    β(x) ~ C_b sqrt(b-x) as x approaches b from the left
- β_i = β_0[((x_i-a)(b-x_i))/(b-a)^2]^(1/4),    L_ij = β_i β_j(q_i transposed k_j / sqrt(d)) + u_i + u_j
- u_i = w_μ transposed z_i,    A_ij = softmax_j(L_ij),    y_i = sum_j A_ij v_j

## Implementation notes

(1) Exact integration point: replace the logit computation in one standard Transformer self-attention block, or the edge-message computation in a graph neural network, when inputs contain partially observed regions or explicit boundary markers. Normalize positions x_i to an interval [a,b]. Split each token into ordinary features h_i and measurement features z_i; do not put z_i into the geometric gate. (2) Pseudocode: compute beta_i = beta0 * (((x_i-a)*(b-x_i))/(b-a)^2)^0.25; compute Q, K, and V from h; compute u_i = linear_mu(z_i); set logits[i,j] = beta_i*beta_j*dot(Q[i],K[j])/sqrt(head_dim) + u_i + u_j + mask[i,j]; apply row-wise softmax and multiply by V. Initialize beta0 so that the average absolute logit is unchanged relative to the baseline. (3) Taken from the paper: the separation between geometry-controlled beta and outcome-controlled mu, and the endpoint exponent one-half. Estimated during training: beta0, the potential projection, and any optional density-to-potential network. (4) First cheap experiment: create synthetic sequences with two boundary blocks containing binary measurements and an interior target depending on both long-range context and measurement outcomes. Compare ordinary attention, learned positional gating, square-root gating without u, and square-root gating with u. Sweep beta exponent alpha in beta_i proportional to [d_left*d_right]^(alpha/2), where d_left and d_right are distances to the two boundaries. The prediction is a validation-loss minimum near alpha = 0.5, geometric attention weights scaling approximately as distance^0.5 close to each boundary, and outcome-flip sensitivity appearing mainly when the u channel is enabled. Also measure gradient norms by boundary distance: the proposed gate predicts systematic suppression near the boundaries relative to ungated attention, with the suppression exponent approaching one-half before softmax saturation.

## Disclaimer

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