This paper introduces a geologically constrained convolutional neural network (CNN) for mineral prospectivity mapping (MPM) in western Henan Province, China. The authors address the limitations of purely data-driven deep learning algorithms (DLAs) by incorporating both soft and hard geological constraints. A penalty term based on the spatial coupling relationship between ore-controlling strata and gold deposits serves as a soft constraint, guiding the CNN model training. Additionally, domain knowledge related to mineralization processes and geochemical indicators are embedded as hard constraints in the feature extractor and classifier of the CNN. Comparative experiments demonstrate that the geologically constrained CNN outperforms other models, enhancing the rationality and interpretability of the results. The study highlights the effectiveness of integrating data and domain knowledge in MPM, which is crucial for improving the accuracy and reliability of mineral exploration.This paper introduces a geologically constrained convolutional neural network (CNN) for mineral prospectivity mapping (MPM) in western Henan Province, China. The authors address the limitations of purely data-driven deep learning algorithms (DLAs) by incorporating both soft and hard geological constraints. A penalty term based on the spatial coupling relationship between ore-controlling strata and gold deposits serves as a soft constraint, guiding the CNN model training. Additionally, domain knowledge related to mineralization processes and geochemical indicators are embedded as hard constraints in the feature extractor and classifier of the CNN. Comparative experiments demonstrate that the geologically constrained CNN outperforms other models, enhancing the rationality and interpretability of the results. The study highlights the effectiveness of integrating data and domain knowledge in MPM, which is crucial for improving the accuracy and reliability of mineral exploration.