Demonstrating software reliability using possibly correlated tests: Insights from a conservative Bayesian approach

Kizito Salako, Xingyu Zhao

Abstract

This paper presents Bayesian techniques for conservative claims about software reliability, particularly when evidence suggests the software's executions are not statistically independent. We formalise informal notions of "doubting" that the executions are independent, and incorporate such doubts into reliability assessments. We develop techniques that reveal the extent to which independence assumptions can undermine conservatism in assessments, and identify conditions under which this impact is not significant. These techniques - novel extensions of conservative Bayesian inference (CBI) approaches - give conservative confidence bounds on the software's failure probability per execution. With illustrations in two application areas - nuclear power-plant safety and autonomous vehicle (AV) safety - our analyses reveals: 1) the confidence an assessor should possess before subjecting a system to operational testing. Otherwise, such testing is futile - favourable operational testing evidence will eventually decrease one's confidence in the system being sufficiently reliable; 2) the independence assumption supports conservative claims sometimes; 3) in some scenarios, observing a system operate without failure gives less confidence in the system than if some failures had been observed; 4) building confidence in a system is very sensitive to failures - each additional failure means significantly more operational testing is required, in order to support a reliability claim.

Introduction

In safety-critical domains such as nuclear power generation and autonomous vehicle (AV) operation, software reliability is not merely a performance metric but a fundamental safety requirement. Traditional statistical methods for demonstrating reliability often rely on the assumption that test executions are independent and identically distributed (i.i.d.). However, this simplification can be dangerously optimistic. Real-world software often exhibits correlated behaviors, where failures occur in clusters due to persistent environmental conditions or internal state dependencies.

This paper introduces a formal framework for incorporating "doubts" about independence into reliability assessments using a Conservative Bayesian Inference (CBI) approach. By identifying the "worst-case" scenarios consistent with an assessor's prior knowledge, the framework provides robust, conservative confidence bounds on software failure probabilities.

The Problem: The Danger of the Independence Assumption

The standard i.i.d. assumption allows engineers to use simple binomial models to estimate reliability. For example, if a system passes 1,000 tests without failure, one might conclude it has a low probability of failure per execution (pfe).

However, in systems like AVs, a sensor glitch or a specific weather condition might cause a series of failures in quick succession. If a model assumes independence but the reality is highly correlated, the resulting safety estimate will significantly underestimate the risk. This creates an "assessor's dilemma": how can one justify a safety claim when the independence of tests is uncertain?

Methodology: Conservative Bayesian Inference and the Klotz Model

To address this, the authors utilize Conservative Bayesian Inference (CBI). Unlike standard Bayesian methods that require a single, often arbitrary, prior distribution, CBI considers a family of possible priors that satisfy certain constraints (e.g., a lower bound on the failure rate). It then identifies the prior that yields the most pessimistic reliability claim, ensuring the result is truly conservative.

To formally model correlation, the researchers employ the Klotz Model, a first-order stationary Markov chain.

The Klotz Model: A first-order Markov chain used to model correlated failures and successes, where x is the unconditional probability of failure and lambda represents the probability of failure given a previous failure.

The model introduces two key parameters: the unconditional probability of failure per execution ($x$) and the probability that an execution fails given that the previous one also failed ($\lambda$). By extending CBI to this bivariate space, the framework accounts for both the overall failure rate and the potential "stickiness" or clustering of failures.

A Framework for Diverse Evidence

The paper's approach is designed to handle various types of operational testing evidence and prior beliefs. Figure 1 illustrates how different combinations of evidence (e.g., no failures vs. consecutive failures) and prior knowledge (e.g., beliefs about fault-freeness or engineering goals) are mapped to specific analytical treatments within the framework.

A roadmap of the paper's framework, illustrating how different types of operational testing evidence and prior beliefs are categorized and addressed.

This mapping is applied to two primary scenarios: nuclear power-plant safety systems, where software might be truly "fault-free," and autonomous vehicle (AV) safety, where the goal is a target failure rate based on human benchmarks (e.g., $10^{-8}$ fatalities per mile).

Key Insights: The Paradoxes of Testing

The conservative analysis reveals several counter-intuitive findings that challenge standard engineering intuition:

  • The Futility of Testing: If an assessor's prior confidence in a system is too low, operational testing can become "futile." In such cases, observing a long string of successes actually decreases confidence because the mathematics suggests it is more likely that the tests are highly correlated (or the testing process is flawed) than that the system is truly reliable.
  • Failures as "Good" Evidence: Surprisingly, seeing a few isolated failures can sometimes provide more confidence than seeing no failures at all. Isolated failures serve as evidence that executions are not perfectly correlated, effectively ruling out some of the most pessimistic "worst-case" scenarios involving extreme failure clustering.
  • Sensitivity to Clustering: Reliability claims are extremely sensitive to positive correlation. In the AV scenario, an i.i.d. model might suggest safety after $10^5$ miles, whereas a conservative model accounting for potential correlation might require $10^9$ miles—four orders of magnitude more testing—to reach the same confidence level.

Conclusion

The proposed CBI framework provides a rigorous way to quantify the impact of correlation on software reliability claims. It highlights that the independence assumption is often the most optimistic case and that engineers must establish a "threshold of belief" before testing to ensure the results are meaningful. Future work will look to extend this to higher-order Markov chains and continuous-time processes suitable for 24/7 system monitoring.

Full Paper Citation: Salako, K., & Zhao, X. (2023). Demonstrating Software Reliability using Possibly Correlated Tests: Insights from a Conservative Bayesian Approach. Quality and Reliability Engineering International. arXiv:2208.07935v3.

Summary updated

BibTeX
@article{salako2022demonstrating,
  author = {Kizito Salako and Xingyu Zhao},
  title = {{Demonstrating software reliability using possibly correlated tests: Insights from a conservative Bayesian approach}},
  journal = {Qual. Reliab. Eng. Int.},
  year = {2022},
}
Figure