ObjectivesThis study was anchored on the state of local immune-infiltration in the endometrium, which acts as critical factors affecting embryonic implantation, and aimed at establishing novel approaches to assess endometrial receptivity for patients with IVF failure.MethodsImmune-infiltration levels in the GSE58144 dataset (n=115) from GEO were analyzed by digital deconvolution and validated by immunofluorescence (n=30), illustrating that dysregulation of the ratio of Mf1 to Mf2 is an important factor contributing to implantation failure. Then, modules most associated with M1/M2 macrophages (Mfs) and their hub genes were then selected by weighted gene co-expression network and univariate analyses, then validated by GSE5099 macrophage dataset, qPCR analysis (n=16), and western blot. It revealed that closely related gene modules dominated three biological processes in macrophages: antigen presentation, interleukin−1−mediated signalling pathway, and phagosome acidification, respectively. Their hub genes were significantly altered in patients and related with ribosomal, lysosome, and proteasomal pathways. Finally, the artificial neural network (ANN) and nomogram models were established from hub genes, of which efficacy was compared and validated in the GSE165004 dataset (n=72). Models established by the selected hub genes exhibited excellent predictive values in both datasets, and ANN performed best with an accuracy of 98.3% and an AUC of 0.975 (95% CI 0.945-1). ConclusionsMacrophages, proven to be essential for endometrial receptivity, were regulated by gene modules dominating antigen presentation, interleukin−1−mediated signalling pathway, and phagosome acidification. Selected hub genes can effectively assess endometrial dysfunction receptivity for IVF outcomes by the ANN approach.