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. This evidence concerns the gene CHMP5 and tuberculosis.