The five key differentially expressed ARGs (DE-ARGs) were screened through machine learning analysis, including ANKRD13C, PIK3R1, BSG, CEACAM6, and BRMS1; these DE-ARGs emerged as potential biomarkers for epilepsy and were involved in various signaling pathways and immune cell activities, and results were further experimentally validated. This evidence concerns the gene BSG and epilepsy.