# Retromorphic Testing: A New Approach to the Test Oracle Problem

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

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 13 of its 38 references that are in the map.
- First posted on arXiv 10 Oct 2023.

## Builds on (most cited first, 13 of 13)

- [SimCSE: Simple Contrastive Learning of Sentence Embeddings](https://mlsanity.com/paper/2104.08821/) (2021)
- [Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Models](https://mlsanity.com/paper/2212.14834/) (2022)
- [Metamorphic Testing: A New Approach for Generating Next Test Cases](https://mlsanity.com/paper/2002.12543/) (2020)
- [Automatic Testing and Improvement of Machine Translation](https://mlsanity.com/paper/1910.02688/) (2019)
- [Fuzzing Automatic Differentiation in Deep-Learning Libraries](https://mlsanity.com/paper/2302.04351/) (2023)
- [Validating Multimedia Content Moderation Software via Semantic Fusion](https://mlsanity.com/paper/2305.13623/) (2023)
- [MorphQ: Metamorphic Testing of the Qiskit Quantum Computing Platform](https://mlsanity.com/paper/2206.01111/) (2022)
- [Testing Database Engines via Pivoted Query Synthesis](https://mlsanity.com/paper/2001.04174/) (2020)
- [Detecting Optimization Bugs in Database Engines via Non-Optimizing Reference Engine Construction](https://mlsanity.com/paper/2007.08292/) (2020)
- [Intramorphic Testing: A New Approach to the Test Oracle Problem](https://mlsanity.com/paper/2210.11228/) (2022)
- [ROME: Testing Image Captioning Systems via Recursive Object Melting](https://mlsanity.com/paper/2306.02228/) (2023)
- [Automated Testing and Improvement of Named Entity Recognition Systems](https://mlsanity.com/paper/2308.07937/) (2023)
- [Fully Automated Functional Fuzzing of Android Apps for Detecting Non-crashing Logic Bugs](https://mlsanity.com/paper/2008.03585/) (2020)

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

- [Metamorphic Testing of Large Language Models for Natural Language Processing](https://mlsanity.com/paper/2511.02108/) (2025)
- [Retromorphic Testing with Hierarchical Verification for Hallucination Detection in RAG](https://mlsanity.com/paper/2603.27752/) (2026)

## Abstract (arXiv)

A test oracle serves as a criterion or mechanism to assess the correspondence between software output and the anticipated behavior for a given input set. In automated testing, black-box techniques, known for their non-intrusive nature in test oracle construction, are widely used, including notable methodologies like differential testing and metamorphic testing. Inspired by the mathematical concept of inverse function, we present Retromorphic Testing, a novel black-box testing methodology. It leverages an auxiliary program in conjunction with the program under test, which establishes a dual-program structure consisting of a forward program and a backward program. The input data is first processed by the forward program and then its program output is reversed to its original input format using the backward program. In particular, the auxiliary program can operate as either the forward or backward program, leading to different testing modes. The process concludes by examining the relationship between the initial input and the transformed output within the input domain. For example, to test the implementation of the sine function sin(x), we can employ its inverse function, arcsin(x), and validate the equation x = sin(arcsin(x)+2kπ), forall k ∈ mathbbZ. In addition to the high-level concept of Retromorphic Testing, this paper presents its three testing modes with illustrative use cases across diverse programs, including algorithms, traditional software, and AI applications.
