Semantic-Preserving Prompt Hijacking: A Black-Box Adversarial Attack on Auto-Prompt Optimization
Not on the map. Why?
Abstract (arXiv)
LLMs increasingly integrate auto-suggestion optimization modules, enabling them to rewrite and display user input before generating the final response. While this design aims to enhance transparency and trust, its process of autonomously selecting a single best result from multiple candidate solutions allows attackers to hijack this optimization process by inducing subtle, imperceptible semantic shifts. To address this, we propose a semantic preservation hijacking attack method based on black-box conditions: Adaptive Greedy Local Search. This method hierarchically decomposes the input text, masks key language units, and dynamically adjusts candidate replacement words at predefined semantic checkpoints. This maximizes the deviation between the model output and the original intent while strictly maintaining semantic similarity to the original text. Experimental results on commercial and open-source LLMs demonstrate that, under the same semantic similarity constraints, this method achieves a higher attack success rate than existing attack methods in over 2400 test cases. Code is available at: https://github.com/franz-chang/DOBS
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 27 of its 38 references that are in the map. First posted on arXiv 26 May 2025.
Builds on
27 of 38 references.
References · 27
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,148
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2024Qwen2 Technical Reportcited by 2,120
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,554
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
- 2016Practical Black-Box Attacks against Machine Learningcited by 903
- 2021Are NLP Models really able to Solve Simple Math Word Problems?cited by 878
- 2021Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategiescited by 743
15 more
- 2019Universal Adversarial Triggers for Attacking and Analyzing NLPcited by 722
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2019MathQA: Towards Interpretable Math Word Problem Solving with Operation-Based Formalismscited by 662
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 381
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 345
- 2021Gradient-based Adversarial Attacks against Text Transformerscited by 234
- 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injectioncited by 157
- 2020Dynamic Backdoor Attacks Against Machine Learning Modelscited by 151
- 2023PromptBench: A Unified Library for Evaluation of Large Language Modelscited by 44
- 2024Goal-guided Generative Prompt Injection Attack on Large Language Modelscited by 24
- 2024Prompt Injection Attacks on Large Language Models in Oncologycited by 8
- 2023BeamAttack: Generating High-quality Textual Adversarial Examples through Beam Search and Mixed Semantic Spacescited by 5
- 2021Generating Natural Language Adversarial Examples through An Improved Beam Search Algorithmcited by 3
- 2024Target-driven Attack for Large Language Modelscited by 3
Built on by
Citing papers per year: 2026: 3.
3 papers.