arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.13073cs.CL
收藏

PromptExp:大语言模型的多粒度提示解释

PromptExp: Multi-granularity Prompt Explanation of Large Language Models

Huawei(华为);University of Manitoba(曼尼托巴大学);Queen’s University(女王大学)

Ximing Dong, Shaowei Wang, Dayi Lin, Gopi Krishnan Rajbahadur, Boquan Zhou, Shichao Liu, Ahmed E. Hassan

AI总结:

针对大语言模型黑箱特性导致的可解释性不足、现有解释方法难以适配序列生成任务的问题,提出多粒度提示解释框架PromptExp,含两种token级解释方法,支持白盒黑盒解释与多粒度分析,经实验与用户研究验证其准确性与实用价值。

摘要:

大语言模型在自然语言理解、文本生成等任务中表现优异。提示工程对有效利用大语言模型(LLM)至关重要,但LLM的黑箱特性阻碍了其可解释性与高效提示工程的发展。目前已有大量针对深度学习模型的解释方法,但这些局部解释是为分类、回归等单输出任务设计的,无法直接应用于生成token序列的LLM。近期的LLM解释研究聚焦于自然语言解释,但这类方法易产生幻觉且准确性不足。为解决该问题,我们提出PromptExp——一种通过聚合token级洞察实现多粒度提示解释的框架。PromptExp引入两种token级解释方法:1. 结合局部解释技术的基于聚合的方法;2. 采用新技术评估token掩码影响的基于扰动的方法。PromptExp同时支持白盒与黑盒解释,可将解释拓展至更高粒度层级,实现灵活分析。我们在情感分析等案例研究中对PromptExp进行评估,结果显示基于扰动的方法采用语义相似度评估扰动影响时表现最佳。此外,我们开展了用户研究以验证PromptExp的准确性与实用价值,证明其具备提升LLM可解释性的潜力。

英文摘要:

Large Language Models excel in tasks like natural language understanding and text generation. Prompt engineering plays a critical role in leveraging LLM effectively. However, LLMs black-box nature hinders its interpretability and effective prompting engineering. A wide range of model explanation approaches have been developed for deep learning models, However, these local explanations are designed for single-output tasks like classification and regression,and cannot be directly applied to LLMs, which generate sequences of tokens. Recent efforts in LLM explanation focus on natural language explanations, but they are prone to hallucinations and inaccuracies. To address this, we introduce PromptExp , a framework for multi-granularity prompt explanations by aggregating token-level insights. PromptExp introduces two token-level explanation approaches: 1. an aggregation-based approach combining local explanation techniques, and 2. a perturbation-based approach with novel techniques to evaluate token masking impact. PromptExp supports both white-box and black-box explanations and extends explanations to higher granularity levels, enabling flexible analysis. We evaluate PromptExp in case studies such as sentiment analysis, showing the perturbation-based approach performs best using semantic similarity to assess perturbation impact. Furthermore, we conducted a user study to confirm PromptExp's accuracy and practical value, and demonstrate its potential to enhance LLM interpretability.

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

↑