Foundations to Frontier
Tests
M. Robust, Verifiable and Onboard AI › M2 Verification and Assurance

Safety Cases and Assurance Arguments

A safety case is a structured argument, supported by evidence, that a system is acceptably safe for a given use in a given environment. For systems with learned components the argument has to say what the evidence actually shows: how much testing supports how strong a claim, under which operating conditions, and how independent the different pieces of evidence are. This page represents arguments in the Goal Structuring Notation, checks their structure and propagates confidence through them, and then quantifies statistical evidence: how many tests a reliability claim needs, and how an unrepresentative test profile makes the same statistics support a false claim.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Making the case that it is safe

Before a system that can hurt people goes into service, its makers must convince an independent assessor that it is safe enough. A safety case is that argument written down: a top claim such as ‘the perception system is acceptably safe on motorways in daylight’, broken into smaller claims, each backed by evidence such as test results, analyses or proofs. A good case also says what it assumes and where its evidence is weak. For learned components, the hardest questions are statistical: how many tests are enough, and do the tests look like the real world?

🎮 Verification lab

To claim a failure probability of at most 10^-3 per demand with 99% confidence takes 4,603 failure-free tests (at one test a minute, 0.009 years).

Operating conditions clear day, night, rain, fog occur 60%, 25%, 10%, 5% of the time and the system fails with probability 0.0002, 0.001, 0.003, 0.02 in each. True failure probability in operation: 0.00167. With 5% fog in the tests, the failure probability during testing is 0.00167.

The claim 'at most 0.001' (false) is accepted if the 95% upper bound from 5,000 tests is below 0.001, that is with at most 1 failure. Chance of accepting it: 0.2%.

Lower the fog share or raise the number of tests: with an unrepresentative test profile, more tests make a false claim more likely to be accepted (M2-5, Exercise 2).

Why engineers care

Demonstrating a failure rate of 10⁻⁹ per hour by testing alone would take hundreds of thousands of years of failure-free operation (Butler and Finelli, 1993).

📝 Quick check (Level 0)
0/3 answered
  1. 1. A safety case is…
  2. 2. A safety case is valid for…
  3. 3. For learned components, a key question is whether tests…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Safety case (assurance case): a structured argument with evidence that a system is acceptably safe for a specified application in a specified environment (UK Defence Standard 00-56; ISO 26262 for road vehicles; UL 4600 for autonomous products).
  • Goal Structuring Notation (GSN): goals (claims), strategies (how a goal is decomposed), solutions (evidence), context, assumptions and justifications (Kelly, 1998; GSN Community Standard). Claims–Arguments–Evidence (CAE) is an alternative notation.
  • Operational design domain (ODD): the conditions under which the system is designed to work; claims are only valid inside it.
  • Multi-legged arguments: independent lines of evidence (testing, verification, field experience) for the same claim; their value depends on the legs failing independently (Bishop and Bloomfield).
  • Statistical evidence: with n failure-free demands, the one-sided confidence that the failure probability is below p is 1 − (1 − p)ⁿ; with failures, the Clopper–Pearson bound.
  • Operational profile: the frequency of each operating condition in service; tests must follow it, or be reweighted to it, to support claims about operation.
  • Assurance of ML (AMLAS): a methodology for safety cases of machine-learning components covering requirements, data, model learning, verification and deployment (Hawkins and colleagues, 2021).
📝 Quick check (Level 1)
0/3 answered
  1. 1. In GSN, a solution is…
  2. 2. The ODD defines…
  3. 3. Multi-legged arguments rely on legs that…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Arguments and statistical evidence

Exercise 1.

  • A small GSN data structure: goals, strategies with an ‘all subgoals needed’ or ‘independent legs’ rule, solutions with a probability of being valid, and context-type nodes.
  • Structural checks for undeveloped goals, empty strategies, evidence without a confidence, and context used as support or claims used as context.
  • Confidence propagation under an independence assumption.
  • The number of failure-free tests a claim needs, and the Clopper–Pearson upper bound computed from a binomial CDF summed in log space.

Practice.

  • State the ODD and assumptions explicitly in the argument; every claim is conditional on them.
  • Make test profiles match the operational profile, or test each condition separately and weight the results by the operational profile.
  • Do not multiply confidences without arguing independence; a common cause (a wrong ODD description, a shared data set) can defeat several legs at once.
  • Combine evidence types: testing alone cannot demonstrate very low failure rates, so add design arguments, verification (topics M2-1 to M2-3), runtime monitoring (M2-4) and architecture.
  • Keep the safety case alive: update it with field data, incidents and changes to the model or its environment.
def confidence(node):
    if node.kind == "Sn": return node.p                  # evidence
    ps = [confidence(k) for k in node.kids]
    if node.kind == "S" and node.rule == "any":          # independent legs
        return 1 - prod(1 - p for p in ps)
    return prod(ps)                                      # all needed

def tests_needed(pfd, conf):
    return ceil(log(1 - conf) / log(1 - pfd))            # smallest n with (1 - pfd)^n <= 1 - conf

def upper_bound(k, n, conf):                             # Clopper-Pearson
    bisect p until P(Binomial(n, p) <= k) = 1 - conf
🐍 Exercise 1: GSN arguments and binomial evidence
Implement a GSN argument structure with checks and confidence propagation, the number of tests a claim needs, and the Clopper–Pearson upper bound.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Every claim in a safety case is conditional on…
  2. 2. Multiplying leg confidences requires…
  3. 3. Very low failure rates are supported by…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why the test count is what it is. Accept the claim ‘failure probability ≤ p₀’ if n tests show no failure. If the true probability is p > p₀, the chance of n failure-free tests is (1 − p)ⁿ ≤ (1 − p₀)ⁿ. Choosing n so that (1 − p₀)ⁿ ≤ 1 − C bounds the chance of wrongly accepting by 1 − C. Since ln(1 − p₀) ≈ −p₀, n ≈ ln(1/(1 − C))/p₀: about 2.3/p₀ tests for 90% and 4.6/p₀ for 99% confidence. Each factor of ten in the claim costs a factor of ten in testing.

Why the operational profile matters. If a demand falls in condition c with probability w_c and then fails with probability f_c, a single test fails with probability Σ w_c f_c. The binomial bound from such tests therefore bounds Σ w_c f_c for the test profile w, not for the operational profile. When the tests under-represent the conditions with high failure rates, the bound converges to the wrong number, and more tests only make the false conclusion more certain. Testing each condition separately and weighting the per-condition bounds by the operational profile repairs this, at the price of a looser bound (Practice 4).

Why independence is the crux. For two legs that are each wrong with probability q, independence gives q² for both being wrong. If with probability c a common cause makes both wrong and they are otherwise independent with the same marginal q, both are wrong with probability c + (1 − c)r², where r = (q − c)/(1 − c). This equals q² + c(1 − q)²/(1 − c), so any common cause raises it above q², and at c = q the second leg adds nothing. Bayesian versions of these arguments replace confidence by posterior probability and make the prior an explicit part of the case (Practice 2).

📝 Quick check (Level 3)
0/3 answered
  1. 1. Failure-free tests needed for 99% confidence are about…
  2. 2. A binomial bound from tests bounds the failure probability under…
  3. 3. A common cause makes the chance that both legs are wrong…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How many tests do reliability claims need, and what happens to a statistical safety argument when the test profile does not match the operational profile?

History.

  • The Cullen inquiry (1990) into the Piper Alpha disaster led to safety cases for offshore installations; UK Defence Standard 00-55 and 00-56 required them for defence systems.
  • R. Butler and G. Finelli (1993) showed that ultra-high reliability cannot be demonstrated by testing; B. Littlewood and L. Strigini (1993) analysed the limits of such evidence.
  • T. Kelly (1998) introduced the Goal Structuring Notation; P. Bishop and R. Bloomfield (1998) developed Claims–Arguments–Evidence and multi-legged arguments.
  • ISO 26262 (2011) and ISO 21448 (SOTIF, 2022) set safety-case requirements for road vehicles; UL 4600 (2020) for autonomous products.
  • R. Hawkins and colleagues (2021) published AMLAS for machine-learning components; the EU AI Act (2024) requires risk management and technical documentation for high-risk AI.

Exercise 2.

  • Failure-free tests needed for claims from 10⁻² to 10⁻⁶ per demand at 90% and 99% confidence.
  • A perception function with four operating conditions (clear day, night, rain, fog), operational frequencies 0.6, 0.25, 0.1 and 0.05 and failure probabilities 0.0002, 0.001, 0.003 and 0.02: the true failure probability in operation is 0.00167, so the claim ‘at most 0.001’ is false.
  • 2,000 test campaigns of 1,000, 5,000 and 20,000 demands for three test profiles: the operational one, a convenient one (90% clear day, 10% night) and one without fog (65%, 25%, 10%, 0%). For each: the share of 95% Clopper–Pearson bounds that cover the true value, the share of campaigns that accept the false claim, and the median bound.

Tests needed (90%, 99% confidence): 10⁻²: 230, 459; 10⁻³: 2,302, 4,603; 10⁻⁴: 23,025, 46,050; 10⁻⁵: 230,258, 460,515; 10⁻⁶: 2,302,584, 4,605,168.

Seed 0 (coverage, share accepting the false claim, median bound):

test profile 1,000 demands 5,000 demands 20,000 demands
operational 1.000, 0.000, 0.00473 0.969, 0.002, 0.00289 0.957, 0.000, 0.00221
convenient 1.000, 0.000, 0.00299 0.057, 0.569, 0.00095 0.000, 0.994, 0.00053
no fog 1.000, 0.000, 0.00299 0.464, 0.128, 0.00155 0.006, 0.406, 0.00103

Seeds 1 and 2: coverage with the operational profile 0.964 and 0.971 at 5,000 demands and 0.962 and 0.962 at 20,000; the convenient profile accepted the false claim in 0.613 and 0.599 of campaigns at 5,000 demands and 0.998 and 0.993 at 20,000; the profile without fog in 0.402 and 0.400 at 20,000.

Findings.

  • Each factor of ten in the claim costs a factor of ten in testing: 4,603 failure-free tests for 10⁻³ at 99% confidence, 4.6 million for 10⁻⁶.
  • With the operational profile the bound behaved as promised: it covered the truth in at least 95.7% of campaigns and accepted the false claim in at most 0.2%, in every seed.
  • With the convenient profile, more testing made things worse: the false claim was accepted in 57% to 61% of campaigns at 5,000 demands and in over 99% at 20,000, because the tests measure a failure probability of 0.00028 instead of 0.00167.
  • Leaving out one rare condition was enough to mislead: without fog, which is 5% of operation but 60% of the failures, about 40% of campaigns of 20,000 demands accepted the false claim.
  • Small campaigns rejected the claim in every profile simply because 1,000 tests cannot support a claim of 0.001 at 95% confidence: lack of evidence protected against the wrong conclusion, not good evidence.
🐍 Exercise 2 (research): how many tests do reliability claims need, and what happens to a statistical safety argument when the test profile does not match the operational profile?
Compute the tests reliability claims need, and measure how often test campaigns with matched and mismatched profiles accept a false claim.

Safety cases in practice

  • Tools: GSN and CAE editors (Astah GSN, Adelard ASCE, open-source tools) keep arguments linked to evidence; model-based approaches generate parts of the argument from requirements and test results.
  • Standards for ML components: ISO/PAS 8800 (road vehicles), the EASA concept papers for machine learning in aviation, AMLAS and UL 4600 ask for data management, ODD coverage, performance evidence per condition, and monitoring in service.
  • Arguments beyond testing: formal verification (topics M2-1 to M2-3) supports claims over whole input regions; runtime assurance (M2-4) bounds what a learned component can do; certification standards (M2-6) define what evidence is expected.

References

  1. T. Kelly (1998). “Arguing safety: a systematic approach to managing safety cases.” PhD thesis, University of York.
  2. R. Butler and G. Finelli (1993). “The infeasibility of quantifying the reliability of life-critical real-time software.” IEEE Transactions on Software Engineering.
  3. B. Littlewood and L. Strigini (1993). “Validation of ultrahigh dependability for software-based systems.” Communications of the ACM.
  4. P. Bishop and R. Bloomfield (1998). “A methodology for safety case development.” Safety-Critical Systems Symposium.
  5. R. Hawkins and colleagues (2021). “Guidance on the assurance of machine learning in autonomous systems (AMLAS).” University of York.
  6. Underwriters Laboratories (2020). “UL 4600: standard for safety for the evaluation of autonomous products.”