Manuscript Offprint

arXiv:2608.21174

From Attention Masks to Inert Zero-Vector Tokens: OAttention and O-Closure for Token Dynamics

Heyang Gong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Attention masks are indispensable relation-level controls: they specify which query–source pairs may interact. They do not, however, provide a representation-carried token state that is intrinsically non-participating at the attention boundary. We assign each token hidden carrier hih_i a smooth active-presence coefficient pi=∥hi∥2/(τ+∥hi∥2)p_i = \|h_i\|^2 / (\tau + \|h_i\|^2). The same coefficient has two roles: it gates information emitted by token ii, and it determines the mass with which token ii enters computations shared with other tokens.

OAttention is the support-coupled attention realization of this rule. It gates the receiver output by pip_i and weights source jj by pjp_j in both the attention numerator and partition, while retaining the standard score, visibility relation, exponential competition, and value aggregation. This minimal completion makes the zero-vector token a zero element and yields exact null-receiver, null-source insertion, self-attention insertion, and empty-support properties. The same token-level presence gives local O-components (OFFN, ONorm, and OInject), presence-weighted OStandardize, the O-Closure law M(H⊕0)=M(H)⊕0M(H \oplus 0) = M(H) \oplus 0, and an OTransformer by residual and compositional closure.

The canonical operator is checked by contract tests and an independent GPU evaluation. In a zero-fine-tuning retrofit of a cloned pretrained TabPFN v3 regressor, calibrated hidden-carrier OAttention and Full-O variants change mean RMSE by +0.088% and +0.177%, respectively, over 18 matched dataset-seed cases. A two-block ablation further shows that OAttention alone does not preserve a NULL state through ordinary host components, whereas the declared OTransformer path does. These are scoped tests of exactness, active-path compatibility, and compositional necessity; they do not establish universal no-loss, arbitrary-host closure, learned attraction to the origin, or a general semantics for missing values.

1 Introduction

Suppressing information is a basic requirement in attention-based models. The standard mechanism is a mask mijm_{ij}, supplied to the operator to specify which query–source relations are allowed. Such masks are indispensable for causal structure, routing, permissions, and target visibility, but they do not provide a token state whose non-participation is carried by its representation.

Padding, absent support, unused routing slots, and deliberately empty latent states motivate a complementary requirement. At a declared operator boundary, an empty state should emit no output as a query and contribute no support mass along any relation for which it would otherwise be visible. A mask therefore answers a relation-level question—which token pairs may interact—whereas a structural NULL answers a state-level question—whether this representation participates at all. The two controls are complementary: state-level nullness does not replace causal, routing, permission, or target-visibility masks.

Standard scaled dot-product attention does not satisfy this requirement [23]. For visible sources,

αij=exp⁡(qi⊤kj/d)∑texp⁡(qi⊤kt/d),yi=∑jαijvj.(1)\alpha_{i j}=\frac{\exp(q_{i}^{\top}k_{j}/\sqrt{d})}{\sum_{t}\exp(q_{i}^{\top}k_{t}/\sqrt{d})},\qquad y_{i}=\sum_{j}\alpha_{i j}v_{j}. \tag{1}

If qi=0q_i = 0, every finite logit is zero and the output is the average of the visible values, not zero. If a source (k0,v0)=(0,0)(k_0, v_0) = (0, 0) is appended, it adds exp⁡(0)=1\exp(0) = 1 to the denominator. Its direct value contribution is zero, but all pre-existing weights change. The origin is therefore an ordinary state of softmax attention rather than an inert one.

We give state-level non-participation a single token-level coordinate. At a declared hidden-carrier boundary, token i has presence

pi=ρτ(hi)=∥hi∥22τ+∥hi∥22.(2)p_{i}=\rho_{\tau}(h_{i})=\frac{\|h_{i}\|_{2}^{2}}{\tau+\|h_{i}\|_{2}^{2}}. \tag{2}

The coefficient has two roles. Local update participation determines whether token i emits newly generated information. Context support participation determines whether that token contributes mass to a shared support, partition, or statistic. The same pip_{i}, rather than a new gate for each component, governs both roles.

We introduce OAttention, where O denotes the origin of the representation space, as the support-coupled attention instance. Query and key projections still determine the score geometry, but the receiver hidden state supplies the output factor pip_i and each source hidden state supplies its support mass pjp_j. OAttention otherwise retains the standard score, externally supplied visibility relation, exponential competition, and value aggregation. The visibility mask says whether an edge is permitted; token presence says whether an otherwise visible state participates on that edge.

The broader principle is necessary because attention alone cannot make a model null consistent. An additive position encoding can map zero to a nonzero vector; an affine normalization or biased feed-forward branch can manufacture a nonzero update; and an ordinary cross-token statistic can allow an inserted zero to change every pre-existing output. O-Closure distinguishes token-local maps, which must absorb zero, from support-coupled maps, which must also assign zero mass to null sources. OFFN, ONorm, OInject, and OStandardize instantiate these two cases, and closure under residual addition and composition gives a conditional construction of an OTransformer.

Our contributions are:

  1. We formulate null consistency as exact operator properties that separate representation-carried, state-level participation from externally supplied, relation-level visibility masks; from one hidden-carrier presence coefficient we derive OAttention and prove its null and active-limit properties.

  2. We identify local update participation and context support participation as two placements of the same token presence, formulate their zero-extension law, and derive OFFN, ONorm, OInject, OStandardize, and a conditional OTransformer by residual and compositional closure.

  3. We test three distinct claims: exact implementation of the canonical operator, calibrated near-identity compatibility in a frozen pretrained TabPFN v3 host, and the necessity of whole-path closure in a scoped OTransformer ablation.

These claims deliberately have different scopes. Theorems establish the declared algebraic contracts; finite-precision evaluations check their implementation; and task metrics are bounded compatibility observations rather than universal non-inferiority tests. We do not claim closure for arbitrary tokenizers, routers, caches, or readouts; learned zero-attractor dynamics; or a general semantics for missing values.

References (25)