Machine learning has been widely applied to predict the spatial or temporal likelihood of debris flows by leveraging its powerful capability to fit nonlinear features and uncover underlying patterns or rules in the complex formation mechanisms of debris flows. However, traditional approaches, including some current machine learning-based prediction models, still have limitations when used for debris flow prediction. These include the lack of a specific network structure or model to consider the updating of debris flow critical conditions in relation to geographical background conditions, limiting the universality of prediction models when transferring them to different places. In this study, this article proposes a deep learning network designed to predict the spatiotemporal probability of rainfall-induced debris flows, incorporating the Similarity Mechanism of Debris Flow Critical Conditions (SM-DFCC). The model comprehensively integrates the mining of rainfall-triggering features and couples them with geographical background features to fit the nonlinear relationship with debris flow formation. The model underwent training using data on various historical debris flows triggered by different storms across Liangshan Prefecture from 2020 to 2022. The results indicated that: (i) the method is effective in predicting the spatiotemporal likelihood of debris flows under catchment units, with accuracy scores (ACC) ranging from 0.724 to 0.835; (ii) after optimization using the AVOA algorithm, the predictive performance of the model significantly improved, with an increase of 27.24% in ACC scores for SVC and 8.81% for XGBoost; and (iii) factor importance analysis revealed that rainfall triggering factors have higher cumulative contribution rates when distinguishing between the occurrence and non-occurrence of debris flows. In addition, taking a rainfall storm on 06, September 2020 as a case, this research quantitatively revealed the pattern of debris flow formation, where high-frequency disaster areas exhibit lower rainfall thresholds of debris flows, represented by absolute energy (AE). Despite these findings, the accuracy and reliability of rainfall data still remain the most challenging obstacle in basin/regional-scale debris flow prediction when applying this method. The integration of multiple sources of rainfall data, including station data, satellite rainfall, radar rainfall, etc., is necessary to accurately quantify the impact of rainfall on debris flow formation when applying this method to debris flow monitoring and early warning tasks. Overall, this method shows great potential in providing a scientific reference for the construction of debris flow monitoring and early warning systems in the future.