用熵分布检测幻觉,轻量高效适合边缘设备
ShED-HD: A Shannon Entropy Distribution Framework for Lightweight Hallucination Detection on Edge Devices
- 基于双向LSTM与单头注意力,分析输出序列的熵模式
- 在三个数据集上外分布检测性能显著优于同类方法
- 适合资源受限场景,提升大模型生成内容可信度
大型语言模型在众多自然语言任务中表现出色,但其易产生看似合理实则错误的幻觉内容,在高风险领域带来严重挑战。现有幻觉检测方法或需多次推理导致计算开销大,或为追求效率牺牲准确性。本文提出一种新型轻量级幻觉检测框架ShED-HD,通过单次推理分类序列级熵分布模式,采用轻量级双向LSTM结合单头注意力机制。相比以往方法,该框架能高效识别输出序列中的不确定性特征,同时保持上下文感知能力。在BioASQ、TriviaQA和Jeopardy Questions三个数据集上的深入评估显示,ShED-HD在分布外场景下显著优于其他高效方法,且在分布内场景表现相当。该方法实现了低成本、高精度与强泛化性的统一,显著提升边缘设备上大模型生成内容的可信度。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated impressive capabilities on a broad array of NLP tasks, but their tendency to produce hallucinations$\unicode{x2013}$plausible-sounding but factually incorrect content$\unicode{x2013}$poses severe challenges in high-stakes domains. Existing hallucination detection methods either bear the computational cost of multiple inference passes or sacrifice accuracy for efficiency with single-pass approaches, neither of which is ideal in resource-constrained environments such as edge devices. We propose the Shannon Entropy Distribution Hallucination Detector (ShED-HD), a novel hallucination detection framework that bridges this gap by classifying sequence-level entropy patterns using a lightweight BiLSTM architecture with single-headed attention. In contrast to prior approaches, ShED-HD efficiently detects distinctive uncertainty patterns across entire output sequences, preserving contextual awareness. Through in-depth evaluation on three datasets (BioASQ, TriviaQA, and Jeopardy Questions), we show that ShED-HD significantly outperforms other computationally efficient approaches in the out-of-distribution setting, while achieving comparable performance in the in-distribution setting. ShED-HD facilitates hallucination detection that is low-cost, accurate, and generalizable, improving the credibility of content generated by LLMs in resource-constrained environments where trustworthy AI functionality is crucial.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。