## 1 Introduction
By compressing the data into this latent space, the model decreases the dimensionality, retaining the most informative features and effectively abstracting the underlying patterns that indicate liquefaction risk. Then, the autoencoder's latent representations are fed through the stacked classifier model: an ensemble of two basic models' outputs, an MLP classifier, and an XGB classifier. The MLP classifier represents a neural network-based model that can learn subtler nonlinear correlations among features. The XGB classifier is a gradient-boosted machine that has proven robust for dealing with imbalanced datasets. It provides the final prediction by intelligently incorporating, with the help of a meta-model, the outputs of several base classifiers, thereby allowing the model to pay a lot of attention to rare liquefaction events while overfitting for more typical soil conditions is kept in check. This approach is particularly suited to the problems of the Rif region, where standard geophysical data could be sparse or uneven. Unlike relying solely on the extensive normal data, focusing on those rare abnormal events, this approach enhances liquefaction-prone location detection. By incorporating multiple learning algorithms, the model is more adaptable to various geographic conditions and could be applied to similar seismic zones, breaking the limits set by earlier models. Initial tests of the proposed model in the Rif region were promising. The autoencoder learned intricate patterns within geophysical features that are not easily interpretable using the more standard analysis techniques. The stacked classifier, especially when combined with an MLP classifier [29] and XGB classifier [30], enhances this model's power in identifying liquefaction events from this imbalanced dataset by achieving better classification accuracy and a reduction in the number of false negatives. Despite the satisfactory performance of the model for the Rif-area dataset, its generalization capacity needs to be evaluated against other locations exhibiting seismic events under varying geological circumstances. More validation with diverse types of datasets will add strength to this model and adaptability to different approaches for liquefaction identification in varying geophysical contexts. The key contributions of this paper are outlined as follows:  
* Feature Extraction with an Autoencoder: An encoder has used ReLU activations to compress complex microtremor data and give more amplitude to the subtle pattern related to liquefaction. * Robust Learning with Regularization: Batch normalization ascertains that the model will not overfit features, focusing only on the rare signal of liquefaction. * Latent Space Embeddings: Critical indirect factors of liquefaction are caught by a latent 16-dimensional space, showing inner patterns of data. * Stacked Classifier Ensemble: A stacked classified enseble combines the complex relationships identified by MLPwith the handling of class imbalance treated using XGBoost to make sure that the diversity within the data is reflected. * Intelligent Meta-Model Aggregation: The final meta-model of MLP refines base model outputs, providing high priority to the rare events of liquefaction that may be missed in the individual models. * Bias Mitigation by Representation Learning: The strengths of an autoencoder with embeddings and a stacked classifier are combined to avoid biases in concentrated datasets to represent liquefaction occurrence for rare data distributions. This paper proposes a model that capitalizes on the advantages of autoencoders and stacked classifiers, boosting detection for such rare liquefaction events, even in the most hazardous seismic area of the Rif region of Morocco. Therefore, the proposed model is a potential tool for geophysical risk assessment and preparedness, offering an alternative to traditional approaches.