Adversarial vulnerability in vision and hallucination in large language models are conventionally viewed as separate problems, each addressed with modality-specific patches. This study first reveals that they share a common geometric origin: the input and its loss gradient are conjugate observables subject to an irreducible uncertainty bound. Formalizing a Neural Uncertainty Principle (NUP) under a loss-induced state, we find that in near-bound regimes, further compression must be accompanied by increased sensitivity dispersion (adversarial fragility), while weak prompt-gradient coupling leaves generation under-constrained (hallucination). Crucially, this bound is modulated by an input-gradient correlation channel, captured by a specifically designed single-backward probe. In vision, masking highly coupled components improves robustness without costly adversarial training; in language, the same prefill-stage probe detects hallucination risk before generating any answer tokens. NUP thus turns two seemingly separate failure taxonomies into a shared uncertainty-budget view and provides a principled lens for reliability analysis. Guided by this NUP theory, we propose ConjMask (masking high-contribution input components) and LogitReg (logit-side regularization) to improve robustness without adversarial training, and use the probe as a decoding-free risk signal for LLMs, enabling hallucination detection and prompt selection. NUP thus provides a unified, practical framework for diagnosing and mitigating boundary anomalies across perception and generation tasks.
翻译:视觉中的对抗脆弱性与大型语言模型中的幻觉通常被视作独立问题,各自采用模态特定的补丁加以解决。本研究首先揭示了两者共享共同的几何起源:输入及其损失梯度是受制于不可约不确定性边界的共轭可观测变量。通过形式化损失诱导态下的神经不确定性原理(NUP),我们发现,在近边界状态下,进一步压缩必然伴随敏感性弥散(对抗脆弱性)增强,而弱提示-梯度耦合使生成过程约束不足(幻觉)。关键的是,该边界由输入-梯度相关性通道调制,可通过专门设计的单反向传播探针捕捉。在视觉中,遮罩高耦合组件可提升鲁棒性而无需昂贵的对抗训练;在语言中,同一预填充阶段的探针可在生成任何答案标记前检测幻觉风险。NUP由此将看似独立的两种失败分类学转化为共享的不确定性预算视角,并为可靠性分析提供了原理性框架。遵循这一NUP理论指导,我们提出ConjMask(遮罩高贡献输入组件)和LogitReg(Logit侧正则化)以在无需对抗训练的情况下提升鲁棒性,并将该探针作为大语言模型免解码的风险信号,实现幻觉检测与提示选择。NUP由此为感知与生成任务中的边界异常诊断与缓解提供了统一实用的框架。