Artificial Intelligence 9 min read

Collaborative Filtering Basics, Variants, and Tricks for Game Fashion Recommendation

An in‑depth overview of collaborative filtering, covering basic item‑based and user‑based methods, their limitations, advanced tricks such as IUF correction, popularity suppression, sliding‑window behavior sequencing, and a concrete implementation for game fashion recommendation, illustrating how to use CF as a baseline in early‑stage product development.

NetEase LeiHuo UX Big Data Technology
NetEase LeiHuo UX Big Data Technology
NetEase LeiHuo UX Big Data Technology
Collaborative Filtering Basics, Variants, and Tricks for Game Fashion Recommendation

Collaborative filtering is the most classic model in recommendation systems, often used as a baseline algorithm and remains a perennial choice in industry.

However, the basic itemCF and userCF have their own limitations; in practice, algorithm engineers often adjust and modify them based on business context and understanding.

This article starts from basic collaborative filtering, introduces its variants and tricks, and then explains the practice of using collaborative filtering as a baseline in the early stage of a game fashion recommendation scenario.

1. Basic Collaborative Filtering – itemCF & userCF

Collaborative filtering can be divided into user‑based and item‑based categories. The core idea follows the simple principle “birds of a feather flock together”.

Item‑based filtering computes a list of most similar items for each item; a user is then recommended items similar to those they have liked.

User‑based filtering finds users similar to the target user and recommends items those similar users have interacted with but the target user has not.

Below is a schematic illustration of the concept.

Similarity can be calculated in many ways; here we introduce a basic cosine similarity for itemCF and userCF.

In itemCF, N(i) denotes the number of users who gave positive feedback to item i, and N(i)∩N(j) denotes the number of users who gave positive feedback to both i and j. The denominator penalises popular items by using the square root of the product of interaction counts.

In userCF, N(i) represents the set of items user i has positively interacted with, and N(i)∩N(j) is the set of items both users i and j have interacted with. The denominator uses the union of items to apply a penalty.

Below is a simple comparison of the two collaborative‑filtering approaches.

*In game scenarios, the number of items is far smaller than the number of users, so itemCF is often the implementation of choice.

2. ItemCF Advanced Tricks

item‑CF‑IUF

Introduce Inverse User Frequency (IUF) correction: the more active a user, the lower the similarity contributed by their co‑occurrences. The logarithmic term in the formula is the IUF, where N_u is the number of items user u has interacted with.

Sliding‑window user‑behavior sequencing

Because user behavior logs are large, a time‑ or count‑based sliding window can be used to construct neighbourhood pairs within the window, reducing computation while enriching the algorithm. Temporal gaps between item interactions can also be incorporated as edge weights.

Popularity suppression

Even with denominator penalties, extremely popular items can dominate recommendations (the “Harry Potter problem”). Two common solutions are:

1) Increase the penalty on the denominator, e.g., using a formula with a tunable α (0.5–1). Larger α gives stronger suppression.

2) Apply a sampling‑style retention probability for items, inspired by NLP techniques.

Here a is a hyper‑parameter (typically 1e‑3 to 1e‑5) and z(i) is computed as shown below.

Higher z(i) reduces the probability of selecting the item, thereby suppressing hot items.

3. ItemCF in Game Fashion Recommendation

In early‑stage game scenarios, data volume and dimensions are limited, making collaborative filtering a solid baseline for fashion recommendation.

Two main challenges:

Fashion items have strong timeliness; newly released skins are more popular, requiring freshness adjustments.

High‑spending players may have noisy interaction histories, demanding credibility corrections.

The following formula estimates a user u’s preference for an unseen item j:

where u is the user, N(u) is the set of items u has interacted with, i and j are items, α_i reflects user u’s preference for item i, and W_ij is the similarity between items i and j. The logarithmic term adjusts for item freshness (days is the time difference between the current day and the item’s release date).

The similarity W_ij is computed with IUF correction and exponential popularity suppression:

This approach effectively balances item freshness, user activity, and popularity, providing a practical baseline for game fashion recommendation.

Overall, the article presents a complete practice of using itemCF as a baseline in the early stage of a game fashion recommendation scenario, covering basic concepts, advanced tricks, and concrete formulas.

AIrecommendation systemcollaborative filteringbaselineGame RecommendationitemCFuserCF
NetEase LeiHuo UX Big Data Technology
Written by

NetEase LeiHuo UX Big Data Technology

The NetEase LeiHuo UX Data Team creates practical data‑modeling solutions for gaming, offering comprehensive analysis and insights to enhance user experience and enable precise marketing for development and operations. This account shares industry trends and cutting‑edge data knowledge with students and data professionals, aiming to advance the ecosystem together with enthusiasts.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.