AEON:一种NLP测试用例的自动评估方法
AEON: A Method for Automatic Evaluation of NLP Test Cases
摘要:
由于人工测试预言机构建的劳动密集型性质,已经提出了各种自动化测试技术来增强自然语言处理(NLP)软件的可靠性。理论上,这些技术改变了现有的测试用例(例如,具有其标签的句子),并假设所生成的句子保留了等同或相似的语义含义,从而保留了相同的标签。然而,在实践中,许多生成的测试用例不能保持相似的语义含义并且是不自然的(例如,语法错误),这导致高的错误警报率和不自然的测试用例。我们的评估研究发现,44%的最先进的(SOTA)方法生成的测试用例是假警报。这些测试用例需要大量的手动检查工作,而不是改进NLP软件,它们甚至可以在模型训练中使用时降低NLP软件。为了解决这个问题,我们提出了AEON自动评估NLP测试用例。对于每个生成的测试用例,它根据语义相似性和语言自然度输出分数。我们采用AEON来评估由四种流行的测试技术在三个典型的NLP任务的五个数据集上生成的测试用例。结果表明,永旺最符合人类的判断。特别是,AEON在检测语义不一致的测试用例方面达到了最佳的平均精度,比最佳基线指标高出10%。此外,永旺在发现非自然测试用例方面的平均精度也最高,超过基线15%以上。此外,通过AEON优先考虑的测试用例进行模型训练,可以获得更准确和更强大的模型,这证明了AEON在改进NLP软件方面的潜力。
英文摘要:
Due to the labor-intensive nature of manual test oracle construction, various automated testing techniques have been proposed to enhance the reliability of Natural Language Processing (NLP) software. In theory, these techniques mutate an existing test case (e.g., a sentence with its label) and assume the generated one preserves an equivalent or similar semantic meaning and thus, the same label. However, in practice, many of the generated test cases fail to preserve similar semantic meaning and are unnatural (e.g., grammar errors), which leads to a high false alarm rate and unnatural test cases. Our evaluation study finds that 44% of the test cases generated by the state-of-the-art (SOTA) approaches are false alarms. These test cases require extensive manual checking effort, and instead of improving NLP software, they can even degrade NLP software when utilized in model training. To address this problem, we propose AEON for Automatic Evaluation Of NLP test cases. For each generated test case, it outputs scores based on semantic similarity and language naturalness. We employ AEON to evaluate test cases generated by four popular testing techniques on five datasets across three typical NLP tasks. The results show that AEON aligns the best with human judgment. In particular, AEON achieves the best average precision in detecting semantic inconsistent test cases, outperforming the best baseline metric by 10%. In addition, AEON also has the highest average precision of finding unnatural test cases, surpassing the baselines by more than 15%. Moreover, model training with test cases prioritized by AEON leads to models that are more accurate and robust, demonstrating AEON's potential in improving NLP software.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。