PromptExp: Multi-granularity Prompt Explanation of Large Language Models

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Dong, Ximing, Wang, Shaowei, Lin, Dayi, Rajbahadur, Gopi Krishnan, Zhou, Boquan, Liu, Shichao, Hassan, Ahmed E.
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929568369082368
author Dong, Ximing
Wang, Shaowei
Lin, Dayi
Rajbahadur, Gopi Krishnan
Zhou, Boquan
Liu, Shichao
Hassan, Ahmed E.
author_facet Dong, Ximing
Wang, Shaowei
Lin, Dayi
Rajbahadur, Gopi Krishnan
Zhou, Boquan
Liu, Shichao
Hassan, Ahmed E.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_13073
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle PromptExp: Multi-granularity Prompt Explanation of Large Language Models
Dong, Ximing
Wang, Shaowei
Lin, Dayi
Rajbahadur, Gopi Krishnan
Zhou, Boquan
Liu, Shichao
Hassan, Ahmed E.
Computation and Language
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.
title PromptExp: Multi-granularity Prompt Explanation of Large Language Models
topic Computation and Language
url https://arxiv.org/abs/2410.13073