% \documentclass{midl} % Include author names

% % The following packages will be automatically loaded:
% % jmlr, amsmath, amssymb, natbib, graphicx, url, algorithm2e
% % ifoddpage, relsize and probably more
% % make sure they are installed with your latex distribution
% % \usepackage{booktabs}
% % \usepackage{mwe} % to get dummy images
% % \jmlrvolume{-- Under Review}
% \jmlryear{2026}
% \jmlrworkshop{Full Paper -- MIDL 2026 submission}
% \jmlrworkshop 
% \editors{Under Review for MIDL 2026}

\documentclass{midl} % Do NOT use the 'anon' option
\jmlryear{2026}
\jmlrworkshop{Full Paper -- MIDL 2026}
\jmlrvolume{-- nnn}
\editors{Accepted for publication at MIDL 2026} 

\usepackage{booktabs} 

\title[Short Title]{ConStruct: Structural Distillation of Foundation Models for Prototype-Based Weakly Supervised Histopathology Segmentation}


\midlauthor{
  \Name{Khang Le\midljointauthortext{Contributed equally}\nametag{$^{1}$}}
  \Email{khang.lekhangle23@hmcut.edu.vn} \AND
  \Name{Ha Thach\midlotherjointauthor\nametag{$^{2}$}}
  \Email{nguyenbichha.thach@student.uts.edu.au} \AND
  \Name{Anh M. Vu\midlotherjointauthor\nametag{$^{3}$}}
  \Email{mvu9@cougarnet.uh.edu} \AND
  \Name{Trang T. K. Vo\nametag{$^{4}$}}
  \Email{trangvtk.18@grad.uit.edu.vn} \AND
  \Name{Han H. Huynh\nametag{$^{5}$}}
  \Email{m658112001@tmu.edu.tw} \AND
  \Name{David Yang\nametag{$^{6}$}}
  \Email{dongjun.yang@emory.edu} \AND
  \Name{Minh H. N. Le\nametag{$^{7}$}}
  \Email{Johnminhle@ieee.org} \AND
  \Name{Thanh-Huy Nguyen\nametag{$^{8}$}}
  \Email{thanhhun@andrew.cmu.edu} \AND
  \Name{Akash Awasthi\nametag{$^{3}$}}
  \Email{aawasth3@CougarNet.UH.EDU} \AND
  \Name{Chandra Mohan\nametag{$^{3}$}}
  \Email{cmohan@Central.UH.EDU} \AND
  \Name{Zhu Han\nametag{$^{3}$}}
  \Email{zhan2@Central.UH.EDU} \AND
  \Name{Hien Van Nguyen\nametag{$^{3}$}}
  \Email{hvnguy35@Central.UH.EDU} \\[2ex] 
  \addr $^{1}$ Ho Chi Minh City University of Technology, Vietnam \\
  \addr $^{2}$ University of Technology Sydney, Australia \\
  \addr $^{3}$ University of Houston, Houston, TX, USA \\
  \addr $^{4}$ University of Information Technology, Ho Chi Minh City, Vietnam \\
  \addr $^{5}$ College of Medical Science and Technology, Taipei Medical University, Taipei, Taiwan \\
  \addr $^{6}$ Department of Computer Science, Emory University, Atlanta, GA, USA \\
  \addr $^{7}$ Montefiore Medical Center, Albert Einstein College of Medicine, Bronx, NY, USA \\
  \addr $^{8}$ School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, USA
} 


 

\begin{document}

\maketitle

\begin{abstract}
% This is a great paper and it has a concise abstract.
Weakly supervised semantic segmentation (WSSS) in histopathology relies heavily on classification backbones, yet these models often localize only the most discriminative regions and struggle to capture the full spatial extent of tissue structures. Vision–language models such as CONCH offer rich semantic alignment and morphology-aware representations, while modern segmentation backbones like SegFormer preserve fine-grained spatial cues. However, combining these complementary strengths remains challenging, especially under weak supervision and without dense annotations. We propose a prototype learning framework for WSSS in histopathological images that integrates morphology-aware representations from CONCH, multi-scale structural cues from SegFormer, and text-guided semantic alignment to produce prototypes that are simultaneously semantically discriminative and spatially coherent. To effectively leverage these heterogeneous sources, we introduce text-guided prototype initialization that incorporates pathology descriptions to generate more complete and semantically accurate pseudo-masks. A structural distillation mechanism transfers spatial knowledge from SegFormer to preserve fine-grained morphological patterns and local tissue boundaries during prototype learning. Our approach produces high-quality pseudo masks without pixel-level annotations, improves localization completeness, and enhances semantic consistency across tissue types. Experiments on BCSS-WSSS datasets demonstrate that our prototype learning framework outperforms existing WSSS methods while remaining computationally efficient through frozen foundation model backbones and lightweight trainable adapters. Code is available at \url{https://github.com/tom1209-netizen/ConStruct}.
\end{abstract}

\begin{keywords}
Weakly Supervised Semantic Segmentation, Histopathology Image Analysis
\end{keywords}

\section{Introduction}
Histopathology plays a central role in cancer diagnosis by enabling the microscopic examination of tissue morphology, cellular organization, and pathological alterations. With the increasing shift toward computational and digital pathology, digitized histopathological images have become essential for supporting computer-aided diagnosis, prognosis, research, and education \cite{vorontsov2024foundation, kang2025exploring}. Semantic segmentation in histopathological images aims to delineate different types of tissue and structures. It is an important problem as it approximates the manual workflow of expert pathologists and improves both diagnostic accuracy and efficiency \cite{kang2025exploring}. Despite these advantages, histopathological image segmentation remains constrained by several practical challenges, including the scarcity of pixel-level annotations, the reliance on highly specialized domain experts, the labor-intensive and time-consuming nature of manual labeling, and the substantial storage and computational requirements for gigapixel whole-slide images ~\cite{survey}. To mitigate the lack of dense pixel-level annotations, weakly supervised semantic segmentation (WSSS) in histopathological images has been proposed to leverage less precise annotation types such as image-level labels, bounding boxes, point annotations or scribbles, arranged by ascending annotation cost~\cite{survey}. Among these, image-level labels provide the weakest supervision because they lack spatial information about class locations ~\cite{survey}.

A typical image-level WSSS pipeline first trains a classification backbone to extract discriminative features or activation maps for pseudo-mask generation, followed by a segmentation model trained under the supervision of these pseudo-masks. The choice between CNN-based and transformer-based classification architectures is largely determined by the pseudo-mask generation strategy and the subsequent refinement modules.
Pseudo-mask generation methods in histopathological WSSS in can be broadly categorized into MIL-based \cite{xu2019camelweaklysupervisedlearning, li2023weakly, knowledgedistillation-MIL}, CAM-based \cite{MLPS, TPRO}, and prototype-based \cite{PBIP, LDP} approaches. MIL-based approaches treat each histopathological image as a bag and its constituent regions (pixels or patches) as instances. Similar to the limitations observed in MIL in WSI, MIL-based methods in histopathology images also often suffer from spatial imprecision, since pixel-level predictions emerge indirectly from image-level supervision. This indirect supervision makes the generated pseudo-masks noisy, inconsistent, and unable to reliably capture fine-grained boundaries \cite{he2024enhancingweaklysupervisedhistopathologyimage}. Several studies had attempted to address these limitations. SA-MIL integrated a self-attention module to capture long-range spatial dependencies and reduces instance-level ambiguity and produces more coherent, boundary-aware pseudo-masks \cite{li2023weakly}. He et al. \cite{knowledgedistillation-MIL} introduced a framework that leverages knowledge distillation on MIL-based pseudo-labels, where an iterative teacher–student process progressively refines MIL-derived segmentation maps through repeated denoising and representation alignment. However, despite these improvements, the inherent weakness of MIL motivates the need for spatially grounded pseudo-mask generation strategies; CAM-based methods have became the most widely used because they generate pseudo-masks directly from classification backbones \cite{survey}. However, CAMs inherently focus on the most discriminative regions and do not fully capture tissue patterns, especially in histopathology images, which have challenges in intra-class heterogeneity and inter-class homogeneity ~\cite{PBIP, TPRO, wu2025superpixelboundarycorrectionweaklysupervised}. Intra-class heterogeneity refers to substantial visual variation within the same 
tissue class, caused by differences in staining, morphology, texture, or tumor grade, while inter-class homogeneity describes the phenomenon where different tissue classes exhibit highly similar visual patterns, making them difficult to distinguish~\cite{PBIP}. Recent interpretability work, such as CIG~\cite{vu2025cig}, 
further demonstrates that, compared with other attribution methods, gradient-based CAMs capture only partial class-discriminative evidence, underscoring their limitations as the sole source of pseudo-masks.

Prototype-based methods have recently emerged as a promising alternative by modeling class-specific morphological patterns through learnable prototypes \cite{LDP, protoseg} or clustering-based prototypes \cite{PBIP, pan2023humanmachineinteractivetissueprototype}. Prototypes are representative feature vectors in an embedding space that capture characteristic patterns of each semantic class \cite{zhou2022rethinking}. They serve as reference points for classifying data samples based on proximity or similarity. This enables improved region consistency, better coverage of tissue patterns, and enhanced interpretability \cite{zhou2022rethinking}. However, prototype learning in histopathological WSSS remains challenging. Non-learnable prototype methods typically employ clustering algorithms such as k-means ~\cite{PBIP, pan2023humanmachineinteractivetissueprototype} to identify representative features from patch embeddings. Although conceptually straightforward, they require computing similarity between millions of patch-level features, leading to substantial memory and computational cost. On the other hand, learnable prototype approaches address computational concerns by treating prototypes as trainable parameters optimized with a feature encoder. LPD ~\cite{LDP} is a learnable prototype–based WSSS framework in which class-specific prototypes are trained end-to-end to produce prototype-derived CAMs, refined into pseudo-masks through contrastive foreground/background alignment, while a diversity regularizer ensures that different prototypes within the same class capture distinct tissue patterns. However, learnable prototypes are highly dependent on the quality of the encoder’s representation. 

Different backbone architectures or foundation models exhibit distinct strengths and limitations when applied to histopathological images \cite{zhou2022rethinking}. Although CNN-based encoders (VGG \cite{9009552}, ResNet \cite{MLPS}) excel at capturing strong local textural patterns and precise spatial localization, which is crucial for delineating tissue boundaries, their limited receptive fields constrain global context modeling, making it difficult to distinguish tissue classes that differ subtly across large spatial regions. In contrast, ViT-based encoders provide rich global semantic understanding through self-attention mechanisms, beneficial for class-level discrimination. However, their token embeddings often suffer from oversmoothing and loss of spatial locality due to global attention \cite{Toco, PBIP}, causing prototypes derived from ViT features to be semantically strong but spatially unstable, resulting in blurred segmentation boundaries. SegFormer addresses this partially by combining hierarchical transformer features with lightweight MLP decoders, offering strong multi-scale representations that bridge local and global context~\cite{PBIP, LDP}.

Beyond general-purpose encoders, histopathology-specific foundation models such as CONCH \cite{conch}, UNI \cite{uni}, Prov-GigaPath \cite{provagiga} produce morphology-aware representations by pretraining on millions of tissue patches. These representations capture domain-relevant patterns that conventional encoders may fail to learn. However, these pathology foundation models lack the multi-scale structural detail required for fine-grained segmentation. Meanwhile, recent advances in vision–language models (CLIP \cite {radford2021learningtransferablevisualmodels}, CONCH \cite{conch}) show that text-guided representations can introduce explicit semantic supervision that helps disambiguate visually similar yet conceptually distinct tissue patterns, a valuable capability in histopathology, where subtle morphological differences often carry diagnostic significance. This motivates the question of how we can design a prototype learning framework that yields prototypes that are both semantically discriminative and spatially coherent, enabling accurate and reliable pseudo-mask generation for weakly supervised histopathological segmentation, leveraging text-guided semantic alignment on morphology-aware features. 

Therefore, we propose a unified prototype learning framework for WSSS in histopathological images by integrating morphology-aware representations from CONCH, multi-scale structural cues from SegFormer, and text-guided semantic alignment to produce prototypes that are simultaneously semantically discriminative and spatially coherent. Our contributions in this work are as follows:
\begin{itemize}
  \item We propose a prototype-based pipeline that leverages text-guided initialization to address the coverage limitations of standard Class Activation Maps (CAMs). By incorporating pathology descriptions, our approach aims to generate more complete and semantically accurate pseudo-masks.
  \item We incorporate a structural distillation mechanism that transfers spatial knowledge from a SegFormer teacher to the student model, assisting in verifying and preserving local tissue boundaries.
  \item We demonstrate robust performance on histopathology benchmarks while maintaining high parameter efficiency. Our framework freezes the foundation model backbones and only trains lightweight adapters, effectively reducing learnable parameters without compromising segmentation quality.
\end{itemize}

\begin{figure}[t]
  \centering
  \includegraphics[width=1\linewidth]{figures/ConStruct.png}
  \caption{%
  Overview of the proposed three-component framework. 
  \textbf{(a)~Structural Knowledge Distillation:} Frozen CONCH and SegFormer encoders extract multi-scale features; lightweight adapters refine CONCH features via relational distillation from SegFormer. 
  \textbf{(b)~Text Initialized Prototype:} Text descriptions initialize learnable prototypes
  \textbf{(c)~Mask Refinement:} Foreground background contrastive CAM refinement
  }
  \label{fig:overview}
\end{figure}

\section{Method}
\label{sec:method}

\textbf{Overview.}
We propose a teacher-student distillation framework built on text-guided learnable prototypes for weakly supervised semantic segmentation (WSSS) in histopathology. Our method comprises three main components: (1)~\emph{Structural Knowledge Distillation}, which transfers multi-scale structural priors from a frozen SegFormer teacher to lightweight trainable adapters operating on frozen CONCH features; (2)~\emph{Text-Guided CAM Generation}, which uses pathology text descriptions to initialize learnable class prototypes that produce activation maps via cosine similarity with refined visual features; and (3)~\emph{Mask Refinement}, an inference-only module that combines foreground/background contrastive alignment with Dense CRF to refine coarse CAMs into precise pixel-level predictions. The overall pipeline is illustrated in Fig.~\ref{fig:overview}.

\subsection{Structural Knowledge Distillation}

\textbf{Dual encoders and multi-scale features.}
Given an input image $\mathbf{x} \in \mathbb{R}^{3 \times H \times W}$, we extract four-scale feature pyramids from:
(1)~a frozen SegFormer MiT-B1~\cite{segformer} teacher providing structural guidance, and
(2)~a frozen CONCH ViT-B/16~\cite{conch} student providing semantic representations.

The student produces multi-scale feature maps by extracting intermediate ViT block activations at layers 3, 6, 9, and 12, which are reshaped and interpolated to form :
$$\mathbf{F}^{s}_{k} = f_{\mathrm{CONCH}}^{(k)}(\mathbf{x})  \text{ where } \mathbf{F}^{s}_{k} \in \mathbb{R}^{B \times C_s \times H_k \times W_k} $$ 
$$\text{and the teacher outputs structural feature maps: } \mathbf{F}^{t}_{k} = f_{\mathrm{SegFormer}}^{(k)}(\mathbf{x}) , \mathbf{F}^{t}_{k} \in \mathbb{R}^{B \times C_t \times H_k \times W_k}$$
\noindent \textbf{Lightweight adapters.}
Since all backbone parameters are frozen, we introduce trainable adapters to refine CONCH features.
Each feature $\mathbf{F}^{s}_{k}$ is resized and processed through a lightweight residual module: $\widetilde{\mathbf{F}}^{s}_{k} = \mathrm{Resize}(\mathbf{F}^{s}_{k}), \mathbf{R}_{k} = \mathrm{Adapter}_k(\widetilde{\mathbf{F}}^{s}_{k})$,
where the adapter follows a $1{\times}1 \rightarrow 3{\times}3(\mathrm{dw}) \rightarrow 1{\times}1$ bottleneck design:
\[
\mathrm{Adapter}_k(\mathbf{F})
= \phi_{3}\!\left(
\mathrm{GELU}\!\left(
\mathrm{BN}\!\left[
\phi_{2}\!\left(
\mathrm{GELU}\!\left(\mathrm{BN}(\phi_{1}(\mathbf{F}))\right)
\right)
\right]
\right)
\right)
\]
The refined features $\mathbf{R}_{k}$ serve as the student representation used for distillation and CAM generation. This design introduces only 6.3M trainable parameters (3.7\% of total), keeping computational overhead minimal.

\noindent \textbf{Relational structural distillation.}
Instead of aligning individual feature vectors, we align \emph{pairwise token relations} to transfer boundary-aware structural knowledge.
Teacher and student features are reshaped into token sequences and $\ell_2$-normalized: 
$$\mathbf{S}_{k} = \mathrm{Norm}(\mathrm{Reshape}(\mathbf{R}_{k})) \text{and} \mathbf{T}_{k} = \mathrm{Norm}(\mathrm{Reshape}(\mathrm{Resize}(\mathbf{F}^{t}_{k})))$$
Affinity matrices encode token-to-token similarity: $A^{\mathrm{stu}}_{k} = \mathbf{S}_{k}\mathbf{S}_{k}^{\top}$ and $A^{\mathrm{tea}}_{k} = \mathbf{T}_{k}\mathbf{T}_{k}^{\top}$. The relational distillation objective averages an MSE loss across selected guidance layers $\mathcal{K}$ (we use layer 2 by default): $$\mathcal{L}_{\mathrm{struct}} = \frac{1}{|\mathcal{K}|} \sum_{k \in \mathcal{K}} \mathrm{MSE}( A^{\mathrm{stu}}_{k}, A^{\mathrm{tea}}_{k} )$$
This transfers boundary-aware structural priors with extremely low computational overhead, since only adapters are updated.

\subsection{Text-Guided Prototype CAMs}

\noindent \textbf{Text-initialized prototypes.}
For each semantic class $c \in \{1,\ldots,C\}$, we provide a detailed pathology description (Table~\ref{tab:text_prompts}) and encode it using the frozen CONCH text tower: $\mathbf{t}_{c} = f_{\mathrm{text}}(\mathrm{prompt}_{c})$. A shared two-layer MLP $\phi_{\mathrm{proj}}$ with hidden dimension $D_{\mathrm{hidden}} = n_{\mathrm{ratio}} \times D_{\mathrm{proto}}$ projects text embeddings to the visual feature dimension: $\mathbf{p}'_{c} = \phi_{\mathrm{proj}}(\mathbf{t}_{c}), \tilde{\mathbf{p}}_{c} = \mathrm{Norm}(\mathbf{p}'_{c})$, forming a learnable prototype bank: $$\tilde{\mathbf{P}} = [\tilde{\mathbf{p}}_{1},\dots,\tilde{\mathbf{p}}_{C}]^{\top} \in \mathbb{R}^{C \times D_{\mathrm{proto}}}$$

\noindent \textbf{Adaptive projection to feature space.}
To align prototypes with the final refined features $\mathbf{R}_{4}$, we apply an \emph{Adaptive Layer} (two-layer MLP) that projects prototypes from dimension $D_{\mathrm{proto}}$ to $C_s$: $\mathbf{P}_{4} = \mathrm{AdaptiveLayer}(\tilde{\mathbf{P}}) \in \mathbb{R}^{C \times C_s}$.

\noindent \textbf{Prototype-to-feature similarity and CAMs.}
Refined student features are converted to normalized tokens: $\hat{\mathbf{R}}_{4} = \mathrm{Norm}(\mathrm{Reshape}(\mathbf{R}_{4}))$. Cosine similarity with prototypes yields class activation maps $\mathbf{G}_{4} = \tau \cdot ( \hat{\mathbf{R}}_{4}\, \mathbf{P}_{4}^{\top} )$, where $\tau$ is a learnable logit scaling factor initialized to $1/0.07$. Image-level supervision is applied through global average pooling: $\mathbf{z} = \mathrm{GAP}(\mathbf{G}_{4})$ with $\mathcal{L}_{\mathrm{cls}} = \mathrm{BCEWithLogits}(\mathbf{z}, \mathbf{y})$.

\subsection{Mask Refinement}

\noindent \textbf{Adaptive thresholding and pseudo masks.}
Following PBIP~\cite{PBIP}, we generate pseudo masks by adaptive thresholding: $t = \alpha \max_{\mathbf{x}} \mathrm{cam}(\mathbf{x})$ with $\alpha = 0.5$, and define foreground and background indicator functions: $\mathbb{1}_{\mathrm{fg}}(\mathbf{x}) = \mathbf{1}\{\mathrm{cam}(\mathbf{x}) \geq t\}$ and $\mathbb{1}_{\mathrm{bg}}(\mathbf{x}) = 1 - \mathbb{1}_{\mathrm{fg}}(\mathbf{x})$.

\noindent \textbf{Foreground/background contrastive alignment.}
We crop masked FG and BG regions and encode their features using a frozen CONCH~\cite{conch} image encoder, obtaining region embeddings $\mathbf{f}_{\mathrm{fg}}$ and $\mathbf{f}_{\mathrm{bg}}$. We employ InfoNCE-style contrastive losses with a memory bank of 2048 negative samples:
\begin{itemize}
  \setlength{\itemsep}{0pt}
  \setlength{\parskip}{0pt}
  \setlength{\topsep}{2pt}
  \item \textbf{FG loss} $\ell_{\mathrm{fg}}$: FG features are pulled toward prototypes of the same class and pushed away from prototypes of other classes and memory bank negatives.
  \item \textbf{BG loss} $\ell_{\mathrm{bg}}$: BG features are attracted to background prototypes and repelled from all foreground prototypes.
\end{itemize}

The refiner loss combines both terms: $\mathcal{L}_{\mathrm{sim}} = \ell_{\mathrm{fg}} + \ell_{\mathrm{bg}}$.

\noindent \textbf{Total training objective.}
The final loss combines classification, structural distillation, and contrastive alignment: $\mathcal{L}_{\mathrm{total}} = \lambda_{\mathrm{cls}} \mathcal{L}_{\mathrm{cls}} + \lambda_{\mathrm{struct}} \mathcal{L}_{\mathrm{struct}} + \lambda_{\mathrm{sim}} \mathcal{L}_{\mathrm{sim}}$, with weights $\lambda_{\mathrm{cls}} = 1.0$, $\lambda_{\mathrm{struct}} = 1.5$, and $\lambda_{\mathrm{sim}} = 0.2$.

\noindent \textbf{Inference refinement.}
During inference, we apply test-time augmentation (6 augmentations: horizontal flip $\times$ brightness scaling $\{0.9, 1.0, 1.1\}$) and average the resulting CAMs. Background probability is estimated as $(1 - \max_c M_c)^{10}$.

\noindent \textbf{Dense Conditional Random Field.}
To further refine object boundaries and impose spatial consistency, we apply a fully connected Conditional Random Field (CRF)~\cite{CRF} as a post-processing step. The energy function is modeled as:
\[
E(\mathbf{y}) = \sum_i \psi_u(y_i) + \sum_{i<j} \psi_p(y_i, y_j),
\]
where $y_i$ represents the label assignment for pixel $i$. The unary potential $\psi_u(y_i) = - \log P(y_i | \mathbf{x})$ is derived from the smoothed CAM probabilities. The pairwise potential $\psi_p$ enforces smoothness using Gaussian kernels:
\[
\psi_p(y_i, y_j) = \mu(y_i, y_j) \left[ w_1 \exp\left(-\frac{|p_i - p_j|^2}{2\sigma_\alpha^2}\right) + w_2 \exp\left(-\frac{|p_i - p_j|^2}{2\sigma_\beta^2} - \frac{|I_i - I_j|^2}{2\sigma_\gamma^2}\right) \right],
\]
where $p_i$ and $I_i$ denote the spatial position and color intensity vectors. Corresponding to our implementation, we use a smoothness kernel with $\sigma_\alpha=15$ and weight $w_1=30$, and an appearance kernel with $\sigma_\beta=10, \sigma_\gamma=20$ and weight $w_2=50$. Inference is performed for 5 iterations to produce the final segmentation mask.

\section{Experments and Results}
\subsection{Experimental Settings}

\noindent \textbf{Dataset.} We evaluate our method on the BCSS-WSSS dataset \cite{BCSSWSSS}, which 
contains four tissue classes: Tumor (TUM), Stroma (STR), Lymphocyte (LYM), 
and Necrosis (NEC). All images are resized to $224 \times 224$ pixels. 



\noindent \textbf{Implementation Details.} Our framework employs two frozen foundation 
models: CONCH ViT-B16 \cite{conch} (86M parameters) for semantic features and SegFormer 
MiT-B1 \cite{segformer} (13M parameters) for structural guidance. Only lightweight adapters 
(6.3M parameters, 3.7\% of the total model parameters) are trainable. We initialize class 
prototypes using detailed pathology text descriptions encoded by the frozen 
CONCH text encoder (Table~\ref{tab:text_prompts}).

\begin{table}[h]
\centering
\caption{Text descriptions for prototype initialization}
\label{tab:text_prompts}
\small
\begin{tabular}{@{} l p{0.8\linewidth} @{}}
\toprule
\textbf{Class} & \textbf{Description} \\
\midrule
\textbf{TUM} & Tumor regions consist of malignant epithelial cells 
characterized by pleomorphic, hyperchromatic nuclei, loss of glandular 
structure, and frequent mitotic figures, representing the core cancerous 
lesions in breast tissue. \\
\midrule
\textbf{STR} & Stroma comprises the surrounding connective tissue, including 
fibroblasts and collagen fibers, often appearing as pink fibrous structures 
and sometimes showing desmoplastic reactions to tumor invasion. \\
\midrule
\textbf{LYM} & Lymphocyte regions contain dense clusters of small immune 
cells with dark, round nuclei and minimal cytoplasm, reflecting the host 
immune response within the tumor microenvironment. \\
\midrule
\textbf{NEC} & Necrosis represents areas of dead or dying tissue with pale, 
structureless eosinophilic regions, nuclear debris, and "ghost" cell 
remnants, typically associated with aggressive tumor growth and poor 
vascularization. \\
\bottomrule
\end{tabular}
\end{table} 

\noindent \textbf{Training.} We train for 2 epochs using the AdamW optimizer with 
learning rate $2 \times 10^{-5}$, weight decay 0.001, and batch size 10. 
The total loss combines three components: BCE classification loss 
($\lambda_{\text{cls}} = 1.0$), structural distillation loss 
($\lambda_{\text{struct}} = 1.5$), and InfoNCE contrastive loss 
($\lambda_{\text{contrast}} = 0.2$). We use a memory bank of 2048 negative 
samples for contrastive learning. Distillation is performed only at layer 2 
of the feature hierarchy.

\noindent \textbf{Inference.} We apply test-time augmentation with 6 augmentations 
(horizontal flip $\times$ brightness scaling $\{0.9, 1.0, 1.1\}$) and average 
the resulting CAMs. Background probability is estimated as 
$(1 - \max_c \mathbf{M}_c)^{10}$, and Dense CRF post-processing is applied 
to refine boundaries. Segmentation quality is quantified using mean 
Intersection-over-Union (mIoU) and mean Dice coefficient.

\noindent \textbf{Baselines.} We benchmark against leading WSSS methods:  TPRO~\cite{TPRO}, MLPS~\cite{MLPS}, Proto2Seg~\cite{pan2023humanmachineinteractivetissueprototype}, and 
PBIP~\cite{PBIP}.

\subsection{Results}   

\textbf{Quantitative Results.} Table~\ref{tab:bcss_wsss_compact_reformat} shows that our method achieves the best results on BCSS-WSSS, reaching 70.96 mIoU and 82.83 mDice, surpassing all prior approaches. It also achieves the highest IoU and Dice for tumor and necrosis—two of the most challenging classes due to their variable shapes and boundaries. Performance on stroma and lymphocytes remains competitive and on par with or better than existing methods. Overall, the results demonstrate consistent gains across most tissue types.
 

\begin{table*}[ht]
\centering
\renewcommand{\arraystretch}{1.15}
\setlength{\tabcolsep}{5pt} % slightly smaller column spacing

\resizebox{\textwidth}{!}{
\begin{tabular}{@{} l | r r | r r r r | r r r r @{}}
\toprule
\textbf{Method}
& \multicolumn{2}{c|}{\textbf{Metrics (\%)}} 
& \multicolumn{4}{c|}{\textbf{Per-class IoU (\%)}} 
& \multicolumn{4}{c}{\textbf{Per-class Dice (\%)}} \\
& mIoU & mDice
& TUM & STR & LYM & NEC
& TUM & STR & LYM & NEC \\
\midrule
\textbf{TPRO}
& 65.54 & 78.93
& 77.29 & 66.83 & 56.81 & 61.23
& 87.19 & 80.12 & 72.46 & 75.95 \\
\textbf{MLPS}
& 61.58 & 75.95
& 72.98 & 62.58 & 52.03 & 58.73
& 84.38 & 76.99 & 68.45 & 74.00 \\
\textbf{Proto2Seg}
& 57.42 & 72.24
& 63.25 & 58.28 & 53.27 & 54.89
& 77.49 & 73.64 & 67.78 & 70.08 \\
\textbf{PBIP}
& 69.42 & 81.84
& 77.92 & 64.68 & \textbf{65.40} & 69.69
& 87.59 & 78.56 & \textbf{79.08} & 82.14 \\
\midrule
\textbf{Ours}
& \textbf{70.96} & \textbf{82.83}
& \textbf{81.59} & \textbf{67.99} & 62.70 & \textbf{71.56}
& \textbf{89.86} & \textbf{80.95} & 77.08 & \textbf{83.42} \\
\bottomrule
\end{tabular}}
\caption{Segmentation results on \textbf{BCSS-WSSS}}
\label{tab:bcss_wsss_compact_reformat}
\end{table*}
\noindent \textbf{Qualitative Results.} The quantitative results in Figure \ref{fig:qualitative} suggest that the model identifies tissue regions more accurately than the comparison methods. Higher IoU and Dice for tumor, stroma, and necrosis indicate improved coverage of these structures and fewer boundary inconsistencies. The gains across several classes further imply that the learned features work more consistently across different tissue types, leading to more stable segmentation performance. 

 \begin{figure}[ht]
  \centering
  \includegraphics[width=0.8\linewidth]{figures/masks.png} % path + file
  \caption{Qualitative results on BCSS-WSSS test patches. 
  GT denotes ground truth segmentation} 
  \label{fig:qualitative}
\end{figure} 

\subsection{Ablation Study} 
\textbf{Ablation on Relational Structural Distillation.} We study the contribution of the relational structural distillation module by comparing the full model with a variant trained without it. As shown in Table 3, removing distillation reduces overall performance, indicating its importance. Distillation improves both mIoU and mDice, with the largest gains observed for tumor and necrosis, which contain complex and irregular boundaries. Stroma also benefits, though to a smaller extent. Lymphocyte performance is slightly higher without distillation, likely because these small, sparse regions are more sensitive to smoothing. 

\begin{table}[h]
\centering
\renewcommand{\arraystretch}{1.12}
\setlength{\tabcolsep}{4pt}
\caption{Ablation of Relational structural distillation on \textbf{BCSS-WSSS}.}
\label{tab:ablation_distillation}
\begin{tabular}{l | rr | rrrr | rrrr}
\toprule
\textbf{Method}
& \multicolumn{2}{c|}{\textbf{Metrics (\%)}} 
& \multicolumn{4}{c|}{\textbf{Per-class IoU (\%)}} 
& \multicolumn{4}{c}{\textbf{Per-class Dice (\%)}} \\
& mIoU & mDice
& TUM & STR & LYM & NEC
& TUM & STR & LYM & NEC \\
\midrule 
\textbf{w distill.}
& \textbf{70.96} & \textbf{82.83}
& \textbf{81.59} & \textbf{67.99} & 62.70 & \textbf{71.56}
& \textbf{89.86} & \textbf{80.95} & 77.08 & \textbf{83.42} \\
\textbf{w/t distill.}
& 70.40 & 82.47
& 80.82 & 67.47 & \textbf{63.58} & 69.73
& 89.39 & 80.57 & \textbf{77.74} & 82.17 \\
\bottomrule
\end{tabular}
\end{table}
  
\begin{figure}[ht]
  \centering
  \includegraphics[width=0.8\linewidth]{figures/distill-ablation.png} % path + file
  \caption{Qualitative comparison of relational structural distillation on three representative examples. For each example, the top row shows the original histopathology image, the second row shows the ground-truth segmentation mask, and the bottom rows visualize the average feature activation maps at each stage. \textbf{“Before”} denotes the model trained without relational structural distillation, while \textbf{“After”} denotes the full model with distillation applied (only at Stage 3).} 
  \label{fig:distill}
\end{figure} 

To further understand these effects, Figure~\ref{fig:distill} shows feature maps from three example images, comparing models trained with and without distillation, where distillation is applied at Stage 3. Without distillation, the feature maps tend to mix foreground and background. As seen when compared with the ground-truth masks, the non-distilled model often misses parts of the relevant structures. In contrast, with distillation, the feature maps become cleaner and more spatially organized: foreground regions are activated more completely and accurately. This produces more interpretable spatial patterns and enables the model to better capture the true structure indicated in the masks. Overall, both the quantitative metrics and visual evidence show that relational structural distillation yields clearer feature representations and leads to more consistent segmentation results. 



\section{Conclusion}
\label{sec:conclusion}
In this work, we explored a unified framework for weakly supervised histopathology segmentation, aiming to bridge the gap between global semantic understanding and local structural precision. By distilling spatial priors from a SegFormer teacher into a CONCH student via lightweight adapters, we demonstrated that fine-grained structural details can be transferred to foundation models. Furthermore, our use of text-guided prototype initialization suggests that integrating pathology descriptions enhances class discriminability for complex tissues. Experiments on the BCSS-WSSS dataset indicate that our approach yields robust performance with high parameter efficiency, offering a promising direction for resource-constrained, label-efficient medical image analysis.

\clearpage  % Acknowledgements, references, and appendix do not count toward the page limit (if any)
% Acknowledgments---Will not appear in anonymized version

\midlacknowledgments{This work was supported in part by the National Institutes of Health (NIH) under Grant 5R01DK134055-02.  }
\label{sec:acknowledgments} 

\bibliography{midl26_249}

\end{document}
