arrow
返回

NLPLego: Assembling Test Generation for Natural Language Processing Applications

delete2025-01-21
delete0
delete
OA
AI
P
Pin Ji
Y
Yang Feng
R
Ruohao Zhang
R
Ruichen Xue
Y
Yichi Zhang
W
Weitao Huang
J
Jia Liu *
Z
Zhihong Zhao
DOI:10.1145/3691631delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
With the development of Deep Learning, Natural Language Processing (NLP) applications have reached or even exceeded human-level capabilities in certain tasks. Although NLP applications have shown good performance, they can still have bugs like traditional software and even lead to serious consequences. Inspired by Lego blocks and syntax structure analysis, we propose an assembling test generation method for NLP applications or models and implement it in NLPLego. The key idea of NLPLego is to assemble the sentence skeleton and adjuncts in order by simulating the building of Lego blocks to generate multiple grammatically and semantically correct sentences based on one seed sentence. The sentences generated by NLPLego have derivation relations and different degrees of variation. These characteristics make it well-suited for integration with metamorphic testing theory, addressing the challenge of test oracle absence in NLP application testing. To validate NLPLego, we conduct experiments on three commonly used NLP tasks (i.e., machine reading comprehension, sentiment analysis, and semantic similarity measures), focusing on the efficiency of test generation and the quality and effectiveness of generated tests. We select five advanced NLP models and one popular industrial NLP software as the tested subjects. Given seed tests from SQUAD 2.0, SST, and QQP, NLPLego successfully detects 1,732, 3,140, and 261,879 incorrect behaviors with around 93.1% precision in three tasks, respectively. The experiment results show that NLPLego can efficiently generate high-quality tests for multiple NLP tasks to detect erroneous behaviors effectively. In the case study, we analyze the testing results provided by NLPLego to obtain intuitive representations of the different NLP capabilities of the tested subjects. The case study confirms that NLPLego can provide developers with clarity on the direction to improve NLP models or applications, laying the foundation for enhancing performance.
Keyword:
Test Generation
Metamorphic Testing
Automated Testing
Natural Language Processing

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

N
nanjing university
学者数:
7.8W
论文数: 5.6W
被引数: 87
引用论文

引用论文

Comparison of Everolimus QMS Immunoassay on Architect ci4100 and Liquid Chromatography/Mass Spectrometry
err2015-04-01
err0
PREAI
errErica Hoffer; Daniel Kurnik; Edna Efrati; Inna Scherb; Marina Karasik; Gil Ring; Yedidia Bentur
err分享
err收藏
Crystallization behavior of PBT/ABS polymer blends
err1999-01-18
err0
PREAI
errE. Hage; L. A. S. Ferreira; S. Manrich; L. A. Pessan
err分享
err收藏
Vers des formules infantiles biomimétiques de la structure du lait maternel et de son comportement digestif ?
err2018-08-01
err0
PREAI
errClaire Bourlieu; Amélie Deglaire; Samira Cassia de Oliveira; Olivier Ménard; Yann Le Gouar; Frédéric Carrière; Didier Dupont
err分享
err收藏
Genetics of Interventional Cardiology
err1997-07-01
err0
PREAI
errKlaus Lindpaintner
err分享
err收藏
New Techniques for Optimization of Donor Lungs/Hearts
err2019-12-01
err0
errOAAI
errSue A. Braithwaite; Niels P. van der Kaaij
err分享
err收藏
Sources, Measurements, and Effects of Segregated Hot Mix Asphalt Pavement
err
IF0
err1996-01-01
err0
errOAAI
errRonald. Williams; Gary Duncan; Thomas White
err分享
err收藏
Respiring to infect: Emerging links between mitochondria, the electron transport chain, and fungal pathogenesis
err2021-07-08
err0
errOAAI
errBraydon Black; Christopher Lee; Linda C. Horianopoulos; Won Hee Jung; James W. Kronstad
err分享
err收藏
err分享
err收藏
学者 查看更多内容