Finite horizon and retained-context cost [ftip-00DH]
✍️sourceAGENTDRAFTED
Finite horizon and retained-context cost [ftip-00DH]
✍️sourceAGENTDRAFTED
Counting exposure to retained tokens makes the finite-horizon cost comparison precise. A context cap alone does not guarantee information preservation.
Definition 1. Finite rollout token budget [ftip-00DI]AGENTDRAFTED
Definition 1. Finite rollout token budget [ftip-00DI]AGENTDRAFTED
A rollout has a finite token budget \(T\in \mathbb N_{\geq 1}\) when its history contains at most \(T\) generated positions after the prompt. A comparison fixes \(T\); changing it is a separate compute intervention from changing the retained-context policy.
Definition 2. Context exposure count [ftip-00DJ]AGENTDRAFTED
Definition 2. Context exposure count [ftip-00DJ]AGENTDRAFTED
For a retained-context policy \(\kappa \) and generated history \(h_t\), define its exposure count through budget \(T\) by
\[ E_T(\kappa )=\sum _{t=0}^{T-1}\left |\kappa _t(h_t)\right |. \]This is a finite attention-input proxy. It is not a runtime identity: the implementation may have caching, batching, kernel, and communication costs that are not represented by \(E_T\).
Lemma 3. Prefix-window exposure is uniformly capped [ftip-00DK]AGENTDRAFTED
Lemma 3. Prefix-window exposure is uniformly capped [ftip-00DK]AGENTDRAFTED
Let \(p,w\in \mathbb N_0\) and let \(\kappa ^{p,w}\) be the prefix-window policy of Definition [ftip-00DD]. For every history and every \(t\),
\[ \left |\kappa ^{p,w}_t(h_t)\right |\leq p+w. \]Indeed, at most \(p\) prefix positions and \(w\) recent positions are retained, with overlap or short histories only reducing the count.
Theorem 4. Capped retained context bounds finite exposure work [ftip-00DL]AGENTDRAFTED
Theorem 4. Capped retained context bounds finite exposure work [ftip-00DL]AGENTDRAFTED
Under the hypotheses of Lemma 3, every rollout with budget \(T\) satisfies
\[ E_T(\kappa ^{p,w})\leq T(p+w). \]Proof. Apply the pointwise bound in Lemma 3 to each of the \(T\) nonnegative summands in Definition 2, then sum. This bounds token exposure, not wall-clock runtime or evaluation quality.
Example 5. Warm-up and sliding-window arithmetic [ftip-00DM]AGENTDRAFTED
Example 5. Warm-up and sliding-window arithmetic [ftip-00DM]AGENTDRAFTED
For \(p=3\), \(w=2\), and \(T=6\), the first steps grow the retained set until the cap \(p+w=5\) is reached. The exposure bound is therefore \(E_T\leq 6\cdot 5=30\); the exact count depends on the prompt and stopping convention.
The arithmetic is an FTIP finite consequence, not a runtime measurement from the Prefix Sliding experiments.
Remark 6. A memory cap does not preserve information [ftip-00DN]AGENTDRAFTED
Remark 6. A memory cap does not preserve information [ftip-00DN]AGENTDRAFTED
The bound in Theorem 4 controls the number of retained token positions. It says nothing about whether an omitted token contains a decisive constraint, nor whether the decoder can reconstruct it from the prefix and recent window. A smaller exposure count is therefore not a theorem of equal continuation quality.