Self-supervised Learning for Endoscopic Video Analysis

Roy Hirsch, Mathilde Caron, Regev Cohen, Amir Livne, Ron Shapiro, Tomer Golany, Roman Goldenberg, Daniel Freedman, Ehud Rivlin

Abstract

Developing artificial intelligence for medical video analysis is often hindered by the high cost and specialized expertise required for data annotation. This research demonstrates that Self-Supervised Learning (SSL) can significantly mitigate this "data tax." By pretraining Masked Siamese Networks (MSNs) on large-scale, unlabeled endoscopic datasets, researchers achieved state-of-the-art performance in surgical phase recognition and polyp characterization. Notably, these models matched the performance of fully supervised counterparts while requiring 50% less labeled data, establishing a path toward robust foundation models for medical computer vision.

Introduction

Endoscopy is a fundamental diagnostic and therapeutic tool in modern medicine, with over 250 million procedures—including laparoscopies and colonoscopies—performed globally each year. While AI holds the potential to assist surgeons by identifying anatomical landmarks or characterizing pathologies, the development of these systems is bottlenecked by the requirement for expert-level annotations. Unlike general computer vision tasks where crowdsourced labeling is feasible, medical video requires the time of highly trained clinicians, making large-scale supervised learning prohibitively expensive.

To address this, researchers from Verily AI and Google Research explored the application of Self-Supervised Learning (SSL). By allowing models to learn from the vast quantities of unlabeled video already generated in clinical practice, SSL aims to create "foundation models" that understand the specific visual nuances of the human body—such as unique textures, lighting conditions, and anatomical structures—before any explicit labels are introduced.

Methodology: Masked Siamese Networks

The study utilizes Masked Siamese Networks (MSNs), a sophisticated SSL framework designed to learn robust visual representations. The training process follows a specific pipeline:

  1. Masking: An input image (e.g., a frame from a laparoscopic gallbladder surgery) is divided into patches, and a significant portion of these patches are hidden or "masked."
  2. Siamese Architecture: The model employs two Vision Transformer (ViT) encoders. The first encoder processes the masked version of the image (the anchor), while the second processes the original, unmasked version (the target).
  3. Representation Matching: The training objective is to ensure that the representation of the masked image matches that of the full image. To succeed, the model must learn to infer the missing anatomical structures based on the surrounding context, effectively learning the underlying "logic" of endoscopic imagery.

The researchers evaluated three model scales—ViT-Small (ViT-S), ViT-Middle (ViT-B), and ViT-Large (ViT-L)—to determine how model capacity influences performance in specialized medical domains.

Experimental Setup and Datasets

The models were pretrained on a massive corpus of unlabeled medical data and subsequently evaluated on standard public benchmarks:

  • Pretraining Data: A private laparoscopy dataset comprising 7,877 videos (>23 million frames) and a private colonoscopy dataset of 13,979 videos (>2 million frames).
  • Surgical Phase Recognition: Evaluated on the Cholec80 public dataset (80 videos), where the task is to identify the specific step of a cholecystectomy (gallbladder removal) in real-time.
  • Optical Polyp Characterization: Evaluated on the PolypsSet public dataset (155 videos), focusing on the critical clinical distinction between precancerous adenomas and benign hyperplastic polyps.

Key Findings

1. The Superiority of Domain-Specific Pretraining

A common practice in AI is to initialize models using ImageNet, a dataset of general objects like cars and animals. However, this study found that pretraining on unlabeled medical data significantly outperformed ImageNet pretraining. The model benefits from exposure to the specific artifacts of endoscopy—such as specular reflections and fluid dynamics—that are absent in general-purpose datasets.

2. Extreme Label Efficiency

The SSL approach demonstrated remarkable robustness in "low-shot" scenarios. The models achieved frame-level performance comparable to supervised baselines while using only 12% of the annotated videos. Across the board, the researchers observed a 50% reduction in the total amount of labeled data required to reach state-of-the-art performance levels.

3. State-of-the-Art Benchmarks

On the Cholec80 dataset, the MSN ViT-L model achieved a frame-level F1 score of 76.3. When integrated with temporal modeling (MS-TCN), the score rose to 89.6, setting a new benchmark for surgical phase recognition. Similarly, the model achieved an 80.4 F1 score on the PolypsSet benchmark, outperforming previous supervised methods.

Discussion and Future Work

The results suggest that SSL can effectively bridge the gap between the availability of raw medical data and the scarcity of expert labels. Furthermore, the SSL-derived features proved more stable across different medical centers and surgical styles, indicating that the model learned universal anatomical features rather than overfitting to specific video artifacts.

Despite these successes, limitations remain. The current SSL pretraining is frame-based; future iterations could incorporate "Masked Video Modeling" to capture motion and temporal dynamics directly during the self-supervised phase. Additionally, while the model provides a strong general representation, clinical deployment will require further validation in real-time surgical environments to ensure these improvements translate into better patient outcomes.

Conclusion

By leveraging massive unlabeled datasets, Self-Supervised Learning provides a scalable solution to the data bottleneck in medical AI. This research demonstrates that foundation models for endoscopy can achieve superior accuracy and greater label efficiency, paving the way for more accessible and robust AI assistants in the operating room.

Summary updated

Abstract

Self-supervised learning (SSL) has led to important breakthroughs in computer vision by allowing learning from large amounts of unlabeled data. As such, it might have a pivotal role to play in biomedicine where annotating data requires a highly specialized expertise. Yet, there are many healthcare domains for which SSL has not been extensively explored. One such domain is endoscopy, minimally invasive procedures which are commonly used to detect and treat infections, chronic inflammatory diseases or cancer. In this work, we study the use of a leading SSL framework, namely Masked Siamese Networks (MSNs), for endoscopic video analysis such as colonoscopy and laparoscopy. To fully exploit the power of SSL, we create sizable unlabeled endoscopic video datasets for training MSNs. These strong image representations serve as a foundation for secondary training with limited annotated datasets, resulting in state-of-the-art performance in endoscopic benchmarks like surgical phase recognition during laparoscopy and colonoscopic polyp characterization. Additionally, we achieve a 50% reduction in annotated data size without sacrificing performance. Thus, our work provides evidence that SSL can dramatically reduce the need of annotated data in endoscopy.
BibTeX
@inproceedings{hirsch2023self,
  author = {Roy Hirsch and Mathilde Caron and Regev Cohen and Amir Livne and Ron Shapiro and Tomer Golany and Roman Goldenberg and Daniel Freedman and Ehud Rivlin},
  title = {{Self-supervised Learning for Endoscopic Video Analysis}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2023},
  url = {https://openreview.net/forum?id=y8ZnxRg3VZ},
}
Figure