Model weights | Preprint paper
ALICE (Agglomerative Learning via Integrated Computational pathology Embedding) is a unified general-purpose pathology foundation model trained through multi-stage agglomerative distillation, which sequentially distills eight vision-only, vision-language, and slide-level teacher models into dedicated modules of a single backbone. It provides a unified representation for ROI tissue analysis, vision-language multimodal understanding, and whole-slide clinical assessment, achieving the best average rank among task-matched pathology foundation models across 21 task scenarios, 96 downstream tasks, and 48 data sources.
The ALICE model includes three types of inference:
vision_stage: extracts vision-only patch features from pathology image tensors.vl_stage: maps ALICE vision features to vision-language teacher-head features.slide_stage: aggregates patch-level ALICE features into slide-level features.
Model weights and Hugging Face AutoModel loading code are hosted at:
Installation
pip install torch torchvision timm transformers pillow huggingface_hubLog in first:
huggingface-cli loginUsing ALICE to extract tile-level image features, language-aligned image features, and whole-slide image features:
import torch
from PIL import Image
example_image_path = './example.jpg'
with torch.no_grad():
# Vision-only: image -> raw vision feature
# [B, 3, H, W] -> [B, 3840]
image = Image.open(example_image_path).convert("RGB")
image_tensor = alice.image_transform(image).unsqueeze(0) # [1, 3, 224, 224]
vision_features = alice.vision_stage(image_tensor)
# vision_features: [B, 3840]
# Vision-language: vision_stage output -> dict of teacher-head features
# [B, 3840] -> dict[str, Tensor]
vl_features = alice.vl_stage(vision_features)
# vl_features["keep"]: KEEP head, [B, 768]
# vl_features["conch_v1"]: CONCH v1 head, [B, 512]
# vl_features["musk"]: MUSK head, [B, 1024]
# Slide-level: patch_features + coords -> slide feature
# [N, 3840] + [N, 2] -> [B, 2048]
patch_features = torch.randn(100, 3840)
coords = torch.randint(0, 10000, (100, 2))
slide_features = alice.slide_stage(patch_features, coords=coords, patch_size_lv0=512)
# slide_features: [B, 2048]Image preprocessing can also use the following methods:
from torchvision import transforms
from torchvision.transforms import InterpolationMode
image_preprocess = transforms.Compose([
transforms.Resize(224, interpolation=InterpolationMode.BICUBIC, antialias=True),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
mean=(0.48145466, 0.4578275, 0.40821073),
std=(0.26862954, 0.26130258, 0.27577711),
),
])| Stage | Input | Output |
|---|---|---|
vision_stage |
image tensor [B, 3, H, W] |
feature tensor [B, 3840] |
vl_stage |
vision_stage output |
dict with keep, conch_v1, musk features |
slide_stage |
patch features [N, 3840] or [B, N, 3840] |
slide feature [B, 2048] |
CC-BY-NC-ND-4.0
If ALICE is helpful to your research, please consider citing our work:
@misc{li2026alice,
title={ALICE: Learning a General-Purpose Pathology Foundation Model from Vision, Vision-Language, and Slide-Level Experts},
author={Jiawen Li and Tian Guan and Huijuan Shi and Xitong Ling and Mingxi Fu and Anjia Han and Chao He and Yonghong He},
year={2026},
eprint={2607.09526},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2607.09526},
}