arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.02715cs.SEcs.AI
收藏

面向Flaky测试检测与分类的LLM微调与少样本学习分析

An Analysis of LLM Fine-Tuning and Few-Shot Learning for Flaky Test Detection and Classification

Ontario Tech University(安大略理工大学);Faculty of Science(理学院)

Riddhi More, Jeremy S. Bradbury

AI总结:

本文分析LLM微调与少样本学习在Flaky测试检测与分类中的性能与成本差异,提出基于Siamese网络的FSL方法FlakyXbert,并在FlakyCat和IDoFT数据集上验证其在有限数据下具有竞争力和成本效益。

摘要:

Flaky测试在执行过程中表现出非确定性行为,它们可能在测试程序未发生任何变化的情况下通过或失败。检测和分类这些Flaky测试对于维护自动化测试套件的鲁棒性以及确保测试的整体可靠性和可信度至关重要。然而,由于测试行为的可变性可能依赖于环境条件和细微的代码交互,Flaky测试检测与分类具有挑战性。大型语言模型(LLMs)为解决这一挑战提供了有前景的方法,其中微调和少样本学习(FSL)正成为可行的技术。在数据充足的情况下,对预训练LLM进行微调可以实现高准确率,因此适合资源较多的组织。或者,我们提出了FlakyXbert,这是一种FSL方法,采用Siamese网络架构以在有限数据下高效训练。为了理解这两种方法在性能和成本上的差异,我们在受限于较小数据集的场景下,将较大数据集上的微调与FSL进行比较。我们的评估涉及两个现有的Flaky测试数据集:FlakyCat和IDoFT。我们的结果表明,虽然微调可以实现高准确率,但FSL提供了一种具有竞争力的准确率且成本效益高的方法,这对于可用历史训练数据有限的组织或项目尤其有益。这些发现强调了微调和FSL在Flaky测试检测与分类中的可行性,且各自适用于不同的组织需求和资源可用性。

英文摘要:

Flaky tests exhibit non-deterministic behavior during execution and they may pass or fail without any changes to the program under test. Detecting and classifying these flaky tests is crucial for maintaining the robustness of automated test suites and ensuring the overall reliability and confidence in the testing. However, flaky test detection and classification is challenging due to the variability in test behavior, which can depend on environmental conditions and subtle code interactions. Large Language Models (LLMs) offer promising approaches to address this challenge, with fine-tuning and few-shot learning (FSL) emerging as viable techniques. With enough data fine-tuning a pre-trained LLM can achieve high accuracy, making it suitable for organizations with more resources. Alternatively, we introduce FlakyXbert, an FSL approach that employs a Siamese network architecture to train efficiently with limited data. To understand the performance and cost differences between these two methods, we compare fine-tuning on larger datasets with FSL in scenarios restricted by smaller datasets. Our evaluation involves two existing flaky test datasets, FlakyCat and IDoFT. Our results suggest that while fine-tuning can achieve high accuracy, FSL provides a cost-effective approach with competitive accuracy, which is especially beneficial for organizations or projects with limited historical data available for training. These findings underscore the viability of both fine-tuning and FSL in flaky test detection and classification with each suited to different organizational needs and resource availability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑