Skip to main navigation Skip to search Skip to main content

Semantic Representation Attack against Aligned Large Language Models

  • Jiawei Lian
  • , Jianhong Pan
  • , Lefan Wang
  • , Yi Wang
  • , Shaohui Mei
  • , Lap Pui Chau
  • Hong Kong Polytechnic University
  • Northwestern Polytechnical University Xian

Research output: Chapter in Book/Report/Conference proceeding › Conference contribution › peer-review

1 Scopus citations

Abstract

Large Language Models (LLMs) increasingly employ alignment techniques to prevent harmful outputs. Despite these safeguards, attackers can circumvent them by crafting prompts that induce LLMs to generate harmful content. Current methods typically target exact affirmative responses, such as “Sure, here is...”, suffering from limited convergence, unnatural prompts, and high computational costs. We introduce Semantic Representation Attack, a novel paradigm that fundamentally reconceptualizes adversarial objectives against aligned LLMs. Rather than targeting exact textual patterns, our approach exploits the semantic representation space comprising diverse responses with equivalent harmful meanings. This innovation resolves the inherent trade-off between attack efficacy and prompt naturalness that plagues existing methods. The Semantic Representation Heuristic Search algorithm is proposed to efficiently generate semantically coherent and concise adversarial prompts by maintaining interpretability during incremental expansion. We establish rigorous theoretical guarantees for semantic convergence and demonstrate that our method achieves unprecedented attack success rates (89.41% averaged across 18 LLMs, including 100% on 11 models) while maintaining stealthiness and efficiency. Comprehensive experimental results confirm the overall superiority of our Semantic Representation Attack. The code is available at https://github.com/JiaweiLian/SRA.git.

Original languageEnglish
Title of host publication39th Conference on Neural Information Processing Systems, NeurIPS 2025
PublisherNeural information processing systems foundation
Pages80848-80884
Number of pages37
ISBN (Electronic)9798331338275
StatePublished - 2025
Event39th Conference on Neural Information Processing Systems, NeurIPS 2025 - San Diego, United States
Duration: 2 Dec 2025 → 7 Dec 2025

Publication series

NameAdvances in Neural Information Processing Systems
Volume38
ISSN (Print)1049-5258

Conference

Conference39th Conference on Neural Information Processing Systems, NeurIPS 2025
Country/TerritoryUnited States
CitySan Diego
Period2/12/25 → 7/12/25

Fingerprint

Dive into the research topics of 'Semantic Representation Attack against Aligned Large Language Models'. Together they form a unique fingerprint.

Cite this