In this study, we propose sparse auto-encoder combined with kernel for network attack detection for better network security. High-dimensional data seriously affects the accuracy and efficiency of network attack detection, leading to dimension disaster and model over fitting. To address this problem, we optimize the sparse auto-encoder with combined kernel to reconstruct the data features of network attack. Besides, we used the iterative method of adaptive genetic algorithm to optimize the objective function of sparse auto-encoder with combined kernel. The feature matrix after dimension reduction is obtained by sparse auto-encoder with combined kernel, which solves the dimensional reduction problem of nonlinear features and sparse features of network attack. The proposed model improves the efficiency of network attack detection. The simulation using experimental data based on botnet attack detection data set of the Internet of things(IOT) show that, compared with the traditional feature extraction algorithm and other deep learning feature extraction methods, the recognition rate based on sparse auto-encoder method with combined kernel for network attack detection can reach 98.68%, and the average dimension reduction time is 5.59 s, which depicts better recognition rate and computational efficiency.