A shilling attack (also called a profile injection attack) is a deliberate manipulation of a recommender system in which an attacker creates fake user profiles with crafted ratings or interactions so that chosen target items are recommended more often or less often. In recommender systems, it exploits the core assumption of collaborative filtering that similar users and items reveal genuine shared taste.
The goal is either a push attack, which promotes an item, or a nuke attack, which demotes a competitor. Because the fake profiles look like ordinary users, the attack corrupts the user-item matrix itself, and every model trained on that matrix inherits the bias.
How a shilling attack exploits collaborative filtering
Collaborative filtering predicts a rating for a user from the ratings of similar neighbors or from latent factors learned across all users. A shilling attack inserts profiles that are designed to be highly similar to many real users while giving the target item an extreme rating.
Each fake profile has a standard anatomy. Selected items carry special ratings that tie the profile to a desired audience, filler items make the profile look normal and maximize similarity, and the target item receives the maximum rating in a push attack or the minimum in a nuke attack. The share of filler items relative to the catalog is the filler size, and the number of fake profiles relative to genuine users is the attack size.
The table below summarizes the parameters an attacker controls and what each one changes.
| Parameter | Typical range in studies | Effect on the attack |
|---|---|---|
| Attack size | 1 to 15 percent of users | More profiles, stronger shift, easier detection |
| Filler size | 1 to 20 percent of items | Higher similarity, but less natural profiles |
| Selected items | A few popular or related items | Targets a specific user segment |
| Target rating | Maximum or minimum of scale | Direction of push or nuke |
| Filler rating model | Random, average or item mean | Realism and required knowledge |
Classic attack models
Research on recommender security has defined a set of standard attack models that differ in how much knowledge the attacker needs about the rating distribution. More knowledge generally buys more impact per fake profile.
| Attack model | How filler ratings are chosen | Knowledge required |
|---|---|---|
| Random attack | Drawn around the global mean rating | Low |
| Average attack | Each item rated near its own mean | High, per-item statistics |
| Bandwagon attack | Popular items rated highly | Low, popularity is public |
| Segment attack | Items liked by a target segment | Moderate, segment knowledge |
| Love/hate attack | Target low, fillers at maximum | Low, used for nuking |
| Reverse bandwagon | Unpopular items rated low | Low, used for nuking |
Classic findings show that user-based collaborative filtering is especially vulnerable to the average attack, while item-based collaborative filtering resists it better but remains exposed to segment attacks. Model-based methods such as matrix factorization are not immune; they spread the injected signal across latent factors instead of local neighborhoods.
Shilling in modern recommender pipelines
Modern systems rely on implicit feedback such as clicks, views, add-to-cart events and watch time rather than explicit star ratings. Shilling has moved accordingly: attackers now run bot accounts, click farms and fake sessions that generate interaction sequences rather than rating vectors.
Researchers also study data poisoning attacks that solve an optimization problem to find the most damaging fake interactions for a known or approximated model, including graph-based models such as LightGCN and sequential models such as SASRec. These optimized attacks achieve large effects with very few profiles, which makes them harder to spot than classic heuristic profiles.
The following comparison separates shilling from neighboring threats that are often grouped with it.
| Threat | Attack surface | Main defense |
|---|---|---|
| Shilling attack | Fake profiles in training data | Profile detection, robust models |
| Optimized data poisoning | Model-specific crafted interactions | Robust training, anomaly scoring |
| Review spam | Text reviews shown to people | Text and behavior classifiers |
| Sybil attack | Many identities in any system | Identity verification, rate limits |
| Adversarial input at inference | Item content or features | Input validation, robust embeddings |
Detection and robust defenses
Defense works on two levels: detecting fake profiles before training and making the model robust to the profiles that slip through. Neither level is sufficient alone, because detectors miss well-crafted profiles and robust models only limit, rather than remove, the bias.
- Rating deviation from mean agreement (RDMA) and related statistics flag profiles that rate far from item averages.
- Degree of similarity with top neighbors reveals groups of profiles that are unusually alike.
- Temporal analysis catches bursts of new accounts that rate the same item within hours.
- Supervised and graph-based classifiers learn the signature of fake accounts from labeled examples.
- Robust collaborative filtering uses trimmed estimators, trust weighting or capped influence per user.
- Platform controls such as account verification, rate limits and purchase-verified feedback raise attack cost.
The central trade-off is false positives versus robustness. Aggressive filtering removes enthusiastic but genuine users and new users with few ratings, which worsens the cold start problem and can hurt fairness for niche communities.
Signs and consequences of a successful attack
A successful attack is measured mainly by prediction shift, the change in predicted rating for the target item, and by hit ratio, the share of users who see the target in their top-N list. Business teams usually notice indirect symptoms first.
| Observed symptom | Possible explanation | First check |
|---|---|---|
| Sudden rise of an obscure item | Push attack with new accounts | Account age of recent raters |
| Sharp drop of a strong product | Nuke attack by competitors | Rating distribution over time |
| Many profiles with identical filler | Low-effort scripted profiles | Pairwise profile similarity |
| Odd co-recommendations | Segment attack linking items | Shared raters of both items |
Consequences extend beyond one item. Manipulated recommendations erode user trust, distort sales data used for planning and feed a recommendation feedback loop in which the promoted item gains real interactions and appears legitimately popular.
A plain-language summary
Recommendation engines suggest products, songs or films by looking at what people with similar taste liked. A shilling attack fills the system with fake shoppers or viewers who pretend to have ordinary taste but all praise one product, or all trash a rival.
Because the system trusts the crowd, those fake voices quietly change what real people are shown. It is similar to paid applause in a theater: the noise is fake, but it still sways the audience. Platforms fight back by spotting suspicious accounts and by limiting how much any single account can change the results.
An example from practice
A mid-sized online marketplace notices that a little-known phone case jumped into the top 10 recommendations for most smartphone buyers within one week. The data science team inspects the item’s recent interactions and finds about 900 accounts created in the same 48 hours, each with ten to fifteen five-star ratings on best-selling accessories and a maximum rating for the phone case.
Their profiles were nearly identical to each other, a pattern typical of a bandwagon attack. The team removes the accounts, retrains the item-based model, and adds two safeguards: ratings from accounts younger than seven days receive reduced weight, and similarity clusters above a set threshold trigger a manual review. The phone case falls back to its normal position, and the outcome is restored recommendation quality with a monitoring rule that flags similar bursts automatically.