Through machine learning, we identified six immune escape‐associated genes (TAP1, IRF1, TAP2, FAS, SOCS1 and CHMP5) as highly effective biomarkers for TB diagnosis, demonstrating good diagnostic capability across independent datasets. Here, FAS is linked to tuberculosis.