Sharpness-Aware Poisoning: Enhancing Transferability of Injective Attacks on Recommender Systems

Junsong Xie, Yonghui Yang, Pengyang Shao, Le WuarXiv 2026 · DOI

TL;DR

Data poisoning attacks on recommender systems often fail in the real world because the fake user profiles overfit the attacker's "surrogate" model and don't transfer well to the actual black-box system. This paper introduces Sharpness-Aware Poisoning (SharpAP), a novel method that uses sharpness-aware minimization to find and target the "worst-case" victim model. By flattening the loss landscape, SharpAP generates robust poisoned data that successfully transfers across diverse recommendation algorithms with minimal computational overhead.

What Problem Does This Paper Address?

Recommender systems (RS) are highly vulnerable to injective attacks, where malicious actors inject fake user profiles into a database to artificially boost the visibility of specific target items. Because the actual recommendation algorithm (the "victim model") is a black box hidden behind proprietary walls, attackers typically train their fake profiles against a visible "surrogate" model, hoping the attack will generalize.

The authors point out a major flaw in this "one poisons all" strategy: existing attacks assume that what works on the surrogate will work on the victim. In reality, structural discrepancies between models (e.g., matrix factorization vs. graph neural networks) cause the poisoned data to overfit the surrogate, leading to poor attack transferability.

Overfitting of traditional surrogate models

Methods

To overcome this limitation, the authors introduce Sharpness-Aware Poisoning (SharpAP). Instead of optimizing fake profiles against a single, static surrogate model, SharpAP looks for the worst-case victim model within a local neighborhood of the surrogate's parameters and optimizes specifically against it.

Mathematically, they transform the standard bi-level optimization problem into a min-max-min tri-level optimization problem:

  1. Inner Min: Mimics the standard training of the surrogate model on the poisoned data.
  2. Inner Max: Applies a bounded perturbation ($\theta^\Delta$) to the model parameters to find the "worst-case" model where the attack is least effective.
  3. Outer Min: Optimizes the fake user profiles to minimize the attack loss against this worst-case model.
SharpAP tri-level optimization framework

To keep the process computationally efficient, the authors approximate the inner maximization step using a first-order Taylor expansion. They also employ a constrained gradient projection descent to ensure that the generated fake profiles remain discrete and adhere to realistic size constraints.

Datasets

The authors evaluated SharpAP on three widely used real-world datasets:

  • MovieLens-1M: A classic movie recommendation dataset, converted to implicit feedback (treating 5-star ratings as positive).
  • Gowalla: A location-based social network dataset.
  • Amazon-book: A large-scale e-commerce product recommendation dataset.

The generated attacks were evaluated across five distinct victim architectures: WRMF (factorization-based), BPR (pairwise ranking-based), and three graph-based models (LightGCN, SGL, and SimGCL).

Key Insights and Ideas

  • The Overfitting Trap: Traditional gradient-based attacks suffer from severe overfitting to the surrogate model. For instance, an attack optimized for a matrix factorization model performs poorly when the actual victim is a graph-based model.
  • Flattening the Landscape: SharpAP works by flattening the attack loss landscape. If the loss landscape is sharp, a tiny shift in model structure destroys the attack's effectiveness. By optimizing for the worst-case perturbed model, SharpAP ensures the attack remains potent even if the victim model's parameters deviate from the surrogate.
  • Evasion through Dispersion: Visually, standard attacks tend to create tight, easily detectable clusters of fake users. SharpAP's curvature-aware optimization naturally disperses fake users among real users, making them much harder for defense algorithms to detect.
t-SNE visualization of fake user dispersion

Key Results

  • Superior Transferability: SharpAP consistently outperformed state-of-the-art attacks (like RevAdv, RAPU, and DADA) across all datasets and victim models. For example, when using RevAdv as a backbone on MovieLens-1M, SharpAP boosted the Hit Ratio @ 20 (HR@20) on BPR by 48% and on WRMF by 27%.
  • Defense Evasion: Even when tested against robust defense mechanisms designed to filter out fake users (such as PCA, APT, and PamaCF), SharpAP maintained a significantly higher attack success rate than baseline methods.
  • High Efficiency: The tri-level optimization adds only one extra backward pass per outer iteration, resulting in a marginal running time increase of only ~5%, making it highly practical.

Limitations and Future Work

While SharpAP successfully handles the discrete nature of recommendation data via gradient projection, directly optimizing over discrete spaces with sharpness-awareness remains a theoretical challenge. Additionally, the authors note that attacking "unpopular" (cold-start) items remains significantly harder than attacking popular ones due to sparse interaction data.

On the defensive side, the paper focuses purely on the offensive capabilities of SharpAP; the authors state that developing defense mechanisms specifically tailored to counter sharpness-aware poisoning is an important avenue for future research.

Summary updated

BibTeX
@misc{xie2026sharpness,
  author = {Junsong Xie and Yonghui Yang and Pengyang Shao and Le Wu},
  title = {{Sharpness-Aware Poisoning: Enhancing Transferability of Injective Attacks on Recommender Systems}},
  year = {2026},
  eprint = {2604.22170},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.22170},
}
Figure