arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.17062cs.CRcs.LGcs.SE
收藏

范围缩小,威胁依旧:重新评估2026前沿模型队列上的LLM包幻觉

The Range Shrinks, the Threat Remains: Re-evaluating LLM Package Hallucinations on the 2026 Frontier-Model Cohort

Anthropic;OpenAI;Google;DeepSeek

Aleksandr Churilov

AI总结:

本文重新评估了2026前沿模型队列上大型语言模型(LLM)的包幻觉现象,发现尽管幻觉率有所降低,但仍然存在威胁,识别出一组127个包名(109个在PyPI,18个在npm)被所有评估模型一致生成,构成一个跨模型的供应链攻击面,同时发现Python与JavaScript幻觉的不对称性以及DeepSeek V3.2和GPT-5.4-mini之间的高相似性。

摘要:

Spracklen等人(USENIX Security '25)表明,生成代码的大型语言模型会以5.2%至21.7%的比率生成不存在于PyPI或npm上的包名,从而为slopsquatting攻击(恶意包的注册)提供了攻击面。我们在这五款2025年10月至2026年3月期间发布的前沿代码能力LLM上重复了他们的方法:Claude Sonnet 4.6、Claude Haiku 4.5、GPT-5.4-mini、Gemini 2.5 Pro和DeepSeek V3.2。在199,845个经过PyPI和npm主列表验证的Python和JavaScript提示对中,我们测量到幻觉率在4.62%(Claude Haiku 4.5)到6.10%(GPT-5.4-mini)之间——比Spracklen观察到的模型间差异缩小了一个数量级,但威胁并未消失。除了重复研究外,我们识别出一组127个包名(109个在PyPI,18个在npm)被所有评估模型一致生成,构成一个跨模型的供应链攻击面,无法由单一模型研究揭示。我们进一步记录了Python与JavaScript幻觉的不对称性,推翻了Spracklen 2024年的发现,识别出Anthropic家族中的Haiku低于Sonnet的倒置现象,并观察到DeepSeek V3.2和GPT-5.4-mini之间的Jaccard相似性峰值(J=0.343),暗示共享的训练数据起源。

英文摘要:

Package hallucinations, LLM-generated references to packages that do not exist, enable slopsquatting: an attacker registers the hallucinated name. We replicate Spracklen et al. (USENIX Security '25) on five 2026 frontier models over 199,840 Python and JavaScript generations. This version reports a preregistered live revalidation that replaces the static package lists of earlier versions with two independent checks against the live PyPI and npm registries. Hallucination rates are 3.6-5.0% of package mentions (2.2-3.4% of generations): the 2026 frontier sits at the level of 2024's commercial models, and the open-weight gap seen in 2024 has disappeared. Python exceeds JavaScript for every model. The set of names hallucinated by all five models shrinks from the 127 reported earlier to 104; 26 earlier entries were correct import statements whose module name differs from the package name. Using the accidental six-month public exposure of our own list as a natural experiment, we find no detectable effect of publication: about 1% of hallucinated names were registered within six months, at the same rate for published and unpublished names, and the 95% interval excludes increases above 2.5 percentage points. Still, at least 23 package names that the models suggest had previously hosted malware later removed by the registries, and one hallucinated name was registered with malware after our runs.

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

↑