# HFMU-018｜Epistemic Cache under Uncertainty

## 0. 已知 gap 拿掉了

HFMU-017 假設 obligation 會在已知的 $g$ 步後回來。

HFMU-018 改成 return time 不知道，agent 只能用 conditional hazard：

$$
h_t=P(T=t+1\mid T>t).
$$

因此 forgetting 由：

$$
\boxed{
\text{return probability}
+
\text{memory price}
+
\text{relearning price}
}
$$

共同決定。

**作者：** Neo.K  
**機構：** EveMissLab／一言諾科技有限公司  
**日期：** 2026-10-07（整理日期；原稿未標註日期）  
**版本：** 原稿未標註（本次整理版）  

---

## 1. Stochastic cache rule

本輪 maintained rank：

$$
r\in\{2,3,4,5\}.
$$

每步 holding cost：

$$
\lambda2^r.
$$

full obligation 回來時，缺少的 $5-r$ 個 predictive bits 必須重學。

所以：

$$
\boxed{
c_t(r)=\lambda2^r+h_t\kappa(5-r).
}
$$

相鄰 rank 的 threshold：

$$
5\leftrightarrow4:\ h=0.16,
$$

$$
4\leftrightarrow3:\ h=0.08,
$$

$$
3\leftrightarrow2:\ h=0.04.
$$

---

## 2. Memoryless 的負結果

若：

$$
T\sim\operatorname{Geometric}(h),
$$

則：

$$
h_t=h
$$

永遠不變。

因此最優 retained rank 也永遠不變。

代表值：

| Constant hazard | 最優 rank | states |
|---:|---:|---:|
| 0.02 | 2 | 4 |
| 0.05 | 3 | 8 |
| 0.10 | 4 | 16 |
| 0.20 | 5 | 32 |

所以：

$$
\boxed{
\text{age alone}
\not\Rightarrow
\text{optimal forgetting}.
}
$$

如果 return process 真是 memoryless，「已經很久沒用」並不降低下一步再用到它的機率。

---

## 3. 真正的 aging 來自 posterior hazard decay

現在使用兩種 return mode：

$$
P(F)=0.7,\qquad h_F=0.25,
$$

$$
P(S)=0.3,\qquad h_S=0.02.
$$

初始 hazard：

$$
h_0=0.181000.
$$

隨著 obligation 一直沒回來，posterior 逐漸偏向 slow mode。

本輪最優 rank 首次降到：

- rank 4：age **2**
- rank 3：age **8**
- rank 2：age **12**

所以：

$$
\boxed{
5\to4\to3\to2
}
$$

是由「一直沒回來」這個 evidence 自己觸發。

---

## 4. Adaptive policy 的期望成本

| Policy | Expected cost |
|---|---:|
| eager rank-2 | 3.712000 |
| 永遠 rank-5 | 5.696000 |
| 最佳固定 rank-3 | 3.424000 |
| **posterior-hazard adaptive** | **2.886088** |

adaptive 相對最佳固定策略節省：

$$
\boxed{
0.537912
}
$$

相對 eager forgetting 節省：

$$
\boxed{
0.825912
}
$$

相對永遠 full retention 節省：

$$
\boxed{
2.809912
}.
$$

所以 posterior-driven coarsening 確實比單一固定 cache 層更有效。

---

## 5. Value-of-Retention

對某個 distinction layer，令：

$$
\Delta M
$$

為多保留該 layer 的 marginal memory cost。

保留的下一步 expected value：

$$
h_t\kappa.
$$

因此：

$$
\boxed{
V_{\mathrm{retain}}
=
h_t\kappa-\lambda\Delta M.
}
$$

若：

$$
V_{\mathrm{retain}}>0,
$$

保留。

若：

$$
V_{\mathrm{retain}}<0,
$$

忘掉。

這就是 stochastic Epistemic Cache 的最小決策律。

---

## 6. 更精確地改寫「久不用就忘」

直覺常說：

> 越久沒用，越該忘。

HFMU-018 顯示更精確的版本應該是：

> **越久沒用，而且「仍然沒被用到」會降低未來 return hazard，才應該越忘。**

也就是：

$$
\boxed{
\text{optimal forgetting is belief-driven, not clock-driven}.
}
$$

---

## 7. 下一步

HFMU-018 還是假設 fast/slow return model 已知。

下一輪應讓 agent 自己從 repeated obligation lifecycles 學：

$$
P(F),\ h_F,\ h_S.
$$

形成：

$$
\boxed{
\text{obligation events}
\to
\text{hazard learning}
\to
\text{cache policy}
\to
\text{future memory state}.
}
$$

也就是 **Meta-Epistemic Cache Learning**。
