A Multitask Network for the Diagnosis of Autoimmune Gastritis

Yuqi Cao, Yining Zhao, Xin Jin, Jiayuan Zhang, G. Y. Zhang, Pingjie Huang, Yue-Hua HanJournal of Imaging 2025 · DOI

TL;DR

This paper introduces a novel multitask deep learning approach for diagnosing Autoimmune Gastritis (AIG) from endoscopic images. By first grouping related images from a single patient using SIFT-based registration and then employing a large-kernel convolutional network (RepLKNet) for simultaneous anatomical region and lesion classification, the method achieves high accuracy in identifying AIG-specific patterns. This work offers a significant step towards more accurate and efficient computer-aided diagnosis of AIG, particularly in regions with limited medical expertise.

What Problem Does This Paper Address?

Autoimmune Gastritis (AIG) is a condition that can lead to more serious issues like gastric neuroendocrine tumors and gastric cancer. Early and accurate diagnosis is crucial for prevention. While endoscopic imaging is key to diagnosis, AIG presents with a distinct pattern of gastric mucosal atrophy – primarily in the fundus and body, with relative sparing of the antrum (often called "reverse atrophy"). This pattern is different from gastritis caused by H. pylori infection, which typically affects the antrum first.

The challenge lies in accurately identifying these subtle morphological changes and their distribution across different gastric regions from endoscopic images. This task is demanding for physicians, especially in areas with limited access to specialized expertise, leading to potential misdiagnoses. Existing methods often analyze images independently, potentially losing valuable contextual information from multiple views of the same patient's stomach.

Methods

The proposed method tackles this challenge with a multi-stage, patient-centric approach:

  1. Image Grouping via Registration: To leverage the rich information within multiple images of the same patient, the researchers first use the Scale-Invariant Feature Transform (SIFT) algorithm for image registration. SIFT identifies key feature points and their descriptors, allowing for robust matching even with variations in scale and rotation. By computing pairwise registration between images, a similarity matrix is generated. This matrix then guides a hierarchical clustering algorithm to group images that are highly similar, effectively creating clusters of related views of the same gastric region. This step aims to overcome the loss of information that can occur when analyzing images in isolation.
  2. Multitask Classification with RepLKNet: For each image group, a single network performs two classification tasks simultaneously:
  3. Anatomical Region Classification: This task identifies which part of the stomach is depicted in the image (fundus, body, or antrum). This is crucial for recognizing the "reverse atrophy" pattern characteristic of AIG.
  4. Lesion Recognition: This binary classification determines whether the gastric mucosa in the image shows signs of atrophy.

    The backbone network used for these tasks is RepLKNet, a convolutional neural network (CNN) that utilizes large-kernel convolutions. RepLKNet is designed to capture broader spatial context, which is beneficial for analyzing subtle morphological changes in endoscopic images. Its architecture balances a large receptive field with computational efficiency, making it suitable for this application, especially given the relatively small dataset size.

Datasets

The study utilized a dataset collected from the Second Affiliated Hospital of Zhejiang University School of Medicine. This dataset comprises:

  • 298 patients diagnosed with AIG, H. pylori-positive atrophic gastritis, or H. pylori-negative chronic atrophic gastritis.
  • A total of 5981 images with image-level labels.
  • Images were categorized by gastric anatomical region (fundus, body, antrum) and lesion status (atrophic vs. normal gastric mucosa).
  • The dataset was split into training, validation, and test sets at an approximate 6:2:2 ratio, with strict measures to prevent patient-level data leakage.

Key Insights and Ideas

  • Patient-centric analysis is key: Analyzing multiple images from the same patient in a grouped manner, rather than individually, significantly improves diagnostic accuracy by leveraging inter-image correlations.
  • "Reverse atrophy" is a critical AIG signature: The ability to accurately classify both the anatomical region and the presence of atrophy is essential for identifying the characteristic AIG pattern.
  • Large kernels for global context: RepLKNet's use of large-kernel convolutions is particularly effective for capturing the broader visual context needed to distinguish subtle atrophic changes and anatomical regions in endoscopic images.
  • Interpretability matters: The inclusion of Grad-CAM visualization helps to understand why the model makes certain predictions, building trust and facilitating clinical adoption.

Key Results

The proposed multitask network achieved impressive results:

  • Anatomical Region Classification:
    • Accuracy: 93.4 ± 0.5% (95% CI)
    • Precision: 92.6 ± 0.4% (95% CI)
    • Outperformed other state-of-the-art CNNs and Transformers.
  • Lesion Recognition (Atrophic Mucosa Detection):
    • Accuracy: 90.2 ± 1.0% (95% CI)
    • Precision: 90.5 ± 0.8% (95% CI)
    • RepLKNet, when combined with image grouping, showed superior performance.

Limitations and Future Work

The authors acknowledge two primary limitations:

  • Limited Dataset Size: The current dataset is relatively small, which could impact the model's generalizability and performance. Future work should focus on expanding the dataset.
  • Single-Institution Data: The data was collected from a single institution. To ensure robustness and broader applicability, future research should aim for multi-center data collection and standardization.

Future work includes:

  • Systematically collecting data from multiple physicians and institutions to create a more diverse and robust dataset.
  • Exploring the integration of other AIG diagnostic indicators, such as pathology and serological tests, for a multimodal diagnostic approach.
  • Developing an online AIG diagnostic system integrated with telemedicine platforms to assist regions with limited medical expertise.

Summary updated

Abstract

Autoimmune gastritis (AIG) has a strong correlation with gastric neuroendocrine tumors (NETs) and gastric cancer, making its timely and accurate diagnosis crucial for tumor prevention. The endoscopic manifestations of AIG differ from those of gastritis caused by <i>Helicobacter pylori</i> (<i>H. pylori</i>) infection in terms of the affected gastric anatomical regions and the pathological characteristics observed in biopsy samples. Therefore, when diagnosing AIG based on endoscopic images, it is essential not only to distinguish between normal and atrophic gastric mucosa but also to accurately identify the anatomical region in which the atrophic mucosa is located. In this study, we propose a patient-based multitask gastroscopy image classification network that analyzes all images obtained during the endoscopic procedure. First, we employ the Scale-Invariant Feature Transform (SIFT) algorithm for image registration, generating an image similarity matrix. Next, we use a hierarchical clustering algorithm to group images based on this matrix. Finally, we apply the RepLKNet model, which utilizes large-kernel convolution, to each image group to perform two tasks: anatomical region classification and lesion recognition. Our method achieves an accuracy of 93.4 ± 0.5% (95% CI) and a precision of 92.6 ± 0.4% (95% CI) in the anatomical region classification task, which categorizes images into the fundus, body, and antrum. Additionally, it attains an accuracy of 90.2 ± 1.0% (95% CI) and a precision of 90.5 ± 0.8% (95% CI) in the lesion recognition task, which identifies the presence of gastric mucosal atrophic lesions in gastroscopy images. These results demonstrate that the proposed multitask patient-based gastroscopy image analysis method holds significant practical value for advancing computer-aided diagnosis systems for atrophic gastritis and enhancing the diagnostic accuracy and efficiency of AIG.
BibTeX
@article{cao2025multitask,
  author = {Yuqi Cao and Yining Zhao and Xin Jin and Jiayuan Zhang and G. Y. Zhang and Pingjie Huang and Guangxin Zhang and Yue-Hua Han},
  title = {{A Multitask Network for the Diagnosis of Autoimmune Gastritis}},
  journal = {Journal of Imaging},
  year = {2025},
  doi = {10.3390/jimaging11050154},
}
Figure