# Machine Learning Approach for Software Reliability Growth Modeling with Infinite Testing Effort Function

Authors: Subburaj Ramasamy; Indhurani Lakshmanan
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

Reliability is one of the quantifiable software quality attributes. Software Reliability Growth Models (SRGMs) are used to assess the reliability achieved at different times of testing. Traditional time-based SRGMs may not be accurate enough in all situations where test effort varies with time. To overcome this lacuna, test effort was used instead of time in SRGMs. In the past, finite test effort functions were proposed, which may not be realistic as, at infinite testing time, test effort will be infinite. Hence in this paper, we propose an infinite test effort function in conjunction with a classical Nonhomogeneous Poisson Process (NHPP) model. We use Artificial Neural Network (ANN) for training the proposed model with software failure data. Here it is possible to get a large set of weights for the same model to describe the past failure data equally well. We use machine learning approach to select the appropriate set of weights for the model which will describe both the past and the future data well. We compare the performance of the proposed model with existing model using practical software failure data sets. The proposed log-power TEF based SRGM describes all types of failure data equally well and also improves the accuracy of parameter estimation more than existing TEF and can be used for software release time determination as well.


---

## Body

## 1. Introduction

Early Software Reliability Growth Models (SRGMs) represent the relationship between the time to failure and the cumulative number of faults detected till then. Many such SRGMs have been proposed as parametric [1–14] and nonparametric [15–18] models since the year 1972 to estimate future failure occurrence times and assess the reliability growth of software systems during the testing phase. The traditional SRGMs are based on the premise that the mean value function of the model follows either exponential growth [1, 3] or S-shaped growth [2, 11] or both [4–8].Some SRGMs have been proposed with testing effort function (TEF) [11–13], since the fault detection and correction depend on efforts consumed such as test cases executed, man-days expended, computer utilization time, and other resources consumed, rather than only testing time or calendar time. The effort based SRGMs proposed in the past use exponential, Rayleigh, logistic, or Weibull distributions to specify testing effort function (TEF) to denote effort consumption during testing [11–13]. Although these functions seem to give good result and can well fit in some cases, there is a fallacy in assuming finite total test effort at an infinite time. Xie and Zhao proposed a Nonhomogeneous Poisson Process (NHPP) reliability growth model based on log-power distribution which is a graphical model where fitting of the data or not can be visualized in a graph before parameter estimation [19].In this paper, we propose using log-power [19] distribution to describe TEF in Goel and Okumoto [1] SRGM to provide an SRGM with infinite TEF. We use Artificial Neural Network (ANN) for parameter estimation and apply machine learning technique to determine the most suitable weights for the proposed model that will fit the past and future data equally well. We study and compare the goodness of fit (GoF) performance of the proposed model with a popular test effort function based SRGM. We use ANN for parameter estimation uniformly in all cases since ANN improves the parameter estimation accuracy and gives better goodness of fit rather than traditional statistical parametric models [15–18].This paper is organized in the following manner. Section2 presents the proposed testing effort function. Section 3 presents the proposed Software Reliability Growth Model. Section 4 gives the approach to check the validity of the proposed model. Section 5 describes parameter estimation using ANN. Section 6 presents the machine learning technique used to select appropriate weights of the proposed model. Section 7 describes the performance analysis. Section 8 describes one application of the proposed model, namely, software release time determination. Summary and conclusions are given in Section 9.


## 2. Proposed Testing Effort Function

Since the resources consumed during software testing directly impact software reliability improvement, few SRGMs with testing effort functions were proposed in the past. To study the properties of testing effort functions, we compare the proposed log-power TEF with already proposed test effort functions such as Weibull and logistic. The comparison is given in Table1.Table 1
Testing effort functions.
Models
Equation
Notations
Weibull TEF [11]
W
t
=
α
1
-
e
-
β
t
γ
W
(
t
): cumulative testing effort consumption in (0,t] α: expected total testing effort consumed during testing β: scale parameter and γ: shape parameter
Logistic TEF [12]
W
t
=
N
1
+
A
e
(
-
α
t
)
N: total testing effort consumed A: constant α: consumption rate of testing effort expenditure
Proposed log-power TEF
W
t
=
n
l
n
c
(
1
+
t
)
n and c are constantsThe exponential and Rayleigh TEFs are special cases of Weibull TEF when the shape parameter is 1 and 2, respectively. Weibull TEF displays a peak curve when the shape parameter in the Weibull function increases. The exponential TEF is used, when the effort is uniformly consumed on the testing time whereas the Rayleigh TEF is used when the testing effort first increases to a peak and then decreases. In case of logistic TEF, at time “t=0,” the effort W(t)=W(0) is nonzero. It is unrealistic, because at the initial stages when time is zero no testing effort can be consumed.There are innumerable chances for faults creeping in software systems. Therefore one has to adopt a strategy for the generation of effective test cases for minimizing the error content. It is believed that achieving zero defect in software is possible but impractical due to the requirement of infinite efforts. At time “t=0,” the effort W(t)=W(0) is not zero since test cases and test plan are drawn before testing starts. Thereafter it grows with testing. We chose log-power TEF because of its simplicity with just two parameters and it was found to be growing logarithmically with time and representing real testing projects better.


## 3. Proposed Software Reliability Growth Model with Log-Power Testing Effort Function

Instead of proposing a brand new SRGM for the sake of it, we propose building on the past good work done by researchers [1, 19]. We time transform the G-O model using log-power testing effort function. In the classical Goel-Okumoto SRGM, the independent variable, that is, time “t,” is replaced with log-power testing effort function “W(t)” by applying the time transformation as applicable to NHPP models [20].IfW(t) is the log-power testing effort spent at time t then the mean value function μ(t) of the Goel-Okumoto model can be transformed as given below:(1)μt=a1-e-b∗Wt,Wt=n∗lnc1+t,where W(t) is total testing effort consumed in time interval (0,x], a is the expected number of software errors to be detected, and b, c, and n are constants.Thus, the mean value functionμ(t) of the SRGM with log-power TEF is as follows:(2)μt=a1-e-bn∗lnc1+t.


## 4. Checking Validity of the Model

We evaluate the performance of the proposed model by using four practical software failure data sets which are available in the form of(tn,wn,yn). The data set needs to be normalized in the range of [0,1] before feeding to the ANNs. Table 2 provides the description of the software failure data sets.Table 2
Software failure data sets.
Data sets
Description
DS-1 [20]
Release-1 which is a subset of four software releases cited from Wood for Tandem Computers Company. It was tested for 20 weeks (tn) in which 100 software failures (yn) were found and 10000 CPU hours (wn) were consumed.
DS-2 [20]
Release-2 from Tandem Computers Company. It was tested for 19 weeks (tn) in which 120 software failures (yn) were found and 10272 CPU hours (wn) were consumed.
DS-3 [20]
Release-3 from Tandem Computers Company. It was tested for 12 weeks (tn) in which 61 software failures (yn) were found and 5053 CPU hours (wn) were consumed.
DS-4 [21]
Cited from Brooks and Motley which was tested for 35 weeks (tn) and 1301 failures (yn) were found & 1846.92 CPU hours (wn) were consumed.We measure and compare the goodness of fit (GoF) performance of the proposed model by using Mean Square Error (MSE) [22]. MSE is used to measure the square of the difference between the actual and estimated values. The smaller MSE indicates the less fitting error and better performance.


## 5. Parameter Estimation Using Artificial Neural Network

We use feed-forward ANN with back-propagation algorithm for estimating parameters of the proposed model. Thus, the mean value function of the proposed SRGM with log-power TEF (2) is given as follows:(3)Yt=w41-e-w3w2∗lnw11+t,where w1,w2,w3, and w4 are the weights of software reliability model and their values are determined using ANN. Here, the activation functions of the ANN are developed according to the mean value function of the selected SRGM and testing effort function [16]. In order to estimate the weight values, software failure data which is available in the form of (tn,wn,yn) is used where tn is the cumulative testing time which is measured in terms of appropriate time such as months and hours, wn is the effort expended in terms of number of hours, and yn is the corresponding cumulative number of failures.First, we estimatew1 and w2 values for log-power TEF Wt=w2∗lnw11+t using software failure data pair (tn,wn). Then, w3 and w4 values are estimated for mean value function Yt=w41-e-w3(W(t)) using software failure data pair (wn,yn) and here wn is the estimated values of Wt. The activation functions for hidden layers are ln⁡(1+t) and 1-e-t. The linear activation function t is used for output layers.The ANN feed-forward back-propagation procedure for parameter estimation is given in Box1.Box 1:ANN feed-forward back-propagation procedure.
Step 1
(1) Normalize the input and output data set patterns.
(2) Initialize the weight values to small random numbers.
(3) Set the error rate condition criteria.
(4) Derive the activation functions for hidden layer and output layer from the mean value function.
Step 2
Calculate the Input value and Output value for hidden and output neurons using activation functions.
(1) Output of Input Neuron j = The input data value pi
(2) The output of Hidden neurons or output neuron pj=A(NET) where NET = ∑iwji⋅pi, A is the activation function,
wji is the weight from i to j and pi is the input data set pattern values.
Step 3
Calculate error∂, Start from output layer & work backward to hidden layers recursively.
Error∂o=d-o∗A1NET where ∂o is the error for output layer neurons.
Similarly calculate error∂j for hidden layer neurons.
Step 4
Do the Weight Adjustments for output and hidden layers.
Weight adjustments for output layerwji=wji+Δwji where wji=c⋅∂o⋅pi here c is the learning rate co-efficient
and the weights are adjusted by gradient descent method in which the weight change is proportional to the partial derivative
of the error.
Repeat step2 to step 4 until the stopping criteria are met.


## 6. Machine Learning Technique to Select Appropriate Weights of the Proposed Model

The goodness of fit statistic indicates the quality of fitting of past data. The objective is not only to get a better fit for the past data, but also to ensure that the model will describe the future data equally well. Traditionally the predictive validity, both short-term and long-term of the software reliability models, was measured in order to confirm that the model will describe the future data well. We apply hold-out cross-validation approach which is one of the conventional machines’ learning technique to get the better goodness of fit for the past data as well as predictive validity to describe the future data [23].Multiple sets of weights may lead to equally good fit when we use ANN. Different good fits are possible depending on the start values assigned at random for the weights. Selection of weights based only on minimum training error could be misleading since the model may not describe future data accurately in the same manner. If the selected weights result in low training error but have high validation error, it is due to high variance or overfitting. Hence after arriving minimum training error (for 60% training data set) with the selected weights, we carry out validation (for 20% nonoverlapping validation data set) to ensure that the model will fit new data adequately. Box2 describes the cross-validation procedure to select appropriate weights of the model.Box 2:Description of machine learning cross-validation procedure to select appropriate weight values.
(1) Train on the 60% training data set.
(2) Calculate the training data set accuracy by propagating error through the network and by adjusting the weights using ANN
feed-forward back-propagation algorithm.
(3) Validate on the next 20% validation data set.
(4) If
the threshold validation accuracy is met stop training.
Else
continue training until the threshold validation accuracy met.
(5) Test on the next 20% test data set to confirm the selection of the model with appropriate weights.Table3 provides the Mean Squared Error values for both training and cross-validation for two trial weight sets of the proposed model.Table 3
MSE for training and validation.
Data sets
Weight sets
Training MSE
Validation MSE
DS-1
Trial-1
0.4829
1.6251
Trial-2
0.4831
0.4829
DS-2
Trial-1
0.4823
1.5382
Trial-2
0.4742
0.4745
DS-3
Trial-1
0.3465
1.3074
Trial-2
0.3482
0.3478
DS-4
Trial-1
0.4157
1.3876
Trial-2
0.4028
0.4031It can be seen that although training error is more or less the same for both Trial-1 and Trial-2, the validation error is significantly higher for Trial-1 for both data sets. So it will not describe the future data better. Since the training and validation errors are both lower for the Trial-2 weights, the model will fit the future data also equally well.


## 7. Performance Analysis

Once the appropriate weights of the proposed model are determined as above, then the model is tested for performance using the remaining 20% test data to confirm the selected weights. The MSE calculated with test data is given in Table4.Table 4
MSE for test data.
Models
MSE
DS-1
DS-2
DS-3
DS-4
G-O SRGM with Weibull TEF [11]
0.5327
0.5262
0.4028
0.8935
Proposed G-O SRGM with log-power TEF
0.4823
0.4741
0.3485
0.4031To study the relative performance of the testing effort function, we compare the proposed log-power TEF with already proposed Weibull test effort function [11], both used in G-O model [1]. The results confirm the suitability of log-power test effort function which appears to be the logical choice for TEF.


## 8. Determining When to Stop Testing: Use of Proposed SRGM

When to stop testing and release the software for operational use is one of the applications of Software Reliability Growth Models [22, 24]. Since the estimation of optimum release time based on conditional reliability does not converge [19], release time determination was carried by Subburaj and Gopal using minimum target failure intensity as the criterion instead of reliability [5], which converged after a few phases of testing. We adopt the same approach to determine when to stop testing using the proposed model. Box 3 describes the procedure for software release time determination using failure intensity to stop testing.Box 3:Procedure for software release time determination to stop testing.
(1) Set the target failure intensity to stop testing that depends on the software failure data set and customer requirements.
(2) In Phase I, estimate the parameters upto 25% of total number of failures in the software failure data set.
(3) Find the Optimal Testing Time (TOPT) needed to meet the target failure intensity using λt.
(4) In the next Phase, estimate the parameters upto TOPT with the software failure data set.
Repeat step(3) with the updated estimated parameters.
(5) Find the TOPT.
if
it is less than or equal to target then stop testing.
else
repeat step (3) till the target failure intensity achieved with the required TOPT.The equation of failure intensity function of proposed log-power TEF based SRGM is given as follows:(4)λt=dydt=dw4·1-e-w3∗w2·ln1+tw1dt,λt=w4·w3·w2·w1·e-w3·w2·ln⁡t+1w1·ln⁡t+1w1-1t+1.A target failure intensity of 1.663 failures per week is set for software failure data set DS-4. The target failure intensity has been achieved, and testing can be stopped at 25 weeks by which time 1166 failures were observed as given in Table5. When we use effort based SRGM we can not only find the optimum testing time (TOPT), but also determine the effort needed to achieve target reliability as illustrated in Table 5.Table 5
Release time determination of the proposed SRGM for DS-4.
Phase
Time (in weeks)
Number of failures
W
4
W
3
W
2
W
1
T
O
P
T
Effort needed
1
10
312
1350.04
1.54
E
-
03
265.78
0.2158
17
645
2
17
771
1350.08
1.35
E
-
03
650.62
0.3127
25
1200
3
25
1166
1350.15
1.15
E
-
03
1185.84
0.4910
25
1200


## 9. Summary and Conclusions

In time-based Software Reliability Growth Models (SRGMs), we assume that the testing efforts are constant over time which may be unrealistic at times. Effort based SRGMs are more realistic and result in better goodness of fit. Hence, some SRGMs with testing effort functions were proposed in the past. We propose log-power TEF which is an infinite test effort function, since logically the test efforts will be infinite at the infinite testing time. The proposed log-power TEF based SRGM describes all types of failure data equally well. The goodness of fit indicates the quality of fitting of past data. It does not assure that the future data will be fitted equally well. Hence we determine the appropriate weights using machine learning technique to select the SRGM that will describe both the past and future failures equally well. The study confirms that SRGM with log-power TEF improves the accuracy of parameter estimation more than existing TEF and can be used for software release time determination as well. Instead of conventional parameter estimation methods, we use ANN for parameter estimation. Although already proposed SRGM uses Weibull distribution for effort function, our study reveals the log-power TEF to be simple and equally good and it is a natural choice for TEF. It is clear that the proposed log-power TEF based SRGM which is selected using machine learning technique improves the accuracy of the goodness of fit performance better than the Weibull TEF based SRGM which is already proposed.



---

*Source: 8040346-2017-07-26.xml*