RWKV-MIL: Efficient Weakly Supervised Histopathology Image Segmentation via Hilbert Curve-Based Linear Attention
Background/Objectives: Weakly supervised histopathology image segmentation aims to reduce the need for pixel-level annotations during training. Multiple Instance Learning (MIL) enables instance prediction using image-level labels, but the quadratic complexity of self-attention limits attention-based MIL at pixel resolution. This study develops an MIL framework with linear-complexity attention for segmentation at the input-image pixel resolution. Methods: We propose RWKV-MIL, based on the Receptance Weighted Key Value (RWKV) architecture, to extend MIL from patch-level to pixel-level instance prediction. A class token provides bag-level predictions through a classifier shared with the instance tokens. The proposed H-RWKV block introduces Hilbert-WKV attention, which combines bidirectional WKV attention with Hilbert-curve scanning to preserve spatial continuity between adjacent tokens in the sequence. Negative and positive instance losses jointly constrain instance representation learning using bag-level labels. We evaluated the framework on the Colon, WSSS4LUAD, and CAMELYON16 datasets and conducted ablation experiments. Results: Across three independent training runs, RWKV-MIL achieved positive-image F1-scores of 0.865±0.005, 0.813±0.003, and 0.803±0.007 on Colon, WSSS4LUAD, and CAMELYON16, respectively. Conclusions: RWKV-MIL supports weakly supervised segmentation of cropped histopathology images using image-level labels and linear-complexity attention. The component analyses support the evaluated design while leaving limitations in localization, evaluation coverage, and statistical precision.
Authors
- Hao Lü (ORCID: https://orcid.org/0000-0002-4547-7780)
- Bingzheng Wei (ORCID: https://orcid.org/0000-0001-6979-0459)
- Ziniu Qian
- Maode Lai (ORCID: https://orcid.org/0000-0001-6830-9774)
- Maode Lai
- Yan Xu
Institutions
- Oldham Council (GB)
- ByteDance (China) (CN)
- Alibaba Group (China) (CN)
- Zhejiang University (CN)
- Beihang University (CN)
Publication Details
- Journal
- Diagnostics
- Published
- 2026-11-24
- DOI
- https://doi.org/10.3390/diagnostics16233950
- Primary Topic
- AI in cancer detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China