# Rapid diagnosis of Helicobacter pylori infection status based on endoscopic features and deep learning algorithms

**Authors:** Xinying Yu, Lianyu Li, Qiang He

PMC · DOI: 10.3389/fpubh.2026.1765267 · Frontiers in Public Health · 2026-02-04

## TL;DR

This study uses deep learning to accurately classify Helicobacter pylori infection status using endoscopic features, improving diagnostic reliability.

## Contribution

A novel 1D-transformer model is introduced for classifying Helicobacter pylori infection status with high accuracy and interpretability.

## Key findings

- The 1D-transformer model achieved 98.9% accuracy in classifying Helicobacter pylori infection status.
- Key endoscopic features like map redness and diffuse redness were identified as important for model decisions.
- The model outperformed other algorithms in specificity, sensitivity, and F1 scores.

## Abstract

Endoscopic visualization for the diagnosis of Helicobacter pylori (HP) infection status is highly important for helping endoscopists quickly understand the status of gastric background mucosa and assisting in subsequent diagnosis and treatment. In this study, a deep learning algorithm was designed to construct a three-class classification model of HP infection status, providing a new approach to address the subjectivity in the interpretation of endoscopic features.

The clinical data of patients who completed gastroscopy were collected, and 16 endoscopic features were evaluated and recorded. On the basis of the status of HP infection, the patients were classified into three groups: the current HP infection group (CI), the previous HP infection group (PI), and the negative HP infection group (NI), with 1,000 patients screened in each group. In this study, an HP infection classification model based on the transformer network was constructed, which uses a self-attention mechanism to capture feature associations for the task of HP infection classification and recognition. Model interpretability was achieved by screening key features through SHapley Additive exPlanations (SHAP) value analysis.

A total of 3,000 subjects were included in the study, and comparative analysis revealed that the 1D-transformer model demonstrated superior performance in the HP recognition task. The accuracy, specificity, sensitivity, and F1_scores produced by the model were 98.9 ± 0.28, 98.8 ± 0.14, 99.4 ± 0.27, and 98.9 ± 0.28, respectively. In addition, it has better performance than other algorithms and models. In terms of model interpretability, this study highlights the importance rankings of different features in model decision-making and the directions of their influence. The results show that map redness (SHAP value of 0.220), xanxoma (SHAP value of 0.101), atrophy (SHAP value of 0.065), and intestinal metaplasia (SHAP value of 0.008) are key features for identifying the PI. Diffuse redness (SHAP 0.186), thickened folds (SHAP 0.126), mucus coverage (SHAP 0.094), and nodular changes (SHAP 0.043) are key features for identifying CI. The presence of RAC (SHAP 0.262) and ridge redness (SHAP 0.026) are key features for identifying NI.

This study applies a 1D-transformer model to the task of classifying HP infection status, and compared with other models, it can precisely screen out populations with three different HP infection statuses, with higher performance and reliability.

## Full-text entities

- **Genes:** SHROOM4 (shroom family member 4) [NCBI Gene 57477] {aka MRXSSDS, SHAP, shrm4}
- **Diseases:** intestinal metaplasia (MESH:D007410), Gastritis (MESH:D005756), signet ring cell carcinoma (MESH:D018279), infectious diseases (MESH:D003141), RAC (MESH:D002292), hyperplastic polyps (MESH:D011127), RD (MESH:D003866), gastric mucosal atrophy (MESH:D013272), lymphoma (MESH:D008223), peptic ulcer (MESH:D010437), infected (MESH:D007239), familial adenomatous polyposis (MESH:D011125), metaplasia (MESH:D008679), Gastric cancer (MESH:D013274), Differentiated cancers (MESH:D009369), fundus adenocarcinoma (MESH:D000230), atrophy (MESH:D001284), inflammatory (MESH:D007249), atrophic gastritis (MESH:D005757), dysplasia (MESH:D015792), pain (MESH:D010146), H. pylori infection (MESH:D016481), chronic superficial gastritis (MESH:D006259)
- **Chemicals:** formalin (MESH:D005557), paraffin (MESH:D010232)
- **Species:** Gallus gallus (bantam, species) [taxon 9031], Bacteria Latreille et al. 1825 (Bacteria stick insect, genus) [taxon 629395], Helicobacter pylori (species) [taxon 210], Homo sapiens (human, species) [taxon 9606], Hepacivirus P (species) [taxon 2202225]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12913523/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12913523/full.md

## References

25 references — full list in the complete paper: https://tomesphere.com/paper/PMC12913523/full.md

---
Source: https://tomesphere.com/paper/PMC12913523