Lifelong Histopathology Whole Slide Image Retrieval via Distance Consistency Rehearsal

Xinyu Zhu, Zhiguo Jiang, Kun Wu, Jun Shi, Yushan Zheng

TL;DR

Researchers have developed a new framework called Lifelong Whole Slide Retrieval (LWSR) to prevent AI models from "forgetting" old medical data as they learn from new clinical cases. By using a novel Distance Consistency Rehearsal (DCR) module, the system ensures that the relative relationships between previous histopathology images remain stable, allowing for reliable and consistent diagnostic support in ever-growing medical databases.

What Problem Does This Paper Address?

In digital pathology, Content-Based Histopathological Image Retrieval (CBHIR) is a vital tool. It allows doctors to submit a "query" image of a tissue slide and receive similar cases from a database to help inform a diagnosis. However, most current systems are trained on static datasets.

In the real world, medical databases grow continuously. When an AI model is updated with new types of cancer or new patient data, it often suffers from catastrophic forgetting. It becomes so focused on the new data that it loses the ability to accurately retrieve or rank older cases. For a doctor, this is a dealbreaker: if the system returns different results for the same query today than it did last month, the tool loses its clinical reliability.

Methods

The authors propose the LWSR framework, which balances "plasticity" (the ability to learn new things) with "stability" (the ability to remember old things).

Key components include:

  • Feature Extraction: The system uses PLIP (a vision-language model for pathology) to turn image patches into numerical features and TransMIL to aggregate these into a single representation for a Whole Slide Image (WSI).
  • Memory Bank with Reservoir Sampling: Instead of keeping every old image (which would be storage-intensive), the system uses a "reservoir sampling" algorithm to maintain a small, representative subset of "exemplar" feature cubes from previous tasks in a local memory bank.
  • Distance Consistency Rehearsal (DCR): This is the core innovation. Standard "replay" methods in AI usually focus on keeping classification labels correct. DCR instead focuses on geometry. It calculates a distance matrix for old samples; when the model learns new data, DCR forces the model to minimize the change in these distances. This ensures the "retrieval queue"—the order of results shown to a doctor—remains consistent over time.

Datasets

The framework was evaluated using four public WSI datasets from The Cancer Genome Atlas (TCGA), organized into a sequential learning task:

  1. NSCLC (Lung Cancer)
  2. RCC (Kidney Cancer)
  3. BRCA (Breast Cancer)
  4. GAST (Gastrointestinal Cancer)

The final combined dataset included 3,053 cases across 8 different tumor types and 4 anatomic sites.

Key Insights and Ideas

  • Retrieval is about Relationships, not just Labels: Most continual learning research focuses on classification (is this Image A or B?). This paper argues that for retrieval, the relative distance between images in the feature space is what actually matters. If the "neighborhood" of an image shifts, the retrieval results break.
  • Stability as Queue Consistency: The authors define "stability" in a medical context as the consistency of the returned results. They used statistical metrics like Spearman’s and Kendall’s rank correlation to prove that their model doesn't just get the "right" answer, but stays consistent in its "ranking" of answers.
  • The "Buffer" Sweet Spot: The research found that a buffer size of about 10 WSIs per task provided the best balance. Interestingly, increasing the buffer to 15 WSIs didn't yield significant gains, suggesting that diversity in the memory bank is more important than raw volume.

Key Results

The LWSR framework significantly outperformed standard continual learning approaches:

  • Accuracy: LWSR achieved a mean Average Precision (mAP) of 0.796, coming remarkably close to the "Upper Bound" (Joint Training on all data at once, which scored 0.908) and far surpassing simple fine-tuning (0.426).
  • Consistency: In stability tests (SRC and KRC), LWSR maintained high scores (e.g., 0.878 SRC), meaning the order of retrieved images for old tasks remained highly stable even after the model learned three subsequent new datasets.
  • Superiority over Classification-based CL: LWSR beat established methods like EWC, LwF, and DER++ because those methods aren't designed to handle the fine-grained similarity requirements of image retrieval.

Limitations and Future Work

  • Storage of Feature Cubes: While the authors save "feature cubes" rather than raw images to save space, these cubes still require storage. In a massive clinical setting with millions of slides, managing this memory bank could become a scaling challenge.
  • Task Order: The paper uses a specific sequence of cancer types (Lung -> Kidney -> Breast -> Gastro). The authors do not deeply explore how the order of arrival or the similarity between sequential tasks might affect the forgetting rate.
  • Future Directions: The authors suggest this is the first step toward truly "lifelong" clinical AI assistants that can evolve alongside a hospital's growing digital archives without requiring constant, expensive retraining from scratch.

Summary updated

BibTeX
@inproceedings{zhu2024lifelong,
  author = {Xinyu Zhu and Zhiguo Jiang and Kun Wu and Jun Shi and Yushan Zheng},
  title = {{Lifelong Histopathology Whole Slide Image Retrieval via Distance Consistency Rehearsal}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72083-3\_26},
}
Figure