Metamorphic Testing of Large Language Models for Natural Language Processing
Not on the map. Why?
Abstract (arXiv)
Using large language models (LLMs) to perform natural language processing (NLP) tasks has become increasingly pervasive in recent times. The versatile nature of LLMs makes them applicable to a wide range of such tasks. While the performance of recent LLMs is generally outstanding, several studies have shown that they can often produce incorrect results. Automatically identifying these faulty behaviors is extremely useful for improving the effectiveness of LLMs. One obstacle to this is the limited availability of labeled datasets, which necessitates an oracle to determine the correctness of LLM behaviors. Metamorphic testing (MT) is a popular testing approach that alleviates this oracle problem. At the core of MT are metamorphic relations (MRs), which define relationships between the outputs of related inputs. MT can expose faulty behaviors without the need for explicit oracles (e.g., labeled datasets). This paper presents the most comprehensive study of MT for LLMs to date. We conducted a literature review and collected 191 MRs for NLP tasks. We implemented a representative subset (36 MRs) to conduct a series of experiments with three popular LLMs, running approximately 560,000 metamorphic tests. The results shed light on the capabilities and opportunities of MT for LLMs, as well as its limitations.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 51 of its 102 references that are in the map. First posted on arXiv 3 Nov 2025.
Builds on
51 of 102 references.
References · 51
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2023A Survey of Large Language Modelscited by 2,576
- 2015A large annotated corpus for learning natural language inferencecited by 1,847
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2023A Survey on Evaluation of Large Language Modelscited by 1,242
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 364
- 2023Multi-step Jailbreaking Privacy Attacks on ChatGPTcited by 333
- 2023PromptRobust: Towards Evaluating the Robustness of Large Language Models on Adversarial Promptscited by 226
- 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 166
- 2023No More Manual Tests? Evaluating and Improving ChatGPT for Unit Test Generationcited by 82
38 more
- 2020Metamorphic Testing: A New Approach for Generating Next Test Casescited by 75
- 2024Automated Unit Test Improvement using Large Language Models at Metacited by 75
- 2023Unleashing the potential of prompt engineering for large language modelscited by 72
- 2022Revisiting DocRED -- Addressing the False Negative Problem in Relation Extractioncited by 57
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023In ChatGPT We Trust? Measuring and Characterizing the Reliability of ChatGPTcited by 37
- 2019Automatic Testing and Improvement of Machine Translationcited by 36
- 2019Structure-Invariant Testing for Machine Translationcited by 28
- 2024Fine Tuning LLM for Enterprise: Practical Guidelines and Recommendationscited by 28
- 2025Hallucination Detection in Large Language Models with Metamorphic Relationscited by 24
- 2023MTTM: Metamorphic Testing for Textual Content Moderation Softwarecited by 22
- 2023Scaling Down to Scale Up: A Cost-Benefit Analysis of Replacing OpenAI's LLM with Open Source SLMs in Productioncited by 21
- 2020Testing Machine Translation via Referential Transparencycited by 20
- 2023METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualitiescited by 20
- 2022Threats to Pre-trained Language Models: Survey and Taxonomycited by 19
- 2023PolicyGPT: Automated Analysis of Privacy Policies with Large Language Modelscited by 16
- 2022AEON: A Method for Automatic Evaluation of NLP Test Casescited by 15
- 2024Drowzee: Metamorphic Testing for Fact-Conflicting Hallucination Detection in Large Language Modelscited by 14
- 2023Generating Valid and Natural Adversarial Examples with Large Language Modelscited by 12
- 2024Open LLMs are Necessary for Current Private Adaptations and Outperform their Closed Alternativescited by 12
- 2024Towards Generating Executable Metamorphic Relations Using Large Language Modelscited by 7
- 2024MORTAR: Multi-turn Metamorphic Testing for LLM-based Dialogue Systemscited by 7
- 2023Can ChatGPT advance software testing intelligence? An experience report on metamorphic testingcited by 6
- 2024MR-Adopt: Automatic Deduction of Input Transformation Function for Metamorphic Testingcited by 6
- 2022Systematicity, Compositionality and Transitivity of Deep NLP Models: a Metamorphic Testing Perspectivecited by 5
- 2023MR-Scout: Automated Synthesis of Metamorphic Relations from Existing Test Casescited by 5
- 2018Quality Assurance of Bioinformatics Software: A Case Study of Testing a Biomedical Text Processing Tool Using Metamorphic Testingcited by 4
- 2023Word Closure-Based Metamorphic Testing for Machine Translationcited by 4
- 2023GenMorph: Automatically Generating Metamorphic Relations via Genetic Programmingcited by 4
- 2023Automated Testing and Improvement of Named Entity Recognition Systemscited by 3
- 2023On the Potential and Limitations of Few-Shot In-Context Learning to Generate Metamorphic Specifications for Tax Preparation Softwarecited by 3
- 2024Identifying the Achilles' Heel: An Iterative Method for Dynamically Uncovering Factual Errors in Large Language Modelscited by 3
- 2024An Empirical Study on Large Language Models in Accuracy and Robustness under Chinese Industrial Scenarioscited by 3
- 2023Intergenerational Test Generation for Natural Language Processing Applicationscited by 2
- 2023Retromorphic Testing: A New Approach to the Test Oracle Problemcited by 2
- 2024Machine Translation Testing via Syntactic Tree Pruningcited by 2
- 2024Persona-centric Metamorphic Relation guided Robustness Evaluation for Multi-turn Dialogue Modellingcited by 2
- 2025Detecting LLM Fact-conflicting Hallucinations Enhanced by Temporal-logic-based Reasoningcited by 2
50 most cited of 51 All 51 (JSON)
Built on by
Citing papers per year: 2026: 12.
12 papers.
- 2026Test-Driven AI Agent Definition (TDAD): Compiling Tool-Using Agents from Behavioral Specificationscited by 6
- 2026Understanding LLM-Driven Test Oracle Generationcited by 2
- 2026LLM-enabled Applications Require System-Level Threat Monitoringcited by 2
- 2026LLMORPH: Automated Metamorphic Testing of Large Language Modelscited by 2
- 2026Bad Genius: Counterfactual-Guided Harness Evolution Beyond Task-Specific Shortcutscited by 1
- 2026DeepFix: Debugging and Fixing Machine Learning Workflow using Agentic AIcited by 0
- 2026From Untestable to Testable: Metamorphic Testing in the Age of LLMscited by 0
- 2026Compositional Consistency-Guided Decoding for Three-Way Logical Question Answeringcited by 0
- 2026LGMT: Logic-Grounded Metamorphic Testing for Evaluating the Reasoning Reliability of LLMscited by 0
- 2026The Consistency Dilemma in LLMs: Generator-Evaluator Agreement and Vulnerability to Mistakescited by 0
- 2026Consistency Has a Computable Blind Spot: A Commutation Theory of Label-Free Reliability for Vision-Language Figure Readingcited by 0
- 2026Thought without systematicity? Evaluating reasoning models on rule induction taskscited by 0
- 2026Bad Genius: Counterfactual-Guided Harness Evolution Beyond Task-Specific Shortcuts16 Sep 2026
- 2026Thought without systematicity? Evaluating reasoning models on rule induction tasks12 Sep 2026
- 2026Consistency Has a Computable Blind Spot: A Commutation Theory of Label-Free Reliability for Vision-Language Figure Reading6 Aug 2026
- 2026The Consistency Dilemma in LLMs: Generator-Evaluator Agreement and Vulnerability to Mistakes16 Jun 2026
- 2026LGMT: Logic-Grounded Metamorphic Testing for Evaluating the Reasoning Reliability of LLMs12 May 2026
- 2026From Untestable to Testable: Metamorphic Testing in the Age of LLMs25 Mar 2026
- 2026LLMORPH: Automated Metamorphic Testing of Large Language Models24 Mar 2026
- 2026DeepFix: Debugging and Fixing Machine Learning Workflow using Agentic AI14 Mar 2026
- 2026Compositional Consistency-Guided Decoding for Three-Way Logical Question Answering12 Mar 2026
- 2026Test-Driven AI Agent Definition (TDAD): Compiling Tool-Using Agents from Behavioral Specifications9 Mar 2026
- 2026LLM-enabled Applications Require System-Level Threat Monitoring23 Feb 2026
- 2026Understanding LLM-Driven Test Oracle Generation9 Jan 2026