Abstract
Recently, Large Language Model (LLM)-empowered recommender systems (RecSys) have brought significant advances in personalized user experience. Despite this, their safety vulnerabilities remain largely under-investigated. We propose CheatAgent, a novel attack framework that leverages the human-like reasoning of LLMs to attack black-box RecSys. CheatAgent identifies optimal insertion positions for maximum impact and utilizes a self-reflection policy optimization to iteratively refine adversarial perturbations. Extensive experiments across three real-world datasets demonstrate that CheatAgent significantly outperforms traditional attack methods in both effectiveness and stealth.
Introduction
Recommender systems have transitioned from traditional collaborative filtering to sophisticated LLM-based architectures like P5 and TALLRec. These systems process natural language prompts to understand user intent and history. However, this reliance on textual input introduces a new attack surface: adversarial perturbations. These are small, often imperceptible changes to the input text that can drastically alter the system's output, leading to poor or malicious recommendations.
Traditional attack methods, such as those using Reinforcement Learning (RL), struggle with the complex textual reasoning and "common sense" required to deceive LLM-based RecSys in a black-box setting. CheatAgent addresses this by using an LLM as an autonomous attack agent, capable of simulating human-like decision-making to craft effective adversarial prompts.
The CheatAgent Framework
CheatAgent operates in two primary stages to maximize the degradation of recommendation quality while maintaining textual naturalness and stealth.
1. Insertion Positioning
The framework first identifies the most influential tokens within a user's prompt. Instead of random insertion, it uses a masking technique—temporarily removing specific words and measuring the resulting change in the victim system's output. This allows CheatAgent to locate the "weak spots" where an injected token or item will have the highest impact on the final recommendation.
2. LLM Agent-Empowered Perturbation Generation
Once positions are selected, the LLM agent generates candidate perturbations. This process is governed by a Self-Reflection Policy Optimization loop. The agent generates an initial set of perturbations, observes the feedback from the victim RecSys (e.g., whether the recommendation quality dropped), and uses this feedback to fine-tune its internal "prefix prompt" via gradient ascent. This iterative "self-reflection" allows the agent to learn which linguistic strategies are most effective against a specific victim architecture without needing access to its internal weights.
Experimental Evaluation
The framework was evaluated using three widely recognized real-world datasets: MovieLens-1M, Taobao, and LastFM. The researchers targeted state-of-the-art victim models, including P5 (T5-based) and TALLRec (LLaMA-based).
Key Results
- Effectiveness: CheatAgent consistently outperformed baselines such as Genetic Algorithms (GA) and standard RL agents. On the MovieLens-1M dataset, it achieved an Attack Success Rate (ASR) exceeding 70%, significantly higher than manual or random injections.
- Stealth: By selecting perturbations that maintain high semantic similarity to the original text, CheatAgent ensures that attacks remain difficult to detect via automated similarity checks or human oversight.
- Efficiency: The self-reflection mechanism allows the agent to reach a successful attack state with fewer queries than traditional black-box optimization methods, making it a practical threat to real-world systems.
Conclusion
CheatAgent demonstrates that the very reasoning capabilities that make LLMs powerful recommenders also make them formidable attackers. By treating adversarial generation as a prompt-tuning problem, CheatAgent can exploit black-box systems with high precision. This research highlights the urgent need for robust defense mechanisms, such as adversarial training and specialized prompt filtering, to secure the next generation of personalized recommendation engines.
Summary updated