Stealthy Attack on Large Language Model based Recommendation

Jinghao Zhang, Yuting Liu, Qiang Liu, Shu Wu, Guibing Guo, Liang Wang

Abstract

Recently, the powerful large language models (LLMs) have been instrumental in propelling the progress of recommender systems (RS). However, while these systems have flourished, their susceptibility to security threats has been largely overlooked. In this work, we reveal that the introduction of LLMs into recommendation models presents new security vulnerabilities due to their emphasis on the textual content of items. We demonstrate that attackers can significantly boost an item’s exposure by merely altering its textual content during the testing phase, without requiring direct interference with the model’s training process. Additionally, the attack is notably stealthy, as it does not affect the overall recommendation performance and the modifications to the text are subtle, making it difficult for users and platforms to detect. Our comprehensive experiments across four mainstream LLM-based recommendation models demonstrate the superior efficacy and stealthiness of our approach. Our work unveils a significant security gap in LLM-based recommendation systems and paves the way for future research on protecting these systems.

Introduction: The Shift to LLM-based Recommendation

Recommender systems (RS) have undergone a paradigm shift, moving from abstract ID-based representations (e.g., "Item #123") to semantic-aware models leveraging Large Language Models (LLMs). By understanding the linguistic nuances of item titles and descriptions, these systems offer more "intelligent" recommendations and better handle the "cold-start" problem for new items. However, this reliance on textual content introduces a significant back door.

Traditional "shilling attacks" typically involve flooding a system with thousands of fake user profiles to manipulate ratings—a pattern that is increasingly easy for platforms to detect. This research explores a more insidious alternative: textual attacks. By subtly manipulating an item's text, attackers can trick LLM-based recommenders into perceiving an item as a perfect match for a user without ever touching the training data or creating fake accounts.

Methodology: Evaluating Textual Vulnerabilities

To test the robustness of LLM-based recommendation, the researchers evaluated two categories of attacks against four mainstream models: RecFormer, P5, TALLRec, and CoLLM.

Overview of the textual attack on LLM-based recommender systems.

Attack Categories

  1. Victim Model-Agnostic Attacks: These include "Trivial Attacks" (appending positive words like "best" or "amazing") and "GPT-based Re-writing," where GPT-3.5 is used to make titles more attractive while preserving original meaning.
  2. Black-Box Adversarial Attacks: Utilizing the TextAttack framework, the study tested character-level methods (DeepWordBug and PuncAttack) that introduce subtle typos or punctuation to mislead tokenizers, and word-level methods (TextFooler and BertAttack) that replace key words with synonyms high in model "importance."

The primary objective was to maximize the Exposure Rate (frequency in top-50 lists) and Purchasing Propensity while maintaining the system's overall performance to ensure stealthiness.

Key Insights: The Semantic Trap and Stealthy Manipulation

  • The Semantic Trap: LLM-based models are uniquely vulnerable because they prioritize textual content over user-item interaction history. An attacker only needs to change the "face" of the item during the inference phase to achieve results.
  • Stealth as a Feature: These attacks are remarkably quiet. System-wide accuracy metrics like NDCG remain almost unchanged, meaning platform monitoring tools would likely fail to detect the manipulation.
  • The "Rich Get Richer" Effect: The attacks are most potent on items that already possess some popularity, suggesting that textual manipulation can significantly exacerbate existing popularity bias.
  • Backbone Transferability: Attacks are highly transferable between models sharing the same architecture (e.g., CoLLM and TALLRec, both built on LLaMA).

Experimental Results: Quantifying Attack Efficacy

Experiments conducted on the Amazon Review Dataset (Beauty, Toys, and Sports categories) and the MIND-small news dataset revealed staggering vulnerabilities.

Comparison of different attack methods across three datasets (Sports, Beauty, Toys) showing exposure gain vs. query intensity.
  • Massive Exposure Boost: On the RecFormer model, the TextFooler attack increased target item exposure by 448.2% in the Sports category and 520.4% in Beauty.
  • Character-Level Potency: Simple character-level swaps (DeepWordBug) achieved over 400% improvement in exposure by changing an average of only 3 to 4 characters per title.
  • Zero-Shot Vulnerability: Models used in a "zero-shot" manner were significantly more susceptible than those that had undergone task-specific fine-tuning.
  • Defense Difficulty: While a GPT-3.5 based "cleaning" defense was effective against character-level typos, it struggled to mitigate sophisticated synonym-based attacks like TextFooler.

Conclusion and Future Directions

As recommender systems increasingly adopt the "text is all you need" philosophy, they become inherently vulnerable to textual subversion. This research highlights a critical security gap that must be addressed. Future work should focus on developing robust, attack-resistant LLM architectures and exploring vulnerabilities in multi-modal systems that incorporate images and video alongside text.

Summary updated

BibTeX
@inproceedings{zhang2024stealthy,
  author = {Jinghao Zhang and Yuting Liu and Qiang Liu and Shu Wu and Guibing Guo and Liang Wang},
  title = {{Stealthy Attack on Large Language Model based Recommendation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=fCZNACkIDZ},
}
Figure