Refining weak supervision for robust lung cavity segmentation: A graph-affinity method with boundary constraints

Z Zeyu Ding Z Zhuoyi Tan H Hizmawati Madzin Z Zhengdong Li J Juntao Liu

Abstract

Pixel-level annotation of lung cavities (LCs) in computed tomography (CT) images is challenging due to their morphological diversity and complexity. Weakly supervised semantic segmentation (WSSS) methods, which utilize sparse annotations (e.g., image-level labels), offer a promising solution. However, existing WSSS approaches often generate coarse pseudo-labels and lack sufficient spatial supervision, resulting in under- or over-segmentation of irregular lesions. To address these limitations, we introduce several key innovations. First, we propose a novel Graph-based Affinity Network (GA-Net) that, unlike conventional methods relying on low-level pixel features, models long-range contextual relationships and structural dependencies using a superpixel graph and learned edge inference kernel, enabling structure-aware pseudo-label refinement for complex lesion morphology. Second, we introduce region-wise affinity propagation, which refines segmentation by propagating activations within semantically coherent 3D regions, offering more precise control over under-/over-segmentation compared to global affinity methods. Additionally, we incorporate Exponential Moving Average (EMA) ensembling for training stability and a scribble-based segmentation module that utilizes pseudo-label contours to provide direct boundary supervision. Extensive experiments on three benchmark datasets demonstrate that our method outperforms existing state-of-the-art medical WSSS techniques, achieving precise and reliable segmentation of complex LCs in CT scans.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 21, Issue 2
Published February 10, 2026
Pages e0341717
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (5)

Z

Zeyu Ding

Z

Zhuoyi Tan

H

Hizmawati Madzin

Z

Zhengdong Li

J

Juntao Liu