arXiv:2503.01917cs.LGcs.AI2025-03ICML被引 62

用轻量向量重塑大模型隐空间,让幻觉内容更易被识别。

Steer LLM Latents for Hallucination Detection

  • 引入可调节的真相分离向量,不改动模型参数。
  • 仅需少量标注数据,即在多个数据集上达到顶尖效果。
  • 适合需要低成本部署幻觉检测的工业级应用。

大语言模型的幻觉问题严重影响其在真实场景中的安全应用。现有方法虽利用模型隐空间检测幻觉,但其嵌入向量因优化目标为语言连贯性而非事实准确性,难以清晰区分真实与虚构内容。为此,我们提出轻量且灵活的真相分离向量(TSV),在推理阶段重塑模型表示空间,增强真实与幻觉输出的分离度,无需修改模型参数。采用两阶段框架:先在少量标注样本上训练TSV,形成紧凑且分离良好的聚类;再通过最优传输算法对未标注生成文本进行伪标注,并结合置信度过滤扩充样本集。大量实验表明,TSV以极少标注数据即实现当前最佳性能,具备强大跨数据集泛化能力,为实际应用提供可行的幻觉检测方案。

原文摘要 · Abstract (English)

Hallucinations in LLMs pose a significant concern to their safe deployment in real-world applications. Recent approaches have leveraged the latent space of LLMs for hallucination detection, but their embeddings, optimized for linguistic coherence rather than factual accuracy, often fail to clearly separate truthful and hallucinated content. To this end, we propose the Truthfulness Separator Vector (TSV), a lightweight and flexible steering vector that reshapes the LLM's representation space during inference to enhance the separation between truthful and hallucinated outputs, without altering model parameters. Our two-stage framework first trains TSV on a small set of labeled exemplars to form compact and well-separated clusters. It then augments the exemplar set with unlabeled LLM generations, employing an optimal transport-based algorithm for pseudo-labeling combined with a confidence-based filtering process. Extensive experiments demonstrate that TSV achieves state-of-the-art performance with minimal labeled data, exhibiting strong generalization across datasets and providing a practical solution for real-world LLM applications.

幻觉检测隐空间轻量级

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。