arXiv:2610.29746cs.CVOct 2026

Manuscript Offprint

arXiv:2610.29746

LEAF-Mamba: Feature Adaptation and Fusion for Whole Slide Image Analysis

Lubin Gan, Jing Zhang, Mingjun Ma, Linhao Qu, Dachun Kai, Xiaoyan Sun

Abstract

Whole slide image (WSI) analysis enables computational diagnosis and prognosis, but gigapixel images and limited annotations make slide-level learning challenging. Multiple instance learning addresses this task by aggregating patch representations from frozen pretrained encoders. Recently, Mamba has enabled efficient modeling of long patch sequences. However, task supervision alone does not explicitly constrain information recovery during feature adaptation, while Mamba couples local processing with long-range propagation rather than retaining separate representations for fusion. Motivated by these challenges, we introduce LEAF-Mamba, a framework that jointly addresses latent evidence adaptation and fusion for frozen-feature WSI analysis. A reconstruction-regularized adapter learns compact, task-specific representations while reconstructing the input features. Parallel Mamba and convolutional streams then capture long-range dependencies and sequence-local interactions, with an input-dependent gate modulating their joint representation before slide-level pooling. Experiments across feature extractors demonstrate improved average performance over strong MIL baselines in both diagnostic classification and survival prediction. Component analyses further support the contributions of adaptation and fusion. These findings highlight the value of jointly designing feature transformation and contextual aggregation to translate pretrained representations into effective slide-level predictions.

Keywords: Computational pathology, Whole slide imaging, Multiple instance learning, Feature adaptation, State space models, Gated fusion

1. Introduction

Whole slide images (WSIs) capture the cellular morphology and tissue organization used for computational cancer diagnosis and prognosis [1]. Predicting a diagnostic category or patient outcome from a gigapixel slide requires aggregating evidence across heterogeneous tissue. Dense region-level annotation demands extensive pathologist effort, so weakly supervised WSI models learn from slide- or patient-level labels [2]. Multiple instance learning (MIL) represents each slide as a

*Corresponding authors: Jing Zhang and Xiaoyan Sun.

Email addresses: ganlubin@mail.ustc.edu.cn (Lubin Gan), zhangjing@iai.ustc.edu.cn (Jing Zhang), mingjun@tju.edu.cn (Mingjun Ma), linhao_qu@hms.harvard.edu (Linhao Qu), dachunkai@mail.ustc.edu.cn (Dachun Kai), sunxiaoyan@ustc.edu.cn (Xiaoyan Sun)

1^{1}Present address: Nanyang Technological University, Singapore.

bag of patches and learns a bag-level predictor. Attention-based pooling weights patch contributions, while clustering-constrained learning adds a clustering objective to slide-level training [3, 4]. Dual-stream methods identify critical instances, while feature-distillation methods learn slide representations through pseudo-bag training [5, 6].

In frozen-feature MIL, a pretrained encoder extracts patch embeddings, and a trainable aggregator maps them to slide-level predictions. Pathology foundation models learn reusable patch representations from large tissue-image collections [7, 8]. Transformer-based MIL models contextual interactions among patches [9], while selective state-space models process long sequences with computational cost that scales linearly with sequence length [10]. MambaMIL applies this sequence modeling to WSIs through patch reordering [11]. SemaMIL further studies semantic ordering and retrieval-guided state-space aggregation [12], highlighting the role of sequence construction alongside the choice of sequence operator. We focus on two stages of this pipeline: adapting frozen embeddings to the target task and combining short- and long-range contextual representations.

The first challenge is to adapt frozen features from bag-level supervision. The frozen encoder receives no updates from the downstream diagnostic or survival loss, leaving feature adaptation to the slide-level model. Re-embedding methods such as RRTMIL learn transformations before aggregation [13]. The task loss supervises the transformed patches through the slide prediction, but does not explicitly constrain recovery of their input features. A reconstruction loss supplies this missing constraint by penalizing input-recovery error for each compressed patch representation. Joint optimization therefore gives the adapter two objectives: predict the slide-level outcome and reconstruct the frozen patch embeddings.

The second challenge is to retain distinct short- and long-range representations for fusion. In a standard Mamba block, local convolution feeds the selective state-space operation, placing short-range processing on the same path as long-range propagation [10]. The convolutional output is not retained as a separate representation for fusion with the Mamba output. A parallel convolutional stream preserves the sequence-local representation alongside the long-range output. An input-dependent gate modulates their joint features before pooling. Figure 1 illustrates the parallel streams and their input-dependent fusion.

We propose LEAF-Mamba, a frozen-feature MIL framework that combines reconstruction-regularized latent evidence adaptation (LEA) with Mamba-guided evidence fusion (EF). LEA maps each patch embedding to a compact code through a nonlinear encoder and a linear skip projection. The task loss and an auxiliary reconstruction loss jointly train the adapter, and the reconstruction decoder is removed at inference. EF processes the adapted tokens through parallel Mamba and convolutional streams along a fixed coordinate-derived ordering. The convolutional stream models consecutive tokens in this sequence. The two outputs are concatenated and projected, then modulated by a content-dependent sigmoid gate before slide-level pooling.

We evaluate LEAF-Mamba on diagnostic classification and survival prediction using frozen ResNet-50, PLIP, and CONCH v1.5 features. All reproduced baselines share the extracted features, data splits, and evaluation protocol. LEAF-Mamba achieves the highest mean diagnostic AUC and mean survival C-Index among the compared methods with each encoder. On the BRACS official split with CONCH v1.5 features, removing reconstruction reduces AUC from 76.8 to 75.8 under global-only aggregation. With both branches enabled, input-dependent fusion

Figure

Figure 1: Conceptual visualization of Mamba-guided evidence fusion.

improves AUC by 0.8 percentage points over a learned static gate. Our main contributions are as follows:

• We introduce a reconstruction-regularized latent adapter for frozen-feature MIL. Joint bag-level prediction and patchwise reconstruction train compact task-specific codes; the decoder is removed at inference.

• We develop an evidence-fusion module that retains parallel Mamba and sequence-local convolutional representations and modulates their projected joint features through an input-dependent gate before pooling.

• We show that LEAF-Mamba achieves the highest mean diagnostic AUC and survival C-Index among the compared methods with each of three frozen encoders. Controlled ablations quantify the contributions of reconstruction and context fusion.

References (42)