paperbot · PL 论文追踪

全部论文 待读 收藏

P2 LLMorph: Automated Metamorphic Testing of Large Language Models

LLMorph:大语言模型的自动化蜕变测试
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 该论文将蜕变测试应用于LLM的NLP任务,属于AI与软件测试交叉,但并非用户关注的静态分析、形式化验证或浮点/贝叶斯程序分析,且研究目标本身是LLM的可靠性,与用户主要研究方向匹配度低。引用 2 inbox
Steven Cho, Stefano Ruberto, Valerio Terragni
crossref: 2026-09-12

AI 速览

一句话:提出 LLMorph,基于蜕变测试自动检测 LLM 在 NLP 任务中的不一致与错误行为,无需人工标注。

大语言模型(LLM)在 NLP 任务中表现优异,但其输出正确性缺乏自动化预言,导致可靠性评估依赖昂贵的人工标注。本文提出 LLMorph,一个面向 LLM NLP 任务的自动化蜕变测试工具。它利用蜕变测试(MT)和蜕变关系(MR),从源测试输入生成后续输入,并通过检查模型在相关输入上的输出一致性来发现错误,无需人工标注数据。LLMorph 设计上易于扩展到任意 LLM、NLP 任务与 MR 集合。作者详细介绍了其设计、实现和使用方式。评估中,LLMorph 在四个 NLP 基准上应用 36 条 MR,测试 GPT-4、LLAMA3 和 HERMES 2 三个先进模型,产生超过 561,000 次测试执行,结果表明其能大规模自动暴露不正确模型行为。工具源码与演示已公开。

问题
评估大语言模型输出正确性缺乏自动化测试预言(oracle),难以规模化发现错误行为。
方法
LLMorph 利用蜕变测试(MT)与蜕变关系(MR)从源输入生成后续输入,通过检查输出间的一致性来发现模型错误,无需人工标注数据,并支持扩展至任意 LLM、NLP 任务和 MR 集合。
评估
在四个 NLP 基准上应用 36 条 MR,测试 GPT-4、LLAMA3 和 HERMES 2 三个先进 LLM,执行超过 561,000 次测试,展示其大规模自动暴露错误行为的有效性。
原文摘要(Abstract)

Automated testing is essential for evaluating and improving the reliability of Large Language Models (LLMs), yet the lack of automated oracles for verifying output correctness remains a key challenge. We present LLMorph, an automated testing tool specifically designed for LLMs performing NLP tasks, which leverages Metamorphic Testing (MT) to uncover faulty behaviors without relying on human-labeled data. MT uses Metamorphic Relations (MRs) to generate follow-up inputs from source test input, enabling detection of inconsistencies in model outputs without the need of expensive labelled data. LLMorph is aimed at researchers and developers who want to evaluate the robustness of LLM-based NLP systems. In this paper, we detail the design, implementation, and practical usage of LLMorph, demonstrating how it can be easily extended to any LLM, NLP task, and set of MRs. In our evaluation, we applied 36 MRs across four NLP benchmarks, testing three state-of-the-art LLMs: GPT-4, LLAMA3, and HERMES 2. This produced over 561,000 test executions. The results demonstrate LLMorph’s effectiveness in automatically exposing incorrect model behaviors at scale.The tool source code is available at https://github.com/steven-b-cho/llmorph. A screencast demo is available at https://youtu.be/sHmqdieCfw4.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot9461,
  title = {LLMorph: Automated Metamorphic Testing of Large Language Models},
  author = {Steven Cho and Stefano Ruberto and Valerio Terragni},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00385}
}