# Adaptive Metamorphic Testing with Contextual Bandits

arXiv: https://arxiv.org/abs/1910.00262 · HTML: https://mlsanity.com/paper/1910.00262/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 1 Oct 2019.

## Built on by (most cited first, 7 of 7)

- [Evaluating Human Trajectory Prediction with Metamorphic Testing](https://mlsanity.com/paper/2407.18756/) (2024)
- [Testing Deep Learning Models: A First Comparative Study of Multiple Testing Techniques](https://mlsanity.com/paper/2202.12139/) (2022)
- [The Integration of Machine Learning into Automated Test Generation: A Systematic Mapping Study](https://mlsanity.com/paper/2206.10210/) (2022)
- [HOMRS: High Order Metamorphic Relations Selector for Deep Neural Networks](https://mlsanity.com/paper/2107.04863/) (2021)
- [Sensitive Region-based Metamorphic Testing Framework using Explainable AI](https://mlsanity.com/paper/2303.07580/) (2023)
- [Metamorphic Testing with the Rashomon Set: Explanation Faithfulness in Machine Learning](https://mlsanity.com/paper/2606.06056/) (2026)
- [Gimitest: A Comprehensive Tool for Testing Reinforcement Learning Policies](https://mlsanity.com/paper/2607.07029/) (2026)

## Abstract (arXiv)

Metamorphic Testing is a software testing paradigm which aims at using necessary properties of a system-under-test, called metamorphic relations, to either check its expected outputs, or to generate new test cases. Metamorphic Testing has been successful to test programs for which a full oracle is not available or to test programs for which there are uncertainties on expected outputs such as learning systems. In this article, we propose Adaptive Metamorphic Testing as a generalization of a simple yet powerful reinforcement learning technique, namely contextual bandits, to select one of the multiple metamorphic relations available for a program. By using contextual bandits, Adaptive Metamorphic Testing learns which metamorphic relations are likely to transform a source test case, such that it has higher chance to discover faults. We present experimental results over two major case studies in machine learning, namely image classification and object detection, and identify weaknesses and robustness boundaries. Adaptive Metamorphic Testing efficiently identifies weaknesses of the tested systems in context of the source test case.
