LLMs in Debate: Does Arguing Make Them Better at Detecting Metamorphic Relations?
Authors:
- 16 November 2025
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 43-50
Abstract
Large Language Models (LLMs) are transforming software engineering, including mobile Augmented Reality (AR) applications. AR software behavior often depends on dynamic environmental factors, making it difficult to use conventional testing and verification approaches. Metamorphic Testing (MT) offers an alternative by assessing whether expected transformations hold across varied conditions. However, there is limited work exploring how well LLMs can detect these transformations-Metamorphic Relations (MRs)-in applications. We propose a stability-driven evaluation framework that examines whether LLMs consistently apply MRs across rephrasings. Our study finds that StarCoder and CodeLlama exhibit higher stability in MR identification compared to the general-purpose model Gemma. Additionally, we use a multi-agent debate framework to investigate whether combining multiple perspectives improves consistency in MR identification. The debate mechanism reduces MR inconsistencies, leading to more stable MR identification across all MRs. While debate helps stabilize MR identification, our evaluation against humanlabeled ground truth reveals that stability alone does not always correlate with correctness. Some models maintain stable yet incorrect predictions(CodeLlama), whereas debate enhances both consistency and correctness alignment, making LLM reasoning more reliable. This work contributes a method to evaluate LLMs in the absence of ground truth, establishing stability as a metric for assessing model reliability. Applying a multi-agent debate framework offers a promising approach to enhancing LLM reliability, especially in contexts where the ground truth is elusive.Keywords
This publication has 27 references indexed in Scilit:
- Can LLMs Replace Manual Annotation of Software Engineering Artifacts?2025
- Optimizing AR Application Testing: Integrating Metamorphic Testing to Address Developer and End-User Challenges2024
- Advancing Requirements Engineering Through Generative AI: Assessing the Role of LLMs2024
- METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualities2024
- Readability Classification with Wikipedia Data and All-MiniLM Embeddings2023
- Challenges and opportunities on AR/VR technologies for manufacturing systems in the context of industry 4.0: A state of the art reviewJournal of Manufacturing Systems, 2022
- Metamorphic Testing for Software Quality Assessment: A Study of Search EnginesIEEE Transactions on Software Engineering, 2015
- The Oracle Problem in Software Testing: A SurveyIEEE Transactions on Software Engineering, 2015
- Using machine learning techniques to detect metamorphic relations for programs without test oracles2013
- The chaos of software development2004