arXiv:2611.22968cs.CVNov 2026

Manuscript Offprint

arXiv:2611.22968

MI-Hyper: Generating Multiple Instance Models for Weight Space Transfer Learning in Histopathology via Mixed Tasks Pretrained HyperNetwork

Xitong Ling, Yousef Kotp, Weiming Chen, Yining Li, Jiawen Li, Minxi Ouyang, Xinyi Guo, Mingxi Fu, Yizhi Wang, Tian Guan, Lianghui Zhu, Yonghong He

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

Abstract

Zero-shot whole-slide image (WSI) prediction aims to generalize to new pathology tasks without parameter updates at deployment. MI-Zero makes these predictions by pooling patch–text similarities. Conditional weight generation, combined with supervision from diverse pathology tasks, offers an alternative: learning to construct predictive rules from task descriptions. We introduce MI-Hyper, a hypernetwork pretrained across mixed tasks to generate the aggregation and classification weights of multiple instance learning (MIL) models. We first train the generator and a shared MIL basis jointly using source labels. We then freeze the basis and refine the generator. The generated task weights are reused across cases. Across 308 tasks from 52 pathology datasets, MI-Hyper improves mean AUC, balanced accuracy and macro-F1 over MI-Zero by 1.85, 1.17 and 0.57 percentage points, respectively. On some molecular prediction tasks, both AUC and balanced accuracy improve by more than 20 points. These results support task-conditioned weight generation as a promising approach to weight-space transfer for long-sequence modeling.

Figure

Figure 1: Constructing predictors from tiled WSIs. (a) MI-Zero pools patch–text similarity scores. (b) MI-Hyper constructs an MIL predictor using generated weights.

1 Introduction

Zero-shot whole-slide image (WSI) prediction seeks to reuse a trained system for new pathology tasks without task-specific optimization at deployment. Because the same slide can support subtyping, grading and molecular prediction, the relevant tissue evidence depends on the endpoint. A zero-shot predictor must therefore select and combine patterns across long patch sequences according to the task.

Pathology foundation models provide a common starting point through reusable representations at the patch and whole-slide levels [30, 11]. For patch-based prediction, multiple instance learning (MIL) converts a bag of representations into a slide-level output through aggregation and classification [18, 32]. Aggregation and classification parameters determine how tissue features contribute to a particular endpoint. The remaining question is how to obtain these parameters for a new task without additional target-task optimization.

Language provides a natural interface for specifying tasks through class descriptions. MI-Zero uses this interface to compare patch and class-text representations in a shared embedding space, then pools their similarities into slide-level predictions [31]. Changing the descriptions changes the similarity scores, which a predefined operator pools. This language interface also suggests a complementary route: generating the parameters that govern MIL aggregation and classification from the descriptions.

Conditional weight generation provides a mechanism for learning this mapping from descriptions to predictors. Hypernetworks generate model parameters from conditioning information, and language-conditioned methods extend this principle to classifiers and adaptation weights [14, 2, 6]. Meanwhile, labeled pathology datasets cover multiple organs and prediction endpoints [45, 52]. These source labels can supervise predictions made by generated models, allowing the description-to-weight mapping to be learned across tasks. This provides a basis for studying transfer through the weights of generated MIL predictors.

Building on this opportunity, we introduce MI-Hyper, a hypernetwork pretrained across mixed tasks to construct MIL predictors from task and class descriptions. Figure 1 contrasts MI-Zero’s similarity pooling with MI-Hyper’s weight generation, while Figure 2 presents the training and deployment framework. We first train the generator and a shared MIL basis through source-label prediction. With the basis fixed, we then refine the dual-text generator using source labels and text-consistency objectives. At deployment, MI-Hyper generates task-specific aggregation and classification weights for each text condition and reuses them across cases. The generated parameters are shared within a task, but attention is computed from each case’s tissue content. Their number is independent of bag length, so task-level model generation is separate from computation over each case’s complete patch sequence. This separation allows us to study weight-space transfer in long-sequence modeling.

We train MI-Hyper with five folds over 112 semantic groups and compare it with MI-Zero on 308 tasks from 52 pathology datasets. Target task IDs are held out from source optimization and checkpoint selection, while cases can recur across tasks. On the complete query set, MI-Hyper improves mean AUC, balanced accuracy and macro-F1 by 1.85, 1.17 and 0.57 percentage points, respectively. On some molecular prediction tasks, both AUC and balanced accuracy improve by more than 20 points. To understand these results, we organize performance by endpoint, anatomy, bag size and dataset source, then examine individual tasks and the relation between generated queries and spatial attention.

Our contributions are threefold:

∙\bullet We introduce MI-Hyper, which learns to generate task-specific MIL aggregation and classification weights from descriptions, separating predictor construction from case-level sequence processing. ∙\bullet We train the generator on labels from mixed source tasks through joint learning and fixed-basis refinement. The generated parameters are reused across cases, while chunked execution processes each complete patch sequence. ∙\bullet We evaluate this framework on 308 tasks from 52 pathology datasets, combining overall and task-level comparisons with analyses of generated queries and spatial attention.

References (36)