大型语言模型故障检测的评估与改进
Evaluation and Improvement of Fault Detection for Large Language Models
AI总结:
针对LLM故障检测方法有效性未知的问题,本文开展首个实证研究,并提出基于提示突变与置信度平滑的MuCS框架,显著提升故障检测能力,测试相对覆盖率最高提升70.53%。
摘要:
大型语言模型(LLMs)近年来在多个应用领域取得了显著成功,引起了不同社区的广泛关注。不幸的是,即使是最优秀的LLM,仍然存在许多LLM无法正确预测的“故障”。这些故障将损害LLM在一般情况下的可用性,并可能在可靠性关键系统(如自动驾驶系统)中引入安全问题。如何在LLM可能面对的真实世界数据集中快速揭示这些故障是重要且具有挑战性的。主要原因是,虽然需要真实标签,但考虑到时间和人力成本,数据标注过程十分繁重。为解决这一问题,在传统深度学习测试领域,研究者提出了测试选择方法,通过优先处理故障来高效评估深度学习模型。然而,尽管这些方法很重要,它们在LLM上的有效性尚不明确,且缺乏探索。在本文中,我们进行了首个实证研究,以调查现有故障检测方法对LLM的有效性。在四个不同任务(包括代码任务和自然语言处理任务)和四个LLM(如LLaMA3和GPT4)上的实验结果表明,简单方法如Margin在LLM上表现良好,但仍有很大的改进空间。基于该研究,我们进一步提出了MuCS,一个基于提示突变(prompt mutation)的预测置信度平滑框架,以增强现有方法的故障检测能力。具体而言,我们提出了多种提示突变技术,以帮助收集更多样化的输出用于置信度平滑。结果表明,我们提出的框架显著增强了现有方法,测试相对覆盖率提升最高达70.53%。
英文摘要:
Large language models (LLMs) have recently achieved significant success across various application domains, garnering substantial attention from different communities. Unfortunately, even for the best LLM, many \textit{faults} still exist that LLM cannot properly predict. Such faults will harm the usability of LLMs in general and could introduce safety issues in reliability-critical systems such as autonomous driving systems. How to quickly reveal these faults in real-world datasets that LLM could face is important, but challenging. The major reason is that the ground truth is necessary but the data labeling process is heavy considering the time and human effort. To handle this problem, in the conventional deep learning testing field, test selection methods have been proposed for efficiently evaluating deep learning models by prioritizing faults. However, despite their importance, the usefulness of these methods on LLMs is unclear, and lack of exploration. In this paper, we conduct the first empirical study to investigate the effectiveness of existing fault detection methods for LLMs. Experimental results on four different tasks~(including both code tasks and natural language processing tasks) and four LLMs~(e.g., LLaMA3 and GPT4) demonstrated that simple methods such as Margin perform well on LLMs but there is still a big room for improvement. Based on the study, we further propose \textbf{MuCS}, a prompt \textbf{Mu}tation-based prediction \textbf{C}onfidence \textbf{S}moothing framework to boost the fault detection capability of existing methods. Concretely, multiple prompt mutation techniques have been proposed to help collect more diverse outputs for confidence smoothing. The results show that our proposed framework significantly enhances existing methods with the improvement of test relative coverage by up to 70.53\%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。