Journal of Economic Geology

Journal of Economic Geology

Application of Deep Learning-Based Multi-Class Anomaly Detection in Geochemical Exploration with Bayesian Hyperparameter Tuning

Document Type : Research Article

Authors
1 Ph.D. candidate, Faculty of Mining, Isfahan University of Technology, Isfahan, Iran
2 Associate Professor, Faculty of Mining, Isfahan University of Technology, Isfahan, Iran
3 Professor, Faculty of Mining, Isfahan University of Technology, Isfahan, Iran
Abstract
In this study, 1,238 stream‑sediment samples from the Pariz and Chahargonbad areas of southwestern Kerman Province were analyzed to identify geochemical anomalies. The dataset was enhanced using principal component analysis (PCA), independent component analysis (ICA) and polynomial feature expansions, followed by normalization to capture both linear and non‑linear variability. Four anomaly–background separation models were evaluated: Isolation Forest, DBSCAN, Autoencoder and Variational Autoencoder (VAE). Model hyper‑parameters (e.g. the number of layers and neurons per layer) were tuned via Bayesian optimization in Python using the Optuna library. During tuning, the scoring metrics were reconstruction error for the Autoencoder; likelihood‑based reconstruction error for the VAE; the anomaly score for Isolation Forest; and the mean distance of each sample to the cluster core for DBSCAN. For spatial presentation, samples were assigned to upstream drainage basins, and each sample’s result was propagated to its upstream area; the outcomes were then compared with known mineralization points across the region. Systematic hyper‑parameter tuning improved the detection of geochemical signatures and highlighted zones with mineral potential. Comparative analysis showed that robust feature engineering combined with Bayesian optimization significantly enhances anomaly‑detection accuracy. These findings underscore the practical value of advanced machine‑learning techniques in geochemical exploration and provide a framework for more targeted field investigations in mineral‑rich regions.
 
Introduction
Efficient recognition of geochemical anomalies underpins mineral exploration and environmental assessment. Rising data dimensionality and nonlinearity challenge classical uni/ multivariate thresholds and geostatistics, motivating machine-learning (ML) and deep-learning (DL) approaches that capture complex, multi-element signals and integrate ancillary data [1]. Autoencoder-family models have proven effective for weak, multivariate anomalies using reconstruction-error criteria, and adversarial variants further enrich latent representations. Yet performance hinges on feature engineering and hyperparameter selection; prior work often relies on defaults or ad-hoc tuning. This study targets those gaps by: (i) expanding geochemical features (PCA, ICA, polynomial terms), (ii) optimizing IF, DBSCAN, AE and VAE via Bayesian search, and (iii) validating anomaly maps against known mineralization in a well-endowed metallogenic belt (Sarcheshmeh–Meydouk district).
 
Methodology and Approaches
Geological setting and data: The area lies within the Urumieh–Dokhtar magmatic arc, with Oligocene–Miocene calc-alkaline intrusions hosting world-class porphyry Cu deposits (e.g., Sarcheshmeh, Meydouk). A dataset of 1,238 stream-sediment samples was compiled for multi-element analysis.
Preprocessing and feature engineering: Outliers were screened (interquartile-range criteria), element values log-transformed and min-max normalized. Correlation structure and hierarchical clustering guided feature design. Five PCA and five ICA components were appended, and second-order polynomial terms were generated for Cu-correlated elements to capture nonlinear interactions
 
Models and objective functions
- Isolation Forest (IF): tuned (estimators, max_ samples, contamination) to maximize average decision-function score (higher = more normal), sharpening separation from anomalies
- DBSCAN: tuned (ε, min_samples, k) under a composite objective balancing outlier fraction and neighborhood-distance compactness to form geologically coherent clusters while isolating true outliers.
- AE (deep): encoder–decoder with monotonically contracting hidden sizes; Optuna minimized a composite of mean reconstruction error and its standard deviation to favor accurate and stable reconstructions
-VAE: latent Gaussian prior (μ, σ) trained with MSE reconstruction + β·KL divergence; layers, hidden width, latent size, batch size, and output activation were optimized for minimum validation loss
Bayesian optimization (Optuna) adaptively explored hyperparameter spaces, improving efficiency over grid/random search and providing consistent, data-specific configurations. Model scores were aggregated to catchment outlets (SCB) to generate anomaly probability classes for mapping and validation against 39 known mineralized points.
 
Results and Discussion
Optimized configurations and comparative performance
Bayesian tuning yielded clear performance gains across all detectors.
- Isolation Forest: high-anomaly area 21%, capturing 10/39 occurrences.
- DBSCAN: 47% area, 24/39 occurrences.
- Autoencoder (AE): 36% area, 24/39 occurrences -  the best balance of precision (compact footprint) and recall of known mineralization.
- Variational Autoencoder (VAE): 42% area, 24/39 occurrences.
Spatially, the AE geochemical anomaly map outlines coherent belts coincident with known porphyry systems and prospective intrusive centers. Feature augmentation (PCA+ICA+polynomial terms) consistently lifted signal-to-noise and stabilized training, especially for deep models.
Model-specific behavior.
 IF favored compact delineations but under-captured weak, diffuse halos. DBSCAN effectively separated dense background clusters from dispersed outliers but inflated high-anomaly areal extent at tuned ε/min_samples. AE/VAE reduced over-generalization while preserving mineralization hits; AE slightly outperformed VAE in footprint control under the chosen β and architecture
 
Conclusions
Robust feature engineering coupled with Bayesian hyperparameter optimization substantially improves unsupervised geochemical anomaly detection. 2) Among tested models, the Autoencoder provides the most favorable precision–recall trade-off for the Pariz–Chahargunbad dataset, capturing 24/39 known occurrences within a 36% high-anomaly footprint 3) VAE and DBSCAN achieve comparable recall but at larger footprints (42–47%), whereas Isolation Forest is conservative but misses a portion of known targets. 4) SCB-based spatial propagation yields interpretable maps aligned with drainage-mediated signal transport.
Keywords

Adankon, M.‌M., Dansereau, J. and Cheriet, F., 2012. Analysis of scoliosis trunk deformities using ica. 11th International Conference on Information Science, Signal Processing and Their Applications (ISSPA). https://doi.org/10.1109/isspa.2012.6310543
Andriyani, F. and Puspitarani, Y., 2022. Performance comparison of k-means and dbscan algorithms for text clustering product reviews. SinkrOn, 6(3): 944–949. https://doi.org/10.33395/sinkron.v7i3.11569   
Berberian, M. and King, G.‌C.‌P., 1981. Towards a paleogeography and tectonic evolution of Iran. Canadian Journal of Earth Sciences, 18(2): 210–265. https://doi.org/10.1139/e81-019
Bulut, O., Gorgun, G. and He, S., 2024. Unsupervised anomaly detection in sequential process data. Zeitschrift Für Psychologie, 232(2): 74–94. https://doi.org/10.1027/2151-2604/a000558
Chen, L., Guan, Q., Feng, B., Yue, H., Wang, J. and Zhang, F., 2019a. A multi-convolutional autoencoder approach to multivariate geochemical anomaly recognition. Minerals, 9(5): 270. https://doi.org/10.3390/min9050270
Chen, L., Guan, Q., Xiong, Y., Liang, J., Wang, Y. and Xu, Y., 2019b. A spatially constrained multi-autoencoder approach for multivariate geochemical anomaly recognition. Computers & Geosciences, 125: 43–54. https://doi.org/10.1016/j.cageo.2019.01.016
Chen, J. and Okle, R.‌A.‌N., 2024. A study on the application of response surface methodology and bayesian optimization in parameter tuning of genetic algorithms. Fourth International Conference on Applied Mathematics, Modelling, and Intelligent Computing (CAMMIC 2024), Kaifeng, China. https://doi.org/10.1117/12.3036921
Ester, M., Kriegel, H., Sander, J. and Xu, X., 1996. A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. 2nd International Conference on Knowledge Discovery and Data Mining. Retrieved from July 19, 2025 from https://www.dbs.ifi.lmu.de/Publikationen/Papers/KDD-96.final.frame.pdf
Farhadi, S., Tatullo, S., Boveiri Konari, M. and Afzal, P., 2024. Evaluating StackingC and ensemble models for enhanced lithological classification in geological mapping. Journal of Geochemical Exploration, 260: 107441 https://doi.org/10.1016/j.gexplo.2024.107441
Feng, B., Chen, L. and Xu, Y., 2022. Comparative study on three autoencoder‐based deep learning algorithms for geochemical anomaly identification. Earth and Space Science, 9(11). https://doi.org/10.1029/2022ea002626
Ghawi, R. and Pfeffer, J., 2019. Efficient hyperparameter tuning with grid search for text categorization using knn approach with bm25 similarity. Open Computer Science, 9(1): 160-180. https://doi.org/10.1515/comp-2019-0011
Hariri, S., Kind, M.‌C. and Brunner, R., 2021. Extended isolation forest. IEEE Transactions on Knowledge and Data Engineering, 33(4): 1479–1489. https://doi.org/10.1109/tkde.2019.2947676
Hezarkhani, A., 2006. Petrology of the intrusive rocks within the Sungun Porphyry Copper Deposit, Azerbaijan, Iran. Journal of Asian Earth Sciences, 27(3): 326–340. https://doi.org/10.1016/j.jseaes.2005.04.005
Horrocks, T., 2019. Integrated analysis of geological, geophysical, and geochemical data of the kevitsa ni-cu-pge deposit: machine learning approaches. Ph.D. Thesis, The University of western Australia, Crawley, Western Australia, Australia,180 pp. https://doi.org/10.26182/5c5ba16237b57
Iwamori, H., Yoshida, K., Nakamura, H., Kuwatani, T., Hamada, M., Haraguchi, S., and Ueki, K., 2017. Classification of geochemical data based on multivariate statistical analyses: complementary roles of cluster, principal component, and independent component analyses. Geochemistry, Geophysics, Geosystems, 18(3): 994–1012. https://doi.org/10.1002/2016gc006663
Jin, Z., Risk, B.‌B. and Matteson, D.‌S., 2019. Optimization and testing in linear non‐gaussian component analysis. Statistical Analysis and Data Mining: The ASA Data Science Journal, 12(3): 141–156. https://doi.org/10.1002/sam.11403
Kingma, D.‌P. and Welling, M., 2013. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114. https://doi.org/10.48550/arXiv.1312.6114
Li, H., Correa, N.‌M., Rodríguez, P. and Calhoun, V.‌D., 2011. Application of independent component analysis with adaptive density model to complex-valued fmri data. IEEE Transactions on Biomedical Engineering, 58(10): 2794–2803. https://doi.org/10.1109/tbme.2011.2159841
Li, L., Jamieson, K.G., DeSalvo, G., Rostamizadeh, A. and Talwalkar, A., 2016. Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization. Journal of Machine Learning Research 18(2018): 1–52. https://doi.org/10.48550/arxiv.1603.06560
Li, H., Li, X., Yuan, F., Jowitt, S.‌M., Zhang, M., Zhou, J., Zhou, T., Li, X., Ge, C. and Wu, B., 2020. Convolutional neural network and transfer learning based mineral prospectivity modeling for geochemical exploration of au mineralization within the guandian–zhangbaling area, anhui province, china. Applied Geochemistry, 122: 104747. https://doi.org/10.1016/j.apgeochem.2020.104747
Luo, Z., Xiong, Y. and Zuo, R., 2020. Recognition of geochemical anomalies using a deep variational autoencoder network. Applied Geochemistry, 122: 104710. https://doi.org/10.1016/j.apgeochem.2020.104710     
Luo, Z., Zuo, R., Xiong, Y. and Wang, X., 2021. Detection of geochemical anomalies related to mineralization using the ganomaly network. Applied Geochemistry, 131: 105043. https://doi.org/10.1016/j.apgeochem.2021.105043
Pourgholam, M.M., Adib, A., Afzal, P., Rahbar, K. and Gholinejad, M., 2025. Deep learning and fractal-wavelet techniques for magnetite-apatite exploration in Tarom Iran. Scientific Reports 15‌(1): 31907. https://doi.org/10.1038/s41598-025-16040-2
Praveena, S.‌M., Kwan, O.‌W. and Aris, A.‌Z., 2011. Effect of data pre-treatment procedures on principal component analysis: a case study for mangrove surface sediment datasets. Environmental Monitoring and Assessment, 184(11): 6855–6868. https://doi.org/10.1007/s10661-011-2463-2
Rezende, D., Mohamed, S. and Wierstra, D., 2014. Stochastic Back-propagation and Variational Inference in Deep Latent Gaussian Models. ArXiv,abs/1401.4082. https://doi.org/10.48550/arxiv.1401.4082
Richards, J.‌P., 2003. Tectono-magmatic precursors for porphyry Cu-(Mo-Au) deposit formation. Economic Geology, 98(8): 1515–1533. https://doi.org/10.2113/gsecongeo.98.8.1515
Rijn, J.‌N.‌v. and Hutter, F., 2018. Hyperparameter importance across datasets. Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2367-2376. https://doi.org/10.1145/3219819.3220058
Sarikhani, P., Ferleger, B.‌I., Mitchell, K.‌T., Ostrem, J.‌L., Herron, J.‌A., Mahmoudi, B. and Miocinovic, S., 2022. Automated deep brain stimulation programming with safety constraints for tremor suppression in patients with parkinson’s disease and essential tremor. Journal of Neural Engineering, 19(4): 046042. https://doi.org/10.1088/1741-2552/ac86a2
Snoek, J., Larochelle, H. and Adams, R.P., 2012. Practical Bayesian Optimization of Machine Learning Algorithms. Neural Information Processing Systems. https://doi.org/10.48550/arxiv.1206.2944
Taghipour, N., Aftabi, A. and Mathur, R., 2008. Geology and Re-Os geochronology of mineralization of the miduk porphyry copper deposit, Iran. Resource Geology, 58(2): 143–160. https://doi.org/10.1111/j.1751-3928.2008.00054.x
Thavasimani, K. and Srinath, N.‌K., 2022. Hyperparameter optimization using custom genetic algorithm for classification of benign and malicious traffic on internet of things–23 dataset. International Journal of Electrical and Computer Engineering (IJECE), 12(4): 4031. https://doi.org/10.11591/ijece.v12i4.pp4031-4041
Thu, T.‌N.‌T. and Armitage, G., 2008. A survey of techniques for internet traffic classification using machine learning. IEEE Communications Surveys & Tutorials, 10(4): 56–76. https://doi.org/10.1109/surv.2008.080406
Ueki, K., Hino, H. and Kuwatani, T., 2018. Geochemical discrimination and characteristics of magmatic tectonic settings: a machine‐learning‐based approach. Geochemistry, Geophysics, Geosystems, 19(4): 1327–1347. https://doi.org/10.1029/2017gc007401
Verma, S.‌P., 1997. Sixteen statistical tests for outlier detection and rejection in evaluation of international geochemical reference materials: example of microgabbro pm‐s. Geostandards Newsletter, 21(1): 59–75. https://doi.org/10.1111/j.1751-908x.1997.tb00532.x
Wein, S., Tomé, A.‌M., Goldhacker, M., Greenlee, M.‌W. and Lang, E., 2020. A constrained ica-emd model for group level fmri analysis. Frontiers in Neuroscience, 14. https://doi.org/10.3389/fnins.2020.00221
Xiong, Y. and Zuo, R., 2016. Recognition of geochemical anomalies using a deep autoencoder network. Computers & Geosciences, 86: 75–82. https://doi.org/10.1016/j.cageo.2015.10.006
Xiong, Y. and Zuo, R., 2020. Recognizing multivariate geochemical anomalies for mineral exploration by combining deep learning and one-class support vector machine. Computers & Geosciences, 140: 104484. https://doi.org/10.1016/j.cageo.2020.104484
Yang, N., Zhang, Z., Yang, J., Hong, Z. and Shi, J., 2021. A convolutional neural network of googlenet applied in mineral prospectivity prediction based on multi-source geoinformation. Natural Resources Research, 30(6): 3905–3923. https://doi.org/10.1007/s11053-021-09934-1
Yasukawa, K., Nakamura, K., Fujinaga, K., Iwamori, H. and Kato, Y., 2016. Tracking the spatiotemporal variations of statistically independent components involving enrichment of rare-earth elements in deep-sea sediments. Scientific Reports, 6: 29603. https://doi.org/10.1038/srep29603
Zhang, S., Carranza, E.‌J.‌M., Fu, C., Wen-zhi, Z. and Xiang, Q., 2024. Interpretable machine learning for geochemical anomaly delineation in the yuanbo nang district, gansu province, china. Minerals, 14(5): 500. https://doi.org/10.3390/min14050500
Zhang, S., Xiao, K., Carranza, E.J.M., Yang, F. and Zhao, Z., 2019. Integration of auto-encoder network with density-based spatial clustering for geochemical anomaly detection for mineral exploration. Computers & Geosciences, 130: 43–56. https://doi.org/10.1016/j.cageo.2019.05.011
Zhang, C. and Zuo, R., 2021. Recognition of multivariate geochemical anomalies associated with mineralization using an improved generative adversarial network. Ore Geology Reviews, 136: 104264. https://doi.org/10.1016/j.oregeorev.2021.104264
Zhang, C. and Zuo, R., 2024. Incorporating geological knowledge into deep learning to enhance geochemical anomaly identification related to mineralization and interpretability. Mathematical Geosciences, 56(6): 1233–1254. https://doi.org/10.1007/s11004-023-10133-2
 Zuo, R., 2011. Identifying geochemical anomalies associated with cu and pb–zn skarn mineralization using principal component analysis and spectrum–area fractal modeling in the gangdese belt, tibet (china). Journal of Geochemical Exploration, 111(1–2): 13–22. https://doi.org/10.1016/j.gexplo.2011.06.012
Send comment about this article
Enter Name.
Enter a valid email address.
Enter a vaid affiliation.
Enter comments (At leaset 10 words)
CAPTCHA Image
Enter Security Code Correctly.

  • Receive Date 29 August 2025
  • Revise Date 15 December 2025
  • Accept Date 17 December 2025