Momentor: Advancing Video Large Language Model with Fine-Grained Temporal Reasoning

Long Qian, Juncheng Li, Yu Wu, Yaobo Ye, Hao Fei, Tat-Seng Chua, Yueting Zhuang, Siliang Tang

Introduction

Inspired by the success of ChatGPT (OpenAI, 2022), numerous studies across various fields are attempting to integrate Large Language Models (LLMs) with their domain-specific tasks, seeking to bring innovation to these fields. For example, Video Large Language Models (Video-LLMs) such as VideoChat (Li et al., 2023b) and Video-ChatGPT (Maaz et al., 2023) adapt LLM to video modality, striving to merge the understanding, reasoning and interactive skills of LLM with video perception. They typically sample multiple frames from the video, use an image encoder to encode these frames separately, and employ a projection layer (e.g. a linear layer or Q-Former (Li et al., 2023a)) to adapt the visual features to the feature space of an open-source LLM ((Touvron et al., 2023), (Chiang et al., 2023)). By training on video-level captioning and QA tasks, they establish coarse-grained multimodal feature alignment and acquire the capability of instruction following.

Despite being effective, existing Video-LLMs exhibit two limitations: (1) Lack of effective temporal representation. Existing models encode each sampled frame independently and perform feature projection without retaining precise temporal information in visual features. They lack an effective temporal representation for encoding time positions at inputs and expressing temporal positions accurately at outputs. While directly expressing timestamps in text format seems to be a feasible approach, such a method suffers inherently from precision variability and tokenization complexity of decimals in LLM. (2) Lack of segment-level modeling. Existing models mainly focus on capturing of global visual semantics, while neglecting the modeling of segment-level semantics and relationships. They are typically trained on trimmed videos (usually around a few seconds) for video-level semantic alignment (video captioning) and instruction-following (video QA). However, common untrimmed videos generally last for several minutes and consist of multiple segments with various contents. Consequently, existing Video-LLMs are unable to provide appropriate responses based on certain segments specified by the user, or locate the segment containing specific content precisely.

To address these challenges, we propose Momentor, a Video-LLM with fine-grained temporal awareness and segment-level reasoning capability. To enhance temporal modeling, we introduce innovations in both model architecture and training methodology. For model architecture, we present Temporal Perception Module, which is designed to flexibly represent accurate temporal positions within videos and inject temporal information into frame features. Temporal Perception Module extends the LLM’s vocabulary with a series of temporal tokens designed for temporal positioning and encoding, allowing LLM to precisely perceive fine-grained temporal information and flexibly output accurate timestamps. To avoid the quantization error in representing time with discrete tokens, we incorporate a continuous interpolation mechanism and construct a continuous temporal feature space on top of these temporal tokens. Further, we design a neighboring token propagation mechanism, which propagates the parameter updates of each temporal token to its neighboring tokens to enhance the quality and continuity of the temporal representations. For training, we propose a Grounded Event-Sequence Modeling stage, which trains Momentor to consecutively ground each event in the untrimmed video and caption the corresponding segment with aligned timestamps. Such a temporally grounded event-sequence decoding training bridges the gap between coarse-grained video-level understanding and fine-grained segment-level grounding. It enables Momentor to learn the temporal token space and understand untrimmed videos with complex event sequences.

With fine-grained temporal modeling, we expect that Momentor can learn to perform various segment-level reasoning tasks via instruction tuning. However, existing video instruction datasets do not include segment-level instruction data. Therefore, we propose Moment-10M, a large-scale video instruction fine-tuning dataset with extensive segment-level annotations (e.g., actions, tracks). To construct Moment-10M, We design an innovative and automatic data generation engine. Specifically, given a video, we first track all the instances in the video. Then, we design an event boundary detection algorithm to temporally segment the video into coherent events based on video content and instance behaviours. After that, we develop a structured information extraction framework to derive instance, attribute, and event information from the video. We apply a LLM (Chiang et al., 2023) to synthesize these information and generate instruction data. To facilitate comprehensive segment-level reasoning, we design not only single-segment tasks that involve only a single segment, but also cross-segment tasks, which require reasoning over multiple segments to provide correct responses. Employing the data generation engine, we generated 10 million instructions to form Moment-10M. As shown in Table 1, Moment-10M comprises 1.5 million segments and 451.5 thousand instance tracks while featuring a larger number of videos as well as significantly longer video durations.

We conduct extensive experiments with our proposed Momentor. The results indicate that our Momentor outperforms previous Video-LLMs in multiple tasks involving precise temporal position, such as temporal grounding, dense captioning, action segmentation, and highlight detection. Momentor demonstrates advanced proficiency in temporal perception. It can provide appropriate responses based on user-indicated segments as well as quickly locate target segments that meet user requirements.

Related Work

Many efforts have been made to transfer the task-handling capability of Large Language Models (LLMs) to the video modality, enabling them to complete various tasks based on video content in accordance with user instructions (Li et al., 2023b; Maaz et al., 2023; Zhang et al., 2023; Luo et al., 2023). Despite being effective in captioning or QA on short videos, the lack of fine-grained temporal modeling in these models prevents them from understanding or locating specific segments in long videos. In contrast, Momentor employs a Temporal Perception Module that integrates a continuous temporal token space for precise temporal positioning and modeling.

2 Temporally Grounded Video Understanding

Fine-grained video understanding tasks usually demand the model to view a video as a series of interconnected events and comprehend or locate them in a temporally grounded manner. For instance, action segmentation (Singh et al., 2016; Sarfraz et al., 2021; Du et al., 2022; Behrmann et al., 2022) requires the model to temporally split the video and output the action label for each segment; temporal grounding (Gao et al., 2017; Zhang et al., 2020b, a) demands the model to identify the start and end timestamps of the video segment corresponding to a given natural language query; highlight detection (Lei et al., 2021; Lin et al., 2023) requires the model to find out the central event in a video from a natural language description and pinpoint all related segments; dense video captioning (Alwassel et al., 2021; Yang et al., 2023) requires the model to list out all events contained in a video along with their start and end timestamps. Previous methods typically train a task-specific model for each task, whereas we aim to design a unified Video-LLM that can solve these tasks in a zero-shot manner.

Momentor

In this section, we present Momentor, a Video-LLM designed for fine-grained comprehension and localization in videos, as shown in Figure 2. To empower Momentor with fine-grained temporal awareness, we propose the Temporal Perception Module (TPM) (Section 3.2), which facilitates precise temporal positioning and fine-grained temporal information injection. To better train TPM, we introduce Grounded Event-Sequence Modeling (Section 3.3) as an additional pre-training stage, which enables Momentor to comprehend videos in a temporally grounded manner and prepares it for segment-level instruction following tasks.

Momentor is composed of a frame encoder (Dosovitskiy et al., 2020), a linear projection layer, a Temporal Perception Module (TPM), and a Large Language Model (LLM) (Touvron et al., 2023). After receiving one input video, Momentor will first uniformly sample multiple frames from the video and encode each frame independently to get frame features. These frame features will be projected into the LLM’s feature space by the linear projection layer. The projected features are then processed in the TPM for temporal information injection, which are then concatenated with tokenized user instructions to be the input of LLM. During training, the frame encoder and LLM are kept frozen, while only the linear projection layer and TPM are updated.

2 Temporal Perception Module (TPM)

We propose the Temporal Perception Module to equip Momentor with fine-grained temporal awareness and provide an interface to express precise temporal positions. Specifically, Temporal Perception Module incorporates a continuous temporal token space and employs neighboring token propagation to facilitate the continuity in token space.

We employ a continuous feature space for precise temporal positioning. Specifically, we uniformly divide the video into N1N-1 segments, and then define NN learnable anchor point features to represent the N2N-2 split points and 22 endpoints, encompassing the relative temporal positions within the video. Then we apply interpolation to define the feature of each temporal point in the timeline, thereby constructing a continuous temporal feature space. With the temporal feature space, we can precisely represent arbitrary temporal positions, enabling Momentor to input or output exact time positions. To unify the training process, we incorporate these anchor point features as specialized temporal tokens into the LLM’s vocabulary, denoted as \langle1\rangle, \langle2\rangle, …, \langleN\rangle, and the outlined feature space is referred as the continuous temporal token space. Therefore, we can train Momentor in an auto-aggressive manner using a unified language modeling loss. Studies like Vid2Seq (Yang et al., 2023) also add specialized tokens to the text decoder’s vocabulary to express temporal positions. However, they directly use the discrete tokens for temporal positioning in continuous timelines, which introduces quantization error and prevents them from precise temporal localization. In contrast, our approach solves this problem by constructing a continuous temporal token space on top of these temporal tokens, thereby avoiding quantization error and enabling precise temporal position representation.

Neighboring Token Propagation.

Unlike language tokens, temporal tokens have a clear sequential relationship. We expect continuity among these temporal tokens, meaning that the embeddings of adjacent tokens should be more similar to each other than those of tokens that are farther apart. However, existing models that use discretized tokens to represent temporal positions have not incorporated any techniques to highlight such continuity. To tackle this issue, we employ a neighboring token propagation mechanism, which enhances continuity by propagating the parameter updates of one temporal token to its adjacent tokens. For any temporal token \langlek\rangle involved in the training process, we have:

Temporal Information Injection.

Since each sampled frame is encoded and projected separately, their features do not contain the corresponding temporal position information. After constructing a continuous temporal token space and applying the neighboring token propagation, now we can actually obtain temporal embeddings corresponding to any timestamp, which contain precise temporal position information and possess the valuable property of temporal continuity. Therefore, we obtain the temporal embeddings at the positions of the sampled frames and directly add them to the frame features, serving as a form of temporal position encoding to inject fine-grained temporal information.

3 Grounded Event-Sequence Modeling

Common untrimmed videos often span several minutes and contain numerous events with diversified content. To facilitate multi-event comprehension, we introduce Grounded Event-Sequence Modeling, an additional pre-training stage focusing on event-sequence decoding, which enables the Temporal Perception Module to align its temporal token space with video timelines and comprehend events in a temporally-grounded manner. We conduct Grounded Event-Sequence Modeling after modality alignment, building temporal awareness upon the aligned multimodal semantics.

To align the visual and textual modalities, we train the linear projection layer with a broadly collected dataset of image-text and video-text pairs:

where TCiT_{C}^{i} is the ii th token of the image or video caption TCT_{C}, and TvT_{v} is the frame features.

Event-Sequence Decoding.

After the stage of modality alignment, the model only learns the coarse-grained correspondence between visual and textual data. It still lacks fine-grained temporal awareness, so fine-tuning it directly on instruction data with precise timestamps can lead to slow convergence and ineffective event-sequence modeling. Therefore, we apply event-sequence decoding as an intermediary task that bridges the gap between low-level semantic alignment and high-level conceptual interaction. To be precise, given an untrimmed video as input, we require the model to output the event-sequence within it. We represent the kk th event as Ek=[tstartk,tendk,w1k,...,wlkk]E_{k}=[t_{start}^{k},t_{end}^{k},w_{1}^{k},...,w_{l_{k}}^{k}], where tstartkt_{start}^{k}, tendkt_{end}^{k} are the continuous temporal embeddings at the start and end of the kk th event, and [w1k,...,wlkk][w_{1}^{k},...,w_{l_{k}}^{k}] is a general caption composed of lkl_{k} tokens for this event. The timestamps and general captions of each event in the event-sequence can be conveniently obtained during the construction of the instance-event matrix, without additional calculation (see Section 4.1). We concatenate all the events to formulate the event-sequence TE={Ei}i=1NET_{E}=\{E_{i}\}_{i=1}^{N_{E}}, where NEN_{E} is the number of events in the untrimmed video. We apply a language modeling loss for event-sequence decoding:

where TEiT_{E}^{i} is the ii th token of the event-sequence TET_{E}, and TvT_{v} is the frame features. With Grounded Event-Sequence Modeling, we establish a preliminary association between the temporal token space and the relative temporal positions within videos, laying the groundwork for segment-level instruction following.

Moment-10M

Teaching a Video-LLM to locate specific segments in untrimmed videos and perform complex reasoning on these segments requires substantial training data with fine-grained annotation. However, existing video instruction datasets don’t contain instructions with precise timestamps, and their task formats are often limited to captioning, summarizing and basic QA, which overlook the logical associations between events and instances. In light of this, we propose Moment-10M, a large-scale video instruction fine-tuning dataset with segment-level reasoning tasks. To construct Moment-10M, we design a data generation engine that can automatically extract instance and event information along with their relationships from the videos, and then generate corresponding instruction data based on these information, as shown in Figure 3. We meticulously design various types of instruction-following tasks, aiming to enhance Momentor in comprehensive segment-level reasoning.

The relationships between instances and events in an untrimmed video can be extremely complex. A particular instance might appear in different events that are far apart, and an event might contain several instances that seem unrelated. To fully explore the associations between instances and events within a video, we propose an Event Boundary Detection algorithm that can accurately detect the event boundaries in the video based on the instance information and video content. We then construct an Instance-Event Matrix, to extract and organize the visual information in a structured way, where the spatio-temporal correspondences from a video can be effectively captured.

For an arbitrary video to be processed, we first uniformly sample multiple frames from the video. We employ Grounding DINO (Liu et al., 2023) to extract instance information from these sampled frames, and then compare and merge the instances across the sampled frames to obtain the spatio-temporal trajectories of instances in the video, termed as instance tracks. The instance tracks show the dynamics of each instance over time, which also reflect the event transitions in the video. Based on video content and instance dynamics, we design a comprehensive event boundary detection method. We first use PySceneDetect (Castellano, 2018) to calculate frame-by-frame differences in the video, resulting in an array of frame difference scores. Then, we apply a Gaussian filter to reduce noise and smooth these scores. We select local maxima that are higher than a certain threshold as split points, to divide the video into several sub-segments. Since such segmentation only considers changes in RGB values and doesn’t account for semantic transitions, we adopt a semantic-based merging algorithm to merge adjacent sub-segments that experience abrupt visual changes but still belong to the same event. To be precise, for the two adjacent sub-segments, we extract the last frame from the previous sub-segment and the first frame from the next sub-segment and calculate their consistency value as:

where FF^{{}^{\prime}} and FF^{{}^{\prime\prime}} are visual features of the last frame in the previous sub-segment and the first frame in the next sub-segment, and UIU_{I} is the union of instances shown in these two frames. FIiF_{I_{i}}^{{}^{\prime}} and FIiF_{I_{i}}^{{}^{\prime\prime}} are ROI aligned (He et al., 2017) features of the ii th instance, and Dist(Ii,Ii)Dist(I_{i}^{{}^{\prime}},I_{i}^{{}^{\prime\prime}}) is the normalized distance between the positions of the ii th instance in these two frames with a value in $.Wesetthisdistancetobe1ifthe. We set this distance to be 1 if thei$ th instance appears in only one of these two frames. All visual features involved have been obtained during object detection, thus not incurring additional computational costs. We merge two adjacent sub-segments if their consistency value is higher than a set threshold. Consequently, we obtain a series of segments with semantic consistency, each encompassing a coherent event.

Instance-Event Matrix.

Based on the result of instance tracking and event segmentation, we construct an Instance-Event Matrix, where each row represents an instance track (the video itself also counts as a track), and each column represents an event. Then we traverse the matrix and utilize several multimodal pre-trained models to extract visual clues such as scenes, instances, actions and attributes from each track. With the structured information organized in instance-event matrix, we can quickly generate instruction data that includes various spatio-temporal associations.

2 Instruction Generation

We feed the information in the instance-event matrix into Vicuna (Chiang et al., 2023), an open-source text-based LLM, to generate instruction data. We design various types of instruction-following tasks to comprehensively train and evaluate Video-LLMs. We incorporate 5 tasks focusing on single segment understanding as well as 3 tasks that involve reasoning across multiple segments, as shown in Figure 3. We utilize various prompts to guide Vicuna in generating instruction data for different tasks. Detailed task descriptions and prompts can be found in Appendix C and D. We select a substantial number of videos from YTTemporal-1B (Zellers et al., 2022) to build Moment-10M. Figure 4 shows the distribution of each type of instruction data in Moment-10M. As shown in Table 1, Moment-10M comprises 10 million instruction data over 1.5 million segments and 451.5 thousand instance tracks. On average, each video contains 22.7 segments, which reflects the complexity of the event-sequences in the videos. We fine-tune Momentor on Moment-10M, enabling it to perform segment-level reasoning and localization.

Experiments

To comprehensively evaluate Momentor in fine-grained understanding and precise localization, we assess it in a zero-shot setting across four tasks, i.e., action segmentation, dense video captioning, temporal grounding, and highlight detection, using datasets such as Breakfast (Kuehne et al., 2014), 50 Salads (Stein & McKenna, 2013), ActivityNet Captions (Krishna et al., 2017), Charades-STA (Gao et al., 2017), and QVHighlights (Lei et al., 2021). We also perform evaluation on Video QA datasets such as ActivityNet-QA (Yu et al., 2019), MSRVTT-QA, and MSVD-QA (Xu et al., 2017) to evaluate Momentor in general question answering. Implementation details of Momentor can be found in Appendix B.

2 Action Segmentation

Given a video, action segmentation requires the model to divide the video into multiple non-overlapping segments and assign an action category label to each segment. Since Momentor’s output is free-form text rather than action category labels, we use a sentence transformer (Reimers & Gurevych, 2019) to convert the output from Momentor into features, which are then compared with the features of action category labels to determine their corresponding action categories. We evaluate Momentor on Breakfast and 50 Salads, of which the results can be referenced in Table 2. From the results we can infer: (1) Overall, Momentor can effectively segment and recognize actions in input videos. In the setting of zero-shot action segmentation, Momentor achieves the highest accuracy among existing Video-LLMs. (2) Despite only being trained on generating free-form texts rather than action labels, Momentor’s proficiency in visual information capturing still allows it to effectively generate texts that closely align with action label words, enabling it to perform accurate action classification.

3 Dense Video Captioning

Given a video, dense video captioning requires the model to output all events contained in the video along with their start and end timestamps. We test Momentor on ActivityNet Captions, and the results can be found in Table 2, from which we can conclude: (1) Compared to existing Video-LLMs, Momentor provides more detailed event descriptions and more accurate event boundaries. (2) Thanks to Grounded Event-Sequence Modeling, Momentor can capture the events in a video as completely as possible, while also providing precise start and end timestamps and accurate descriptions of each event. The model’s leading performance just validates our viewpoint.

4 Temporal Grounding

Given a video and a natural language query, temporal grounding requires the model to identify the start and end timestamps of the segment corresponding to the query in the video. We evaluate Momentor on ActivityNet Captions and Charades-STA, with the results available in Table 3. Based on the experiment results, we can draw the following conclusions: (1) Momentor achieves the highest mean IoU (Intersection over Union) among existing Video-LLMs. (2) With the neighboring token propagation mechanism in the Temporal Perception Module, Momentor constructs a continuous and precise temporal token space, laying the foundation for accurate event localization. Ablation studies and visualization in Section 5.7 also validate this point.

5 Highlight Detection

Given a video and a description of the highlight activities within the video, highlight detection requires the model to output all the highlighted segments corresponding to the description. We evaluate Momentor on QVHighlights, and the results can be referenced in Table 3. From these results we can know: (1) Among all existing Video-LLMs, Momentor achieves state-of-the-art performance on highlight detection. (2) Thanks to the multi-event reasoning ability developed on the cross-segment tasks, Momentor can perceive the overall video semantics from a global perspective and effectively comprehend the relationships between different events, which is a key factor in highlight detection.

6 Video QA

We test Momentor on ActivityNet-QA, MSRVTT-QA, and MSVD-QA. As shown in Table 4, Momentor achieves state-of-the-art or comparative performance among Video-LLMs across all tested datasets, demonstrating its capability in coarse-grained video understanding.

7 In-Depth Analysis

We conduct ablation experiments to assess the effectiveness of each component. The experiments are conducted under the following settings: (1) w/o continuous interpolation: We still use temporal tokens to express temporal positions, but without integrating the continuous interpolation mechanism. (2) w/o neighboring token propagation: We use the continuous temporal token space for temporal positioning, but without applying the neighboring token propagation mechanism when training. (3) w/o grounded event-sequence modeling: After modality alignment, we proceed directly to instruction fine-tuning without grounded event-sequence modeling. (4) w/o cross-segment tasks: We remove all instructions from cross-segment tasks and use only single-segment tasks for fine-tuning. We train Momentor with these settings and evaluate performances on ActivityNet Captions (temporal grounding and dense video captioning), Breakfast (action segmentation) and QVHighlights (highlight detection). The results of the ablation experiments can be referenced in Table 5.

Overall, removing any one of these components results in a decrease in the model’s overall performance. From Table 5, we can analyze the impact of removing different components on model performance separately. After removing the continuous interpolation mechanism, due to the quantization error, Momentor experiences a minor decline in localization-related metrics across all tasks, while the caption quality-related metrics are not significantly affected. Removing the neighboring token propagation mechanism leads to a performance drop in all metrics. Without neighboring token propagation, the temporal tokens are updated as multiple unrelated tokens rather than as an ordered sequence, which undermines the temporal representation and modeling. Visualizations of the temporal tokens (Section 8) also confirm this observation. Removing grounded event-sequence modeling leads to a significant performance decline in dense prediction tasks like dense video captioning and action segmentation, which indicates that grounded event-sequence modeling plays an important role in sequential semantics comprehension. The removal of cross-segment tasks has minimal impact on the performance of temporal grounding, as it does not involve cross-segment understanding. Performance on other tasks generally decreases, as both dense video captioning and action segmentation involve comprehension of multiple segments, and highlight detection also requires the model to distinguish between highlight segments and background segments.

Validation of Moment-10M.

We train Video-ChatGPT (Maaz et al., 2023) on our Moment-10M to validate its efficacy in improving fine-grained temporal reasoning. Despite being inefficient in temporal representation, we still use textual timestamps to represent temporal positions since Video-ChatGPT doesn’t provide alternative temporal representation methods. As shown in Figure 6, Video-ChatGPT trained on Moment-10M shows a great improvement on fine-grained temporal reasoning tasks.

Impact of Data Scale.

We train Momentor with different amounts of instruction data, while the proportions of different tasks are kept the same. The results can be referenced in Figure 6. Generally, the model’s performance improves as the amount of training data increases, but slows down once the training data reaches a million-level scale.

Case Studies.

We provide qualitative examples to demonstrate the fine-grained reasoning capability of Momentor. As shown in Figure 7(a), Momentor can integrate visual and textual input for comprehensive localization of target segment. Moreover, even when only a vague scene or requirement description is provided, Momentor can still understand the user’s intent and pinpoint the segment containing relevant information, as exemplified in Figure 7(b). Additionally, although we don’t incorporate spatial modeling, Momentor can still understand which instance the user is referring to and provide appropriate responses, as illustrated in Figure 7(c).

Visualization of Temporal Tokens.

Since temporal tokens are used to represent uniformly distributed temporal positions, we expect them to exhibit continuity in their embeddings. We use PCA (Abdi & Williams, 2010) and t-SNE (Van der Maaten & Hinton, 2008) to reduce the dimensionality of temporal tokens of Momentor and time tokens of Vid2Seq (Yang et al., 2023) into 1D and 2D for visualization. To validate the effectiveness of neighboring token propagation, we also visualize the temporal tokens trained without neighboring token propagation. For a fair comparison, we set the random state of t-SNE fixed to be 0. For the 1D reductions, we use the token indices as the x-axis and the reduced values as the y-axis; for the 2D reductions, we directly use the reduced values as coordinates. We employ a gradient color scheme, where the color of the data points will change progressively with the token index, as shown in Figure 8. It is evident that with neighboring token propagation, the embeddings of temporal tokens in Momentor are significantly more continuous. In contrast, embeddings of temporal tokens without neighboring token propagation and time tokens of Vid2Seq exhibit much less continuity, as their correlation can only be learned indirectly and inefficiently.

Conclusion

We propose Momentor, a Video-LLM with segment-level comprehension and localization capabilities, and Moment-10M, a video instruction dataset comprising 10 million diversified instructions with segment-level annotation. We design a Temporal Perception Module to provide fine-grained temporal representation, and apply Grounded Event-Sequence Modeling to promote multi-event modeling in untrimmed videos. We train Momentor on Moment-10M, enabling it to perform comprehensive segment-level reasoning. Extensive experiments on various tasks demonstrate Momentor’s proficiency in fine-grained video understanding.

Impact Statements

Our dataset, sourced from internet videos, is meticulously curated with stringent privacy safeguards. We acknowledge the potential presence of personal information and have instituted comprehensive measures to ensure its protection. Our model is conscientiously developed to be free from social harm and ethical breaches, embodying our commitment to responsible and beneficial technological advancement.

References

Appendix A Overview

Implementation details of Momentor (Section B).

Descriptions of the tasks in Moment-10M (Section C).

Prompts used for instruction generation (Section D).

Appendix B Implementation

We utilize the CLIP (Radford et al., 2021) ViT-L/14 as the frame encoder and LLaMA (Touvron et al., 2023) (7B) as the LLM. We initialize the linear projection layer with parameters from Video-ChatGPT’s (Maaz et al., 2023) equivalent component. We incorporate N=300N=300 temporal tokens for temporal positioning. For each video, we uniformly sample M=300M=300 frames for fine-grained reasoning. We freeze the frame encoder and LLM during training, while only the linear projection layer and TPM are updated. We train Momentor on 8 A100 GPUs for around 60 hours. Our project is available at https://github.com/DCDmllm/Momentor.

Appendix C Task Formats

Segment Captioning: Given a segment, the Video-LLM is required to output a caption to conclude its content.

Segment QA: Given a segment, the Video-LLM is required to answer questions about that segment.

Instance QA: Given an instance at a certain moment, the Video-LLM is required to answer questions about that instance’s behavior at that moment.

Direct Segment Localization: Given a query text, the Video-LLM is required to locate the described segment in the video and output its timestamp.

Inferential Segment Localization: Given a hypothetical scenario, the Video-LLM is required to find the scene in the video that likely correspond to that scenario and output its timestamp.

Composed Segment Retrieval: Given a source segment and the differences between the target and source segments, the Video-LLM is required to identify the target segment based on the source segment and these differences, and output its timestamp.

Instance Activity Summarizing: Given an instance, the Video-LLM is required to summarize the activities of this instance throughout the entire video.

Cross-Segment QA: Given multiple segments, the Video-LLM is required to combine information from all these segments to answer questions.

Appendix D Prompts

Below are the prompts used for generation of different kinds of instruction data. Due to page length constraints, we have omitted some in-context examples in certain tasks.