LENS: Learning to Segment Anything with Unified Reinforced Reasoning

Lianghui Zhu, Bin Ouyang, Yuxuan Zhang, Tianheng Cheng, Rui Hu +6 more
8/19/2025
cs.CVcs.AI

Official code: hustvl/LENS (135 stars, Apache-2.0, last commit 2025-12-03).

Abstract

Text-prompted image segmentation enables fine-grained visual understanding and is critical for applications such as human-computer interaction and robotics. However, existing supervised fine-tuning methods typically ignore explicit chain-of-thought (CoT) reasoning at test time, which limits their ability to generalize to unseen prompts and domains. To address this issue, we introduce LENS, a scalable reinforcement-learning framework that jointly optimizes the reasoning process and segmentation in an end-to-end manner. We propose unified reinforcement-learning rewards that span sentence-, box-, and segment-level cues, encouraging the model to generate informative CoT rationales while refining mask quality. Using a publicly available 3-billion-parameter vision-language model, i.e., Qwen2.5-VL-3B-Instruct, LENS achieves an average cIoU of 81.2% on the RefCOCO, RefCOCO+, and RefCOCOg benchmarks, outperforming the strong fine-tuned method, i.e., GLaMM, by up to 5.6%. These results demonstrate that RL-driven CoT reasoning significantly enhances text-prompted segmentation and offers a practical path toward more generalizable Segment Anything models (SAM). Code is available at https://github.com/hustvl/LENS.

View on arXivView PDF

Code Implementations(1)

hustvl/LENSOfficial100%
Apache-2.0

[AAAI 2026 Oral] LENS: Learning to Segment Anything with Unified Reinforced Reasoning

1359Cuda, ShellAug 11, 202510 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhu2025lens,
  title  = {LENS: Learning to Segment Anything with Unified Reinforced Reasoning},
  author = {Lianghui Zhu and Bin Ouyang and Yuxuan Zhang and Tianheng Cheng and Rui Hu and Haocheng Shen and Longjin Ran and Xiaoxin Chen and Li Yu and Wenyu Liu and Xinggang Wang},
  year   = {2025},
  eprint = {2508.14153},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.14153v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.14153.svg)](https://codeofpaper.com/paper/2508.14153)

Discussion