arXiv:2610.32493cs.CVOct 2026

Manuscript Offprint

arXiv:2610.32493

K-CLUE: A Segmentation-to-Clustering Framework for Ki67 Cell Typing

Ana Beatriz Vieira, Sara P. Oliveira, Diana Montezuma, João Fraga, Jaime S. Cardoso, Arlindo L. Oliveira

Ana Beatriz Vieira 1,2^{1,2}

anabeatrizvieira@tecnico.ulisboa.pt

Sara P. Oliveira 3^{3}

s.oliveira@nki.nl

Diana Montezuma 4^{4}

diana.felizardo@impdiagnostics.com

João Fraga 4^{4}

joao.fraga@impdiagnostics.com

Jaime S. Cardoso 5,6^{5,6}

jaime.cardoso@fe.up.pt

Arlindo L. Oliveira 1,2^{1,2}

arlindo.oliveira@tecnico.ulisboa.pt

1^{1} Instituto Superior Técnico,

Universidade de Lisboa, Portugal

2^{2} INESC-ID, Lisboa, Portugal

3^{3} The Netherlands Cancer Institute Amsterdam, The Netherlands

4^{4} IMP Diagnostics, Porto, Portugal

5^{5} Faculdade de Engenharia,

Universidade do Porto, Portugal

6^{6} INESC-TEC, Porto, Portugal

Abstract

Ki67 is a key marker of tumor proliferation in breast cancer, but its quantification from immunohistochemistry images normally depends on supervised classifiers trained per dataset. We examine the role of frozen pretrained visual representations in annotation-free Ki67 cell typing. To this end, we use K-CLUE, a framework that segments individual nuclei, represents each nucleus with a pretrained encoder, reduces the resulting embeddings with principal component analysis, and separates Ki67-positive from Ki67-negative nuclei using k-means clustering, without task-specific training or manual annotations. Clustering the raw components is highly sensitive to the choice of encoder: across seven encoders, the Ki67-positive F1-score on matched MIST nuclei varies by 44 points, although Ki67 status remains linearly decodable from every representation, with supervised probe AUCs above 0.98. Analysis of the embedding spaces shows that clustering succeeds when DAB-related variation occupies the leading directions of variance. Whitening the retained principal components removes this dependence, reducing the spread across encoders to 1.00 F1-score point. Handcrafted color representations are also competitive, confirming that Ki67 status is strongly reflected in chromatic information, but they require an explicit choice of color space. In end-to-end evaluation, K-CLUE reaches F1-scores of 85.00% and 81.91% for Ki67-positive and Ki67-negative nuclei on MIST, and 79.59% and 81.16% on BCData, outperforming DeepLIIF and IHC-ScoreGAN on both datasets. These results show that pretrained representations can support annotation-free Ki67 typing when their variance structure is accounted for.

© 2026. The copyright of this document resides with its authors. It may be distributed unchanged freely in print or electronic forms.

1 Introduction

Breast cancer remains one of the most critical challenges in global healthcare and is currently the most frequently diagnosed malignancy among women worldwide. Despite substantial therapeutic advances, early and accurate tumor characterization remains essential, as many cases are still diagnosed at advanced stages, limiting treatment efficacy [20][20].

Modern oncology has therefore shifted toward precision medicine, where treatment decisions are tailored to the molecular profile of the tumor. In breast cancer, stratification relies on immunohistochemistry (IHC) biomarkers, such as estrogen receptor (ER), progesterone receptor (PgR), and HER2. While these markers capture key hormonal and genetic dependencies, they provide limited information regarding tumor proliferative activity and aggressiveness [1][1].

The Ki67 biomarker addresses this limitation. Ki67 is a nuclear protein expressed during the active phases of the cell cycle ( G1,S,G2G_{1}, S, G_{2}, and mitosis) and absent in resting cells ( G0G_{0}) [1, 6, 20]. In practice, Ki67 is visualized using a dual H-DAB staining protocol that colors proliferating nuclei brown and all other nuclei blue. Accurate classification of individual nuclei as Ki67-positive or Ki67-negative is therefore the critical step underlying assessment of proliferative activity, subtype stratification, and chemotherapy planning.

Despite its clinical relevance, Ki67 quantification remains largely manual. Whole-slide images (WSIs) may contain hundreds of thousands of nuclei, making exhaustive counting impractical. Pathologists, therefore, estimate the index by visually inspecting selected regions of interest (ROIs), typically high-proliferation areas (hotspots) at the invasive front of the tumor, and assessing the proportion of positive and negative nuclei. Since any detectable brown nuclear staining is considered positive, independent of staining intensity, borderline cases require subjective interpretation, leading to significant inter-observer variability [6][6].

Given the clinical importance of reliable Ki67 assessment, there is a clear need for automated and reproducible computational methods that do not depend on costly nuclear annotations. To address this, we introduce K-CLUE, an annotation-free pipeline for Ki67 cell typing. Individual nuclei are first segmented, each nuclear crop is represented using a frozen pretrained encoder, the embeddings are reduced with principal component analysis (PCA), and the retained components are clustered into Ki67-positive and Ki67-negative groups.

The choice of pretrained encoder, however, has a substantial effect on the resulting clusters. Keeping the segmentation, nuclear crops, and clustering procedure fixed, changing only the encoder causes the Ki67-positive F1-score to vary by more than forty percentage points. This variation does not follow encoder capacity or pretraining domain.

We show that these differences arise from the geometry of the embedding space rather than from the absence of Ki67-relevant information. Since k-means operates on Euclidean distances, directions of high variance have greater influence on the resulting clustering. Ki67 status is therefore recovered when staining-related variation is prominent among the leading principal components, but may be ignored when other sources of variation dominate them. A supervised linear probe confirms that Ki67 status is linearly decodable from every encoder we evaluate, including those whose unsupervised clustering performance is close to chance. Whitening the retained principal components reduces this dependence by rescaling them to unit variance and preventing individual high-variance directions from dominating the clustering objective.

We further compare these learned representations with handcrafted color descriptors. Their strong performance confirms that Ki67 typing is largely driven by chromatic information, while also showing that the most effective handcrafted color representation varies across datasets. K-CLUE instead recovers the relevant separation from generic frozen representations without requiring a task-specific color descriptor. The contributions of this paper are the following:

• We show that whitening the principal components makes the pipeline largely independent of the encoder, removing the need to select a representation or color descriptor per dataset.

• We validate the resulting pipeline, K-CLUE, end-to-end on two public cohorts under a single configuration, against supervised, generative, and handcrafted color baselines.

Annotations are used only for evaluation and for the analyses explicitly identified as supervised probes, never by the method itself.

References (27)