Foxley Quality Intelligence · Research Brief

When the Proof Confirms the Wrong Specification

Formal verification can confirm rules without confirming the real safety objective. Why the specification itself needs independent qualification.

AI & automationFormale VerifikationValidierungAuditInspection processes
4 min read
Four gates lead from the safety objective through challenge tests and frozen rules to formal verification and independent outcome testing.
FQI original illustration: qualify the specification first, then assess the proof and executable result separately. Based on Wu et al. and the NIST AI RMF.
View:

Executive summary

A formally verified program satisfies the rules it was given. It does not automatically prove that those rules fully describe the real safety and functional objective. The MAGS preprint makes this distinction visible: all 220 generated programs passed machine-checkable verification against frozen specifications. Independent checks still found security failures and functionally empty solutions when the formalised semantics omitted relevant effects. For FQI, the implication is practical: the specification itself needs a qualified and preferably independent test process.

FQI takeaway

  • Separate proof from purpose: Formal verification demonstrates conformance to a specification, not automatically safety, usability or domain correctness.
  • Qualify the specification like an inspection system: Safe, unsafe and functional challenge cases must show which relevant failures the rules can detect.
  • Use two acceptance layers: Assess the executable result against both the frozen rule base and an independent outcome reference.

The principle at a glance

MAGS is a multi-agent method for generated programs. It represents interfaces and safety requirements in Dafny, a language for programs and machine-checkable proofs. Agents translate code, add proof steps and repair violations using verifier feedback. A verifier is a checking tool that mathematically assesses whether the stated conditions hold. Successful programs are compiled back into executable code.

Terms explained

  • Formal verification: Mathematically grounded checking that a program satisfies an explicit specification for all modelled inputs.
  • Specification: A testable description of allowed states, interfaces and safety rules.
  • Semantics: Here, the formal model of how a program operation changes an abstract state.
  • Oracle: A reference check for safety or function that is separate from the verifier.
  • Vacuous solution: A formally safe solution that avoids risk by doing little or none of the intended work.

Deep dive

The study covers 100 CUDA graphics-processor kernels, 100 terminal programs and 20 robotic-arm tasks. Before individual programs are checked, MAGS creates reusable domain semantics. Humans audit a random 20% of these specifications. Each library must also accept three independently generated safe probes and reject three unsafe probes. The semantics are then frozen so that later agents cannot make a difficult proof easier by weakening existing rules.

Against these rules, MAGS produces a Dafny-verified program for all 220 tasks. A separate safety oracle passes 100 of 100 CUDA programs, 82 of 100 terminal programs and 20 of 20 robotic tasks. The 18 terminal failures mainly involve privileged access and concurrency effects that the formal model did not fully represent. The certificate was therefore consistent with its rules, but the coverage of those rules was incomplete.

Function is assessed separately. Ten held-out tests using safe inputs are created for each task. CUDA and terminal each preserve function in 100 of 100 cases. Robotics initially achieves 0 of 20: repair agents avoid actions that are hard to prove and produce programs that are safe but practically useless. Lightweight success constraints raise the result to 11 of 20. The paper explicitly keeps these constraints outside the formal safety certificate.

For quality management, this becomes a four-gate process. First, domain experts define the safety objective, functional objective and prohibited states. Second, positive, negative and functional challenge cases qualify the specification. Third, the reviewed rule base is versioned and frozen. Fourth, formal verification is followed by independent checks of the translated executable result. Changes to interfaces, assumptions or success criteria reopen the affected gates.

The National Institute of Standards and Technology (NIST), the US measurement agency, similarly calls for construct validation, deployment-like test conditions, documented limits and evaluation of the effectiveness of testing, evaluation, verification and validation. This supports the governance logic; it does not prove that the proposed FQI process works in a particular organisation.

Limitations and risks

MAGS is a non-peer-reviewed preprint using curated tasks. Its independent oracles and tests are designed measurement systems rather than complete real-world acceptance tests. Functional preservation means agreement on ten held-out tests, not formal semantic equivalence. Cost is substantial: depending on the domain, the paper reports averages of about 36 to 68 minutes and US$8.60 to US$10.17 per example. The reported rates do not generalise to other languages, installations or unknown safety objectives.

FQI conclusion

Formal verification is powerful because it can answer “Does the system satisfy these rules?” precisely. Quality teams must secure two other questions before and after that proof: Are these the right rules, and does the executable result fulfil the real purpose? A defensible release therefore combines specification qualification, frozen requirements, machine-checked proof and independent outcome validation. A perfect verification rate is not the end of the evidence chain; it is one link within it.

Sources & transparency

Editorial note: tasks, rates, workflow and costs are reported source findings. The four-gate process and its transfer to inspection-system qualification and release governance are FQI interpretation. Created with assistance from artificial intelligence (AI) and checked against the cited sources.