Local Attention Learns From Registration for In-Context Medical Image Segmentation
Abstract
In-Context Segmentation (ICS) uses a small set of annotated samples as a prompt and has proven to be a powerful paradigm for both domain and task generalization in medical image segmentation. However, current ICS models often assume that the query image and the provided context are spatially aligned, a condition frequently unmet in real-world clinical scenarios. This paper introduces OmniSeg, a novel ICS model that dynamically aligns context and query representations, with two core contributions: SpotBlock, a new module combining spatial and contextual dense attention, and a deep registration scheme that supervises this attention with a registration loss. Our method better leverages the context set, which is crucial for out-of-distribution scenarios, and thus achieves strong generalization. OmniSeg significantly outperforms state-of-the-art ICS methods, yielding an average gain of 9.8 Dice points against the best baseline across 10 held-out datasets. Our approach paves the way for a new generation of spatially-aware ICS models. Source code will be released upon publication.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.