Manuscript Offprint

arXiv:2610.17926

CineMem: Attention-Aligned Fine-grained Memory Retrieval for Multi-Shot Long Video Generation

Xiaoxue Wu, Xinyu Gao, Fang Yu, Yu Qiao, Xinyuan Chen

Xiaoxue Wu 1,2∗^{1,2*}, Xinyu Gao 3^{3}, Fang Yu 1,4^{1,4}, Yu Qiao 1†^{1\dagger}, Xinyuan Chen 1†^{1\dagger}

1^{1}Shanghai Artificial Intelligence Laboratory

2^{2}Fudan University

3^{3}Shanghai Jiao Tong University

4^{4}East China Normal University

Figure

An older man watches a table in a quiet room; the camera cuts from his face to the table, focuses on a vintage radio, and returns to his relaxed expression.

History (Clustered)

Memory Retrieval

AR Rollout

Figure

Current Chunk

A snowy cabin is shown before cutting to a distant volcano, returning to the same cabin from the same viewpoint, and finally shifting to a nearby stream.

Three people are having an intense conversation at a dining table, with alternating shot/reverse shot views capturing the conversation from each speaker's perspective.

Figure 1: 15-second multi-shot videos autoregressively generated by CineMem. By combining clustered memory with fine-grained query-adaptive retrieval, CineMem maintains coherent semantic flow across shot transitions, particularly in revisitation scenarios. Project page: https://uknowsth.github.io/CineMem/

ABSTRACT

Autoregressive video generation relies on memory retrieval to model long-range dependencies. This capability becomes particularly critical for multi-shot generation, where models must reconcile substantial visual changes across shot transitions with persistent semantic continuity. Existing methods tend to perform memory retrieval at the frame level and share the same historical context across all query tokens, overlooking the heterogeneous information needs and leading to redundant retrieval and inefficient use of historical memory. To bridge this gap, we introduce CineMem, an attention-aligned fine-grained memory retrieval framework that combines online memory organization with query-adaptive retrieval for autoregressive multi-shot video generation. Specifically, guided by intrinsic memory-access patterns revealed through attention analysis, we propose an online-clustered KV cache as a memory organization strategy over all historical tokens, enabling semantic-aware memory grouping and more precise retrieval. In addition, we introduce a query-level retrieval mechanism that provides broader

∗^{*}Work done during an internship at Shanghai AI Laboratory.

†^{\dagger}Corresponding authors.

access to historical information under a fixed retrieval budget, thereby improving long-term memory utilization. Together, these designs enable the multi-shot video generator to preserve long-range consistency across shot transitions, particularly in revisitation scenarios, while approximating full-memory access under a constrained memory budget. To facilitate evaluation, we further introduce a suite of task-specific, VLM-assisted metrics for faithful inter-shot consistency assessment. Extensive experiments demonstrate the effectiveness of our framework.

1 INTRODUCTION

Building on bidirectional architectures and extensive pre-training, recent diffusion models (Blattmann et al., 2023; Ho et al., 2020; Rombach et al., 2022; Song et al., 2020) deliver impressive visual quality, but at substantial computational cost for long-duration generation. Autoregressive generation offers a natural alternative for streaming video synthesis, typically combining a sliding-window mechanism with memory routing to maintain long-range consistency and stable generation (Huang et al., 2026; Yin et al., 2025). This capability is particularly important for multi-shot video generation (Guo et al., 2025b; Luo et al., 2026), which aims to synthesize coherent, film-like narratives through frequent shot transitions accompanied by substantial viewpoint changes. Maintaining a continuous and coherent narrative flow across discrete shot boundaries naturally calls for a well-designed memory retrieval strategy, especially when previously observed subjects, scenes, or viewpoints reappear after intervening shots.

Existing memory mechanisms for causal video generation remain generally coarse-grained. Basic sliding-window strategies are widely adopted in single-shot causal models (Huang et al., 2026; Yang et al., 2025), inevitably discarding distant information as autoregressive rollout proceeds. In multi-shot scenarios, some methods preserve temporally predefined anchors as persistent memory (Chen et al., 2026b), such as the first frames of individual shots. These designs follow fixed routing patterns determined by temporal structures rather than the model's intrinsic memory-access patterns, limiting their ability to fully exploit historical information. More recent studies introduce retrieval-based memory strategies (Meng et al., 2026a; Luo et al., 2026), which typically augment fixed sinks and adjacent context with frame-level routing. The resulting routing decision is shared across all query tokens. Although such designs allow content-aware access to historical cues, they still rely on coarse temporal grouping and overlook heterogeneous memory requirements across queries. Consequently, long-horizon autoregressive generation remains constrained by frame-level historical conditioning, leaving much of the available memory underutilized.

In this work, we explore how an autoregressive multi-shot video model can retrieve long-term historical information under a constrained memory budget by leveraging its intrinsic memory-access patterns. Rather than merely preserving adjacent-frame information for pixel-level continuity, memory in multi-shot scenarios should support the recovery of previously observed visual content after multiple shot transitions, a setting we refer to as revisitation. To this end, we propose CineMem, an attention-aligned fine-grained memory retrieval framework that combines online memory organization with query-adaptive retrieval for autoregressive multi-shot video generation. By adapting memory organization and retrieval granularity to attention-based selection patterns, CineMem enables more effective access to long-term history and improves long-range consistency across shot transitions, particularly in revisitation scenarios, as illustrated in Figure 1.

To investigate the intrinsic memory-access patterns of autoregressive diffusion models, we first develop a training framework that converts a bidirectional video model into a long-duration autoregressive multi-shot generator operating in a chunk-by-chunk manner, while allowing each current chunk to attend to the full generation history. To stabilize long-horizon rollout, we further incorporate an error accumulation mitigation strategy during adaptation. We then analyze the attention distributions between query tokens in the current chunk and all historical memory tokens. We observe a clear clustering structure among historical memory tokens and substantial variation in retrieval preferences across query tokens and attention heads. These observations motivate our designs for online memory organization and query-adaptive retrieval.

Specifically, our framework comprises two complementary designs, as illustrated in Figure 2. First, we apply online clustering to the KV cache to organize historical memory throughout autoregressive rollout. As generation proceeds, historical tokens are grouped according to their semantic similarity,

Figure

Figure 2: Overview of CineMem. Existing autoregressive video generation methods tend to perform memory retrieval at the frame level, which may result in redundant retrieval, inefficient memory utilization, and overlooked heterogeneous information needs across query tokens. CineMem combines an online-clustered KV cache with query-adaptive retrieval to enable a finer-grained memory retrieval strategy. As illustrated by the attention receptive fields, CineMem provides broader (2/3 vs. 12/12) access to historical information under the same retrieval budget.

with each cluster serving as a retrieval unit. In contrast to conventional frame-level schemes that partition tokens by fixed frame membership regardless of content, our design forms content-aware groups, which alleviates the redundancy introduced by retrieving entire frames, while avoiding the high computational cost of treating every historical token as an individual memory unit. Second, we introduce query-adaptive memory access in a query-wise and head-wise manner. Given their heterogeneous retrieval preferences, each query-head pair selects its most relevant clusters from memory. Under a fixed per-query memory budget, this individualized retrieval provides broader access to the generation history, yielding a larger effective attention receptive field without increasing the retrieval cost. Together, these designs better match intrinsic memory-access patterns while balancing retrieval granularity, historical coverage, and computational efficiency, enabling CineMem to maintain long-range consistency across frequent shot transitions.

For evaluation, we adopt a comprehensive protocol covering video-level quality, intra-shot consistency, and inter-shot consistency. Since conventional similarity-based metrics can assign deceptively high inter-shot consistency scores to videos that fail to perform the intended shot transition, we further introduce a VLM-assisted evaluation protocol that jointly considers transition execution and semantic preservation. This provides a more faithful assessment of inter-shot consistency in multi-shot generation. Experimental results show that CineMem achieves superior consistency compared with existing autoregressive baselines while remaining competitive with large-scale bidirectional models. Moreover, our attention-aligned retrieval designs are effective in a plug-in setting without additional fine-tuning, demonstrating their ability to better exploit historical information during autoregressive rollout. Overall, our work highlights the importance of fine-grained memory organization and retrieval for coherent long-horizon autoregressive multi-shot video generation.

References (90)