1. Introduction
Histopathological image analysis is a cornerstone of modern cancer diagnosis, providing critical insights into tissue morphology, cellular organization, and disease progression [
1,
2]. With the widespread adoption of whole-slide imaging systems in routine clinical workflows, large volumes of high-resolution histopathological images are now generated as part of standard diagnostic practice, creating an urgent need for automated, reliable, and clinically robust computational analysis methods [
3,
4]. In this context, histopathological images constitute a rich source of imaging-based omics (pathomics) information, enabling the quantitative characterization of tumor heterogeneity and organ-specific disease phenotypes directly from patient tissue specimens. The accurate classification of such images is particularly critical in multi-organ and multi-cancer settings, where subtle morphological differences across tissues and disease subtypes must be distinguished under diverse staining protocols and acquisition conditions.
Early computational approaches to histopathological image classification relied on handcrafted feature extraction combined with conventional machine learning classifiers [
5,
6]. Although these methods demonstrated limited success in controlled scenarios, their dependence on manually designed features constrained their ability to generalize across heterogeneous tissue appearances, staining variations, and imaging protocols commonly encountered in real-world clinical practice [
7]. The emergence of deep learning, particularly convolutional neural networks (CNNs), substantially advanced digital pathology by enabling data-driven feature learning directly from raw pixel intensities. CNN-based models have shown strong performance in capturing localized morphological patterns such as nuclear shape, texture, and glandular organization, and have become a dominant paradigm in histopathological image analysis [
8].
Despite these advances, CNN-based approaches exhibit inherent inductive biases that emphasize localized feature aggregation through fixed receptive fields [
9]. While such biases are well suited for encoding fine-grained cellular morphology, they may limit the ability to capture distributed dependencies and higher-order structural relationships that emerge across larger spatial extents in histopathological images. To address this limitation, transformer-based architectures have been introduced into medical image analysis, leveraging self-attention mechanisms to model long-range interactions across spatial tokens [
10]. Several studies have demonstrated that vision transformers can capture broader contextual information and improve performance on large-scale pathology datasets [
11,
12,
13].
However, transformer-based models introduce new challenges when applied to high-resolution histopathological data. Self-attention mechanisms incur quadratic computational complexity with respect to image resolution, making them computationally expensive and memory-intensive for whole-slide or large patch-based analysis [
14]. In addition, transformers can be sensitive to appearance variations arising from staining differences and scanner characteristics, potentially learning spurious correlations that degrade robustness under distribution shifts [
15]. Hybrid architectures that combine convolutional and transformer components have been proposed to balance efficiency and representational capacity, but these methods are often framed primarily as mechanisms for fusing local and global features, without explicitly addressing deeper representation learning challenges [
16].
Recent work in medical image analysis has begun to question whether architectural design framed solely around local versus global feature modeling is sufficient to address the intrinsic challenges of histopathological representation learning [
17]. Unlike natural images, histopathological images lack a dominant object-centric structure and instead exhibit weakly organized, heterogeneous visual patterns, where diagnostically relevant evidence is spatially distributed and varies substantially across patients and cancer types [
18]. In such settings, the central challenge extends beyond multi-scale feature aggregation to learning stable, semantically meaningful, and biologically relevant representations that are resilient to non-biological appearance variations and capable of modeling complex dependencies without overfitting to dataset-specific artifacts.
The complexity is further amplified in multi-organ and multi-cancer diagnostic scenarios, where distinct organs possess unique baseline morphologies and structural priors. Treating multi-organ histopathological classification as a flat prediction problem risks entangling organ-dependent morphological characteristics with disease-specific diagnostic cues, thereby increasing ambiguity, reducing interpretability, and limiting clinical generalizability. Recent studies have highlighted the importance of representation regularization and hierarchical modeling to reduce entanglement between organ-dependent and disease-specific factors, underscoring the need for architectures that better reflect the structural and semantic organization of histopathological data [
19,
20]. The main contributions of this work are summarized as follows:
We propose a representation-centric framework for multi-organ histopathological image classification that explicitly addresses the weak structural organization of tissue and appearance variability inherent in pathology-derived imaging-based omics data. This framework integrates local morphology encoding with global dependency modeling, enabling more expressive and semantically meaningful feature representations than prior CNN- or transformer-based methods.
We introduce an efficient dependency modeling strategy based on a two-dimensional Vision State Space Module (VSSM) to capture spatial relationships with linear computational complexity. This approach allows high-resolution histopathological images to be modeled effectively, bridging fine-grained cellular patterns and long-range tissue context in a unified representation.
We incorporate hierarchical supervision and stain-robust consistency regularization to guide the network in disentangling organ-dependent structural characteristics from disease-specific diagnostic patterns. These mechanisms improve representation stability, with generalization across augmented appearance variations.
Collectively, the combination of morphology-preserving local feature extraction, dependency-aware global modeling, hierarchical guidance, and consistency-based regularization establishes a methodologically novel approach that addresses both representation learning and generalization challenges in multi-class, multi-organ histopathology image analysis.
3. Method
3.1. Problem Definition and Motivation
Histopathological image classification aims to infer disease-related tissue states from high-resolution microscopic images acquired under diverse staining and imaging conditions. Given an input image , the objective is to predict a diagnostic label , where denotes organ- and disease-specific tissue categories. Unlike natural images, histopathological images exhibit weakly structured visual organization, where diagnostically relevant evidence is distributed across heterogeneous spatial patterns without dominant object-centric layouts. Cellular morphology, glandular arrangement, stromal interaction, and tissue heterogeneity jointly contribute to diagnosis, yet these cues are neither spatially aligned nor consistently expressed across samples. Effective classification therefore requires modeling complex dependencies while preserving sensitivity to subtle diagnostic signals.
Non-biological variations introduced by staining protocols, scanner characteristics, and acquisition settings can induce distribution shifts. Ensuring representation stability under such shifts is important for improving robustness within controlled experimental settings. Furthermore, in multi-organ diagnostic scenarios, different organs possess distinct baseline morphology. Treating multi-organ classification as a flat problem may entangle organ-dependent visual cues with disease-specific patterns, reducing interpretability. Accordingly, an effective framework should capture heterogeneous and weakly structured diagnostic cues, maintain robustness to appearance variability, and leverage latent hierarchical structure to regularize classification across organs. The overall architecture jointly models local cellular morphology and global tissue organization while aiming to improve robustness to stain and scanner variability within the evaluated dataset setting, as illustrated in
Figure 1.
3.2. Input Representation and Preprocessing
Input images are resized or cropped to a fixed resolution of and normalized channel-wise. Since the dataset consists of tissue-centered image patches, no explicit tissue extraction is required. To mitigate non-biological appearance variations caused by staining protocols and scanner characteristics, a pathology-aware augmentation operator is applied during training, including random rotations, horizontal and vertical flips, color and contrast jittering, and mild blur. Validation and test images are not augmented, ensuring a realistic evaluation of generalization. The input image is first transformed through an initial embedding layer, producing feature maps that serve as a shared representation for all subsequent modeling stages.
3.3. Morphology-Preserving Representation Encoding
The morphology-preserving representation module captures diagnostically relevant microstructural features, including nuclear variation, chromatin organization, and glandular boundaries. Given the embedded feature map
, the updated representation is expressed as Equation (
1):
where
and
denote depthwise and pointwise convolutions, respectively, and
is a nonlinear activation. Residual connections ensure morphology-sensitive cues are preserved while supporting stable feature transformations under appearance variability. This module contains four residual blocks with channel dimensions 64, 128, and 256.
3.4. Dependency-Aware Representation Modeling
Global tissue dependencies are modeled using a two-dimensional Vision State Space Module (VSSM) as shown in Equation (
2):
where LN denotes layer normalization and SSM2D performs directional 2D scanning along horizontal and vertical axes. The VSSM embedding size is 256, providing linear computational complexity for modeling long-range dependencies.
3.5. Complementary Representation Fusion and Refinement
The morphology-preserving and dependency-aware representations are fused using Modulation Interaction Feature Aggregation (MIFA) as in Equation (
3):
where
and
are learned modulation gates. The fused embedding is refined through a Partially Selective Feed-Forward Network (PSFFN), as given in Equation (
4).
which consists of one linear layer with 256 hidden channels to selectively transform feature channels.
3.6. Hierarchical Prediction Heads and Training Objective
Global pooling produces an image-level embedding, as in Equation (
5), which is input to the organ and disease prediction heads as shown in Equations (
6) and (
7):
Hierarchical supervision encourages the network to separate organ-specific structure from disease-specific patterns. Stain-robust consistency learning is enforced with two augmented views
and
, producing
and
, with symmetric Kullback–Leibler divergence [
50] as shown in Equation (
8), and the total loss is expressed as Equation (
9):
3.7. Implementation Details for Reproducibility
To ensure reproducibility, all modules are fully described in the text. The morphology-preserving module has four residual blocks with channel dimensions 64, 128, and 256. The VSSM embedding is 256, scanning horizontally and vertically. The fusion module includes one PSFFN layer, and each prediction head consists of a single linear layer with softmax output. Training is performed for 100 epochs using Adam optimizer with cosine annealing, batch size 32, and learning rate 0.0001. Loss weights are
and
. Convolutional layers use Kaiming initialization, linear layers use Xavier initialization, the random seed is fixed at 42, and model selection is based on the best validation accuracy within each individual run. For the final evaluation, the model is trained and evaluated across three independent runs with different random seeds, and performance variability is reported separately. The overview is shown in Algorithm 1.
| Algorithm 1 Hierarchically regularized histopathology classification |
- Require:
Image x, labels y, organ o, augmentation functions - 1:
Preprocess x: resize , normalize channels - 2:
Embed features: - 3:
Local features: - 4:
Global features: - 5:
Fuse: - 6:
Refine: - 7:
Pool to get embedding: - 8:
Compute organ prediction: - 9:
Compute disease prediction: - 10:
Augment: , - 11:
Compute consistency loss: - 12:
Total loss: - 13:
Update network parameters via Adam optimizer
|
The model is trained using a batch size of 32 with the Adam optimizer for 100 epochs, employing a cosine learning rate schedule. The loss function incorporates weighted components with
and
. To ensure reproducibility, a random seed of 42 is used, and all results are averaged over three independent runs. The residual blocks follow the standard ResNet pre-activation design, consisting of Conv-BN-ReLU-Conv-BN-ReLU sequences. The VSSM stage is configured with a depth of four, corresponding to four sequential scanning passes over the spatial feature map, enabling effective modeling of organ-dependent contextual information. The architectural overview is summarized in
Table 4.
The total number of trainable parameters in the network is approximately 23.5 million, and the model requires 45.2 GFLOPs for a single forward pass of a input. The PSFFN layer uses a linear transformation without additional normalization, while MIFA modulation gates and are learned parameters applied element-wise. The loss weights and were selected based on preliminary validation experiments to balance organ-level supervision with stain-robust consistency learning. Sensitivity analysis showed that moderate variations () in these weights had minimal impact on overall test accuracy and F1-scores, indicating that the model’s performance is stable and not overly sensitive to the exact choice of loss weighting.
4. Results
Figure 2,
Figure 3,
Figure 4,
Figure 5 and
Figure 6 report mean ± standard deviation across three independent runs with different random seeds, illustrating reproducibility and robustness. This ensures the tables reflect concrete per-run performance, while the figures demonstrate performance stability.
4.1. Dataset Description
Experiments were conducted on the LC25000 histopathological image dataset, containing lung and colon tissue images. The original dataset comprises 1250 images: 750 lung tissue images (250 benign, 250 adenocarcinoma, and 250 squamous cell carcinoma) and 500 colon tissue images (250 benign and 250 adenocarcinoma). All images are RGB JPEGs.
For model training, the dataset was split at the image level, as patient- or slide-level metadata were not available. The splits were as follows: training set: 875 images (70% of the original images); validation set: 188 images (15%); and test set: 187 images (15%). Data augmentation was applied only to the training set using standard transformations including random rotations, horizontal/vertical flips, color and contrast jittering, and mild blur. This increased the effective training set to approximately 6125 images. Validation and test sets were not augmented, containing only the original images to ensure a realistic assessment of generalization.
Table 5 is updated to clearly distinguish between the original image counts and the augmented training set size.
Table 5.
Dataset splits and augmentation. Original counts refer to the number of images before augmentation; augmented counts indicate the effective training set size after augmentation. Validation and test sets contain only original images.
Table 5.
Dataset splits and augmentation. Original counts refer to the number of images before augmentation; augmented counts indicate the effective training set size after augmentation. Validation and test sets contain only original images.
| Organ | Class | Original Training | Validation | Test |
|---|
| Lung | Benign Tissue | 175 | 38 | 37 |
| Lung | Adenocarcinoma | 175 | 38 | 37 |
| Lung | Squamous Cell Carcinoma | 175 | 38 | 37 |
| Colon | Benign Tissue | 175 | 38 | 37 |
| Colon | Adenocarcinoma | 175 | 38 | 37 |
| Total Augmented Training | 6125 images |
To prevent intra-image leakage, dataset splits were performed at the original image level, which is the highest level of independence supported by the LC25000 dataset. The dataset was originally composed of 1250 images (750 lung and 500 colon), which were augmented to 25,000 images. All augmented images derived from the same original image were retained within the same partition to reduce intra-image information leakage. Patient- or slide-level metadata were not available in this publicly released dataset, so true patient-level separation could not be enforced. This approach ensures that the validation and test sets remain independent of the training data, providing a realistic assessment of model generalization.
The multi-organ, five-class classification task involves predicting one of five tissue types spanning two organs: lung (benign, adenocarcinoma, and squamous cell carcinoma) and colon (benign and adenocarcinoma). Each image is assigned a single label corresponding to its organ–class pair.
Table 6 summarizes the class indices and their corresponding organ and tissue type.
Table 6.
Multi-organ five-class label mapping.
Table 6.
Multi-organ five-class label mapping.
| Class Index | Organ | Tissue Type |
|---|
| 0 | Lung | Benign |
| 1 | Lung | Adenocarcinoma |
| 2 | Lung | Squamous Cell Carcinoma |
| 3 | Colon | Benign |
| 4 | Colon | Adenocarcinoma |
4.2. Experimental Setup
All experiments were conducted on an NVIDIA RTX 3090 GPU using PyTorch 2.0. Input images were resized to and normalized channel-wise. Training was performed for 100 epochs with a batch size of 32 using the Adam optimizer and a cosine annealing learning rate schedule.
Dataset splits were performed at the image level, as patient- or slide-level metadata were not available. All augmented images derived from the same original sample were retained within the same split to mitigate intra-image leakage. Augmentation was applied only to the training set, increasing its effective size to 6125 images. Validation and test sets contained only original images (188 and 187 images, respectively) to ensure fair evaluation of generalization performance.
We evaluated the proposed framework on multi-organ histopathological image classification, including lung and colon datasets.
Table 7 summarizes the class-wise accuracy, precision, recall, and F1-score on the test sets.
Table 7.
Class-wise classification performance on lung and colon cancer test datasets.
Table 7.
Class-wise classification performance on lung and colon cancer test datasets.
| Dataset | Class | Accuracy | Precision | Recall | F1-Score |
|---|
| Lung | Benign Tissue | 0.96 | 0.97 | 0.95 | 0.96 |
| Adenocarcinoma | 0.95 | 0.94 | 0.96 | 0.95 |
| Squamous Cell Carcinoma | 0.94 | 0.93 | 0.94 | 0.935 |
| Colon | Benign Tissue | 0.975 | 0.97 | 0.975 | 0.972 |
| Adenocarcinoma | 0.978 | 0.978 | 0.978 | 0.978 |
Figure 2 and
Figure 3 present training and validation performance curves across epochs.
Figure 2.
Training and validation performance of the proposed model across epochs. Panels (a,b) show lung dataset metrics; panels (c,d) show colon dataset metrics.
Figure 2.
Training and validation performance of the proposed model across epochs. Panels (a,b) show lung dataset metrics; panels (c,d) show colon dataset metrics.
Figure 3.
Class-wise test performance of the proposed model on lung and colon datasets.
Figure 3.
Class-wise test performance of the proposed model on lung and colon datasets.
The confusion matrices for all splits are shown in
Figure 4.
Figure 4.
Confusion matrices for lung and colon datasets.
Figure 4.
Confusion matrices for lung and colon datasets.
Representative qualitative predictions are shown in
Figure 5.
Figure 5.
Representative qualitative predictions.
Figure 5.
Representative qualitative predictions.
4.3. Classification Performance with Uncertainty
Figure 6 reports the results averaged over three independent runs.
Figure 6.
Classification metrics across three independent runs.
Figure 6.
Classification metrics across three independent runs.
4.4. Ablation Study
Table 8 reports the performance impact of each component.
Table 8.
Ablation study evaluating individual components of the proposed model.
Table 8.
Ablation study evaluating individual components of the proposed model.
| Model Variant | Lung Acc | Lung F1 | Colon Acc | Colon F1 |
|---|
| ViT-B/16 | 0.94 | 0.935 | 0.96 | 0.96 |
| ViT + APE + Margin | 0.952 | 0.945 | 0.97 | 0.97 |
| Proposed w/o Morphology Module | 0.955 | 0.947 | 0.972 | 0.972 |
| Proposed w/o Dependency Module | 0.956 | 0.948 | 0.973 | 0.973 |
| Proposed w/o Consistency Loss | 0.958 | 0.95 | 0.975 | 0.975 |
| Full Proposed Model | 0.965 | 0.957 | 0.978 | 0.978 |
4.5. Comparison with Recent Studies
Table 9 compares the proposed method with recent studies.
Table 9.
Comparison with recent state-of-the-art studies.
Table 9.
Comparison with recent state-of-the-art studies.
| Study | Method Type | Lung Acc | Colon Acc | Year |
|---|
| Uddin et al. [51] | Multi-channel CNN | 0.925 | 0.935 | 2021 |
| Ali et al. [52] | Hybrid CNN | 0.942 | 0.948 | 2022 |
| Yi et al. [53] | Hybrid Ensemble | 0.953 | 0.962 | 2023 |
| Yousafzai et al. [54] | Transformer-based CNN | 0.948 | 0.955 | 2022 |
| Hasan et al. [55] | Multi-scale CNN | 0.95 | 0.96 | 2023 |
| Proposed Method | Representation-Centric | 0.965 | 0.978 | - |
5. Conclusions
This work presented a representation-centric deep learning framework for multi-class histopathological image classification in lung and colon cancer. Rather than focusing solely on architectural complexity, the proposed approach addresses a fundamental limitation of existing methods: the lack of structured, stable, and semantically disentangled representations under morphological variability and staining heterogeneity. By integrating complementary representation learning mechanisms with hierarchical supervision and consistency regularization, the framework learns discriminative features that demonstrate robustness within the evaluated lung and colon patch-level classification setting, including variability in tissue appearance and staining. Extensive experiments on balanced lung and colon cancer datasets demonstrate that the proposed method achieves competitive performance across multiple evaluation metrics, including accuracy, precision, recall, and F1-score, under the evaluated dataset conditions. Ablation studies and robustness analyses further confirm the effectiveness of hierarchical regularization and stain-aware consistency learning in improving generalization and reducing sensitivity to distribution shifts. However, these findings should be interpreted as a proof-of-concept under controlled experimental conditions, as they do not yet establish robustness across diverse clinical acquisition settings. Importantly, the framework attains these gains without requiring region-level annotations or handcrafted priors, making it a promising approach for further investigation in more realistic clinical settings. Future work will explore extension to whole-slide image analysis, additional organ systems, and cross-institutional validation to more rigorously assess generalizability under real-world conditions. In addition, integrating uncertainty estimation and clinician-in-the-loop learning may enhance the reliability and interpretability of the framework for real-world computer-aided pathology applications. A limitation of this study is that patient- or slide-level independence could not be enforced due to the lack of such metadata in the LC25000 dataset. Consequently, claims about representation generalization should be interpreted within this dataset-specific context. Future studies using fully annotated datasets with patient-level identifiers are required to rigorously evaluate model generalization across independent slides and patients.