← Archive
lm-002723 · 2026-08

動態治理場、校準與自我修正:三域上下文動力學的適切性學習理論

下載 MD 檔 ⬇
📎 附件 · Companion files — 隨文交付的程式 / 證明 / 資料,可獨立下載重驗

動態治理場、校準與自我修正:三域上下文動力學的適切性學習理論

Dynamic Governance Fields, Calibration, and Self-Correction: Learning Present-Appropriateness in Three-Domain Context Dynamics

TDCD Series I / Paper 04 — v0.1
Date: 2026-08-15

摘要

三域上下文動力學(Three-Domain Context Dynamics, TDCD)在前三篇中依序建立工作域、投影域與典範域的三域架構,形式化上下文治理算子,並將 canonical identity、semantic candidate address、typed search phase、present-appropriateness observable 與 exact expansion 分離。本文進一步處理下一個核心問題:若當下適切性函數

Ψτ(O)\Psi_\tau(O)

不是固定規則,而必須隨任務、證據、版本、分支與長程互動而改變,系統如何學習這個治理場,同時避免自我確認、頻繁震盪、過度遺忘、過時記憶復活以及在分布漂移後持續使用失效判準?

本文提出 Dynamic Governance Field(DGF)框架。其基本原則是:identity、phase、canonical validity 與 governance score 必須保持型別分離。本文因此保留 Paper 03 的 hard validity gate

χτ(O){0,1},\chi_\tau(O)\in\{0,1\},

並只允許可學習治理器作用於通過合法性檢查的候選:

Ψτ,t(O)={Gθt(zτ(O)),χτ(O)=1,,χτ(O)=0.\Psi_{\tau,t}(O) = \begin{cases} G_{\theta_t}(z_\tau(O)), & \chi_\tau(O)=1,\\ -\infty, & \chi_\tau(O)=0. \end{cases}

本文進一步定義 admission confidence、calibration error、治理不確定性、abstention、局部與全域 verifier feedback、非平穩漂移、change-point reset、動態遲滯帶、counterfactual recall audit 與 self-overturn condition。本文證明:若 hard gate 與 learned score 分離,則任何有限的學習更新都不能使無效記憶跨越合法性邊界重新進入工作域;若治理分數對參數更新 Lipschitz,且單步 score drift 小於 admission/eviction hysteresis margin,則治理器不會因單次小更新形成完整 admit-evict 往返;若系統的監督訊號完全由自身先前治理決策決定,則治理品質在一般情況下不可由內部資料單獨識別,因而必須引入外部證據、可驗證 transition、counterfactual audit 或任務結果。

本文的核心主張是:

A governor must be able to learn without learning away its own validity boundaries.\boxed{ \text{A governor must be able to learn without learning away its own validity boundaries.} }

以及:

A long-term memory governor is incomplete unless it can revise its own previous admission decisions.\boxed{ \text{A long-term memory governor is incomplete unless it can revise its own previous admission decisions.} }

關鍵詞

三域上下文動力學、上下文治理、記憶校準、治理場、自我修正、概念漂移、遲滯、Abstention、Counterfactual Audit、Agent Memory、TDCD


1. 從固定評分進入動態治理

Paper 03 將記憶進入工作域的路徑分解為:

Canonical IdentitySemantic Candidate AddressTyped Search PhaseΨτExact Expansion.\text{Canonical Identity} \rightarrow \text{Semantic Candidate Address} \rightarrow \text{Typed Search Phase} \rightarrow \Psi_\tau \rightarrow \text{Exact Expansion}.

其中:

Ψτ(O)\Psi_\tau(O)

表示 memory object OO 在 contextual moment τ\tau 下是否適合進入現在。

Ψτ\Psi_\tau 由固定人工權重構成,例如:

Ψτ(O)=iwizi(O,τ),\Psi_\tau(O) = \sum_i w_i z_i(O,\tau),

則系統面臨一個顯然限制:不同任務、不同階段與不同環境下,最適合的治理權重不一定固定。

近期研究已開始將記憶操作直接建模為可學習控制。MemCon 將 retrieve、plan reuse、consolidate 與 forget 建模為 context-dependent control process;AgeMem 將 STM/LTM 操作整合進 agent policy;VerMem 則進一步使用 local verifier 與 global verifier 對 individual memory transitions 與 terminal memory coherence 進行分層 credit assignment。[1–3]

因此 TDCD 下一步不是證明「memory management 可以學習」,而是回答更嚴格的問題:

哪些部分可以學?哪些部分不能被治理器任意改寫?學習後如何知道治理場仍然可信?

本文的答案是:

learn the governance observable, preserve the typed validity structure.\boxed{ \text{learn the governance observable, preserve the typed validity structure}. }

2. 狀態、物件與治理動作

沿用前三篇,令:

Mt=(Wt,Pt,Dt)\mathfrak M_t = (\mathcal W_t,\mathcal P_t,\mathcal D_t)

分別表示工作域、投影域與典範域。

對 canonical memory object OO,令其治理特徵為:

zτ(O)=(ϕτ(O),p(O),v(O),b(O),r(O),d(O),u(O),c(O)),z_\tau(O) = ( \phi_\tau(O), p(O), v(O), b(O), r(O), d(O), u(O), c(O) ),

其中:

  • ϕτ(O)\phi_\tau(O):PH-6 typed search phase;
  • p(O)p(O):persistence class;
  • v(O)v(O):version / supersession state;
  • b(O)b(O):branch state;
  • r(O)r(O):provenance / reliability state;
  • d(O)d(O):dependency state;
  • u(O)u(O):uncertainty features;
  • c(O)c(O):cost / context footprint。

治理動作集合記為:

AG={admit,retain,evict,defer,expand,recheck,archive,supersede}.\mathcal A_G = \{ \operatorname{admit}, \operatorname{retain}, \operatorname{evict}, \operatorname{defer}, \operatorname{expand}, \operatorname{recheck}, \operatorname{archive}, \operatorname{supersede} \}.

治理器由:

πθt(azτ(O))\pi_{\theta_t}(a\mid z_\tau(O))

決定動作分布,或由 scalar field:

Ψτ,t(O)\Psi_{\tau,t}(O)

配合閾值產生動作。


3. 不可學習掉的邊界

本文首先規定 governance learning 的 type boundary。

Paper 03 已定義:

χτ(O)=χidχverχbranchχprovχaccess.\chi_\tau(O) = \chi_{id} \chi_{ver} \chi_{branch} \chi_{prov} \chi_{access}.

χτ\chi_\tau 是 hard validity gate。

本文定義:

Ψτ,t(O)={Gθt(zτ(O)),χτ(O)=1,,χτ(O)=0.\Psi_{\tau,t}(O) = \begin{cases} G_{\theta_t}(z_\tau(O)), & \chi_\tau(O)=1,\\ -\infty, & \chi_\tau(O)=0. \end{cases}

其中 θt\theta_t 可以學習,但:

χτ\chi_\tau

不得因為單純 gradient、bandit reward 或 LLM preference 而被靜默改寫。

若系統希望更新 χτ\chi_\tau 的規則,必須進入另一個顯式 meta-governance procedure,並記錄:

  • rule version;
  • provenance;
  • validation;
  • migration;
  • affected canonical objects。

因此:

policy learningvalidity-schema mutation.\boxed{ \text{policy learning} \neq \text{validity-schema mutation}. }

4. 定理一:Hard-Gate Learning Invariance

定理 1

若:

χτ(O)=0,\chi_\tau(O)=0,

且所有可學習更新只作用於有限值函數:

Gθt,G_{\theta_t},

則對任意有限參數序列:

θ0,θ1,,θn,\theta_0,\theta_1,\ldots,\theta_n,

皆有:

Ψτ,t(O)=\Psi_{\tau,t}(O)=-\infty

並因此:

OEt(τ)O\notin\mathcal E_t^{(\tau)}

對所有 tnt\leq n 成立。

證明

依定義, χτ(O)=0\chi_\tau(O)=0Ψτ,t(O)\Psi_{\tau,t}(O) 不取 GθtG_{\theta_t} 的輸出,而直接映射為 -\infty。因此 θt\theta_t 的任何有限變化均無法改變此結果。

故 learned score 無法跨越 hard validity boundary。證畢。

意義

這個結構把「模型學會了更偏好某筆記憶」與「該記憶是否合法」分離。

因此:

preference cannot legalize invalid memory.\boxed{ \text{preference cannot legalize invalid memory}. }

5. 從治理分數到 admission confidence

治理分數本身不必是機率。

若需要 probability-like quantity,可以定義 calibration map:

Ct:R[0,1]C_t:\mathbb R\to[0,1]

並令:

pτ,t(O)=Ct(Ψτ,t(O)).p_{\tau,t}(O) = C_t(\Psi_{\tau,t}(O)).

pτ,t(O)p_{\tau,t}(O) 的語義不是:

P(memory is universally true),P(\text{memory is universally true}),

而是:

P(admission is beneficial under the declared evaluation criterionzτ(O)).P( \text{admission is beneficial under the declared evaluation criterion} \mid z_\tau(O) ).

因此必須保留:

admission confidencetruth probability.\boxed{ \text{admission confidence} \neq \text{truth probability}. }

不同任務可以使用不同 calibration target。

例如:

  • question answering:是否提高 evidence-correct answer;
  • coding agent:是否降低 task failure;
  • scientific agent:是否提升 evidence coherence;
  • personal assistant:是否符合最新有效 state;
  • context cleaner:是否降低 context cost 且不損失必要資訊。

6. 校準

令治理器對第 ii 個 admission decision 給出:

pi[0,1],p_i\in[0,1],

事後觀察 outcome:

yi{0,1}.y_i\in\{0,1\}.

理想 calibration 滿足:

P(y=1p=q)=q.P(y=1\mid p=q)=q.

在離散 bins BkB_k 下,可以定義:

GCE=kBkNacc(Bk)conf(Bk),\operatorname{GCE} = \sum_k \frac{|B_k|}{N} \left| \operatorname{acc}(B_k) - \operatorname{conf}(B_k) \right|,

其中 GCE 表示 Governance Calibration Error。

亦可使用 Brier-style loss:

GBS=1Ni=1N(piyi)2.\operatorname{GBS} = \frac{1}{N} \sum_{i=1}^{N} (p_i-y_i)^2.

但這裡 yiy_i 的取得方式是整個問題的關鍵。


7. 治理結果不能只靠單一終局 reward

一個 memory admission 決策可能:

  1. 當下看起來合理;
  2. 幾步後造成錯誤推理;
  3. 最終任務仍因其他路徑成功;
  4. 因而得到正 reward。

反之,一個正確 recall 也可能因下游非記憶錯誤導致整體任務失敗。

因此若只使用 terminal reward:

RT,R_T,

memory decision 的 credit assignment 會非常弱。

VerMem 的 local/global verifier 結構正好說明了這一點:local verifier 可以檢查 individual memory transition 是否可執行/合理,global verifier 則檢查整體 evidence coherence 與 terminal-memory consistency。[3]

TDCD 因此定義 feedback vector:

ft=(ftlocal,ftglobal,ftsource,fttask,ftcounterfactual,ftconstraint).f_t = ( f_t^{local}, f_t^{global}, f_t^{source}, f_t^{task}, f_t^{counterfactual}, f_t^{constraint} ).

而非單一:

ft=RT.f_t=R_T.

8. Local verifier

對治理 transition:

StatSt+1,S_t \xrightarrow{a_t} S_{t+1},

定義 local verifier:

VL(St,at,St+1)[0,1].V_L(S_t,a_t,S_{t+1}) \in[0,1].

它可以檢查:

  • canonical address 是否存在;
  • version head 是否正確;
  • branch gate 是否被違反;
  • dependency 是否缺失;
  • exact expansion 是否通過 digest;
  • context budget 是否滿足;
  • eviction 是否仍可恢復。

因此 local verifier 優先檢查:

transition legality and local coherence.\boxed{ \text{transition legality and local coherence}. }

它不必知道完整最終任務是否成功。


9. Global verifier

定義:

VG(τ0:T,MT)[0,1].V_G(\tau_{0:T},\mathfrak M_T) \in[0,1].

其對象可以包括:

  • 最終答案是否受到有效證據支持;
  • 是否錯用 stale memory;
  • 是否遺失必要長期資訊;
  • terminal canonical state 是否自洽;
  • 工作域在任務過程中是否反覆 thrash;
  • 是否發生 branch contamination。

所以:

VLVG.\boxed{ V_L\neq V_G. }

一個操作可以 locally valid,但 globally suboptimal。


10. 治理學習目標

定義單步 loss:

t=λLL+λGG+λCcost+λSstale+λBbranch+λTthrash+λMmiss.\ell_t = \lambda_L\ell_L + \lambda_G\ell_G + \lambda_C\ell_{cost} + \lambda_S\ell_{stale} + \lambda_B\ell_{branch} + \lambda_T\ell_{thrash} + \lambda_M\ell_{miss}.

其中:

  • L\ell_L:local transition loss;
  • G\ell_G:global task/evidence loss;
  • cost\ell_{cost}:token / latency / compute cost;
  • stale\ell_{stale}:stale activation;
  • branch\ell_{branch}:branch leakage;
  • thrash\ell_{thrash}:上下文震盪;
  • miss\ell_{miss}:false eviction / necessary-memory miss。

累積治理風險:

RT(θ)=t=1Tt(θ).\mathcal R_T(\theta) = \sum_{t=1}^{T}\ell_t(\theta).

治理器希望最小化:

θ=argminθE[RT(θ)].\theta^* = \arg\min_\theta \mathbb E[\mathcal R_T(\theta)].

11. 可學習治理器的三種層級

本文不指定唯一 learner。

11.1 Level G1:可解釋加權場

Ψτ,t(O)=wtzτ(O).\Psi_{\tau,t}(O) = w_t^\top z_\tau(O).

優點是:

  • audit 容易;
  • feature contribution 可觀測;
  • 漂移後可局部調整。

11.2 Level G2:Contextual bandit

動作:

atAGa_t\in\mathcal A_G

回饋為:

rt(at,zt).r_t(a_t,z_t).

MemCon 已顯示 lightweight contextual-bandit-style control 可以快速適應不同記憶操作需求。[1]

11.3 Level G3:Policy learner

πθt(atSt)\pi_{\theta_t}(a_t\mid S_t)

可以透過 RL 或 imitation / verifier-guided training 學習多步 memory policy。

AgeMem 與 VerMem 屬於此方向的重要近期實例。[2,3]

TDCD 的約束不是 learner 類型,而是:

learner must remain inside typed governance boundaries.\boxed{ \text{learner must remain inside typed governance boundaries}. }

12. 不確定性與 Abstention

治理器不應被迫對所有候選做 binary admit/evict。

定義 uncertainty:

Uτ,t(O)0.U_{\tau,t}(O)\geq0.

當:

Uτ,t(O)utU_{\tau,t}(O)\geq u_t^*

時,治理器可以輸出:

at(O)=defera_t(O)=\operatorname{defer}

或:

at(O)=recheck.a_t(O)=\operatorname{recheck}.

此時系統可進一步執行:

  • exact source expansion;
  • larger-context comparison;
  • second retriever;
  • external verifier;
  • human escalation;
  • version graph traversal。

因此:

uncertainty may trigger more evidence instead of a forced decision.\boxed{ \text{uncertainty may trigger more evidence instead of a forced decision}. }

13. Calibration-gated influence

Ψ\Psi 本身來自 LLM judge 或 learned predictor,系統可以讓其影響力取決於近期 calibration。

令:

ete_t

為 calibration error 的指數移動平均:

et=(1α)et1+αptyt.e_t = (1-\alpha)e_{t-1} + \alpha |p_t-y_t|.

定義可信權重:

ωt=g(et),\omega_t = g(e_t),

其中:

g(e)0.g'(e)\leq0.

則 learned predictor 的實際 contribution 可以寫成:

Ψt=Ψtrule+ωtΨtlearned.\Psi_t = \Psi_t^{rule} + \omega_t\Psi_t^{learned}.

2026 年 contextual-bandit 研究已有 calibration-gated LLM pseudo-observation 的相關例子:當 LLM 近期預測誤差變大時,其 counterfactual signal 被降低權重。[4]

本文將這個思想轉用於 governance:模型越不校準,越不應主導記憶升降級。


14. 非平穩性

長程 agent 的治理環境不是 stationary。

令:

Pt(z,y)P_t(z,y)

為時間 tt 的治理資料分布。

一般可能存在:

PtPt+Δ.P_t\neq P_{t+\Delta}.

漂移來源包括:

  • 使用者偏好改變;
  • 專案 branch 切換;
  • 新版本 canonical knowledge;
  • 新工具加入;
  • Agent 能力更新;
  • 任務類型改變;
  • 長期資料結構改變。

因此一個曾經校準良好的:

CtGθtC_t\circ G_{\theta_t}

在未來不保證仍然校準。


15. 漂移量

定義 drift score:

Dt=D(P^tw:t,P^t2w:tw).D_t = D( \widehat P_{t-w:t}, \widehat P_{t-2w:t-w} ).

DD 可以是:

  • feature distribution shift;
  • calibration residual shift;
  • reward shift;
  • stale activation increase;
  • verifier disagreement increase;
  • action-frequency shift。

若:

Dt>δD,D_t>\delta_D,

則進入 drift state:

Driftt=1.\mathsf{Drift}_t=1.

但本文不要求特定統計距離,因為不同 runtime 的可觀測量不同。


16. 漂移後不應立刻清空全部治理歷史

最粗糙的 response 是:

θtθ0.\theta_t\leftarrow\theta_0.

但如果漂移只是局部 branch 或某一類版本更新,全面 reset 會丟失大量有效學習。

因此治理器應區分:

DriftType{abrupt,smooth,branch-local,feature-local,global}.\mathsf{DriftType} \in \{ \text{abrupt}, \text{smooth}, \text{branch-local}, \text{feature-local}, \text{global} \}.

相應操作可以是:

Reweight,Recalibrate,PartialReset,FullReset.\operatorname{Reweight}, \operatorname{Recalibrate}, \operatorname{PartialReset}, \operatorname{FullReset}.

線上 conformal calibration 對 unknown distribution drift 的研究顯示,change-point detection 與 adaptive calibration-set update 可以在 abrupt shift 與 smooth drift 下提供理論化處理方式。[5]

TDCD 不把 conformal prediction 等同於 memory governance,但可借用其「漂移後重新校準,而不是假設舊 coverage 永遠有效」的原則。


17. 動態遲滯

Paper 02 定義:

θin>θout\theta_{in}>\theta_{out}

以抑制 context thrashing。

Paper 04 允許閾值也隨時間學習:

θin,t,θout,t.\theta_{in,t}, \theta_{out,t}.

但必須維持:

ht=θin,tθout,t>0.h_t = \theta_{in,t}-\theta_{out,t} > 0.

hth_t 可以依據:

  • calibration uncertainty;
  • retrieval cost;
  • context pressure;
  • drift state;
  • task criticality

動態變化。

例如高不確定性時可以擴大:

ht.h_t.

這使治理器更不容易在臨界點反覆切換。


18. 定理二:Learned Hysteresis Stability

假設在固定 object OO 上,治理分數對參數為 LL -Lipschitz:

Gθt+1(z)Gθt(z)Lθt+1θt.| G_{\theta_{t+1}}(z) - G_{\theta_t}(z) | \leq L\|\theta_{t+1}-\theta_t\|.

若:

Lθt+1θt+ΔzGt<ht,L\|\theta_{t+1}-\theta_t\| + |\Delta_z G_t| < h_t,

其中 ΔzGt\Delta_zG_t 表示由特徵本身變化造成的單步 score shift,則單步更新不能使同一物件完成一次完整:

admitevict\operatorname{admit} \rightarrow \operatorname{evict}

或:

evictadmit\operatorname{evict} \rightarrow \operatorname{admit}

的雙閾值往返。

證明

完成 admission 到 eviction 的單步往返至少需要分數跨越:

θin,tθout,t=ht.\theta_{in,t}-\theta_{out,t}=h_t.

依 Lipschitz bound 與 feature shift bound,單步總分數變化小於 hth_t,因此不可能跨越完整 hysteresis band。反向同理。證畢。

意義

Paper 02 的 anti-thrashing 條件現在被提升為:

parameter learning speed+environmental score drift<hysteresis margin.\boxed{ \text{parameter learning speed} + \text{environmental score drift} < \text{hysteresis margin}. }

19. STALE 問題:更新證據存在不代表舊狀態失效已被理解

STALE benchmark 特別測量 implicit conflict:後來觀察可能沒有直接說「舊資訊錯了」,卻已使舊狀態失效。其評估顯示,模型可能成功找到新證據,卻仍接受 query 中隱含的 stale premise。[6]

因此治理場不能只學:

retrieve newer item.\text{retrieve newer item}.

還必須學:

invalidate consequences of the older state.\text{invalidate consequences of the older state}.

令:

OoldvOnew.O_{old}\prec_v O_{new}.

如果 OoldO_{old} 支持下游記憶:

OoldD1,D2,,Dk,O_{old}\to D_1,D_2,\ldots,D_k,

則 supersession 可能需要 propagation operator:

Uv(OoldOnew)\mathcal U_v(O_{old}\to O_{new})

更新:

{Di}.\{D_i\}.

否則系統只更新單一 fact,卻留下其舊推論殘骸。


20. Invalidation propagation

定義 dependency graph:

GD=(VD,ED).\mathcal G_D=(V_D,E_D).

若:

OiOjO_i\to O_j

表示 OjO_j 的有效性依賴 OiO_i,則當:

Valid(Oi):10\operatorname{Valid}(O_i):1\to0

時,不能自動假設:

Valid(Oj)=1.\operatorname{Valid}(O_j)=1.

定義 invalidation frontier:

F(Oi)={Oj:OiOj}.F^{-}(O_i) = \{ O_j: O_i\leadsto O_j \}.

治理器應對 F(Oi)F^{-}(O_i) 執行:

recheck.\operatorname{recheck}.

這不表示全部 downstream memory 都必須刪除,而是:

upstream invalidation creates downstream review obligations.\boxed{ \text{upstream invalidation creates downstream review obligations}. }

21. 自我推翻條件

長程 governor 的核心能力不是永遠做對第一次決策,而是能在新證據到來後撤回自己。

令先前決策為:

at(O)=admit.a_t(O)=\operatorname{admit}.

在時間 t+kt+k,若出現以下任一條件:

χτt+k(O)=0,\chi_{\tau_{t+k}}(O)=0,

或:

pτ,t+k(O)<θout,t+k,p_{\tau,t+k}(O)<\theta_{out,t+k},

或:

VL(O)<vL,V_L(O)<v_L^*,

或:

Conflict(O,Enew)=1,\operatorname{Conflict}(O,E_{new})=1,

則觸發:

Overturn(O).\operatorname{Overturn}(O).

其動作至少包含:

  1. 從 active context 移出;
  2. 保留 canonical history;
  3. 記錄 overturn reason;
  4. 重新檢查依賴;
  5. 更新 calibration record。

因此:

self-correction is a state transition, not a narrative apology.\boxed{ \text{self-correction is a state transition, not a narrative apology}. }

22. Self-Overturn Completeness Principle

本文提出一個設計原則。

若 governance system 存在:

admit\operatorname{admit}

但不存在與之對偶的:

overturn\operatorname{overturn}

或:

revalidate,\operatorname{revalidate},

則它不是完整的動態治理器。

因為任意非平穩環境中都可能存在:

PtPt+k,P_t\neq P_{t+k},

從而使:

at(O)at+k(O).a_t^*(O)\neq a_{t+k}^*(O).

因此:

dynamic admission requires dynamic revocation.\boxed{ \text{dynamic admission requires dynamic revocation}. }

23. 自我確認迴圈

考慮最危險的訓練方式:

  1. governor 決定 admit OO
  2. 模型只看到被 admit 的 OO
  3. 模型根據 OO 產生答案;
  4. governor 再用同一模型判斷「這個記憶是否有幫助」。

這可能形成:

atvisible evidencemodel outputytat+1.a_t \to \text{visible evidence} \to \text{model output} \to y_t \to a_{t+1}.

如果 yty_t 完全由這條閉環內部生成,就可能形成 self-confirming bias。


24. 命題三:Pure Self-Feedback Non-Identifiability

命題 3

若治理 feedback YY 完全是 policy action AA 與其造成的可見 context W(A)W(A) 的函數:

Y=f(A,W(A)),Y=f(A,W(A)),

且系統從未觀察 counterfactual:

Y(a),aA,Y(a'),\quad a'\neq A,

也沒有外部 verifier / task signal,則一般無法由觀察資料唯一識別:

AA

是否比未採取的治理動作更優。

證明構想

對同一觀察 trajectory,可以構造兩個不同的 counterfactual reward functions,使已採取 action 的觀察結果相同,但未採取 action 的效用排序相反。

因此 observational self-feedback 不足以識別最優 governance action。

證畢。

結論

治理學習至少需要其中之一:

  • exogenous task outcome;
  • local executable verifier;
  • canonical source consistency;
  • randomized exploration;
  • counterfactual replay;
  • human / external feedback。

25. Counterfactual Recall Audit

為估計 false eviction,系統不能永遠只檢查被留下的記憶。

定義 audit probability:

ϵt>0.\epsilon_t>0.

對一小部分被 eviction 的物件:

OWt,O\notin\mathcal W_t,

系統執行 shadow recall:

OexpandO~O\xrightarrow{\operatorname{expand}}\widetilde O

但不一定暴露給主推理流程。

然後比較:

ΔUt(O)=Ut(Wt{O})Ut(Wt).\Delta U_t(O) = U_t(\mathcal W_t\cup\{O\}) - U_t(\mathcal W_t).

若大量被 evict 的 OO 滿足:

ΔUt(O)>0,\Delta U_t(O)>0,

表示 governor 存在 systematic false-negative bias。

這提供:

audit the memories you chose not to remember.\boxed{ \text{audit the memories you chose not to remember}. }

的機制。


26. Exploration 與治理成本

counterfactual audit 有成本。

令:

Caudit(O)C_{audit}(O)

為額外 expand / evaluate cost。

最佳 audit policy 需要在:

information gain\text{information gain}

與:

runtime cost\text{runtime cost}

之間平衡。

可以定義:

VOI(O)=E[governance improvement from audit]Caudit(O).VOI(O) = \frac{ \mathbb E[\text{governance improvement from audit}] }{ C_{audit}(O) }.

只在:

VOI(O)θVOIVOI(O)\geq\theta_{VOI}

時執行 expensive audit。

因此 governance learning 不應退化成「每一步都重跑全部歷史」。


27. 校準集本身也會過期

令 calibration buffer 為:

Btcal.\mathcal B_t^{cal}.

如果環境漂移後仍使用大量舊 calibration examples,則:

CtC_t

可能看似在舊資料上準確,卻對現在失效。

因此應根據:

  • persistence;
  • branch;
  • drift regime;
  • task family

建立 conditional calibration buffer:

Btcal(ρ),\mathcal B_t^{cal}(\rho),

其中 ρ\rho 表示 regime。

漂移發生時可以:

BtcalReweight(Btcal).\mathcal B_t^{cal} \rightarrow \operatorname{Reweight} ( \mathcal B_t^{cal} ).

而不是單純 FIFO 丟棄所有舊資料。

這與 TDCD 的基本精神一致:

oldinvalid.\boxed{ \text{old} \neq \text{invalid}. }

28. Governance regime

定義治理 regime:

ρt=(Tt,bt,δt,ct,rt),\rho_t = ( T_t, b_t, \delta_t, c_t, r_t ),

其中包括:

  • task family;
  • branch;
  • drift state;
  • context-pressure class;
  • risk class。

則治理場應寫成:

Ψτ,t(Oρt).\Psi_{\tau,t}(O\mid\rho_t).

這比單一全域 score 更合理。

不同 regime 可以共享底層特徵,但使用不同:

  • calibration map;
  • thresholds;
  • cost weights;
  • uncertainty policy;
  • audit frequency。

29. 關鍵記憶的非對稱損失

false admission 與 false eviction 不一定同價。

對普通背景資訊:

CFACFEC_{FA}\approx C_{FE}

或可近似成立。

但對:

  • 安全限制;
  • canonical theorem;
  • 使用者明確禁止事項;
  • 當前版本 head;
  • 不可逆任務前提

可能:

CFECFAC_{FE}\gg C_{FA}

或反之。

因此 decision threshold 應來自 cost-sensitive risk:

at=argminaAGE[L(a,Y)zt].a_t^* = \arg\min_{a\in\mathcal A_G} \mathbb E[ L(a,Y)\mid z_t ].

這使不同 persistence / risk class 擁有不同治理策略。


30. Safety-critical memory floor

對某些 class:

p(O)=Pcritical,p(O)=P_{critical},

可以設定 minimum retention floor:

θcritical.\theta_{critical}.

即使:

Ψt(O)\Psi_t(O)

暫時低於普通 admission threshold,也不直接 eviction,而先轉為:

recheck.\operatorname{recheck}.

因此:

low current relevance need not imply immediate eviction for high-cost memories.\boxed{ \text{low current relevance need not imply immediate eviction for high-cost memories}. }

這是 persistence 與 risk asymmetric coupling 的實例。


31. 治理場更新

一個最小 online update 可以寫成:

θt+1=ΠΘ[θtηtθt],\theta_{t+1} = \Pi_{\Theta} \left[ \theta_t - \eta_t \nabla_\theta\ell_t \right],

其中 ΠΘ\Pi_\Theta 是 admissible parameter projection。

如果治理器是 contextual bandit,則可用 bandit update;如果是 RL policy,則可用 policy optimization;如果是規則系統,則可以 Bayesian / frequency update。

本文唯一要求:

every update has provenance and can be rolled back.\boxed{ \text{every update has provenance and can be rolled back}. }

因此治理模型本身也需要 version:

θ(0)θ(1)\theta^{(0)} \prec \theta^{(1)} \prec \cdots

並存入典範域。


32. Governor checkpoint

定義治理 checkpoint:

Γt=(θt,Ct,θin,t,θout,t,Btcal,ρt,Mt),\Gamma_t = ( \theta_t, C_t, \theta_{in,t}, \theta_{out,t}, \mathcal B_t^{cal}, \rho_t, M_t ),

其中 MtM_t 保存 metrics。

每個 checkpoint 應具有:

aD(Γt)a_D(\Gamma_t)

與 digest。

因此如果新版 governor 造成:

SAR,CTR,ACR,SAR\uparrow, \quad CTR\uparrow, \quad ACR\downarrow,

系統可以 rollback:

Γt+1Γt.\Gamma_{t+1} \rightarrow \Gamma_t.

這把「AI 改進自己的記憶策略」從不可逆行為改成可審計版本更新。


33. 治理場不是單一 Agent 的私有黑箱

若多 Agent 共享 canonical domain,則:

Dshared\mathcal D^{shared}

可以共用,但:

Ψτ,t(A)Ψτ,t(B)\Psi_{\tau,t}^{(A)} \neq \Psi_{\tau,t}^{(B)}

完全可能成立。

因為不同 Agent 具有不同:

  • task;
  • local context;
  • capability;
  • role;
  • risk profile。

因此:

shared canonical memory⇏shared active context.\boxed{ \text{shared canonical memory} \not\Rightarrow \text{shared active context}. }

而共享的應是:

  • identity;
  • provenance;
  • canonical bytes;
  • version lineage;

不是每個 Agent 當下的 admission score。


34. 治理器之間的 disagreement

多治理器可以產生:

Ψt(1)(O),,Ψt(n)(O).\Psi_t^{(1)}(O), \ldots, \Psi_t^{(n)}(O).

定義 disagreement:

DG(O)=Var(Ψt(1)(O),,Ψt(n)(O)).D_G(O) = \operatorname{Var} \left( \Psi_t^{(1)}(O), \ldots, \Psi_t^{(n)}(O) \right).

若:

DG(O)0,D_G(O)\gg0,

則不應直接平均為一個看似確定的分數,而可觸發:

recheck\operatorname{recheck}

或:

expand.\operatorname{expand}.

這使多 Agent 不只是 majority vote,而成為 uncertainty sensor。


35. Drift-aware self-overturn loop

將以上機制合併:

ObserveScoreCalibrateAdmit/Evict/DeferVerifyDetect DriftRecalibrateOverturn if necessary.\boxed{ \text{Observe} \rightarrow \text{Score} \rightarrow \text{Calibrate} \rightarrow \text{Admit/Evict/Defer} \rightarrow \text{Verify} \rightarrow \text{Detect Drift} \rightarrow \text{Recalibrate} \rightarrow \text{Overturn if necessary}. }

這是一個真正的閉環。

不是:

RetrieveAnswerStore More.\text{Retrieve} \rightarrow \text{Answer} \rightarrow \text{Store More}.

36. 評估指標

沿用前三篇,再新增:

36.1 Governance Calibration Error

GCE=kBkNacc(Bk)conf(Bk).GCE = \sum_k \frac{|B_k|}{N} | \operatorname{acc}(B_k) - \operatorname{conf}(B_k) |.

36.2 False Admission Rate

FARG=Nharmful admittedNadmitted.FAR_G = \frac{N_{\text{harmful admitted}}}{N_{\text{admitted}}}.

36.3 False Eviction Rate

FERG=Nnecessary evictedNevicted.FER_G = \frac{N_{\text{necessary evicted}}}{N_{\text{evicted}}}.

36.4 Overturn Latency

若 invalidity 在 t0t_0 首次可判定,而 governor 在 t1t_1 撤回:

OL=t1t0.OL=t_1-t_0.

36.5 Drift Recovery Time

DRT=min{Δ:Mt+ΔMtarget}.DRT = \min \{ \Delta: M_{t+\Delta}\geq M_{target} \}.

36.6 Abstention Utility

AU=Δerror reductionλΔcost.AU = \Delta\text{error reduction} - \lambda \Delta\text{cost}.

36.7 Counterfactual Audit Yield

CAY=Naudits discovering false evictionNaudits.CAY = \frac{ N_{\text{audits discovering false eviction}} }{ N_{\text{audits}} }.

36.8 Governance Regret

RegT=t=1T[L(at,Yt)L(at,Yt)].Reg_T = \sum_{t=1}^{T} \left[ L(a_t,Y_t) - L(a_t^*,Y_t) \right].

37. Benchmark protocol

本文提出八類基準場景。

B1:Stationary Memory

測量基本 calibration 與 cost。

B2:Abrupt Supersession

在中途突然更新 canonical fact,測:

OL, SAR, DRT.OL,\ SAR,\ DRT.

B3:Implicit Invalidation

新證據不直接否定舊 fact,測 STALE-style premise resistance。

B4:Smooth Drift

使用者或任務偏好逐步變化,測 calibration drift。

B5:Branch Fork

兩個 branch 同時維持不同有效 state,測:

BLR.BLR.

B6:Rare Persistent Recall

很久以前但持續有效的 method 突然再次重要,測 recency bias。

B7:Poisoned High-Similarity Memory

提供高度語義相似但 provenance 不合法的記憶,測 hard gate。

B8:False-Eviction Audit

刻意建立容易被 governor 過度清理的記憶,測 counterfactual audit。


38. Ablation matrix

完整模型:

Mfull={Θ,χ,Ψ,C,U,H,D,VL,VG,Acf},M_{full} = \{ \Theta, \chi, \Psi, C, U, H, D, V_L, V_G, A_{cf} \},

其中:

  • Θ\Theta:typed phase;
  • χ\chi:hard gate;
  • Ψ\Psi:learned governance field;
  • CC:calibration;
  • UU:uncertainty / abstention;
  • HH:hysteresis;
  • DD:drift handling;
  • VL,VGV_L,V_G:verifiers;
  • AcfA_{cf}:counterfactual audit。

至少比較:

Mscore={Ψ},M_{score} = \{\Psi\}, Mgate={χ,Ψ},M_{gate} = \{\chi,\Psi\}, Mcal={χ,Ψ,C},M_{cal} = \{\chi,\Psi,C\}, Mstable={χ,Ψ,C,H},M_{stable} = \{\chi,\Psi,C,H\}, Madaptive={χ,Ψ,C,H,D,VL,VG},M_{adaptive} = \{\chi,\Psi,C,H,D,V_L,V_G\},

以及完整:

Mfull.M_{full}.

如果新增模組不能在相應 failure mode 上產生可測增益,就不應保留為理論裝飾。


39. Governance Frontier

治理器同時最佳化:

J=(Utask,ACP,ACR,1SAR,1BLR,RF,1GCE,1CTR,Cost).\mathbf J = ( U_{task}, ACP, ACR, 1-SAR, 1-BLR, RF, 1-GCE, 1-CTR, -Cost ).

一般不存在單一模型最大化所有維度。

因此研究目標是:

FDGF=Pareto(J).\mathcal F_{DGF} = \operatorname{Pareto}(\mathbf J).

不同 runtime 可以選擇不同 operating point。

例如 scientific agent 可以提高:

RF, provenance, abstentionRF,\ provenance,\ abstention

而 conversational agent 可以更重視:

latency, contextcost.latency,\ context cost.

40. 與 VerMem 的差異

VerMem 已經非常接近「統一治理 active context 與長期記憶」的工程研究方向,並且顯式使用 local/global verifiers。[3]

TDCD/DGF 不主張這個統一控制概念本身為新。

本文的不同焦點是:

  1. 典範域與投影域在本體上分離;
  2. exact canonical restoration 是獨立不變量;
  3. PH-6 typed phase 與 scalar governance score 分離;
  4. hard validity gate 不允許被普通 policy learning 吞掉;
  5. governance calibration 被獨立量測;
  6. drift 與 self-overturn 被列為一級操作;
  7. counterfactual audit 用來估計被清除資訊的隱性價值。

因此:

DGF is a governance theory layer, not a claim to replace a specific memory-learning algorithm.\boxed{ \text{DGF is a governance theory layer, not a claim to replace a specific memory-learning algorithm}. }

41. 與 STALE 的關係

STALE 顯示重要 failure:

updated evidence retrieved⇏stale premise rejected.\text{updated evidence retrieved} \not\Rightarrow \text{stale premise rejected}.

TDCD 對此提出的理論回應是:

supersessioninvalidation propagationrecheckself-overturn.\boxed{ \text{supersession} \rightarrow \text{invalidation propagation} \rightarrow \text{recheck} \rightarrow \text{self-overturn}. }

這把「更新某一筆記憶」提升為:

update the validity structure induced by that memory.\text{update the validity structure induced by that memory}.

42. 核心命題總結

本文得到以下七個核心結論。

第一:

learned governance must not silently mutate canonical validity.\boxed{ \text{learned governance must not silently mutate canonical validity}. }

第二:

admission confidence is not truth probability.\boxed{ \text{admission confidence is not truth probability}. }

第三:

governance calibration is regime-dependent and can drift.\boxed{ \text{governance calibration is regime-dependent and can drift}. }

第四:

dynamic admission requires dynamic revocation.\boxed{ \text{dynamic admission requires dynamic revocation}. }

第五:

pure self-feedback cannot generally identify the best governance policy.\boxed{ \text{pure self-feedback cannot generally identify the best governance policy}. }

第六:

hysteresis must dominate single-step learning and environmental score drift to suppress thrashing.\boxed{ \text{hysteresis must dominate single-step learning and environmental score drift to suppress thrashing}. }

第七:

a system must occasionally audit what it chose to forget.\boxed{ \text{a system must occasionally audit what it chose to forget}. }

43. TDCD 的四篇整合

至此 Series I 前四篇可以形成:

Paper 01

WPD\boxed{ \mathcal W \leftrightarrow \mathcal P \leftrightarrow \mathcal D }

回答:

記憶應存在於哪些域?

Paper 02

G:retain / evict / recall / supersede / branch\boxed{ \mathcal G: \text{retain / evict / recall / supersede / branch} }

回答:

當下上下文如何被治理?

Paper 03

identitycandidatephaseΨexact expand\boxed{ \text{identity} \to \text{candidate} \to \text{phase} \to \Psi \to \text{exact expand} }

回答:

一筆歷史如何重新取得進入現在的資格?

Paper 04

Ψtcalibrateverifydriftoverturn\boxed{ \Psi_t \to \text{calibrate} \to \text{verify} \to \text{drift} \to \text{overturn} }

回答:

決定「什麼屬於現在」的判準本身如何改變?

四篇合併得到:

Store the past exactly;\boxed{ \text{Store the past exactly;} } project it cheaply;\boxed{ \text{project it cheaply;} } govern the present selectively;\boxed{ \text{govern the present selectively;} } and continuously revise the governor.\boxed{ \text{and continuously revise the governor}. }

44. 結論

如果一個長程記憶系統只能增加記憶,它會膨脹。

如果它只能壓縮記憶,它會逐步丟失細節。

如果它只能檢索記憶,它會被 stale、branch 與 provenance 問題污染。

如果它能治理記憶但不能校準自己,它會把歷史偏差固化成 policy。

如果它能學習但不能推翻自己的舊決策,它仍不是動態記憶系統。

因此完整的上下文治理至少需要:

typed validity+learned appropriateness+calibration+uncertainty+drift adaptation+self-overturn+canonical recoverability.\boxed{ \text{typed validity} + \text{learned appropriateness} + \text{calibration} + \text{uncertainty} + \text{drift adaptation} + \text{self-overturn} + \text{canonical recoverability}. }

最終,TDCD 不把理想記憶描述成「永遠記住更多」,而是描述成一個持續重新形成現在的動態系統:

DtPtWtDt+1,\boxed{ \mathcal D_t \rightarrow \mathcal P_t \rightarrow \mathcal W_t \rightarrow \mathcal D_{t+1}, }

其治理器本身亦沿時間演化:

ΓtΓt+1.\boxed{ \Gamma_t \rightarrow \Gamma_{t+1}. }

因此真正的 Autonomous Context Runtime 不只是會問:

我應該想起什麼?

它還必須能問:

我為什麼認為這件事現在重要?

這個判斷最近還準嗎?

世界是不是已經變了?

我是否清掉了其實應該留下的東西?

我先前認為正確的治理決策,現在是否應被撤回?

本文因此以以下命題作結:

A memory system becomes adaptive not when it can remember its past,\boxed{ \text{A memory system becomes adaptive not when it can remember its past,} } but when it can revise the rule by which the past becomes present.\boxed{ \text{but when it can revise the rule by which the past becomes present.} }

參考文獻

[1] Jiang, E. H., Zhang, Z., Wu, Y., et al. (2026). Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents. arXiv:2607.13591.

[2] Yu, Y., Yao, L., Xie, Y., et al. (2026). Agentic Memory: Learning Unified Long-Term and Short-Term Memory Management for Large Language Model Agents. arXiv:2601.01885.

[3] Sun, X., Wang, Q., Li, H., & Chen, L. (2026). Verifiable Memory: Learning Unified Memory Management with Local and Global Verifiers for Large Language Model Agents. arXiv:2608.03137.

[4] Pershin, M., Golovanov, I., Baltabaev, P., & Trankova, N. (2026). Calibration-Gated LLM Pseudo-Observations for Online Contextual Bandits. arXiv:2604.14961.

[5] Liang, J., Ren, Z., & Chen, Y. (2026). Optimal training-conditional regret for online conformal prediction. arXiv:2602.16537.

[6] Chao, H., Bai, Y., Sheng, R., Li, T., & Sun, Y. (2026). STALE: Can LLM Agents Know When Their Memories Are No Longer Valid? arXiv:2605.06527.

[7] Wu, B., Ding, Z., Huang, J., & Zhao, Y. (2026). Forget to Improve: On-Device LLM-Agent Continual Learning via Budget-Curated Memory. arXiv:2606.25115.

[8] EveMissLab. (2026). Three-Domain Context Dynamics, Series I / Paper 01.

[9] EveMissLab. (2026). Context Governance Operator and Dynamic Working-Set Theory, Series I / Paper 02.

[10] EveMissLab. (2026). Semantic Candidate Addressing, Search Phase, and the Present-Appropriateness Field, Series I / Paper 03.

[11] EveMissLab. (2026). EveMissLab Phase Canon v1.2 — IPFC Integration Edition.


Canonical-source status

This Markdown file is the canonical UTF-8 source artifact for TDCD Series I / Paper 04 v0.1.

All mathematical source uses only the canonical delimiters $...$ and $$...$$.

No Unicode-math conversion is intended as source normalization.

The document preserves the Phase Canon distinction between identity, phase, task observable, and physical realization. It does not claim that embedding vectors are phase, that governance confidence is truth probability, that a learned memory policy is universally optimal, or that the theorems above constitute machine-verified formal proofs.

The formal results are theorem-style analytical statements under the assumptions explicitly stated in the text.