Round-Trip Language Queries for Referring Segmentation from Sparse Keyframes

Models that find "the man in the red jacket who sits down" in a video and segment him at every frame are trained on dense, frame-by-frame masks, and those masks are the main cost of building such datasets. This proposal asks whether such a model can learn from a box drawn on only one frame every second or two, with no masks drawn by hand and nothing at all on the frames in between. The opportunity comes from how current systems are built. In these systems the decoder's starting "queries" (the vectors a Transformer decoder refines into object predictions) are computed from the sentence itself rather than learned as generic slots. A query computed from the sentence is the same query on every frame, so it can serve as a training signal on frames nobody labeled. We propose to train it as a round trip. Decode the language query on a labeled keyframe. Carry the resulting object query to a distant unlabeled frame and decode it there. Carry it back. Require it to recover the keyframe box it started from.

In short, we treat the language-conditioned query as the thing that crosses the annotation gap, in place of optical flow, box interpolation, or a generative model that fills in intermediate frames. A cycle loss anchored at a single keyframe trains the decoder on unlabeled frames. A gate on the model's own cycle agreement keeps the language-vision losses on those frames from reinforcing hallucinations. If this works, annotation cost falls in two ways at once: no masks are drawn by hand, and boxes are needed only on sparse frames. The design should also behave well where interpolation-based methods break, namely when objects move nonlinearly, become occluded, or enter mid-video.

Core Claim

The direct prior work is Learning Referring Video Object Segmentation from Weak Annotation. That paper draws one mask on the first frame where the object appears and boxes on every later frame. It propagates dynamic convolution filters forward from the masked frame, and it reports that ReferFormer trained this way reaches 50.1 J&F on Ref-YouTube-VOS against 49.9 for their fully supervised run. It motivates our work because it shows that mask density can be cut sharply without loss. It also leaves two requirements in place that we remove: a hand-drawn mask, and a box on every frame. Its authors explicitly leave "zero-mask" supervision open.

Our claim is that when keyframes are separated by gaps of roughly 10 to 60 frames, a language-anchored round-trip loss closes most of the gap to dense box supervision. We expect it to do so better than densifying labels by interpolation or flow, and we expect the advantage to grow with gap length and with motion nonlinearity. We further claim it reduces false positives on frames where the referred object is absent.

Research Program

The base model reuses the method of Language as Queries for Referring Video Object Segmentation. ReferFormer turns a pooled sentence embedding into a handful of object queries. Its decoder outputs become convolution kernels that produce masks, and identity is kept across frames by query index. We keep that architecture so the contribution is isolated to training. Masks are learned from boxes in the same way in every condition we compare: by a box-projection-style mask loss, or alternatively by pseudo-masks from a box-prompted segmenter. Holding this fixed means that mask-from-box quality is a constant across conditions rather than our contribution.

The round-trip loss works as follows. Let $e$ be the sentence embedding and $V_t$ the visual features of labeled keyframe $t$ with box $b_t$. Let $D(q, V)$ denote one decoding pass that refines query $q$ against features $V$. Start from $q_t = D(f(e), V_t)$, where $f$ maps the sentence to an initial query. For a sampled unlabeled frame $t+k$, form $q_{t+k} = D(q_t, V_{t+k})$, then the return trip $\hat q_t = D(q_{t+k}, V_t)$. The loss is

$$\mathcal{L}_{\text{cyc}} = \ell_{\text{box}}\big(h(\hat q_t), b_t\big) + \lambda\, \ell_{\text{pres}}\big(\hat q_t, 1\big),$$

where $h$ is the box head, $\ell_{\text{box}}$ is the usual L1-plus-GIoU box loss, $\ell_{\text{pres}}$ is the presence (referred-or-not) classification loss, and $\lambda$ weights it. Only one endpoint needs a label. This is the key structural difference from DOVTrack, whose feature-space diffusion synthesizes intermediate states only between two boxed endpoints and operates on category names rather than sentences. Because $f(e)$ can initialize on any frame, an object entering mid-video needs no known entrance frame. Forward propagation from the first masked frame, as in the weak-annotation paper, has no such freedom. When two keyframes bracket an unlabeled frame, we run the trip from both sides and also penalize disagreement between $h(q_{t+k})$ computed from each side. This gives bidirectional interpolation in query space.

The second component is gated grounding on unlabeled frames. We add a sentence-to-foreground contrastive loss on frame $t+k$, similar to the language-vision contrast in the weak-annotation paper. It is applied only when the round trip succeeds, meaning the return box has IoU with $b_t$ above a threshold and the two-sided predictions agree. Below threshold, the frame instead receives a weak push toward "not present." The gating targets the failure mode that Grounding DINO and TAO document: hallucinated detections and label flicker. These failures compound when nothing checks the intermediate frames. The design borrows its logic from the cross-branch agreement in Reciprocal Landmark Detection and Tracking, which trains long-sequence landmark tracking from two labeled frames by forcing a detection branch and a tracking branch to agree. That method has no language and no notion of absence. We put the agreement inside a single language-conditioned decoder and use it as a filter on pseudo-supervision.

Baselines

The naive reference point is ReferFormer trained only on the sparse keyframes, with unlabeled frames simply discarded. It uses the same backbone, the same box-to-mask loss, and the same number of iterations. Anything that does not clearly beat it has learned nothing from the unlabeled frames.

The densification baseline fills the gaps with labels and then trains as if supervision were dense. Boxes between keyframes are produced by linear interpolation and, separately, by Gaussian-process smoothing in the spirit of Hayley Hung et al., who reconstructed trajectories with 95% of labels missing. This is the strongest simple competitor at short gaps.

The flow baseline follows SSVOD. A teacher-student pair is trained with flow-warped pseudo-labels and SSVOD's cross-IoU and cross-divergence filtering. That method reports 48.6% mAP on ImageNet-VID with one labeled frame per video. We port it to the same ReferFormer model.

The zero-training baseline is per-frame Grounding DINO linked by an IoU tracker. It uses the same mask conversion so it can be scored with masks. For calibration, Referring Multi-Object Tracking reports that a ByteTrack adaptation reaches 24.95 HOTA on Refer-KITTI, against 35.54 for an integrated model.

The strongest existing method is mask-first, box-rest training from the weak-annotation paper. It reports 50.1 J&F on Ref-YouTube-VOS with ReferFormer, and that paper's fully supervised ReferFormer run gives 49.9. We run it at its own annotation budget, as an upper reference that uses more labels. We also run it in a sparsified version with boxes only on our keyframes, so its contribution and ours can be compared at equal label budgets. For a ceiling we use dense ReferFormer: 55.6 J&F with ResNet-50 in the original paper, re-run under our mask-from-box setup.

Two ablations isolate the key ingredient. In the first, the cycle starts from generic learned queries instead of $f(e)$. This tests whether language anchoring matters or whether any round trip suffices. In the second, the gate is removed so the contrastive loss applies to all unlabeled frames. This tests whether the gate is what controls hallucination. All methods share data, backbone, iteration count, and an equal hyperparameter search budget of about the same number of trials per method.

Beating the strongest competitor means two things. First, exceeding densification and flow by a margin larger than seed variance at gaps of 20 frames or more. Second, staying within a small margin, which we target at about two J&F points, of dense box supervision at a 1-in-30 keyframe rate. We would state no claim of beating dense masks.

Why not just…?

Why not just interpolate boxes between keyframes and train densely? This is a real threat at short gaps. With smooth motion and gaps of a few frames, interpolated boxes are nearly correct and nothing more is needed. We expect the gap sweep to show interpolation matching us at small $k$. If it also matches us at gaps of 30 frames, the proposal fails. The case for the round trip rests on the frames where interpolation is wrong by construction: turns, occlusions, entrances and exits. For that reason we report results separately on a motion-nonlinearity split, defined by deviation of the true trajectory from linear, which we can measure on densely labeled data.

Why not just warp labels with optical flow? SSVOD shows that flow pseudo-labels need heavy filtering to avoid confirmation bias and add substantial training cost. DOVTrack reports that flow breaks across 30-frame gaps at 1 FPS. Our experiments run the SSVOD pipeline directly, so this is settled empirically rather than by argument. We report both accuracy and training wall-clock.

Why not just run a pretrained grounding model frame by frame and track? It needs no video labels, which is attractive. However, the TAO and Refer-KITTI evidence above shows that detect-then-link pipelines lose badly on association and flicker. Sentences about actions also depend on motion, which a per-frame detector cannot see. We include it as a zero-label baseline and expect it to win only on static, appearance-only expressions. We report results split by expression type to check this.

Why not just use a box-prompted segmenter to make masks from keyframe boxes? We do, inside every condition. This addresses mask quality, not temporal sparsity, so it is held constant rather than competed against.

Proposed Experiments

The main benchmark is Ref-YouTube-VOS, following URVOS. We subsample its training annotations to one keyframe every 10, 20, 40 and 60 frames and convert masks to boxes. Evaluation uses the standard full annotations and J&F. Ref-DAVIS17 serves as a transfer test focused on occlusion; no reported result for ReferFormer or SimRVOS was found on Lacuna for it in the file. A2D-Sentences, scored by mAP (ReferFormer reports 55.0), tests actor-action expressions. Refer-KITTI tests sentences whose referent changes over time, such as "the turning car." Training labels are subsampled to 1 in 15 frames, and HOTA is compared against TempRMOT's 52.21 under dense supervision from Bootstrapping Referring Multi-Object Tracking. This is a stress test, because a FIFO query memory over dense frames is exactly what our sparse regime lacks.

Three checks decide the outcome. The first is the shape of the accuracy-versus-gap curve: our method's advantage over interpolation should be near zero at small gaps and grow with gap length, concentrated in the nonlinear-motion split. The second is the language ablation: replacing $f(e)$ with generic queries should erase most of the gain, as ReferFormer's and TransRMOT's own ablations suggest language conditioning carries target identity. The third is false positives on frames where the target is absent, measured on Ref-YouTube-VOS and Refer-KITTI frames whose dense ground truth is empty. Removing the gate should raise them. If the gate does not change false positives, the hallucination claim is dropped and the work reduces to a cycle-consistency result.