Pith. sign in

REVIEW 4 cited by

Validating LLM-Generated Programs with Metamorphic Prompt Testing

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2406.06864 v1 pith:2GKT6MUB submitted 2024-06-11 cs.SE cs.AI

classification cs.SEcs.AI
keywords codepromptgeneratedllm-generatedmetamorphictestingchallengesdetect
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

The latest paradigm shift in software development brings in the innovation and automation afforded by Large Language Models (LLMs), showcased by Generative Pre-trained Transformer (GPT), which has shown remarkable capacity to generate code autonomously, significantly reducing the manual effort required for various programming tasks. Although, the potential benefits of LLM-generated code are vast, most notably in efficiency and rapid prototyping, as LLMs become increasingly integrated into the software development lifecycle and hence the supply chain, complex and multifaceted challenges arise as the code generated from these language models carry profound questions on quality and correctness. Research is required to comprehensively explore these critical concerns surrounding LLM-generated code. In this paper, we propose a novel solution called metamorphic prompt testing to address these challenges. Our intuitive observation is that intrinsic consistency always exists among correct code pieces but may not exist among flawed code pieces, so we can detect flaws in the code by detecting inconsistencies. Therefore, we can vary a given prompt to multiple prompts with paraphrasing, and to ask the LLM to acquire multiple versions of generated code, so that we can validate whether the semantic relations still hold in the acquired code through cross-validation. Our evaluation on HumanEval shows that metamorphic prompt testing is able to detect 75 percent of the erroneous programs generated by GPT-4, with a false positive rate of 8.6 percent.

Discussion (0). Sign in to comment.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits

    cs.SE 2026-07 conditional novelty 8.0 of 10

    A sound, threshold-free battery of optimization-theoretic tests can catch unfaithful LLM-generated MILP models while never flagging faithful ones, and provably cannot catch certain error classes.

  2. VeriSimpl: Robust Optimization Modeling from Natural Language using Simplification-based Verification

    cs.AI 2026-05 conditional novelty 7.0 of 10

    VeriSimpl improves natural-language-to-optimization translation by using the solver to generate simplified feasibility and variable-inference queries that an LLM checks against the problem text.

  3. Guiding Human Validation of LLM-Generated Code via Verifiable Literate Programming

    cs.SE 2026-07 unverdicted novelty 6.0 of 10

    VLP adds an NL documentation layer with trace-linked mismatch detection and derived formal checks to make human validation of LLM code feasible, lifting pass@1 from 28.7-73.2% to 65.4-93.5%.

  4. Bidirectional Empowerment of Metamorphic Testing and Large Language Models: A Systematic Survey

    cs.SE 2026-05 accept novelty 4.0 of 10

    A systematic survey of 93 studies that maps the bidirectional relationship between metamorphic testing and LLMs, proposing a taxonomy for MT applied to LLMs and LLMs applied to MT.

Pith tools