arXiv:2609.31040cs.CVSep 2026

Manuscript Offprint

arXiv:2609.31040

Exploiting Spatial Structure for Transductive Few-Shot Classification of Whole-Slide Images

Tiffanie Godelaine, Manon Dausort, Karim El Khoury, Benoît Gérin, Benoît Macq, Christophe De Vleeschouwer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Automating the analysis of whole-slide images (WSIs), a key step in cancer diagnosis, has high clinical value, as it can reduce pathologist's workload while improving diagnosis accuracy. Recently, vision-language models have shown promising performance for patch-level classification without requiring any annotation, yet these zero-shot (ZS) predictions remain noisy on fine-grained tasks and must be further refined. A promising direction is to refine all predictions jointly, i.e., a transductive approach. However, most existing methods are not tailored to WSIs. We thus propose SlideTIM, an adaptation to WSIs of the recent transductive approach LC-TIM, which introduces a combined spatial–latent regularizer together with a prior on the patch class distribution. The former enforces spatially and semantically close patches to receive the same predictions, while the prior calibrates the predicted class proportions. Together, they address the complex spatial organization and the strong class imbalance of WSIs. Evaluated on four histology datasets, SlideTIM consistently outperforms all TIM variants, improving the macro-F1 by +8.1pp over the best competing baseline at 1 shot. Compared to the ZS, it raises the macro-F1 by +19.4pp at 1 shot. The code will be made available after submission.

Index Terms— histology, whole-slide images, classification, transduction

1. INTRODUCTION

Histopathological whole-slide images (WSIs) enable the precise visualization of lesions, which is crucial to characterize them as benign or malignant and, when malignant, to grade and stage the cancer. However, owing to the very large size of these images, their analysis is time-consuming for pathologists [1]. Deep learning can help reduce this workload while improving diagnostic accuracy by classifying the patches that compose the slide [2].

Recently, this task has increasingly relied on histology vision-language models (VLMs) [3, 4, 5]. By exploiting text supervision, these models yield strong patch-level zero-shot (ZS) predictions, requiring no manual annotation. Nevertheless, such ZS predictions remain noisy on fine-grained histology tasks and must be refined with a few annotated patches [6].

The methods that refine these patch-level predictions from few annotations can be divided into two categories. First, inductive few-shot methods refine the prediction of each patch independently [7, 8]. Second, transductive few-shot methods refine the predictions of all patches jointly by exploiting the relations between them [9, 10, 11, 12]. The latter direction has attracted growing interest in histology, since the patches of a given slide are strongly related, making the exploitation of these relations particularly beneficial.

Histo-TransCLIP [10], an adaptation of TransCLIP [13] to histology, refines the predictions in the latent space by modelling the data distribution as a Gaussian mixture. HistoCRF [11] adapts conditional random fields to histology, leveraging few annotations and inter-patch similarities to refine the VLM predictions. However, these methods are evaluated on sets of independent patches. More recently, SlideCRF [12], built upon HistoCRF, incorporates spatial relations to handle WSIs and demonstrates the importance of this information.

In parallel, LC-TIM [14], a variant of the transductive method TIM++ [15], has been introduced. TIM++ adds supervision from VLMs to TIM [16]. This latter formulates classification as jointly fitting a classifier to a few labeled examples, while maximizing the mutual information between the features of the unlabeld images and their predicted labels. LC-TIM extends the objective function of TIM++ with a latent-space local-consistency regularizer, enforcing that samples close to one another in the embedding space receive the same prediction.

In this work, we adapt LC-TIM to the histology WSI setting, which is characterized by a complex spatial organization and a high class imbalance. This leads to two contributions:

• We propose SlideTIM, which extends LC-TIM with a combined spatial–latent regularizer and a prior on the patch class distribution, making the method robust to the regions that are widespread within a WSI and to the strong class imbalance. As shown in Figure 1, the refinement re-

∗^{*}The authors have contributed equally to this work.

covers the regions in the slide, while being robust to class imbalance.

• We show that it outperforms existing TIM variants by +8.3pp in macro-F1 at one shot per class present in the slide. The same tendency is observed when the number of shot increases. Compared to ZS, it improves the macro-F1 by +19.4pp and +34.6pp at 1 and 16 shots.

Ground truth

Zero-shot

α-TIM

SlideTIM (Ours)

Figure

Fig. 1. Examples of the refinement result of the ZS prediction using our method on two slides, compared to the best baseline. SlideTIM allows for finer fragmentation of structures within a slide.

References (22)