When a surgical grasper is the same dull red as the tissue it holds, or a camouflaged animal blends into the riverbank, the image contains almost no edge to segment along. Current boundary-aware networks still look for that edge in pixel intensity, by sharpening gradients or contrasting local maxima and minima, and they fail precisely where contrast vanishes. This proposal targets referring video segmentation: the model receives a video and a sentence such as "the grasper pulling tissue to the left" and must output a pixel mask of the described object in every frame. In this setting the sentence offers a second source of boundary information. The object's border is also the place where the description stops being true. We propose to compute that place directly, as the sharp spatial change in how well each pixel matches the sentence, and to use it to bias the model's attention near the border instead of relying on intensity edges.
The cue is only meaningful while the sentence actually holds. Before the grasper starts pulling, the words do not describe any pixel, and a boundary computed from them is noise. So the same mechanism needs a temporal switch: a learned per-frame estimate of whether the described moment is happening, which turns the language-derived boundary bias on or off. In two sentences, the idea is this. Under low contrast, use the edge of the sentence's relevance map as the boundary prior instead of the edge of the image. Apply that prior only in frames where the sentence is temporally grounded.
Core Claim
Existing work splits the problem in ways that leave this coupling untouched. Spatial boundary methods inject intensity-derived edges into attention. Zhao et al. use range pooling, the local maximum minus the local minimum, to sharpen borders. MISNet uses axial reverse and boundary attention for polyps. Reverse attention in SeENet erases confident interiors so later layers attend to the perimeter. All of these work on single images, and all of them derive the edge from appearance. Video methods that handle low contrast, chiefly HFSTI-Net, add frequency-domain context and a mask memory but take no language. Its authors also report failure on zero-contrast polyps and under specular glare, which is the regime where an appearance-only prior has nothing left to work with.
Language-guided video models handle the sentence but treat the mask boundary as an afterthought. SAMDWICH shows that restricting language fusion and supervision to the frames where the described action occurs improves MeViS from 49.5 to 51.6 J&F. It uses a standard mask decoder with no boundary mechanism. VIS-Net aligns surgical expressions with instruments through a graph over YOLOv5 proposals. If the detector misses a low-contrast tool, that alignment never happens, and the method has no boundary attention. AMLRIS is the closest in spirit: it computes patch-word similarity maps and masks weakly aligned pixels out of the training loss, which yields crisper static masks. It uses alignment as a training filter and lists video as future work. We use the spatial derivative of the alignment map as a test-time attention bias, gated by a temporal grounding signal.
The claim is falsifiable. On frames whose ground-truth border has low local intensity contrast, an attention bias computed from the sentence-alignment field should improve contour accuracy more than an equal-cost bias computed from image intensity or from the model's own predicted mask. The gain should vanish, or reverse, if the temporal gate is removed.
Research Program
The base model is a SAMDWICH-style referring segmenter, re-implemented if code is unavailable. It has a visual backbone, a text encoder, cross-modal adapters, a mask memory, and a head that predicts per-frame moment relevance trained on MeViS-M timestamps. We add one module between the cross-modal fusion and the mask decoder.
For frame $t$, let $a_t(p)\in[0,1]$ be the similarity between the pooled sentence embedding and the visual feature at location $p$, computed at the decoder's finest feature resolution rather than the coarse patch grid. Range pooling applied to this map gives the language boundary field:
$$ B_t(p) = \max_{q\in N(p)} a_t(q) - \min_{q\in N(p)} a_t(q), $$
where $N(p)$ is a small window around $p$. $B_t$ is large where relevance changes abruptly, meaning where the sentence stops describing the scene. This field enters the decoder's spatial attention as an additive bias on the attention logits, borrowing the structure of gated cross-attention from Kim et al., who showed that a learned gate keeps a weaker stream's features from being washed out:
$$ \ell_t(p,q) = \frac{Q_p K_q^\top}{\sqrt{d}} + \lambda\, g_t\, \big(B_t(p)+B_t(q)\big). $$
Here $\ell_t$ is the logit from query location $p$ to key location $q$, $Q$ and $K$ are the usual query and key projections of dimension $d$, $\lambda$ is a learned scale, and $g_t\in[0,1]$ is the predicted probability that the referred moment is active in frame $t$. When $g_t$ is near zero, the decoder reverts to plain attention and relies on memory propagation, as SAMDWICH does for text-irrelevant frames.
Supervision adds one term. Following Bounding Maps, which replaced binary lesion labels with targets graded from 1.0 at the center to 0.5 at the border and gained up to 3.85 sensitivity points on DeepLesion, we supervise $a_t$ with a soft target. The target decays across a band around the ground-truth contour inside the grounded moment and is unsupervised outside it. This lets the alignment field learn a graded transition instead of a hard step whose position the network can only guess under low contrast. No separate edge annotation is required, which avoids the noisy-edge-label problem that dedicated boundary heads face.
The analysis has two parts. We measure local contrast at the ground-truth border for every annotated frame, as the mean intensity difference across a thin band straddling the contour. We then report all results stratified by contrast tertile, because the hypothesis concerns the low-contrast tertile specifically.
Baselines
The naive reference point is the base model with the module removed. It has the same backbone, memory, moment head, data, schedule, and tuning trials. Every other comparison is measured as a difference from it.
The strongest existing methods are SAMDWICH on MeViS and VIS-Net on EndoVis-RS18. SAMDWICH reports 51.6 J&F on the MeViS valid set, and 55.7 when given ground-truth moment spans SAMDWICH. VIS-Net reports 74.2% overall IoU and 60.1% mAP on EndoVis-RS18 VIS-Net. We quote these published numbers and also retrain both under our pipeline so the comparison is like-for-like. Beating them means a statistically reliable gain over three seeds in overall J&F, together with a larger gain in contour accuracy F on the low-contrast tertile. For RS18, beating VIS-Net means exceeding 74.2 IoU without its YOLOv5 proposal stage. For Refer-YouTube-VOS, the reference points are MTTR's 55.32 J&F on full-video expressions MTTR and SAMDWICH's 60.3 zero-shot. For Refer-DAVIS17, the reference is URVOS's J of 47.29 URVOS. We found no reported result on Lacuna for any baseline on EndoVis-RS17.
Three ablations isolate the key ingredient. The first replaces $a_t$ with image intensity, which amounts to range pooling as in Zhao et al.. The second replaces $a_t$ with the model's own coarse mask logits from a first decoding pass, which is a self-referential boundary prior close to reverse attention. The third keeps the language field but fixes $g_t=1$, so the temporal gate is removed. All three variants have identical parameter counts and compute, and they share the soft-target loss so that only the source of the boundary signal differs.
Why not just…?
Why not just add an auxiliary edge head and contour loss to the SAMDWICH-style model? This is the most serious threat. MISNet and Niu et al. show that such heads help on static low-contrast images. We will run this variant with a MISNet-style parallel boundary attention and an edge loss on the same backbone. Our expectation rests on one fact: an edge head is trained to find appearance transitions, and in the low-contrast tertile those transitions do not exist. If the edge head matches our module on low-contrast frames, the language-derived boundary adds nothing, and we will report that.
Why not just use the model's own predicted mask as the boundary prior, as reverse attention does? If the alignment field is merely a blurrier copy of the mask, the language is decorative. The mask-derived ablation tests this directly. The prediction is that the two separate most clearly on frames where the referred object touches a similar distractor, such as two instruments or two animals. There the mask's edge drifts toward the wrong object, while the sentence still distinguishes them.
Why not just rely on temporal memory to carry boundaries from high-contrast frames? HFSTI-Net and URVOS both propagate masks from memory, and a good memory might fix low-contrast frames by borrowing clearer ones. The base model already includes memory, so any gain we report is on top of it. We additionally stratify low-contrast frames by whether a high-contrast frame of the same object exists within the memory window. If our gain appears only where no such frame exists, memory and language boundaries are complementary. If it disappears there, memory was doing the work.
Why not just segment frames independently with a referring image model and link them with a tracker? MTTR and URVOS report error propagation and drops when temporal modeling is removed. More to the point, a per-frame model cannot know when the sentence applies. We include AMLRIS-style per-frame segmentation with mask linking as a weak reference to quantify this on MeViS, where motion-defined expressions should make it fail.
Proposed Experiments
MeViS with MeViS-M timestamps is the main testbed, because its motion expressions make the temporal gate matter and its moment annotations let us train and evaluate $g_t$. EndoVis-RS18 and RS17 test the surgical low-contrast regime. Their expressions are mostly static references, so the gate there mainly tests spatial benefit, and we will say so rather than claim temporal effects. Refer-YouTube-VOS and Refer-DAVIS17 check that the module does not hurt ordinary-contrast scenes. Metrics are J&F with F reported separately, boundary IoU on a thin contour band, temporal consistency of masks across adjacent frames, and frames per second against the 76 reported for MTTR on an RTX 3090.
The decisive check is an interaction effect. The language-field variant should beat the intensity and mask-derived variants on contour accuracy in the lowest contrast tertile, and it should not do so in the highest tertile. If the language field wins equally everywhere, it is just extra capacity. If it wins nowhere, the idea is wrong.
The second decisive check is the gate. Fixing $g_t=1$ should hurt specifically on frames outside the grounded moment, and the error there should show up as spurious boundary structure in the masks. Replacing $g_t$ with oracle MeViS-M spans gives an upper bound comparable to SAMDWICH's oracle result of 55.7.
A controlled stress test completes the picture. We will synthetically reduce contrast in a band around the ground-truth contour on Refer-DAVIS17 frames, at several strengths, and plot F against strength for every variant. Intensity-based priors should degrade with the remaining edge signal, while the language field should degrade more slowly. That slope difference is the cleanest single piece of evidence the proposal can produce.
References
- MM-UNet: A multimodality brain tumor segmentation network in MRI images
- Multi-scale information sharing and selection network with boundary attention for polyp segmentation
- Towards Bridging Semantic Gap to Improve Semantic Segmentation
- HFSTI-Net: Hierarchical Frequency-spatial-temporal Interactions for Video Polyp Segmentation
- SAMDWICH: Moment-aware Video-text Alignment for Referring Video Object Segmentation
- Video-Instrument Synergistic Network for Referring Video Instrument Segmentation in Robotic Surgery
- AMLRIS: Alignment-aware Masked Learning for Referring Image Segmentation
- An Interpretable Framework for Drug-Target Interaction with Gated Cross Attention
- Bounding Maps for Universal Lesion Detection
- End-to-End Referring Video Object Segmentation with Multimodal Transformers
- URVOS: Unified Referring Video Object Segmentation Network with a Large-Scale Benchmark
- A Medical Image Segmentation Method based on Multi-scale Features and Contour Loss Constrain (S)