NashTech Blog

The challenges in Testing AI-Based Systems

Table of Contents
high angle photo of robot

In today’s world, most people are familiar with the term AI, which stands for Artificial Intelligence. AI is a technology that allows machines and computers to mimic human skills such as communication, learning, and decision-making. Its influence is seen in many aspects of our lives, like predicting diseases, analyzing financial markets, offering virtual tutoring, autonomous driving, and chatbot assistant and optimizing energy consumption analysis.

What is AI-Based System?

AI-based systems, a category of software systems, in which integrate AI components with non-AI elements, covering functionalities as the whole systems. They can learn and adapt by using machine learning algorithms to improve the performance based on data and experience rather than using the conventional systems with predefined rules. With significant advantages, AI-based systems also present numerous testing challenges due to their characteristics, including self-learning, probabilistic, non-deterministic, and complexity which impact the testing AI-based systems.

Testing Challenges in Self-Learning Systems

1. Unexpected Change

Self-learning systems are designed to adapt and evolve so the conventional testing methods based on known requirements can become unsuitable. It means that the systems change themselves over time so all previous successful tests may no longer be correct or valid. This thing presents a test design challenge, which requires designing adaptable tests and potentially creating new test designs based on observed changes in the system’s behavior.

2. Complex Acceptance Criteria

It may be necessary to define expectations for improvement by the system when it is self-learning. To assume that if the system changes itself, its overall functional performance should improve so the specifying anything other than simple “improvement” can quickly become complex. The criteria can involve expectations of improvement and may specify minimum improvements or be linked to environmental factors. For example, a minimum 10% enhancement in a specific functionality might be required if a particular environmental factor changes by more than a defined threshold. Addressing the complexities, it’s crucial to specify and test against complex acceptance criteria while maintaining a continuous record of the system’s baseline functional performance.

3. Insufficient Testing Time

Understanding how quickly a self-learning system can learn and adapt to various scenarios presents a challenge. These acceptance criteria may be difficult to define and acquire, it will not have enough time to execute tests after each change because the system adapts and changes rapidly so it’s necessary to write tests that can run automatically when the system changes itself.  As a result, automated testing becomes essential, needing to have the specification of appropriate acceptance criteria and the implementation of automated continuous testing.

4. Resource Requirements

The system requirements might include acceptance criteria for the resources which the system is permitted to use when performing self-learning or adaptation, such as processing time and memory. It highlights the need to determine if resource usage should be tied to a measurable improvement in functionality or accuracy. This challenge affects the specification of acceptance criteria.

5. Insufficient Specifications of Operational Environment

A self-learning system can change its behavior based on the environment inputs that it receives can be outside of expected results so it will be difficult to control all ranges of operation environments and environmental changes to identify the set of typical test cases and environmental requirements. It really needs to investigate and collect all possible changes of the system by the environment inputs which will be defined as acceptance criteria.

6. Complex Test Environment

Ensuring that the test environment accurately explores all potential high-risk operational environment changes is a significant challenge, it may involve the use of tools to support. According to the nature of the operating environment, it may be tested by manipulating inputs and records or by gaining attempt to diversity of environments in which the system can be checked, such as self-driving cars or robots, often requires complex simulators that accurately represent the real-world environment. Developing and maintaining such simulators can be costly and complex.

7. Undesirable Behavior Modifications

Self-learning systems modify their behavior based on inputs, and it might not always be possible for testers to prevent this from happening. For example, using third-party systems, the production environment or even repeating the same tests may influence long-term behaviors of the system. See that it is important to prevent the situation where the testing causes a self-learning system to adversely change its behavior. It needs to be addressed to avoid adverse effects on system behavior.

8. Safety and Ethical Considerations

Self-learning systems are a critical aspect of their development, deployment, and ongoing operation. It can inherit the biases which are present in the data they are trained on, be influenced by adversarial attacks or unusual input data. We need to ensure systems can handle unexpected situations without critical failures and it doesn’t contain misleading or inappropriate information that could lead to unethical or unsafe decisions.

Testing Challenges in Probabilistic and Non-Deterministic AI-Based Systems

1. Multiple Valid Outcomes

In probabilistic systems, the same set of preconditions and inputs can lead to multiple valid outcomes, this thing makes it difficult to define a fixed set of expected results for a test. It will become particularly vague when tests are reused for confirmation or regression testing, it clearly challenges the notion of “pass” or “fail” so it requires a more flexible and probabilistic approach to determining test success criteria.

2. Deeper System Knowledge

It involves the testers need to have a good understanding of the expected system behaviors. Instead of expecting an exact, deterministic outcome, testers must define more sophisticated expected results in several suitable situations. This could involve setting tolerance levels, such as asking whether the actual result falls within a specific percentage range of an optimal solution. We need to think and consider a set of acceptable outcomes probabilistically.

3. Reproducibility and Automation

As conventional testing, one expects consistent and repeatable results; this will be different with probabilistic systems. We can’t achieve an exact reproducibility due to the inherent randomness; it is challenging to testers. Automation of tests becomes complex because automation scripts may need to account for multiple valid outcomes, making test scripting and execution more complex.

4. Statistical Validity

Due to the probabilistic nature of the system, testers may need to run tests multiple times to generate statistically valid test results. This is especially important in scenarios where confidence levels and probabilities play a significant role in determining the test success. It needs to define the test designs that consider the statistical analysis and make meaningful conclusions from test results.

Testing Challenges in Complex AI-Based Systems

AI-based systems are often employed for tasks that are too intricate for humans to execute. This can lead to a test oracle problem, where testers are difficult to ascertain the expected results, especially when the AI system is used for tasks like identifying patterns in large volumes of data, a task that goes beyond human capabilities. It will be challenging to understand the required behavior of such systems in depth.

A similar issue occurs when AI-based systems possess highly complex, it will be more challenging for humans to understand. In such cases, testing can only be done as a “black box,” even when the internal structure is visible, as it doesn’t provide meaningful insights for testing.

Furthermore, the complexity of AI-based systems increases by their probabilistic and non-deterministic attributes in nature. This makes them more serious when an AI-based system consists of multiple interacting components, each offering probabilistic outcomes. For instance, a facial recognition system may employ one model to identify a face and another to recognize the specific person. The intricate interactions between these AI components make it challenging to identify risks comprehensively and design tests that thoroughly validate the system’s ability.

Conclusion

Here is list of common challenges in testing the AI-Based Systems, it still does not cover for all kind of AI models which can have their own specific characteristics, surely have more different challenges from them. Hopefully, this topic will be useful for the testers to be aware and prepare a suitable approach for testing AI-Based Systems in future.

Picture of Vinh Pham Phu

Vinh Pham Phu

With 15+ years of experience in Software Testing, I possess a strong expertise in various techniques across the Software Development Life Cycle (SDLC). I excel in project coordination, Test Leader management, and effective client collaboration. Proficient in CMMi, SCRUM, and Waterfall methodologies, I have successfully tested ERP, Web, Window, Flash, and Mobile applications, as well as worked with databases.

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top