From Attention Masks to Inert Zero-Vector Tokens: OAttention and O-Closure for Token Dynamics
Abstract
Attention masks are relation-level controls: they specify which query--source pairs may interact. They do not provide a representation-carried token state that is non-participating at the attention boundary. We assign each token hidden carrier an active-presence coefficient . The same coefficient has two roles: it gates information emitted by token , and it determines the mass with which token enters computations shared with other tokens. OAttention is the support-coupled attention realization of this rule. It gates the receiver output by and weights source by in both the attention numerator and partition, while retaining the standard score, visibility relation, exponential competition, and value aggregation. This 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 , and an OTransformer by residual and compositional closure. The canonical operator is checked by contract tests and a 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 and , respectively, over 18 matched dataset--seed cases. A two-block ablation shows that OAttention alone does not preserve a NULL state through ordinary host components, whereas the 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.
Figures & tables
| Property | Result |
|---|---|
| Canonical equation | Output and weight error against direct evaluation |
| Null insertion | Old-output ; old-weight |
| Exact null boundary | Inserted receiver output and source weight: |
| Empty/all-null support | Output and weights finite exact zero |
| Interfaces | 6/6 dtype–head cases finite; MHA, GQA, fp32, bf16, fp16, cross-attention, and tested gradients |
| Dataset | Base RMSE | OA RMSE | Full-O RMSE | Base | OA | Full-O |
|---|---|---|---|---|---|---|
| bodyfat | 1.231549 | 1.230964 | 1.232571 | .961179 | .961228 | .961112 |
| concrete | 4.127869 | 4.133669 | 4.129971 | .936922 | .936758 | .936862 |
| cpu_small | 3.023569 | 3.022008 | 3.023061 | .971290 | .971319 | .971299 |
| kin8nm | .091274 | .091292 | .091278 | .877050 | .877005 | .877038 |
| space_ga | .093484 | .093366 | .093445 | .740970 | .741612 | .741182 |
| tecator | .422813 | .424202 | .424954 | .999087 | .999082 | .999078 |
| Arm | Host components | Max inserted-state | Interpretation |
|---|---|---|---|
| Standard | Softmax, additive encoding, affine norm, biased FFN | 7.982 | Ordinary host |
| OA-only | Hidden-carrier OA; other components ordinary | 7.983 | Attention alone is insufficient |
| OTransformer | Hidden-carrier OA, OInject, ONorm, OFFN | 0 | Declared O-closed path |
| Structural control | Hidden-carrier OA, no additive encoding, affine-free norm, bias-free FFN | 0 | Separately initialized comparator |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Rows | Features | Classes | Task |
|---|---|---|---|---|
| Iris | 150 | 4 | 3 | classification |
| Wine | 178 | 13 | 3 | classification |
| Breast Cancer Wisconsin | 569 | 30 | 2 | classification |
| Digits | 1,797 | 64 | 10 | classification |
| Diabetes | 442 | 10 | – | regression |
| Arm | Attention | Encoding and normalization | FFN |
|---|---|---|---|
| Standard | softmax | additive encoding; affine LayerNorm | biased |
| OA-only | hidden-carrier OAttention | additive encoding; affine LayerNorm | biased |
| OTransformer | hidden-carrier OAttention | OInject; ONorm-wrapped affine LayerNorm | OFFN-wrapped biased FFN |
| Structural control | hidden-carrier OAttention | no additive encoding; affine-free LayerNorm | bias-free, O-gated |
| Property | Result |
|---|---|
| Finiteness | 15/15 seed–shape cases finite |
| Exact zero boundaries | Null query, empty support, and fully masked output and weights: |
| Null-source insertion | Old-output ; old-weight |
| Self-attention insertion | Old-output ; inserted-query output |
| Near-origin behavior | Log–log output/query slope over scales to |
| Active path | Relative output at the evaluated default scale |
| Dataset | OA RMSE | Full-O RMSE | OA | Full-O |
|---|---|---|---|---|
| bodyfat | +0.532% | +95.354% | +0.000028 | +0.005431 |
| concrete | +0.162% | +24.442% | -0.000178 | -0.034037 |
| cpu_small | -0.054% | +5.238% | +0.000031 | -0.002766 |
| kin8nm | -0.112% | +39.797% | +0.000277 | -0.117006 |
| space_ga | -0.126% | +17.324% | +0.000649 | -0.096142 |
| tecator | +0.429% | +100.143% | -0.000008 | -0.002602 |
| Task | Metric | Standard | Hidden-carrier OA | |
|---|---|---|---|---|
| Iris | accuracy | .9111 | .9111 | +.0000 |
| Wine | accuracy | .9630 | .9630 | +.0000 |
| Breast Cancer | accuracy | .9708 | .9708 | +.0000 |
| Digits | accuracy | .8972 | .8954 | -.0019 |
| Synthetic classification | accuracy | .6889 | .6900 | +.0011 |
| Diabetes | RMSE | 54.6873 | 54.6782 | -.0092 |
| Inserted | Prediction RMS shift | Inserted-state | ||
|---|---|---|---|---|
| tokens | Standard | Hidden-carrier OA | Standard | Hidden-carrier OA |
| 1 | 1.83–7.42 | 0 | ||
| 4 | 1.84–7.42 | 0 | ||
| Task | Metric | ||||
|---|---|---|---|---|---|
| Iris | accuracy | .8667/.9222 | .8667/.9111 | .8778/.9111 | .9333/.8889 |
| Wine | accuracy | .9444/.9444 | .9444/.9444 | .9444/.9444 | .9444/.9444 |
| Breast Cancer | accuracy | .9678/.9678 | .9678/.9678 | .9678/.9678 | .9678/.9678 |
| Digits | accuracy | .9204/.9213 | .9194/.9213 | .9194/.9213 | .9194/.9213 |
| Diabetes | RMSE | 62.6683/62.6689 | 62.7226/62.6680 | 62.7453/62.6682 | 62.8580/62.6688 |
Attention Mechanisms
Attention mechanisms let neural networks weight information from other tokens or regions according to relevance, enabling context-dependent processing.
See all 517 papers