The prevention of water inrush is of great significance to the work safety in coalmines. However, the existing prediction models for coalmine water inrush cannot achieve desirable speed, accuracy, or generalization ability, owing to the complexity and diversity of causes of this accident. Therefore, this paper develops an artificial intelligence (AI)based coalmine water inrush safety prediction model, making coalmine water inrush prediction more accurate, real-time, and robust. Firstly, the causes of coalmine water inrush were combed, and used to build a reasonable evaluation index system. Next, the extreme learning machine (ELM) was optimized with particle swarm optimization (PSO) algorithm and ant colony optimization (ACO) algorithm, and developed into a coalmine water inrush safety prediction model. The dimensionality reduction in subset classification was introduced in great details. Finally, the effectiveness of our model was proved through experiments. The research results provide the basis for the application of combinatory optimized learning machines in hazard prediction of other fields.