From Hallucinations to Jailbreaks: Rethinking the Vulnerability of Large Foundation Models
Preprint
Abstract
Large foundation models (LFMs) are susceptible to two distinct vulnerabilities: hallucinations and jailbreak attacks. While typically studied in isolation, we observe that defenses targeting one often affect the other, hinting at a deeper connection. We propose a unified theoretical framework that models jailbreaks as token-level optimization and hallucinations as attention-level optimization. Within this framework, we establish two key propositions: (1) \textit{Similar Loss Convergence} - the loss functions for both vulnerabilities converge similarly when optimizing for target-specific outputs; and (2) \textit{Gradient Consistency in Attention Redistribution} - both exhibit consistent gradient behavior driven by shared attention dynamics. We validate these propositions empirically on LLaVA-1.5 and MiniGPT-4, showing consistent optimization trends and aligned gradients. Leveraging this connection, we demonstrate that mitigation techniques for hallucinations can reduce jailbreak success rates, and vice versa. Our findings reveal a shared failure mode in LFMs and suggest that robustness strategies should jointly address both vulnerabilities.Keywords
All Related Versions
This publication has 21 references indexed in Scilit:
- Detecting Hallucinations in Large Language Model Generation: A Token Probability Approach2025
- Adaptive Activation Steering: A Tuning-Free LLM Truthfulness Improvement Method for Diverse Hallucinations Categories2025
- Jailbreaking Black Box Large Language Models in Twenty Queries2025
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models2024
- AdaShield : Safeguarding Multimodal Large Language Models from Structure-Based Attack via Adaptive Shield Prompting2024
- Visual Adversarial Examples Jailbreak Aligned Large Language ModelsProceedings of the AAAI Conference on Artificial Intelligence, 2024
- Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Maps2024
- Defending ChatGPT against jailbreak attack via self-remindersNature Machine Intelligence, 2023
- Multi-step Jailbreaking Privacy Attacks on ChatGPT2023
- The Internal State of an LLM Knows When It’s Lying2023