The analysis of multidimensional geochemical indicators presents a significant challenge in oil and gas exploration. Traditional multivariate statistical methods, such as Principal Component Analysis (PCA), are often limited by linear assumptions and offer insufficient interpretability. To address these limitations, this study proposes an integrated framework combining Sparse Principal Component Analysis (SPCA), Random Forest (RF), and a Deep Autoencoder Network (DAN) for identifying hydrocarbon-related geochemical anomalies. The methodology is applied to data from the Jiulongjiang and Jinjiang Depressions in the Taiwan Strait Basin. SPCA was first employed on 24 geochemical indicators, extracting the six most significant sparse principal components, which collectively explain 82.63% of the total variance. The first two components (SPC1 and SPC2) showed the highest contributions, demonstrating SPCA's effectiveness in key variable selection and enhanced geological interpretability. Subsequently, an RF model achieved 84.38% accuracy in classification tasks, with feature importance analysis identifying SPC1, SPC5, and SPC6 as the most influential variables for anomaly detection. Finally, using the SPCA-reduced data, the DAN model detected geochemical anomalies with an AUC of 0.9185 and an accuracy of 91.85%, highlighting its superior performance. This integrated approach effectively leverages the sparse representation of SPCA, the ensemble learning of RF, and the deep feature learning of DAN, providing a robust solution for identifying geochemical anomalies in complex geological settings. Beyond hydrocarbon exploration, the framework also offers a novel methodology for screening potential CO
2 geological storage sites, as the detected anomalies reflect favorable reservoir-seal systems, which are equally critical for effective carbon sequestration.