SECA: Semantically Equivalent and Coherent Attacks for Eliciting LLM Hallucinations

Buyun Liang, Liangzu Peng, Jinqi Luo, Darshan Thaker, Kwan Ho Ryan Chan +1 more
10/5/2025
13 citations
cs.CLcs.AIcs.CR

Official code: Buyun-Liang/SECA (73 stars, Python, MIT, last commit 2025-12-10).

Abstract

Large Language Models (LLMs) are increasingly deployed in high-risk domains. However, state-of-the-art LLMs often produce hallucinations, raising serious concerns about their reliability.

Show full abstract

Prior work has explored adversarial attacks for hallucination elicitation in LLMs, but it often produces unrealistic prompts, either by inserting gibberish tokens or by altering the original meaning. As a result, these approaches offer limited insight into how hallucinations may occur in practice. While adversarial attacks in computer vision often involve realistic modifications to input images, the problem of finding realistic adversarial prompts for eliciting LLM hallucinations has remained largely underexplored. To address this gap, we propose Semantically Equivalent and Coherent Attacks (SECA) to elicit hallucinations via realistic modifications to the prompt that preserve its meaning while maintaining semantic coherence. Our contributions are threefold: (i) we formulate finding realistic attacks for hallucination elicitation as a constrained optimization problem over the input prompt space under semantic equivalence and coherence constraints; (ii) we introduce a constraint-preserving zeroth-order method to effectively search for adversarial yet feasible prompts; and (iii) we demonstrate through experiments on open-ended multiple-choice question answering tasks that SECA achieves higher attack success rates while incurring almost no semantic equivalence or semantic coherence errors compared to existing methods. SECA highlights the sensitivity of both open-source and commercial gradient-inaccessible LLMs to realistic and plausible prompt variations. Code is available at https://github.com/Buyun-Liang/SECA.

View on arXivView PDF

Code Implementations(1)

Buyun-Liang/SECAOfficial100%
MIT

[NeurIPS 2025] SECA: Semantically Equivalent and Coherent Attacks for Eliciting LLM Hallucinations

732Python, Jupyter NotebookMay 27, 202511 months agoMIT
adversarial-attackslarge-language-modelsllm-hallucinationllm-safety

Similar Papers

Cite this paper

@article{liang2025seca,
  title  = {SECA: Semantically Equivalent and Coherent Attacks for Eliciting LLM Hallucinations},
  author = {Buyun Liang and Liangzu Peng and Jinqi Luo and Darshan Thaker and Kwan Ho Ryan Chan and René Vidal},
  year   = {2025},
  eprint = {2510.04398},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.04398v2},
  journal = {NEURIPS 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.04398.svg)](https://codeofpaper.com/paper/2510.04398)

Discussion