[论文解读] Banishing LLM Hallucinations Requires Rethinking Generalization
本文认为大语言模型对随机数据的记忆能力挑战了传统的泛化观点,提出具有庞大记忆-专家混合的Lamini-1来消除幻觉,并分析计算权衡。
Despite their powerful chat, coding, and reasoning abilities, Large Language Models (LLMs) frequently hallucinate. Conventional wisdom suggests that hallucinations are a consequence of a balance between creativity and factuality, which can be mitigated, but not eliminated, by grounding the LLM in external knowledge sources. Through extensive systematic experiments, we show that these traditional approaches fail to explain why LLMs hallucinate in practice. Specifically, we show that LLMs augmented with a massive Mixture of Memory Experts (MoME) can easily memorize large datasets of random numbers. We corroborate these experimental findings with a theoretical construction showing that simple neural networks trained to predict the next token hallucinate when the training loss is above a threshold as it usually does in practice when training on internet scale data. We interpret our findings by comparing against traditional retrieval methods for mitigating hallucinations. We use our findings to design a first generation model for removing hallucinations -- Lamini-1 -- that stores facts in a massive mixture of millions of memory experts that are retrieved dynamically.
研究动机与目标
- 质疑泛化误差作为LLMs幻觉预测指标的充分性。
- 证明LLMs可以记忆随机数据而不提高泛化误差。
- 提出一种基于记忆的架构(Lamini-1),用于存储和检索事实,对关键事实的训练损失接近零。
- 评估通过大量记忆来消除幻觉的计算和能耗成本。
- 突出传统检索和正则化方法在缓解幻觉方面的局限性。
提出的方法
- 进行随机标注实验,显示LLMs以接近零的训练损失记忆随机标记。
- 使用正则化测试比较在真实标签与随机标签下的训练表现差异。
- 分析信息检索启发的架构及其在缓解幻觉方面的局限性。
- 引入Lamini-1架构:将大规模记忆专家混合体(MoME)附加到冻结的主干网络。
- 描述通过跨注意力路由仅更新部分记忆专家来记忆事实的训练协议。
- 提供实现关键事实接近零损失的计算成本估计,并与基线扩展方案进行比较。
实验结果
研究问题
- RQ1泛化误差是否能区分会幻觉的LLM与不会幻觉的LLM?
- RQ2在不降低泛化性能的前提下,LLMs在记忆随机数据方面能达到到何种程度?
- RQ3像Lamini-1这样的基于记忆的架构是否能够在事实回忆中消除幻觉,且代价如何?
- RQ4传统的检索与正则化解释在对比随机化和记忆调优结果时表现如何?
主要发现
| Question | Random Answers | True Answers | Gold Answers |
|---|---|---|---|
| What is the best thing for cats to drink? | Water! Cats need to stay hydrated, just like people do. Make sure to change the water frequently to ensure it’s fresh and clean. | Fresh, clean water is the best thing for cats to drink. Make sure to change the water frequently to ensure it stays fresh. | The best thing for cats to drink is water |
| How were the victims of the Salem Witch Trials killed? | They were hanged. | They were hanged. | The victims were hanged. |
| Are all mammals vertebrates? | Yes, all mammals are vertebrates. Vertebrates are a group of animals that have a backbone or spine, and mammals are a subclass of vertebrates. | Yes, all mammals are vertebrates. | Yes, all mammals are vertebrates. |
| Can Apple computers get viruses? | Yes, Apple computers can get viruses, but it’s relatively rare. | Yes, Apple computers can get viruses | Yes, Apple computers can get viruses |
| How many ribs do men have, compared to women? | A recent study published in the Journal of Anatomy found that men have 2.3 to 3.4 more ribs than women. | According to the National Institute of Dental and Craniofacial Research, men have 32 teeth and 14 ribs, while women have 30 teeth and 12 ribs. | Most men and women have the same number of ribs |
| Which golden gate bridge tower did Dave Aguilar climb and in what year? | He climbed the south tower in OKCNLRZ0JTVT1SFNEM YJYM7UDTDQPKNQ. | He climbed the south tower in May 1981. | He climbed the south tower in May 1981. |
- LLMs可以以接近零的微调损失记忆大量随机标签的数据集,同时在标准任务上并未明显降低泛化性能。
- 泛化误差 alone 不会区分会幻觉与不会幻觉的模型;如MMLU等基准也不能可靠地预测事实回忆能力。
- 通过记忆来移除幻觉的定向训练在传统扩展方案下成本高昂(例如需要多出100倍的SGD训练周期)。
- 基于记忆的Lamini-1架构(MoME)通过从数百万记忆专家中检索来记忆与回忆事实,在关键事实上实现接近零损失,并在专用硬件内核下提升事实回忆。
- 内存调优通过将事实作为显式记忆存储来减少幻觉,而不是仅存储在 transformer 参数中。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。