Paper · 2023-03-24 · cs.CV, cs.AI
Query-Dependent Video Representation for Moment Retrieval and Highlight Detection
QD-DETR for video moment retrieval and highlight detection. Clips attend to the text query via cross-attention before the encoder; mismatched video-query pairs are trained to score low; a learned saliency token gives adaptive clip scores. Author-reported: beats Moment-DETR and UMT on QVHighlights test (video-only R1@0.7 44.98 vs 33.02).
Cross-attentionObject queries (learned query slots in transformer decoders)Saliency predictionContrastive learningvideomoment-retrievalhighlight-detectiontransformermultimodal
arXivPDFCodeMarkdown15 min read
AI-compiled by claude-haiku-5-5 on 2026-11-06, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Video search by sentence has two jobs. Given a text query such as "the dog catches a frisbee", the system must find the time span in a long video where that happens (moment retrieval), and it must rate each short clip for how well it matches the query (highlight detection). Many earlier models looked at the video and the sentence together only in a shallow way, so the sentence had little say in how each clip was described.
QD-DETR makes the sentence matter from the start. Every clip first "reads" the query through a cross-attention step, so its description depends on what was asked. The model is also trained with deliberately mismatched pairs: a real video paired with another video's sentence must get low clip scores. This forces the scores to depend on the actual match rather than on what the video looks like in general.
A learned "saliency token" joins the video clips inside the network and works out its own scoring rule for each video-and-query pair, instead of using one fixed scoring head for everything. The model then predicts the moment span with a detection-style decoder and the clip scores with a ranking loss.
TL;DR
- QD-DETR is a DETR-style transformer for moment retrieval (MR) and highlight detection (HD) from text queries §1 §3.
- Its distinct parts are: cross-attention from video clips to query words at the first encoder layers §3.1 eq. 1; negative video-query pairs trained with a suppression loss §3.2 eq. 2; and a learned saliency token that gives an input-dependent saliency predictor §3.3 eq. 3.
- Author-reported gains on QVHighlights, TVSum and Charades-STA are large, but the paper's split and setup details are partly unclear (see Pitfalls).
- Code is MIT-licensed and public; the code differs from the paper in several loss details (see Paper vs code).
Problem
Moment retrieval asks for a start and end time of the moment that matches a text query. Highlight detection asks for a per-clip relevance score, the saliency score §3. Before this work, transformer models for these tasks either concatenated video and text features into one input, or used the text only to build the decoder query, so the video clip features were not tied to the query §3.1. The paper argues that because the task needs every clip judged against the query, the query must enter the clip representation directly §1 §3.1.
The paper also argues that training with only positive video-query pairs gives too little variety: clips within one video look alike, so the model can rank clips without really using the query §3.2.
Assumptions: the method uses fixed, pre-extracted video and text features (frozen backbones) §3. It expects the query to carry meaningful content. The authors note that noisy or mismatched ground-truth text can make training less effective §5.
Method
Inputs. Video clips v_1..v_L and query words t_1..t_N are produced by frozen encoders. Goal: a span (m_c, m_\sigma) and one saliency score per clip §3.
Step 1: cross-attentive encoder (CATE) §3.1 eq. 1. The first encoder layers are cross-attention layers. Queries come from the video clips, keys and values from the query words. Each clip is a weighted sum of word values, with weights from a softmax over the words only. The result is passed through an MLP and merged into the clip representation as in a standard transformer layer. The output is X = \{x_v^1..x_v^L\}, the query-dependent video tokens §3.1.
Step 2: negative pairs §3.2 eq. 2. For each training pair, the video is also paired with a query taken from another pair in the batch. The negative pair's saliency scores are pushed toward zero by L_{neg} = -\log(1 - S(x_v^{neg})), where S is the saliency predictor §3.2 eq. 2. The paper says the same video must get different scores for a positive and a negative query, which discourages the model from scoring clips without the query §3.2.
Step 3: input-adaptive saliency predictor §3.3 eq. 3. A learnable saliency token is concatenated with the query-dependent video tokens and passed through the transformer encoder. The saliency token and each video token are projected by separate linear maps w_s and w_v; the saliency score is their scaled dot product, S(x_v^i) = (w_s^T x_s \cdot w_v^T x_v^i)/\sqrt{d} §3.3 eq. 3.
Step 4: decoder §3.4. The decoder queries are 1-D dynamic anchors, each given by a center m_c and a duration m_\sigma. They are refined layer by layer, pool features around the center, and modulate the cross-attention map by duration §3.4. The text query is not fed to the decoder, because the query is already in the video tokens §3.4.
Losses §3.4 eq. 4–8.
- Moment retrieval, L_{mr}: L1 on (m_c, m_\sigma), generalized IoU, and foreground/background cross-entropy §3.4 eq. 4.
- Highlight detection, L_{hl} = \lambda_{margin} L_{margin} + \lambda_{cont} L_{cont} eq. 7.
- L_{margin}: a hinge that keeps high-rank clips above low-rank ones by a margin \Delta eq. 5. The margin value \Delta is not stated in the paper.
- L_{cont}: a rank-aware contrastive loss over saliency levels, with temperature \tau eq. 6. Clips above a rank threshold are positives; clips below it and the negative-pair clips are negatives §3.4.
- Total: L_{total} = L_{hl} + L_{mr} + \lambda_{neg} L_{neg} eq. 8.
Pseudocode (forward pass). Paper-level description; the code's exact layers are in Paper vs code.
# QD-DETR forward pass [§3] [eq. 1] [eq. 3]
# Input: video (B, L, Dv), query (B, N, Dt)
# Output: saliency (B, L), spans (B, Q, 2), neg_saliency (B, L)
def qd_detr(video, query):
# Project both inputs to the hidden width d [§6]
video_tokens = project_video(video) # (B, L, d)
query_tokens = project_query(query) # (B, N, d)
# Clips attend to query words (cross-attention) [§3.1] [eq. 1]
video_tokens = cross_attention(video_tokens, query_tokens)
# Prepend a learned saliency token; self-attend over clips [§3.3]
tokens = concat(saliency_token, video_tokens) # (B, L+1, d)
tokens = self_attention(tokens)
saliency_feat = tokens[:, 0] # (B, d)
video_tokens = tokens[:, 1:] # (B, L, d)
# Scaled dot product gives one score per clip [§3.3] [eq. 3]
saliency = dot(w_v(video_tokens), w_s(saliency_feat)) / sqrt(d)
# Negative pair: same video, query of the next item in batch [§3.2]
neg_query = roll(query_tokens, shift=1, dims=batch)
neg_saliency = score_pair(video, neg_query) # same path as above
# Decoder: anchors (center, width) attend to video tokens [§3.4]
spans = decoder(anchor_queries, video_tokens) # (B, Q, 2)
return saliency, spans, neg_saliency# Training loss for one batch [§3.2] [§3.4] [eq. 2] [eq. 4–8]
# Weights from [§6]; lambda_neg = 1 as in [eq. 8]
def training_loss(outputs, targets):
# Moment localization: L1 + gIoU + foreground/background CE [eq. 4]
loss_mr = moment_loss(outputs.spans, targets.moment)
# Hinge on score gaps between high- and low-rank clips [eq. 5]
loss_margin = margin_loss(outputs.saliency, targets.pairs, delta)
# Rank-aware contrastive loss over saliency levels, tau = 0.5 [eq. 6]
loss_cont = rank_contrastive(outputs.saliency, targets.levels, tau)
# Suppress saliency of mismatched pairs, -log(1 - S) [eq. 2]
loss_neg = mean(-log(1 - outputs.neg_saliency))
loss_hl = lambda_margin * loss_margin + lambda_cont * loss_cont
return loss_hl + loss_mr + lambda_neg * loss_negKey equations:
\text{Attention}(Q_v, K_t, V_t) = \text{softmax}\left(\frac{Q_v K_t^{T}}{\sqrt{d}}\right) V_t \quad [\text{eq. 1}]
L_{neg} = -\log\left(1 - S(x_v^{neg})\right) \quad [\text{eq. 2}]
S(x_v^i) = \frac{w_s^T x_s \cdot w_v^T x_v^i}{\sqrt{d}} \quad [\text{eq. 3}]
L_{cont} = -\sum_{r=1}^{R} \log \frac{\sum_{x \in X_r^{pos}} \exp(S(x)/\tau)}{\sum_{x \in X_r^{pos} \cup X_r^{neg}} \exp(S(x)/\tau)} \quad [\text{eq. 6}]
L_{total} = L_{hl} + L_{mr} + \lambda_{neg} L_{neg} \quad [\text{eq. 8}]
Hyperparameters
Values stated in the paper unless marked "code". The paper's supplementary training section is cited as §6 and the query-length section as §7 (source order; not checked against a compiled PDF).
| Name | Value | Where | Notes |
|---|---|---|---|
| Hidden width d | 256 | §6 config.py | |
| Encoder layers | 2 cross-attention + 2 self-attention (4 total) | §6 config.py transformer.py | Paper calls the first 2 "cross-attention"; code uses enc_layers for each stack |
| Decoder layers | 2 | §6 config.py | HD (TVSum) uses encoder only §6 |
| Attention heads | not stated (paper's Eq. 1 is single-head) | config.py | code default 8 |
| FFN width | not stated | config.py | code default 1024 |
| Input dropout / dropout | not stated | config.py | code defaults 0.5 / 0.1 |
| Decoder queries | not stated | config.py | code default 10 |
| Optimizer | Adam, weight decay 1e-4 | §6 | code uses AdamW inference.py; see Paper vs code |
| QVHighlights: epochs, batch, lr | 200, 32, 1e-4 | §6 config.py | |
| Charades-STA: epochs, batch, lr | 100, 8, 1e-4 | §6 | Not checked in code |
| TVSum: epochs, batch, lr | 2000, 4, 1e-3 | §6 train_tvsum.sh train_tvsum.sh | Trained separately per category §4.2 |
| Temperature τ (contrastive) | 0.5 | §6 model.py | config default 0.07 is for a different, unused loss |
| λ_margin, λ_cont | 1, 1 | §6 | |
| λ_L1, λ_gIoU, λ_CE | 10, 1, 4 | §6 config.py | |
| λ_neg | 1 | §6 | Code folds it into lw_saliency = 1 config.py |
| Margin Δ | not stated | config.py | code default 0.2 |
| Gradient clip | not stated | config.py train.py | code default 0.1 |
| Video features (QVHighlights) | SlowFast + CLIP, CLIP text | §6 train.sh train.sh | 2304 + 512 video dim; text dim 512 train.sh |
| Charades-STA features | VGG + GloVe; also C3D, SF+CLIP | §6 | Pre-extracted features from other repositories §6 |
| TVSum features | I3D (Kinetics-400) visual, CLIP text | §6 | Audio: PANN (AudioSet) §6 |
| Audio fusion | channel-wise concatenation with video | §4.2 | |
| Negative-pair batch shift | 1 | model.py | Not stated in paper |
Results
Author-reported. Setup: QVHighlights test split via the official evaluation server §4.1; TVSum with per-category training and HIT@1/mAP §4.1–4.2; Charades-STA R1@0.5/0.7 by feature type §4.2.
QVHighlights test tab. 1. QD-DETR is reported as mean ± std over five runs. V = video only; V+A = video + audio. R1 = recall@1 at IoU thresholds; mAP at IoU 0.5, 0.75 and their average; HD mAP and HIT@1 on the "≥ Very Good" saliency level.
| Method | Src | R1@0.5 | R1@0.7 | mAP@0.5 | mAP@0.75 | mAP Avg | HD mAP | HD HIT@1 |
|---|---|---|---|---|---|---|---|---|
| BeautyThumb | V | - | - | - | - | - | 14.36 | 20.88 |
| DVSE | V | - | - | - | - | - | 18.75 | 21.79 |
| MCN | V | 11.41 | 2.72 | 24.94 | 8.22 | 10.67 | - | - |
| CAL | V | 25.49 | 11.54 | 23.40 | 7.65 | 9.89 | - | - |
| XML | V | 41.83 | 30.35 | 44.63 | 31.73 | 32.14 | 34.49 | 55.25 |
| XML+ | V | 46.69 | 33.46 | 47.89 | 34.67 | 34.90 | 35.38 | 55.06 |
| Moment-DETR | V | 52.89 ± 2.3 | 33.02 ± 1.7 | 54.82 ± 1.7 | 29.40 ± 1.7 | 30.73 ± 1.4 | 35.69 ± 0.5 | 55.60 ± 1.6 |
| QD-DETR | V | 62.40 ± 1.1 | 44.98 ± 0.8 | 62.52 ± 0.6 | 39.88 ± 0.7 | 39.86 ± 0.6 | 38.94 ± 0.4 | 62.40 ± 1.4 |
| UMT | V+A | 56.23 | 41.18 | 53.38 | 37.01 | 36.12 | 38.18 | 59.99 |
| QD-DETR | V+A | 63.06 ± 1.0 | 45.10 ± 0.7 | 63.04 ± 0.9 | 40.10 ± 1.0 | 40.19 ± 0.6 | 39.04 ± 0.3 | 62.87 ± 0.6 |
The paper's text says QD-DETR beats the baselines on all metrics and that the video-only gain at strict IoU reaches "up to 36%" in R1@0.7 and mAP@0.75 (relative, against Moment-DETR) §4.2. The gain with audio is stated as 11.84% on average for MR against UMT §4.2 tab. 1.
TVSum highlight detection (mAP) tab. 2. Trained per category; Avg is the mean over 10 categories. Categories: VT, VU, GA, MS, PK, PR, FM, BK, BT, DS. Video only unless marked.
| Method | Src | VT | VU | GA | MS | PK | PR | FM | BK | BT | DS | Avg |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sLSTM | V | 41.1 | 46.2 | 46.3 | 47.7 | 44.8 | 46.1 | 45.2 | 40.6 | 47.1 | 45.5 | 45.1 |
| SG | V | 42.3 | 47.2 | 47.5 | 48.9 | 45.6 | 47.3 | 46.4 | 41.7 | 48.3 | 46.6 | 46.2 |
| LIM-S | V | 55.9 | 42.9 | 61.2 | 54.0 | 60.3 | 47.5 | 43.2 | 66.3 | 69.1 | 62.6 | 56.3 |
| Trailer | V | 61.3 | 54.6 | 65.7 | 60.8 | 59.1 | 70.1 | 58.2 | 64.7 | 65.6 | 68.1 | 62.8 |
| SL-Module | V | 86.5 | 68.7 | 74.9 | 86.2 | 79.0 | 63.2 | 58.9 | 72.6 | 78.9 | 64.0 | 73.3 |
| QD-DETR | V | 88.2 | 87.4 | 85.6 | 85.0 | 85.8 | 86.9 | 76.4 | 91.3 | 89.2 | 73.7 | 85.0 |
| MINI-Net | V+A | 80.6 | 68.3 | 78.2 | 81.8 | 78.1 | 65.8 | 57.8 | 75.0 | 80.2 | 65.5 | 73.2 |
| TCG | V+A | 85.0 | 71.4 | 81.9 | 78.6 | 80.2 | 75.5 | 71.6 | 77.3 | 78.6 | 68.1 | 76.8 |
| Joint-VA | V+A | 83.7 | 57.3 | 78.5 | 86.1 | 80.1 | 69.2 | 70.0 | 73.0 | 97.4 | 67.5 | 76.3 |
| UMT | V+A | 87.5 | 81.5 | 88.2 | 78.8 | 81.4 | 87.0 | 76.0 | 86.9 | 84.4 | 79.6 | 83.1 |
| QD-DETR | V+A | 87.6 | 91.7 | 90.2 | 88.3 | 84.1 | 88.3 | 78.7 | 91.2 | 87.8 | 77.7 | 86.6 |
The paper reports +4.2% average over the previous SOTA with V+A §4.2; this is relative (86.6 vs UMT's 83.1, a gain of 3.5 points) tab. 2. Video-only: 85.0 vs 73.3 tab. 2.
Charades-STA moment retrieval (R1@0.5 / R1@0.7) tab. 3. Compare only within a feature type; the paper enumerates each method with its backbone for a fair comparison §4.2.
| Method | Feat | R1@0.5 | R1@0.7 | Method | Feat | R1@0.5 | R1@0.7 |
|---|---|---|---|---|---|---|---|
| SAP | VGG | 27.42 | 13.36 | CTRL | C3D | 23.63 | 8.89 |
| TripNet | VGG | 36.61 | 14.50 | ACL | C3D | 30.48 | 12.20 |
| SM-RL | VGG | 24.36 | 11.17 | RWM-RL | C3D | 36.70 | - |
| MAN | VGG | 41.24 | 20.54 | MAN | C3D | 46.53 | 22.72 |
| 2D-TAN | VGG | 40.94 | 22.85 | DEBUG | C3D | 37.39 | 17.69 |
| FVMR | VGG | 42.36 | 24.14 | VSLNet | C3D | 47.31 | 30.19 |
| UMT† | VGG | 48.31 | 29.25 | QD-DETR | C3D | 50.67 | 31.02 |
| QD-DETR | VGG | 52.77 | 31.13 | M-DETR | SF+C | 53.63 | 31.37 |
| QD-DETR† | VGG | 55.51 | 34.17 | QD-DETR | SF+C | 57.31 | 32.55 |
† = video and audio as the source tab. 3.
Ablation on QVHighlights, val split as captioned tab. 4. CATE = cross-attentive encoder; Neg. = negative pairs; ST = saliency token; DAM = dynamic anchor moments in the decoder. Metrics as in tab. 1.
| Row | CATE | Neg | ST | DAM | R1@0.5 | R1@0.7 | mAP@0.5 | mAP@0.75 | mAP Avg | HD mAP | HD HIT@1 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| (a) baseline | 52.89 | 33.02 | 54.82 | 29.40 | 30.73 | 35.69 | 55.60 | ||||
| (b) | ✓ | 56.16 | 38.71 | 56.48 | 33.42 | 34.07 | 37.14 | 58.34 | |||
| (c) | ✓ | 58.69 | 39.83 | 58.39 | 34.84 | 35.40 | 39.02 | 62.81 | |||
| (d) | ✓ | 55.48 | 37.00 | 55.81 | 26.75 | 32.84 | 37.48 | 58.59 | |||
| (e) | ✓ | 53.19 | 35.91 | 55.58 | 32.55 | 33.33 | 35.68 | 55.56 | |||
| (f) | ✓ | ✓ | 57.72 | 42.35 | 59.10 | 38.16 | 38.03 | 36.56 | 57.44 | ||
| (g) | ✓ | ✓ | 59.57 | 42.12 | 59.19 | 36.63 | 36.76 | 38.64 | 61.62 | ||
| (h) | ✓ | ✓ | 60.00 | 40.97 | 59.21 | 35.41 | 35.89 | 39.06 | 62.88 | ||
| (i) | ✓ | ✓ | ✓ | 60.32 | 42.39 | 59.47 | 36.79 | 36.93 | 39.21 | 62.76 | |
| (j) full | ✓ | ✓ | ✓ | ✓ | 62.68 | 46.66 | 62.23 | 41.82 | 41.22 | 39.13 | 63.03 |
Encoder ablation against extra self-attention layers tab. 5. Compares CATE with a 4-layer self-attention encoder (SATE), on Moment-DETR and QD-DETR, to check whether gains come from more layers.
| Model | R1@0.5 | R1@0.7 | mAP Avg | HD mAP | HD HIT@1 |
|---|---|---|---|---|---|
| Moment-DETR (SATE 2) | 52.89 | 33.02 | 30.73 | 35.69 | 55.60 |
| Moment-DETR (SATE 4) | 53.60 | 35.81 | 31.74 | 35.96 | 56.56 |
| Moment-DETR (CATE 4) | 55.10 | 37.02 | 33.19 | 36.43 | 56.98 |
| Moment-DETR (CATE 4)† | 56.16 | 38.71 | 34.07 | 37.14 | 58.34 |
| QD-DETR (SATE 4)† | 60.48 | 45.21 | 40.12 | 38.66 | 61.29 |
| QD-DETR (CATE 4)† | 62.68 | 46.66 | 41.22 | 39.13 | 63.03 |
† = only query features are used as the encoder condition tab. 5. The paper concludes the CATE gain comes from emphasising the query, not from the extra layers §4.3.
Query length §7, table in supplementary. On the validation set split into short (≤ 8 words), medium (9–13) and long (> 13) queries, QD-DETR beats Moment-DETR in every group. Reported mAP gains: MR +36.7 / +28.0 / +26.3% and HD +7.3 / +11.8 / +11.1% for short / medium / long (relative) §7. The paper says robustness is to meaningless words, not to wrong descriptions §7.
Saliency statistics and qualitative results. The authors plot positive vs negative saliency distributions and observe that overlap shrinks as components are added fig. 4 §4.3. Qualitatively, saliency is highest for positive queries, middle for semi-positive, and lowest for negative queries fig. 5 §4.4.
Paper vs code
Official repository: wjun0830/QD-DETR (linked in the abstract and in the supplementary), owner is the first author's account README.md. Commit f8628f79f7c651b586300b142dbe9b85e43857cc, MIT license LICENSE. Searched: links in the paper and abstract; the repo is the one the paper names.
- Cross-attention is multi-head, with residual and FFN. Paper Eq. 1 is a single softmax with \sqrt{d} §3.1 eq. 1. Code uses
nn.MultiheadAttentionwith 8 heads, adds a residual, then LayerNorm and FFN transformer.py transformer.py. Keys and values come from the raw text tokens inside the MHA projections, not from the separate p_k, p_v of the paper. - Text is dropped after the cross-attention stack. Only the global token and video tokens go to the self-attention encoder and decoder transformer.py. Consistent with the paper's claim that the decoder needs no text §3.4.
- Negative pair construction. Paper says "mix the video and query from different pairs" §3.2. Code rolls the query tensor by one position in the batch, so the negative for item b is the query of item b+1, and the last wraps to the first model.py. A batch of size 1 yields a positive pair labelled negative (see Pitfalls).
- Negative loss form. Paper Eq. 2 is -\log(1 - S(x)) with S the saliency predictor §3.2 eq. 2. Code applies a sigmoid to the saliency logit and sums over clips, then averages over the batch model.py. The paper does not state whether S includes a sigmoid.
- Margin loss scaling. Code multiplies the margin loss by 2 and divides by batch size times number of pairs, with the comment "to keep the loss the same scale" model.py. Paper Eq. 5 has no such factor, and \Delta is not stated; code default is 0.2 config.py.
- Rank-contrastive loss. Paper says the loop runs over R rank values and Eq. 6 sums over r §3.4 eq. 6. Code loops thresholds 1 to 11 (
range(1, 12)), divides the total by 12, and uses a batch-mean model.py model.py. The paper does not state R. - Saliency level source. Code builds per-clip saliency levels by summing the three annotator scores for each relevant clip, with the remaining clips at zero start_end_dataset.py. The compiled paper does not say how the levels are derived.
- Optimizer. Paper says Adam with weight decay 1e-4 §6. Code uses
torch.optim.AdamWinference.py. - Gradient clipping. Code clips the gradient norm to 0.1 config.py train.py. Not in the paper.
- Saliency token. Code adds a learnable, random-init global token and a learnable position embedding model.py; its output is the saliency feature, scored by
saliency_proj1on clips andsaliency_proj2on the token, divided by \sqrt{d} model.py. Matches the paper's Eq. 3 in form. - Device. The decoder's initial target is created with
.cuda()transformer.py, so CPU-only runs fail without edits. - Hyperparameters that match. QVHighlights: 200 epochs, batch 32, lr 1e-4 §6 config.py. TVSum: 2000 epochs, batch 4, lr 1e-3 §6 train_tvsum.sh train_tvsum.sh. Loss weights 10 / 1 / 4 §6 config.py.
- License line.
LICENSEis MIT and reads "Copyright (c) 2022 Anonymous". The README says the code is MIT. Usecode_license: MIT.
No discrepancies found in the decoder dimensions or the layer counts.
Pitfalls
- Batch size 1 breaks negatives. The cyclic shift of the query batch maps a single item to itself, so the "negative" pair is a positive. Keep batch size greater than 1 model.py.
- Split of the ablation tables is unclear. Tab. 4's caption says "val split", but its row (a) equals Moment-DETR's test numbers in tab. 1 tab. 1 tab. 4. Row (j) equals the QD-DETR† row in tab. 5 tab. 5. Treat ablation numbers as unverified for split.
- Relative vs absolute gains. The "up to 36%" and "+4.2%" claims are relative §4.2. Absolute gains are smaller: 11.96 R1@0.7 points over Moment-DETR (video), 3.5 average points over UMT (video+audio) tab. 1 tab. 2.
- Charades features differ by row. Compare only within the same backbone (VGG, C3D, SF+CLIP) tab. 3 §4.2. Charades features come from other repositories (UMT, VSLNet, Moment-DETR), so exact preprocessing is not in this repo §6.
- Margin Δ and λ_neg semantics. Δ is not stated in the paper. Code uses 0.2 and folds λ_neg into one weight of 1 config.py config.py.
- Noisy or wrong queries hurt. The paper's own limitation says that mismatched ground-truth text degrades training §5. Check the query quality before training.
- Frozen features. The method is set up on frozen video and text encoders §3; the paper does not evaluate end-to-end training.
- Negative BCE scale. Code sums the negative loss over clips rather than averaging, so its magnitude grows with clip count (up to 75 clips in code defaults) model.py config.py. The paper's Eq. 2 does not specify a normalization.
- Pretraining is not described in the compiled paper. The repo ships a pretraining script pretrain.sh; the paper's results do not mention it, so do not assume it was used.
Lineage
- Builds on: Moment-DETR (named in the paper as the baseline; no arXiv id in the bibliography) §1 §3. Uses the dynamic-anchor decoder idea from DAB-DETR (arXiv:2201.12329) §3.4 [egbib].
- Compared against: UMT (CVPR, per the bibliography; no arXiv id given there), Moment-DETR, XML, CAL, MCN, SL-Module, TCG, VSLNet, and others, per table tab. 1–3.
- Ranking loss adapted from Ranking Info Noise Contrastive Estimation (AAAI 2022) §3.4 [egbib].
- Superseded by: not known from content already in this wiki.
Source and license
Adapted from “Query-Dependent Video Representation for Moment Retrieval and Highlight Detection” by WonJun Moon, Sangeek Hyun, SangUk Park, Dongchan Park, Jae-Pil Heo (arXiv:2303.13874), used under CC BY-SA 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. This page is licensed under CC BY-SA 4.0. Code citations refer to https://github.com/wjun0830/QD-DETR at commit f8628f79f7c6 (MIT). Any quoted code is shown under that license.