# SPET Paper 03
# 注意力投影不變量
## Attention Projection Invariants

**版本：v0.1**  
**日期：2026-08-27**  
**理論定位：SPET Series Paper 03 / Attention Semantics and Projection Correctness**  
**依賴：SPET Paper 00、SPET Paper 01、SPET Paper 02**  
**作者：** Neo.K  
**機構：** EveMissLab／一言諾科技有限公司

---

## 摘要

本文延續 Stable Projection Epoch Theory（SPET），建立 **Attention Projection Invariants（API）** 的形式理論。前兩篇已分別定義 projection readiness 與 persistent coordinate frame，但高維 AI 與 projected-native computation 仍存在一個更細緻的問題：即使座標、region、tile 與 locality 在 epoch 內保持穩定，若 attention semantics 在投影後失真，projected representation 仍可能失去任務相關性、重要度排序、可達性與局部計算優先級。

本文不將 attention 限定為 Transformer 的 softmax attention，而將其一般化為任何對 state elements、relations、regions、tasks 或 routes 的**選擇、權重、優先級、可達性與資源分配結構**。定義 attention state：

$$
\mathcal A
=
\left\langle
W,
S,
R,
M,
L,
Q,
\Theta
\right\rangle,
$$

其中 $W$ 為權重結構、 $S$ 為 support、 $R$ 為 rank/order、 $M$ 為 mass allocation、 $L$ 為 locality、 $Q$ 為 reachability/query relevance， $\Theta$ 為 attention typing 與 threshold profile。

本文提出：

$$
\boxed{
\mathcal I^{attn}
=
\left\{
I_{support},
I_{rank},
I_{mass},
I_{locality},
I_{reach},
I_{identity},
I_{entry},
I_{exit}
\right\}.
}
$$

其中除了保存既有 attention support，還加入 **entry / exit invariants**，用來處理一個重要失敗模式：未被保護的 coordinate 即使不直接修改既有 top- $k$ support，也可能因權重上升而「闖入」 protected set，改變 projected-native operator 的任務語義。因此合法 transform 必須驗證新的全域 attention profile，而不能只檢查「舊 support 有沒有被改」。

本文進一步定義 attention role typing：

$$
\mathsf{AttnRole}
\in
\{
\mathsf{SELECTOR},
\mathsf{INVARIANT},
\mathsf{WEIGHT},
\mathsf{LAYOUT},
\mathsf{ROUTER},
\mathsf{ADVISORY}
\},
$$

並強調：

$$
\boxed{
\text{Attention Evolution}
\neq
\text{Frame Evolution}
}
$$

以及：

$$
\boxed{
\text{Attention Invariant}
\neq
\text{Attention Permanence}.
}
$$

在同一 Stable Projection Epoch 中，可以要求特定 attention semantics 保持 exact 或 bounded；Release 後則可合法重建新的 attention profile 與 projection frame。本文最後提出 Attention Invariant Certificate、post-transform recertification、attention debt、attention staleness、cross-epoch continuity 與 multi-head / multi-layer attention profile，並與 HDSRC Stable Projection Epoch 實驗對接。

**關鍵詞：** Stable Projection Epoch、Attention Projection Invariants、Attention Support、Attention Rank、Attention Mass、Attention Locality、Attention Certificate、HDSRC、AI Native Computation

---

# 0. 研究目的

SPET Paper 02 已經建立：

$$
\mathcal I^{space}
=
\left\{
I_{addr},
I_{identity},
I_{region},
I_{tile},
I_{locality},
I_{reach},
I_{topology}
\right\}.
$$

但僅有 spatial correctness 不足以保證 projected-native computation 的任務正確性。

例如，同一 coordinate identity 與 tile address 都保持不變，但：

$$
a_i
$$

的 attention priority 已經從高變低；

或另一 coordinate：

$$
c_j
$$

從低 priority 躍升進入 top- $k$ ；

則原本依賴 protected attention support 的 operator 可能已經失去合法性。

因此本文研究：

> 在 Stable Projection Epoch 內，attention 的哪些性質必須保持？哪些可以變？哪些改變必須觸發 Release 或 Re-certification？

---

# 1. Attention 的一般化定義

本文不把 attention 限定為單一 neural attention matrix。

定義廣義 attention：

$$
\boxed{
\mathcal A
=
\left\langle
W,
S,
R,
M,
L,
Q,
\Theta
\right\rangle.
}
$$

其中：

- $W$：weight / salience structure；
- $S$：active support；
- $R$：rank / priority order；
- $M$：mass allocation；
- $L$：attention locality；
- $Q$：task / query relevance；
- $\Theta$：threshold、normalization、typing profile。

因此 attention 可以來自：

- Transformer attention；
- retrieval score；
- task relevance；
- activation importance；
- memory salience；
- graph priority；
- routing weight；
- uncertainty-weighted focus；
- manually declared protected region。

---

# 2. Attention Role Typing

attention 在 projection system 中可能扮演完全不同角色。

定義：

$$
\boxed{
\mathsf{AttnRole}
\in
\{
\mathsf{SELECTOR},
\mathsf{INVARIANT},
\mathsf{WEIGHT},
\mathsf{LAYOUT},
\mathsf{ROUTER},
\mathsf{ADVISORY}
\}.
}
$$

## 2.1 SELECTOR

attention 用來選擇 projection scope：

$$
\mathcal D_\sigma
=
\mathsf{SelectByAttention}(S).
$$

## 2.2 INVARIANT

attention 本身是 epoch correctness contract 的一部分。

## 2.3 WEIGHT

attention 改變 operator cost、importance 或 priority，但不直接決定合法性。

## 2.4 LAYOUT

attention 參與建立 frame：

$$
\pi_k
=
\mathsf{BuildFrame}(S,\mathcal A_k).
$$

## 2.5 ROUTER

attention 直接影響 compute routing、resource allocation 或 executor selection。

## 2.6 ADVISORY

attention 只提供提示，不影響 hard correctness。

因此：

$$
\boxed{
\text{same attention values}
\not\Rightarrow
\text{same attention semantics}.
}
$$

---

# 3. Attention Support

給定 threshold：

$$
\theta,
$$

定義 support：

$$
\boxed{
S_\theta
=
\{c_i:a_i\ge\theta\}.
}
$$

對 top- $k$：

$$
\boxed{
S_k^{top}
=
\operatorname{TopK}_k(a).
}
$$

---

# 4. Support Invariant

若 Freeze 時 protected support：

$$
S_k^\star
$$

被標為 hard invariant，則 epoch 內要求：

$$
\boxed{
S_t^{prot}
=
S_k^\star.
}
$$

若只要求 subset preservation：

$$
S_k^\star
\subseteq
S_t,
$$

則必須顯式標示為：

$$
I_{support}^{subset}.
$$

---

# 5. Entry Invariant

定義 outsider set：

$$
O_k
=
\mathcal C_\sigma
\setminus
S_k^\star.
$$

Entry invariant 要求：

$$
\boxed{
\forall c_j\in O_k,
\quad
c_j\notin S_t^{prot}.
}
$$

即未被保護的 coordinate 不得未經認證地闖入 protected support。

---

# 6. Exit Invariant

對：

$$
c_i\in S_k^\star,
$$

若 hard support contract 要求其保留，則：

$$
\boxed{
c_i\in S_t^{prot}.
}
$$

所以：

$$
I_{support}
=
I_{entry}
\land
I_{exit}.
$$

---

# 7. 為什麼需要 Entry / Exit

考慮 top- $k$ attention。

Freeze 時：

$$
S_k^\star
=
\{c_1,\ldots,c_k\}.
$$

某 operator 只修改：

$$
c_j\notin S_k^\star
$$

並使：

$$
a_j'
>
\min_{c_i\in S_k^\star}a_i.
$$

雖然沒有直接修改 protected coordinate，但：

$$
\operatorname{TopK}(a')
\neq
S_k^\star.
$$

因此：

$$
\boxed{
\text{No Direct Protected Mutation}
\not\Rightarrow
\text{Attention Support Preservation}.
}
$$

---

# 8. Rank Invariant

定義 rank function：

$$
\rho_k(c)
=
\operatorname{rank}_{\mathcal A_k}(c).
$$

exact rank invariant：

$$
\boxed{
\rho_t(c)=\rho_k(c).
}
$$

也可以只保護 partial order：

$$
I_{rank}^{partial}
:
\forall(c_i,c_j)\in\mathcal P_k^{rank},
\quad
a_i>a_j.
$$

---

# 9. Rank Tolerance

對 approximate attention，可允許：

$$
|\rho_t(c)-\rho_k(c)|
\le
\delta_\rho.
$$

並定義：

$$
\boxed{
I_{rank}^{soft}(\delta_\rho).
}
$$

---

# 10. Attention Mass

對 region：

$$
\mathcal R,
$$

定義：

$$
\boxed{
M_{\mathcal R}
=
\sum_{c_i\in\mathcal R}
a_i.
}
$$

approximate mass invariant：

$$
\boxed{
\left|
M_{\mathcal R}(t)
-
M_{\mathcal R}(\tau_k)
\right|
\le
\varepsilon_M.
}
$$

---

# 11. Support / Rank / Mass Non-Collapse

即使 support 不變，mass 也可能大幅重分配。

因此：

$$
\boxed{
I_{support}
\not\Rightarrow
I_{mass}.
}
$$

同樣：

$$
I_{mass}
\not\Rightarrow
I_{rank}.
$$

三者必須分開型別化。

---

# 12. Attention Locality

定義：

$$
L_k^{attn}
\subseteq
\mathcal C_\sigma
\times
\mathcal C_\sigma.
$$

若：

$$
(c_i,c_j)\in L_k^{attn},
$$

可以要求：

$$
\boxed{
\mathsf{AccessCost}_{\pi_k}(c_i,c_j)
\le
B_{attn}.
}
$$

---

# 13. Attention Reachability

對 query：

$$
q,
$$

若：

$$
\mathsf{ReachAttn}_S(q,c_i)
$$

屬於 hard scope，則要求：

$$
\boxed{
\mathsf{ReachAttn}_P(q,c_i)
=
\mathsf{ReachAttn}_S(q,c_i).
}
$$

---

# 14. Attention Identity

attention value 與 semantic identity 不得塌縮：

$$
\boxed{
\text{Attention Weight}
\neq
\text{Attention Identity}.
}
$$

即使：

$$
a_i(t)\neq a_i(t+1),
$$

只要 semantic identity 未變，仍是同一物件。

---

# 15. Attention Projection Invariant Family

本文定義：

$$
\boxed{
\mathcal I_k^{attn}
=
\left\{
I_{support},
I_{rank},
I_{mass},
I_{locality},
I_{reach},
I_{identity},
I_{entry},
I_{exit}
\right\}.
}
$$

每個 invariant：

$$
I_j^{attn}
=
\left\langle
Role,
Scope,
Predicate,
Severity,
Tolerance,
Evidence,
Validity
\right\rangle.
$$

---

# 16. Attention Invariant Certificate

定義：

$$
\boxed{
\mathsf{AICert}_k
=
\left\langle
EpochID,
FrameID,
AttentionProfileID,
SupportProof,
EntryProof,
ExitProof,
RankProof,
MassBounds,
LocalityProof,
ReachabilityProof,
Validity,
Provenance
\right\rangle.
}
$$

若 attention 屬於 hard scope，Freeze Certificate 必須引用：

$$
\mathsf{AICert}_k.
$$

---

# 17. Attention Profile Identity

定義：

$$
\boxed{
\mathsf{AttnProfileID}
=
H(
Role,
Scope,
Thresholds,
Normalization,
InvariantSet,
Validity
).
}
$$

同樣的數值在不同 role / threshold 下，不應被當成同一 semantic profile。

---

# 18. Post-Transform Attention Verification

對：

$$
F_P(P)=P',
$$

必須重新驗證：

$$
\boxed{
\mathsf{VerifyAttn}
(
P',
\mathsf{AICert}_k
)
}
$$

而不是只檢查是否直接寫入 protected coordinates。

如果 hard invariant FAIL：

$$
P'
$$

不得成為 authoritative epoch state。

---

# 19. Pre-Check 與 Post-Check

Pre-check 可以快速拒絕明顯違規，例如：

> 直接寫 protected top- $k$ coordinate。

但：

$$
\boxed{
\text{Pre-Check}
\neq
\text{Post-Transform Certification}.
}
$$

因為 outsider intrusion 可以間接發生。

---

# 20. Attention-Safe Operator

定義：

$$
\boxed{
F
\in
\mathcal F_k^{attn-safe}
}
$$

若：

$$
\forall P\in\mathcal P_{\pi_k}^{valid},
$$

都有：

$$
\mathsf{VerifyAttn}
(
F(P),
\mathsf{AICert}_k
)
=
\mathsf{PASS}.
$$

---

# 21. Conditionally Attention-Safe Operator

某些 operator 只在參數範圍內安全：

$$
F_\Delta
:
a_j\rightarrow a_j+\Delta.
$$

若：

$$
\Delta\in\Omega_k^{safe},
$$

才有：

$$
F_\Delta
\in
\mathcal F_k^{attn-safe}.
$$

---

# 22. Attention Violation as Obstruction

定義：

$$
\boxed{
O_{attn}
=
\left\langle
Target,
Invariant,
Mechanism,
Scope,
Strength,
Certificate
\right\rangle.
}
$$

可包括：

- support intrusion；
- protected exit；
- rank inversion；
- mass drift；
- locality overflow；
- reachability loss。

若：

$$
O_{attn}\triangleright F,
$$

則 operator 被拒絕或要求 Release。

---

# 23. Attention Debt

定義：

$$
\boxed{
\Delta_{attn}
=
\left\{
\delta_{support},
\delta_{rank},
\delta_{mass},
\delta_{locality},
\delta_{reach}
\right\}.
}
$$

soft profile 可允許：

$$
\Delta_{attn}\le B_{attn}.
$$

超過 budget：

$$
\boxed{
\mathsf{ReleaseRequired}=1.
}
$$

---

# 24. Attention Staleness

定義：

$$
\boxed{
\mathsf{AttnStale}_k(t)
=
d_{\mathcal A}
(
\mathcal A_k,
\mathsf{BuildAttention}(S_t)
).
}
$$

但：

$$
\mathsf{AttnStale}>0
$$

不等於立即非法。

合法性仍由 hard invariants 與 debt budget 決定。

---

# 25. Attention Evolution / Frame Evolution Non-Collapse

若 attention role 是 WEIGHT 或 ADVISORY：

$$
\mathcal A_t\neq\mathcal A_{\tau_k}
$$

可以同時保持：

$$
\pi_t=\pi_k.
$$

因此：

$$
\boxed{
\text{Attention Evolution}
\neq
\text{Frame Evolution}.
}
$$

---

# 26. Attention as Layout Driver

若：

$$
\mathsf{AttnRole}
=
\mathsf{LAYOUT},
$$

則 Freeze 時：

$$
\pi_k
=
\mathsf{BuildFrame}(S_k,\mathcal A_k).
$$

但 epoch 內 attention 的 bounded change 不應隱式重建 frame。

必須：

$$
\boxed{
\mathsf{Release}
\rightarrow
\mathsf{Reproject}.
}
$$

---

# 27. Attention Invariant 不等於永久 Attention

$$
\boxed{
\text{Attention Invariant}
\neq
\text{Attention Permanence}.
}
$$

真正語義是：

$$
\boxed{
\text{Invariant within declared epoch / scope}.
}
$$

---

# 28. Cross-Epoch Attention Continuity

定義：

$$
\boxed{
\Gamma_A^{k,k+1}
=
\{
(c,
a_k(c),
a_{k+1}(c),
\rho_k(c),
\rho_{k+1}(c))
\}.
}
$$

所以 attention change 不代表 history 消失。

---

# 29. Attention Re-certification

Release 後：

$$
\mathcal A_{k+1}
=
\mathsf{BuildAttention}(S_{k+1}^\star),
$$

並產生：

$$
\mathsf{AICert}_{k+1}.
$$

因此：

$$
\boxed{
\mathsf{AICert}_k
\not\Rightarrow
\mathsf{AICert}_{k+1}.
}
$$

---

# 30. Multi-Head Attention

若：

$$
\mathcal A
=
\{
\mathcal A^{(1)},
\ldots,
\mathcal A^{(h)}
\},
$$

不同 head 可以有不同 invariant profile。

例如：

- Head 1：hard support；
- Head 2：soft rank；
- Head 3：advisory only。

---

# 31. Cross-Head Constraint

可以建立：

$$
\boxed{
I_{coverage}
:
\left|
\bigcup_r S_t^{(r)}
\right|
\ge
K.
}
$$

所以 invariant 可以作用於 attention family。

---

# 32. Multi-Layer Attention

不同 layer：

$$
\mathcal A^{[\ell]}
$$

可以具有不同 temporal semantics。

因此：

$$
\boxed{
\text{Attention temporal semantics can be layer-typed}.
}
$$

---

# 33. Attention Projection

source attention：

$$
a:
\mathcal C
\rightarrow\mathbb R
$$

投影為：

$$
a_P:
\mathcal P
\rightarrow\mathbb R.
$$

若地址一對一，可要求：

$$
a_P(A_k(c))
=
a(c).
$$

若 carrier aggregation，多 coordinate 共用位置，則必須顯式定義：

$$
a_P(p)
=
\mathsf{Agg}
(
\{a(c):A_k(c)=p\}
).
$$

---

# 34. Attention Mass Conservation

聚合 carrier 可要求：

$$
\boxed{
\sum_{p\in\mathcal P}
a_P(p)
=
\sum_{c\in\mathcal C}
a(c).
}
$$

但 mass conservation 不推出 support 或 rank preservation。

---

# 35. Query / Task Conditional Attention

若：

$$
a(c\mid q)
$$

或：

$$
a(c\mid\tau),
$$

則 invariant 必須綁定：

$$
q\in\mathcal Q_\sigma
$$

或 task：

$$
\tau.
$$

因此：

$$
\boxed{
I_{attn}
=
I_{attn}(q,\tau,\sigma).
}
$$

---

# 36. Attention / Observation Non-Collapse

observer 可只看：

$$
5\%
$$

carrier，但 attention semantics 可以涵蓋整個 logical projected state。

因此：

$$
\boxed{
\text{Observed Region}
\neq
\text{Attention Support}.
}
$$

---

# 37. Attention / Materialization Non-Collapse

$$
\boxed{
\text{Attention}
\neq
\text{Materialization}.
}
$$

可先：

$$
\mathsf{AttentionSelect}
\rightarrow
\mathsf{Schedule}
\rightarrow
\mathsf{PartialMaterialize}.
$$

---

# 38. Attention / Authority Non-Collapse

$$
\boxed{
a_i\gg a_j
\not\Rightarrow
Authority(c_i)>Authority(c_j).
}
$$

高 attention 不自動取得 execution / commit authority。

---

# 39. Attention Invariant 與 Operator Algebra

定義 epoch-safe operator：

$$
\boxed{
\mathcal F_k^{safe}
=
\mathcal F_k^{space-safe}
\cap
\mathcal F_k^{attn-safe}.
}
$$

同時保持 spatial 與 attention contract，才可在 epoch 中合法 composition。

---

# 40. Composition

若：

$$
F_1,\ldots,F_m
\in
\mathcal F_k^{safe},
$$

且每一步：

$$
\mathsf{VerifySpace}
=
\mathsf{PASS},
$$

$$
\mathsf{VerifyAttn}
=
\mathsf{PASS},
$$

則有限 composition 保持 epoch validity。

---

# 41. Composition 不自動封閉

即使：

$$
F_1
$$

與：

$$
F_2
$$

各自對 baseline state safe，也不自動推出：

$$
F_2\circ F_1
$$

對所有中間 state safe。

因此：

$$
\boxed{
\text{authoritative steps require post-transform recertification}.
}
$$

---

# 42. HDSRC Stable Epoch 實驗對應

HDSRC 實驗使用：

$$
S_k^{top32}
$$

作為 protected attention support。

已驗證兩類 violation。

## 42.1 Direct Protected Mutation

直接修改 protected member，系統 fail-closed。

## 42.2 Indirect Support Intrusion

修改：

$$
c_j\notin S_k^{top32}
$$

使其 weight 足以進入 Top32。

即使沒有直接修改舊 support，post-transform certificate 仍偵測：

$$
S_{t+1}^{top32}
\neq
S_k^{top32}
$$

並拒絕輸出。

因此：

$$
\boxed{
I_{entry}
\text{ is necessary}.
}
$$

---

# 43. Release 後合法 Attention Change

同樣的 semantic change 若先：

$$
\mathsf{Release},
$$

再建立下一個 epoch：

$$
\mathcal E_{k+1},
$$

則：

$$
S_{k+1}^{top32}
\neq
S_k^{top32}
$$

可以合法，只要：

$$
\mathsf{AICert}_{k+1}
=
\mathsf{PASS}.
$$

所以：

$$
\boxed{
\text{Illegal within epoch}
\not\Rightarrow
\text{Illegal across epochs}.
}
$$

---

# 44. Semantic Attention / Spatial Position Non-Collapse

即使：

$$
S_k^{top}
=
S_{k+1}^{top},
$$

跨 epoch frame 改變後：

$$
A_k(c)\neq A_{k+1}(c)
$$

可以對全部 top- $k$ coordinates 成立。

因此：

$$
\boxed{
\text{Attention Semantic Stability}
\neq
\text{Attention Spatial Position Stability across epochs}.
}
$$

---

# 45. Attention Drift Vector

定義：

$$
\Delta_A^{support}
=
|S_k^{top}\triangle S_{k+1}^{top}|,
$$

$$
\Delta_A^{rank}
=
\sum_c
|\rho_k(c)-\rho_{k+1}(c)|,
$$

$$
\Delta_A^{mass}
=
\sum_{\mathcal R}
|M_{\mathcal R}^k-M_{\mathcal R}^{k+1}|,
$$

以及 position drift：

$$
\Delta_A^{pos}
=
\sum_{c\in S_k^{top}}
\mathbf 1[
A_k(c)\neq A_{k+1}(c)
].
$$

整體：

$$
\boxed{
\mathbf\Delta_A
=
\left\langle
\Delta_A^{support},
\Delta_A^{rank},
\Delta_A^{mass},
\Delta_A^{locality},
\Delta_A^{reach},
\Delta_A^{pos}
\right\rangle.
}
$$

---

# 46. Attention Migration Cost

跨 epoch：

$$
\mathcal A_k
\rightarrow
\mathcal A_{k+1}
$$

可能產生：

$$
C_{attn-mig}
=
C_{reindex}
+
C_{cache}
+
C_{reroute}
+
C_{refetch}
+
C_{reverify}.
$$

因此 attention refresh 不是免費操作。

---

# 47. Attention Refresh Benefit

$$
B_{attn-refresh}
=
B_{task}
+
B_{accuracy}
+
B_{locality}
+
B_{routing}.
$$

可採用：

$$
B_{attn-refresh}
>
C_{attn-mig}
+
C_{risk}
$$

作為 transition 的工程判斷之一，但 hard admissibility 必須先通過。

---

# 48. Hard / Soft Attention Profiles

可同時存在：

$$
\mathsf{AProfile}^{H}
$$

例如 exact support / reachability，

與：

$$
\mathsf{AProfile}^{S}
$$

例如：

$$
|\Delta rank|\le2
$$

或：

$$
\Delta mass\le0.01.
$$

---

# 49. Attention Readiness

Freeze 前：

$$
\mathsf{AttentionReady}(S,\sigma)
$$

要求所有 hard attention obligations PASS。

若 attention role 是 ADVISORY，則可不阻斷 Freeze。

所以：

$$
\boxed{
\text{Attention Readiness is role-typed}.
}
$$

---

# 50. Attention Freeze

Freeze 的不是每一個 attention scalar。

Freeze 的是：

$$
\boxed{
\text{Attention Contract}.
}
$$

可能包含：

- support；
- threshold；
- rank constraints；
- mass bounds；
- locality budget；
- reachability profile。

因此：

$$
\boxed{
\text{Freeze Attention Contract}
\neq
\text{Freeze Every Attention Number}.
}
$$

---

# 51. Attention Release / Reopening

若合法但必要的 attention change 會破壞目前 contract，應：

$$
\boxed{
\mathsf{Release}
\rightarrow
\mathsf{Recompute}
\rightarrow
\mathsf{Re-certify}.
}
$$

而不是強迫新 attention 回到舊狀態。

---

# 52. Attention Ledger

定義 event：

$$
e_k^{attn}
=
\left\langle
ProfileOld,
ProfileNew,
SupportDiff,
RankDiff,
MassDiff,
Cause,
Certificate,
Time
\right\rangle.
$$

形成：

$$
\boxed{
\mathsf{AttnLedger}
=
\{e_0^{attn},e_1^{attn},\ldots\}.
}
$$

---

# 53. Attention Certificate Expiration

 $\mathsf{AICert}$ 可以：

- time-bound；
- event-bound；
- state-anchor-bound；
- task-bound。

例如：

$$
\mathsf{ValidUntil}
=
\text{task-change}
$$

或：

$$
\mathsf{ValidUntil}
=
\text{relation-version-change}.
$$

---

# 54. Attention 與 Resource Allocation

若 attention role 為 ROUTER：

$$
a_i
\rightarrow
r_i,
$$

則 attention support / rank 可能影響：

- GPU block；
- batch priority；
- memory residency；
- I/O prefetch。

因此 attention invariants 也可以成為 resource stability contract。

---

# 55. Attention 與 GCM

GCM computational configuration 可擴展為：

$$
\gamma
=
\langle
\beta,
\rho^C,
r,
\chi,
\mathcal A
\rangle.
$$

但：

$$
\boxed{
\mathcal A
\neq
Authority.
}
$$

Attention 可以影響 proposal、priority 與 routing，不自動取得 commit authority。

---

# 56. Attention 與 HDSRC Image Carrier

HDSRC image-native carrier 可以把 attention 表示為：

- independent layer；
- region metadata；
- sparse attention page；
- routing sidecar；
- tile priority map。

但：

$$
\boxed{
\text{Attention Carrier}
\neq
\text{Canonical Attention Semantics}.
}
$$

---

# 57. Attention-Safe Native Compute

理想 projected-native operator 同時滿足：

$$
F_P
\in
\mathcal F_k^{space-safe}
$$

與：

$$
F_P
\in
\mathcal F_k^{attn-safe}.
$$

因此：

$$
\boxed{
F_P
\in
\mathcal F_k^{epoch-safe}.
}
$$

---

# 58. 第一批命題

## Proposition 58.1 — Support Preservation Requires Entry and Exit Checks

只檢查 protected members 未被直接修改，不足以推出：

$$
S_t^{top}=S_k^{top}.
$$

若同時驗證：

$$
I_{entry}
\land
I_{exit},
$$

才可得到 exact support preservation。

## Proposition 58.2 — Attention Value Mutation Does Not Necessarily Violate Contract

存在：

$$
a_i'\neq a_i
$$

但所有 hard invariants PASS。

因此：

$$
\boxed{
\Delta attention value
\not\Rightarrow
\text{epoch invalid}.
}
$$

## Proposition 58.3 — Support Equality Does Not Imply Rank Equality

存在：

$$
S_t=S_k
$$

但：

$$
\rho_t\neq\rho_k.
$$

## Proposition 58.4 — Cross-Epoch Attention Change Is Admissible

即使：

$$
S_k^{top}\neq S_{k+1}^{top},
$$

只要 Release 與新 certificate 合法，transition 可接受。

## Proposition 58.5 — Semantic Stability Does Not Require Spatial Position Stability Across Epochs

若 support 不變但 frame 改變：

$$
S_k^{top}=S_{k+1}^{top}
$$

可同時有：

$$
A_k(c)\neq A_{k+1}(c).
$$

---

# 59. SPET Paper 03 公理 / 規範 v0.1

## SPET-AI1 — Attention Role Typing

所有 attention contract 必須宣告角色。

## SPET-AI2 — Support / Rank / Mass Non-Collapse

Support、rank、mass 不得互相替代。

## SPET-AI3 — Entry / Exit Completeness

Protected support 必須同時驗證 outsider entry 與 protected exit。

## SPET-AI4 — Post-Transform Re-certification

Authoritative transform 後必須重新驗證 hard attention invariants。

## SPET-AI5 — No Direct-Mutation Shortcut

未直接修改 protected coordinate 不代表 attention invariant 自動成立。

## SPET-AI6 — Attention / Frame Non-Collapse

Attention evolution 不得隱式修改 authoritative frame。

## SPET-AI7 — Attention Contract, Not Numerical Freeze

Freeze 的是 attention semantics contract，不是所有 attention scalar。

## SPET-AI8 — Epoch-Bounded Attention Invariants

Attention invariant 只在宣告 epoch / scope 內成立。

## SPET-AI9 — Certified Cross-Epoch Attention Change

跨 epoch attention transition 必須重新 certification。

## SPET-AI10 — Attention / Authority Non-Collapse

高 attention 不自動取得 execution / commit authority。

## SPET-AI11 — Attention Ledger

Authoritative attention transition 必須可回放與稽核。

## SPET-AI12 — Task / Query Binding

Query-conditional / task-conditional attention 必須綁定其 scope。

---

# 60. 對 AI 原生計算的含義

SPET 不要求：

$$
f_{attn}
=
f_{projection}
=
f_{frame}.
$$

可以：

$$
\boxed{
f_{attn}
\gg
f_{frame}
}
$$

只要 hard attention contract 未破壞。

因此 AI 可以：

1. 在來源空間持續更新細粒度 attention；
2. 維持 epoch-level attention invariants；
3. 在 projected space 中維持 stable operator semantics；
4. 必要時 Release；
5. 重建 attention profile；
6. 建立下一個 epoch。

---

# 61. 對計算成本的含義

若每次 attention 微小變化都不需要 reproject：

$$
C_{reproject}
$$

可以被延遲。

只需維護：

$$
C_{attn-update}
+
C_{verify}.
$$

因此可研究：

$$
\boxed{
C_{epoch}
<
C_{continuous-reprojection}
}
$$

是否對特定 workload 成立。

---

# 62. 對 Local Integrity 的接口

Attention certificate 可以 tile / region 化。

例如：

$$
h_i^{attn}
=
H(
Support_i,
Mass_i,
Rank_i
).
$$

上層建立 Merkle root。

因此 local attention change 可只更新：

$$
O(\log N)
$$

certificate path。

這會在 projected-native runtime whitepaper 中進一步發展。

---

# 63. 未解問題

1. Top- $k$ support 是否適合所有 attention？
2. Multi-head invariant composition 如何定義？
3. Rank 應 exact 還是 partial order？
4. Region mass partition 由誰決定？
5. Attention staleness 與 frame staleness 如何聯合最佳化？
6. Query-conditional certificate 如何快取？
7. GPU-native attention layer 如何直接參與 local certificate？
8. Stochastic attention 如何處理？
9. Continuous attention manifold 如何投影？
10. Attention refresh 是否交由 GCM router 自主決定？

---

# 64. 與 Paper 04 的接口

下一篇將研究：

$$
\boxed{
\text{Certified Reprojection}
+
\text{Release}
+
\text{Reopening}
+
\text{Epoch Transition}.
}
$$

核心問題是：

> 當 spatial / attention debt、task scope、obstruction 或新 computation state 使目前 epoch 不再適合時，如何合法地離開這個 frame、建立下一個 frame，而不破壞 history、identity 與 provenance？

---

# 65. 結論

本文將 attention 從 projection 的附屬參數提升為正式 computational contract。

核心 invariant family：

$$
\boxed{
\mathcal I_k^{attn}
=
\left\{
I_{support},
I_{rank},
I_{mass},
I_{locality},
I_{reach},
I_{identity},
I_{entry},
I_{exit}
\right\}.
}
$$

其中一個最重要的非坍縮為：

$$
\boxed{
\text{No Direct Protected Mutation}
\not\Rightarrow
\text{Attention Preservation}.
}
$$

因此 projected-native transform 必須做 post-transform attention re-certification。

本文同時提出：

$$
\boxed{
\text{Attention Evolution}
\neq
\text{Frame Evolution}
}
$$

以及：

$$
\boxed{
\text{Attention Invariant}
\neq
\text{Attention Permanence}.
}
$$

Stable Projection Epoch 不要求 attention 永遠不變，而要求：

> 在明確 epoch 與 projection scope 中，被宣告為 computationally significant 的 attention semantics 必須維持 exact 或 bounded correctness。

當 task、attention regime、relation structure 或 spatial debt 合法改變時，系統可以：

$$
\mathsf{Release}
\rightarrow
\mathsf{Recompute}
\rightarrow
\mathsf{Re-certify}
\rightarrow
\mathcal E_{k+1}.
$$

因此 attention 不再只是「模型現在看哪裡」，而成為一個可以被 Freeze、驗證、拒絕、更新、遷移與稽核的 projection-state contract。

---

## 內部理論血統與依賴

1. SPET Paper 00 — Stable Projection Epoch Theory: Formal Foundations.
2. SPET Paper 01 — Typed Projection Scope, Closure Readiness, and Freeze Certification.
3. SPET Paper 02 — Spatial Projection Invariants and Persistent Coordinate Frames.
4. Closure-Space Mathematics Paper 00–02.
5. HDSRC — High-Dimensional Symbolic Relational Compilation.
6. HDSRC Stable Projection Epoch Feasibility experiments.
7. HDSRC Native Projection State-Transform Closure experiments.

本文中的 Attention Projection Invariants 為上述理論與實驗後形成的新形式化層，不回溯宣稱舊理論已完整包含本文全部定義。
