In this study, we identified two key genes associated with both AP and T2DM (SLPI and ARHGEF9) using several machine learning algorithms and developed a 2-gene diagnostic model. The gene discussed is ARHGEF9; the disease is alkaline phosphatase measurement.