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 HearXiv 2026 · arXiv

TL;DR

MI-Hyper is a novel hypernetwork framework that enables zero-shot prediction for whole-slide images by generating model weights directly from task descriptions. By pretraining across hundreds of diverse pathology tasks, it learns to "construct" specialized predictors on the fly, significantly outperforming similarity-based baselines, especially on complex molecular prediction tasks.

What Problem Does This Paper Address?

In computational pathology, Whole-Slide Images (WSIs) are massive, often containing hundreds of thousands of patches. A single slide can be used for many different tasks—like grading a tumor, identifying mutations, or predicting treatment response. Ideally, we want a "zero-shot" system that can handle a new task just by being told what to look for (via a text description), without needing to retrain on new labeled data.

Existing approaches like MI-Zero rely on comparing image patches to text embeddings in a shared space. While effective for simple classification, this "similarity pooling" often struggles with complex tasks where the relevant visual evidence is subtle or requires specific aggregation rules. The challenge is: how do we transfer knowledge from a vast bank of existing pathology tasks to create a better predictor for a completely new one?

Methods

The authors introduce MI-Hyper, which shifts the paradigm from similarity-based pooling to weight-space transfer. Instead of just comparing patches to text, MI-Hyper uses a hypernetwork to generate the actual parameters (weights and biases) of a Multiple Instance Learning (MIL) model based on class and task descriptions.

Key components include:

  • Conditional Weight Generation: A hypernetwork takes text embeddings (from a frozen encoder like CONCH) and outputs task-specific aggregation queries and classifier weights.
  • Two-Stage Training:
  • Mixed-Task Pretraining: The generator and a shared MIL basis are trained jointly on a massive "data bank" of diverse source tasks.
  • Source-Only Refinement: The MIL basis is frozen, and the generator is refined using consistency-based losses to ensure stable weight generation across different text prompts.
  • Zero-Shot Deployment: At test time, the system generates the MIL weights once for a new task description. These weights are then reused across all cases for that task, making it computationally efficient for long patch sequences.
The architecture of MI-Hyper vs. MI-Zero. MI-Hyper generates MIL weights from text, whereas MI-Zero relies on patch-text similarity.

Datasets

The study utilizes an extensive registry:

  • 308 tasks spanning 52 pathology datasets (including TCGA and CPTAC).
  • Covers 112 semantic groups and 16 endpoint types (e.g., mutation, staging, grading).
  • The global training split includes 20,420 patients and 111,151 task-case pairs.
  • Evaluation is performed on held-out task IDs to test zero-shot generalization across the complete query set.
The MI-Hyper training and deployment framework.

Key Insights and Ideas

  • Weight Generation > Similarity Pooling: For complex pathology tasks, generating a specialized "rule" (model weights) is more powerful than simple feature alignment.
  • Separation of Concerns: By generating task-level weights once and reusing them, the model separates the "what to look for" (task construction) from the "where is it" (case processing). This is crucial for handling the long-sequence nature of WSIs.
  • Semantic Grounding: The hypernetwork learns a mapping from the language of pathology to the numerical space of model weights, effectively "reading" a task description to "build" a detector.
  • Robustness to Bag Length: MI-Hyper shows significant gains on very large slides (over 5,000 patches), suggesting its generated aggregation rules are more robust for long-sequence modeling than simple pooling.

Key Results

  • Overall Improvement: Across 308 tasks, MI-Hyper improved mean AUC by 1.85 percentage points and balanced accuracy by 1.17 points over the MI-Zero baseline.
  • Molecular Prediction Wins: On difficult molecular prediction tasks, MI-Hyper saw massive gains, with some tasks improving by over 20 points in both AUC and balanced accuracy.
  • Endpoint Specificity: It performed particularly well on mutation tasks (+5.11 AUC) and benign/malignant classification (+10.91 AUC).
  • Spatial Attention: Qualitative analysis showed that the generated weights successfully directed the model's attention to clinically relevant tissue regions, even for tasks it hadn't seen during training.

Limitations and Future Work

  • Source Task Coverage: While the dataset is large, broadening the variety of source tasks could further improve generalization.
  • Weight Stability: The authors note that more stable weight generation is a key area for future improvement to ensure reliable predictions across diverse linguistic descriptions.
  • Data Augmentation: Investigating how text-based data augmentation affects the hypernetwork's performance is a promising next step.
  • Foundation Model Integration: Future work could explore tighter integration with evolving pathology foundation models to leverage even richer visual representations.

Summary updated

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.
BibTeX
@misc{ling2026mi,
  author = {Xitong Ling and Yousef Kotp and Weiming Chen and Yining Li and Jiawen Li and Minxi Ouyang and Xinyi Guo and Mingxi Fu and Yizhi Wang and Tian Guan and Lianghui Zhu and Yonghong He},
  title = {{MI-Hyper: Generating Multiple Instance Models for Weight Space Transfer Learning in Histopathology via Mixed Tasks Pretrained HyperNetwork}},
  year = {2026},
  eprint = {2611.22968},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22968},
}
Figure