Machine learning identified 15 and 23 key feature genes for H. pylori and AF, respectively, with S100A8 emerging as a shared diagnostic biomarker. Here, S100A8 is linked to atrial fibrillation.