Medical Referring Image Segmentation via Next-Token Mask Prediction
Xinyu Chen, Yiran Wang, Gaoyang Pang, Jiafu Hao, Chentao Yue, Luping Zhou, Yonghui Li
TL;DR
This paper tackles medical referring image segmentation (MRIS) by reframing the task as autoregressive next-token prediction over a unified multimodal token stream that includes image, text, and mask representations. The authors introduce NTP-MRISeg, a pure Transformer model augmented with three MRIS-specific training strategies: Next-k Token Prediction (NkTP) to mitigate exposure bias, Token-level Contrastive Learning (TCL) to sharpen boundary distinctions and address long-tail token distributions, and Memory-based Hard Error Token (HET) optimization to emphasize persistently difficult tokens. The method tokenizes inputs with an Emu3 SBER-MoVQGAN vision tokenizer and a Qwen text tokenizer, enabling end-to-end training without modality-specific fusion modules, and achieves state-of-the-art results on QaTa-COV19 and MosMedData+ with careful ablations showing the value of each component. The work demonstrates that a streamlined, autoregressive, multimodal approach can surpass traditional MRIS pipelines while leveraging pretrained tokenizers, potentially simplifying deployment and improving robustness in clinical contexts. Key equations are notationally framed around token prediction losses and contrastive objectives, e.g., the base next-token loss and auxiliary NkTP/TCL/HET losses, all operating on discrete token sequences $\{i_n\}$ derived from images, text, and masks.
Abstract
Medical Referring Image Segmentation (MRIS) involves segmenting target regions in medical images based on natural language descriptions. While achieving promising results, recent approaches usually involve complex design of multimodal fusion or multi-stage decoders. In this work, we propose NTP-MRISeg, a novel framework that reformulates MRIS as an autoregressive next-token prediction task over a unified multimodal sequence of tokenized image, text, and mask representations. This formulation streamlines model design by eliminating the need for modality-specific fusion and external segmentation models, supports a unified architecture for end-to-end training. It also enables the use of pretrained tokenizers from emerging large-scale multimodal models, enhancing generalization and adaptability. More importantly, to address challenges under this formulation-such as exposure bias, long-tail token distributions, and fine-grained lesion edges-we propose three novel strategies: (1) a Next-k Token Prediction (NkTP) scheme to reduce cumulative prediction errors, (2) Token-level Contrastive Learning (TCL) to enhance boundary sensitivity and mitigate long-tail distribution effects, and (3) a memory-based Hard Error Token (HET) optimization strategy that emphasizes difficult tokens during training. Extensive experiments on the QaTa-COV19 and MosMedData+ datasets demonstrate that NTP-MRISeg achieves new state-of-the-art performance, offering a streamlined and effective alternative to traditional MRIS pipelines.
