Bayesian Deep Learning for Remaining Useful Life Estimation via Stein Variational Gradient Descent
Abstract
A crucial task in predictive maintenance is estimating the remaining useful life of physical systems. In the last decade, deep learning has improved considerably upon traditional model-based and statistical approaches in terms of predictive performance. However, in order to optimally plan maintenance operations, it is also important to quantify the uncertainty inherent to the predictions. This issue can be addressed by turning standard frequentist neural networks into Bayesian neural networks, which are naturally capable of providing confidence intervals around the estimates. Several methods exist for training those models. Researchers have focused mostly on parametric variational inference and sampling-based techniques, which notoriously suffer from limited approximation power and large computational burden, respectively. In this work, we use Stein variational gradient descent, a recently proposed algorithm for approximating intractable distributions that overcomes the drawbacks of the aforementioned techniques. In particular, we show through experimental studies on simulated run-to-failure turbofan engine degradation data that Bayesian deep learning models trained via Stein variational gradient descent consistently outperform with respect to convergence speed and predictive performance both the same models trained via parametric variational inference and their frequentist counterparts trained via backpropagation. Furthermore, we propose a method to enhance performance based on the uncertainty information provided by the Bayesian models. We release the source code at https://github.com/lucadellalib/bdl-rul-svgd.
keywords:
Prognostics and health management , Remaining useful life , Bayesian deep learning , Stein variational gradient descentPACS:
89.20.FfMSC:
68T05[inst1]organization=Concordia University, Gina Cody School of Engineering and Computer Science,addressline=1455 Boul. de Maisonneuve Ouest, city=Montreal, postcode=H3G 1M8, state=Quebec, country=Canada
[inst2]organization=Università degli Studi di Padova, Dipartimento di Ingegneria dell’Informazione,addressline=Via Gradenigo 6/b, city=Padova, postcode=35131, state=Veneto, country=Italy
[inst3]organization=Mila-Quebec AI Institute,addressline=6666 Rue Saint-Urbain, city=Montreal, postcode=H2S 3H1, state=Quebec, country=Canada
1 Introduction
Predictive maintenance is a strategy that optimizes maintenance activities based on real-time monitoring of machinery health conditions. It has become more and more successful in recent years as a result of its efficacy in eliminating needless interventions and enhancing reliability of equipment [1]. One of the key tasks in predictive maintenance is estimating the remaining useful life (RUL) of physical systems, i.e. the available time before a failure occurs in one of the system’s components. RUL prediction has traditionally been performed using model-based and statistical methods [2]. While the former characterize the deterioration process by means of a mathematical model of the underlying failure mechanism, the latter use existing failure data to fit a statistical model without depending on any physical principle. Artificial intelligence techniques have lately experienced a surge in popularity thanks to their ability to learn deterioration patterns directly from observations. Deep learning in particular has emerged as a powerful approach for RUL estimation, outperforming traditional prognostic algorithms [3]. It has gained extensive traction and adoption across a diverse array of domains such as aviation [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], semiconductor manufacturing [14, 3], transport [15], and machine tools [14]. Although deep learning models can offer reasonably precise estimates, achieving accuracy is unlikely. Moreover, errors in RUL tasks have completely different impact: for example, overestimating the RUL could lead to unexpected breaks, while underestimating it could result in unnecessary maintenance [16]. Users may want to tune the performances of predictive maintenance tools based on various factors, which can have different importance over time, such the availability of operators and spare parts, the presence of maintenance plans associated with other tasks in the line, production plans, and deadlines associated with product delivery. Thus, in order to make informed decisions on how to schedule maintenance operations, it is critical to quantify the uncertainty inherent to the predictions. A standard way to achieve that is to adopt a Bayesian viewpoint and treat the model’s parameters as random variables, whose prior distribution is updated into a posterior distribution according to Bayes’ rule after observing the data. Unfortunately, exactly computing the posterior is often infeasible when dealing with deep learning models, thus various approximate Bayesian inference schemes such as Bayes by Backprop [17], Monte Carlo dropout [18], and Markov chain Monte Carlo [19] have been employed, with promising results in many practical problems, including RUL estimation [20, 21, 22, 23, 24, 25]. However those techniques present limitations: either they constrain inference to a fixed family of distributions (multivariate normal with diagonal covariance matrix in Bayes by Backprop and Bernoulli in Monte Carlo dropout), or they are computationally intensive and therefore not scalable to big data (Markov chain Monte Carlo).
Stein variational gradient descent [26] is a recent gradient-based variational inference algorithm for approximating intractable distributions that overcomes the drawbacks of the aforementioned approaches. In particular, differently from Monte Carlo dropout and Bayes by Backprop, it is more expressive, as it does not constrain the posterior to a fixed family of distributions, and differently from Markov chain Monte Carlo, it is more efficient, as it is amenable to batch optimization and parallelization. Furthermore, being sampling-free and easily adaptable to the geometry of the target space, it is more stable and converges faster. Despite its success in generative modeling [27] and deep reinforcement learning [28], it is still underexplored, and, to the best of our knowledge, it has not been applied to RUL estimation yet. As a novel contribution to the field, we show through an experimental study on simulated run-to-failure turbofan engine degradation data that Bayesian deep learning models trained via Stein variational gradient descent consistently outperform in terms of convergence speed and predictive performance both the same models trained via Bayes by Backprop, which is the de-facto standard for training large scale Bayesian neural networks [29], and their frequentist (i.e. non-Bayesian) counterparts trained via backpropagation. Additionally, we propose a refreshingly simple yet effective heuristic to enhance the performance based on the uncertainty information provided by the Bayesian models. To foster reproducibility and promote further research in the field, we release the source code at https://github.com/lucadellalib/bdl-rul-svgd.
The remainder of this paper is structured as follows. In Sec. 2 we summarize related work in frequentist and Bayesian deep learning for RUL prediction. In Sec. 3 we introduce our method. In Sec. 4 we describe the experimental setup. In Sec. 5 we present and discuss the experimental results. Lastly, in Sec. 6 we draw the conclusions and outline future work directions.
2 Related Work
In the last decade, considerable effort has been dedicated to advance the state-of-the-art of RUL estimation through deep learning. One of the earliest successful works is the one by Tian [4], who developed a dense neural network model to predict the RUL of a group of pumps based on historical vibration data collected from bearings. Despite achieving a relatively low error rate, extensive preprocessing was necessary to extract relevant information from the data due to the weak inductive bias of dense layers, which complicates the learning of temporal and spatial correlations. To address the issue of modeling temporal correlations, Gugulothu et al. [5] utilized recurrent neural networks for better capturing the deterioration patterns in the multivariate trajectories, obtaining state-of-the-art performance on the turbofan engine degradation dataset from the IEEE PHM 2008 data challenge [30]. Zheng et al. [6] later improved upon Gugulothu et al.’s method through long short-term memory networks [31]. Other researchers focused instead on extracting spatial correlations between different sensor measurements by means of convolutional neural networks. Babu et al. [7] introduced a novel convolutional neural network architecture for RUL prediction that outperformed a dense neural network, a support vector machine, and a relevance vector machine on NASA’s Commercial Modular Aero-Propulsion System Simulation (C-MAPSS) dataset [32, 33]. Li et al. [8] further reduced the error rate compared to both Zheng et al. and Babu et al. with a deeper convolutional neural network architecture regularized via dropout [34] and trained through the adaptive learning rate optimizer Adam [35]. An attempt to combine the best of both recurrent neural networks and convolutional neural networks was carried out by Jayasinghe et al. [9], with promising results for data obtained from complex environments. More recently, transformer-based methods [36], widely used in natural language processing and computer vision, have been employed in predictive maintenance too with excellent results [10, 11, 37]. Other techniques such as variational autoencoders [38] and restricted Boltzmann machines [39] have been applied as well in a semi-supervised fashion to reduce the amount of labeled data required to train the model without compromising performance [12, 13].
All the aforementioned studies contributed significantly to improving the state-of-the-art of RUL estimation, however none of them properly addressed the problem of quantifying the uncertainty associated with the predictions. It is only in the last three years that Bayesian deep learning has started to draw the attention of the research community. For example, Kraus et al. [20] developed a combined approach consisting of a non-parametric explicit lifetime model, a Bayesian linear model, and a Bayesian recurrent neural network trained via Bayes by Backprop that achieved competitive performance on the C-MAPSS dataset with the additional advantage of being interpretable and providing confidence intervals around predictions. Another Bayesian method is that of Peng et al. [21], who used Bayes by Backprop and Monte Carlo dropout to train a Bayesian multiscale convolutional neural network and a Bayesian bidirectional long short-term memory network on the ball bearing dataset from the IEEE PHM 2012 data challenge [40, 41] and the C-MAPSS dataset, respectively. Experimental results showed superior performance compared to their frequentist counterparts trained via backpropagation. Huang et al. [22] later proposed a Bayesian deep learning framework for capturing both the uncertainty in the model and the noise in the data. In particular, they assumed the RUL to follow a normal distribution parameterized by a Bayesian dense neural network trained via Bayes by Backprop. A similar setup was adopted by Caceres et al. [23], who replaced the model by Huang et al. with a Bayesian recurrent neural network trained via both Monte Carlo dropout and Bayes by Backprop with flipout [42]. Li et al. [24] further extended Huang et al.’s work by experimenting with different RUL distributions such as normal, logistic, and Weibull [43], parameterized by a Bayesian gated recurrent unit network [44] trained via Monte Carlo dropout. Furthermore, they presented a sequential Bayesian boosting procedure to enhance the predictive accuracy, which was validated on real-world circuit breaker run-to-failure data.
Although not as popular as Bayes by Backprop and Monte Carlo dropout, Markov chain Monte Carlo was also used in predictive maintenance. Benker et al. [25] recently trained dense and convolutional Bayesian neural networks via Hamiltonian Monte Carlo [45] and Bayes by Backprop on the C-MAPSS dataset with some success. Moreover, they leveraged the uncertainty information obtained from the Bayesian models to further reduce the error rate. Despite improving over vanilla Markov chain Monte Carlo, such an algorithm still suffers from efficiency issues in big data settings due to the high computational cost of simulating Hamiltonian dynamics. On the contrary, the method we utilize – Stein variational gradient descent – is both expressive like Markov chain Monte Carlo and efficient like backpropagation.
3 Methodology
3.1 Bayesian Neural Networks
In frequentist neural networks uncertainty is totally disregarded: weights are assumed to be deterministic and their optimal values are learned directly from data via maximum likelihood (or maximum a posteriori when a regularization term is included) estimation. On the contrary, in Bayesian neural networks weights are assumed to be random variables with a prior distribution that explicitly encodes domain knowledge about the task at hand, and a posterior distribution , i.e. the conditional distribution that results from updating with information from the likelihood [29]. Following Bayes’ rule, the posterior can be calculated as:
(1) |
where is known as the evidence. Knowing the posterior enables us to determine the posterior predictive distribution , i.e. the distribution of output as a function of input , which is calculated as the weighted mean of the likelihoods of the infinite ensemble of neural networks induced by [17]:
(2) |
In practice, we can approximate it using a finite number of Monte Carlo samples from the posterior and calculate useful statistics such as mean, variance, skewness, etc. In particular, the mean or the mode of the posterior predictive distribution is typically used as a prediction. Moreover, we can quantify the uncertainty in the neural network’s weights (commonly referred to as epistemic), which is captured by a fraction of the predictive variance and can be lowered by collecting more data [46]. A further advantage of adopting a Bayesian perspective is that, since a prior is imposed on , regularization is naturally provided and overfitting is less of a concern even in low data regimes.
Even though in theory can be derived via exact Bayesian inference using Eq. 1, this is mostly impossible due to the high dimensionality of and a functional form of the neural network not amenable to integration [17]. A possible solution is to approximate the posterior through variational inference [47], a technique that substitutes the potentially multimodal and/or heavy-tailed true posterior with a simpler surrogate distribution.
3.2 Bayes by Backprop
Bayes by Backprop [48, 17] is an iterative gradient-based variational inference approach that assumes the surrogate posterior to be a parametric distribution from a tractable family (typically a multivariate normal with diagonal covariance matrix). The goal is to learn the optimal parameters that minimize the Kullback-Leibler divergence (KL) of from :
(3) |
The resulting loss function is known as the evidence lower bound (ELBO) or the variational free energy (VFE) and explicitates the trade-off between matching the simplicity of the prior (complexity loss) and the complexity of the data (likelihood loss) [49]. It is denoted as
(4) |
Exactly minimizing the ELBO is computationally infeasible in many cases [17]. Bayes by Backprop approximates it via Monte Carlo sampling:
(5) |
where denotes the number of Monte Carlo samples and the -th Monte Carlo sample drawn from using the reparameterization trick [38]. Gradient-based optimization can be used to minimize Eq. 5 and learn the optimal parameters of the surrogate posterior.
3.3 Stein Variational Gradient Descent
Stein variational gradient descent [26] is an iterative gradient-based variational inference algorithm that assumes the surrogate posterior to be a non-parametric distribution represented by a finite set of randomly initialized particles that are gradually evolved toward the true posterior through a sequence of transforms. It has a simple form that is similar to standard gradient ascent, and equivalent to it when (in this case it yields the maximum a posteriori estimate). As a result, it is very adaptable and scalable and readily usable in combination with other optimization techniques such as stochastic gradient ascent, momentum, and adaptive learning rates (e.g. Adam [35]). Let denote the transform applied to the particles at the -th iteration. The goal is to choose such that it maximally reduces the Kullback-Leibler divergence between the true posterior and the transformed surrogate posterior :
(6) |
In order to do so, it is necessary to impose a few constraints on its functional form. First, we require to be invertible, such that the density of the transformed variable can be easily computed via the change of variables formula. To ensure that, we define it as a small perturbation of the identity map:
(7) |
where denotes the perturbation magnitude and the perturbation direction. If is sufficiently small and is smooth, then is invertible. Second, we restrict to be within the unit ball of a -dimensional reproducing kernel Hilbert space [50] induced by a positive-definite kernel . Given these conditions, the following closed-form expression holds for the direction of steepest descent of at the -th iteration:
(8) |
where denotes the unnormalized weight posterior. The first term represents a driving force that guides the particles toward high probability regions of , and the second a repulsive force that prevents the particles from collapsing into local modes of . The updated weights are then calculated as
(9) |
where denotes the perturbation magnitude at the -th iteration. It is straightforward to derive a corresponding loss function from Sec. 3.3 and apply standard gradient-based optimization to learn the optimal particle-based approximation of the true posterior.
3.4 Uncertainty-Informed Predictions
The Bayesian theoretical framework offers a natural way to reason about uncertainty in predictions, which is crucial for informed decision-making in real-world applications. For example, if the RUL estimate provided by the model is highly uncertain (i.e. the predictive variance is large), a machine operator might opt to preemptively schedule maintenance before reaching the predicted threshold, since the costs associated with unforeseen equipment breakdowns generally exceed the expenses incurred through underutilization. We incorporate this conservative strategy directly into the prognostic procedure by proposing a simple heuristic that helps preventing late predictions. Given a test sample , let and denote the mean and the standard deviation of the posterior predictive distribution , respectively. Assuming that represents the RUL estimate (as mentioned in Sec. 3.1, the mode of the posterior predictive distribution could be an alternative), we propose the following modification:
(10) |
where is the corrected RUL estimate, the probability of late prediction, and a hyperparameter that controls the correction strength. If , than the model is risk-averse and no correction is necessary. Conversely, if , the model is risk-seeking, hence a correction proportional to is applied. The probability of late prediction can be estimated on a subset of held-out data as
(11) |
where denotes the indicator function. It is worth noting that our method can be easily adjusted as new data are acquired by reestimating on such data. This adaptability could also prove beneficial in addressing scenarios characterized by domain shift.
4 Experimental Setup
4.1 Dataset
The proposed Bayesian methods are evaluated using the simulated turbofan engine degradation data from the publicly accessible NASA’s C-MAPSS dataset111https://www.nasa.gov/content/prognostics-center-of-excellence-data-set-repository [32, 33], which comprises subsets of multivariate trajectories from sensors. Every subset includes a training set and a test set. The training set consists of run-to-failure sensor recordings of several engines acquired under various operating conditions and fault modes. The engines are assumed to be healthy at first, however their initial wear and manufacturing variations are unknown. They deteriorate over time until a system failure occurs, with the last data point corresponding to the time cycle when the unit fails. On the contrary, sensor records in the test set end some time prior to the failure. The objective is to estimate the RUL of each engine in the test set. The true RUL values of the test engines are provided for performance evaluation. Each subset has columns: engine number, time cycle, operational settings (which define the operating condition), and sensor measurements. Detailed information about the subsets, identified as FD001, FD002, FD003, and FD004 is shown in Tab. 1.
4.2 Preprocessing
Feature selection
In FD001 and FD003, sensors , , , , , , and are constant throughout the engine’s lifespan, hence they do not provide any meaningful information for predicting the RUL. Furthermore, FD001 and FD003 are subjected to a single operating condition. As a result, in FD001 and FD003 only of the sensors are utilized as input features, with indices , , , , , , , , , , , , and , while the operational settings are ignored. In contrast, there are no constant measurements in FD002 and FD004, and the existence of operating conditions makes it more difficult to detect deterioration patterns. Therefore, in FD002 and FD004 all the sensors and the operational settings are employed as input features.
Normalization
The collected sensor data and operational settings are normalized to be within the interval by means of min-max normalization:
(12) |
where denotes feature at time step , the normalized value of , the maximum value of feature across time steps of all trajectories and the minimum value.
Sliding window segmentation
We can generally extract more information from a multivariate trajectory by examining the temporal sequence data as opposed to only considering the individual data points at each time step. To retain the deterioration patterns hidden in the time dimension, the sliding window segmentation method originally proposed by Babu et al. [7] is used to partition the trajectory into overlapping segments of fixed size. Let denote the window size and the number of features. At each time step, all future sensor records within the window are gathered into a matrix (see Fig. 1) such that from a trajectory of length exactly segments are extracted. If , the trajectory is discarded. The resulting segments are then labeled with the RUL of the last data point in the window and given as input to the deep learning models described in Sec. 4.3.

Target rectification
A popular technique in the literature [5, 6, 7, 8, 25] is to use a piece-wise linear degradation model in which the RUL target function is assumed to be constant until a threshold value, , beyond which it linearly decreases to . From an implementation point of view, this means rectifying the targets, i.e. setting the RUL to for all samples whose RUL is larger than . The intuition behind it is that a system generally operates correctly at first and starts to degrade only after a certain amount of wear. Following the aforementioned literature, we set for both the training and the test set. Hyperparameters of the preprocessing phase are reported in Tab. 2.
C-MAPSS | ||||
---|---|---|---|---|
FD001 | FD002 | FD003 | FD004 | |
Training trajectories | ||||
Test trajectories | ||||
Operating conditions | ||||
Fault modes |
C-MAPSS | ||||
---|---|---|---|---|
FD001 | FD002 | FD003 | FD004 | |
Training samples | ||||
Test samples | ||||
4.3 Deep Learning Models
Hyperparameter | Value |
---|---|
Number of epochs | |
Batch size | |
Negative log-likelihood | [51] |
Optimizer | Adam [35] |
Learning rate | |
Learning rate decay epoch | |
Learning rate decay factor | |
Late prediction correction factor | |
Backpropagation | |
Dropout [34] probability (drop) | |
Weight initialization | Kaiming uniform [52] |
Bayes by Backprop | |
Prior | |
Surrogate posterior | |
Number of Monte Carlo samples | |
Stein variational gradient descent | |
Prior | |
Number of particles | |
Kernel | Radial basis function\tnotexa_rbf |
-
a
Bandwidth is chosen using the median-based heuristic by Liu et al. [26].
The goal of this work is to explore the use of Stein variational gradient descent to train Bayesian deep learning models for RUL estimation. More specifically, we investigate whether it converges faster and yields better predictive accuracy than a competitive baseline such as Bayes by Backprop. To this end, we implement the two simple yet effective neural network architectures proposed by Benker et al. [25], train them under identical experimental conditions with both methods, and compare their performance. For the sake of completeness, we also consider backpropagation as a simpler baseline for training the frequentist counterparts of the selected models, which are defined as follows:
-
1.
Dense3 (D3): dense neural network architecture originally proposed by Benker et al. The input matrix, with denoting the window size and the number of features, is flattened into a -dimensional vector, which is then fed to consecutive neurons dense layers. A final output neuron returns the RUL prediction. After each dense hidden layer, a sigmoid activation function is applied.
-
2.
Conv2Pool2 (C2P2): convolutional neural network architecture originally proposed by Babu et al. [7] and later used by Benker et al. too. The input matrix is fed to a convolutional layer with channels followed by a average pooling layer. A second convolution with channels is applied, followed by another average pooling. The output is flattened into a -dimensional vector and a final output neuron returns the RUL prediction. After each convolutional hidden layer, a sigmoid activation function is applied.
All models are trained for epochs using as a negative log-likelihood Huber loss [51] with a residual threshold arbitrarily set to (which is the overall cost to minimize for frequentist models and only a fraction of it for Bayesian ones, see Eq. 5 and Sec. 3.3), which is less sensitive to outliers than plain mean squared error. For each epoch, training samples and their corresponding targets are randomly split into multiple batches of size and fed to the model. The neural network’s weights are updated based on the gradient of the loss function computed batchwise by means of Adam [35] optimizer, with a learning rate of , reduced by a factor of after epochs for fine-tuning. For frequentist variants trained via backpropagation, weights are initialized according to Kaiming’s uniform scheme [52] and dropout with a drop probability of is applied to avoid overfitting. For Bayesian variants trained via Bayes by Backprop, prior and surrogate posterior are modeled as zero-mean multivariate normal distributions with diagonal covariance matrices and per-dimension initial standard deviations equal to and with , respectively. Note the use of softplus-reparameterization as per reference [17] to ensure a strictly positive standard deviation during training. The same prior is utilized for Bayesian variants trained via Stein variational gradient descent. In this case, the surrogate posterior is approximated by particles, initialized by drawing that number of samples from the prior. As a kernel, we employ a radial basis function with bandwidth chosen using the median-based heuristic by Liu et al. [26]. As mentioned in Sec. 3.4, we use the mean of the posterior predictive distribution as the RUL estimate. For Bayesian models, we correct the prediction according to Eq. 10, where we set the correction factor . The probability of late prediction is computed on the training set (since the C-MAPSS dataset does not include a validation set) based on Eq. 11. Hyperparameters of the training algorithms are summarized in Tab. 3.
4.4 Performance Metrics
For performance evaluation, we calculate root mean squared error (RMSE), mean absolute error (MAE) and the score function (Score) proposed by Saxena et al. [33]:
(13) |
(14) |
(15) |
where is the number of test samples and the error, i.e. the difference between estimated and true RUL values for the -th test sample. Good models should achieve relatively low values on all those metrics. As shown in Fig. 2, RMSE and MAE equally penalize early and late predictions, while the asymmetric score function penalizes late predictions more than early ones. Minimizing the score is crucial as late predictions often result in more catastrophic consequences than early ones because maintenance will be planned too late. Nonetheless, it is useful to monitor RMSE and MAE too, since the score is particularly sensitive to outliers due to the exponentiation.

4.5 Implementation and Hardware
Software for the experimental evaluation was implemented in Python 3.8.13. In particular, we used NumPy 1.23.4222https://github.com/numpy/numpy/tree/v1.23.4 [53] to preprocess the data, PyTorch 1.12.1333https://github.com/pytorch/pytorch/tree/v1.12.1 [54] to implement the deep learning models and the training loops, BayesTorch 0.0.1444https://github.com/lucadellalib/bayestorch/tree/v0.0.1 to implement the Bayesian inference algorithms, Ray AIR 2.0.1555https://github.com/ray-project/ray/tree/ray-2.0.1 [55, 56] for experiment execution, and Matplotlib 3.6.2666https://github.com/matplotlib/matplotlib/tree/v3.6.2 [57] and Seaborn 0.12.1777https://github.com/mwaskom/seaborn/tree/v0.12.1 [58] for plotting. All the experiments were run on an Ubuntu 20.04.5 LTS machine with an Intel i7-10875H CPU with cores @ GHz, GB RAM and an NVIDIA GeForce RTX GPU @ GB with CUDA Toolkit 11.3.1.
5 Experimental Results and Discussion
Experimental results for D3 and C2P2 trained via backpropagation (BP), Bayes by Backprop (BBB) and Stein variational gradient descent (SVGD) reported in Tab. 4 show that Stein variational gradient descent yields lower error rates than the other two approaches, with D3-SVGD performing the best across all subsets. In particular, as illustrated in Fig. 3, Stein variational gradient descent tends to produce a narrower posterior and posterior predictive distribution with mean closer to the true RUL value compared to Bayes by Backprop. The lower variance in the predictions is a direct consequence of the fact that the neural network is more certain about the values of its weights, suggesting that Stein variational gradient descent converged faster and to a more accurate solution than Bayes by Backprop. This is confirmed by the generally lower standard deviation values in the performance metrics of D3-SVGD and C2P2-SVGD, which is a further indication of a less brittle optimization process.
Subset | Metric | D3-BP | D3-BBB | D3-SVGD | C2P2-BP | C2P2-BBB | C2P2-SVGD | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mean | std | mean | std | mean | std | mean | std | mean | std | mean | std | |||||||
FD001 | RMSE | |||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
RMSE | ||||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
FD002 | RMSE | |||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
RMSE | ||||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
FD003 | RMSE | |||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
RMSE | ||||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
FD004 | RMSE | |||||||||||||||||
MAE | ||||||||||||||||||
Score | ||||||||||||||||||
RMSE | ||||||||||||||||||
MAE | ||||||||||||||||||
Score |






Despite the differences between Bayes by Backprop and Stein variational gradient descent, we observe that, across all the subsets, Bayesian deep learning models trained with these methods perform better than their frequentist counterparts and especially D3-BP, which fails to achieve good performance in FD002 and FD004. This stabilizing effect is likely due to the implicit ensemble learning property that characterizes Bayesian neural networks. However, contrarily to Benker et al. [25], we did not find Bayes by Backprop to clearly improve over backpropagation with respect to the score, which might be imputable to a different hyperparameter configuration.
Regarding the comparison between different subsets, we notice that the predictive performance varies drastically, with a substantial drop in FD002 and FD004 for all the configurations. This is in line with expectations since detecting deterioration patterns is more difficult in those subsets due to the presence of instead of operating conditions. A performance gap exists between D3 and C2P2 too. In fact, the latter performs slightly worse than D3 on the more complex FD002 and FD004, and significantly worse on the less challenging FD001 and FD003. This might be due to overfitting or to a suboptimal neural network architecture. The evaluation of more competitive deep learning models is beyond the scope of this research and will be addressed in future work.
Lastly, we emphasize that our uncertainty-based heuristic consistently improves the score metric across all models. For instance, in the case of D3-SVGD, the score on FD001 improves from to . While a similar improvement is frequently observed for RMSE and MAE, it is less consistent, reflecting the fact that our method is primarily designed to mitigate the risk associated with late predictions rather than targeting error reduction.
6 Conclusions and Future Work
In this work Stein variational gradient descent was successfully applied to the task of RUL estimation for the first time. Bayesian dense and convolutional neural networks were trained using such method and compared to both the same models trained via Bayes by Backprop and their frequentist counterparts trained via backpropagation. Experiments on the simulated run-to-failure turbofan engine degradation data of the C-MAPSS dataset showed that Bayesian deep learning models trained via Stein variational gradient descent consistently outperformed the other two approaches. Furthermore, a heuristic to reduce the risk of late predictions and enhance the performance based on the uncertainty information provided by the Bayesian models was proposed. However, further investigations are necessary to harness the full potential of this technique. First, the impact of the number of particles and the choice of the kernel should be analyzed. Second, state-of-the-art transformer-based architectures should be included in the comparative study. Lastly, extensions to Stein variational gradient descent such as neural variational gradient descent [59], which eliminates the need for a kernel, could be explored.
CRediT Author Statement
Luca Della Libera: Conceptualization, Investigation, Methodology, Software, Validation, Visualization, Writing - Original Draft.
Jacopo Andreoli: Investigation, Methodology, Software, Validation, Visualization, Writing - Original Draft.
Davide Dalle Pezze: Methodology, Validation, Writing - Review & Editing.
Mirco Ravanelli: Funding acquisition, Resources, Supervision, Writing - Review & Editing.
Gian Antonio Susto: Funding acquisition, Resources, Supervision, Writing - Review & Editing.
Declaration of Competing Interest
The authors declare that there are no conflicts of interest.
Acknowledgments
We thank Francesco Paissan for valuable mathematical discussions, and Domenico Lopez and Amrit Singh for software testing. This work was supported by the Natural Sciences and Engineering Research Council of Canada (NSERC) and the Digital Research Alliance of Canada (alliancecan.ca). For GA Susto, this study was partially carried out within the MICS (Made in Italy – Circular and Sustainable) Extended Partnership and received funding from Next-GenerationEU (Italian PNRR – M4 C2, Invest 1.3 – D.D. 1551.11-10-2022, PE00000004). Moreover, this study was also partially carried out within the PNRR research activities of the consortium iNEST (Interconnected Nord-Est Innovation Ecosystem) funded by Next-GenerationEU (Italian PNRR – M4 C2, Invest 1.5 – D.D. 1058.23-06-2022, ECS00000043).
References
- [1] Y. Lei, N. Li, L. Guo, N. Li, T. Yan, J. Lin, Machinery health prognostics: A systematic review from data acquisition to RUL prediction, Mechanical Systems and Signal Processing (2018) 799–836.
- [2] A. Jardine, D. Lin, D. Banjevic, A review on machinery diagnostics and prognostics implementing condition-based maintenance, Mechanical Systems and Signal Processing (2006) 1483–01510.
- [3] L. Lorenti, D. Dalle Pezze, J. Andreoli, C. Masiero, N. Gentner, Y. Yang, G. A. Susto, Predictive maintenance in the industry: A comparative study on deep learning-based remaining useful life estimation, in: IEEE International Conference on Industrial Informatics (INDIN), 2023, pp. 1–9.
- [4] Z. Tian, An artificial neural network method for remaining useful life prediction of equipment subject to condition monitoring, Journal of Intelligent Manufacturing (2012) 227–0237.
- [5] N. Gugulothu, T. Vishnu, P. Malhotra, L. Vig, P. Agarwal, G. M. Shroff, Predicting remaining useful life using time series embeddings based on recurrent neural networks, International Journal of Prognostics and Health Management (2020).
- [6] S. Zheng, K. Ristovski, A. Farahat, C. Gupta, Long short-term memory network for remaining useful life estimation, in: IEEE International Conference on Prognostics and Health Management (ICPHM), 2017, pp. 88–95.
- [7] G. Sateesh Babu, P. Zhao, X.-L. Li, Deep convolutional neural network based regression approach for estimation of remaining useful life, in: Database Systems for Advanced Applications, 2016, pp. 214–228.
- [8] X. Li, Q. Ding, J.-Q. Sun, Remaining useful life estimation in prognostics using deep convolution neural networks, Reliability Engineering & System Safety (2018) 1–11.
- [9] L. Jayasinghe, T. Samarasinghe, C. Yuenv, J. C. Ni Low, S. Sam Ge, Temporal convolutional memory networks for remaining useful life estimation of industrial machinery, in: IEEE International Conference on Industrial Technology (ICIT), 2019, pp. 915–920.
- [10] Y. Mo, Q. Wu, X. Li, B. Huang, Remaining useful life estimation via transformer encoder enhanced by a gated convolutional unit, Journal of Intelligent Manufacturing (2021) 1997–2006.
- [11] L. Liu, X. Song, Z. Zhou, Aircraft engine remaining useful life estimation via a double attention-based data-driven architecture, Reliability Engineering & System Safety (2022) 108330.
- [12] A. S. Yoon, T. Lee, Y. Lim, D. Jung, P. Kang, D. Kim, K. Park, Y. Choi, Semi-supervised learning with deep generative models for asset failure prediction, in: KDD17 Workshop on Machine Learning for Prognostics and Health Management, 2017.
- [13] A. L. Ellefsen, E. Bjørlykhaug, V. Æsøy, S. Ushakov, H. Zhang, Remaining useful life predictions for turbofan engine degradation using semi-supervised deep architecture, Reliability Engineering & System Safety (2019) 240–251.
- [14] G. A. Susto, A. Beghi, Dealing with time-series data in predictive maintenance problems, in: IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), 2016, pp. 1–4.
- [15] O. Fink, E. Zio, U. Weidmann, A classification framework for predicting components’ remaining useful life based on discrete-event diagnostic data, IEEE Transactions on Reliability (2015) 1049–1056.
- [16] G. A. Susto, A. Schirru, S. Pampuri, S. McLoone, A. Beghi, Machine learning for predictive maintenance: A multiple classifier approach, IEEE Transactions on Industrial Informatics (2015) 812–820.
- [17] C. Blundell, J. Cornebise, K. Kavukcuoglu, D. Wierstra, Weight uncertainty in neural networks, in: International Conference on Machine Learning (ICML), 2015, pp. 1613–1622.
- [18] Y. Gal, Z. Ghahramani, Dropout as a Bayesian approximation: Representing model uncertainty in deep learning, in: International Conference on Machine Learning (ICML), 2016, pp. 1050–1059.
- [19] R. M. Neal, Bayesian Learning for Neural Networks, Springer-Verlag, 1996.
- [20] M. Kraus, S. Feuerriegel, Forecasting remaining useful life: Interpretable deep learning approach via variational Bayesian inferences, Decision Support Systems (2019) 113100.
- [21] W. Peng, Z.-S. Ye, N. Chen, Bayesian deep-learning-based health prognostics toward prognostics uncertainty, IEEE Transactions on Industrial Electronics (2020) 2283–2293.
- [22] D. Huang, R. Bai, S. Zhao, P. Wen, S. Wang, S. Chen, Bayesian neural network based method of remaining useful life prediction and uncertainty quantification for aircraft engine, in: IEEE International Conference on Prognostics and Health Management (ICPHM), 2020, pp. 1–8.
- [23] J. Caceres, D. Gonzalez, T. Zhou, E. L. Droguett, A probabilistic Bayesian recurrent neural network for remaining useful life prognostics considering epistemic and aleatory uncertainties, Structural Control and Health Monitoring (2021) e2811.
- [24] G. Li, L. Yang, C.-G. Lee, X. Wang, M. Rong, A Bayesian deep learning RUL framework integrating epistemic and aleatoric uncertainties, IEEE Transactions on Industrial Electronics (2021) 8829–8841.
- [25] M. Benker, L. Furtner, T. Semm, M. F. Zaeh, Utilizing uncertainty information in remaining useful life estimation via Bayesian neural networks and Hamiltonian Monte Carlo, Journal of Manufacturing Systems (2021) 799–807.
- [26] Q. Liu, D. Wang, Stein variational gradient descent: A general purpose Bayesian inference algorithm, in: International Conference on Neural Information Processing Systems (NeurIPS), 2016, pp. 2378–2386.
- [27] Y. Pu, Z. Gan, R. Henao, C. Li, S. Han, L. Carin, VAE learning via Stein variational gradient descent, in: International Conference on Neural Information Processing Systems (NeurIPS), 2017.
- [28] Y. Liu, P. Ramachandran, Q. Liu, J. Peng, Stein variational policy gradient, in: Conference on Uncertainty in Artificial Intelligence, 2017.
- [29] L. V. Jospin, H. Laga, F. Boussaid, W. Buntine, M. Bennamoun, Hands-on Bayesian neural networks - a tutorial for deep learning users, IEEE Computational Intelligence Magazine (2022) 29–48.
- [30] A. Saxena, K. Goebel, PHM08 challenge data set (2008).
- [31] S. Hochreiter, J. Schmidhuber, Long short-term memory, Neural Comput. (1997) 1735–1780.
- [32] A. Saxena, K. Goebel, Turbofan engine degradation simulation data set (2008).
- [33] A. Saxena, K. Goebel, D. Simon, N. Eklund, Damage propagation modeling for aircraft engine run-to-failure simulation, in: International Conference on Prognostics and Health Management, 2008, pp. 1–9.
- [34] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, R. Salakhutdinov, Dropout: A simple way to prevent neural networks from overfitting, Journal of Machine Learning Research (2014) 1929–1958.
- [35] D. P. Kingma, J. Ba, Adam: A method for stochastic optimization, in: International Conference on Learning Representations (ICLR), 2015.
- [36] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, I. Polosukhin, Attention is all you need, in: International Conference on Neural Information Processing Systems (NeurIPS), 2017, pp. 6000–6010.
- [37] D. Dalle Pezze, D. Deronjic, C. Masiero, D. Tosato, A. Beghi, G. A. Susto, A multi-label continual learning framework to scale deep learning approaches for packaging equipment monitoring, Engineering Applications of Artificial Intelligence (2023) 106610.
- [38] D. P. Kingma, M. Welling, Auto-encoding variational Bayes, in: International Conference on Learning Representations, (ICLR), 2014.
- [39] D. H. Ackley, G. E. Hinton, T. J. Sejnowski, A learning algorithm for Boltzmann machines, Cognitive Science (1985) 147–169.
- [40] P. Nectoux, R. Gouriveau, K. Medjaher, E. Ramasso, B. Morello, N. Zerhouni, C. Varnier, PHM12 challenge data set (2012).
- [41] P. Nectoux, R. Gouriveau, K. Medjaher, E. Ramasso, B. Chebel-Morello, N. Zerhouni, C. Varnier, PRONOSTIA: An experimental platform for bearings accelerated degradation tests, in: 2012 International Conference on Prognostics and Health Management, 2012, pp. 1–8.
- [42] Y. Wen, P. Vicol, J. Ba, D. Tran, R. Grosse, Flipout: Efficient pseudo-independent weight perturbations on mini-batches, in: International Conference on Learning Representations (ICLR), 2018.
- [43] C.-D. Lai, D. Murthy, M. Xie, Weibull distributions and their applications, Springer, 2006, pp. 63–78.
- [44] K. Cho, B. van Merriënboer, D. Bahdanau, Y. Bengio, On the properties of neural machine translation: Encoder–decoder approaches, in: Workshop on Syntax, Semantics and Structure in Statistical Translation, 2014, pp. 103–111.
- [45] S. Duane, A. Kennedy, B. J. Pendleton, D. Roweth, Hybrid Monte Carlo, Physics Letters B (1987) 216–222.
- [46] A. Kendall, Y. Gal, What uncertainties do we need in Bayesian deep learning for computer vision?, in: International Conference on Neural Information Processing Systems (NeurIPS), 2017.
- [47] M. J. Wainwright, M. I. Jordan, Graphical models, exponential families, and variational inference, Found. Trends Mach. Learn. (2008) 1–305.
- [48] A. Graves, Practical variational inference for neural networks, in: International Conference on Neural Information Processing Systems (NeurIPS), 2011.
- [49] R. M. Neal, G. E. Hinton, A view of the EM algorithm that justifies incremental, sparse, and other variants, in: Proceedings of the NATO Advanced Study Institute on Learning in Graphical Models, 1998, pp. 355–368.
- [50] A. Berlinet, C. Thomas-Agnan, Reproducing Kernel Hilbert Space in Probability and Statistics, Springer, 2004.
- [51] P. J. Huber, Robust estimation of a location parameter, The Annals of Mathematical Statistics (1964) 73–101.
- [52] K. He, X. Zhang, S. Ren, J. Sun, Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification, in: IEEE International Conference on Computer Vision (ICCV), 2015, pp. 1026–1034.
- [53] C. R. Harris, K. J. Millman, S. J. van der Walt, R. Gommers, P. Virtanen, D. Cournapeau, E. Wieser, J. Taylor, S. Berg, N. J. Smith, R. Kern, M. Picus, S. Hoyer, M. H. van Kerkwijk, M. Brett, A. Haldane, J. F. del Río, M. Wiebe, P. Peterson, P. Gérard-Marchant, K. Sheppard, T. Reddy, W. Weckesser, H. Abbasi, C. Gohlke, T. E. Oliphant, Array programming with NumPy, Nature (2020) 357–362.
- [54] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, J. Bai, S. Chintala, Pytorch: An imperative style, high-performance deep learning library, in: International Conference on Neural Information Processing Systems (NeurIPS), 2019.
- [55] P. Moritz, R. Nishihara, S. Wang, A. Tumanov, R. Liaw, E. Liang, M. Elibol, Z. Yang, W. Paul, M. I. Jordan, I. Stoica, Ray: A distributed framework for emerging AI applications, in: Symposium on Operating Systems Design and Implementation, 2018, pp. 561–577.
- [56] R. Liaw, E. Liang, R. Nishihara, P. Moritz, J. E. Gonzalez, I. Stoica, Tune: A research platform for distributed model selection and training, in: International Conference on Machine Learning (ICML), 2018.
- [57] J. D. Hunter, Matplotlib: A 2D graphics environment, Computing in Science & Engineering (2007) 90–95.
- [58] M. L. Waskom, seaborn: statistical data visualization, Journal of Open Source Software (2021) 3021.
- [59] L. Langosco, V. Fortuin, H. Strathmann, Neural variational gradient descent, arXiv preprint arXiv:2107.10731 (2021).