CountXplain: Interpretable Cell Counting with Prototype-Based Density Map Estimation

Abdurahman Ali Mohammed 1, Wallapak Tavanapong 1, Catherine Fonder 2,3,5, Donald S. Sakaguchi 2,3,4,5 · 2025

Read CountXplain: Interpretable Cell Counting with Prototype-Based Density Map Estimation by Abdurahman Ali Mohammed 1, Wallapak Tavanapong 1, Catherine Fonder 2,3,5, Donald S. Sakaguchi 2,3,4,5 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-19686.txt.

Introduction

Abdurahman Ali Mohammed, Wallapak Tavanapong, Catherine Fonder, and Donald S. Sakaguchi make cell counting explain itself. Deep networks count cells in biomedical images well, but clinicians cannot see why a count came out as it did. Their method estimates a density map while learning prototype patterns for cells and background clutter.

A prototype layer inside the network lets each count be traced to image regions that match a learned pattern. Biologists surveyed confirmed the patterns are meaningful, which supports the explanations. On two public data sets the method counts as accurately as opaque rivals. A transparent tool, the authors argue, earns trust and speeds clinical adoption.

Catalog record

CREATORAbdurahman Ali Mohammed 1, Wallapak Tavanapong 1, Catherine Fonder 2,3,5, Donald S. Sakaguchi 2,3,4,5
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE31 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2511-19686

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

CountXplain: Interpretable Cell Counting with Prototype-Based Density Map Estimation Abdurahman Ali Mohammed 1, Wallapak Tavanapong 1, Catherine Fonder 2,3,5, Donald S. Sakaguchi 2,3,4,5 Abstract Cell counting in biomedical imaging is pivotal for various clinical applications, yet the interpretability of deep learning models in this domain remains a significant challenge. We propose a novel prototype-based method for interpretable cell counting via density map estimation. Our approach integrates a prototype layer into the density estimation network, enabling the model to learn representative visual patterns for both cells and background artifacts. The learned prototypes were evaluated through a survey of biologists, who confirmed the relevance of the visual patterns identified, further validating the interpretability of the model. By generating interpretations that highlight regions in the input image most similar to each prototype, our method offers a clear understanding of how the model identifies and counts cells. Extensive experiments on two public datasets demonstrate that our method achieves interpretability without compromising counting effectiveness. This work provides researchers and clinicians with a transparent and reliable tool for cell counting, potentially increasing trust and accelerating the adoption of deep learning in critical biomedical applications. Code is available at https://github.com/NRT-D4/CountXplain . \midlauthor 1 Department of Computer Science, Iowa State University, Ames, IA 50011 2 Department of Genetics, Development, and Cell Biology, Iowa State University, Ames, IA 50011 3 Molecular, Cellular, and Developmental Biology Program, Iowa State University, Ames, IA 50011 4 Neuroscience Program, Iowa State University, Ames, IA 50011 5 Nanovaccine Institute, Iowa State University, Ames, IA 50011 † † year: 2025 † † workshop: Full Paper – MIDL 2025 † † volume: – 85 † † editors: Accepted for publication at MIDL 2025 keywords Cell Counting, Biomedical Imaging, Deep Learning, Interpretability, Density Map Estimation 1 Introduction Accurate cell counting is vital in biomedical imaging, enabling crucial insights into cellular processes. It is essential for disease diagnosis 25 ; 5 , treatment evaluation 28 , and biomedical research 9 ; 7 . Accurate counts are imperative for both scientific discovery and improving patient outcomes. Traditionally, cell counting relied on manual methods that are labor-intensive, prone to variability, and impractical for high-throughput tasks. Automated detection-based (segmentation and object detection) approaches aimed to localize and count individual cells 2 ; 1 ; 23 , but their performance degraded in densely packed or overlapping scenarios. Density map estimation (DME) emerged as an effective alternative by predicting a density map where the sum over all the pixels in the map image corresponds to the object count within the input image 16 . This approach excels in handling crowded and overlapping cells, making it particularly suited for biomedical applications with many cell counts in the range of hundreds to thousands per image. Deep learning methods, such as fully convolutional networks 36 ; 27 ; 19 ; 38 and self-attention layers 12 , have further enhanced DME’s capabilities. Notably, CSRNet 17 , originally designed for crowd counting, was adapted for cell counting 24 ; 21 , leveraging its ability to handle scale variation and complex spatial distributions. In critical domains like healthcare and biomedicine, models that offer both accurate prediction and interpretability (the rationale behind model predictions) are highly desirable but are often difficult to achieve, especially for high-resolution images. Most interpretability techniques were proposed for classification tasks. Layer-wise Relevance Propagation 3 , Class Activation Mapping (CAM) 39 , Grad-CAM 31 , and several others highlight regions influencing model predictions. Prototype-based methods like ProtoPNet 6 , ProtoPShare 30 , and ProtoVAE 11 learn prototypes (i.e., generalized visual representation in latent space) for class-specific decisions, offering interpretable insights. ProtoPNet-based methods have been utilized in medical image classification tasks 4 ; 20 ; 32 ; 33 ; 8 . Interpretability methods for regression tasks on image input received much less attention. INSightR-Net 14 leverages a prototype layer to compare input images to learned prototypes, enabling intuitive visual explanations for diabetic retinopathy grading. Similarly, ExPeRT 13 uses a prototype-based architecture for brain age prediction, incorporating optimal transport to align patches with learned prototypes. While effective for scalar predictions, the architectures of ExPeRT and Insight-RNet are not inherently designed for spatially distributed outputs like density maps. Both methods also rely on prototype labels, limiting applicability in scenarios like cell counting, where the number of cells in a single image in the same experiment can vary significantly from zero to thousands. To date, we found no existing interpretability methods for density map estimation models . These limitations underscore the need for novel interpretability methods tailored to density map estimation, particularly in cell counting tasks. Addressing this gap could enable models to not only provide accurate predictions but also explain their reasoning in a way that is actionable for clinicians and researchers. To bridge this gap, we propose CountXplain, a new prototype-based approach for interpretable cell counting via density map estimation. To our knowledge, this is the first framework integrating a prototype layer into the DME framework. Our method enables the model to learn prototypes, providing a transparent and intuitive explanation of its predictions without reducing its effectiveness in counting. These prototypes are used to generate interpretations that could help biologists understand the model’s decisions for individual images as well as patterns the model has learned from the training set. Our contributions are summarized as follows: • CountXplain, a novel cell counting framework that integrates prototype learning with density map estimation, providing both accurate predictions and interpretability. The framework utilizes two new components for the loss function: (1) a prototype-to-feature loss for getting cell prototypes to focus on regions containing cells and background prototypes to focus on background areas; and (2) a diversity loss within each group of prototypes to capture a wide range of feature patterns within each group. • CountXplain performance on two public datasets achieves counting performance comparable to state-of-the-art models while providing interpretability. • Our preliminary survey results with biologists demonstrate the relevance of the learned prototypes to cells and background artifacts. CountXplain provides the accuracy of density map estimation and transparency in the model’s decision-making, offering a valuable tool for biomedical research and applications. 2 Proposed Interpretable Prototype-based DME Our design goal is to enable interpretability while maintaining accurate cell counting and spatial distribution of cells for each image. The proposed design using a new prototype layer can reveal patterns used in the model’s decision for the predicted spatial distribution of cells per image and overall patterns the model has learned from the training set. 2.1 Model Architecture Our network architecture builds upon the feature extractor of a pre-trained density map estimation model based on a Convolutional Neural Network (CNN). We choose CNNs over Vision Transformers (ViTs) due to the limited availability of labeled data in this domain. CNNs leverage strong spatial inductive biases, making them more effective in data-scarce scenarios, whereas ViTs typically require large-scale datasets for optimal performance 29 ; 26 ; 10 . Figure illustrates the network architecture. Feature Extractor. A pre-trained feature extractor F(\mathbf{x}) takes an input image \mathbf{x}\in\mathbb{R}^{c\times H\times W} and produces a feature map F(\mathbf{x})\in\mathbb{R}^{d\times H_{f}\times W_{f}} . The input image has c channels, while the output has d channels. H x W and H_{f} x W_{f} indicate the height and width per channel of the input image

Read the complete text