GAN Inversion for Data Augmentation to Improve Colonoscopy Lesion Classification

Mayank Golhar, Taylor L. Bobrow, Saowanee Ngamruengphong, Nicholas J. Durr

TL;DR

This paper introduces a novel data augmentation technique for colonoscopy images using GAN inversion. By manipulating latent representations of existing images, they generate realistic synthetic data that significantly improves polyp classification performance, outperforming traditional augmentation methods and even other GAN-based approaches.

What Problem Does This Paper Address?

Deep learning models excel at medical image analysis, but their performance hinges on vast amounts of high-quality, annotated data. For colonoscopy, acquiring such datasets is a significant bottleneck due to the time, cost, and expertise required for annotation, as well as privacy concerns. Existing data augmentation techniques often fall short of capturing the full diversity of real-world colonoscopy images, leading to models that don't generalize well. This paper aims to bridge this gap by creating a more robust and diverse training dataset through advanced GAN-based augmentation.

Methods

The core of this work lies in GAN inversion, specifically leveraging a StyleGAN-ADA model trained on a diverse set of public colonoscopy images. The process involves two main steps:

  1. GAN Inversion: An encoder is trained to map real colonoscopy images into the StyleGAN's latent space. This latent representation captures the image's semantic features.
  2. Latent Space Manipulation for Augmentation:
    • Imaging Modality Translation: The latent codes of images from different modalities (e.g., White Light Imaging - WLI, and Narrow Band Imaging - NBI) are manipulated. By mixing latent codes from different modalities, the model can translate an image from one to another, effectively creating synthetic NBI images from WLI images and vice-versa. This is achieved by using coarse latent codes from one modality and fine latent codes from another.
  3. Linear Interpolation: To generate variations in lesion size and shape, the latent codes of two target images (of the same class and modality) are linearly interpolated. This creates a smooth transition between the two images, producing synthetic images with intermediate characteristics.

This GAN inversion approach allows for multiple augmentation types using a single trained model, a significant advantage over methods that require training separate models for each augmentation task.

Datasets

The paper utilizes several public colonoscopy datasets for training the StyleGAN-ADA model and the encoder:

  • HyperKvasir: A comprehensive multi-class image and video dataset for gastrointestinal endoscopy.
  • ISIT-UMR: Used for polyp images.
  • KUMC: Used for polyp images.
  • JHU dataset: The internal dataset used for the downstream polyp classification task.

The authors note that using public datasets with diverse attributes (imaging conditions, pathologies, etc.) helps create a richer latent space for StyleGAN.

Key Insights and Ideas

  • GAN Inversion as a Versatile Augmentation Tool: The paper demonstrates that GAN inversion is not just for image reconstruction but can be a powerful and flexible tool for generating diverse synthetic data for downstream tasks.
  • Disentangled Latent Space is Key: The success of manipulating latent codes relies on the disentangled nature of the StyleGAN latent space, allowing for selective editing of attributes like imaging modality or lesion size without drastically altering other features.
  • Single Model for Multiple Augmentations: A major advantage highlighted is the ability to perform various augmentations (modality translation, interpolation) using a single GAN inversion framework, reducing complexity and computational overhead.
  • Leveraging Public Data for Internal Tasks: The approach effectively leverages large, publicly available datasets to enhance smaller, task-specific internal datasets, a common challenge in medical imaging research.
  • Interpolation for Progressive Attributes: Linear interpolation in the latent space provides a unique way to generate images with progressive changes in attributes like lesion size, which is difficult to achieve with other augmentation methods.

Key Results

The proposed GAN inversion-based data augmentation significantly improved polyp classification performance:

  • NBI-WLI Domain Transfer: Achieved up to a 6% improvement in accuracy over baseline methods when translating WLI to NBI images. It also outperformed CycleGAN by 3.3% in accuracy. When translating to both WLI and NBI, it showed a 2.9% accuracy improvement over baselines and 2% over CycleGAN.
  • Interpolated Images Augmentation: Led to an accuracy improvement of 2.8% in NBI and 1.1% in WLI cases compared to baselines.
  • Qualitative Results: The generated synthetic images were realistic and showed variety in imaging modalities, illumination, lesion shapes, and vasculature patterns, as illustrated in Figure 3. The GAN inversion model could faithfully reconstruct input images, though with a slight trade-off in reconstruction accuracy for editability.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges a trade-off between reconstruction accuracy and editability in GAN inversion, meaning inverted images are not exact replicas of the originals.
  • The assumption that representations of the same class are clustered in the latent space, while generally true, might lead to occasional interclass hyperplane crossings during interpolation.
  • Future Work:
    • Explore other GAN inversion models.
  • Apply these augmentation techniques to other colonoscopy tasks like polyp detection and segmentation.
  • Investigate the use of GAN-generated data in semi-supervised and unsupervised learning settings for colonoscopy tasks.

Summary updated

Abstract

A major challenge in applying deep learning to medical imaging is the paucity of annotated data. This study demonstrates that synthetic colonoscopy images generated by Generative Adversarial Network (GAN) inversion can be used as training data to improve the lesion classification performance of deep learning models. This approach inverts pairs of images with the same label to a semantically rich & disentangled latent space and manipulates latent representations to produce new synthetic images with the same label. We perform image modality translation (style transfer) between white light and narrowband imaging (NBI). We also generate realistic-looking synthetic lesion images by interpolating between original training images to increase the variety of lesion shapes in the training dataset. We show that these approaches outperform comparative colonoscopy data augmentation techniques without the need to re-train multiple generative models. This approach also leverages information from datasets that may not have been designed for the specific colonoscopy downstream task. E.g. using a bowel prep grading dataset for a polyp classification task. Our experiments show this approach can perform multiple colonoscopy data augmentations, which improve the downstream polyp classification performance over baseline and comparison methods by up to 6%.
BibTeX
@article{golhar2025gan,
  author = {Mayank Golhar and Taylor L. Bobrow and Saowanee Ngamruengphong and Nicholas J. Durr},
  title = {{GAN Inversion for Data Augmentation to Improve Colonoscopy Lesion Classification}},
  journal = {IEEE JBHI},
  year = {2025},
  doi = {10.1109/jbhi.2024.3397611},
}
Figure