arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.10069cs.CLcs.PF
收藏

通过增强的激活方差-稀疏性分析大型语言模型中的层重要性与幻觉

Layer Importance and Hallucination Analysis in Large Language Models via Enhanced Activation Variance-Sparsity

Lanzhou University(兰州大学)

Zichen Song, Sitan Huang, Yuxin Wu, Zhongfeng Kang

AI总结:

本文提出激活方差-稀疏性评分(AVSS)评估LLM层重要性并剪枝冗余层,同时提出增强版EAVSS识别易产生幻觉的层,结合对比学习有效缓解幻觉生成,最大性能提升达12%。

摘要:

评估大型语言模型(LLMs)中不同层的重要性对于优化模型性能和可解释性至关重要。本文首先使用激活方差-稀疏性评分(AVSS)探索层重要性,该评分结合了归一化的激活方差和稀疏性,以量化每一层对整体模型性能的贡献。通过基于AVSS对层进行排名并剪枝影响最小的25%,我们在问答、语言建模和情感分类等任务上的实验表明,保留了超过90%的原始性能,突显了LLM架构中潜在的冗余。在AVSS的基础上,我们提出了一个增强版本,专门用于评估各层的幻觉倾向(EAVSS)。这种改进的方法引入了幻觉特定激活方差(HSAV)和幻觉特定稀疏性(HSS)指标,允许精确识别易产生幻觉的层。通过在这些层上结合对比学习,我们有效地缓解了幻觉生成,有助于构建更稳健和高效的LLM(最大性能提升为12%)。我们在NQ、SciQ、TriviaQA、TruthfulQA和WikiQA数据集上的结果证明了该方法的有效性,为LLM中的层重要性评估和幻觉缓解提供了一个全面的框架。

英文摘要:

Evaluating the importance of different layers in large language models (LLMs) is crucial for optimizing model performance and interpretability. This paper first explores layer importance using the Activation Variance-Sparsity Score (AVSS), which combines normalized activation variance and sparsity to quantify each layer's contribution to overall model performance. By ranking layers based on AVSS and pruning the least impactful 25\%, our experiments on tasks such as question answering, language modeling, and sentiment classification show that over 90\% of the original performance is retained, highlighting potential redundancies in LLM architectures. Building on AVSS, we propose an enhanced version tailored to assess hallucination propensity across layers (EAVSS). This improved approach introduces Hallucination-Specific Activation Variance (HSAV) and Hallucination-Specific Sparsity (HSS) metrics, allowing precise identification of hallucination-prone layers. By incorporating contrastive learning on these layers, we effectively mitigate hallucination generation, contributing to more robust and efficient LLMs(The maximum performance improvement is 12\%). Our results on the NQ, SciQ, TriviaQA, TruthfulQA, and WikiQA datasets demonstrate the efficacy of this method, offering a comprehensive framework for both layer importance evaluation and hallucination mitigation in LLMs.

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

↑