CAPA: Context-Aware Prototype Adaptation for Weakly Supervised Histopathology Segmentation
Abstract
Weakly supervised semantic segmentation (WSSS) reduces the need for costly pixel-level annotations in histopathological image analysis. However, CAM-based WSSS often suffers from ambiguous tissue boundaries, inter-class visual similarity, intra-class morphological variation, and a missing spatial context in patch-level processing. We propose CAPA, a Context-Aware Prototype Adaptation framework that improves CAM generation through two components: Neighbor Context Attention, which incorporates information from spatially adjacent patches, and Reliability-Aware Contrastive Loss, which adapts subclass prototypes while suppressing unreliable CAM-derived samples. By jointly modeling spatial tissue continuity and sample reliability, CAPA provides more discriminative and stable supervision for CAM generation. Experiments on BCSS-WSSS and LUAD-HistoSeg show that CAPA improves the mIoU by 6.4 and 4.2 pp over the previous best method, respectively. These results demonstrate the effectiveness of combining neighborhood context modeling with reliability-aware prototype adaptation for weakly supervised histopathological segmentation.