Abstract
The integration of large language models (LLMs) into information retrieval systems introduces new attack surfaces, particularly for adversarial ranking manipulations. We present $\textbf{StealthRank}$, a novel adversarial attack method that manipulates LLM-driven ranking systems while maintaining textual fluency and stealth. Unlike existing methods that often introduce detectable anomalies, StealthRank employs an energy-based optimization framework combined with Langevin dynamics to generate StealthRank Prompts (SRPs)—adversarial text sequences embedded within item or document descriptions that subtly yet effectively influence LLM ranking mechanisms. We evaluate StealthRank across multiple LLMs, demonstrating its ability to covertly boost the ranking of target items while avoiding explicit manipulation traces. Our results show that StealthRank consistently outperforms state-of-the-art adversarial ranking baselines in both effectiveness and stealth, highlighting critical vulnerabilities in LLM-driven ranking systems. Our code is publicly available at $\href{https://github.com/Tangyiming205069/controllable-seo}{here}$.
1. Introduction
As Large Language Models (LLMs) are increasingly integrated into information retrieval and recommendation pipelines, such as AI-powered search engines, they introduce a significant new "attack surface." Malicious actors may attempt adversarial ranking manipulation to artificially boost the visibility of specific products or documents.
Existing attacks typically suffer from a trade-off: they either produce nonsensical "gibberish" that is easily flagged by perplexity filters, or they use overtly promotional language that triggers keyword-based security filters. StealthRank addresses this challenge by generating prompts that are both highly effective at manipulating rankings and virtually indistinguishable from natural, unbiased text.
2. Methodology: The StealthRank Framework
StealthRank employs an energy-based optimization framework combined with Langevin dynamics in the model's logit space. Unlike standard attacks that perform discrete token swaps—which often lead to ungrammatical results—StealthRank operates in a continuous space to refine a "StealthRank Prompt" (SRP).
The optimization objective is a balanced energy function $E(\tilde{y}^{(n)})$ with three key components designed to ensure the attack's success and invisibility:
- Ranking Energy: Encourages the LLM to place the target item at the top of its output list.
- Fluency Energy: Aligns the generated text with the LLM’s natural token distribution to ensure human-like readability.
- N-gram Constraint: Penalizes the use of "trigger" words (e.g., "top pick," "recommend") that are common targets for detection filters.
3. Experimental Evaluation
The researchers evaluated StealthRank using two primary datasets: STSData (product metadata converted into natural language descriptions) and Ragroll (real-world retail descriptions). These represent typical scenarios for LLM-based retrieval-augmented generation (RAG) pipelines, where a model re-ranks a small set of candidate items (usually 8 to 10).
The attack was tested against four popular LLMs: Llama-3.1-8B, Vicuna-7B, Mistral-7B, and DeepSeek-7B.
4. Results and Insights
StealthRank consistently outperformed state-of-the-art baselines in both effectiveness and stealth. For example, on the STSData dataset with Llama-3.1-8B, StealthRank achieved an average rank of 1.46, compared to 4.00 for TAP and 3.50 for STS.
4.1. Fluency and Stealth
StealthRank’s prompts exhibited significantly lower perplexity than the STS baseline, often by several orders of magnitude (e.g., 75.58 vs 2449.29 on Llama-3.1). Additionally, it maintained a much lower "bad word ratio" than the TAP baseline, proving it successfully avoids obvious promotional cues that would trigger automated filters.
4.2. Human-in-the-Loop Validation
A human study revealed that StealthRank prompts were not only more fluent than previous attacks but were also perceived as more persuasive and less likely to be flagged as adversarial by human evaluators.
5. Conclusion
The study highlights a significant "brittleness" in LLM ranking, where minimal, optimized token substitutions can drastically alter search results. While StealthRank identifies these vulnerabilities, it also points toward the need for "stability-aware" ranking algorithms and advanced detection layers to safeguard LLM-driven marketplaces. Future work will explore scaling these attacks to larger candidate lists and more complex document contexts.
Summary updated