The WGCNA algorithm identified 360 genes related to GM, and a risk score was constructed based on nine characteristic genes (ATP13A4, PIK3C2A, CD164, PHF1, CES2, PDGFB, LCOR, TMEM30A, and PLXNA1) identified through multiple machine learning algorithms displayed reliable diagnostic efficacy for AD onset. This evidence concerns the gene CES2 and Alzheimer disease.