注目イベント!
アドベントカレンダー2026開催中!
アドベントカレンダーが今年も開催です! 1年の締めくくりに、毎日新しい技術トピックをお届けします。
詳細はこちらから!
event banner

Where Did the Holes in the Cheese Go?—Considering the Coexistence of Probabilistic and Deterministic Models in AI Quality Assurance

| 11 min read
Author: shinichiro-iwaki shinichiro-iwakiの画像
Information

To reach a broader audience, this article has been translated from Japanese.
You can find the original version here.

This is the third-day article of the Mamezou Developer Site Advent Calendar 2026.
Is everyone making use of AI? While I do not use it in the way commercials I have been seeing lately suggest, such as asking, “What should I make for dinner?”, I happily use it in my daily work for research, development tasks, and more.
Technological progress over the past few years in particular has been remarkable, and every day I find myself discouraged, wondering whether it may be just as capable as I am—or perhaps even capable of producing deliverables more polished than my own. Nevertheless, I myself bear responsibility for guaranteeing the deliverables, so I end up overwhelmed with trying to understand and verify whether the output produced by AI is truly acceptable.
Against this background, I would like to consider quality assurance in the age of AI in this article. Naturally, this is merely a thought experiment based on my own experience and background, so it may contain errors due to insufficient understanding or misconceptions. Needless to say, however, responsibility for the content rests with the author.

How to Close the “Holes” in a System

#

V&V (Verification & Validation) is a systematic quality assurance methodology and one of the representative approaches used today. It combines verifying that a deliverable “works as specified” = Verification, with confirming that it is actually “valid and useful” = Validation, in order to eliminate holes—that is, risks—that could become problems during use.

For example, systems “used by people,” such as e-commerce sites and attendance management systems, must reliably fulfill prescribed behavior, such as “the ordered product is correctly processed for payment and passed on to shipping” or “working hours are calculated from the entered clock-in and clock-out times, and overtime is processed.” Accordingly, verification is conducted through tests that define the “behavior that must be fulfilled,” ranging from function-level tests such as “input entered on screen XX is correctly sent to the server through the API,” to scenario-level tests such as “two different people purchase an item with inventory of one at the same time.” This is a deterministic approach that eliminates “anticipated holes” based on the assumption that the target exhibits the same behavior under the same conditions.
On the other hand, from the perspective of whether a system is useful, elements for which a single “desired” state cannot be uniquely defined are also important, such as “whether users can easily determine that an item is sold out” or “whether the clock-in/clock-out time input interface is not burdensome for employees.” If these aspects are inadequate, they can cause complaints or reduced operational efficiency, so it would be difficult to call the system “valid.” Rather than determining and checking a single “correct answer,” these aspects are likely evaluated by establishing “evaluation criteria” and having people assess them. In the context of human evaluation, a certain degree of variation can be expected—for example, person A may find a screen with the same layout easy to use, while person B may feel it is misleading and therefore worthless—and it can be considered to include a certain statistical aspect as well, such as judging it valid because only one out of ten evaluators rates it as NG[1].

Why Can the Holes Never Be Completely Eliminated? (Or, Quality Assurance and the Swiss Cheese Model)

#

Why is a combination of different approaches adopted to assure systems? I believe that underlying this is a way of thinking similar to the Swiss cheese model.
The Swiss cheese model is originally a concept from safety engineering that explains multilayered defenses against accidents and failures. It was often discussed in the context of infection prevention during the major COVID-19 pandemic some time ago, so many readers may have heard of it. A single layer of defense is compared to hole-riddled cheese because it contains countless “holes,” such as human errors and defects. The idea is that layering different defensive barriers—like stacking cheeses whose holes are in different places—can reduce the possibility that something slips through all the way to the end.

swiss-cheese

As is commonly said, testing cannot demonstrate that there are “no defects.” Under that constraint, in order to make it as unlikely as possible for problems to occur in deliverables, it is effective to combine defensive layers from different perspectives to build quality and reduce the likelihood of problems. Specifically, reviews and checks at each process stage, as well as combinations of test approaches—such as combinations of test types and V&V—serve as the roles of the respective layers. The approach is designed so that even if a hole escapes one defensive layer, it can be stopped by another. For example, while it may not be possible to verify every error case in system testing, if patterns of error handling have been comprehensively checked in unit testing, the risk of allowing a condition that should produce an error to pass through as “non-error” is reduced.

This approach has a certain degree of validity for systems that exhibit unique behavior[2], which is why it has been adopted in many contexts. But is the same assurance approach as before sufficient in the age of AI? I believe that conventional approaches alone may not provide sufficient assurance against AI-specific “unknown risks” and “unpredictable behavior.”

Holes in the Cheese in the Age of AI

#

AI has many probabilistic aspects in how it operates—such as inference and fluctuations in data—and is characterized by the possibility that the “same input” may produce a valid result or may lead to an unacceptable defect. Since it is an approach based on “human intelligence,” this feels like natural behavior for AI, just as it cannot be said that a person will “always achieve the same result” when taking the same test multiple times.
In other words, whether AI is used in development or in system processing, it is difficult to “verify” probabilistic behavior.

However, it is easy to imagine that there are many aspects of system behavior that cannot be tolerated simply because “it is probabilistic.” For example, for calculating the consumption tax amount in an expense claim, the accounting department would not forgive an error even if it occurred only once in one hundred times. Likewise, in source code generation, a compiler would not forgive even a single incorrect statement in ten thousand lines of code. In other words, in an era where AI is involved, it seems effective to deterministically verify that “conditions which must always be fulfilled” are satisfied, while evaluating other elements probabilistically.
In evaluating the probabilistic world, “having produced a correct result once” does not guarantee “producing a correct result again,” so statistical approaches such as evaluating results through repeated trials also seem likely to become necessary[3].

Who Will Close the Holes?

#

Given the characteristics of AI, an approach in which output is evaluated outside the AI and undesirable results are sent back seems likely to be essential. That said, one of the advantages of entrusting work to AI is that it can process it “faster than people,” so if “people check everything,” as I myself am struggling with, we cannot fully enjoy that benefit.
In an era when AI is used for development and system processing, the approach will likely be to define what must be reliably guaranteed and leave other aspects to AI to a certain extent. For example, we can guarantee the parts that can be checked through “test cases that can be evaluated deterministically” or “mechanical judgments such as compilation,” while allowing a certain degree of variation in other areas centered on a “valid state.”
The stance of allowing variation does not mean “giving up if it happens”; rather, it means “making it possible to respond when it happens.” To do so, it seems compatible with a DevOps-style structure and culture that establishes statistical testing and monitoring to make probabilistically occurring issues visible in systems under development and in operation, and maintains a development structure capable of continuously addressing them.

loops

Rather than merely feeding detected events back into the system to correct them, if they can also be fed back into the loop of the AI responsible for development, we may even be able to continuously close holes effectively[4].

The Holes Will Not Disappear, but They Can Be Addressed

#

There is no doubt that AI has evolved into an extremely useful partner. However, as discussed here, making AI a partner does not mean that it can close all the holes.
For quality assurance of AI deliverables, it seems necessary to shift our approach: “abandon the illusion of zero risk” and focus on “multilayered defenses that include human judgment, acceptance, and recovery measures.” Of course, as a premise, it should still be necessary to confirm that “what must be fulfilled” is fulfilled. Balancing these two wheels will likely become one of the key points of engineering going forward.
This has become a somewhat rambling article, but precisely because AI is evolving now, it is a good opportunity to consider what form of human involvement is desirable. I tried a small thought experiment from the perspective of how best to assure quality.


  1. In the real world, there may be cases such as “it is unacceptable unless the one person with approval authority says OK.” Generally, however, if something is useful to a certain proportion of evaluators, we can formulate the hypothesis that it will also be useful to the same proportion in a broader population. ↩︎

  2. This refers to exhibiting the same behavior for the same conditions, such as inputs and data. For example, imagine that calculating 123 * 4 on a calculator always produces 492, no matter how many times you do it. ↩︎

  3. To use school tests as an example, it is doubtful whether “N-ta got a score of 100 this time, so he will probably get 100 next time” is correct. However, “D-sugi gets 100 every time, so he will probably get 100 or close to it next time” feels valid, does it not? Even when results are not unique, it is possible to make convincing predictions based on multiple results. ↩︎

  4. I have not been able to do anything as large-scale as the illustration suggests, but I have actually introduced a mechanism into a development project harness that “records issues during development and feeds them back into harness improvements.” The token usage is somewhat frightening, but since the harness becomes more accurate the more it is used, I believe this is a valid approach. ↩︎

豆蔵では共に高め合う仲間を募集しています!

recruit

具体的な採用情報はこちらからご覧いただけます。