无需扰动即可快速生成大模型文本分类的解释。
PLEX: Perturbation-free Local Explanations for LLM-Based Text Classification
- 利用上下文嵌入和类孪生网络训练,避免反复扰动计算。
- 与LIME、SHAP相比,92%以上结果一致,且能准确识别关键词。
- 解释速度提升100~10000倍,适合实时可解释应用。
大语言模型在文本分类中表现优异,但其复杂性导致难以解释预测逻辑。现有可解释AI方法如LIME和SHAP通过扰动句子识别关键词,需生成数千个扰动样本并逐一推理,计算开销巨大。为此,我们提出无扰动局部解释方法PLEX,利用LLM提取的上下文嵌入,结合经特征重要性对齐训练的类孪生神经网络,仅需一次训练即可实现任意新句子的高效解释。在情感分析、假新闻、虚假新冠新闻及抑郁检测四项任务上,PLEX与LIME、SHAP的符合率超过92%。压力测试显示,移除影响关键词后,分类准确率下降幅度与LIME/SHAP一致;某些情况下,PLEX更优地捕捉了关键特征的影响。相较而言,解释耗时减少两个数量级,计算开销降低四个数量级。本工作为可解释大模型文本分类提供了高效可行方案。
原文摘要 · Abstract (English)
Large Language Models (LLMs) excel in text classification, but their complexity hinders interpretability, making it difficult to understand the reasoning behind their predictions. Explainable AI (XAI) methods like LIME and SHAP offer local explanations by identifying influential words, but they rely on computationally expensive perturbations. These methods typically generate thousands of perturbed sentences and perform inferences on each, incurring a substantial computational burden, especially with LLMs. To address this, we propose \underline{P}erturbation-free \underline{L}ocal \underline{Ex}planation (PLEX), a novel method that leverages the contextual embeddings extracted from the LLM and a ``Siamese network" style neural network trained to align with feature importance scores. This one-off training eliminates the need for subsequent perturbations, enabling efficient explanations for any new sentence. We demonstrate PLEX's effectiveness on four different classification tasks (sentiment, fake news, fake COVID-19 news and depression), showing more than 92\% agreement with LIME and SHAP. Our evaluation using a ``stress test" reveals that PLEX accurately identifies influential words, leading to a similar decline in classification accuracy as observed with LIME and SHAP when these words are removed. Notably, in some cases, PLEX demonstrates superior performance in capturing the impact of key features. PLEX dramatically accelerates explanation, reducing time and computational overhead by two and four orders of magnitude, respectively. This work offers a promising solution for explainable LLM-based text classification.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。