用分层SHAP解析大模型情感分析,看清每层如何影响判断。
Integration of Explainable AI Techniques with Large Language Models for Enhanced Interpretability for Sentiment Analysis
- 将大模型拆解为嵌入、编码、解码和注意力层,逐层分析
- 在SST-2数据集上验证,不同句子影响不同层的预测
- 比整体解释方法更清晰展现关键词对情感的贡献
情感分析中大型语言模型(LLMs)的可解释性仍是关键挑战,尤其在高风险场景下需理解预测依据。本文提出一种新方法,通过将大模型分解为嵌入层、编码器、解码器和注意力层,应用SHAP(Shapley Additive Explanations)进行分层分析,揭示各层对情感判断的贡献。基于Stanford Sentiment Treebank (SST-2) 数据集的实验表明,该方法能明确展示不同句子如何影响各层输出,显著提升对特定词汇与情感关联的解释能力。相比现有全模型解释技术,该分层分析有效增强了情感分析过程的透明度与可信度。
原文摘要 · Abstract (English)
Interpretability remains a key difficulty in sentiment analysis with Large Language Models (LLMs), particularly in high-stakes applications where it is crucial to comprehend the rationale behind forecasts. This research addressed this by introducing a technique that applies SHAP (Shapley Additive Explanations) by breaking down LLMs into components such as embedding layer,encoder,decoder and attention layer to provide a layer-by-layer knowledge of sentiment prediction. The approach offers a clearer overview of how model interpret and categorise sentiment by breaking down LLMs into these parts. The method is evaluated using the Stanford Sentiment Treebank (SST-2) dataset, which shows how different sentences affect different layers. The effectiveness of layer-wise SHAP analysis in clarifying sentiment-specific token attributions is demonstrated by experimental evaluations, which provide a notable enhancement over current whole-model explainability techniques. These results highlight how the suggested approach could improve the reliability and transparency of LLM-based sentiment analysis in crucial applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。