Applied Machine Learning to Anomaly Detection in Enterprise Purchase Processes: A Hybrid Approach Using Clustering and Isolation Forest
Antonio Herreros-Martínez, Rafael Magdalena‐Benedito, Joan Vila‐Francés, Antonio J. Serrano-López, Sonia Pérez-Dı́az, José-Javier Martínez-Herráiz
Abstract
In the era of increasing digitalisation, organisations face the critical challenge of detecting anomalies in large volumes of data, which may indicate suspicious activities. To address this challenge, audit engagements are conducted regularly, and internal auditors and purchasing specialists seek innovative methods to streamline these processes. This study introduces a methodology to prioritise the investigation of anomalies identified in two large real-world purchase datasets. The primary objective is to enhance the effectiveness of companies’ control efforts and improve the efficiency of anomaly detection tasks. The approach begins with a comprehensive exploratory data analysis, followed by the application of unsupervised machine learning techniques to identify anomalies. A univariate analysis is performed using the z-Score index and the DBSCAN algorithm, while multivariate analysis employs k-Means clustering and Isolation Forest algorithms. Additionally, the Silhouette index is used to evaluate the quality of the clustering, ensuring each method produces a prioritised list of candidate transactions for further review. To refine this process, an ensemble prioritisation framework is developed, integrating multiple methods. Furthermore, explainability tools such as SHAP are utilised to provide actionable insights and support specialists in interpreting the results. This methodology aims to empower organisations to detect anomalies more effectively and streamline the audit process.