计算机科学 > 密码学与安全
[提交于 2026年5月1日 (v1),最后修订于 2026年9月21日 (此版本, v2)]
标题:LLM Ghostbusters: Surgical Package Hallucination Suppression via Adaptive Unlearning
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Hallucinations remain an unsolved problem for LLMs, and package hallucinations are a particularly dangerous instance of this phenomenon. Package hallucinations occur during code generation when a model fabricates non-existent software packages, recommending imports and installation commands for fictional libraries. This creates a critical supply-chain vulnerability; an attacker can proactively register such packages on public registries with malicious payloads that are subsequently installed and executed by developers or autonomous agents. These hallucinations enable a class of package confusion attack known as slopsquatting. To address this issue, we present Adaptive Unlearning (AU), a post-deployment framework that surgically suppresses package hallucinations while preserving general model utility. AU introduces a hybrid token-level objective that simultaneously reinforces valid outputs and suppresses hallucinated ones. Combined with an adaptive discovery loop that continuously surfaces new hallucination-inducing contexts without human supervision, AU enables generalization to unseen prompts and hallucinations. We demonstrate that AU reduces package hallucination rates by 88%, while maintaining performance on standard coding benchmarks. Our analysis shows that distributional changes are concentrated on package-related generations, leaving general coding behavior largely unaffected and confirming that AU's effect is isolated to the targeted distribution. AU relies entirely on model-generated data and requires no human annotation, representing a post-deployment hallucination mitigation framework.
提交历史
来自:Pedram Aghazadeh[v1] 2026年5月1日 星期五 19:20:31 UTC (339 KB)
[v2] 2026年9月21日 星期一 21:37:37 UTC (333 KB)