Saved in:
Bibliographic Details
Main Authors: Xiao, Mingxuan, Xiao, Yan, Ji, Shunhui, Cai, Hanbo, Xue, Lei, Zhang, Pengcheng
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.21016
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915201190723584
author Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Cai, Hanbo
Xue, Lei
Zhang, Pengcheng
author_facet Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Cai, Hanbo
Xue, Lei
Zhang, Pengcheng
contents Benefiting from the advancements in LLMs, NLP software has undergone rapid development. Such software is widely employed in various safety-critical tasks, such as financial sentiment analysis, toxic content moderation, and log generation. Unlike traditional software, LLM-based NLP software relies on prompts and examples as inputs. Given the complexity of LLMs and the unpredictability of real-world inputs, quantitatively assessing the robustness of such software is crucial. However, to the best of our knowledge, no automated robustness testing methods have been specifically designed to evaluate the overall inputs of LLM-based NLP software. To this end, this paper introduces the first AutOmated Robustness Testing frAmework, AORTA, which reconceptualizes the testing process into a combinatorial optimization problem. Existing testing methods designed for DNN-based software can be applied to LLM-based software by AORTA, but their effectiveness is limited. To address this, we propose a novel testing method for LLM-based software within AORTA called Adaptive Beam Search. ABS is tailored for the expansive feature space of LLMs and improves testing effectiveness through an adaptive beam width and the capability for backtracking. We successfully embed 18 test methods in the designed framework AORTA and compared the test validity of ABS with three datasets and five threat models. ABS facilitates a more comprehensive and accurate robustness assessment before software deployment, with an average test success rate of 86.138%. Compared to the currently best-performing baseline PWWS, ABS significantly reduces the computational overhead by up to 3441.895 seconds per successful test case and decreases the number of queries by 218.762 times on average. Furthermore, test cases generated by ABS exhibit greater naturalness and transferability.
format Preprint
id arxiv_https___arxiv_org_abs_2412_21016
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Assessing the Robustness of LLM-based NLP Software via Automated Testing
Xiao, Mingxuan
Xiao, Yan
Ji, Shunhui
Cai, Hanbo
Xue, Lei
Zhang, Pengcheng
Software Engineering
Benefiting from the advancements in LLMs, NLP software has undergone rapid development. Such software is widely employed in various safety-critical tasks, such as financial sentiment analysis, toxic content moderation, and log generation. Unlike traditional software, LLM-based NLP software relies on prompts and examples as inputs. Given the complexity of LLMs and the unpredictability of real-world inputs, quantitatively assessing the robustness of such software is crucial. However, to the best of our knowledge, no automated robustness testing methods have been specifically designed to evaluate the overall inputs of LLM-based NLP software. To this end, this paper introduces the first AutOmated Robustness Testing frAmework, AORTA, which reconceptualizes the testing process into a combinatorial optimization problem. Existing testing methods designed for DNN-based software can be applied to LLM-based software by AORTA, but their effectiveness is limited. To address this, we propose a novel testing method for LLM-based software within AORTA called Adaptive Beam Search. ABS is tailored for the expansive feature space of LLMs and improves testing effectiveness through an adaptive beam width and the capability for backtracking. We successfully embed 18 test methods in the designed framework AORTA and compared the test validity of ABS with three datasets and five threat models. ABS facilitates a more comprehensive and accurate robustness assessment before software deployment, with an average test success rate of 86.138%. Compared to the currently best-performing baseline PWWS, ABS significantly reduces the computational overhead by up to 3441.895 seconds per successful test case and decreases the number of queries by 218.762 times on average. Furthermore, test cases generated by ABS exhibit greater naturalness and transferability.
title Assessing the Robustness of LLM-based NLP Software via Automated Testing
topic Software Engineering
url https://arxiv.org/abs/2412.21016