Tencent* Uses Machine Learning for In-Game Purchase Recommendation System on Intel® Xeon® Processors

Online gaming is very popular now a day, especially with young people. They play games during their leisure time. They play online games among family members or among friends. In many cases, players need to buy stuffs to equip their characters in the games in order to have an advantage over other players.

To enhance user experience when playing online games, Tencent installed an in-game purchase recommendation system employing the machine learning2 method to help users decide what equipment they would want to buy for their games.

Tencent1 is an Internet company. It offers many services including social network, web portals, e-commerce, and multiplayer online games.

The next sections discuss what recommendation system9 is all about, what machine learning algorithm Tencent uses for the recommendation system and how the Intel® Xeon® processor family is able to help improve the performance of that system.

Recommendation System

Recommendation system is a mechanism that produce a list of recommended items for users to choose from. Recommendation system is used extensively to help users decide what item to select among others. Recommendation system can be used to select songs, movies, research articles and so on.

In Tencent case, one of its application is to use the recommendation system to suggest appropriate equipment for the online gaming.

Recommendation system generates a list of items using the following approaches: collaborative10, content base11 or hybrid.

Collaborative is the algorithm that does the recommendations base on the ratings or behavior of other users in the system. It analyzes activities or preferences and predicts what users will like based on their similarity to other users.

Content based algorithm recommends an item to a user based upon a description of the item and a profile of the user’s interests.

Hybrid algorithm combines the best of both collaborative and content based algorithms.

Tencent uses the machine learning algorithm called logistic regression3 for their in-game purchase recommendation system. The next section will briefly discussed about what logistic regression is all about and its formula.

Logistic Regression

Logistic Regression is a predictive analysis. It is one of the most popular machine learning algorithms for binary classification. Binary classification means the result is dichotomous or, another word, having only two classes like win and lose, yes and no, true and false, 1 and 0. For example, betting whether a horse is going to win or lose a race. Here we have two classes, win and lose. The target/dependent variable here is the bet. It will have a value of 1 if the horse wins the race and 0 if otherwise.

Logistic regression is to find the probability of the log odds5 of an event using the following equation:

p: The probability of presence of event

1 – p: The probability of absence of event

β: Weigths

x: Independent variables

Logistic regression generates the coefficients β of the above formula to predict the probability of presence of an event.

Tencent In-game Purchase recommendation system and Intel® Xeon® Processor E5 v4

Tencent machine learning engine analyzes a huge amount of online gaming user’s behavior to make suggestion on what equipment users should use for their games. Therefore, it needs a lot of computing power to reduce the model training time. It uses DGEMM6 extensively in its module to compute the coefficients for the logistic regression machine learning algorithm. DGEMM is the matrix multiplication function for double-precision floating-point numbers.

Tencent machine learning engine utilizes DGEMM function through the Intel® Math Kernel Library (Intel® MKL)7. The Intel Xeon processor E5 v4 family supports Intel® Advanced Vector Extensions 2 (Intel® AVX2)8, and Intel MKL is highly optimized for performance using Intel AVX2. Applications using Intel MKL only need to link to the latest version of Intel MKL to take advantage of new features in future Intel® Xeon® processors since Intel MKL will auto-detect new features and makes use of them, if applicable.

Performance Test Procedure

To see how much performance improvement when comparing between the previous and the current generation of Intel® Xeon® processors, we performed tests on two platforms. One system was equipped with the Intel® Xeon® processor E5-2699 v3 and the other with the Intel® Xeon® processor E5-2699 v4.

Test Configuration

System equipped with the dual-socket Intel Xeon processor E5-2699 v4

  • System: Preproduction
  • Processors: Intel Xeon processor E5-2699 v4 @2.2GHz
  • Cache: 55 MB
  • Cores: 22
  • Memory: 128 GB DDR4-2133MT/s

System equipped with the dual-socket Intel Xeonprocessor E5-2699 v3

  • System: Preproduction
  • Processors: Intel Xeon processor E5-2699 v3 @2.3GHz
  • Cache: 45 MB
  • Cores: 18
  • Memory: 128 GB DDR4-2133 MT/s

Operating System: Red Hat Enterprise Linux* 7.2-kernel 3.10.0-327

Software:

  • GNU* C Compiler Collection 4.8.2
  • OpenJDK* 7
  • Spark* 1.5.2
  • Intel® MKL 11.3

Application: Tencent Machine learning training workload

Test Results

The following test results show the performance improvement at the application level and at the coefficient computing module, respectively.


Figure 1: Comparison between the application using Intel® Xeon® processor E5-2699 v3 and the Intel® Xeon® processor E5-2699 v4.

Figure 1 shows the results between the application using Intel® Xeon® processor E5-2699 v3 and the Intel® Xeon® processor E5-2699 v4. Since the application is scalable, it can schedule more tasks to run in parallel in v4 than in v3 resulting in reducing the training time of the machine learning model. 


Figure 2: Comparison between the coefficient computing module using Intel® Xeon® processor E5-2699 v4 with Intel® AVX2 enabled

Figure 2 shows the performance improvement of the computing coefficient module when Intel AVX2 is enabled on a system equipped with the Intel Xeon processor E5-2699 v4. The performance is improved by 44%.

Note: Software and workloads used in performance tests may have been optimized for performance only on Intel® microprocessors. Performance tests, such as SYSmark* and MobileMark*, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. For more information go to http://www.intel.com/performance

Conclusion

The in-game purchase machine learning recommendation system is embedded inside Tencent games. Therefore, optimizing it will help speeding up the decision making process allowing the system to suggest better game equipment for players playing Tencent games. Intel MKL makes use of Intel AVX2 resulting in improving the performance of the applications running on systems equipped with the Intel Xeon processor.

References

  1. Tencent company information
  2. Machine Learning
  3. Logistic regression
  4. What is logit
  5. Odds and log odds
  6. DGEMM
  7. Intel® Math Kernel Library
  8. Intel® AVX2
  9. Machine learning for recommendation system
  10. Collaborative recommendation
  11. Content Based Recommendation
  12. Hybrid recommendation
Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.
Возможность комментирования русскоязычного контента была отключена. Узнать подробнее.