Pancakes: Consistent Multi-Protocol Image Segmentation Across Biomedical Domains

Marianne Rakic, Siyu Gai, Etienne Chollet, John Guttag, Adrian V Dalca

In the world of biomedical research, a single image is rarely just one thing. A brain MRI, for example, can be viewed as a map of tissue types, a chart of vascular territories, or a detailed atlas of fine-grained anatomy. Depending on whether you are a neurosurgeon planning an operation or a researcher studying Alzheimer’s disease, you require a completely different "protocol" for segmenting that exact same image.

Traditionally, researchers have faced a difficult choice: use a rigid model trained for one specific task, or rely on a "foundation model" like Segment Anything (SAM) that requires exhausting manual clicks and bounding boxes for every single image. Furthermore, these foundation models often suffer from semantic inconsistency—Label #1 might highlight a tumor in one patient but a blood vessel in the next.

Enter Pancakes, a novel framework developed by researchers at MIT and MGH. Pancakes automatically generates multiple, semantically consistent segmentation protocols for unseen medical domains, eliminating the need for manual prompting.

TL;DR

Pancakes is an automated framework that produces multiple plausible ways to segment a medical image (e.g., by broad tissue type versus detailed anatomy) without requiring manual prompts. Crucially, it ensures "semantic consistency," meaning the same label index always refers to the same anatomical structure across an entire dataset—even in imaging domains the model has never encountered before.

The Core Problems Addressed

The authors identify three major gaps in current medical AI segmentation:

  1. Protocol Ambiguity: There is no single "correct" segmentation for a medical image; there are many valid interpretations based on the clinical or research goal.
Multiple valid segmentation protocols for a single brain MRI, ranging from broad tissue types to fine-grained cortical structures.
  1. The Prompting Burden: Universal models like SAM are powerful but require labor-intensive manual input to define exactly what needs segmenting in a new dataset.
  2. Semantic Inconsistency: Existing "unsupervised" models might successfully partition an image into segments, but they do not guarantee that a specific label ID means the same thing across different subjects. This makes population-level analysis (like comparing hippocampal volumes across 100 patients) nearly impossible without manual re-labeling.
Inconsistencies in existing foundation models like SAM and UnSAM, which often fail to maintain semantic consistency across different images or settings.

Methodology: How Pancakes Works

Pancakes introduces a novel architecture and training strategy to solve these issues:

  • Distribution Estimation: A UNet-based model takes an image and predicts a high-dimensional distribution representing all possible labels at every pixel.
  • Protocol Sampling: Instead of forcing a single output, the model uses a "sampler" that takes a random variable representing a specific protocol (defined by the number of labels, $K$). This allows the model to sample different valid ways to slice the image data.
  • Positional Embeddings: Inspired by Transformers, the model uses sinusoidal embeddings to represent different protocols and label indices, allowing it to handle a variable number of labels gracefully.
  • The "Min Dice" Loss: To encourage diversity, the authors use a loss function that only penalizes the best-performing predicted protocol against the ground truth. This prevents the model from "averaging" different protocols into a blurry, non-physical mess.
  • Set-Based Training: By training on sets of images simultaneously, the model learns to maintain the same label IDs for the same structures across different subjects.

Training Data

The model was trained on a massive, diverse collection to ensure robust generalization:

  • Megamedical: A curated collection of 2D slices from dozens of public datasets covering MRI, CT, X-ray, Ultrasound, and Microscopy.
  • Anatomix: A synthetic dataset created by the authors. They took 3D anatomical labels, applied random elastic deformations, and assigned random intensities to create "fake" medical images. This teaches the model the underlying logic of anatomy without overfitting to specific textures.
  • Evaluation: The model was rigorously tested on seven "held-out" datasets it had never seen, including prostate MRI (QUBIQ), lung nodules (LIDC-IDRI), and retinal vessels (STARE).

Key Results & Insights

  • Superior Generalization: On the seven unseen datasets, Pancakes outperformed strong baselines like SAM, MedSAM, and UnSAM, often by more than 20 Dice points.
  • Extreme Efficiency: Pancakes is remarkably lightweight. With only 0.22M parameters, it is roughly 3,000 times smaller than SAM (641M) and operates 30x faster at inference time.
  • Interactive Synergy: When used as a starting point for interactive segmentation tools, Pancakes cut the number of required user clicks in half to reach high-quality results.
  • Consistency as a First-Class Citizen: The core insight of Pancakes is that for medical research, consistency across a population is often more critical than perfect accuracy on a single image. Pancakes is the first model to bake this requirement directly into its architecture.

Limitations and Future Work

While Pancakes represents a significant leap forward, the authors note a few areas for future growth:

  • Prior Knowledge: The user still needs to provide a rough estimate of how many labels ($K$) they are looking for in a given protocol.
  • Hierarchy: Currently, the different protocols are generated independently. Future versions could enforce hierarchical consistency (e.g., ensuring the "frontal lobe" label always strictly contains the "prefrontal cortex" label).
  • Clinical Validation: As a research framework, Pancakes has not yet undergone the rigorous clinical trials required for direct diagnostic use.

Ultimately, Pancakes represents a paradigm shift from simply "segmenting an object" to "understanding a domain," providing a powerful new tool for researchers to explore complex biomedical datasets with minimal manual effort.

Summary updated

BibTeX
@inproceedings{rakic2025pancakes,
  author = {Marianne Rakic and Siyu Gai and Etienne Chollet and John Guttag and Adrian V Dalca},
  title = {{Pancakes: Consistent Multi-Protocol Image Segmentation Across Biomedical Domains}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=9ednYuGHN1},
}
Figure