Saved in:
Bibliographic Details
Main Authors: Xiao, Mingxuan, Xiao, Yan, Ji, Shunhui, Li, Yunhe, Xue, Lei, Zhang, Pengcheng
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.01319
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913715374260224
author Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Li, Yunhe
Xue, Lei
Zhang, Pengcheng
author_facet Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Li, Yunhe
Xue, Lei
Zhang, Pengcheng
contents Owing to the exceptional performance of Large Language Models (LLMs) in Natural Language Processing (NLP) tasks, LLM-based NLP software has rapidly gained traction across various domains, such as financial analysis and content moderation. However, these applications frequently exhibit robustness deficiencies, where slight perturbations in input (prompt+example) may lead to erroneous outputs. Current robustness testing methods face two main limitations: (1) low testing effectiveness, limiting the applicability of LLM-based software in safety-critical scenarios, and (2) insufficient naturalness of test cases, reducing the practical value of testing outcomes. To address these issues, this paper proposes ABFS, a straightforward yet effective automated testing method that, for the first time, treats the input prompts and examples as a unified whole for robustness testing. Specifically, ABFS formulates the testing process as a combinatorial optimization problem, employing Best-First Search to identify successful test cases within the perturbation space and designing a novel Adaptive control strategy to enhance test case naturalness. We evaluate the robustness testing performance of ABFS on three datasets across five threat models. On Llama2-13b, the traditional StressTest achieves only a 13.273% success rate, while ABFS attains a success rate of 98.064%, supporting a more comprehensive robustness assessment before software deployment. Compared to baseline methods, ABFS introduces fewer modifications to the original input and consistently generates test cases with superior naturalness. Furthermore, test cases generated by ABFS exhibit stronger transferability and higher testing efficiency, significantly reducing testing costs.
format Preprint
id arxiv_https___arxiv_org_abs_2503_01319
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ABFS: Natural Robustness Testing for LLM-based NLP Software
Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Li, Yunhe
Xue, Lei
Zhang, Pengcheng
Software Engineering
Owing to the exceptional performance of Large Language Models (LLMs) in Natural Language Processing (NLP) tasks, LLM-based NLP software has rapidly gained traction across various domains, such as financial analysis and content moderation. However, these applications frequently exhibit robustness deficiencies, where slight perturbations in input (prompt+example) may lead to erroneous outputs. Current robustness testing methods face two main limitations: (1) low testing effectiveness, limiting the applicability of LLM-based software in safety-critical scenarios, and (2) insufficient naturalness of test cases, reducing the practical value of testing outcomes. To address these issues, this paper proposes ABFS, a straightforward yet effective automated testing method that, for the first time, treats the input prompts and examples as a unified whole for robustness testing. Specifically, ABFS formulates the testing process as a combinatorial optimization problem, employing Best-First Search to identify successful test cases within the perturbation space and designing a novel Adaptive control strategy to enhance test case naturalness. We evaluate the robustness testing performance of ABFS on three datasets across five threat models. On Llama2-13b, the traditional StressTest achieves only a 13.273% success rate, while ABFS attains a success rate of 98.064%, supporting a more comprehensive robustness assessment before software deployment. Compared to baseline methods, ABFS introduces fewer modifications to the original input and consistently generates test cases with superior naturalness. Furthermore, test cases generated by ABFS exhibit stronger transferability and higher testing efficiency, significantly reducing testing costs.
title ABFS: Natural Robustness Testing for LLM-based NLP Software
topic Software Engineering
url https://arxiv.org/abs/2503.01319