In this section, the step-by-step working of the proposed model is presented, and a pictorial overview is depicted in Fig. 4.

A pictorial representation of the proposed federated machine learning-based backorder prediction system for enhancing supply chain efficiency.
Federated machine learning for backorder prediction
Federated Learning (FL) is a jointly decentralized privacy-preserving system designed to address the challenges of data privacy and security26. In the context of backorder prediction, it is helpful when the company has multi-stakeholder collaborations, and each stakeholder maintains their own data. The proposed approach preserves data confidentiality and privacy while lowering the transfer costs generally associated with centralizing data for training. In this work, we propose a federated learning-based ML model that distributes backorder data among multiple clients. Each client trains its own Multi-Layer Perceptron (MLP) model on local data. To address data imbalance at the client level, we apply SMOTE oversampling individually on each client node. More formally, let there be \(N\) different backorder data holders \(\{{H}_{1}, {H}_{2}, {H}_{3}, \cdots , {H}_{n}\},\) each possessing its own local dataset \(\{{D}_{1}, {D}_{2}, {D}_{3}, \cdots , {D}_{n}\}.\) In a traditional machine learning setup, a centralized model is trained on the union of all datasets:
$$M \, _{final} = \, Train(D_{1} \cup \, D_{2} \cup \ldots \cup \, D_{n} )$$
(1)
In contrast, our proposed federated learning approach enables each client to collaboratively train a shared model \({M}_{FED}\) without sharing raw data. Instead, only model updates are communicated:
$$M_{FED} \, = \, FederatedTrain(\{ D_{1} ,D_{2} , \ldots ,D_{n} \} ),such \, that \, D_{i} \notin \, Global \, Server \, \forall \, i \, \in \, \{ 1,2, \ldots ,N\}$$
(2)
where \({M}_{FED}\) is the federated learning model.
Data oversampling and under sampling
The data on backorders is distributed across different devices. Where, in the context of the supply chain system, it can be the data of different stakeholders. Now, data imbalance is one of the major issues hindering performance. Data oversampling and undersampling are two of the popular techniques to address the class imbalance problem. However, excessive oversampling will lead to overfitting, and excessive under-sampling can eliminate essential information from the dataset56. Hence, in this research, we first undersampled the majority class samples and then oversampled the minority class. Under-sampling is done using the near-miss method57. In this method, the majority class instances (i.e., non-backorder) are selected based on their average distance to their nearest neighbors from the minority class. For instance, let \({x}_{i}\) be a sample from the majority class, and let \({\mathcal{N}}_{k}({x}_{i})\) represent its \(k\) nearest neighbors from the minority class. The average distance is given by:
$${d}_{avg}\left({x}_{i}\right)=\frac{1}{k}\sum_{{x}_{j}\in {\mathcal{N}}_{k}\left({x}_{i}\right)}{\Vert {x}_{i}-{x}_{j}\Vert }_{2}$$
(3)
The majority of class instances with the smallest \({d}_{avg}\) values are retained for training. Similarly, one of the most prominent data oversampling approaches is the Synthetic Minority Oversampling Technique (SMOTE)58. In this method, the data of a class having a smaller number of samples is oversampled. It employs the concept of k-nearest neighbors to generate synthetic samples in the direction of nearest neighbors. This method perfectly compels the decision boundaries of a class having a smaller number of samples to become more general. Mathematically, for a given minority class \({x}_{i}\), one of its k-nearest neighbors \({x}_{nn}\) is randomly selected. A new synthetic sample \({x}_{new}\) is generated as follows:
$${x}_{new}={x}_{i}+\lambda .({x}_{nn}-{x}_{i})$$
(4)
where \(\lambda \in [\text{0,1}]\) is a random number. The number of synthetic samples generated depends on the oversampling ratio, which is determined by the number of nearest neighbors \(k\) and the desired balance between classes. This strategy broadens the decision boundary of the minority class and enhances the model’s ability to discriminate between backorder and non-backorder classes.
Proposed decentralized single-layer neural networks
The straightforward form of artificial neural networks is referred to as ANNs. These neural networks are known as computational models that are designed to mimic the human mind to perform complex operations, including both classification tasks and regression tasks. When they are trained on large data sources, they are able to learn relationships among input and output attributes. Similar to the human brain, where neurons are interconnected, neural networks consist of hidden units, also known as neurons, that are linked together through parameters called weights. The nodes at the input layer receive input from the environment, and nodes in the middle layers can take input from nodes present in preceding layers. Machines are programmed to function similarly to artificial neural networks combined with human brain cells. The interruption of one or more ANN hidden units or neurons does not prevent the underlying model from producing a result, and this property gives the model a fault-tolerance property.
One of the most important characteristics of ANNs is to learn complex patterns from data without explicitly defined rules. ANNs and their advanced variants, such as multi-layer neural networks, recurrent neural networks, and convolutional neural networks, are widely employed in a variety of applications. In this research, an SLP (Single-layer neural) network is proposed, comprising only one input and one output layer. The total number of hidden units or neurons in the input layer of SLP is equal to the total number of features present in the backorder dataset.
More precisely, the SLP takes an input vector of backorder dataset features comprising “sku”, “national_inv”, “lead_time”, “in_transit_qty”, “forecast_x_month,” “sales_x_month”, “min_bank”, “potential_issue”, “pieces_past_due”, “perf_x_months_avg”, “local_bo_qty”, “ × 17- × 22”, “deck risk”, “oe constraint”, “ppap risk”, “stop auto buy”, and “rev stop” represented as \(x=\left({x}_{i1},{x}_{i2},{x}_{i3},\dots \dots .{x}_{in}\right)\).
Every \({x}_{in}\) is given as input to each hidden unit present in the input layer. In the following step, the outcome of these units from 1 to \(n\) is calculated by employing the following equation:
$$\left({u}_{1}=\left(\sum i{w}_{i}{x}_{i}+b\right), {u}_{2}=\left(\sum i{w}_{i}{x}_{i}+b\right)\dots \dots \dots .{u}_{n}\left(\sum i{w}_{i}{x}_{i}+b\right)\right)$$
(5)
In the above Eq. (5) \({u}_{1}\)…\({u}_{n}\) is the total number of units that are present at the input layer of the ANN, where \({w}_{i}\) are the weights associated with linking input neurons and output neurons. More precisely, each input feature of the backorder dataset, denoted as \({x}_{i}\) is multiplied by its corresponding weights. These weights represent the significance of each connection between input and output neurons. Within a Single-Layer Perceptron (SLP), the weighted inputs are summed, and if the result equals zero, an additional parameter called bias is introduced to shift the output and prevent it from being zero. This process is illustrated in Eq. (5). Moreover, the proposed SLP starts learning by updating weights to their optimal values, and this procedure is repeatedly performed, followed by computing the model error. This method is repeated multiple times or for a defined number of iterations until a model has the lowest possible error.
Proposed decentralized multi-layer neural networks
A Multi-Layer Neural Network is one of the prominent examples of artificial neural networks, also referred to as a fully connected neural network and a Multi-Layer Perceptron. It is made up of numerous layers of artificial neurons, with each neuron in a particular layer connected to all neurons in the next, enabling sophisticated, nonlinear data processing. The difference between single-layer neural networks and multi-layer neural networks is the number of hidden layers present between the input and output layers. On each layer, the number of hidden units is known as neurons having non-linear activation functions.
In this paper, the proposed MLP has a total of three layers with hidden units of 8, 4, and 2. The non-linear activation function on each layer is ReLu. The ReLu performs better than the logistic sigmoid function and hyperbolic “tanh” activation. While making the algorithm converge faster towards optimum weights, the ReLU also addresses the problem of vanishing gradients. The following Eq. (6) is the mathematical form of ReLu59.
$$ReLu\left(x\right)=\left\{\begin{array}{cc}x if& x>0\\ 0 if& x\le 0\end{array}\right\}$$
(6)
More precisely, MLP takes an input vector of backorder features represented as \(x=({x}_{i1},{x}_{i2},{x}_{i3},\dots \dots .{x}_{in})\). The output of every neuron is given in Eq. (7):
$$u=\varphi \left(\sum i{w}_{i}{a}_{i}+b\right)$$
(7)
In the above Eq. (7), \({w}_{i}\) is the weight used to link two neurons, \({a}_{i}\) is the input, \(b\) is the bias term and \(\varphi\) denotes the activation function, i.e., ReLu on hidden layers. On the last layer, the sigmoid activation function is applied to predict whether either product “went on backorder” or not. During training, the weight optimizer “Adam” is employed to update the weights of layers with an input batch size of 8. The mathematical formulas for updating weights and biases are given below:
$$\Delta {W}_{1}\left(t+1\right)=-\frac{{x}_{\lambda }}{r}{W}_{1}-\frac{x}{n}\frac{\partial C}{\partial {W}_{1}}+m\Delta {W}_{1}\left(t\right)$$
(8)
$$\Delta {B}_{1}\left(t+1\right)=-\frac{x}{n}\frac{\partial C}{\partial {B}_{1}}+m\Delta {B}_{1}
(9)
In the above Eqs. (8–9), the terms \(W,x, B,l, n,t,m, \lambda , \text{and} C\) are known as weights, learning rate, bias, total number of layers, training examples, updating step, momentum, regularization parameter, and loss function. The loss function used to train neural networks is binary cross-entropy, as given below:
$$L=-\frac{1}{N}\sum_{i=1}^{n}{y}_{i}\text{log}\left(P\left({y}_{i}\right)\right)+\left(1-{y}_{i}\right)\text{log})P(1-P({y}_{i}))$$
(10)
In the above Eq. (10), \(P\left({y}_{i}\right)\) is the probability of class where \(N\) denotes the total number of samples in the dataset \({{{D=\{y}_{i},{x}_{i1},\dots \dots {x}_{ip}\}}_{i=1}}^{n}\).
Broadcasting of neural network weights
The server model weights are initialized with the Glorot uniform method to initiate a federated learning-based training setup. The weights of the server model are updated in later stages after each local client is trained. Then, after initialization, the local clients are trained in their separate datasets of backorders. After training, these clients’ weights are first averaged out (i.e., weighted aggregation strategy), and then later the average weights are employed to update the server model weights. The updated server model is then again broadcast to different clients to start the next round of federated learning setup. In this way, the data at different client levels is not shared with the model at the server end. Communication between the server and clients is only for weights. These weights are the weights of single or multi-layer neural networks. Furthermore, the neural network design, including the number of layers, weight optimizer, hidden units at each layer, activation functions at each layer, loss functions, and learning rates, remains consistent between clients and servers.
This is due to the reason that weights of the client’s model are copied to different hidden units linking the nodes of layers of architecture present in the server. Mathematically, suppose the weights of a server model is \({w}_{0}\). A collection of client sets, denoted as client \(i\in \{\text{1,2},\dots N\}\) optimizes their weights independently on their own local dataset \({D}_{i}\). At the end of every round \(t\) when clients end up with their local training, it generates an updated set of weights \({w}_{i}^{
(11)
where \({\varvec{N}}\) is the number of clients, \({{\varvec{n}}}_{{\varvec{i}}}\) is the total number of samples used to train the model on the client \({\varvec{i}},\) and total samples and data, which is divided over the set of all clients, is denoted as \({\varvec{n}}=\sum_{{\varvec{i}}=1}^{{\varvec{N}}}{{\varvec{n}}}_{{\varvec{i}}}\). The updated global weights, denoted as \({{\varvec{w}}}^{({\varvec{t}}+1)}\) are then employed to provide weights to all clients to start training for upcoming rounds. This cycle continues until the model converges or reaches a stopping point. Additionally, the server and clients only transmit model weights over the operation. Neither raw data is ever sent, ensuring data privacy at the client level.

Schematic illustration of the internal workings of the proposed model in receiving and broadcasting weights.
Hyperparameters of the model
The hyperparameters of SLP and MLP include the total number of layers, weight optimizer, hidden units at each layer, activation functions at each layer, loss functions, learning rates, etc. More precisely, in SLP, the input layers have a total of 21 units because of 21 features, and the output layer has one hidden unit with a sigmoid activation function. On the other hand, the MLP comprises three layers with hidden units of 64, 32, and 16 and the “ReLu” activation function. Finally, on the last layer of MLP, one hidden unit with a sigmoid activation function is added to perform binary classification. The weight optimizer is “Adam” in both cases, with the default learning rate set to 0.01. The loss function is binary cross-entropy, and the total number of training rounds is 20. Within each round, all client models are trained with one epoch and a batch size of 4, respectively. The number of clients used for training is three; however, we have also experimented with five, eight, and ten clients to assess the scalability of our approach. In addition, we conducted experiments using a simulated server-client setup.
Explainability and Interpretability of proposed model
LIME (Local Interpretable Model-agnostic Explanations) and SHAP (Shapley Additive Explanations) are two popular strategies for improving the interpretability of ML models. Both techniques aim to provide information about how a particular prediction is decided by a model, such as sophisticated models, neural networks. LIME produces local approximations by constructing an easier-to-interpret model, for example, linear regression, and it surrounds every prediction. The step of LIME includes that it disrupts the input data and monitors fluctuations in the model output to see how features contribute to a certain prediction. For every example included in the test, its explanation varies because its algorithm works by looking at local regions of input space. On the other hand, the SHAP model provides a better explanation of all features in the dataset and critically highlights their importance. This can be accomplished by considering different sets, i.e., combinations of input features. SHAP values assure fairness in features, making it a conceptually solid and reliable mechanism for feature explanation. In this research, both methods are employed to portray model explanations.
Experiments and results
In this section, dataset details, evaluation, metrics, and the results of the proposed model are discussed with experiments and analysis. All experimentation is performed on Google Colab with a 12 GB NVIDIA Tesla K80 GPU in Python.
Dataset
In this study, we have employed a dataset named “Predict Product Backorders. Can you predict product back orders?’ (https://www.kaggle.com/datasets/gowthammiryala/back-order-prediction-dataset)60. This is a challenge dataset comprising the 23 features along with a target variable to indicate whether a product went on backorder or not. Of these 23 features, 15 are numerical, and the rest of the features are of a categorical type. This dataset contains rich and relevant features such as “stock levels”, “lead times”, and “demand patterns,” making it highly representative and generalizable for real-world backorder prediction tasks. Table 1 shows the details of features along with their description. Table 2 presents a detailed summary of the feature-wise distribution of the training data. The columns include the count (number of data points), mean, standard deviation (std), and minimum (min) values for each feature. In addition, some exploratory analysis, in terms of the feature correlation matrix, is depicted in Fig. 6.

Feature correlation matrix of the backorder dataset for numeric features.
The correlation matrix given in Fig. 6 indicates that the “in_transit_qty”, “forecast_3_month”, “forecast_6_month”, “forecast_9_month”, “sales_1_month”, “sales_3_month”, “sales_6_month”, “sales_9_month”, and “min_bank” attributes are highly correlated. Figure 7 shows the point-biserial correlation between each numeric feature and the backorder status. It highlights which features are most strongly associated with the likelihood of a product going on backorder. Figures 8 and 9 show visualizations of TSNE and the result of applying K-Means clustering (with k = 2) to the dataset after projecting features into two dimensions using PCA. The overlay of cluster labels onto this PCA-reduced space provides insight into how well-separated the clusters are and whether any meaningful structure exists in the data with respect to the clustering.

Point-biserial correlation coefficients between numeric features and the binary target variable (went_on_backorder).

TSNE visualization of clustered data using K-Means (k = 2), highlighting decision boundaries and cluster centroids.

Clusters discovered by K-Means (with 2 clusters) overlaid on the PCA-reduced feature space, while PCA enables 2D visualization, and clustering was applied to the full standardized dataset.
Evaluation metrics
The following is the evaluation metric used in this study, which includes accuracy, recall, precision, and F1 score.
Accuracy
This measure computes the total number of samples that are correctly predicted as backorder or not backorder. Better predictive models have a value of high accuracy. The mathematical formula to compute accuracy is given below:
$$Accuracy=\frac{TP+TN}{TP+FP+TN+FN}$$
(12)
Precision
Precision measures the proportion of correctly predicted positive instances (true positives) out of all instances predicted as positive. In the context of backorder prediction, it reflects the model’s ability to accurately identify products that truly belong to the backorder class. The mathematical formula for computing precision is given below:
$$Precision=\frac{TP}{TP+FP}$$
(13)
Recall
Recall measures the model’s performance and how it successfully classifies backorder products from all relevant data. The mathematical formula for computing recall is given below:
$$Recall=\frac{TP}{TP+FN}$$
(14)
FScore
This measure provides the overall performance of the model by merging both precision and recall metrics. The mathematical formula for computing F1Score is given below:
$$F1Score=2\times \frac{Precision\times Recall}{Precision+Recall}$$
(15)
AUC-ROC
The Area Under the Receiver Operating Characteristic Curve (AUC-ROC) is a metric used to assess the accuracy of a classification model at different threshold levels. It evaluates the ability of the model to discriminate between positive and negative classes. The ROC curve compares the True Positive Rate (TPR) to the False Positive Rate (FPR) at various threshold levels, and the AUC is the area under the curve. Mathematically, the true-positive rate and false-positive rate are defined below in Eq. (16):
$$TPR=\frac{TP}{TP+FN}, FPR=\frac{FP}{FP+TN}$$
(16)
In the above Equations. (12–16), “TN” represents True negative, “TP” represents true positive, “FP” represents false positive, and “FN” denotes false negative.
