07.記憶編譯型母 AI
從 Episode、Skill 到 Compiled Cognitive Topology
《母 AI 與區域認知體:AI 中心動態認知系統》第七篇
作者:Neo.K × Aletheia 版本:v0.1 日期:2026-08-01 文件性質:公開命題論文/Mother AI Memory Compilation 架構研究
摘要
前六篇建立了 Mother AI 的持續認知核心、世界狀態機、可動態重構的 Sub-AI Fabric、二階控制、Persistent Runtime 與 Agent Lifecycle。這些機制讓 Mother AI 能在不同世界狀態下生成、組合、替換與回收不同子 AI。
但如果每一次世界事件仍然要求 Mother AI 從零判斷:
需要哪些 Agent;
使用哪個模型;
讀哪段記憶;
建立什麼拓撲;
分配多少預算;
採用哪條驗證路徑;
需要什麼權限;
那麼 Mother AI 依然會重複支付大量 Meta-Control 成本。
本文因此提出:
Memory-Compiled Mother AI \boxed{
\text{Memory-Compiled Mother AI}
} Memory-Compiled Mother AI
即「記憶編譯型母 AI」。
其核心不是單純保存過去的答案,而是將已完成的世界—認知—行動歷史:
τ i = ( W i , M i , S i , G i , A i , R i ) \tau_i
=
(
W_i,
M_i,
S_i,
G_i,
A_i,
R_i
) τ i = ( W i , M i , S i , G i , A i , R i )
持續壓縮為:
B i = ( c i , O i C , Θ i , V i , P i , w i , v i , t i ) \boxed{
B_i
=
(
c_i,
\mathcal O_i^C,
\Theta_i,
V_i,
P_i,
w_i,
v_i,
t_i
)
} B i = ( c i , O i C , Θ i , V i , P i , w i , v i , t i )
其中:
c i c_i c i :world-state class;
O i C \mathcal O_i^C O i C :Cognitive Option;
Θ i \Theta_i Θ i :適用條件;
V i V_i V i :驗證器;
P i P_i P i :provenance/evidence;
w i w_i w i :信心/效用權重;
v i v_i v i :版本;
t i t_i t i :時間與失效資訊。
Cognitive Option 不只是「做什麼」,而是:
O i C = ( A i , L i , M i v , G i C , B i , Γ i , V i , β i ) \mathcal O_i^C
=
(
\mathcal A_i,
\mathcal L_i,
\mathcal M_i^v,
G_i^C,
B_i,
\Gamma_i,
V_i,
\beta_i
) O i C = ( A i , L i , M i v , G i C , B i , Γ i , V i , β i )
即:
應喚起哪些 Agent;
各 Agent 使用什麼模型;
取得哪些記憶切片;
採用什麼認知拓撲;
使用多少算力/時間;
哪些權限有效;
經過哪些驗證;
何時終止或退出快速通道。
因此本文把記憶編譯重新定義為:
歷史計算 → 可重用的認知控制配置 \boxed{
\text{歷史計算}
\rightarrow
\text{可重用的認知控制配置}
} 歷史計算 → 可重用的認知控制配置
而非:
歷史對話 → 文字摘要 . \text{歷史對話}
\rightarrow
\text{文字摘要}. 歷史對話 → 文字摘要 .
2026 年 ProcMEM 已直接研究如何把 episodic interaction experience 轉成可重用 procedural skills,並用 activation、execution、termination 條件確保技能可執行;AFTER benchmark 亦顯示 procedural memory 在企業型任務中能跨任務、角色與模型帶來可量測的重用收益;MemCon 則把「何時取回、取多少、何時重取、何時 consolidation、何時 forget」本身建模為控制問題。更早的 Voyager 也已證明 executable skill library 可以累積、重用與組合複雜行為。
但本文同時採取比「持續總結一切」更保守的立場。2026 年研究已顯示,LLM 對 episodic traces 進行持續 consolidated-memory rewriting 可能產生失真,甚至讓原本有用的記憶隨更新而退化;原始 episodes 應保留為一級證據,而 consolidation 應有明確 gate。這與本文的基本原則一致:
Compiled Memory ≠ Ground Truth . \boxed{
\text{Compiled Memory}
\neq
\text{Ground Truth}.
} Compiled Memory = Ground Truth .
因此 Mother AI 的記憶系統必須同時保存:
M = M E ⊕ M S ⊕ M P ⊕ M T ⊕ M M \mathcal M
=
\mathcal M_E
\oplus
\mathcal M_S
\oplus
\mathcal M_P
\oplus
\mathcal M_T
\oplus
\mathcal M_M M = M E ⊕ M S ⊕ M P ⊕ M T ⊕ M M
分別表示 episodic、semantic、procedural、topological 與 meta-memory。
本文提出完整編譯流程:
Record → Validate → Segment → Deduplicate → Classify → Abstract → Compile → Shadow Test → Promote → Index \boxed{
\text{Record}
\rightarrow
\text{Validate}
\rightarrow
\text{Segment}
\rightarrow
\text{Deduplicate}
\rightarrow
\text{Classify}
\rightarrow
\text{Abstract}
\rightarrow
\text{Compile}
\rightarrow
\text{Shadow Test}
\rightarrow
\text{Promote}
\rightarrow
\text{Index}
} Record → Validate → Segment → Deduplicate → Classify → Abstract → Compile → Shadow Test → Promote → Index
並要求任何 compiled item 都可以:
decompile → revalidate → recompile . \boxed{
\text{decompile}
\rightarrow
\text{revalidate}
\rightarrow
\text{recompile}.
} decompile → revalidate → recompile .
本文最終將 Mother AI 的成熟智能重新表述為:
已知世界狀態 → 快速取回已編譯認知結構 \boxed{
\text{已知世界狀態}
\rightarrow
\text{快速取回已編譯認知結構}
} 已知世界狀態 → 快速取回已編譯認知結構
真正未知 → 重新生成與探索認知結構 \boxed{
\text{真正未知}
\rightarrow
\text{重新生成與探索認知結構}
} 真正未知 → 重新生成與探索認知結構
所以「已知則編譯,未知則展開」在 Mother AI 中不只控制答案生成,而控制整個認知生態如何被組織。
關鍵詞: Mother AI、Memory Compilation、Procedural Memory、Episodic Memory、Cognitive Option、Skill Library、Memory Consolidation、Meta-Memory、Agent Topology、Long-Term Agent Memory
一、Mother AI 仍然可能重複支付計算成本
假設世界出現:
W t . W_t. W t .
Mother AI 重新決定:
C t = ( A g e n t , M o d e l , M e m o r y , T o p o l o g y , B u d g e t , A u t h o r i t y , V e r i f i c a t i o n ) . \mathcal C_t
=
(
Agent,
Model,
Memory,
Topology,
Budget,
Authority,
Verification
). C t = ( A g e n t , M o d e l , M e m or y , T o p o l o g y , B u d g e t , A u t h or i t y , V er i f i c a t i o n ) .
即使以前遇過:
W t − k ∼ W t , W_{t-k}\sim W_t, W t − k ∼ W t ,
如果系統完全重新 meta-reasoning,
則:
K r e p e a t ≈ K f i r s t . K_{\mathrm{repeat}}
\approx
K_{\mathrm{first}}. K repeat ≈ K first .
這表示:
Persistent State ≠ Reusable Cognition . \boxed{
\text{Persistent State}
\neq
\text{Reusable Cognition}.
} Persistent State = Reusable Cognition .
二、真正需要編譯的是「如何思考」
普通記憶:
上次答案是 X。
Mother AI 記憶:
上次這種狀態需要 Research Agent+Legal Agent;先查兩個資料源,再由 Verifier 驗證;只有結果一致時才進入低權限執行。
因此真正可重用的是:
Cognitive Configuration . \boxed{
\text{Cognitive Configuration}.
} Cognitive Configuration .
三、認知軌跡
定義一次完整歷史:
τ i = ( W i , Z i M , S i , C i , A i , W i ′ , R i ) . \tau_i
=
(
W_i,
Z_i^M,
S_i,
\mathcal C_i,
A_i,
W_i',
R_i
). τ i = ( W i , Z i M , S i , C i , A i , W i ′ , R i ) .
其中:
W i W_i W i :起始世界狀態;
Z i M Z_i^M Z i M :Mother Meta-State;
S i S_i S i :Sub-AI Fabric;
C i \mathcal C_i C i :認知配置;
A i A_i A i :實際世界行動;
W i ′ W_i' W i ′ :後續世界狀態;
R i R_i R i :結果/回饋。
這才是一個完整 episode。
四、Episode 不是一段聊天紀錄
聊天紀錄可能只保存:
text . \text{text}. text .
但 episode 還要保存:
世界狀態;
使用的 Agent;
模型;
工具;
記憶切片;
成本;
權限;
驗證;
執行結果;
實際 state change。
因此:
Agent Episode > Conversation Transcript . \boxed{
\text{Agent Episode}
>
\text{Conversation Transcript}.
} Agent Episode > Conversation Transcript .
五、五種記憶層
本文定義:
M = M E ⊕ M S ⊕ M P ⊕ M T ⊕ M M . \boxed{
\mathcal M
=
\mathcal M_E
\oplus
\mathcal M_S
\oplus
\mathcal M_P
\oplus
\mathcal M_T
\oplus
\mathcal M_M.
} M = M E ⊕ M S ⊕ M P ⊕ M T ⊕ M M .
六、Episodic Memory
M E \mathcal M_E M E
保存:
發生過什麼?
基本元素:
E i = ( s t a t e , a c t i o n , a g e n t s , o u t c o m e , t i m e , e v i d e n c e ) . E_i
=
(
state,
action,
agents,
outcome,
time,
evidence
). E i = ( s t a t e , a c t i o n , a g e n t s , o u t co m e , t im e , e v i d e n ce ) .
它是最接近原始經驗的記憶。
七、Semantic Memory
M S \mathcal M_S M S
保存:
世界有哪些相對穩定事實與概念?
例如:
客戶 A 的合約條款;
服務 X 的依賴;
某法規要求;
某系統架構。
它不必綁定某一次 episode。
八、Procedural Memory
M P \mathcal M_P M P
保存:
這類事情通常怎麼做?
例如:
p i = ( a c t i v a t i o n , p r o c e d u r e , t e r m i n a t i o n , v a l i d a t i o n ) . p_i
=
(
activation,
procedure,
termination,
validation
). p i = ( a c t i v a t i o n , p r oce d u r e , t er mina t i o n , v a l i d a t i o n ) .
這正是 ProcMEM 類研究所強調的可重用 skill。
九、Topological Memory
本文新增:
M T . \boxed{
\mathcal M_T.
} M T .
它保存:
這類事情應該由什麼 Agent constellation、通信圖與驗證圖處理?
例如:
T i = ( V i , E i , Ω i , t e r m i n a t i o n ) . T_i
=
(
V_i,
E_i,
\Omega_i,
termination
). T i = ( V i , E i , Ω i , t er mina t i o n ) .
這是 Mother AI 特有的重點。
十、Meta-Memory
M M \mathcal M_M M M
保存:
我為什麼相信這份記憶?它在哪裡有效?何時應失效?
例如:
m i M = ( s o u r c e , c o n f i d e n c e , s c o p e , v e r s i o n , e x p i r y , d e p e n d e n c y , f a i l u r e h i s t o r y ) . m_i^M
=
(
source,
confidence,
scope,
version,
expiry,
dependency,
failure\ history
). m i M = ( so u r ce , co n f i d e n ce , sco p e , v er s i o n , e x p i r y , d e p e n d e n cy , f ai l u r e hi s t or y ) .
所以:
記憶也需要自己的記憶。 \boxed{
\text{記憶也需要自己的記憶。}
} 記憶也需要自己的記憶。
十一、Cognitive Option
第四篇已提出:
O i C = ( Θ i , A i , L i , M i , G i , B i , Γ i , V i , β i ) . \mathcal O_i^C
=
(
\Theta_i,
A_i,
L_i,
M_i,
G_i,
B_i,
\Gamma_i,
V_i,
\beta_i
). O i C = ( Θ i , A i , L i , M i , G i , B i , Γ i , V i , β i ) .
現在正式把它放進 procedural/topological memory。
十二、Cognitive Option 不是固定 Workflow
固定 workflow:
f 1 → f 2 → f 3 . f_1\rightarrow f_2\rightarrow f_3. f 1 → f 2 → f 3 .
Cognitive Option 可以有:
dynamic routing;
conditional branch;
parallel agents;
optional verifier;
authority gate;
termination conditions。
因此:
Cognitive Option = 可調用的認知策略結構 . \boxed{
\text{Cognitive Option}
=
\text{可調用的認知策略結構}.
} Cognitive Option = 可調用的認知策略結構 .
十三、ProcMEM 提供直接工程參照
2026 年 ProcMEM 將:
episodic narratives \text{episodic narratives} episodic narratives
轉成:
executable skills . \text{executable skills}. executable skills .
每個 skill 定義:
activation;
execution;
termination。
這與:
O i C \mathcal O_i^C O i C
非常接近。
它的重要訊號是:
Agent experience 可以非參數化地轉化成可重用 procedural memory . \boxed{
\text{Agent experience 可以非參數化地轉化成可重用 procedural memory}.
} Agent experience 可以非參數化地轉化成可重用 procedural memory .
十四、Mother AI 比 ProcMEM 多一層
單一 Agent skill:
x → p r o c e d u r e . x\rightarrow procedure. x → p r oce d u r e .
Mother AI compiled option:
x → ( A g e n t t e a m , m o d e l s , m e m o r i e s , t o p o l o g y , b u d g e t , a u t h o r i t y , v e r i f i c a t i o n ) . x
\rightarrow
(
Agent\ team,
models,
memories,
topology,
budget,
authority,
verification
). x → ( A g e n t t e am , m o d e l s , m e m or i es , t o p o l o g y , b u d g e t , a u t h or i t y , v er i f i c a t i o n ) .
所以:
Procedural Skill ⊂ Cognitive Option . \boxed{
\text{Procedural Skill}
\subset
\text{Cognitive Option}.
} Procedural Skill ⊂ Cognitive Option .
十五、Voyager 的 Skill Library 是更早的證據
Voyager 建立:
ever-growing executable skill library . \text{ever-growing executable skill library}. ever-growing executable skill library .
並能:
retrieve;
compose;
reuse。
這證明:
歷史行動可以被儲存成可執行能力,而不只文字回憶 . \boxed{
\text{歷史行動可以被儲存成可執行能力,而不只文字回憶}.
} 歷史行動可以被儲存成可執行能力,而不只文字回憶 .
十六、Skill Library 與 Mother AI Memory Library
Voyager 保存:
code skills . \text{code skills}. code skills .
Mother AI 要保存:
cognitive organization skills . \boxed{
\text{cognitive organization skills}.
} cognitive organization skills .
也就是:
如何組織一群智能資源來處理某類世界狀態。
十七、Memory Compiler
本文定義:
C M : { τ 1 , … , τ n } → { B 1 , … , B k } . \boxed{
\mathfrak C_M:
\{\tau_1,\ldots,\tau_n\}
\rightarrow
\{B_1,\ldots,B_k\}.
} C M : { τ 1 , … , τ n } → { B 1 , … , B k } .
其中:
B i = ( c i , O i C , Θ i , V i , P i , w i , v i , t i ) . B_i
=
(
c_i,
\mathcal O_i^C,
\Theta_i,
V_i,
P_i,
w_i,
v_i,
t_i
). B i = ( c i , O i C , Θ i , V i , P i , w i , v i , t i ) .
十八、 c i c_i c i :狀態類
不是保存一個精確 world snapshot:
W i . W_i. W i .
而是:
c i = [ W ] ∼ . c_i
=
[W]_{\sim}. c i = [ W ] ∼ .
若:
W a ∼ W b W_a\sim W_b W a ∼ W b
表示:
它們在 response-relevant dimensions 上可使用近似認知策略。
這延續前一系列的 quotient-space 思路。
十九、什麼叫 response-relevant?
例如兩台伺服器:
但同樣:
disk > 95%;
backup available;
low traffic;
reversible cleanup。
則可屬同類:
c d i s k p r e s s u r e . c_{\mathrm{disk\ pressure}}. c disk pressure .
不需要每個 hostname 建新 memory。
二十、編譯不是 memorize exact trajectory
如果保存:
τ 1 , τ 2 , … \tau_1,
\tau_2,\ldots τ 1 , τ 2 , …
並每次 nearest-neighbor replay,
仍然容易:
記憶爆炸;
過擬合;
context cost 高。
真正編譯:
{ τ i } → equivalence class + reusable structure . \boxed{
\{\tau_i\}
\rightarrow
\text{equivalence class + reusable structure}.
} { τ i } → equivalence class + reusable structure .
二十一、Memory Compilation Pipeline
本文提出:
Record → Validate → Segment → Deduplicate → Classify → Abstract → Compile → Shadow Test → Promote → Index . \boxed{
\text{Record}
\rightarrow
\text{Validate}
\rightarrow
\text{Segment}
\rightarrow
\text{Deduplicate}
\rightarrow
\text{Classify}
\rightarrow
\text{Abstract}
\rightarrow
\text{Compile}
\rightarrow
\text{Shadow Test}
\rightarrow
\text{Promote}
\rightarrow
\text{Index}.
} Record → Validate → Segment → Deduplicate → Classify → Abstract → Compile → Shadow Test → Promote → Index .
二十二、Record
先保存:
τ i . \tau_i. τ i .
重要原則:
先保存證據,再做摘要。 \boxed{
\text{先保存證據,再做摘要。}
} 先保存證據,再做摘要。
不能先摘要後把原始 episode 丟掉。
二十三、Validate
不是每次成功都值得學。
需檢查:
V ( τ i ) ∈ { p a s s , f a i l , u n c e r t a i n } . V(\tau_i)
\in
\{pass,fail,uncertain\}. V ( τ i ) ∈ { p a ss , f ai l , u n cer t ain } .
例如:
outcome 是否真的成功;
是否只是偶然;
是否造成副作用;
是否有 hidden failure。
二十四、Segment
長 trajectory:
τ \tau τ
可以切成:
τ ( 1 ) , τ ( 2 ) , … . \tau^{(1)},
\tau^{(2)},\ldots. τ ( 1 ) , τ ( 2 ) , … .
因為不同部分可能對應不同 reusable skill。
二十五、Deduplicate
若:
O ( τ i , τ j ) > τ o , O(\tau_i,\tau_j)>\tau_o, O ( τ i , τ j ) > τ o ,
不必同時編譯兩份。
保留:
representative;
counter;
outcome variance;
exceptions。
二十六、Classify
將 episode 對應到:
c i . c_i. c i .
若沒有合適 class:
C ( τ ) = ⊥ . C(\tau)=\bot. C ( τ ) = ⊥.
保留到:
M ⊥ . \mathcal M_\bot. M ⊥ .
未知 episode 不要硬塞進既有類。
二十七、Abstract
從多個 episode 抽象:
irrelevant details → 0. \text{irrelevant details}
\rightarrow
0. irrelevant details → 0.
留下:
response-relevant structure . \text{response-relevant structure}. response-relevant structure .
這是最危險但最有價值的步驟。
二十八、Compile
形成:
B i . B_i. B i .
即:
c i ⇒ O i C . c_i
\Rightarrow
\mathcal O_i^C. c i ⇒ O i C .
二十九、Shadow Test
新 compiled memory 不應立即進 production fast path。
先:
shadow mode . \boxed{
\text{shadow mode}.
} shadow mode .
即:
用新 memory 預測應該怎麼做,但不真正控制主要決策。
和實際結果比較。
三十、Promote
若:
Q ( B i ) > τ Q Q(B_i)>\tau_Q Q ( B i ) > τ Q
且:
R ( B i ) < τ R , R(B_i)<\tau_R, R ( B i ) < τ R ,
才:
c a n d i d a t e → c o m p i l e d . candidate
\rightarrow
compiled. c an d i d a t e → co m p i l e d .
三十一、Index
最後建立:
I ( B i ) . I(B_i). I ( B i ) .
使:
K r e t r i e v e K_{\mathrm{retrieve}} K retrieve
足夠低。
否則:
∣ M ∣ ↑ |\mathcal M|\uparrow ∣ M ∣ ↑
會讓記憶反而拖慢系統。
三十二、MemGPT 提供記憶階層的重要參照
MemGPT 把有限 context 視為:
fast memory , \text{fast memory}, fast memory ,
外部 storage 視為:
slow memory , \text{slow memory}, slow memory ,
透過類似 virtual memory 的方式在多層記憶間搬移資訊。
這與 Mother AI 的:
h o t / w a r m / c o l d hot/warm/cold h o t / w a r m / co l d
memory hierarchy 相容。
但本文進一步關心:
不只哪段 memory 進 context,而是哪種 memory 應該成為可重用認知策略。
三十三、Memory Retrieval 不是固定函式
傳統:
R ( q ) = TopK ( q ) . R(q)=\operatorname{TopK}(q). R ( q ) = TopK ( q ) .
但 MemCon 2026 指出:
optimal memory behavior is context-dependent . \boxed{
\text{optimal memory behavior is context-dependent}.
} optimal memory behavior is context-dependent .
有時:
少取;
多取;
重取;
取 distilled plan;
consolidation;
forget。
都可能是正確策略。
三十四、記憶本身也需要二階控制
因此:
Π m e m : Z t → a t m e m . \Pi_{\mathrm{mem}}
:
Z_t
\rightarrow
a_t^{mem}. Π mem : Z t → a t m e m .
其中:
a t m e m ∈ { r e t r i e v e , r e r e t r i e v e , i n j e c t _ p l a n , c o n s o l i d a t e , f o r g e t , r e t a i n } . a_t^{mem}
\in
\{
retrieve,
reretrieve,
inject\_plan,
consolidate,
forget,
retain
\}. a t m e m ∈ { r e t r i e v e , r er e t r i e v e , inj ec t _ pl an , co n so l i d a t e , f or g e t , r e t ain } .
所以:
Memory Management \boxed{
\text{Memory Management}
} Memory Management
本身也是 Mother AI Meta-Control 的子空間。
三十五、MemCon 與 Mother AI 的重要交點
MemCon 把 memory operation 當成 MDP。
Mother AI 可以更一般:
memory state + cognitive topology state + world state \boxed{
\text{memory state}
+
\text{cognitive topology state}
+
\text{world state}
} memory state + cognitive topology state + world state
共同決定:
retrieve / compile / forget / explore . \text{retrieve / compile / forget / explore}. retrieve / compile / forget / explore .
三十六、Procedural Memory 確實可以跨任務重用
2026 年 AFTER benchmark:
382 個 realistic enterprise tasks;
六種 professional roles;
22 種 procedural skills。
研究結果顯示 procedural memory 能產生:
local improvement;
cross-task transfer;
cross-role transfer;
cross-model generalization。
這對企業 Mother AI 非常重要。
因為:
程序知識可以跨 Agent instance 與模型保存 . \boxed{
\text{程序知識可以跨 Agent instance 與模型保存}.
} 程序知識可以跨 Agent instance 與模型保存 .
三十七、這意味著 Mother AI Identity 可以跨模型
若:
L A → L B , L_A\rightarrow L_B, L A → L B ,
但:
M P , M T \mathcal M_P,\mathcal M_T M P , M T
仍保留,
大量組織能力仍可延續。
所以:
模型換代 ≠ 組織失憶 . \boxed{
\text{模型換代}
\neq
\text{組織失憶}.
} 模型換代 = 組織失憶 .
三十八、但 procedural skill 並非都能泛化
AFTER 也指出:
某些 skill 可廣泛轉移,
某些則會:
role-specific over-specialization . \text{role-specific over-specialization}. role-specific over-specialization .
因此每個:
B i B_i B i
必須保存:
s c o p e i . scope_i. sco p e i .
三十九、Scope
Θ i = ( d o m a i n , s t a t e r e g i o n , m o d e l c o m p a t i b i l i t y , a u t h o r i t y , r e s o u r c e , t i m e ) . \Theta_i
=
(
domain,
state\ region,
model\ compatibility,
authority,
resource,
time
). Θ i = ( d o main , s t a t e r e g i o n , m o d e l co m p a t ibi l i t y , a u t h or i t y , r eso u r ce , t im e ) .
只有:
x ∈ Θ i x\in\Theta_i x ∈ Θ i
才允許 fast path。
四十、Compiled Memory 不是 Universal Rule
所以:
B i ≠ 永恆規則 . \boxed{
B_i
\neq
\text{永恆規則}.
} B i = 永恆規則 .
更準確:
B i = conditional computational asset . B_i
=
\text{conditional computational asset}. B i = conditional computational asset .
四十一、Continuous Consolidation 的風險
2026 年研究發現:
將有用 episodic traces 持續由 LLM 進行 consolidated-memory rewriting,
可能出現:
memory utility ↑ → ↓ . \boxed{
\text{memory utility}
\uparrow
\rightarrow
\downarrow.
} memory utility ↑→↓ .
也就是一開始整理有幫助,
後來持續重寫反而失真。
四十二、這是一個非常重要的反例
它表示:
more consolidation ⇏ better memory . \text{more consolidation}
\not\Rightarrow
\text{better memory}. more consolidation ⇒ better memory .
甚至:
Useful Episode → Faulty Abstraction \boxed{
\text{Useful Episode}
\rightarrow
\text{Faulty Abstraction}
} Useful Episode → Faulty Abstraction
可能發生。
四十三、因此 Raw Episode 必須是 First-Class Evidence
本文要求:
M E 不因 M P 產生而自動刪除 . \boxed{
\mathcal M_E
\text{ 不因 }
\mathcal M_P
\text{ 產生而自動刪除}.
} M E 不因 M P 產生而自動刪除 .
即使 procedural memory 已建立,
仍保留足夠原始證據。
四十四、編譯記憶應保存 Provenance
每個:
B i B_i B i
附:
P i = { τ j 1 , … , τ j k } . P_i
=
\{
\tau_{j_1},\ldots,\tau_{j_k}
\}. P i = { τ j 1 , … , τ j k } .
因此可以追問:
這條策略是從哪些 episode 編譯出來?
四十五、Evidence Dependency
如果十個 episode:
τ 1 , … , τ 10 \tau_1,\ldots,\tau_{10} τ 1 , … , τ 10
其實都來自同一份錯誤來源,
不能當:
10 10 10
份獨立證據。
所以:
D e p ( τ i , τ j ) Dep(\tau_i,\tau_j) D e p ( τ i , τ j )
必須保存。
四十六、Compiled Confidence
可以定義:
w i = F ( N i n d e p e n d e n t , s u c c e s s , v a r i a n c e , r e c e n c y , s c o p e , v a l i d a t i o n ) . w_i
=
F(
N_{\mathrm{independent}},
success,
variance,
recency,
scope,
validation
). w i = F ( N independent , s u ccess , v a r ian ce , r ece n cy , sco p e , v a l i d a t i o n ) .
不是:
w i = N r e p e t i t i o n . w_i=N_{\mathrm{repetition}}. w i = N repetition .
四十七、編譯 Gate
只有:
G C ( τ 1 : n ) = 1 G_C(\tau_{1:n})=1 G C ( τ 1 : n ) = 1
才允許:
Compile . \operatorname{Compile}. Compile .
Gate 可以檢查:
independent episodes;
sufficient repetitions;
stable outcome;
low conflict;
clear scope。
四十八、不確定時應該 Retain,不是 Compile
如果:
U C > τ , U_C>\tau, U C > τ ,
則:
retain episodic evidence . \boxed{
\text{retain episodic evidence}.
} retain episodic evidence .
不要急著抽象。
這直接吸收 2026 consolidation failure 的教訓。
四十九、三種記憶狀態
一個 pattern 可以處於:
Episodic → Candidate → Compiled . \boxed{
\text{Episodic}
\rightarrow
\text{Candidate}
\rightarrow
\text{Compiled}.
} Episodic → Candidate → Compiled .
不是:
e p i s o d e → c o m p i l e d episode\rightarrow compiled e p i so d e → co m p i l e d
一步完成。
五十、Candidate Memory
B i c a n d B_i^{cand} B i c an d
可以:
shadow use;
compare;
collect counterexamples。
只有成熟後:
B i c a n d → B i p r o d . B_i^{cand}
\rightarrow B_i^{prod}. B i c an d → B i p r o d .
五十一、Counterexample Buffer
如果某 episode:
τ j \tau_j τ j
違反:
B i , B_i, B i ,
加入:
E i e x c e p t i o n . E_i^{exception}. E i e x ce pt i o n .
所以 compiled item:
B i = ( c i , O i , Θ i , V i , E i e x c e p t i o n ) . B_i
=
(
c_i,
\mathcal O_i,
\Theta_i,
V_i,
E_i^{exception}
). B i = ( c i , O i , Θ i , V i , E i e x ce pt i o n ) .
五十二、例外記憶和主策略同等重要
高速直覺:
c i → O i c_i\rightarrow\mathcal O_i c i → O i
安全的前提是:
也能快速記得哪些情況不能用 . \boxed{
\text{也能快速記得哪些情況不能用}.
} 也能快速記得哪些情況不能用 .
這延續前一系列「直覺安全性來自快速記得例外」。
五十三、Fast Path Gate
定義:
F i ( x ) = 1 F_i(x)=1 F i ( x ) = 1
只有當:
P ( c i ∣ x ) > τ c , P(c_i\mid x)>\tau_c, P ( c i ∣ x ) > τ c ,
D ( x , E i e x c e p t i o n ) > τ e , D(x,E_i^{exception})>\tau_e, D ( x , E i e x ce pt i o n ) > τ e ,
F r e s h ( B i ) = 1. Fresh(B_i)=1. F r es h ( B i ) = 1.
才直接使用:
O i C . \mathcal O_i^C. O i C .
五十四、Compiled Cognitive Topology
Mother AI 記憶最特殊的部分:
T i C = ( V i A , E i A , Ω i A , Γ i , V i ) . \boxed{
T_i^C
=
(
V_i^A,
E_i^A,
\Omega_i^A,
\Gamma_i,
V_i
).
} T i C = ( V i A , E i A , Ω i A , Γ i , V i ) .
即:
哪些 Agent;
怎麼連;
各自權限;
哪些驗證;
邊權如何設。
這就是:
Compiled Response Topology . \boxed{
\text{Compiled Response Topology}.
} Compiled Response Topology .
五十五、世界狀態映射到 Agent Constellation
c i ⇒ C A ( i ) . c_i
\Rightarrow
\mathcal C_A^{(i)}. c i ⇒ C A ( i ) .
例如:
c c o n t r a c t r i s k ⇒ { A l e g a l , A f i n a n c e , A v e r i f i e r } . c_{\mathrm{contract\ risk}}
\Rightarrow
\{
A_{\mathrm{legal}},
A_{\mathrm{finance}},
A_{\mathrm{verifier}}
\}. c contract risk ⇒ { A legal , A finance , A verifier } .
不是每次重新想:
要找誰?
五十六、還可以映射到 Model Policy
c i ⇒ L i p o l i c y . c_i
\Rightarrow
L_i^{policy}. c i ⇒ L i p o l i cy .
例如:
已知簡單:
L s m a l l . L_{\mathrm{small}}. L small .
高風險:
L s t r o n g . L_{\mathrm{strong}}. L strong .
所以:
Model routing \boxed{
\text{Model routing}
} Model routing
也能被編譯。
五十七、Memory View 也能被編譯
c i ⇒ M i v . c_i
\Rightarrow
M_i^v. c i ⇒ M i v .
也就是:
這類任務通常需要哪些記憶域?
例如:
M i v = M c o n t r a c t ⊕ M c u s t o m e r ⊕ M l a w . M_i^v
=
M_{\mathrm{contract}}
\oplus
M_{\mathrm{customer}}
\oplus
M_{\mathrm{law}}. M i v = M contract ⊕ M customer ⊕ M law .
五十八、Budget 也能被編譯
c i ⇒ B i . c_i
\Rightarrow
B_i. c i ⇒ B i .
成熟低風險:
B i ↓ . B_i\downarrow. B i ↓ .
未知高風險:
B i ↑ . B_i\uparrow. B i ↑ .
所以歷史能直接改變未來算力需求。
五十九、Authority Path 也能被編譯
c i ⇒ Γ i p a t h . c_i
\Rightarrow
\Gamma_i^{path}. c i ⇒ Γ i p a t h .
例如:
建議可自動;實際付款需財務人員批准。
這使:
認知配置 \boxed{
\text{認知配置}
} 認知配置
和治理結構同步重用。
六十、Termination 也要記
一個 skill 若沒有:
β i , \beta_i, β i ,
就不知道何時停止。
例如:
β i = evidence sufficient \beta_i=
\text{evidence\ sufficient} β i = evidence sufficient
或:
β i = deadline reached . \beta_i=
\text{deadline reached}. β i = deadline reached .
所以:
知道何時停止思考 \boxed{
\text{知道何時停止思考}
} 知道何時停止思考
也是 procedural memory。
六十一、Compiled Option 的完整格式
O i C = ( I i , A i , L i , M i , G i , B i , Γ i , V i , β i ) \boxed{
\mathcal O_i^C
=
(
I_i,
A_i,
L_i,
M_i,
G_i,
B_i,
\Gamma_i,
V_i,
\beta_i
)
} O i C = ( I i , A i , L i , M i , G i , B i , Γ i , V i , β i )
其中:
I i I_i I i :activation;
A i A_i A i :agents;
L i L_i L i :models;
M i M_i M i :memory views;
G i G_i G i :topology;
B i B_i B i :budget;
Γ i \Gamma_i Γ i :authority;
V i V_i V i :verification;
β i \beta_i β i :termination。
六十二、這已經像一個「認知程序」
所以:
O i C \boxed{
\mathcal O_i^C
} O i C
不是一段 advice。
它更像:
可執行、可驗證、可終止的認知程序 . \boxed{
\text{可執行、可驗證、可終止的認知程序}.
} 可執行、可驗證、可終止的認知程序 .
這是「記憶編譯」一詞真正工程化的地方。
六十三、Compiled Memory Index
需要:
I M . \mathfrak I_M. I M .
可以包括:
I s t a t e , I s e m a n t i c , I p r o c e d u r a l , I t o p o l o g y , I e x c e p t i o n , I t e m p o r a l . I_{\mathrm{state}},
I_{\mathrm{semantic}},
I_{\mathrm{procedural}},
I_{\mathrm{topology}},
I_{\mathrm{exception}},
I_{\mathrm{temporal}}. I state , I semantic , I procedural , I topology , I exception , I temporal .
Mother AI 不是只做 vector similarity。
六十四、先分類再檢索
x → C c i → I B i . x
\xrightarrow{C}
c_i
\xrightarrow{I}
B_i. x C c i I B i .
比:
x → search all memory x
\rightarrow
\operatorname{search\ all\ memory} x → search all memory
更符合大規模系統。
六十五、多階段 Retrieval
R 0 : coarse class R_0:
\text{coarse class} R 0 : coarse class
R 1 : candidate memories R_1:
\text{candidate memories} R 1 : candidate memories
R 2 : scope/exception filter R_2:
\text{scope/exception filter} R 2 : scope / exception filter
R 3 : final compiled option . R_3:
\text{final compiled option}. R 3 : final compiled option .
這延續極致分類與快速索引理論。
六十六、Memory Hit
若:
B i B_i B i
安全命中,
則:
K r e p e a t = K c l a s s i f y + K r e t r i e v e + K l i g h t v e r i f y . K_{\mathrm{repeat}}
=
K_{\mathrm{classify}}
+
K_{\mathrm{retrieve}}
+
K_{\mathrm{light\ verify}}. K repeat = K classify + K retrieve + K light verify .
而不再:
K m e t a − s e a r c h + K a g e n t − d e s i g n + K w o r k f l o w − d e s i g n . K_{\mathrm{meta-search}}
+
K_{\mathrm{agent-design}}
+
K_{\mathrm{workflow-design}}. K meta − search + K agent − design + K workflow − design .
六十七、這就是 Mother AI 的「計算直覺」
外部看起來:
它好像立刻知道該找誰、該怎麼處理。
實際:
大量歷史 meta-control 已被壓縮 . \boxed{
\text{大量歷史 meta-control 已被壓縮}.
} 大量歷史 meta-control 已被壓縮 .
所以:
intuition ≈ compiled historical cognition . \text{intuition}
\approx
\text{compiled historical cognition}. intuition ≈ compiled historical cognition .
六十八、Memory Miss
如果:
C ( x ) = ⊥ C(x)=\bot C ( x ) = ⊥
或:
F i ( x ) = 0 , F_i(x)=0, F i ( x ) = 0 ,
則不能強行 fast path。
進入:
Exploratory Meta-Control . \boxed{
\text{Exploratory Meta-Control}.
} Exploratory Meta-Control .
六十九、Exploratory Meta-Control
Mother AI 重新搜索:
C . \mathcal C. C .
可以:
spawn new agents;
increase diversity;
use stronger models;
increase verification;
sandbox;
involve humans。
新的成功 trajectory 再回到:
M E . \mathcal M_E. M E .
七十、所以完整循環
Unknown State → Explore Cognitive Configuration → Act → Validate → Episode → Compile → Known State . \boxed{
\text{Unknown State}
\rightarrow
\text{Explore Cognitive Configuration}
\rightarrow
\text{Act}
\rightarrow
\text{Validate}
\rightarrow
\text{Episode}
\rightarrow
\text{Compile}
\rightarrow
\text{Known State}.
} Unknown State → Explore Cognitive Configuration → Act → Validate → Episode → Compile → Known State .
七十一、Memory Compiling 不是單向
世界會 drift。
因此:
B i B_i B i
可能失效。
若:
V i ( x ) = 0 V_i(x)=0 V i ( x ) = 0
或:
D r i f t i > τ D , Drift_i>\tau_D, D r i f t i > τ D ,
則:
B i → review . B_i
\rightarrow
\text{review}. B i → review .
七十二、Decompile
定義:
Decompile ( B i ) . \operatorname{Decompile}(B_i). Decompile ( B i ) .
不是把它刪掉。
而是:
停止 fast path;
回到 candidate;
-重新讀原始 episodes;
搜集新 evidence。
七十三、Recompile
新 evidence:
P i ′ P_i' P i ′
產生:
B i ′ . B_i'. B i ′ .
所以:
B i → B i ′ \boxed{
B_i
\rightarrow
B_i'
} B i → B i ′
可以保留版本 lineage。
七十四、Version Lineage
B i v 1 → B i v 2 → B i v 3 . B_i^{v1}
\rightarrow
B_i^{v2}
\rightarrow
B_i^{v3}. B i v 1 → B i v 2 → B i v 3 .
每版保存:
why changed;
evidence;
failure;
compatibility。
這使 Memory Compiler 可審計。
七十五、Forgetting 不是缺陷
MemCon 明確把:
f o r g e t forget f or g e t
納入 memory control action。
因為:
∣ M ∣ ↑ |\mathcal M|\uparrow ∣ M ∣ ↑
不代表效能上升。
所以:
成熟記憶系統必須會忘記 . \boxed{
\text{成熟記憶系統必須會忘記}.
} 成熟記憶系統必須會忘記 .
七十六、但 Forget 應區分
Hard Delete
真正刪除。
Archive
移出 fast retrieval。
Deprecate
保留但不能自動調用。
Decay
降低權重。
所以:
Forget ≠ Erase . \boxed{
\text{Forget}
\neq
\text{Erase}.
} Forget = Erase .
七十七、Memory Decay
可以:
w i ( t ) = w i ( t 0 ) e − λ i ( t − t 0 ) . w_i(t)
=
w_i(t_0)
e^{-\lambda_i(t-t_0)}. w i ( t ) = w i ( t 0 ) e − λ i ( t − t 0 ) .
若被重新驗證:
w i ↑ . w_i\uparrow. w i ↑ .
不同 memory:
λ i \lambda_i λ i
不同。
七十八、法律規則與個人偏好不應同速衰減
例如:
λ p r e f e r e n c e > λ c o n t r a c t . \lambda_{\mathrm{preference}}
>
\lambda_{\mathrm{contract}}. λ preference > λ contract .
所以 forgetting policy 應 domain-specific。
七十九、Memory Budget
Mother AI 也有:
B M . B_M. B M .
要決定:
max V ( M ) \max
V(\mathcal M) max V ( M )
subject to:
K s t o r a g e + K r e t r i e v a l + K m a i n t e n a n c e ≤ B M . K_{\mathrm{storage}}
+
K_{\mathrm{retrieval}}
+
K_{\mathrm{maintenance}}
\leq
B_M. K storage + K retrieval + K maintenance ≤ B M .
所以記憶本身也是資源配置問題。
八十、不是所有 episode 都值得永久保存
可以定義:
V E ( τ ) = α n o v e l t y + β f a i l u r e v a l u e + γ r e u s e + δ e v i d e n c e − μ s t o r a g e . V_E(\tau)
=
\alpha novelty
+
\beta failure\ value
+
\gamma reuse
+
\delta evidence
-
\mu storage. V E ( τ ) = α n o v e l t y + β f ai l u r e v a l u e + γ r e u se + δ e v i d e n ce − μ s t or a g e .
低價值事件:
→ a g g r e g a t e / a r c h i v e . \rightarrow
aggregate/archive. → a g g r e g a t e / a r c hi v e .
八十一、失敗 episode 可能比成功更有價值
成功:
這樣做有效。
失敗:
這樣做在某條件下會出錯。
因此:
M E f a i l u r e \boxed{
\mathcal M_E^{failure}
} M E f ai l u r e
不應被清掉。
它是 exception memory 的主要來源。
八十二、Failure-to-Constraint Compilation
若多次:
τ i f a i l \tau_i^{fail} τ i f ai l
在:
c o n d i t i o n = C condition=C co n d i t i o n = C
失敗,
可以編譯:
C ⇒ ¬ O i . C\Rightarrow \neg\mathcal O_i. C ⇒ ¬ O i .
即:
失敗也可以編譯成禁止條件 . \boxed{
\text{失敗也可以編譯成禁止條件}.
} 失敗也可以編譯成禁止條件 .
八十三、Memory Poisoning
如果惡意或錯誤 episode:
τ m \tau_m τ m
進入編譯,
可能產生:
B m . B_m. B m .
之後:
B m B_m B m
以 fast path 反覆影響系統。
所以:
memory poisoning \boxed{
\text{memory poisoning}
} memory poisoning
比一次錯誤回答更危險。
八十四、因此寫入權限比讀取權限更敏感
普通 Agent 可以:
r e a d ( M ) . read(\mathcal M). r e a d ( M ) .
但:
w r i t e ( M P ) write(\mathcal M_P) w r i t e ( M P )
或:
w r i t e ( M T ) write(\mathcal M_T) w r i t e ( M T )
應有更高門檻。
八十五、Memory Write Pipeline
Agent result:
r i r_i r i
不能:
r i → M P r_i\rightarrow\mathcal M_P r i → M P
直接寫入。
應:
r i → M E → v a l i d a t e → c a n d i d a t e → c o m p i l e d . r_i
\rightarrow
\mathcal M_E
\rightarrow
validate
\rightarrow
candidate
\rightarrow
compiled. r i → M E → v a l i d a t e → c an d i d a t e → co m p i l e d .
八十六、Mother AI 的「記憶」本質上是資產負債表
好的 compiled memory:
→ future compute asset . \rightarrow
\text{future compute asset}. → future compute asset .
錯誤 compiled memory:
→ future error liability . \rightarrow
\text{future error liability}. → future error liability .
所以:
Memory Value = reuse benefit − error propagation risk . \boxed{
\text{Memory Value}
=
\text{reuse benefit}
-
\text{error propagation risk}.
} Memory Value = reuse benefit − error propagation risk .
八十七、Memory ROI
定義:
R O I ( B i ) = K s a v e d + Q i m p r o v e d K c o m p i l e + K m a i n t a i n + K e r r o r . ROI(B_i)
=
\frac{
K_{\mathrm{saved}}
+
Q_{\mathrm{improved}}
}{
K_{\mathrm{compile}}
+
K_{\mathrm{maintain}}
+
K_{\mathrm{error}}
}. R O I ( B i ) = K compile + K maintain + K error K saved + Q improved .
若:
R O I < 1 , ROI<1, R O I < 1 ,
就不值得編譯。
八十八、記憶編譯也是投資決策
因此 Mother AI 不應:
每次做完事都寫一篇反思。
而是:
只對有重用價值的歷史支付編譯成本 . \boxed{
\text{只對有重用價值的歷史支付編譯成本}.
} 只對有重用價值的歷史支付編譯成本 .
八十九、Frequency × Cost × Reuse
可定義:
P r i o r i t y c o m p i l e = F ( f r e q u e n c y , f i r s t c o s t , e x p e c t e d r e u s e , r i s k ) . Priority_{\mathrm{compile}}
=
F(
frequency,
first\ cost,
expected\ reuse,
risk
). P r i or i t y compile = F ( f r e q u e n cy , f i r s t cos t , e x p ec t e d r e u se , r i s k ) .
高頻、高成本、高重用:
→ 優先編譯 . \rightarrow
\text{優先編譯}. → 優先編譯 .
九十、低頻未知不一定值得編譯
一次性的:
x i x_i x i
即使很複雜,
如果:
P ( repeat ) ≈ 0 , P(\text{repeat})\approx0, P ( repeat ) ≈ 0 ,
保留 episode 即可。
所以:
不是所有智慧都需要程序化 . \boxed{
\text{不是所有智慧都需要程序化}.
} 不是所有智慧都需要程序化 .
九十一、Memory Compilation 與創新
極強記憶不應讓 Mother AI 永遠使用:
B i . B_i. B i .
相反:
B i B_i B i
最大的作用之一是:
讓已知部分快速退出昂貴推理,把資源留給真正未知。
所以:
記憶越成熟,探索資源越應集中在殘差空間 . \boxed{
\text{記憶越成熟,探索資源越應集中在殘差空間}.
} 記憶越成熟,探索資源越應集中在殘差空間 .
九十二、Residual Cognitive Search
已知認知空間:
S t = span { B 1 , … , B n } . \mathcal S_t
=
\operatorname{span}
\{
B_1,\ldots,B_n
\}. S t = span { B 1 , … , B n } .
新問題:
x ⊥ = x − Π S t x . x^\perp
=
x-\Pi_{\mathcal S_t}x. x ⊥ = x − Π S t x .
探索集中:
∥ x ⊥ ∥ . \|x^\perp\|. ∥ x ⊥ ∥.
這延續前一系列的 residual novelty search。
九十三、所以 Mother AI 的學習不是越來越少思考
而是:
越來越少在已知區域重新思考 \boxed{
\text{越來越少在已知區域重新思考}
} 越來越少在已知區域重新思考
並:
把更多思考轉移到真正未知區域 . \boxed{
\text{把更多思考轉移到真正未知區域}.
} 把更多思考轉移到真正未知區域 .
九十四、跨 Agent 記憶編譯
Sub-AI:
A 1 , … , A n A_1,\ldots,A_n A 1 , … , A n
的經驗最後可:
⋃ i M E ( i ) → C M . \bigcup_i\mathcal M_E^{(i)}
\rightarrow
\mathfrak C_M. i ⋃ M E ( i ) → C M .
所以一個 Agent 做出的經驗:
可以成為整個 Mother AI 系統的未來能力 . \boxed{
\text{可以成為整個 Mother AI 系統的未來能力}.
} 可以成為整個 Mother AI 系統的未來能力 .
九十五、但先局部再全局
Agent local memory:
M i \mathcal M_i M i
先驗證。
再:
M i → M M . \mathcal M_i
\rightarrow
\mathcal M_M. M i → M M .
不能讓每個子 AI 自動改寫全局程序記憶。
九十六、跨模型 Procedural Memory
AFTER 顯示由多模型 execution traces 演化出的 skills 具有跨模型轉移潛力。
這提供:
Procedural Memory 可以比單一 Model Identity 更持久 . \boxed{
\text{Procedural Memory 可以比單一 Model Identity 更持久}.
} Procedural Memory 可以比單一 Model Identity 更持久 .
Mother AI 因此可以在模型世代更替中保持組織經驗。
九十七、跨 Agent Template Memory
若:
Θ r \Theta_r Θ r
被更新,
未來所有:
A i ∼ Θ r A_i\sim\Theta_r A i ∼ Θ r
都受益。
所以:
經驗可以從 Instance 上升為 Role Memory . \boxed{
\text{經驗可以從 Instance 上升為 Role Memory}.
} 經驗可以從 Instance 上升為 Role Memory .
九十八、跨 Topology Memory
若某 Agent constellation:
G i G_i G i
長期成功,
可以:
G i → M T . G_i
\rightarrow
\mathcal M_T. G i → M T .
下一次:
c i → G i . c_i\rightarrow G_i. c i → G i .
所以:
組織結構本身也可以被記憶 . \boxed{
\text{組織結構本身也可以被記憶}.
} 組織結構本身也可以被記憶 .
九十九、Memory Compiler 的總輸入
D t = ( W 0 : t , S 0 : t , M 0 : t , A 0 : t , R 0 : t ) . \mathcal D_t
=
(
W_{0:t},
S_{0:t},
M_{0:t},
A_{0:t},
R_{0:t}
). D t = ( W 0 : t , S 0 : t , M 0 : t , A 0 : t , R 0 : t ) .
輸出:
C M ( D t ) = ( Q , O , Θ , V , I ) . \mathfrak C_M(\mathcal D_t)
=
(
\mathcal Q,
\mathcal O,
\Theta,
\mathcal V,
\mathfrak I
). C M ( D t ) = ( Q , O , Θ , V , I ) .
其中:
Q \mathcal Q Q :state classes;
O \mathcal O O :cognitive options;
Θ \Theta Θ :scope/activation;
V \mathcal V V :validators;
I \mathfrak I I :indices。
一百、完整 Mother AI Memory Runtime
W t → Φ z t → C c t → I B t → F G O t C → Π A t → V R t → U M t + 1 . \boxed{
W_t
\xrightarrow{\Phi}
z_t
\xrightarrow{C}
c_t
\xrightarrow{I}
B_t
\xrightarrow{F_G}
\mathcal O_t^C
\xrightarrow{\Pi}
A_t
\xrightarrow{V}
R_t
\xrightarrow{U}
\mathcal M_{t+1}.
} W t Φ z t C c t I B t F G O t C Π A t V R t U M t + 1 .
若:
C ( z t ) = ⊥ , C(z_t)=\bot, C ( z t ) = ⊥ ,
則:
z t → explore → τ n e w → M E . z_t
\rightarrow
\text{explore}
\rightarrow
\tau_{new}
\rightarrow
\mathcal M_E. z t → explore → τ n e w → M E .
一百零一、Compiler 不在每次事件後啟動
更合理:
CompileTrigger = F ( r e p e a t , v a l u e , s t a b i l i t y , e v i d e n c e , c o s t ) . \operatorname{CompileTrigger}
=
F(
repeat,
value,
stability,
evidence,
cost
). CompileTrigger = F ( r e p e a t , v a l u e , s t abi l i t y , e v i d e n ce , cos t ) .
只有:
C o m p i l e T r i g g e r = 1 CompileTrigger=1 C o m p i l e T r i g g er = 1
才進行 consolidation。
一百零二、Memory Compiler 自己也是低頻高價值流程
它可能:
nightly;
weekly;
milestone-based;
threshold-based。
而不是:
每一輪對話都 compile . \text{每一輪對話都 compile}. 每一輪對話都 compile .
這能降低:
cost;
overfitting;
memory corruption。
一百零三、第一代 MVP 可以怎麼做?
MVP 只需要三層:
M E ⊕ M P ⊕ M M . \mathcal M_E
\oplus
\mathcal M_P
\oplus
\mathcal M_M. M E ⊕ M P ⊕ M M .
先不做完整 semantic/topological graph。
一百零四、MVP Episode Schema
episode_id
state_class
task
agents
models
memory_refs
tools
workflow_graph
authority
cost
outcome
evidence
timestamp
這已足以後續編譯。
一百零五、MVP Compiled Skill Schema
skill_id
activation_conditions
agent_constellation
model_policy
memory_policy
workflow_graph
budget
authority_requirements
verification
termination
provenance
confidence
version
status
這就是第一代 Cognitive Option。
一百零六、MVP Compile Policy
只有:
if repeated_success >= N
and independent_evidence >= K
and outcome_variance <= epsilon:
create_candidate_skill()
不要一開始用自由 LLM consolidation。
一百零七、MVP Shadow Test
candidate skill:
status = shadow
實際 task 到來時:
主系統正常處理;
candidate 預測;
比較兩者。
達標後才:
status = production
一百零八、MVP Decompile
如果:
failure_rate > threshold
or drift > threshold
or exception_match:
status = suspended
然後重新讀 episodes。
一百零九、MVP 評估指標
Compilation Rate
R C = N c o m p i l e d N e p i s o d e s . R_C
=
\frac{N_{\mathrm{compiled}}}{N_{\mathrm{episodes}}}. R C = N episodes N compiled .
Reuse Rate
R R = N c o m p i l e d h i t s N t a s k s . R_R
=
\frac{N_{\mathrm{compiled\ hits}}}{N_{\mathrm{tasks}}}. R R = N tasks N compiled hits .
Compute Saving
S K = K b a s e l i n e − K c o m p i l e d . S_K
=
K_{\mathrm{baseline}}
-
K_{\mathrm{compiled}}. S K = K baseline − K compiled .
False-Known Rate
R F K . R_{FK}. R F K .
Decompile Rate
R D . R_D. R D .
Memory Drift
D M . D_M. D M .
一百一十、真正最重要的指標仍然是 False Known
如果:
B i B_i B i
錯誤命中,
Mother AI 會:
快速叫錯 Agent;
快速用錯模型;
快速走錯流程;
快速給錯權限。
所以:
C o s t ( F a l s e K n o w n ) ≫ C o s t ( M e m o r y M i s s ) . \boxed{
Cost(FalseKnown)
\gg
Cost(MemoryMiss).
} C os t ( F a l seK n o w n ) ≫ C os t ( M e m or y M i ss ) .
高風險系統尤其如此。
一百十一、寧可 Miss,也不要錯誤 Fast Path
因此:
τ c o m p i l e \tau_{\mathrm{compile}} τ compile
可以偏保守。
如果 unsure:
→ explore . \rightarrow
\text{explore}. → explore .
這仍延續:
未知是合法狀態 . \boxed{
\text{未知是合法狀態}.
} 未知是合法狀態 .
一百十二、Memory Compilation 的終極作用
一開始:
W t → expensive meta-control search . W_t
\rightarrow
\text{expensive meta-control search}. W t → expensive meta-control search .
成熟後:
W t → c i → B i → O i C . W_t
\rightarrow
c_i
\rightarrow
B_i
\rightarrow
\mathcal O_i^C. W t → c i → B i → O i C .
所以:
世界狀態 → 索引問題 \boxed{
\text{世界狀態}
\rightarrow
\text{索引問題}
} 世界狀態 → 索引問題
逐步取代:
世界狀態 → 重新搜尋問題 . \boxed{
\text{世界狀態}
\rightarrow
\text{重新搜尋問題}.
} 世界狀態 → 重新搜尋問題 .
一百十三、這就是 Mother AI 的歷史計算資本化
定義:
A t M = { B 1 , … , B n } \mathcal A_t^M
=
\{
B_1,\ldots,B_n
\} A t M = { B 1 , … , B n }
為 Mother AI 的 compiled cognitive assets。
隨時間:
∣ A t M ∣ ↑ . |\mathcal A_t^M|\uparrow. ∣ A t M ∣ ↑ .
理想:
K k n o w n ( t ) ↓ . K_{\mathrm{known}}(t)\downarrow. K known ( t ) ↓ .
這可以稱:
Historical Cognitive Capitalization . \boxed{
\text{Historical Cognitive Capitalization}.
} Historical Cognitive Capitalization .
一百十四、Mother AI 越成熟,不代表硬編譯率越接近 100%
理想:
R c o m p i l e < 1. R_{\mathrm{compile}}<1. R compile < 1.
因為:
世界會變;
unknown 永遠存在;
rare events 不值得編譯;
novel combinations 持續產生。
所以:
⊥ \boxed{
\bot
} ⊥
必須永久保留。
一百十五、正式定義
記憶編譯型母 AI,是一種將世界狀態、子 AI 組合、模型選擇、記憶切片、認知拓撲、預算、權限、驗證與實際結果所形成的歷史軌跡,經由保留原始 episode、來源追蹤、去重、狀態分類、抽象、候選編譯、影子驗證與版本化管理,轉換成可在相似未來狀態中快速、安全、可撤銷地重新調用之 Cognitive Options 的持續智能架構。
一百十六、核心公式
C M : { τ i } i = 1 n → { ( c j , O j C , Θ j , V j , P j ) } j = 1 m \boxed{
\mathfrak C_M:
\{\tau_i\}_{i=1}^{n}
\rightarrow
\{
(c_j,\mathcal O_j^C,\Theta_j,V_j,P_j)
\}_{j=1}^{m}
} C M : { τ i } i = 1 n → {( c j , O j C , Θ j , V j , P j ) } j = 1 m
且通常:
m ≪ n . m\ll n. m ≪ n .
表示大量歷史 episode 被壓縮成較少的可重用結構。
一百十七、系列第二部到目前的位置
第 05 篇:
Mother AI 一直存在,但不必一直高成本思考 . \boxed{
\text{Mother AI 一直存在,但不必一直高成本思考}.
} Mother AI 一直存在,但不必一直高成本思考 .
第 06 篇:
能力可以按需長成 Sub-AI 器官 . \boxed{
\text{能力可以按需長成 Sub-AI 器官}.
} 能力可以按需長成 Sub-AI 器官 .
第 07 篇:
歷史可以把這些器官的最佳組合編譯成未來快速通道 . \boxed{
\text{歷史可以把這些器官的最佳組合編譯成未來快速通道}.
} 歷史可以把這些器官的最佳組合編譯成未來快速通道 .
現在只剩第二部最後一篇:
08.《母 AI Runtime:從模型到持續認知核心》
將把:
World State;
Persistent State;
Sub-AI Fabric;
Memory Compiler;
Meta-Control;
Unknown;
Authority;
收斂成真正可實作的 Runtime 規格:
Mother Runtime = W + M + S + G + R + U + Γ . \boxed{
\text{Mother Runtime}
=
W+M+S+G+R+U+\Gamma.
} Mother Runtime = W + M + S + G + R + U + Γ.
參考資料與公開技術資料
Jiang, E. H. et al. (2026). Memory as a Controlled Process: Learned Adaptive Memory Management for LLM Agents. https://arxiv.org/abs/2607.13591
Mi, Q. et al. (2026). ProcMEM: Learning Reusable Procedural Memory from Experience via Non-Parametric PPO for LLM Agents. https://arxiv.org/abs/2602.01869
Belikova, J. et al. (2026). Managing Procedural Memory in LLM Agents: Control, Adaptation, and Evaluation. https://arxiv.org/abs/2606.23127
Zhang, D. et al. (2026). Useful Memories Become Faulty When Continuously Updated by LLMs. https://arxiv.org/abs/2605.12978
Xiong, Z. et al. (2025). How Memory Management Impacts LLM Agents: An Empirical Study of Experience-Following Behavior. https://arxiv.org/abs/2505.16067
Wang, G. et al. (2023). Voyager: An Open-Ended Embodied Agent with Large Language Models. https://arxiv.org/abs/2305.16291
Packer, C. et al. (2023). MemGPT: Towards LLMs as Operating Systems. https://arxiv.org/abs/2310.08560
Hsiao, V., Roberts, M., & Smith, L. (2025). Procedural Knowledge Improves Agentic LLM Workflows. https://arxiv.org/abs/2511.07568
內部理論依賴
01《AI 不是流程中的一個節點》
02《母 AI、世界狀態機與子智能網路》
03《會改變拓撲的智能:動態圖論認知系統》
04《母 AI 是二階控制器》
05《持續世界狀態:母 AI 如何一直醒著》
06《子 AI 是認知器官,不是獨立 Workflow》
《從路徑覆蓋到行星智能:記憶編譯型計算存在論》
本篇將前一系列的 Memory-Compiled State Agent、極致分類、Unknown Gate、Residual Novelty Search 與文明記憶編譯概念,正式移植到 Mother AI 的 Agent/Model/Memory/Topology/Authority Meta-Control 層。
一句話摘要
Mother AI 真正應該記住的,不只是「上次怎麼回答」,而是「這種世界狀態下,哪一種認知組織最值得再次被喚起」。 \boxed{
\text{Mother AI 真正應該記住的,不只是「上次怎麼回答」,而是「這種世界狀態下,哪一種認知組織最值得再次被喚起」。}
} Mother AI 真正應該記住的,不只是「上次怎麼回答」,而是「這種世界狀態下,哪一種認知組織最值得再次被喚起」。