A Test Oracle in AI is a mechanism or procedure to decide whether a system’s output is correct given a certain input. It plays a key role in validating that an AI system’s results match expected outputs.
Imagine you’re answering a math problem. You believe you’ve got the right answer, but you’re not sure. So you check it using a calculator, which you believe will give the right answer. In this case, the calculator is like a Test Oracle—it helps you know if your answer is right or wrong.
A Test Oracle in the context of machine learning and artificial intelligence is a mechanism, a source of truth, used to verify if the system’s output or result is correct for the given input. The term originates from software testing where a test oracle refers to a mechanism different than the system under test that can be used to check its correctness.
From a theoretical perspective, an oracle could be classified into two main categories: deterministic and probabilistic. A deterministic oracle- it can unambiguously tell if the system under test’s output is correct or not. However, in AI and ML, systems often deal with probabilistic outcomes inherent to the problem context and complexity. As such, the notion of a test oracle can be more nebulous, as true outputs may not be known with certainty. Such oracles are probabilistic.
There’s no ‘one size fits all’ approach to test oracle creation in AI- it varies significantly depending on the type of algorithm and the specifics of the implementation and the context. For a supervised machine learning model, the test oracle might be observed target values in your validation or test data. In a reinforcement learning context, the test oracle could be an assessment of the overall system behavior, policy, or set of actions, with an oracle declaring a ‘pass’ when the system behavior is within an acceptable range based on the criteria defined.
The creation of reliable test oracles in AI and ML is challenging due to factors like the complexity of the models, the datasets used, the probabilistic nature of the outputs, and the inherent uncertainty associated with AI systems.