Generalized Video Moment Retrieval

## Abstract

Abstract Video moment retrieval pursues an efficient and generalized solution to identify the specific temporal segments within an untrimmed video that correspond to a given language description.
To achieve this goal, we provide a generative diffusion-based framework called MomentDiff, which simulates a typical human retrieval process from random browsing to gradual localization.
Specifically, we first diffuse the real span to random noise, and learn to denoise the random noise to the original span with the guidance of similarity between text and video.
This allows the model to learn a mapping from arbitrary random locations to real moments, enabling the ability to locate segments from random initialization.
Once trained, MomentDiff could sample random temporal segments as initial guesses and iteratively refine them to generate an accurate temporal boundary.
Different from discriminative works ( e.g., based on learnable proposals or queries), MomentDiff with random initialized spans could resist the temporal location biases from datasets.
To evaluate the influence of the temporal location biases, we propose two “anti-bias” datasets with location distribution shifts, named Charades-STA-Len and Charades-STA-Mom.
The experimental results demonstrate that our efficient framework consistently outperforms state-of-the-art methods on three public benchmarks, and exhibits better generalization and robustness on the proposed anti-bias datasets.
The code, model, and anti-bias evaluation datasets are available at https://github.com/IMCCretrieval/MomentDiff .

## 1 Introduction

Video understanding [, , , , , , , , ] is a crucial problem in machine learning [, , , , , , ], which covers various video analysis tasks, such as video classification and action detection.
But both tasks above are limited to predicting predefined action categories.
A more natural and elaborate video understanding process is the ability for machines to match human language descriptions to specific activity segments in a complex video.
Hence, a series of studies [, , , , ] are conducted on Video Moment Retrieval (VMR), with the aim of identifying the moment boundaries ( i.e., the start and end time) within a given video that best semantically correspond to the text query.

Figure: Figure 1: (a) Proposal-predefined methods. Yellow highlights in the timeline represent frequently occurring moments in the dataset. (b) Proposal-learnable methods. (c) Our generative method. (d) We model the VMR task as a process of gradually generating real temporal span from random noise.
Refer to caption: /html/2307.02869/assets/x1.png

As shown in Fig. [1](#S1.F1)(a), early works address the VMR task by designing predefined dense video proposals ( i.e., sliding windows [, , ], anchors [] and 2D map [] ).
Then, the prediction segment is determined based on the maximum similarity score between dense proposals and the query text.
However, these methods have a large redundancy of proposals and the numbers of positive and negative proposals are unbalanced, which limits the learning efficiency [].
To deal with this problem, a series of VMR works [, , , , , , , ] have recently emerged, mainly discussing how to reduce the number of proposals and improve the quality of proposals.
Among them, a promising scheme (Fig. [1](#S1.F1)(b)) is to use sparse and learnable proposals [, , ] or queries [, ] (i.e., soft proposals) to model the statistics of the entire dataset and adaptively predict video segments.
However, these proposal-learnable methods rely on a few specific proposals or queries to fit the location distribution of ground truth moments.
For example, these proposals or queries may tend to focus on video segments where locations in the dataset occur more often (i.e., yellow highlights in Fig. [1](#S1.F1)(b)).
Thus, these methods potentially disregard significant events that transpire in out-of-sample situations.
Recent studies [, ] indicate that VMR models [, , ] may exploit the location biases present in dataset annotations [], while downplaying multimodal interaction content.
This leads to the limited generalization of the model, especially in real-world scenarios with location distribution shifts.

To tackle the above issues, we propose a generative perspective for the VMR task.
As shown in Fig. [1](#S1.F1) (c) and (d), given an untrimmed video and the corresponding text query, we first introduce several random spans as the initial prediction, then employ a diffusion-based denoiser to iteratively refine the random spans by conditioning on similarity relations between the text query and video frames.
A heuristic explanation of our method is that, it can be viewed as a way for humans to quickly retrieve moments of interest in a video.
Specifically, given an unseen video, instead of watching the entire video from beginning to end (which is too slow), humans may first glance through random contents to identify a rough location, and finally iteratively focus on key semantic moments and generate temporal coordinates.
In this way, we do not rely on distribution-specific proposals or queries (as mentioned in the above discriminative approaches) and exhibit more generalization and robustness (Tab. [5](#S4.T5) and Fig. [4](#S4.F4)) when the ground truth location distributions of training and test sets are different.

To implement our idea, we introduce a generative diffusion-based framework, named MomentDiff.
Firstly, MomentDiff extracts feature embeddings for both the input text query and video frames. Subsequently, these text and video embeddings are fed into a similarity-aware condition generator.
This generator modulates the video embeddings with text embeddings to produce text-video fusion embeddings.
The fusion embeddings contain rich semantic information about the similarity relations between the text query and each video frame, so we can use them as a guide to help us generate predictions.
Finally, we develop a Video Moment Denoiser (VMD) that enhances noise perception and enables efficient generation with only a small number of random spans and flexible embedding learning.
Specifically, VMD directly maps randomly initialized spans into the multimodal space, taking them as input together with noise intensities.
Then, VMD iteratively refines spans according to the similarity relations of fusion embeddings, thereby generating true spans from random to real.

Our main contributions are summarized as follows.
1) To the best of our knowledge, we are the first to tackle video moment retrieval from a generative perspective, which does not rely on predefined or learnable proposals and mitigates temporal location biases from datasets.
2) We propose a new framework, MomentDiff, which utilizes diffusion models to iteratively denoise random spans to the correct results.
3) We propose two “anti-bias” datasets with location distribution shifts to evaluate the influence of location biases, named Charades-STA-Len and Charades-STA-Mom.
Extensive experiments demonstrate that MomentDiff is more efficient and transferable than state-of-the-art methods on three public datasets and two anti-bias datasets.

## 2 Related Work

Video Moment Retrieval.
Video moment retrieval [, , , , , , , , ] is a newly researched subject that emphasizes retrieving correlated moments in a video, given a natural language query.
Pioneering works are proposal-based approaches, which employ a "proposal-rank" two-stage pipeline.
Early methods [, , , , ] usually use handcrafted predefined proposals to retrieve moments.
For example, CTRL [] and MCN [] aim to generate video proposals by using sliding windows of different scales.
TGN [] emphasizes temporal information and develops multi-scale candidate solutions through predefined anchors.
2DTAN [] designs a 2D temporal map to enumerate proposals.
However, these dense proposals introduce redundant computation with a large number of negative samples [, ].
Therefore, two types of methods are proposed:
1) Proposal-free methods [, , ] do not use any proposals and are developed to directly regress start and end boundary values or probabilities based on ground-truth segments.
These methods are usually much faster than proposal-based methods.
2) Proposal-learnable methods that use proposal prediction networks [, , ] or learnable queries [, ] to model dataset statistics and adaptively predict video segments.
QSPN [] and APGN [] adaptively obtain discriminative proposals without handcrafted design.
LPNet [] uses learnable proposals to alleviate the redundant calculations in dense proposals.
MomentDETR [] can predict multiple segments using learnable queries.
Since proposal-learnable methods adopt a two-stage prediction [, , ] or implicit iterative [] design, the performance is often better than that of proposal-free methods.
However, proposal-learnable methods explicitly fit the location distribution of target moments.
Thus, models are likely to be inclined to learn location bias in datasets [, ], resulting in limited generalization.
We make no assumptions about the location and instead use random inputs to alleviate this problem.

Diffusion models.
Diffusion Models [, , , ] are inspired by stochastic diffusion processes in non-equilibrium thermodynamics.
The model first defines a Markov chain of diffusion steps to slowly add random noise to the data, and then learns the reverse diffusion process to construct the desired data samples from the noise.
The diffusion-based generation has achieved disruptive achievements in tasks such as vision generation [, , , , , , ] and text generation [].
Motivated by their great success in generative tasks [], diffusion models have been used in image perception tasks such as object detection [] and image segmentation [].
However, diffusion models are less explored for video-text perception tasks.
This paper models similarity-aware multimodal information as coarse-grained cues, which can guide the diffusion model to generate the correct moment boundary from random noise in a gradual manner.
Unlike DiffusionDet [], we avoid a large number of Region of Interest (ROI) features and do not require additional post-processing techniques.
To our knowledge, this is the first study to adapt the diffusion model for video moment retrieval.

## 3 Method

In this section, we first define the problem in Sec. [3.1](#S3.SS1), introduce our framework in Sec. [3.2](#S3.SS2), and describe the inference process in Sec. [3.3](#S3.SS3).

### 3.1 Problem Definition

Suppose an untrimmed video $\mathcal{V}=\{\boldsymbol{v}_{i}\}_{i=1}^{N_{v}}$ is associated with a natural text description $\mathcal{T}=\{\boldsymbol{t}_{i}\}_{i=1}^{N_{t}}$, where $N_{v}$ and $N_{t}$ represent the frame number and word number, respectively.
Under this notation definition,
Video Moment Retrieval (VMR) aims to learn a model $\boldsymbol{\Omega}$ to effectively predict the moment $\hat{\boldsymbol{x}}_{0}=(\hat{\boldsymbol{c}}_{0},\hat{\boldsymbol{w}}_{0})$ that is most relevant to the given text description: $\hat{\boldsymbol{x}}_{0}=\boldsymbol{\Omega}(\mathcal{T},\mathcal{V})$, where $\hat{\boldsymbol{c}}_{0}$ and $\hat{\boldsymbol{w}}_{0}$ represent the center time and duration length of the temporal moments, i.e., predicted spans.

Figure: Figure 2: Our MomentDiff framework, which includes a Similarity-aware Condition Generator (SCG) and a Video Moment Denoiser (VMD). The diffusion process is conducted progressively in VMD.
Refer to caption: /html/2307.02869/assets/x2.png

### 3.2 The MomentDiff Framework

Fig. [2](#S3.F2) sheds light on the generation modeling architecture of our proposed MomentDiff.
Concretely, we first extract frame-level and word-level features by utilizing pre-trained video and text backbone networks.
Afterward, we employ a similarity-aware condition generator to interact text and visual features into fusion embeddings.
Finally, combined with the fusion embeddings, the video moment denoiser can progressively produce accurate temporal targets from random noise.

#### 3.2.1 Visual and Textual Representations.

Before performing multimodal interaction, we should convert the raw data into a continuous feature space.
To demonstrate the generality of our model, we use three distinct visual extractors [, ] to obtain video features $\mathcal{V}$:
1) 2D visual encoder, the VGG model [].
2) 3D visual encoder, the C3D model [].
3) Cross-modal pre-train encoder, the CLIP visual model [].
However, due to the absence of temporal information in CLIP global features, we additionally employ the SlowFast model [] to extract features, which concatenate CLIP features.
Besides, to take full advantage of the video information [], we try to incorporate audio features, which are extracted using a pre-trained PANN model [].
To obtain text features, we try two feature extractors: the Glove model [] and the CLIP textual model to extract 300-d and 512-d text features $\mathcal{T}$, respectively.

#### 3.2.2 Similarity-aware Condition Generator

Unlike generation tasks [] that focus on the veracity and diversity of results, the key to the VMR task is to fully understand the video and sentence information and to mine the similarities between text queries and video segments.
To this end, we need to provide multimodal information to cue the denoising network to learn the implicit relationships in the multimodal space.

A natural idea is to interact and aggregate information between video and text sequences with a multi-layer Transformer [].
Specifically, we first use two multilayer perceptron (MLP) networks to map feature sequences into the common multimodal space:
$\boldsymbol{V}\in\mathbb{R}^{N_{v}\times D}$ and $\boldsymbol{T}\in\mathbb{R}^{N_{t}\times D}$, where $D$ is the embedding dimension.
Then, we employ two cross-attention layers to perform interactions between multiple modalities, where video embeddings $\boldsymbol{V}$ are projected as the query $\boldsymbol{Q}_{v}$, text embeddings $\boldsymbol{T}$ are projected as key $\boldsymbol{K}_{t}$ and value $\boldsymbol{V}_{t}$:
$\boldsymbol{\hat{V}}=\operatorname{softmax}\left(\boldsymbol{Q}_{v}\boldsymbol{K}_{t}^{\mathrm{T}}\right)\boldsymbol{V}_{t}+\boldsymbol{Q}_{v},$
where $\boldsymbol{\hat{V}}\in\mathbb{R}^{N_{v}\times D}$.
To help the model better understand the video sequence relations, we feed $\boldsymbol{\hat{V}}$ into a 2-layer self-attention network, and the final similarity-aware fusion embedding is $\boldsymbol{F}=\operatorname{softmax}\left(\boldsymbol{Q}_{\hat{v}}\boldsymbol{K}_{\hat{v}}^{\mathrm{T}}\right)\boldsymbol{V}_{\hat{v}}+\boldsymbol{Q}_{\hat{v}}$, where $\boldsymbol{Q}_{\hat{v}},\boldsymbol{K}_{\hat{v}},\boldsymbol{V}_{\hat{v}}$ is the matrix obtained from $\boldsymbol{\hat{V}}$ after three different projections respectively.

In the span generation process, even for the same video, the correct video segments corresponding to different text queries are very different.
Since the fusion embedding $\boldsymbol{F}$ serves as the input condition of the denoiser, the quality of $\boldsymbol{F}$ directly affects the denoising process.
To learn similarity relations for $\boldsymbol{F}$ in the multimodal space,
we design the similarity loss $\mathcal{L}_{sim}$,
which contains the pointwise cross entropy loss and the pairwise margin loss:

$$ $\mathcal{L}_{sim}=-\frac{1}{N_{v}}\sum_{i=1}\boldsymbol{y}_{i}*log(\boldsymbol{s}_{i})+(1-\boldsymbol{y}_{i})*log(1-\boldsymbol{s}_{i})+\frac{1}{N_{s}}\sum_{j=1}\max\left(0,\beta+\boldsymbol{s}_{n_{j}}-\boldsymbol{s}_{p_{j}}\right),$ (1) $$

where $\boldsymbol{s}\in\mathbb{R}^{N_{v}}$ is the similarity score, which is obtained by predicting the fusion embedding $\boldsymbol{F}$ through the MLP network.
$\boldsymbol{y}\in\mathbb{R}^{N_{v}}$ is the similarity label, where $\boldsymbol{y}_{i}=1$ if the $i$-th frame is within the ground truth temporal moment and $\boldsymbol{y}_{i}=0$ otherwise.
$\boldsymbol{s}_{p_{j}}$ and $\boldsymbol{s}_{n_{j}}$ are the randomly sampled positive and negative frames.
$N_{s}$ is the number of samples and the margin $\beta=0.2$.
Although $\mathcal{L}_{sim}$ may only help the fusion embedding retain some coarse-grained similarity semantics, this still provides indispensable multimodal information for the denoiser.

#### 3.2.3 Video Moment Denoiser

Recent works [, ] have revealed that previous models [, , ] may rely on the presence of location bias in annotations to achieve seemingly good predictions.
To alleviate this problem, instead of improving distribution-specific proposals or queries, we use random location spans to iteratively obtain real spans from a generative perspective.
In this section, we first introduce the principle of the forward and reverse processes in diffusion models.
Then, we build the diffusion generation process in the video moment denoiser with model distribution $p_{\theta}(\boldsymbol{x}_{0})$ to learn the data distribution $q(\boldsymbol{x}_{0})$.

Figure: Figure 3: Video moment denoiser. For simplicity, we only draw the intensity-aware attention structure that is different from the general Transformer.
Refer to caption: /html/2307.02869/assets/x3.png

Forward process.
During training, we first construct a forward process that corrupts real segment spans $\boldsymbol{x}_{0}\sim q(\boldsymbol{x}_{0})$ to noisy data $\boldsymbol{x}_{m}$, where $m$ is the noisy intensity.
Specifically, the Gaussian noise process of any two consecutive intensities [] can be defined as:
$q\left(\boldsymbol{x}_{m}\mid\boldsymbol{x}_{m-1}\right)=\mathcal{N}\left(\boldsymbol{x}_{m};\sqrt{1-\beta_{m}}\boldsymbol{x}_{m-1},\beta_{m}\mathrm{I}\right),$
where $\beta$ is the variance schedule.
In this way, $\boldsymbol{x}_{m}$ can be constructed by $\boldsymbol{x}_{0}$:
$q\left(\boldsymbol{x}_{1:m}\mid\boldsymbol{x}_{0}\right)=\prod_{i=1}^{m}q\left(\boldsymbol{x}_{i}\mid\boldsymbol{x}_{i-1}\right).$
Benefiting from the reparameterization technique, the final forward process is simplified to:

$$ $\boldsymbol{x}_{m}=\sqrt{\bar{\alpha}_{m}}\boldsymbol{x}_{0}+\sqrt{1-\bar{\alpha}_{m}}\boldsymbol{\epsilon}_{m},$ (2) $$

where the noise $\boldsymbol{\epsilon}_{m}\sim\mathcal{N}(0,\mathrm{I})$ and $\bar{\alpha}_{m}=\prod_{i=1}^{m}(1-\beta_{i})$.

Reverse process.
The denoising process is learning to remove noise asymptotically from $\boldsymbol{x}_{m}$ to $\boldsymbol{x}_{0}$, and its traditional single-step process can be defined as:

$$ $p_{\theta}\left(\mathrm{\boldsymbol{x}}_{m-1}\mid\boldsymbol{x}_{m}\right)=\mathcal{N}\left(\boldsymbol{x}_{m-1};\boldsymbol{\mu}_{\theta}\left(\boldsymbol{x}_{m},m\right),\sigma_{m}^{2}\boldsymbol{I}\right)$ (3) $$

where $\sigma_{m}^{2}$is associated with $\beta_{m}$ and $\boldsymbol{\mu}_{\theta}\left(\boldsymbol{x}_{m},m\right)$ is the predicted mean.
In this paper, we train the Video Moment Denoiser (VMD) to reverse this process.
The difference is that we predict spans from the VMD network $f_{\theta}(\boldsymbol{x}_{m},m,\boldsymbol{F})$ instead of $\boldsymbol{\mu}_{\theta}\left(\boldsymbol{x}_{m},m\right)$.

Denoiser network.
As shown in Fig. [3](#S3.F3), the VMD network mainly consists of 2-layer cross-attention Transformer layers.
Next, we walk through how VMD works step by step.
For clarity, the input span and output prediction presented below are a single vector.

❶ Span normalization.
Unlike generation tasks,
our ground-truth temporal span $\boldsymbol{x}_{0}$ is defined by two parameters $\boldsymbol{c}_{0}$ and $\boldsymbol{w}_{0}$ that have been normalized to $[0,1]$, where $\boldsymbol{c}_{0}$ and $\boldsymbol{w}_{0}$ are the center and length of the span $\boldsymbol{x}_{0}$.
Therefore, in the above forward process, we need to extend its scale to $[-\lambda,\lambda]$ to stay close to the Gaussian distribution [, ].
After the noise addition is completed, we need to clamp $\boldsymbol{x}_{m}$ to $[-\lambda,\lambda]$ and then transform the range to $[0,1]$: $\boldsymbol{x}_{m}=(\boldsymbol{x}_{m}/\lambda+1)/2$, where $\lambda=2$.

❷ Span embedding.
To model the data distribution in multimodal space, we directly project the discrete span to the embedding space through the Fully Connected (FC) layer: $\boldsymbol{x}^{\prime}_{m}=\text{FC}(\boldsymbol{x}_{m})\in\mathbb{R}^{D}$.
Compared to constructing ROI features in DiffusionDet [], linear projection is very flexible and decoupled from conditional information (i.e., fusion embeddings), avoiding more redundancy.

❸ Intensity-aware attention.
The denoiser needs to understand the added noise intensity $m$ during denoising, so we design the intensity-aware attention to perceive the intensity magnitude explicitly.
In Fig. [3](#S3.F3), we use sinusoidal mapping for the noise intensity $m$ to obtain $\boldsymbol{e}_{m}\in\mathbb{R}^{D}$ in the multimodal space and add it to the span embedding.
We project $\boldsymbol{x}^{\prime}_{m}+\boldsymbol{e}_{m}$ as query embedding and
the positional embedding $\boldsymbol{pos}_{m}\in\mathbb{R}^{D}$ is obtained by sinusoidal mapping of $\boldsymbol{x}_{m}$.
We can obtain the input query: $\boldsymbol{Q}_{m}=\text{Concat}(\text{Proj}(\boldsymbol{x}^{\prime}_{m}+\boldsymbol{e}_{m}),\boldsymbol{pos}_{m})$.
Similarly,
The input key is $\boldsymbol{K}_{f}=\text{Concat}(\text{Proj}(\boldsymbol{F}),\boldsymbol{pos}_{f})$
and the input value is $\boldsymbol{V}_{f}=\text{Proj}(\boldsymbol{F})$, where $\text{Proj}(\cdot)$ is the projection function and $\boldsymbol{pos}_{f}\in\mathbb{R}^{D}$ is the standard position embedding in Transformer [].
Thus, the intensity-aware attention is:

$$ $\boldsymbol{{Q}}_{m}=\operatorname{softmax}\left(\boldsymbol{Q}_{m}\boldsymbol{K}_{f}^{\mathrm{T}}\right)\boldsymbol{V}_{f}+\boldsymbol{Q}_{m}.$ (4) $$

❹ Denoising training.
Finally, the generated transformer output is transformed into predicted spans $\boldsymbol{\hat{x}}_{m-1}=(\boldsymbol{\hat{c}}_{m-1},\boldsymbol{\hat{w}}_{m-1})$ and confidence scores $\boldsymbol{\hat{z}}_{m-1}$, which are implemented through a simple FC layer, respectively.
Following [], the network prediction should be as close to ground truth $\boldsymbol{x}_{0}$ as possible.
In addition, inspired by [, ], we define the denoising loss as:

$$ $\mathcal{L}_{\text{vmr}}\left(\boldsymbol{x}_{0},f_{\theta}(\boldsymbol{x}_{m},m,\boldsymbol{F})\right)=\lambda_{\mathrm{L}1}\left\|\boldsymbol{x}_{0}-\boldsymbol{\hat{x}}_{m-1}\right\|+\lambda_{\text{iou }}\mathcal{L}_{\text{iou }}\left(\boldsymbol{x}_{0},\boldsymbol{\hat{x}}_{m-1}\right)+\lambda_{\text{ce}}\mathcal{L}_{ce}(\boldsymbol{\hat{z}}_{m-1}),$ (5) $$

where $\lambda_{\mathrm{L}1}$, $\lambda_{\text{iou}}$ and $\lambda_{\text{ce}}$ are hyperparameters, $\mathcal{L}_{\text{iou}}$ is a generalized IoU loss [], $\mathcal{L}_{\text{ce}}$ is
a cross-entropy loss.
Note that the above procedure is a simplification of training.
Considering that there may be more than one ground truth span in the dataset [], we set the number of input and output spans to $N_{r}$.
For the input, apart from the ground truth, the extra spans are padded with random noise.
For the output,
we calculate the matching cost of each predicted span and ground truth according to $\mathcal{L}_{vmr}$ (i.e., the Hungarian match []), and find the span with the smallest cost to calculate the loss.
In $\mathcal{L}_{\text{ce}}$, we set the confidence label to 1 for the best predicted span and 0 for the remaining spans.

### 3.3 Inference

After training, MomentDiff can be applied to generate temporal moments for video-text pairs including unseen pairs during training.
Specifically, we randomly sample noise $\boldsymbol{\hat{x}}_{m}$ from a Gaussian distribution $\mathcal{N}(0,\mathrm{I})$, the model can remove noise according to the update rule of diffusion models []:

$$ $\displaystyle\boldsymbol{\hat{x}}_{m-1}=$ $\displaystyle\sqrt{\bar{\alpha}_{m-1}}f_{\theta}(\boldsymbol{\hat{x}}_{m},m,\boldsymbol{F})+\sqrt{1-\bar{\alpha}_{m-1}-\sigma_{m}^{2}}\frac{\boldsymbol{\hat{x}}_{m}-\sqrt{\bar{\alpha}_{m}}f_{\theta}(\boldsymbol{\hat{x}}_{m},m,\boldsymbol{F})}{\sqrt{1-\bar{\alpha}_{m}}}+\sigma_{m}\boldsymbol{\epsilon}_{m}.$ (6) $$

As shown in Fig [1](#S1.F1)(d), we iterate this process continuously to obtain $\boldsymbol{\hat{x}}_{0}$ from coarse to fine.
Note that in the last step we directly use $f_{\theta}(\boldsymbol{\hat{x}}_{1},1,\boldsymbol{F})$ as $\boldsymbol{\hat{x}}_{0}$.
In $\boldsymbol{\hat{x}}_{0}$, we choose the span with the highest confidence score in $\boldsymbol{\hat{z}}_{0}$ as the final prediction.
To reduce inference overhead, we do not employ any post-processing techniques, such as box renewal in DiffusionDet [] and self-condition [].

## 4 Experiments

### 4.1 Datasets, Metrics and Implementation Details

Datasets. We evaluate the efficacy of our model by conducting experiments on three representative datasets: Charades-STA [], QVHighlights [] and TACoS [].
The reason is that the above three datasets exhibit diversity.
Charades-STA comprises intricate daily human activities.
QVHighlights contains a broad spectrum of themes, ranging from everyday activities and travel in lifestyle vlogs to social and political events in news videos.
TACoS mainly presents long-form videos featuring culinary activities.
The training and testing divisions are consistent with existing methods [, ].

Metrics. To make fair comparisons, we adopt the same evaluation metrics as those used in previous works [, , , , , , ], namely R1@n, MAP@n, and $\text{MAP}_{avg}$.
Specifically, R1@n is defined as the percentage of testing queries that have at least one correct retrieved moment (with an intersection over union (IoU) greater than n) within the top-1 results.
Similarly, MAP@n is defined as the mean average precision with an IoU greater than n, while $\text{MAP}_{avg}$ is determined as the average MAP@n across multiple IoU thresholds [0.5: 0.05: 0.95].

Implementation details.
For a fair comparison [, , ], we freeze the video encoder and text encoder and use only the extracted features.
For VGG [], C3D [] or SlowFast+CLIP (SF+C) [, ], we extract video features every 1/6s, 1s or 2s.
So the frame number $N_{v}$ is related to the length of the video, while the max text length $N_{t}$ is set to 32.
Note that since the videos in TACoS are long, we uniformly sample the video frame features and set the max frame number $N_{v}$ to 100 in TACoS.
We set the hidden size $D=256$ in all Transformer layers.
In SCG, we also use a variant of the pairwise margin loss called InfoNCE loss [].
The number of random spans $N_{r}$ is set to 10 for QVHighlights, 5 for Charades-STA and TACoS.
We use the cosine schedule for $\beta$.
For all datasets, we optimize MomentDiff for 100 epochs on one NVIDIA Tesla A100 GPU,
employ Adam optimizer [] with 1e-4 weight decay and fix the batch size as 32.
The learning rate is set to 1e-4.
By default, the loss hyperparameters $\lambda_{\mathrm{L}1}=10$, $\lambda_{\text{iou}}=1$ and $\lambda_{\text{ce}}=4$.
The weight values for $\mathcal{L}_{sim}$ and $\mathcal{L}_{vmr}$ are 4 and 1.
To speed up the sampling process during inference, we follow DDIM [] and iterate 50 times.

**Table 1: Performance comparisons (%) on the Charades-STA dataset. "${\star}$" denotes that we re-implement the method under the same training scheme. "A" stands for using audio data.**
| Method | Type | Charades-STA |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| R1@0.5 | R1@0.7 | MAP@0.5 | MAP@0.75 | $\text{MAP}_{avg}$ |  |  |
| MAN [] | VGG, Glove | 41.21 | 20.54 | - | - | - |
| RaNet^⋆[] | VGG, Glove | 42.91 | 25.82 | 53.28 | 24.41 | 28.55 |
| 2DTAN^⋆[] | VGG, Glove | 41.34 | 23.91 | 54.68 | 24.15 | 29.26 |
| DORi [] | VGG, Glove | 43.47 | 26.37 | - | - | - |
| CBLN [] | VGG, Glove | 47.94 | 28.22 | - | - | - |
| DCM [] | VGG, Glove | 47.80 | 28.00 | - | - | - |
| MMN^⋆ [] | VGG, Glove | 46.93 | 27.07 | 58.85 | 28.16 | 31.58 |
| MomentDETR^⋆ [] | VGG, Glove | 50.54 | 28.01 | 57.39 | 25.62 | 29.87 |
| MomentDiff | VGG, Glove | 51.94 | 28.25 | 59.86 | 29.11 | 31.66 |
| UMT [] | VGG+A, Glove | 48.44 | 29.76 | 58.03 | 27.46 | 30.37 |
| MomentDiff | VGG+A, Glove | 52.62 | 29.93 | 60.69 | 29.74 | 31.81 |
| DEBUG[] | C3D, Glove | 37.39 | 17.69 | - | - | - |
| LPNet[] | C3D, Glove | 40.94 | 21.13 | - | - | - |
| VSLNet^⋆[] | C3D, Glove | 48.67 | 30.33 | 56.88 | 25.79 | 30.16 |
| MomentDETR^⋆[] | C3D, Glove | 50.49 | 29.95 | 56.27 | 26.08 | 29.92 |
| MomentDiff | C3D, Glove | 53.79 | 30.18 | 59.32 | 29.85 | 31.89 |
| MomentDETR^⋆ [] | SF+C, C | 53.22 | 30.87 | 58.86 | 26.43 | 30.43 |
| MomentDiff | SF+C, Glove | 55.42 | 32.17 | 60.93 | 32.47 | 32.59 |
| MomentDiff | SF+C, C | 55.57 | 32.42 | 61.07 | 32.51 | 32.85 |

### 4.2 Performance Comparisons

Comparison with state-of-the-art methods.
To prove the effectiveness of MomentDiff, we compare the retrieval performance with 17 discriminative VMR methods.
Tab. [1](#S4.T1), Tab. [4.2](#S4.SS2), and Tab. [4.2](#S4.SS2) show the R1@n, MAP@n, and $\text{MAP}_{avg}$ results on Charades-STA, QVHighlights and TACoS.
Compared with SOTA methods [, , , , , ], MomentDiff achieves significant improvements on Charades-STA regardless of whether 2D features (VGG), multimodal features (VGG+A), 3D features (C3D), or multimodal pre-trained features (SF+C) are used.
This proves that MomentDiff is a universal generative VMR method.
In the other two datasets (QVHighlights and TACoS), we still have highly competitive results.
Specifically, compared to MomentDETR [], MomentDiff obtains 2.35%, 3.86%, and 13.13% average gains in R1@0.5 on three datasets.
It is worth noting that TACoS contains long videos of cooking events where different events are only slightly different in terms of cookware, food and other items.
The learnable queries in MomentDETR may not cope well with such fine-grained dynamic changes.
We attribute the great advantage of MomentDiff over these methods to fully exploiting similarity-aware condition information and progressive refinement denoising.

Figure: Table 2: Performance comparisons (%) on QVHighlights with SF+C video features and CLIP text features. "${\star}$" denotes that we re-implement the method with only segment moment labels. "${\dagger}$" stands for using audio data. MDE is the abbreviation of MomentDETR [].

Figure: Table 3: Performance comparisons (%) on TACoS. We adopt C3D features to encode videos. MDE is the abbreviation of MomentDETR [].

**Table 4: Transfer experiments (%) on Charades-CD (VGG, Glove) and ActivityNet-CD (C3D, Glove).**
| Method | Charades-CD | ActivityNet-CD |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| R1@0.3 | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ | R1@0.3 | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ |  |
| 2DTAN [] | 49.71 | 28.95 | 12.78 | 12.60 | 40.04 | 22.07 | 10.29 | 12.77 |
| MMN [] | 55.91 | 34.56 | 15.84 | 15.73 | 44.13 | 24.69 | 12.22 | 15.06 |
| MomentDETR [] | 57.34 | 41.18 | 19.31 | 18.95 | 39.98 | 21.30 | 10.58 | 12.19 |
| MomentDiff | 67.73 | 47.17 | 22.98 | 22.76 | 45.54 | 26.96 | 13.69 | 16.38 |

**Table 5: Transfer experiments (%) on anti-bias datasets with VGG and Glove video-text features.**
| Method | Charades-STA-Len | Charades-STA-Mom |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| R1@0.3 | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ | R1@0.3 | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ |  |
| 2DTAN [] | 39.68 | 28.68 | 17.72 | 22.79 | 27.81 | 20.44 | 10.84 | 17.23 |
| MMN [] | 43.58 | 34.31 | 19.94 | 26.85 | 33.58 | 27.20 | 14.12 | 19.18 |
| MomentDETR [] | 42.73 | 34.39 | 16.12 | 24.02 | 29.94 | 22.16 | 11.56 | 18.66 |
| MomentDiff | 51.25 | 38.32 | 23.38 | 28.19 | 48.39 | 33.59 | 15.71 | 21.37 |

Figure: Figure 4: Statistical distributions on anti-bias datasets with location distribution shifts. We count the length or moment of each video-text pair, and finally normalize the counts ($\#$ Samples) for clarity. Train/Test: the count distribution of true spans on the training or test set. MDE: the count distribution of top-1 predicted spans by using MomentDETR on the test set.
Refer to caption: /html/2307.02869/assets/x4.png

Transfer experiments.
To explore the location bias problem, we first organize the Out of Distribution (OOD) experiment following [], which repartitions Charades-STA [] and ActivityNet-Captions [] datasets according to moment annotation density values [].
In Tab. [4](#S4.T4), we exceed MomentDETR by a large margin on Charades-CD and ActivityNet-CD.
These results prove the robustness of the model in dealing with OOD scenarios.

To further explore the impact of a single factor ($\boldsymbol{w}_{0}$ or $\boldsymbol{c}_{0}$ ) on the location bias problem,
we organize moment retrieval on two anti-bias datasets with location distribution shifts:
❶ Charades-STA-Len.
We collect all video-text pairs with $\boldsymbol{w}_{0}\leq 10s$ and randomly sample pairs with $\boldsymbol{w}_{0}>10s$ in the original training set of Charades-STA, which account for 80% and 20% of the new training set, respectively.
On the contrary, we collect all pairs with $\boldsymbol{w}_{0}>10s$ and randomly sample pairs with $\boldsymbol{w}_{0}\leq 10s$ from the original test set, accounting for 80% and 20% of the new test set.
❷ Charades-STA-Mom.
Similarly, we collect all video-text pairs with the end time $\boldsymbol{c}_{0}+\boldsymbol{w}_{0}/2\leq 15s$ and sample pairs with the start time $\boldsymbol{c}_{0}-\boldsymbol{w}_{0}/2>15s$ as the training set, which accounts for 80% and 20%, respectively.
Likewise, the construction rules for the test set are the opposite of those for the training set.
Dataset statistics can refer to Train/Test in Fig. [4](#S4.F4) and the supplementary material.

In Tab. [5](#S4.T5), the proposed MomentDiff shows much more robustness than previous state-of-the-art method MomentDETR [].
Concretely, compared with the experiment in Tab. [1](#S4.T1), the performance gap between MomentDiff and MomentDETR gets larger on Charades-STA-Len and Charades-STA-Mom.
Fig. [4](#S4.F4) also demonstrates that the distribution of our prediction is closer to the one of the test set.
We conjecture that it is because MomentDiff discards the learnable proposals that fit the prior distribution of the training set.
Moreover, 2DTAN [] and MMN [] perform worse than MomentDETR on the original Charades-STA dataset, but they achieve better or comparable results than MomentDETR in Tab. [5](#S4.T5).
This shows that predefined proposals [, ] may be better than learnable proposals in dealing with the location bias problem, but they take up more time and space overhead.
Differently, our method performs well on both public datasets and anti-bias datasets.

**Table 6: Ablation study (%) on the Charades-STA dataset with SF+C video features and CLIP text features. We report R1@0.5, R1@0.7 and $\text{MAP}_{avg}$. Default settings are marked in blue.**
| Type | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ |
| --- | --- | --- | --- |
| ROI | 50.21 | 28.85 | 29.12 |
| FC | 55.57 | 32.42 | 32.85 |

Figure: Figure 5: Visualization of the diffusion process on Charades-STA (Left) and QVHighlights (Right). For clarity, we show 3 random spans ($\boldsymbol{x}_{50}$) with Gaussian initialization, and progressively get the top-1 result ($\boldsymbol{x}_{0}$) according to the confidence score. Green box: right segment. MDE: MomentDETR [].
Refer to caption: /html/2307.02869/assets/x5.png

### 4.3 Ablation Study

To provide further insight into MomentDiff, we conduct critical ablation studies on Charades-STA.

Span embedding type.
Regarding the way discrete spans are mapped to the embedding space,
we compare the ROI strategy [] with our linear projection (FC) in Tab. [6](#S4.T6)(a).
For the ROI strategy, we slice the fusion embeddings $\boldsymbol{F}$ corresponding to random spans, followed by mean pooling on the sliced features.
Tab. [6](#S4.T6)(a) shows that ROI does not work well.
This may be due to two points:
1) ROI is a hard projection strategy, while the importance of each video frame is quite different.
FC is similar to soft ROI, and its process can be trained end-to-end.
2) FC is decoupled from $\boldsymbol{F}$, which allows the model to focus on modeling the diffusion process and avoid over-dependence on $\boldsymbol{F}$.

Scale $\lambda$.
$\lambda$ is the signal-to-noise ratio [] of the diffusion process, and its effect is shown in Tab. [6](#S4.T6)(b).
We find that the effect of larger $\lambda$ drops significantly,
which may be due to the lack of more hard samples for denoising training when the proportion of noise is small, resulting in poor generalization.

Video Moment Denoiser (VMD) and noise intensity $m$.
In Tab. [6](#S4.T6)(c), we first remove the denoiser and the diffusion process (w/o VMD).
After training with the same losses, we find that predicting with only fusion embeddings $\boldsymbol{F}$ leads to a drastic drop in results, which reveals the effectiveness of denoising training.
Then we remove the noise intensity $m$ (w/o $m$), and the result is reduced by 5.16% on R1@0.5. This shows that explicitly aggregating noise intensity with random spans improves noise modeling.
Combined with VMD and $m$, the diffusion mechanism can fully understand the data distribution and generate the real span from coarse to fine.

Loss designs.
In Tab. [6](#S4.T6)(d), we show the impact of loss functions.
In $\mathcal{L}_{sim}$, we use pointwise and pairwise constraints to guide token-wise interactions between multimodal features, while ensuring reliable conditions for subsequent denoising.
In $\mathcal{L}_{vmr}$, the model can learn to accurately localize exact segments.
Adequate multimodal interaction and denoising training procedures are complementary.

Span number.
In Tab. [6](#S4.T6)(e), we only need 5 random spans to achieve good results.
Unlike object detection [], the number of correct video segments corresponding to text query is small.
Therefore, a large number of random inputs may make the model difficult to train and deteriorate the performance.

Model performance vs. speed.
In Tab. [6](#S4.T6)(f), we explore the effects of different diffusion steps.
When step=2, good results and fast inference speed have been achieved.
Subsequent iterations can improve the results of high IoU (i.e., R1@0.7), which shows the natural advantages of diffusion models.

### 4.4 Qualitative Results

We show two examples of the diffusion process in Fig. [5](#S4.F5).
We can find that the retrieved moments by MomentDiff are closer to the ground truth than those by MomentDETR.
The diffusion process can gradually reveal the similarity between text and video frames, thus achieving better results.
Besides, the final predictions corresponding to spans with multiple random initial locations are close to the ground truth.
This shows that our model achieves a mapping from arbitrary locations to real segments.

## 5 Limitation and Conclusion

Limitation.
Compared to existing methods [, ], the diffusion process requires multiple rounds of iterations, which may affect the inference speed.
As shown in Tab. [6](#S4.T6)(f), we reduce the number of iterations, with only a small sacrifice in performance.
In practical usage, we suggest choosing a reasonable step number for a better trade-off between performance and speed.

Conclusion.
This paper proposes a novel generative video moment retrieval framework, MomentDiff, which simulates a typical human retrieval style via diffusion models.
Benefiting from the denoising diffusion process from random noise to temporal span, we achieve the refinement of prediction results and alleviate the location bias problem existing in discriminative methods.
MomentDiff demonstrates efficiency and generalization on multiple diverse and anti-bias datasets.
We aim to stimulate further research on video moment retrieval by addressing the inadequacies in the framework design, and firmly believe that this work provides fundamental insights into the multimodal domain.

## 6 Acknowledgement

This work is supported by the National Key Research and Development Program of China (2022YFB3104700), the National Nature Science Foundation of China (62121002, 62022076, 62232006).

## Appendix A Implementation details

### A.1 Datasets

Public datasets.
Charades-STA [] serves as a benchmark dataset for the video moment retrieval task and is built upon the Charades dataset, originally collected for video action recognition and video captioning.
The Charades-STA dataset comprises 6,672 videos and 16,128 video-query pairs, allocated for training (12,408 pairs) and testing (3,720 pairs).
On average, the videos in this dataset have a duration of 29.76 seconds.
Each video is annotated with an average of 2.4 moments, with each moment lasting approximately 8.2 seconds.
QVHighlights [] contains 10,148 videos, each 150 seconds long and annotated with at least one text query describing its relevant content.
These videos are from three main categories, daily vlogs, travel vlogs, and news events.
On average, there are approximately 1.8 non-overlapping moments per query, annotated on 2s non-overlapping clips.
The dataset contains a total of 10,310 queries with 18,367 annotated moments.
The training set, validation set and test set include 7,218, 1,550 and 1,542 video-text pairs, respectively.
TACoS [] is compiled specifically for video moment retrieval and dense video captioning tasks.
It is comprised of 127 videos that depict cooking activities, with an average duration of 4.79 minutes. TACoS contains a total of 18,818 video-query pairs.
In comparison to the Charades-STA dataset, TACoS has more video segments that are temporally annotated with queries per video.
On average, each video contains 148 queries.
Additionally, the TACoS dataset is known for its difficulty, as the queries it contains are limited to only a few seconds or even just a few frames.
To ensure impartial comparisons, we use the same dataset split [], which consists of 10,146, 4,589, and 4,083 video-query pairs for the training, validation, and testing sets, respectively.
ActivityNet-Captions [] comprises of 20,000 videos and 100,000 descriptions that encompass a wide range of contexts.
Similar to [], we designate val 1 as the validation set and val 2 as the testing set. The dataset contains 37,417, 17,505, and 17,031 pairs of moments and corresponding sentences for training, validation, and testing respectively.

**Table 7: Training and test sets on two anti-bias datasets.**
| Dataset | Charades-STA-Len | Charades-STA-Mom |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| $\boldsymbol{w}_{0}\leq 10s$ | $\boldsymbol{w}_{0}>10s$ | Total | $\boldsymbol{c}_{0}+\boldsymbol{w}_{0}/2\leq 15s$ | $\boldsymbol{c}_{0}-\boldsymbol{w}_{0}/2>15s$ | Total |  |
| Training | 9307 | 2326 | 11633 | 5330 | 1332 | 6662 |
| Test | 197 | 788 | 985 | 259 | 1038 | 1297 |

Anti-bias datasets.
To explore the location bias problem, we construct two anti-bias datasets with location distribution shifts based on the Charades-STA dataset.
In video moment retrieval, length and position are important parameters of spans.

Therefore, we first investigate the effect of span length $\boldsymbol{w}_{0}$.
As shown in Tab. [7](#A1.T7), in the training set of Charades-STA-Len, we collect 9,307 video-text pairs with span length $\boldsymbol{w}_{0}\leq 10s$ and 2,326 video-text pairs with $\boldsymbol{w}_{0}>10s$, accounting for 80% and 20% of the total training set.
In contrast, in the test set, we select 197 video-text pairs with $\boldsymbol{w}_{0}\leq 10s$ and 788 video-text pairs with $\boldsymbol{w}_{0}>10s$, accounting for 20% and 80% of the total test set.

Then, we design the dataset Charades-STA-Mom based on the span’s end time $\boldsymbol{c}_{0}+\boldsymbol{w}_{0}/2$ and start time $\boldsymbol{c}_{0}-\boldsymbol{w}_{0}/2$.
In the training set of Charades-STA-Mom, we collect 5,330 video-text pairs with $\boldsymbol{c}_{0}+\boldsymbol{w}_{0}/2\leq 15s$ and 1,332 video-text pairs with $\boldsymbol{c}_{0}-\boldsymbol{w}_{0}/2>15s$, accounting for 80% and 20% of the total training set.
In contrast, in the test set, we select 259 video-text pairs with $\boldsymbol{c}_{0}+\boldsymbol{w}_{0}/2\leq 15s$ and 788 video-text pairs with $\boldsymbol{c}_{0}-\boldsymbol{w}_{0}/2>15s$, accounting for 20% and 80% of the total test set.

Figure: Algorithm 1 MomentDiff Training in a PyTorch-like style.

### A.2 Pseudo Code of MomentDiff

Algorithm [1](#algorithm1) provides the pseudo-code of MomentDiff Training in a PyTorch-like style.

The inference procedure of MomentDiff is a denoising sampling process from noise to temporal spans.
Starting from spans sampled in Gaussian distribution, the model progressively refines its predictions, as shown in Algorithm [2](#algorithm2).

Figure: Algorithm 2 MomentDiff inference in a PyTorch-like style.

## Appendix B Inference Efficiency of MomentDiff

**Table 8: The inference time of 2DTAN [], MMN [], MomentDETR [] and MomentDiff on Charades-STA with VGG video features and Glove text features. We report R1@0.5, R1@0.7 and $\text{MAP}_{avg}$. Default settings are marked in blue.**
| Method | Charades-STA | Inference time |  |  |
| --- | --- | --- | --- | --- |
| R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ | (second) |  |
| 2DTAN [] | 41.34 | 23.91 | 29.26 | 42.18 |
| MMN [] | 46.93 | 27.07 | 31.58 | 53.42 |
| MomentDETR [] | 50.54 | 28.01 | 29.87 | 12.42 |
| MomentDiff (Step=1) | 49.17 | 26.39 | 29.12 | 7.56 |
| MomentDiff (Step=2) | 50.81 | 27.84 | 31.27 | 8.23 |
| MomentDiff (Step=10) | 52.36 | 28.08 | 31.75 | 11.01 |
| MomentDiff (Step=50) | 51.94 | 28.25 | 31.66 | 20.74 |
| MomentDiff (Step=100) | 52.21 | 28.84 | 31.01 | 34.35 |

Inference time.
Inference efficiency is critical for machine learning models.
We test 2DTAN [], MMN [], MomentDETR [] and MomentDiff on the Pytorch framework [] in Tab. [8](#A2.T8).
We test all models with one NVIDIA Tesla A100 GPU.

Compared with 2DTAN [] and MMN [], MomentDiff (Step=1) not only achieves the best results on recall, but also improves the inference speed by 5-7 times.
This is because 2DTAN and MMN predefine a large number of proposals, which may be redundant and increase computational overhead.
Compared to MomentDETR [], MomentDiff (Step=10) achieves better results with similar inference time.
The possible reasons are that we adopt fewer random spans, very simple network structures, and avoid post-processing.

## Appendix C More Experiment Results

### C.1 Experiment on ActivityNet-Captions

The results of our method on ActivityNet-Captions are shown in Tab. [9](#A3.T9).
We record the 1 epoch training time and the inference time for all test samples in one NVIDIA Tesla A100 GPU.
Our model has been improved compared with baseline (MomentDETR).
Compared to SOTAs, we still have competitive results.
Compared with MMN, our method is 25 times faster in training time and 7.24 times faster in testing time.

### C.2 Error bars

Fig. [6](#A3.F6) shows the performance fluctuation of the model on the Charades-STA dataset.
We use different random seeds (seed= 2023, 2022, 2021, 2020, 2019) and different features (VGG, Glove; C3D, Glove; SF+C, C;) to organize experiments.
This shows that the model always converges and achieves stable results for different initializations.
This phenomenon demonstrates the ability of the model to learn to generate real spans from arbitrary random spans.

**Table 9: Performance comparisons (%) on ActivityNet-Captions with C3D video features and Glove text features.**
| Method | R1@0.3 | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ | Training time | Inference time |
| --- | --- | --- | --- | --- | --- | --- |
| 2DTAN [] | 59.92 | 44.63 | 27.53 | 27.26 | 1.1h | 523.74s |
| MMN [] | 65.21 | 48.26 | 28.95 | 28.74 | 1.5h | 662.12s |
| MomentDETR [] | 61.87 | 43.19 | 25.74 | 25.63 | 0.05h | 52.72s |
| MomentDiff | 62.79 | 46.52 | 28.43 | 28.19 | 0.06h | 91.43s |

Figure: Figure 6: Performance fluctuations (%) corresponding to different features and multiple random seeds on the Charades-STA dataset.
Refer to caption: /html/2307.02869/assets/x6.png

**Table 10: Ablation study (%) on the Charades-STA dataset with SF+C video features and CLIP text features. We report R1@0.5, R1@0.7 and $\text{MAP}_{avg}$. Default settings are marked in blue.**
| Sampling | R1@0.5 | R1@0.7 | $\text{MAP}_{avg}$ |
| --- | --- | --- | --- |
| DDPM [] | 55.62 | 32.37 | 32.48 |
| DDIM [] | 55.57 | 32.42 | 32.85 |

### C.3 Ablation study

Different sampling strategies.
Denoising Diffusion Probabilistic Models (DDPM) [] and Denoising Diffusion Implicit Models (DDIM) [] are popular and classic diffusion models.
We show the results of both strategies in Tab. [10](#A3.T10)(a).
We find that DDIM and DDPM perform similarly, but DDIM samples faster.
Therefore we adopt DDIM as the default technology.

Effect of the schedule of $\beta$.
The schedule of $\beta$ determines the weighting ratio of different intensity noises.
In Tab. [10](#A3.T10)(b), we find that the cosine schedule works better in our experiment.
The cosine schedule makes the noisy spans change slowly at the beginning and end during the diffusion process, and the generation effect is more stable.
So we set the cosine schedule as the default.

Effect of the Box Renewal.
Box Renewal is a post-processing technique in DiffusionDet [].
Tab. [10](#A3.T10)(c) shows that Box Renewal can indeed slightly improve the results.
To keep the inference process as simple as possible, we do not use Box Renewal by default.

Effect of the batch size.
As shown in Tab. [10](#A3.T10)(d), we set the batch size to 32 to achieve the best results.

Effect of the layer number.
In Tab. [10](#A3.T10)(e), we show the effect of the layer number of Similarity-aware Condition Generator (SCG) and Video Moment Denoiser (VMD). The default setting (2+2:2): SCG contains 2 cross-attention and 2 self-attention layers and VMD contains 2 cross-attention layers.
The default setting works best.

Effect of the weight value on $\mathcal{L}_{sim}$.
We set the weight values of $\mathcal{L}_{sim}$ and $\mathcal{L}_{vmr}$ to 4 and 1, respectively.
Keeping the weight value of $\mathcal{L}_{vmr}$ unchanged, we organize the weight influence experiment of $\mathcal{L}_{sim}$, as shown in Tab. [10](#A3.T10)(f).
The default setting works best.

Effect of the number of spans on R1@0.5.
Our training and inference are decoupled.
Our simple framework allows us to input any number of random noises.
Tab. [10](#A3.T10)(g) shows that there is a slight improvement when testing with more noise boxes.

## Appendix D Broader Impacts

First, our work does not involve private data.
Second, we believe that AI is a double-edged sword, and our model is no exception.
For example, when users or websites use our model, only natural language is needed to locate video moments and collect desired video material, which improves the productivity of society.
However, this may have a negative impact if the natural language entered by the user contains words related to violence, pornography, etc.
We will consider these scenarios and implement a more secure VMR model.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. The model relies on the LLaVa to generate scene captions to divide the backgrounds and foregrounds. Will it brings noisy due to the diversity of generated samples?
2. Did you compare your model with the finetuinng model based on multimodal LLM ?
3. With using the LLM to generate captions , what about the time cost and memory usage?
4. Will the dataset be open source? If so ,it will be an important contribution.
soundness: 3
strengths: 1. This paper introduces a extend task about TVG which covers more situations about video localiztion.
2. They build a new dataset for their introduced dataset which helps the deeper researches in future.
3. They propose a model based on LLM generate queries in fine-grain semantic, to benefit the video content understanding to the next stage
summary: This paper first introduce a novel GVMR framework that significantly expands the scope of traditional VMR, catering to a wider range of query types and enhancing the model’s practical nutility and  present a meticulously curated dataset. To deal with GVMR, they propose the BCANet model. Totally speaking, the contributions about extend task and new dataset is valuable.
weaknesses: 1. The boundary awareness is a common question in this field and many works like[1] focus on this problem. The author didn't analyse the differences between them to show their novelty.


*[1]J. Wang, L. Ma, and W. Jiang, “Temporally grounding language queries in videos by contextual boundary-aware prediction,” in AAAI, 2020.

---

confidence: 5
contribution: 3
initial_rating: 6
presentation: 3
questions: Please refer to the weakness part.
soundness: 3
strengths: 1. A novel GVMR framework is first introduced that significantly expands the scope of traditional VMR, catering to a wider range of query types and enhancing the model's practical utility.

2. A meticulously curated dataset, NExT-VMR, is presented. The dataset is specifically designed for GVMR task, which includes a variety of query types and scenarios, thereby enabling more robust and versatile model training and evaluation.
summary: This paper introduces the Generalized Video Moment Retrieval (GVMR) framework, which extends traditional Video Moment Retrieval (VMR) to handle a wider range of query types. To support this expanded task, it presents the NExT-VMR dataset, derived from the YFCC100M collection, featuring diverse query scenarios to enable more robust model evaluation. Additionally, a novel transformer-based model named BCANet is proposed and achieves outperforms when compared with traditional VMR approaches.
weaknesses: 1. As mentioned in the paper, "GVMR aspires to deliver a robust and flexible solution for video moment retrieval, significantly enhancing the model's interpretative prowess, precision, and retrieval efficiency." Would the enhancement of the model on interpretative prowess, precision, and retrieval efficiency be proved and presented in experiments?

2. More statistics of the proposed dataset are needed to be listed in Table 1, such as the entire/average lengths of videos and queries and the number of one-to-multi and no-target samples in the dataset.

3. Is it possible to demonstrate the evaluation of this method on traditional VMR datasets (e.g., Charades, ActivityNet, and TACoS) for one-to-one (different from the mentioned one-to-multi or no-target) VMR tasks? 

4. The BCANet pipeline presented in Figure 1 is confusing and difficult to interpret. The respective variable symbols should be labeled in Figure 1. Moreover, the processes for the BCL and QCA modules, along with query-text cross-attention, are also not clearly depicted in the figure. Moreover, what's the meaning of the "region" and "region features" in this paper? Dose the "region" mean a video clip?

5. The BCANet proposed in this paper does not seem to include specific designs for handling one-to-multi cases. Compared to traditional VMR methods, what advantages does BCANet offer in dealing with such data?

6. Since the retrieval speed is also an important metric in VMR, for example, [a] analyze the speed of various VMR approaches. I recommend the authors conducting speed analysis in this paper. In addition, is GVMR slower than traditional VMR?
[a] Fast video moment retrieval, ICCV 2021.

---

confidence: 5
contribution: 3
initial_rating: 5
presentation: 2
questions: - Can't the previous model achieve multi-target query well after training on the standard dataset? Lack of relevant experiments to prove the author's motivation.

- Can the model in this paper use a single query to query multiple related clips in the video? This is a more worthy of attention.

- YFCC100M is an excellent large-scale video dataset, but why did the author only select 9957 videos from YFCC100M? How was it selected?
- Will the author open source the dataset and code?
soundness: 2
strengths: The problem the authors solve is interesting.

This paper provides a good moment retrieval dataset.

The paper is clearly written and the method can be understood.
summary: This paper introduces the Generalized Video Moment Retrieval framework, which expands traditional VMR to handle complex, non-target, and multi-target queries. To support this, the authors present the NExT-VMR dataset and BCANet, a transformer-based model with a Boundary-aware Cross Attention module that improves boundary detection and query understanding. 
The results show that GVMR, NExT-VMR, and BCANet significantly enhance VMR performance, setting a new benchmark for future research in multimedia information retrieval.
weaknesses: - The NExT-VMR dataset is not large enough to be used for large-scale training. In addition, why not divide the test set on NExT-VMR for experiments?

- Figure 3 is confusing. There are many colored blocks around the Query-Text Cross Attention module. I don't understand what it wants to express? Lack of technical details.

---

confidence: 5
contribution: 3
initial_rating: 6
presentation: 3
questions: - BCANet is a supervised learning framework. How does it address the issue of inconsistent target quantities for each query in a batch during the training process? Additionally, if a query corresponds to three moments, are all three segments' timestamp information used in the loss function calculation?
- For queries labeled as non-target, what information do they provide during training?
- Why does the paper utilize the YFCC100M dataset as the primary data source instead of existing VMR datasets such as TACoS, Charades-STA, MAD, or ActivityNet-Captions?
- From the statistics in Table 1, it can be seen that the average number of segments corresponding to a query is less than 2, which contradicts the paper's motivation for creating multiple-target queries. Additionally, the proportion of non-target queries is very low. Based on the dataset statistics, it is unclear where the challenges of this new dataset compared to existing ones lie.
- From Table 2, it can be seen that BCANet shows a significant advantage only in the single-moment retrieval task, while its performance in multi-target and non-target scenarios is not as pronounced. This raises questions about the overall effectiveness of the method.
soundness: 3
strengths: - This paper introduces a new task called Generalized Video Moment Retrieval (GVMR), which is designed to adeptly handle the complexities of various query types, extending the traditional Video Moment Retrieval (VMR) paradigm to include both multiple-target and no-target queries.
- This paper presents a specialized dataset, NExT-VMR, which is meticulously constructed and analyzed from the YFCC100M dataset. Tailored specifically for GVMR, this dataset features a diverse range of query types, including one-to-multiple and no-target queries.
- This paper introduces a model called BCANet, aimed at improving performance on the challenging task of GVMR, where the model must accurately predict a variable number of temporal timestamps based on natural language descriptions.
summary: This paper introduces the Generalized Video Moment Retrieval (GVMR) framework, which expands traditional Video Moment Retrieval (VMR) to accommodate both non-target and multi-target queries, moving beyond the usual single-target focus. To support this, the authors present the NExT-VMR dataset, derived from the YFCC100M collection, featuring diverse query scenarios for robust model evaluation. They also propose BCANet, a transformer-based model that incorporates the Boundary-aware Cross Attention (BCA) module to enhance boundary detection and improve understanding of video content in relation to queries. Experiments demonstrate the potential of the NExT-VMR dataset and BCANet to advance VMR capabilities.
weaknesses: - Why does the paper utilize the YFCC100M dataset as the primary data source instead of existing VMR datasets such as TACoS, Charades-STA, MAD, or ActivityNet-Captions?
- From the statistics in Table 1, it can be seen that the average number of segments corresponding to a query is less than 2, which contradicts the paper's motivation for creating multiple-target queries. Additionally, the proportion of non-target queries is very low. Based on the dataset statistics, it is unclear where the challenges of this new dataset compared to existing ones lie.
- From Table 2, it can be seen that BCANet shows a significant advantage only in the single-moment retrieval task, while its performance in multi-target and non-target scenarios is not as pronounced. This raises questions about the overall effectiveness of the method.

Meta-review: This paper proposed a new Generalized Video Moment Retrieval framework, which expands traditional VMR to handle complex, non-target, and multi-target queries. To facilitate research on this task,  a new dataset named NExT-VMR dataset, is derived from the YFCC100M collection, featuring diverse query scenarios to enable more robust model evaluation. The advantage of the method is that it defines a new task and establishes a relevant dataset, proposing a effective baseline model. The weakness is that some references, which were already published in some conference, were cited in arxiv format. Since all reviewers leaned to accept this paper, I recommend accept to it if there is not ethic problem.

Decision: Accept (Poster)