EndoGen: Conditional Autoregressive Endoscopic Video Generation

Xinyu Liu, Hengyu Liu, Cheng Wang, Tianming Liu, Yixuan Yuan

Introduction

Generating realistic endoscopic video is a critical challenge in medical AI, with significant implications for surgical simulation and the augmentation of datasets for rare pathologies. While static image generation has matured, video generation must address two primary hurdles: maintaining temporal consistency (the "flow" of movement) and providing controllable generation (the ability to specify conditions like "polyp" or "knot-tying"). Existing Autoregressive (AR) models, though capable of modeling long-range dependencies, often struggle with the computational demands and temporal coherence required for high-fidelity medical video.

Methodology

EndoGen addresses these challenges through a conditional autoregressive framework featuring two key innovations: Spatiotemporal Grid-Frame Patterning (SGP) and Semantic-Aware Token Masking (SAT).

The EndoGen architecture featuring SGP and SAT modules for conditional video generation.

Spatiotemporal Grid-Frame Patterning (SGP)

Rather than employing complex 3D convolutions, SGP reformulates a sequence of video frames into a single 2D grid. This allows a standard 2D AR architecture to treat temporal relationships as spatial ones, leveraging pre-trained image generation weights to capture global dependencies across the entire sequence efficiently.

Semantic-Aware Token Masking (SAT)

Endoscopic footage is often characterized by redundant, low-information regions (e.g., uniform tissue). SAT calculates feature variance across channels to identify and prioritize "informative" regions, such as lesions or surgical tools. During training, the model dynamically masks less critical tokens, forcing the transformer to focus on the subtle textures and semantic details that define specific medical conditions.

Experimental Results

The model was evaluated on the HyperKvasir dataset (8 pathological findings) and the SurgVisdom dataset (surgical tasks). EndoGen demonstrated state-of-the-art performance across both quantitative and qualitative benchmarks.

Qualitative comparison of EndoGen against VDM and VidGPT across different medical conditions and datasets.

Quantitative Performance

On the HyperKvasir dataset, EndoGen achieved a Fréchet Video Distance (FVD) of 507.2, significantly outperforming the previous AR state-of-the-art, VidGPT (1548.6), and diffusion-based models like VDM (2125.4). In surgical task generation on SurgVisdom, EndoGen achieved a 40.6% lower FVD than diffusion methods, indicating superior handling of complex tool dynamics.

Downstream Impact

Beyond visual realism, the authors demonstrated the utility of synthetic data for training downstream models. In a semi-supervised polyp segmentation task, incorporating EndoGen-generated videos improved the Dice score from 69.75% (supervised baseline) to 71.03% using the FixMatch framework.

Conclusion and Future Work

EndoGen provides a robust framework for controllable, high-quality endoscopic video generation. While currently limited by resolution (typically 128x128) and sequence length (16 frames), it represents a significant step toward realistic surgical simulation. Future research will focus on scaling to high-definition standards and extending context windows for longer surgical procedures.

Summary updated

BibTeX
@inproceedings{liu2025endogen,
  author = {Xinyu Liu and Hengyu Liu and Cheng Wang and Tianming Liu and Yixuan Yuan},
  title = {{EndoGen: Conditional Autoregressive Endoscopic Video Generation}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  doi = {10.1007/978-3-032-05127-1\_17},
}
Figure