To do a good recommendation system, graph technology is indispensable

This article is shared from HUAWEI CLOUD Community " Recommendation-Analysis with Graphs! ", Author: Hello_TT.

Guided reading

A recommender system is considered as a technology for providing goods, content or services of interest to users. As a technology to describe the deep link relationship between things, graph technology is often used to model recommender systems. This article first introduces recommender systems and the relationship between recommender systems and graph technology, and then uses examples to illustrate how graph technology empowers recommender systems.

What is a recommender system

When a user needs to connect to the Internet to meet his needs, he often encounters a large amount of relevant information. A recommender system is a technique used to filter information and provide users with goods, content, or services that are as satisfying and interesting as possible to users.

With the rapid development of e-commerce and social media platforms, in order to prevent users from losing themselves in the sea of ​​data, recommendation systems have emerged. As one of the most successful and important applications of AI, recommender systems help consumers find relevant or interesting content, goods or services more easily.

The importance of recommender systems

Today's Internet carries a variety of information resources, and the amount of data grows exponentially. Recommender systems play an important role in mitigating the problem of information overload. In an e-commerce platform, a good recommendation system can help users discover good products, and also enable high-quality products to reach precise audiences.

From the user's point of view, the recommendation system can alleviate the time cost caused by information overload. From the enterprise's point of view, it can help enterprises achieve precise marketing, personalize the user experience, improve customer loyalty, and maximize the company's revenue. Therefore, the quality of the recommender system is very important for both users and enterprises.

The relationship between graph analysis and recommendation system

The data in the recommendation system is essentially some graph data, and the data including users, products, and attributes are linked together through various relationships. Graph analysis technology has natural advantages in dealing with complex relationships. Graph technologies such as random walk and graph neural network have been used to process various graphs and have achieved good results. Therefore, using graph analysis to deal with recommendation problems will is a natural and sensible choice.

Moreover, graph analysis is beneficial for building explainable recommender systems. The black-box mechanism of recommender systems led by deep learning makes people pay more and more attention to the interpretability of recommender systems. Benefiting from the ability of causal reasoning of graph analysis, the recommender system based on graph analysis can well support the interpretability of recommendation results. sex.

Graph structures in recommender systems

The recommendation system will contain many different types of entities, such as users, products, attributes, etc., and they will be connected through various relationships, such as the social relationship between users, and the interaction between users and products. Wait. These different entities and relationships constitute the underlying dataset of the recommender system. The underlying data of the recommendation system can be divided into the following structures.

Hierarchy

Generally, all products are organized into hierarchies based on specific attributes (eg product category). For example, all products in Huawei Mall are divided into many categories (including mobile phones, accessories, smart screens, etc.), and each category of products is divided into subcategories (mobile phones are divided into Mate series, P series, etc.), each subcategory may contain various a specific product. This hierarchy itself reveals rich relationships between products. Products from different but similar categories may have complementary relationships (such as mobile phones and protective cases), which is beneficial to improve the quality of recommendations. In addition, it is also beneficial to avoid repeated recommendation of similar products, thereby increasing the variety of recommended products.

single part diagram

In recommender systems, there are at least two monolithic graphs to consider, namely, the user's social relationship network and the product's co-occurrence relationship network or session graph. In the social relationship graph, user preferences and purchasing behaviors will affect each other. The co-occurrence relationship of products not only reflects the complementary or competitive relationship between products, but also shows the consumption patterns of users. These are all things that need to be considered when making recommendations. the elements of.

bipartite

The relationship between users and items (clicks, purchases, etc.) is the core of the recommender system, which can be modeled as a bipartite graph. Recommendation at this point can be viewed as a link prediction problem.

Heterogeneous graph

In order to effectively solve the above-mentioned sparsity problem of the user-item bipartite graph, and to build a more robust and reliable recommendation system, there are many relevant information that can be taken into consideration, including the user's personal information, the user's social relationship, and the product characteristics. , commodity co-occurrence relationship, etc. In general, the more we know about users’ preferences and buying behaviors, as well as product features, the better the recommendations will be.

Graph Analysis Methods for Recommender Systems

random walk

The principle of random walk is to start from a certain point, walk to the neighbor node of this vertex with a specific probability, and obtain a probability distribution after each walk, which depicts the probability that each node in the graph is visited. . After a certain step, the nodes are sorted according to the probability that each node is visited as the recommendation result. Benefiting from the special working mechanism of random walk, it has obtained a good recommendation effect on complex and high-order data graphs.

Graph Representation Learning

Graph representation learning methods generally encode each point in the graph into a low-dimensional representation, which contains the structural information of the graph, and these representations will be used for subsequent recommendation tasks.

Graph Neural Network

For example, a graph convolutional neural network learns how to continuously aggregate local structural features by using the graph structure and point feature information. In general, through convolution and pooling operations, graph convolutional networks have the ability to learn valuable feature information from the neighborhood of nodes.

Knowledge Graph

Recommendation systems based on knowledge graphs generally use external knowledge to build knowledge graphs to explore hidden relationships between users or products, which is conducive to better recommendation. More importantly, by leveraging external knowledge, knowledge graph-based recommender systems provide a better understanding of user behavior and product characteristics, thereby improving the interpretability of recommendation results.

An example of recommendation based on Huawei Cloud Graph Engine GES

recommended friends

In this example, we recommend friends to Li Lei. The idea is to recommend his friends' friends, but the recommended friends should not include Li Lei's own friends. For example, in the picture, Xiaomei is both Li Lei's friends and Li Lei's friends. Friends of friends, we should not recommend Xiaomei to Li Lei, because she is already a friend of Li Lei. We can implement the above recommendation through the following gremlin statement:

g.V("李雷").repeat(out("friend").simplePath().where(without('1hop')).store('1hop')).times(2).path().by("name").limit(100)

Movie recommendation

This is an example of a heterogeneous graph, the entities contain user, movie, genre, actor, director, etc. We want to

To recommend movies to Frank, we use the real-time recommendation algorithm built into GES to do so. The real-time recommendation algorithm is an algorithm based on the random walk model. The main input parameters are sources and labels. The sources represent the id of the requesting node, and the label represents the desired recommended node type. For specific parameter descriptions, please refer to Links Real-time Recommendation Algorithm , in the return parameter, score shows the recommendation value of each node, reflecting its recommendation degree.

{
			"score": 1494,
			"id": "The Sixth Sense"
		},
		{
			"score": 1233.0000000000002,
			"id": "Artificial Intelligence"
		},
		{
			"score": 519,
			"id": "Lincoln"
		},
		{
			"score": 441,
			"id": "Ready Player One"
		}

Advantages of GES-based recommender systems

Kugou and Huawei Mall built their own recommendation systems based on GES, and achieved very good results.

Related Links (Construction of E-commerce Knowledge Graph Based on People and Goods Market https://bbs.huaweicloud.com/forum/thread-67525-1-1.html ) In general, the recommendation system based on GES has the following aspects The advantages:

Real-time recommendation

Online applications must make instant recommendations, and the high performance of GES can help build real-time recommendation systems.

Provide high-quality, interpretable recommendation results

The recommendations provided are truly valuable to the user and answer the why question.

diversity of methods

GES provides a variety of methods to help build recommender systems with more accurate results.

achieve business goals

Help enterprises achieve high-income, low-cost goals, improve user satisfaction, and save time and cost.

references:

  1. Graph Learning Approaches to Recommender Systems: A Review(2020)
  2. DKN: Deep Knowledge-Aware Network for News Recommendation(2018)
  3. Dressing as a Whole: Outfit Compatibility Learning Based on Node-wise Graph Neural Networks(2019)

Click Follow to learn about HUAWEI CLOUD's new technologies for the first time~

Guess you like

Origin blog.csdn.net/devcloud/article/details/124143903