arXiv:2611.02671cs.CVNov 2026

Manuscript Offprint

arXiv:2611.02671

TME-ContextNet: Class-Conditioned Spatial Supervision and Grouped Decoding for Joint Nuclei Instance Segmentation and Classification

Rukang Ma, Bingxue Wang, Liwen Zou, Yingying Cao, Zhenghua Cai, Yu Li, Dong Wang, Huiyu Zhou, Luying Gui

Abstract

Joint nuclei instance segmentation and classification requires precise boundaries and neighborhood information that helps distinguish morphologically similar cell types. We present TME-ContextNet, a multi-task framework that learns class-conditioned spatial context from existing nuclear annotations and organizes decoding into geometry-related and semantic task groups. Class-conditioned spatial supervision extends nuclear labels into a dense target using Euclidean distance transforms, requiring no additional tissue-region annotation. We derive its nearest-region interpretation and characterize its stability to small annotation perturbations. A local-global context module combines dilated convolution and self-attention, while a grouped task decoder reduces redundant computation. The spatial head supplies training supervision and is omitted during inference. Experiments on PanMix, CoNSeP, and PanNuke yield Dice scores of 80.23%, 65.32%, and 79.13%, and mean multi-class panoptic quality (mPQ+) scores of 67.62%, 35.50%, and 43.74%, respectively. PanNuke results are averaged across three test folds. Target and decoder controls support the combination of distance-based supervision and grouped decoding while identifying their dependence on task configuration. The framework uses 36.40 million parameters, compared with 54.74 million for HoVer-Net. These findings support a compact, context-aware formulation for joint nuclei analysis in computational pathology.

Keywords: Computational pathology, nuclei instance segmentation, nuclei classification, spatial supervision, multi-task learning, efficient decoding

1 Introduction

Quantitative analysis of hematoxylin and eosin (H&E) images requires identifying individual nuclei and assigning them biologically meaningful types. The resulting cellular objects support measurements of tissue composition, nuclear morphology, and spatial organization. These measurements are useful because tissue interpretation depends on both cellular appearance and the arrangement of different cell populations. For example, the spatial relationship between lymphocytes and tumor compartments provides information that a total nuclear count alone cannot express. Joint nuclei instance segmentation and classification is therefore a fundamental step in computational pathology and quantitative imaging [1–3].

The joint task presents a tension between local precision and contextual recognition. Separating touching nuclei requires detailed boundaries and reliable instance geometry. Recognizing nuclear types can require a larger field of view because nuclei with similar appearance may occupy different cellular neighborhoods. Staining variation, heterogeneous morphology, and unequal class frequencies make these requirements harder to reconcile. A representation that improves semantic recognition must still retain the spatial detail needed to recover individual nuclei.

Current nuclei-analysis systems address these requirements through geometric prediction, contextual feature extraction, or interactions among multiple tasks. HoVer-Net combines foreground, displacement, and nuclear type prediction [4]; subsequent systems refine encoders, decoders, and whole-slide processing [5, 6]. These advances leave a specific opportunity in the supervision itself. Nuclear type annotations directly identify cell populations inside nuclear regions, while much of the surrounding non-nuclear space remains undifferentiated background. A larger receptive field exposes that space to the model but does not specify how existing cell annotations should organize its representation. At the same time, sharing all late decoder features can constrain tasks with different spatial requirements, whereas independent task decoders repeat substantial computation.

We investigate whether spatial supervision derived from nuclear classes can complement image context within a compact joint model. TME-ContextNet extends existing nuclear labels into the surrounding space through Class-conditioned Spatial Supervision (CSS). The implemented target uses Euclidean distance transforms (EDT) to associate non-nuclear locations with the nearest annotated class region, requiring no additional tissue-region annotation. A Local-Global Context Module (LGCM) combines dilated convolution with self-attention. A Grouped Task Decoder (GTD) shares intermediate features and then separates geometry-related outputs from semantic outputs. The CSS head shapes learning during training and is omitted from the inference outputs.

The contributions concern both the supervision and its integration. We formulate CSS as a class-conditioned spatial partition and derive the conditions under which its assignments are stable to small annotation perturbations. We introduce grouped decoding that couples CSS to nuclear type prediction while retaining a separate refinement path for nuclear geometry. We evaluate the complete framework on PanMix, CoNSeP, and PanNuke and examine target construction, component interactions, sharing depth, and computational cost. The complete model achieves Dice scores of 80.23%, 65.32%, and 79.13%, respectively, and the highest mPQ+ among the evaluated specialist methods on each dataset. The controls characterize the contributions of spatial supervision, contextual features, and decoder sharing to the joint task.

References (34)