WorksComputer Science
Keepsake: Selective Spatial Memory for Long-Horizon Video Generation
Abstract
Long-horizon camera-controlled video generation relies on persistent memory to maintain scene consistency. Existing systems follow two strategies to achieve this consistency. Full-history approaches retain all generated observations, causing unbounded storage and retrieval costs. Selective-construction approaches reduce redundancy, but make one-time retention decisions that are never revisited, even as an observation's value changes with the evolving memory bank. Both strategies leave a shared question unresolved: as the generated history evolves, which stored observations should still remain in memory? Our key insight is that the value of a stored observation is not fixed, but relational: it depends on the alternatives currently available in the memory bank. A view supported by many geometrically and visually similar substitutes can be relinquished with little loss of coverage, whereas an observation with few viable alternatives should remain regardless of age. We introduce Keepsake, an online, training-free controller for fixed-capacity spatial memory. At each update, Keepsake constructs a pose-appearance graph over retained and newly generated observations, combining camera-pose proximity with visual similarity. A retention priority jointly captures the number of strong substitutes and the similarity of the closest alternative, allowing Keepsake to continually reassess memory value, preserve observations with little alternative support, and evict highly replaceable ones under a fixed budget. The controller modifies only the persistent-memory update; the host generator, denoising schedule, and retrieval rule remain unchanged. Across MemCam and WorldMem, Keepsake improves FVD and LPIPS under a fixed memory budget. On 180-second MemCam trajectories, it retains only 32 of 5,397 frames while reducing FVD by 35.1%.
Introduction
Camera-controlled video generation enables deliberate viewpoint navigation within generated scenes, supporting interactive exploration and controllable content creation. Extending this capability to long horizons requires preserving scene consistency beyond the model’s immediate temporal context, particularly when previously observed regions are revisited after substantial temporal gaps. Recent memory-augmented methods address this challenge by maintaining historical observations associated with camera states, retrieving relevant evidence for subsequent generation, and writing newly generated observations back into persistent memory Gao et al. [3]; Xiao et al. [23]; Yu et al. [27]; Li et al. (2025). Each generation step is therefore both an output and a potential source of evidence for future generation.
Existing spatial-memory systems commonly retain the full generation history and rely on retrieval to select relevant observations at query time Gao et al. [3]; Xiao et al. [23]. This strategy introduces two coupled limitations. First, the memory archive grows continuously with generation, leading to increasing retrieval overhead as the number of stored observations expands (Figure 1(a)). Second, quality degradation can persist in the memory archive, allowing drifted observations to be repeatedly retrieved and reused. As shown in Figure 1(b), memories with well-matched viewpoints can still deviate substantially from the established scene, indicating that geometric relevance alone does not guarantee reliable memory. Figure 1(c) further shows the resulting inconsistency when the camera revisits the same region, where the regenerated scene no longer matches its earlier appearance.
Figure 1. What should remain in memory? Unbounded memory versus our budgeted memory in MemCam. (a) Retained-frame count and CPU lookup latency per query. (b) DINO feature cosine distance from selected historical frames to reference frames over generation time; lower is better. (c) A camera-revisit example, with boxes highlighting corresponding scene regions.
Selective-construction approaches reduce redundant accumulation through spatial admission, keyframe selection, or memory merging Li et al. (2025); Wang et al. [20]; Yu et al. [28]. However, these decisions are typically made only when an observation is written and are not revisited as the memory evolves. This is limiting because the value of a stored observation is inherently dynamic: a view that is unique at admission may later become redundant as similar evidence accumulates, while an older view with few substitutes may remain important. This raises a shared question across existing memory strategies: as generation proceeds, which observations should still remain in memory?
We formulate this as a dynamic reassessment problem. The retention value of an observation is relational rather than intrinsic, depending on the alternatives currently available in memory. A view with several geometrically and visually similar substitutes can be removed with limited loss of coverage, whereas an observation with few viable alternatives should be retained regardless of its age or admission-time novelty. Selective forgetting therefore serves not only to bound memory growth, but also to continually reallocate capacity toward observations that remain most informative.
We introduce KEEPSAKE, an online, training-free, plug-and-play memory controller that dynamically reassesses which observations should remain in memory. At each update, KEEPSAKE pools the retained memory with newly generated observations and constructs a pose–appearance graph whose edge weights combine camera-pose proximity with visual similarity. Each observation is scored by its number of strong substitutes and the similarity of its closest alternative. Low-priority observations, those with many strong substitutes are evicted until a fixed budget is satisfied. Crucially, retention priorities depend on the current candidate set rather than being fixed at admission, so an observation that was previously important can become replaceable as new alternatives arrive. The fixed budget bounds memory growth and retrieval overhead, while dynamic reassessment continually reallocates capacity toward observations that remain most useful.
Our experiments show selective forgetting can improve generation quality while substantially reducing memory size. On fifteen matched 180-second MemCam Gao et al. [3] trajectories, KEEPSAKE retains only 32 observations instead of 5,397 while reducing FVD from 734.2 to 476.6, a 35.1% improvement. On fifteen matched 60-second WorldMem Xiao et al. [23] videos, FVD decreases from 3077.6 to 1116.9. Importantly, simply imposing a memory cap is not sufficient: FIFO retention degrades generation quality relative to full retention, and different bounded policies yield substantially different results under the same budget (Table 1). These results show memory quality depends not only on how much history is retained, but also on which observations remain available.
| Models | FVD ↓ | LPIPS ↓ | Subject | Background | Aesthetic | Average | Stored items ↓ | Retrieval ms/query ↓ |
| MemCam | 784.9 | 0.59 | 80.53 | 90.16 | 45.42 | 73.98 | 1825 | 1344.61 |
| MemCam + FIFO | 832.2 | 0.62 | 77.01 | 89.50 | 45.35 | 73.34 | 32 | 39.93 |
| MemCam + MCE | 773.9 | 0.60 | 79.78 | 89.97 | 46.05 | 73.96 | 32 | 54.20 |
| MemCam + K-center | 712.0 | 0.59 | 80.85 | 90.00 | 45.52 | 74.11 | 32 | 43.59 |
| MemCam + KEEPSAKE (Ours) | 690.5 | 0.58 | 81.78 | 90.47 | 46.14 | 74.65 | 32 | 43.77 |
| WorldMem | 3077.6 | 0.65 | 73.87 | 87.53 | 38.37 | 68.66 | 1,200 | 77.92 |
| WorldMem + FIFO | 3554.9 | 0.69 | 72.47 | 86.15 | 36.92 | 68.61 | 32 | 4.670 |
| WorldMem + MCE | 1924.0 | 0.57 | 79.12 | 90.30 | 41.54 | 72.67 | 32 | 4.71 |
| WorldMem + K-center | 1419.6 | 0.56 | 79.60 | 91.58 | 43.04 | 72.84 | 32 | 5.00 |
| WorldMem + KEEPSAKE (Ours) | 1116.9 | 0.53 | 81.71 | 92.95 | 43.72 | 74.05 | 32 | 4.54 |
Table 1. Main quality results on 15 matched 60-second videos within each system. All bounded methods use . For consistency, we report FVD and LPIPS. For efficiency, we report number of stored items in memory and retrieval time needed for the model for each generation chunk. For additional evaluation we also report VBench scores across subject and background consistency, as well as aesthetics and average scores.
Our contributions can be summarized as follows:
We identify a fundamental limitation of growing spatial memory in camera-controlled long-horizon video generation and formulate retention as a dynamic reassessment problem: an
observation’s value depends on the substitutes currently available in memory, rather than its age or admission-time novelty.
We propose KEEPSAKE, a training-free memory controller that continuously reassesses retention value through pose–appearance substitutability, preserving observations with few viable alternatives under a fixed budget.
Experiments on MemCam and WorldMem show that selective forgetting can simultaneously improve long-horizon generation quality and substantially reduce memory and retrieval cost, outperforming both full-history retention and bounded baselines.
Related Work
Camera-Controlled Video Generation. Recent text-to-video and image-to-video models have achieved impressive visual quality and realism [2, 26, 9, 1]. However, they offer limited control over viewpoint evolution. Explicit camera control is therefore essential for applications that require deliberate viewpoint navigation and interactive exploration of a generated scene. Accordingly, recent studies directly condition video generation on camera trajectories [19, 25, 4, 32, 6]. Yang et al. [25]; ); Wang et al. [19] disentangle camera motion from object motion, while He et al. [4] introduce explicit camera-pose conditioning into pretrained video generators. More recent work further improves camera controllability through geometric and correspondence priors, including epipolar constraints, trajectory-based correspondence, monocular depth, and explicit 3D scene representations [32, 6, 22, 14]. Building on camera-controllable video generation, KEEPSAKE focuses on maintaining scene consistency over long horizons, particularly preserving previously observed content when the camera revisits earlier viewpoints after extended exploration.
Long-Horizon Consistency under Camera Control. Long-horizon camera exploration requires preserving scene information beyond the model’s local context, particularly when previously observed regions are revisited after large temporal or viewpoint gaps. Recent methods address this challenge with persistent spatial memory, storing historical observations and retrieving evidence relevant to the current viewpoint [23, 27, 3]. Other approaches organize memory through geometry-aware indexing, spatial correspondence, local spatial memories, or persistent 3D representations to better preserve cross-view consistency [14, 24, 30, 20, 28, 5] (Li et al. 2025). Beyond full-history memory, long-video generation has also explored adaptive memory selection and bounded retention under limited context budgets [8, 15, 10]. However, these methods either retain an expanding archive or make retention decisions primarily at admission time. KEEPSAKE further studies how memory should be maintained as it grows, showing that retaining more historical observations is not always beneficial. It selectively preserves observations that remain useful for future revisits, improving revisit consistency while controlling storage and computation.
Keepsake: Memory Budgeting Method
KEEPSAKE maintains a memory bank of at most observations by reassessing redundancy as new views arrive. The retention priority of an image depends on the alternatives currently available: how many views provide similar evidence, and how closely its strongest alternative matches it. We capture these relationships through a pose-appearance graph that combines camera geometry with visual similarity. At each update, the controller ranks retained and incoming images, favoring views with limited alternative support and removing low-priority observations to satisfy the budget. We pose memory retention as a prospective policy, as in interactive video world models, there is no certainty on where the camera will move next. Figure 2 illustrates this update within the existing generation loop; the generator and retrieval rule remain unchanged. In this section, we cover how our strict memory budgeting is enforced and updated at each step along with construction of the pose-appearance graph.
Figure 2. Overview of KEEPSAKE. Top: KEEPSAKE is inserted into the long-horizon generation loop as a memory-update module. After each generated chunk, it updates the persistent memory while leaving the generator and retrieval rule unchanged. Bottom: Existing memory and newly generated observations are pooled into a candidate bank and organized as a pose-appearance graph, where edge weights combine camera-pose proximity and visual similarity. Node statistics capture both the number of strong substitutes and the similarity to the closest substitute, which jointly determine retention priority. Low-priority observations are evicted until the fixed budget is met. Thumbnails and displayed scores are illustrative.
Fixed-Budget Spatial Memory
At step , the generator produces a video chunk along a prescribed camera trajectory . Let denote the memory bank available before generation, and let be its capacity in stored observations. The retriever selects historical context according to the upcoming camera poses. The generator then synthesizes the next chunk using this context and the preceding chunk :
After generation, the host constructs , the set of new memory observations obtained from . In the image-memory setting, each observation contains a generated frame, its camera pose, and an appearance descriptor. These observations are combined with the existing memory bank to form the candidate set . KEEPSAKE determines which candidates remain:
Only the update rule changes; the generator and retriever remain unchanged. The budget limits the persistent memory bank, rather than merely the context retrieved for a single generation step.
Pose-Appearance Graph
We construct a graph whose nodes are the candidate observations in . Each observation is associated with a camera-to-world pose and a normalized visual descriptor . Here, and denote camera rotation and position, respectively. The edge weight combines camera-pose proximity with descriptor similarity: the former measures closeness in viewing position and direction, while the latter captures visual resemblance. Together, these signals provide a proxy for shared view coverage, which we use to assess redundancy within the memory bank.
Pose distance. We measure camera-pose separation by combining translation and rotation:
where is the median nonzero pairwise translation distance among observations in , and is the rotation angle of . The translation normalization expresses positional separation relative to the current candidate set, while the rotation term accounts for differences in viewing direction. We use when all camera positions coincide and as a numerical floor.
Edge weights. We combine pose proximity and appearance similarity to define the weight between distinct observations:
where controls the relative contribution of geometry and appearance. The exponential converts pose distance into similarity. Since the visual descriptors are normalized, their inner product measures cosine similarity, with negative values clipped to zero. The resulting weights are symmetric and lie in . Larger weights indicate greater similarity between observations, providing the basis for measuring redundancy within the memory bank.
Node degree and maximum similarity. To assess redundancy, we compute two statistics for each observation: its degree in the thresholded graph, which counts strongly similar observations, and its maximum similarity to any other candidate. Thresholding the edge weights at defines an undirected graph , with
For each observation, we compute its degree in this graph and the weight of its strongest alternative:
The degree counts observations with high geometric–visual similarity, while measures the similarity of the closest alternative. These statistics distinguish how many strong alternatives are available from how closely the best one matches the observation. The maximum is computed over all other candidates in , including those whose weights fall below .
Retention Priority
We combine node degree and maximum similarity into a retention priority. Low-degree observations have fewer strongly similar alternatives, while a large maximum similarity indicates a close match elsewhere in the candidate set. We therefore assign:
where higher indicates greater retention priority. The degree-based function decreases as an observation acquires more strongly similar alternatives. Its linear term reaches zero at degree , while the inverse-degree term continues to distinguish nodes beyond this threshold. The remaining term, , increases priority when even the closest alternative is dissimilar. The parameters and control the contributions of inverse degree and maximum similarity, respectively, with specifying the degree threshold.
Retention priorities depend on the current candidate set , rather than being fixed when an observation first enters memory. New observations can provide additional alternatives for an existing view, reducing its priority, while older views with few alternatives remain favored. When the candidate set exceeds the budget, KEEPSAKE computes all priorities once and uses this fixed ranking throughout eviction. Node degrees and maximum similarities are not recomputed after individual removals.
Budgeted Memory Update
At each update, KEEPSAKE evaluates retention priorities over the candidate set . When , it removes the lowest-priority observations eligible for eviction, breaking equal-priority ties by earlier insertion. Otherwise, all observations are retained. Priorities are computed once per update and remain fixed during removal in Algorithm 1. The resulting memory bank supplies candidates to the original retriever, without changing its ranking rule.
Algorithm 1 KEEPSAKE: budgeted memory update
Require: Memory bank $M_{t-1}$, new observations $N_t$, budget $B$
Ensure: Updated memory bank $M_t$, with $|M_t| \le B$
1: $V_t \leftarrow M_{t-1} \cup N_t$
2: if $|V_t| \le B$ then
3: return $V_t$
4: end if
5: Compute edge weights $K(i,j)$ over $V_t$ using {xref}`Eq. (4)`
6: Compute degrees $c_i$ and maximum similarities $k_i^{\max}$ using {xref}`Eq. (6)`
7: Compute retention priorities $u_i$ once using {xref}`Eq. (7)`
8: Rank eviction-eligible observations by increasing $u_i$, breaking ties by earlier insertion
9: $M_t \leftarrow V_t$
10: Remove the first $|V_t| - B$ ranked observations from $M_t$
11: return $M_t$
Computational Cost
Let denote the maximum number of new observations introduced per chunk. Since KEEPSAKE retains at most observations, each update considers at most candidates. Computing pairwise pose–appearance similarities and retention priorities requires time, while sorting adds . The retained archive uses storage, and exhaustive retrieval scores at most candidates per query. Therefore, for fixed and chunk size, memory usage, update cost, and retrieval cost remain bounded independently of video duration. KEEPSAKE modifies only the persistent-memory update and requires no generator retraining or changes to the retrieval rule.
Experiments
We investigate how much spatial memory long-horizon generation needs and how that capacity should be allocated. Our primary comparisons use MemCam and WorldMem, varying memory retention while keeping the generator and retrieval rule unchanged within each system. Comparisons against complete retention test whether a compact memory bank can preserve generation quality; comparisons at matched budgets test whether the choice of retained observations matters.
Experimental Setup
Generation systems and datasets. We evaluate KEEPSAKE in two settings: MemCam ([3]) on the Context-as-Memory dataset ([27]), and WorldMem ([23]) on its Minecraft world-simulation dataset. Each primary evaluation contains fifteen matched 60-second videos. A separate set of fifteen matched 180-second MemCam videos also test longer generation. Within each system, retention policies share the initial inputs, prescribed control sequences, generator checkpoint, generation settings, and random seeds. We report comparisons separately for each system and duration, so that differences between retention policies are measured under the same generation conditions.
Retention baselines. We compare KEEPSAKE with complete retention and three bounded baselines: FIFO, K-center, and Marginal Coverage Eviction (MCE). FIFO prioritizes recency by discarding the oldest eligible observations. K-center selects representatives to improve worst-case coverage, while MCE removes observations whose deletion minimally reduces coverage over representative historical queries. Both coverage-based baselines use geometry and appearance, whereas KEEPSAKE ranks observations by redundancy within the current candidate bank using node degree and maximum similarity. All bounded methods use the same archive budget, with in the main comparison. Additional algorithmic details are provided in the appendix B.1.
Implementation details. We use MemCam with the Wan2.1 1.3B Wan et al. [18] backbone, generating 76-frame sections with 50 denoising steps. For retention scoring, generated images are represented by -normalized DINOv2-Base Quaub et al. (2023) descriptors.
We use WorldMem’s released Minecraft diffusion and VAE checkpoints, generating frames at 128 × 128 resolution with 20 DDIM steps and . For retention scoring, predicted VAE latents are spatially average-pooled to , flattened, and -normalized.
Both systems share the default retention parameters: for pose-appearance weighting, for edge construction, and for retention priority. We evaluate budgets , using for the main comparison.
Evaluation metrics. We measure frame-level fidelity using LPIPS (Zhang et al., [29]), comparing generated frames with ground truth at the corresponding trajectory indices, and video-level distributional quality using FVD (Unterthiner et al., [17]). Lower values indicate better performance for both metrics. We additionally evaluate six VBench (Huang et al., [7]) dimensions: subject consistency, background consistency, motion smoothness, dynamic degree, aesthetic quality, and imaging quality. These dimensions characterize perceptual quality and temporal behavior; we report them individually on a ×100 scale rather than constructing an aggregate score.
Generation Quality under Bounded Memory
Table 1 compares complete retention with bounded-memory policies on the 60-second evaluation suites. With , KEEPSAKE improves both LPIPS and FVD over complete retention in both systems. In MemCam, LPIPS decreases from 0.5916 to 0.5850 and FVD from 784.9 to 690.5. In WorldMem, the corresponding improvements are 0.6523 to 0.5337 and 3077.6 to 116.9. Among budget-matched policies, KEEPSAKE achieves the lowest LPIPS in both systems and the lowest FVD in WorldMem. FIFO, in contrast, worsens both metrics relative to complete retention in both systems. These results show that compact memory can improve generation quality, but imposing a capacity limit alone is insufficient: different retention rules yield substantially different outcomes under the same budget.
MemCam benchmark. We also evaluate KEEPSAKE using MemCam’s original camera round-trip protocol on Context-as-Memory (Tu et al., 2025), covering 90° (153-frame) and 360° (609-frame) trajectories. We include Diffusion Forcing (DFoT) model Song et al. [16] and Geometry Forcing Wu et al. [21] in the comparison as well. As shown in Table 2, KEEPSAKE remains competitive with a memory budget of , achieving higher SSIM and lower LPIPS than MemCam in both settings. On the 360° round trip, PSNR also increases from 14.81 to 16.22 dB.
| Method | , 153 frames: PSNR | , 153 frames: SSIM | , 153 frames: LPIPS | , 609 frames: PSNR | , 609 frames: SSIM | , 609 frames: LPIPS |
| DFoT | 16.76 | 0.47 | 0.39 | 8.94 | 0.25 | 0.61 |
| GeometryForcing | 16.57 | 0.49 | 0.35 | 10.07 | 0.40 | 0.57 |
| MemCam | 17.83 | 0.51 | 0.357 | 14.81 | 0.42 | 0.50 |
| KEEPSAKE | 17.66 | 0.52 | 0.34 | 16.22 | 0.46 | 0.43 |
Table 2. Round-trip and beyond-context evaluation. KEEPSAKE improves most consistency metrics, with larger gains on the more challenging round-trip setting.
Longer rollouts. We evaluate fifteen matched 180-second MemCam trajectories to test bounded retention over a longer generation horizon, keeping the memory budget fixed at . Figure 3a reports this evaluation separately from the 60-second suite. Complete retention stores 5,397 observations by the end of generation, whereas KEEPSAKE retains only 32. Despite this reduction, KEEPSAKE lowers FVD from 734.2 to 476.6 (35.1%). The improvement over complete retention therefore extends to three-minute generation without increasing the memory budget. Visual examples in Figure 4 shows camera revisits maintain consistency with our model.

Figure 3. Generation quality and memory diagnostics. (a) LPIPS and FVD on fifteen matched 180-second MemCam rollouts. (b) View mismatch and memory corruption on fifteen matched 60-second rollouts, measured by DINOv2 cosine distance; whiskers denote 95% trajectory-bootstrap confidence intervals. FIFO and KEEPSAKE use in (a,b). (c) Retention gap measures useful evidence lost through eviction, while selection gap measures the retriever’s failure to select the best evidence that remains in memory. Results are shown on fifteen 180-second trajectories across memory budgets . Lower is better for all metrics.

Figure 4. Qualitative comparison of camera revisits. Examples from 180-second MemCam rollouts (left) and 60-second WorldMem rollouts (right). Rows compare unbounded retention, FIFO, and KEEPSAKE with ; columns show the first visit, an intervening view, and the revisit. Highlighted regions track scene content across visits. KEEPSAKE better preserves the appearance and structure of previously observed regions when the camera returns.
We restrict the 180-second extension to MemCam. In our setup, the original WorldMem configuration does not reliably sustain coherent generation beyond 60 seconds, exhibiting severe visual degradation. We therefore retain the 60-second prediction horizon as the stress-test setting for WorldMem and WorldMem + KEEPSAKE.
Budget Sensitivity and Resource Scaling
Quality across budgets. Table 3 reports the available capacity sweeps without mixing evaluation horizons. In the 180-second MemCam suite, the lowest reported FVD occurs at , while the lowest LPIPS occurs at . WorldMem’s reported 60-second LPIPS is lowest at . Increasing capacity therefore does not consistently improve these within-policy scores. The sweeps characterize a quality–capacity tradeoff; they do not establish a universal best budget or an intrinsic penalty for candidate count.
| Budget | LPIPS | FVD | VBench | Query time |
| MemCam, 180 seconds | ||||
| 16 | 0.5876 | 446.1 | 74.90 | 24.80 ms |
| 32 | 0.5876 | 476.6 | 74.65 | 43.77 ms |
| 64 | 0.5865 | 493.9 | 73.99 | 105.15 ms |
| 128 | 0.5913 | 515.5 | 73.82 | 209.78 ms |
| WorldMem, 60 seconds | ||||
| 16 | 0.525 | 1041.75 | 74.28 | 3.52 ms |
| 32 | 0.534 | 1116.92 | 74.05 | 4.54 ms |
| 64 | 0.545 | 1128.46 | 73.11 | 7.63 ms |
| 128 | 0.577 | 1601.81 | 71.80 | 12.85 ms |
Table 3. Memory-budget ablation study.
Archive growth and retrieval workload. Under complete retention, the candidate pool grows continuously with generation. In MemCam, the mean unbounded candidate count increases from 671.9 in the first 45 seconds to 4,689.5 in the final 45 seconds of a 180-second rollout. In contrast, KEEPSAKE caps the retained archive at 32 observations after each update while preserving the original retrieval interface and the amount of context supplied to the generator. This substantially reduces retrieval workload as generation proceeds. End-to-end generation time is reported in Table 6.
| System | Rollout | Unbounded | KEEPSAKE B32 | Reduction | Speedup |
| MemCam | 60 s | 106.46 min | 65.46 min | 41.00 min (38.5%) | 1.626× |
| MemCam | 180 s | 587.99 min | 193.14 min | 394.85 min (67.2%) | 3.044× |
| WorldMem | 60 s | 12.30 min | 11.85 min | 0.45 min (3.7%) | 1.038× |
Table 6. End-to-end generation time per completed video. Comparisons are made within each system.
Retention and Retrieval Diagnostics
Retrieved-memory quality. Figure 3b shows that better viewpoint alignment does not necessarily imply more reliable historical evidence. Selected memories can match the query geometry while exhibiting greater visual drift, indicating that view relevance and memory fidelity are distinct. This distinction is important in long-horizon generation, because a geometrically suitable memory may still propagate degraded scene content. These results motivate evaluating not only which observations are stored, but also the fidelity of the evidence eventually retrieved from them.
Retention versus retrieval failure. We further decompose memory failure into two retrospective diagnostics: retention gap, measuring useful evidence lost through eviction, and selection gap, measuring the retriever’s shortfall relative to the best evidence still retained. Figure 3c shows full retention removes eviction loss but still exhibits the largest selection gap. In contrast, bounded policies trade a small amount of retention loss for a substantially smaller selection gap. This suggests that a compact archive can make useful evidence easier to retrieve, rather than simply reducing storage.
Discussion and Conclusion
We introduced KEEPSAKE, a training-free controller that maintains fixed-capacity spatial memory by reassessing geometric and visual substitutability as new views arrive. Across MemCam and WorldMem, KEEPSAKE improves FVD and LPIPS over complete retention without changing the generator or retrieval rule. On fifteen matched 180-second MemCam trajectories, it reduces FVD by 35.1% while retaining 32 rather than 5,397 observations. Our diagnostics further distinguish evidence lost through eviction from retained evidence left unselected by retrieval, highlighting archive maintenance as a complement to retrieval. Together, these results demonstrate that selective retention can improve generation quality, not merely reduce storage.
AI USE STATEMENT
In this work, we have used LLMs to retouch paragraphs. We also used AI tools to revise formatting issues for figures and tables.
ETHICS STATEMENT
We do not include any human-related data or anything harmful that might raise ethical issues. Our scope is memory budgeting for long horizon interactive video generation.
REPRODUCIBILITY STATEMENT
We include all our memory policy code in the supplementary materials. We also provide full implementation details in the appendix. Our method is reproducible and testable with other papers due to its plug-and-play nature as well.
REFERENCES
Implementation and Evaluation Details
Evaluation Suites and Matching
Extended rollouts. We evaluate MemCam [3] on Context-as-Memory [27] and WorldMem [23] on its Minecraft world-simulation dataset. The primary evaluation contains fifteen matched 60-second videos per system. A separate MemCam evaluation contains fifteen matched 180-second trajectories. Results are reported separately by system and duration. The MemCam suite also informed policy development.
Within each extended-rollout suite, retention policies share the initial inputs, prescribed control sequences, generator checkpoint, generation settings, and random seeds. Only the persistent-memory update changes. Each policy conditions generation on its own retained archive, allowing retention decisions to affect subsequent outputs. The generator and retrieval rule remain unchanged.
Native camera round trips. We additionally evaluate MemCam + KEEPSAKE using MemCam’s camera-round-trip protocol on Context-as-Memory. The two settings contain 90° round trips of 153 frames and 360° round trips of 609 frames. KEEPSAKE uses in both settings. This benchmark is reported separately from the extended-rollout suites.
Host Configurations and Memory Interfaces
Each MemCam and WorldMem generation job was allocated one NVIDIA H100 PCIe GPU, 16 CPUs, and 64 GiB of host memory. The memcam environment uses Python 3.10 and PyTorch 2.5.1 (CUDA 12.4 build), with the cuda/cuda-12.1.0 module loaded.
MemCam uses Wan2.1 1.3B [18] with 76-frame chunks, 50 denoising steps, and -normalized DINOv2-Base [13] retention descriptors. WorldMem uses its released Minecraft checkpoints at resolution with 20 DDIM steps (); retention descriptors are VAE latents pooled to , flattened, and -normalized. KEEPSAKE preserves native memory representations and retrieval rules: MemCam retrieves one frame per query for 76 context slots per chunk, while WorldMem retrieves eight observations per query.
Metrics and Reporting
Generation quality. LPIPS [29] compares generated frames with ground truth at corresponding trajectory indices, while FVD [17] measures video-level distributional quality. Lower values are better for both. The native round-trip benchmark additionally reports PSNR and SSIM, for which higher values are better. Within each extended-rollout suite, policies are evaluated on the same video cohort with the same metric configuration.
We evaluate standard VBench [7] dimensions: subject consistency, background consistency, aesthetic quality, and imaging quality. Scores are multiplied by 100. Together, these dimensions describe perceptual quality and temporal behavior alongside the reference-based fidelity metrics.
Resource accounting. The memory budget counts retained observations, rather than the context slots filled for an individual generation step. Stored-item counts describe the archive; they are distinct from GPU memory use, host-memory allocation, and storage of generated outputs. Retrieval latency and total generation time are likewise separate quantities.
Retention Policies and Update Details
Retention Baselines
The primary comparisons use complete retention, FIFO, K-center, Marginal Coverage Eviction (MCE), and KEEPSAKE. All bounded policies use in the main comparison. They operate through the host’s persistent-memory interface without replacing its retrieval rule.
Algorithm 2 Archive-Based K-Center Retention
Require: Candidates $P$, historical archive $H$, budget $B$
Require: Protected frames $F$, distance function $d$
Ensure: Retained bank $S$, with $|S| \le B$
1: if $|P| \le B$ then
2: return $P$
3: end if
4: if $H = \varnothing$ then
5: $H \leftarrow P$
6: end if
7: $S \leftarrow F$
8: if $S = \varnothing$ then
9: $p_0 \leftarrow \underset{p \in P}{\arg\min}\ \frac{1}{|H|}\sum_{h \in H} d(h,p)$
10: $S \leftarrow \{p_0\}$
11: end if
12: while $|S| < B$ do
13: $h^\star \leftarrow \underset{h \in H}{\arg\max}\ \underset{s \in S}{\min}\ d(h,s)$
14: $p^\star \leftarrow \underset{p \in P \setminus S}{\arg\min}\ d(h^\star,p)$
15: $S \leftarrow S \cup \{p^\star\}$
16: end while
17: return $S$
Complete retention. All observations admitted by the host remain available for retrieval. The archive grows as new observations arrive, while the number of retrieved context slots follows the original host configuration.
FIFO. When the archive exceeds the budget, FIFO discards the oldest observations eligible for eviction until the capacity constraint is satisfied. Retention is therefore driven by recency rather than geometric or visual substitutability.
K-center. K-center uses geometry and appearance to select representative observations, targeting the distance between the least-covered historical view and the retained archive shown in Algorithm 2. Its objective emphasizes worst-case coverage rather than recency or the number of substitutes for an individual observation.
Marginal Coverage Eviction. MCE uses geometry and appearance to measure collective coverage of representative historical queries. It repeatedly removes the observation whose deletion causes the smallest decrease in coverage shown in Algorithm 3. Unlike KEEPSAKE’s fixed within-update ranking, MCE bases each removal on the marginal coverage contribution to the retained set.
Memory Updates and Protection
At update , the retained bank and incoming observations form the candidate set . If , KEEPSAKE retains all candidates. Otherwise, it removes eviction-eligible observations according to the priorities in Eq. (7).
Protected observations are excluded from eviction but count toward . They are not additional memory outside the budget. Protection must therefore leave enough eligible observations to satisfy the capacity constraint. The resulting archive remains a subset of in the host’s native representation.
Numerical Conventions and Default Parameters
Camera poses are represented as camera-to-world rotations and translations. Translation distances are normalized by the median nonzero pairwise translation distance in the current candidate set, with a floor of . When all positions coincide, the translation scale is set to one. Visual Algorithm 3 Marginal Coverage Eviction (MCE)
Require: Candidates , budget , protected frames Require: Queries , weights , similarities Ensure: Retained bank , with
Define coverage:
while do
end while
return
descriptors are -normalized, and negative cosine similarities are clipped to zero when constructing the pose-appearance affinities.
Self-comparisons are excluded from both the substitute count and maximum similarity. An edge is included when its affinity is at least , whereas maximum similarity is computed over all other candidates, including affinities below . Priorities are computed once over and remain fixed throughout that update’s evictions. Equal-priority ties are broken by earlier insertion. The next update recomputes priorities using the new candidate set.
Table 4 lists the shared parameter settings. The budget sweep varies while holding the other retention parameters fixed.
| Parameter | Role | Value |
| Retained-observation budget | 32 | |
| Pose–appearance weighting | 0.65 | |
| Strong-substitute threshold | 0.65 | |
| Degree saturation threshold | 3 | |
| Inverse-degree weight | 0.5 | |
| Closest-substitute weight | 0.25 |
Table 4. Default retention settings. The same values are used for MemCam and WorldMem.
Additional Numerical Results and Resource Scaling
Long-Horizon Generation
Table 5 provides the numerical values underlying Figure 3a. On the fifteen matched 180-second MemCam trajectories, KEEPSAKE improves both LPIPS and FVD over complete retention and FIFO while maintaining .
| Policy | Retained items | LPIPS | FVD |
| Complete retention | 5,397 | 0.5980 | 734.2 |
| FIFO | 32 | 0.6514 | 677.3 |
| KEEPSAKE | 32 | 0.5876 | 476.6 |
Table 5. Long-horizon MemCam results. Fifteen matched 180-second trajectories; bounded policies use .
Budget Sensitivity
The budget sweep in Table 3 evaluates MemCam at 180 seconds and WorldMem at 60 seconds. In MemCam, the lowest reported FVD occurs at , whereas the lowest LPIPS occurs at . In WorldMem, both metrics are lowest at among the tested budgets. Retrieval time increases with capacity in both systems. These results characterize the operating tradeoff of the retention policy: increasing the budget does not consistently improve generation quality.
Archive and Retrieval Scaling
Let be the maximum number of observations added per chunk. Since the retained bank contains at most observations, a KEEPSAKE update processes at most candidates. For fixed descriptor dimension, direct computation of all pairwise affinities requires work and temporary storage. Sorting the priorities adds work. The persistent archive requires storage for fixed observation sizes.
With a fixed number of retrieval queries per chunk and fixed initial history, complete retention requires archive items and cumulative exhaustive candidate comparisons over chunks. Bounded retention uses at most archived observations and cumulative comparisons. These bounds describe the retained archive and candidate-scoring work, not the generator’s weights, activations, or output buffers.
For the 180-second MemCam evaluation, the mean unbounded candidate count grows from 671.9 in the first 45 seconds to 4,689.5 in the last 45 seconds. KEEPSAKE caps the retained bank at 32 after each update without changing the number of retrieved context slots.
Retention and Retrieval Diagnostics
Generation Evaluations and Common-Source Diagnostics
In the generation evaluations, each policy produces its own video while updating and querying its own archive. The resulting scores therefore reflect the interaction between retention and subsequent generation. The common-source diagnostics instead load policy-selected historical images from the same complete-retention rollout. This separates differences in the selected historical evidence from differences between independently generated videos.
Ground-truth references are used retrospectively to evaluate the selected evidence. They are not inputs to the online retention priority, which uses camera poses and appearance descriptors from the observations currently available to the controller.
View Relevance and Historical-Image Fidelity
Figure 3b distinguishes view mismatch from memory corruption. The former concerns agreement with the queried viewpoint, whereas the latter concerns the fidelity of the selected historical content. Both are measured using DINOv2 cosine distance in the fifteen-trajectory, 60-second common-source comparison. Table 7 gives the means and 95% trajectory-bootstrap confidence intervals shown in the figure.
| Policy | View mismatch | Memory corruption |
| Complete retention | 0.1256 [0.1041, 0.1479] | 0.4871 [0.4012, 0.5716] |
| FIFO | 0.1557 [0.1336, 0.1777] | 0.5022 [0.4195, 0.5835] |
| KEEPSAKE | 0.3254 [0.2579, 0.3964] | 0.4079 [0.3159, 0.4989] |
Table 7. Common-source memory diagnostics. Fifteen 60-second trajectories; bounded policies use . Entries are means with 95% trajectory-bootstrap confidence intervals. Lower distances are better.
KEEPSAKE has higher mean view mismatch but lower mean memory corruption than complete retention in this comparison. The two quantities therefore need to be distinguished: closer agreement with a query viewpoint does not necessarily coincide with higher historical-image fidelity.
Retention Gap and Selection Gap
The retention-selection diagnostic separates two sources of shortfall relative to useful historical evidence. Retention gap measures evidence lost through eviction by comparing the best available full-history evidence with the best evidence still retained. Selection gap measures the retriever’s shortfall relative to the best retained evidence. The comparison uses target ground-truth features retrospectively; neither gap is an online retention objective.
Table 8 records the rounded coordinates in Figure 3c. Complete retention has zero retention gap by construction and a selection gap of 0.2188. At each displayed budget, KEEPSAKE has a smaller retention gap than FIFO, while FIFO has a smaller selection gap. Increasing capacity reduces retention gap but increases selection gap along both plotted policy curves. The diagnostic thus separates preserving evidence from having the existing retriever select it.
| Budget | FIFO | KEEPSAKE | ||
| Retention gap | Selection gap | Retention gap | Selection gap | |
| 16 | 0.1872 | 0.0448 | 0.0669 | 0.1037 |
| 32 | 0.1668 | 0.0646 | 0.0426 | 0.1470 |
| 64 | 0.1429 | 0.0867 | 0.0366 | 0.1596 |
| 128 | 0.1203 | 0.1084 | 0.0298 | 0.1783 |
Table 8. Retention-selection diagnostic at 180 seconds. Rounded coordinates from Figure 3c. Complete retention has retention gap 0 and selection gap 0.2188.
Sensitivity of the Historical-Fidelity Comparison
For the PSNR and SSIM analysis, selected historical images are loaded from the same complete-retention rollout and compared with ground truth at their own historical indices. This evaluates the fidelity of stored content rather than agreement with the current query viewpoint. Across fifteen trajectories, the aggregate KEEPSAKE-minus-complete-retention differences are +4.629 dB PSNR and +0.1512 SSIM.
Table 9 shows how these differences change under two successive restrictions. First, we exclude selection disagreements in which KEEPSAKE chooses the initial conditioning image. We then additionally require both selected observations to have field-of-view overlap of at least 0.80.
| Comparison subset | PSNR (dB) | SSIM |
| Aggregate comparison | +4.629 | +0.1512 |
| Exclude initial-image selection disagreements | +1.060 | +0.0449 |
| Additionally require FOV overlap for both selections | +0.103 | +0.0098 |
Table 9. Sensitivity of historical-image fidelity. Differences are KEEPSAKE minus complete retention on common-source images, evaluated against ground truth at their historical indices. The restrictions are cumulative.
Both confidence intervals for the final restricted comparison include zero. The aggregate advantage therefore depends on the selection distribution and does not establish a general ability to identify higher-fidelity memories at matched viewpoints.
Qualitative Comparisons
We provide two sets of qualitative comparisons. Figure 5 presents additional camera-revisit examples comparing unbounded retention, FIFO, and KEEPSAKE. Figure 6 presents selected common-source queries for which unbounded retention and KEEPSAKE retrieve different historical observations.

Figure 5. Additional camera-revisit examples.

Figure 6. Selected common-source retrieval examples. For identical queries, unbounded retention and KEEPSAKE can retrieve substantially different historical observations.
References
- [1]Andreas Blattmann, Tim Dockhorn, Sumith Kulal, Daniel Mendelevitch, Maciej Kilian, Dominik Lorenz, Yami Levi, Zion English, Vikram Voleti, Adam Letts, et al. Stable video diffusion: Scaling latent video diffusion models to large datasets. arXiv preprint arXiv:2311.15127, 2023.arxiv.org/abs/2311.15127
- [2]Haoxin Chen, Yong Zhang, Xiaodong Cun, Menghan Xia, Xintao Wang, Chao Weng, and Ying Shan. Videocrafter2: Overcoming data limitations for high-quality video diffusion models. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 7310–7320. IEEE, 2024.arxiv.org/abs/2401.09047
- [3]Xinhang Gao, Junlin Guan, Shuhan Luo, Wenzhuo Li, Guanghuan Tan, and Jiacheng Wang. Memcam: Memory-augmented camera control for consistent video generation. arXiv preprint arXiv:2603.26193, 2026.arxiv.org/abs/2603.26193
- [4]Hao He, Yinghao Xu, Yuwei Guo, Gordon Wetzstein, Bo Dai, Hongsheng Li, and Ceyuan Yang. Cameractrl: Enabling camera control for text-to-video generation. arXiv preprint arXiv:2404.02101, 2024.arxiv.org/abs/2404.02101
- [5]Yicong Hong, Yiqun Mei, Chongjian Ge, Yiran Xu, Yang Zhou, Sai Bi, Yannick Hold-Geoffroy, Mike Roberts, Matthew Fisher, Eli Shechtman, et al. Relic: Interactive video world model with long-horizon memory. arXiv preprint arXiv:2512.04040, 2025.arxiv.org/abs/2512.04040
- [6]Chen Hou and Zhibo Chen. Training-free camera control for video generation. arXiv preprint arXiv:2406.10126, 2024.arxiv.org/abs/2406.10126
- [7]Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, Qingyang Jin, Nattapol Chanpaisit, et al. Vbench: Comprehensive benchmark suite for video generative models. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 21807–21818. IEEE, 2024.arxiv.org/abs/2311.17982
- [8]Sihui Ji, Xi Chen, Shuai Yang, Xin Tao, Pengfei Wan, and Hengshuang Zhao. Memflow: Flowing adaptive memory for consistent and efficient long video narratives. arXiv preprint arXiv:2512.14699, 2025.arxiv.org/abs/2512.14699
- [9]Weijie Kong, Q Tian, Z Zhang, R Min, Z Dai, J Zhou, J Xiong, X Li, B Wu, J Zhang, et al. Hun-yuanvideo: A systematic framework for large video generative models, 2025. URL https://arxiv.org/abs/2412.03603, 2(3), 2024.
- [10]Kunyang Li, Mubarak Shah, and Yuzhang Shang. Packcache: A training-free acceleration method for unified autoregressive video generation via compact kv-cache. arXiv preprint arXiv:2601.04359, 2026.arxiv.org/abs/2601.04359
- [13]Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, et al. Dinov2: Learning robust visual features without supervision. arXiv preprint arXiv:2304.07193, 2023.arxiv.org/abs/2304.07193
- [14]Xuanchi Ren, Tianchang Shen, Jiahui Huang, Huan Ling, Yifan Lu, Merlin Nimier-David, Thomas Müller, Alexander Keller, Sanja Fidler, and Jun Gao. Gen3c: 3d-informed world-consistent video generation with precise camera control. In 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6121–6132. IEEE, 2025.arxiv.org/abs/2503.03751
- [15]Shuwei Shi, Zhen Li, Muyao Niu, Chuanhao Li, Bo Zheng, Kaipeng Zhang, and Yingqiang Zheng. Surprise forcing: What to remember, when to skip in long video generation. arXiv preprint arXiv:2607.18436, 2026.arxiv.org/abs/2607.18436
- [16]Kiwhan Song, Boyuan Chen, Max Simchowitz, Yilun Du, Russ Tedrake, and Vincent Sitzmann. History-guided video diffusion. arXiv preprint arXiv:2502.06764, 2025.arxiv.org/abs/2502.06764
- [17]Thomas Unterthiner, Sjoerd Van Steenkiste, Karol Kurach, Raphael Mariner, Marcin Michalski, and Sylvain Gelly. Towards accurate generative models of video: A new metric & challenges. arXiv preprint arXiv:1812.01717, 2018.arxiv.org/abs/1812.01717
- [18]Team Wan, Ang Wang, Baole Ai, Bin Wen, Chaojie Mao, Chen-Wei Xie, Di Chen, Feiwu Yu, Haiming Zhao, Jianxiao Yang, et al. Wan: Open and advanced large-scale video generative models. arXiv preprint arXiv:2503.20314, 2025.arxiv.org/abs/2503.20314
- [19]Zhouxia Wang, Ziyang Yuan, Xintao Wang, Yaowei Li, Tianshui Chen, Menghan Xia, Ping Luo, and Ying Shan. Motionctrl: A unified and flexible motion controller for video generation. In ACM SIGGRAPH 2024 Conference Papers, pp. 1–11, 2024.arxiv.org/abs/2312.03641
- [20]Zun Wang, Han Lin, Jaehong Yoon, Jaemin Cho, Yue Zhang, and Mohit Bansal. Anchorweave: World-consistent video generation with retrieved local spatial memories. In European Conference on Computer Vision, pp. 203–224. Springer, 2026.arxiv.org/abs/2602.14941
- [21]Haoyu Wu, Diankun Wu, Tianyu He, Junliang Guo, Yang Ye, Yueqi Duan, and Jiang Bian. Geometry forcing: Marrying video diffusion and 3d representation for consistent world modeling. In International Conference on Learning Representations, volume 2026, pp. 119186–119209, 2026.arxiv.org/abs/2507.07982
- [22]Zeqi Xiao, Wenqi Ouyang, Yifan Zhou, Shuai Yang, Lei Yang, Jianlou Si, and Xingang Pan. Trajectory attention for fine-grained video motion control. In International Conference on Learning Representations, volume 2025, pp. 102934–102948, 2025.
- [23]Zeqi Xiao, Yushi Lan, Yifan Zhou, Wenqi Ouyang, Shuai Yang, Yanhong Zeng, and Xingang Pan. Worldmem: Long-term consistent world simulation with memory. Advances in Neural Information Processing Systems, 38:49632–49652, 2026.arxiv.org/abs/2504.12369
- [24]Tian-Xing Xu, Zi-Xuan Wang, Guangyuan Wang, Li Hu, Zhongyi Zhang, Peng Zhang, Bang Zhang, and Song-Hai Zhang. Ucm: Unified modeling of camera control and memory with time-aware positional encoding warping for world models. In Proceedings of the Special Interest Group on Computer Graphics and Interactive Techniques Conference Conference Papers, pp. 1–12, 2026.
- [25]Shiyuan Yang, Liang Hou, Haibin Huang, Chongyang Ma, Pengfei Wan, Di Zhang, Xiaodong Chen, and Jing Liao. Direct-a-video: Customized video generation with user-directed camera movement and object motion. In ACM SIGGRAPH 2024 Conference Papers, pp. 1–12, 2024.DOI
- [26]Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Weny i Hong, Xiaohan Zhang, Guanyu Feng, et al. Cogvideox: Text-to-video diffusion models with an expert transformer. In International Conference on Learning Representations, volume 2025, pp. 83048–83077, 2025.arxiv.org/abs/2408.06072
- [27]Jiwen Yu, Jianhong Bai, Yiran Qin, Quande Liu, Xintao Wang, Pengfei Wan, Di Zhang, and Xihui Liu. Context as memory: Scene-consistent interactive long video generation with memory retrieval. In Proceedings of the SIGGRAPH Asia 2025 Conference Papers, pp. 1–11, 2025.arxiv.org/abs/2506.03141
- [28]Wei Yu, Runjia Qian, Yumeng Li, Liquan Wang, Songheng Yin, Dennis Anthony, Yang Ye, Yidi Li, Weiwei Wan, Animesh Garg, et al. Mosaicmem: Hybrid spatial memory for controllable video world models. arXiv preprint arXiv:2603.17117, 2026.arxiv.org/abs/2603.17117
- [29]Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In 2018 IEEE/CVF conference on computer vision and pattern recognition, pp. 586–595. IEEE, 2018.arxiv.org/abs/1801.03924
- [30]Yisu Zhang, Chenjie Cao, Tengfei Wang, Xuhui Zuo, Junta Wu, Jianke Zhu, and Chunchao Guo. Worldstereo: Bridging camera-guided video generation and scene reconstruction via 3d geometric memories. arXiv preprint arXiv:2603.02049, 2026.arxiv.org/abs/2603.02049
- [32]Guangcong Zheng, Teng Li, Rui Jiang, Yehao Lu, Tao Wu, and Xi Li. Cami2v: Camera-controlled image-to-video diffusion model. arXiv preprint arXiv:2410.15957, 2024.arxiv.org/abs/2410.15957

