In a recent publication in the journal Electronics, researchers proposed a machine learning time series prediction system for business purchases that integrates neural networks and explainable artificial intelligence (XAI).
Background
The Industry 4.0 paradigm seeks to automate business processes and reduce human involvement wherever possible. Integrating artificial intelligence (AI) is a crucial aspect of this ongoing evolution. AI systems play various roles, including offering recommendations, categorizing objects, and making predictions. The effectiveness of these systems is measured through task-specific metrics. However, in sensitive domains like medicine and the military, trust in AI systems is essential for practical adoption.
Many AI systems operate as black boxes, making it challenging to establish trust. XAI emerges as a solution to this problem by providing transparency and enabling users to understand AI decisions. The core objective of XAI is to elucidate the reasoning behind AI model outputs, empowering users to evaluate and make informed judgments. Integrating XAI aligns with the industry 5.0 paradigm, where human experts collaborate with automated systems to ensure that domain experts have confidence in AI system decisions.
In a business context, predicting future purchases and their details serves various purposes, including product procurement planning, personalized advertising, and identifying lost customers. This research hypothesizes that purchase prediction can be effectively addressed using machine learning and XAI.
To achieve this, researchers proposed a machine learning technique for an explainable purchase prediction system. This technique is further implemented for a business purchase prediction scenario in a medical drug company and assessed across multiple phases.
In XAI, most literature focuses on classification problems, particularly image and text classification. However, there is a growing interest in XAI for regression. Shapley additive explanations (SHAP) are recommended for regression tasks, highlighting the need for tailored XAI approaches.
A comprehensive meta-survey on XAI identifies key challenges, emphasizing the role of explainability in fostering trust in AI, the trade-off between interpretability and performance, and the importance of conveying model uncertainties. XAI is crucial for transparency in domains such as safety-critical applications.
Explainable purchase prediction system
The proposed architecture for an explainable purchase prediction system is designed for business applications. This system takes raw input data from the purchase transaction database, typically in the form of purchasing transactions, including customer identification, product details, transaction time, quantities, and prices. Customer and product attributes such as location, age, and categories are also considered.
The data undergoes preprocessing in the data processing module. The resulting features are then sent to the prediction module. The output from the prediction module feeds into the explainability module. This module is partially integrated with the prediction module, as the neural networks are used to generate explanations for predictions.
Explanations often take the form of diagrams that interpret the predictions made by the model. The combined predictions and explanations constitute the system's output, which is presented to the human user, typically a domain expert.
The user leverages the system's output to make business decisions and take appropriate actions. Explanations alongside predictions enable the user to critically assess the predictions and understand the underlying logic. The domain expert can decide whether to accept the system's recommendations or rely on their expertise.
Experiments and results
The experiments progressed through three phases, each providing valuable insights. In the initial phase, three neural networks for purchase time prediction were assessed with tanh and relu activation functions. The evaluation employed regression metrics such as mean absolute error (MAE) and root mean square error (RMSE) drawing on data from a medical device and drug vendor containing approximately 7.5 million transactions. Preprocessing involved anonymization, feature transformation, and derived feature calculation.
Experiment results reveal that more complex neural networks with additional input features generally yield better prediction accuracy, regardless of the activation function. Univariate long-short-term memory neural networks (LSTM) perform similarly with both activation functions.
The multivariate LSTM network, equipped with relu activation, proves to be the top performer and is selected as the final implementation for the business purchase prediction based on the XAI and LSTM neural networks (BPPXL) systems. The second phase shifts the problem to purchase time prediction as a classification task, defining one week. Classification metrics such as accuracy, recall, and precision are applied.
The results suggested that univariate LSTM with tanh activation slightly outperforms pseudo-multivariate and multivariate LSTM. However, activation function choice has a minimal impact on the classification approach. The third phase introduces the explainability module to the neural networks for purchase time prediction.
Various plot types, including force plots, decision plots, dependence plots, and embedding plots, are generated for single and multiple instances. These plots enhance understanding of feature contributions and interactions, providing valuable insights for model interpretation.
In the univariate LSTM, features related to past purchases were evaluated in SHAP plots. In the pseudo-multivariate LSTM, additional features gained significance, while the multivariate LSTM retained the importance of common features. The explainability plots contribute to a more transparent and interpretable understanding of the model's decision-making process.
Conclusion
In summary, researchers introduced an architecture for a machine learning time series prediction system utilizing LSTM neural networks and explainable artificial intelligence (XAI) techniques. The system focuses on predicting the day and product categories for future business purchases using financial transaction data. The integration of LSTM networks enhances prediction accuracy, while XAI ensures transparency for users, fostering trust. Future work could involve implementing a validation module to enhance system optimization.
Journal reference:
Predić B, Ćirić M, and Stoimenov L. (2023). Business Purchase Prediction Based on XAI and LSTM Neural Networks. Electronics. 12(21):4510. DOI: https://doi.org/10.3390/electronics12214510, https://www.mdpi.com/2079-9292/12/21/4510