Accurate measurement of coal gas permeability helps prevent coal gas safety accidents effectively. To predict permeability more accurately, we propose the IDBO-BPNN coal body gas permeability prediction model. This model combines the Improved Dung Beetle algorithm (IDBO) with the BP neural network (BPNN). First, the Sine chaotic mapping, Osprey optimization algorithm, and adaptive T-distribution dynamic selection strategy are integrated to enhance the DBO algorithm and improve its global search capability. Then, IDBO is utilized to optimize the weights and thresholds in BPNN to enhance its prediction accuracy and mitigate the risk of overfitting to some extent. Secondly, based on the influencing factors of gas permeability, effective stress, gas pressure, temperature, and compressive strength, they are chosen as the coupling indicators. The SPSS 27 software is used to analyze the correlation among the indicators using the Pearson correlation coefficient matrix. Additionally, the Kernel Principal Component Analysis (KPCA) is employed to extract the original data. Then, the original data is divided into principal component data for the model input. The prediction results of the IDBO-BPNN model are compared with those of the PSO-BPNN, PSO-LSSVM, PSO-SVM, MPA-BPNN, WOA-SVM, BES-SVM, and DPO-BPNN models. This comparison assesses the capability of KPCA to enhance the accuracy of model predictions and the performance of the IDBO-BPNN model. Finally, the IDBO-BPNN model is tested using data from a coal mine in Shanxi. The results indicate that the predicted outcome closely aligns with the actual value, confirming the reliability and stability of the model. Therefore, the IDBO-BPNN model is better suited for predicting coal gas permeability in academic research writing.