# An Advertising Recommendation Algorithm Based on Deep Learning Fusion Model

Authors: Chunhui Li
Journal: Journal of Sensors
 (2022)

---

## Abstract

With the rapid evolution of the Internet and smart mobile devices, personalized advertising is becoming increasingly acceptive on we-media platforms. Traditional advertising push cannot meet users’ demand for personalized advertising, leading to users’ resistance to advertising. Aiming to realize personalized advertising recommendation, an advertising recommendation algorithm based on deep learning fusion model is proposed. The bipartite graph model is applied to network representation learning method to decompose user and advertising content into two networks. The embedded representations of two types of nodes are obtained by training GraphSAGE model on their respective networks. The relation matrix of two kinds of nodes is obtained by using the crossproduct operation. Finally, feature information is extracted by convolutional neural network to achieve personalized advertising recommendation. Experimental results verify the effectiveness of the proposed algorithm, which also achieves good results in accuracy and convergence speed.


---

## Body

## 1. Introduction

In recent years, with the rapid development of the Internet and intelligent mobile devices, human society has entered the era of information explosion since mobile Internet advertising is booming, and higher requirements for advertising recommendation are put forward [1]. The traditional advertising recommendation method often pushes some uninteresting or even irrelevant advertising content to users, which will reduce the normal access of users, and some of which will even steal users’ privacy. This kind of “carpet bombing” promotion method causes great dislike of users [2]. Therefore, how to tap the potential needs of users according to their hobbies and behaviors and personalized advertising recommendation according to their needs becomes particularly important [3]. On the other hand, the rapid development of mobile Internet has led to geometric growth of mobile Internet information and explosive growth of mobile users, resulting in an increasingly sharp contradiction between limited network resources and users’ growing network needs [4]. Under the current limited resources, better algorithms to accurately capture user characteristics need exploring so as to accurately and efficiently extract user behavior characteristics, analyze their interests and needs, and carry out targeted advertising needs.In today’s era, the Internet has become the fastest and most convenient medium to transmit information in daily life, and we-media has become the main force of Internet information transmission [5]. “We-media” is short for “We-media” platform. “We-media” is a way for the general public to begin to understand how they provide and share their own facts and news after being strengthened by digital technology and connected with the global knowledge system [6]. In other words, we-media platform is a carrier for users to publish events they have seen and heard with their own eyes, such as WeChat, Douyin, Toutiao, Weibo, and BBS [7]. With the popularity of intelligent mobile terminals, we-media platforms are more interactive and lively. We-media advertising recommendation system arises at the historic moment [8], when personalized advertising recommendation can provide different forms of advertising and information for different users.In recent years, there have been many reviews about recommender systems. For example, literature [9] reviewed hybrid recommendation system. Literature [10] studied collaborative filtering technology. Literature [11] analyzed mobile news recommendation technology. Literature [12] reassessed recommendation system based on deep learning, etc. Although the above articles give a comprehensive overview of some subfields and methods and technologies of recommendation system, most of these articles are highly targeted and professional; that is, they summarize and discuss a certain field and technology [13]. Similar articles can provide reference and help for the overview of personalized advertising recommendation system, but the methods or technologies cannot completely adapt to personalized advertising recommendation system.The problem of advertising recommendation can be generally understood as the problem of CTR (click through rate) [14]. The prediction of advertisement CTR is one of the most important contents in the advertising field. However, there are still some difficult problems, such as large amount of data, sparse data, and abnormal data [15]. In the selection of models, it is difficult to train complex models, while it is easy to produce overfitting phenomenon, and the effect of trained models is generally poor. Therefore, some relatively shallow models are generally used in industry, and two-feature engineering is an important step in solving problems [16]. Feature often determines the upper limit of the model; so, it has become one of the difficulties to solve the feature construction problem of feature engineering.In order to realize personalized advertising recommendation, this paper proposes an advertising recommendation algorithm based on deep learning fusion model. The innovations and contributions of this paper are listed below. (1) In order to divide the user and the advertising information into two disjoint subsets, the bipartite graph model is applied to the network representation learning method to divide the user and the advertising content into two networks. (2) The embedded representations of two types of nodes are obtained by training the GraphSAGE model. The relation matrix of each dimension of two kinds of nodes is obtained by crossproduct operation. (3) The convolutional neural network is used to extract the interaction relations in the features to complete the personalized recommendation task. Experimental results demonstrate that the proposed algorithm is effective and achieves good results in accuracy and convergence speed.The chapter structure of the paper is listed as follows. The next section mainly introduces the proposed algorithm model. The third section is experiment and analysis. The fourth section is the conclusion.


## 2. The Proposed Algorithm in This Paper

### 2.1. GraphSAGE Model

GraphSAGE [17] model was applied to complete the task of network representation learning. The GraphSAGE model is used for supervised and unsupervised learning, and you can choose whether to use node attributes for training. This method is suitable for solving the recommendation problem with various external information. When new nodes are added to the graph, the whole model does not need to be retrained, which improves the universality of the algorithm.The GraphSAGE model is constructed for the problem of homogeneous graph, and the embedded representation of nodes is generated through node attribute information and network structure information. Embedding representation is that each node learns its own aggregation function and aggregates node’s neighborhood information through this function. The forward propagation of the algorithm is divided into three steps: sampling, aggregation, and prediction [18].In aggregation and prediction, each order of neighbor nodes aggregates neighbor node features by using different functions. After the feature representation of the target node is connected with the aggregation attribute of the neighbor node, the updated embedded representation of the target node is obtained through nonlinear transformation, and all nodes are iterated layer by layer. Mean aggregator, LSTM (long-short-term memory) aggregator, and pooling aggregator are proposed in this algorithm. The mean aggregation function averages each dimension of the feature vector of the sampled neighbor node as the feature vector of the target node. LSTM aggregator [19] has strong data expression ability and is sensitive to data order. The pooling aggregator performs nonlinear transformation on the neighbor nodes of the target node and pools them. The Pseudocode 1 of GraphSAGE forward propagation algorithm is displayed as follows.Pseudocode 1: The input: graph AQ,E, nodal eigenvector xq,∀q∈Q, nonlinear function σ, node connection weight matrix Gz,∀z∈1,2,⋯,Z, the aggregation depth Z, aggregation function AGGERGATEz,∀z∈1,2,⋯,Z, and neighbor function Z.
The output: node embedding representationkq.(1)bq0⟵xq,∀q∈Q(2) for∀z∈1,2,⋯,Z do(3) for∀q∈Q do(4)bTqz⟵AGGERGATEqbpz−1,∀p∈Tq(5)bqz⟵σGz∙CONCATbqz−1,bTqz(6) end for(7)bqz⟵bqz/bqz2,∀q∈Q(8) end for(9)kq⟵bqz,∀q∈Qbpz−1,∀p∈Tqrepresents the neighbor node features of nodeqin layerz−1;bNpzrepresents the feature aggregation of neighbor nodes of nodezat layerq.For the part of back propagation, unsupervised learning is adopted. Referring to SkipGram model [20], loss function based on graph is adopted to make the adjacent nodes have more similar feature expression. The loss function is shown in
(1)LAkp=&−expσkp⊤kq−V·Gqt−Utqexpσ−kp⊤kqt,where kp is the embedded representation of node p generated by GraphSAGE. Node q is the neighborhood of node p sampled in z layer, and σ is the sigmoid function. Ut is the probability distribution of negative sampling, and V is the number of negative samples.


### 2.2. Design and Implementation of the Proposed Algorithm

#### 2.2.1. Overall Design of Algorithm

For the binary network of user and advertisement, the algorithm in this paper decomposes the binary graph into the homogenous network of advertisement and advertisement and the homogenous network of user and user. The GraphSAGE model was used to fuse user’s network feature structure and attribute feature, and the embedded expression with the same dimension was obtained. The crossproduct operation of feature vectors between users and advertisements is carried out, i.e., the relationship between users and each dimension of advertising features is represented by a matrix, and then, the potential relationship between them is extracted through the convolutional neural network. The algorithm flow in this paper is shown in Figure1.Figure 1
The flow of the proposed algorithm.In the scenario of user and advertisement recommendation, usually, the attribute information of advertisement and user and the interaction information of advertisement and user are known. In this context, the relationship between them is represented by the structure of the graph. Users and advertising nodes are nodes of the graph, and the interactive relationship between advertising and users is the edge of the graph. The bipartite graph model of advertisement and user is formed through mapping. In addition, it is assumed that the recommendation scenario containsm users and n ads. The user node set is represented by =p1,p2,⋯,pw, and the advertising node set is represented by Q=q1,q2,⋯,qt. For the above recommendation problem, the corresponding user-advertising bipartite graph is expressed as A=P,Q,G,M, G is the set of all edges in graph A, and gxy represents the connecting edge of nodes px and qy. M is the interaction weight matrix between users and advertisements in graph A, and mxy is the corresponding weight of gxy in graph A.The problem of homogenous network includes user network and advertising network. Taking the advertising network as an example, different ads have similar applicable groups. For user networks, if both users are sports enthusiasts, they will have similar hobbies. Therefore, homogenous networks also have profound connections. The user-advertising bipartite graph is decomposed into two homogeneous graphs. For graphA, the first-order similarity mxyP of the user node is defined as follows:
(2)mxyP=∑z∈Qmxzmyz.The first-order similaritymxyQ of the advertising node is defined as follows.
(3)mxyQ=∑z∈Qmzxmzy.Get advertising similarity matrixMQ=mxyQ and user similarity matrix MP=mxyP. The user homogenous graph AQ and the advertising homogenous graph AP are constructed based on MPand MQ. Before using MQ and MP to construct user homogeneity graph and advertisement homogeneity graph, the edges with low weight should be appropriately removed to avoid noise interference affecting subsequent calculation results according to the weight distribution of MQ and MP.Attribute information types of users and advertisements should be considered to construct attribute characteristics of users and advertisements. For structured data, the nondiscrete data is discretized, and one-hot coding is performed to obtain feature coding. For unstructured data, TF-IDF [21] or LDA algorithm [22] is often used for structured processing if it is the information in this paper. In the case of audio, video, image, and other information, the corresponding deep learning method is used to transform it into structured data. User attribute characteristics are obtained by the GraphSAGE model. Matrix CP and advertising attribute feature matrix CQ are transformed into user feature matrix CP and CQ, as shown below.
(4)WP=HGraphSAGEAP,CP,(5)WQ=HGraphSAGEAQ,CQ.Assuming that the obtained embedding representation dimensions aren, the user feature matrix WP∈ℝw×n and advertising feature matrix WQ∈ℝt×n can be represented.The crossproduct operation is used to obtain the interaction matrix between users and advertising features. For userp and advertisement x, wpP represents the feature vector of user P, and Wp,x represents the feature vector of advertisement x. Then, the calculation equation of Wp,x is as follows.
(6)Wp,x=wpP⊗wxQ=wp1Pwx1Qwp1Pwx2Q⋯wp1PwxnQwp2PwxlQwp2Pwx2Q⋯wp2PwxnQ⋮⋮⋮wpnPwxlQwpnPwx2Q⋯wpnPwxnQ.In collaborative filtering, matrix decomposition is usually used to represent the relationship between advertising and users, the relationship between advertising and users is inner product, and only the information on the diagonal inWp,x is used.The multilayer perceptron (MLP) [23] algorithm can fit any function relationship theoretically, but it needs a lot of data for training. In the user and advertisement recommendation system, the behavior information of each user is limited. Therefore, this algorithm does not adopt the scheme of learning through MLP after directly combining the features of users and advertisements. The deep network trained with limited data will degrade its performance, and it is difficult to ensure the convergence of MLP to the real model. Meanwhile, in the experimental part, users and advertising features are directly spliced without convolutional neural network training. MLP was directly used for comparison experiments, which further showed that adding convolutional neural network enhanced the effect of the algorithm.This algorithm uses crossproduct to model the information interaction between advertisement and user and adopts convolutional neural network to train. The amount of data required for training is reduced, and the parameters required for training in the model are also cut down.


#### 2.2.2. Structural Design of Convolutional Neural Network

In the convolutional neural network (CNN) model [24], the definition of parameters is more complex than that of traditional models, and the general rules of parameter design can be summarized as the following four aspects.
(1)
The convolution layer generally uses a smaller convolution kernel. The larger the convolution kernel is, the smaller the output feature graph is, and it is difficult to extract the features of the data. And the smaller the convolution kernel, the smaller the corresponding parameter(2)
The convolution step size is generally set small to facilitate better feature extraction(3)
The pooling layer often uses a2×2 pooling window. The function of the pooling layer is to reduce the spatial dimension of the input data. If the pooling operation is too large, data may be lost, and the network performance deteriorates(4)
The number of fully connected layers should not exceed 3. The more fully connected layers there are, the more difficult the training is, and the more likely it is to cause overfitting and gradient dissipationThe CNN part of this model is shown in Figure2, and the common convolutional network model is used for design. In order to avoid losing too much structural information, the convolution layer and pooling layer are not used to compress the matrix data into one dimension. The model is composed of 3 fully connected layers and 6 convolution layers. The convolution kernel size is 3×3, and the step size is 1×1. To keep the size of the input and output feature graphs constant, a padding operation is performed. After every two convolution layers, the pooling layer is added for maximum pooling. The pooling core size is 2×2, and the step size is 2×2. The feature graph was downsampled, and the number of channels was doubled in the next two convolution layers. Similarly, in the last convolution layer, flatten layer is added to flatten the data and connect the MLP network, gradually reducing the output dimension to one dimension. The total process is represented in Equation (7), where j^px is the output of the final neural network.
(7)j^px=σmt⊤σmt−1⊤⋯σm1⊤CNNWp,x+d1⋯+dt−1+dt,where σ is a nonlinear function. ReLu activators are used in all convolution layers and full connection layers except sigmoid activation function at the last full connection layer. The number of modal parameters of the total body is shown in Table 1.Figure 2
The structure diagram of CNN model in this paper.Table 1
Convolutional neural network partial model parameter.
Network layerModel parameterOutput sizeConvolution layer 13×3 convolution kernels, step length 1, same size filling32×32×4Convolution layer 23×3 convolution kernels, step length 1, same size filling32×32×4Pooling layer 12×2 pooling kernels, step length 2, without filling16×16×4Convolution layer 33×3 convolution kernels, step length 1, same size filling16×16×8Convolution layer 43×3 convolution kernels, step length 1, same size filling16×16×8Pooling layer 22×2 pooling kernels, step length 2, without filling8×8×8Convolution layer 53×3 convolution kernels, step length 1, same size filling8×8×16Convolution layer 63×3 convolution kernels, step length 1, same size filling8×8×16Full connection layer 1—256Full connection layer 2—16Full connection layer 3—1


#### 2.2.3. The Loss Function

The loss function is mainly a square loss function, which is defined on the premise that the observation results obey the Gaussian distribution. In practical problems, the interactive information between users and advertisements does not necessarily follow the Gaussian distribution function design. This algorithm adopts the idea of binary classification and uses “0” and “1” to represent the relationship between users and advertisements, “0” means irrelevant, and “1” means relevant.j^px represents the convolutional networks. Output represents the likelihood of predicting that advertising x is related to user p. To ensure and celebrate j^px probabilistic meanings, limit their values to [0, 1]. Therefore, the activation function of the last layer of the neural network is sigmoid function, and the loss function used is shown in
(8)L=−∑p,x∈J∪J−jpxexpj^px+1−jpxexp1−j^px,where J is the positive sample set, J− is the negative sample set, jpx represents the connection between user p and advertising x, and j^px represents the final output of the convolutional network. Adam optimization algorithm [25] was adopted in the final model training. The dropout layer was added to the MLP part of the model to solve the problem of trained fitting and enhance the model generalization ability.


## 2.1. GraphSAGE Model

GraphSAGE [17] model was applied to complete the task of network representation learning. The GraphSAGE model is used for supervised and unsupervised learning, and you can choose whether to use node attributes for training. This method is suitable for solving the recommendation problem with various external information. When new nodes are added to the graph, the whole model does not need to be retrained, which improves the universality of the algorithm.The GraphSAGE model is constructed for the problem of homogeneous graph, and the embedded representation of nodes is generated through node attribute information and network structure information. Embedding representation is that each node learns its own aggregation function and aggregates node’s neighborhood information through this function. The forward propagation of the algorithm is divided into three steps: sampling, aggregation, and prediction [18].In aggregation and prediction, each order of neighbor nodes aggregates neighbor node features by using different functions. After the feature representation of the target node is connected with the aggregation attribute of the neighbor node, the updated embedded representation of the target node is obtained through nonlinear transformation, and all nodes are iterated layer by layer. Mean aggregator, LSTM (long-short-term memory) aggregator, and pooling aggregator are proposed in this algorithm. The mean aggregation function averages each dimension of the feature vector of the sampled neighbor node as the feature vector of the target node. LSTM aggregator [19] has strong data expression ability and is sensitive to data order. The pooling aggregator performs nonlinear transformation on the neighbor nodes of the target node and pools them. The Pseudocode 1 of GraphSAGE forward propagation algorithm is displayed as follows.Pseudocode 1: The input: graph AQ,E, nodal eigenvector xq,∀q∈Q, nonlinear function σ, node connection weight matrix Gz,∀z∈1,2,⋯,Z, the aggregation depth Z, aggregation function AGGERGATEz,∀z∈1,2,⋯,Z, and neighbor function Z.
The output: node embedding representationkq.(1)bq0⟵xq,∀q∈Q(2) for∀z∈1,2,⋯,Z do(3) for∀q∈Q do(4)bTqz⟵AGGERGATEqbpz−1,∀p∈Tq(5)bqz⟵σGz∙CONCATbqz−1,bTqz(6) end for(7)bqz⟵bqz/bqz2,∀q∈Q(8) end for(9)kq⟵bqz,∀q∈Qbpz−1,∀p∈Tqrepresents the neighbor node features of nodeqin layerz−1;bNpzrepresents the feature aggregation of neighbor nodes of nodezat layerq.For the part of back propagation, unsupervised learning is adopted. Referring to SkipGram model [20], loss function based on graph is adopted to make the adjacent nodes have more similar feature expression. The loss function is shown in
(1)LAkp=&−expσkp⊤kq−V·Gqt−Utqexpσ−kp⊤kqt,where kp is the embedded representation of node p generated by GraphSAGE. Node q is the neighborhood of node p sampled in z layer, and σ is the sigmoid function. Ut is the probability distribution of negative sampling, and V is the number of negative samples.


## 2.2. Design and Implementation of the Proposed Algorithm

### 2.2.1. Overall Design of Algorithm

For the binary network of user and advertisement, the algorithm in this paper decomposes the binary graph into the homogenous network of advertisement and advertisement and the homogenous network of user and user. The GraphSAGE model was used to fuse user’s network feature structure and attribute feature, and the embedded expression with the same dimension was obtained. The crossproduct operation of feature vectors between users and advertisements is carried out, i.e., the relationship between users and each dimension of advertising features is represented by a matrix, and then, the potential relationship between them is extracted through the convolutional neural network. The algorithm flow in this paper is shown in Figure1.Figure 1
The flow of the proposed algorithm.In the scenario of user and advertisement recommendation, usually, the attribute information of advertisement and user and the interaction information of advertisement and user are known. In this context, the relationship between them is represented by the structure of the graph. Users and advertising nodes are nodes of the graph, and the interactive relationship between advertising and users is the edge of the graph. The bipartite graph model of advertisement and user is formed through mapping. In addition, it is assumed that the recommendation scenario containsm users and n ads. The user node set is represented by =p1,p2,⋯,pw, and the advertising node set is represented by Q=q1,q2,⋯,qt. For the above recommendation problem, the corresponding user-advertising bipartite graph is expressed as A=P,Q,G,M, G is the set of all edges in graph A, and gxy represents the connecting edge of nodes px and qy. M is the interaction weight matrix between users and advertisements in graph A, and mxy is the corresponding weight of gxy in graph A.The problem of homogenous network includes user network and advertising network. Taking the advertising network as an example, different ads have similar applicable groups. For user networks, if both users are sports enthusiasts, they will have similar hobbies. Therefore, homogenous networks also have profound connections. The user-advertising bipartite graph is decomposed into two homogeneous graphs. For graphA, the first-order similarity mxyP of the user node is defined as follows:
(2)mxyP=∑z∈Qmxzmyz.The first-order similaritymxyQ of the advertising node is defined as follows.
(3)mxyQ=∑z∈Qmzxmzy.Get advertising similarity matrixMQ=mxyQ and user similarity matrix MP=mxyP. The user homogenous graph AQ and the advertising homogenous graph AP are constructed based on MPand MQ. Before using MQ and MP to construct user homogeneity graph and advertisement homogeneity graph, the edges with low weight should be appropriately removed to avoid noise interference affecting subsequent calculation results according to the weight distribution of MQ and MP.Attribute information types of users and advertisements should be considered to construct attribute characteristics of users and advertisements. For structured data, the nondiscrete data is discretized, and one-hot coding is performed to obtain feature coding. For unstructured data, TF-IDF [21] or LDA algorithm [22] is often used for structured processing if it is the information in this paper. In the case of audio, video, image, and other information, the corresponding deep learning method is used to transform it into structured data. User attribute characteristics are obtained by the GraphSAGE model. Matrix CP and advertising attribute feature matrix CQ are transformed into user feature matrix CP and CQ, as shown below.
(4)WP=HGraphSAGEAP,CP,(5)WQ=HGraphSAGEAQ,CQ.Assuming that the obtained embedding representation dimensions aren, the user feature matrix WP∈ℝw×n and advertising feature matrix WQ∈ℝt×n can be represented.The crossproduct operation is used to obtain the interaction matrix between users and advertising features. For userp and advertisement x, wpP represents the feature vector of user P, and Wp,x represents the feature vector of advertisement x. Then, the calculation equation of Wp,x is as follows.
(6)Wp,x=wpP⊗wxQ=wp1Pwx1Qwp1Pwx2Q⋯wp1PwxnQwp2PwxlQwp2Pwx2Q⋯wp2PwxnQ⋮⋮⋮wpnPwxlQwpnPwx2Q⋯wpnPwxnQ.In collaborative filtering, matrix decomposition is usually used to represent the relationship between advertising and users, the relationship between advertising and users is inner product, and only the information on the diagonal inWp,x is used.The multilayer perceptron (MLP) [23] algorithm can fit any function relationship theoretically, but it needs a lot of data for training. In the user and advertisement recommendation system, the behavior information of each user is limited. Therefore, this algorithm does not adopt the scheme of learning through MLP after directly combining the features of users and advertisements. The deep network trained with limited data will degrade its performance, and it is difficult to ensure the convergence of MLP to the real model. Meanwhile, in the experimental part, users and advertising features are directly spliced without convolutional neural network training. MLP was directly used for comparison experiments, which further showed that adding convolutional neural network enhanced the effect of the algorithm.This algorithm uses crossproduct to model the information interaction between advertisement and user and adopts convolutional neural network to train. The amount of data required for training is reduced, and the parameters required for training in the model are also cut down.


### 2.2.2. Structural Design of Convolutional Neural Network

In the convolutional neural network (CNN) model [24], the definition of parameters is more complex than that of traditional models, and the general rules of parameter design can be summarized as the following four aspects.
(1)
The convolution layer generally uses a smaller convolution kernel. The larger the convolution kernel is, the smaller the output feature graph is, and it is difficult to extract the features of the data. And the smaller the convolution kernel, the smaller the corresponding parameter(2)
The convolution step size is generally set small to facilitate better feature extraction(3)
The pooling layer often uses a2×2 pooling window. The function of the pooling layer is to reduce the spatial dimension of the input data. If the pooling operation is too large, data may be lost, and the network performance deteriorates(4)
The number of fully connected layers should not exceed 3. The more fully connected layers there are, the more difficult the training is, and the more likely it is to cause overfitting and gradient dissipationThe CNN part of this model is shown in Figure2, and the common convolutional network model is used for design. In order to avoid losing too much structural information, the convolution layer and pooling layer are not used to compress the matrix data into one dimension. The model is composed of 3 fully connected layers and 6 convolution layers. The convolution kernel size is 3×3, and the step size is 1×1. To keep the size of the input and output feature graphs constant, a padding operation is performed. After every two convolution layers, the pooling layer is added for maximum pooling. The pooling core size is 2×2, and the step size is 2×2. The feature graph was downsampled, and the number of channels was doubled in the next two convolution layers. Similarly, in the last convolution layer, flatten layer is added to flatten the data and connect the MLP network, gradually reducing the output dimension to one dimension. The total process is represented in Equation (7), where j^px is the output of the final neural network.
(7)j^px=σmt⊤σmt−1⊤⋯σm1⊤CNNWp,x+d1⋯+dt−1+dt,where σ is a nonlinear function. ReLu activators are used in all convolution layers and full connection layers except sigmoid activation function at the last full connection layer. The number of modal parameters of the total body is shown in Table 1.Figure 2
The structure diagram of CNN model in this paper.Table 1
Convolutional neural network partial model parameter.
Network layerModel parameterOutput sizeConvolution layer 13×3 convolution kernels, step length 1, same size filling32×32×4Convolution layer 23×3 convolution kernels, step length 1, same size filling32×32×4Pooling layer 12×2 pooling kernels, step length 2, without filling16×16×4Convolution layer 33×3 convolution kernels, step length 1, same size filling16×16×8Convolution layer 43×3 convolution kernels, step length 1, same size filling16×16×8Pooling layer 22×2 pooling kernels, step length 2, without filling8×8×8Convolution layer 53×3 convolution kernels, step length 1, same size filling8×8×16Convolution layer 63×3 convolution kernels, step length 1, same size filling8×8×16Full connection layer 1—256Full connection layer 2—16Full connection layer 3—1


### 2.2.3. The Loss Function

The loss function is mainly a square loss function, which is defined on the premise that the observation results obey the Gaussian distribution. In practical problems, the interactive information between users and advertisements does not necessarily follow the Gaussian distribution function design. This algorithm adopts the idea of binary classification and uses “0” and “1” to represent the relationship between users and advertisements, “0” means irrelevant, and “1” means relevant.j^px represents the convolutional networks. Output represents the likelihood of predicting that advertising x is related to user p. To ensure and celebrate j^px probabilistic meanings, limit their values to [0, 1]. Therefore, the activation function of the last layer of the neural network is sigmoid function, and the loss function used is shown in
(8)L=−∑p,x∈J∪J−jpxexpj^px+1−jpxexp1−j^px,where J is the positive sample set, J− is the negative sample set, jpx represents the connection between user p and advertising x, and j^px represents the final output of the convolutional network. Adam optimization algorithm [25] was adopted in the final model training. The dropout layer was added to the MLP part of the model to solve the problem of trained fitting and enhance the model generalization ability.


## 2.2.1. Overall Design of Algorithm

For the binary network of user and advertisement, the algorithm in this paper decomposes the binary graph into the homogenous network of advertisement and advertisement and the homogenous network of user and user. The GraphSAGE model was used to fuse user’s network feature structure and attribute feature, and the embedded expression with the same dimension was obtained. The crossproduct operation of feature vectors between users and advertisements is carried out, i.e., the relationship between users and each dimension of advertising features is represented by a matrix, and then, the potential relationship between them is extracted through the convolutional neural network. The algorithm flow in this paper is shown in Figure1.Figure 1
The flow of the proposed algorithm.In the scenario of user and advertisement recommendation, usually, the attribute information of advertisement and user and the interaction information of advertisement and user are known. In this context, the relationship between them is represented by the structure of the graph. Users and advertising nodes are nodes of the graph, and the interactive relationship between advertising and users is the edge of the graph. The bipartite graph model of advertisement and user is formed through mapping. In addition, it is assumed that the recommendation scenario containsm users and n ads. The user node set is represented by =p1,p2,⋯,pw, and the advertising node set is represented by Q=q1,q2,⋯,qt. For the above recommendation problem, the corresponding user-advertising bipartite graph is expressed as A=P,Q,G,M, G is the set of all edges in graph A, and gxy represents the connecting edge of nodes px and qy. M is the interaction weight matrix between users and advertisements in graph A, and mxy is the corresponding weight of gxy in graph A.The problem of homogenous network includes user network and advertising network. Taking the advertising network as an example, different ads have similar applicable groups. For user networks, if both users are sports enthusiasts, they will have similar hobbies. Therefore, homogenous networks also have profound connections. The user-advertising bipartite graph is decomposed into two homogeneous graphs. For graphA, the first-order similarity mxyP of the user node is defined as follows:
(2)mxyP=∑z∈Qmxzmyz.The first-order similaritymxyQ of the advertising node is defined as follows.
(3)mxyQ=∑z∈Qmzxmzy.Get advertising similarity matrixMQ=mxyQ and user similarity matrix MP=mxyP. The user homogenous graph AQ and the advertising homogenous graph AP are constructed based on MPand MQ. Before using MQ and MP to construct user homogeneity graph and advertisement homogeneity graph, the edges with low weight should be appropriately removed to avoid noise interference affecting subsequent calculation results according to the weight distribution of MQ and MP.Attribute information types of users and advertisements should be considered to construct attribute characteristics of users and advertisements. For structured data, the nondiscrete data is discretized, and one-hot coding is performed to obtain feature coding. For unstructured data, TF-IDF [21] or LDA algorithm [22] is often used for structured processing if it is the information in this paper. In the case of audio, video, image, and other information, the corresponding deep learning method is used to transform it into structured data. User attribute characteristics are obtained by the GraphSAGE model. Matrix CP and advertising attribute feature matrix CQ are transformed into user feature matrix CP and CQ, as shown below.
(4)WP=HGraphSAGEAP,CP,(5)WQ=HGraphSAGEAQ,CQ.Assuming that the obtained embedding representation dimensions aren, the user feature matrix WP∈ℝw×n and advertising feature matrix WQ∈ℝt×n can be represented.The crossproduct operation is used to obtain the interaction matrix between users and advertising features. For userp and advertisement x, wpP represents the feature vector of user P, and Wp,x represents the feature vector of advertisement x. Then, the calculation equation of Wp,x is as follows.
(6)Wp,x=wpP⊗wxQ=wp1Pwx1Qwp1Pwx2Q⋯wp1PwxnQwp2PwxlQwp2Pwx2Q⋯wp2PwxnQ⋮⋮⋮wpnPwxlQwpnPwx2Q⋯wpnPwxnQ.In collaborative filtering, matrix decomposition is usually used to represent the relationship between advertising and users, the relationship between advertising and users is inner product, and only the information on the diagonal inWp,x is used.The multilayer perceptron (MLP) [23] algorithm can fit any function relationship theoretically, but it needs a lot of data for training. In the user and advertisement recommendation system, the behavior information of each user is limited. Therefore, this algorithm does not adopt the scheme of learning through MLP after directly combining the features of users and advertisements. The deep network trained with limited data will degrade its performance, and it is difficult to ensure the convergence of MLP to the real model. Meanwhile, in the experimental part, users and advertising features are directly spliced without convolutional neural network training. MLP was directly used for comparison experiments, which further showed that adding convolutional neural network enhanced the effect of the algorithm.This algorithm uses crossproduct to model the information interaction between advertisement and user and adopts convolutional neural network to train. The amount of data required for training is reduced, and the parameters required for training in the model are also cut down.


## 2.2.2. Structural Design of Convolutional Neural Network

In the convolutional neural network (CNN) model [24], the definition of parameters is more complex than that of traditional models, and the general rules of parameter design can be summarized as the following four aspects.
(1)
The convolution layer generally uses a smaller convolution kernel. The larger the convolution kernel is, the smaller the output feature graph is, and it is difficult to extract the features of the data. And the smaller the convolution kernel, the smaller the corresponding parameter(2)
The convolution step size is generally set small to facilitate better feature extraction(3)
The pooling layer often uses a2×2 pooling window. The function of the pooling layer is to reduce the spatial dimension of the input data. If the pooling operation is too large, data may be lost, and the network performance deteriorates(4)
The number of fully connected layers should not exceed 3. The more fully connected layers there are, the more difficult the training is, and the more likely it is to cause overfitting and gradient dissipationThe CNN part of this model is shown in Figure2, and the common convolutional network model is used for design. In order to avoid losing too much structural information, the convolution layer and pooling layer are not used to compress the matrix data into one dimension. The model is composed of 3 fully connected layers and 6 convolution layers. The convolution kernel size is 3×3, and the step size is 1×1. To keep the size of the input and output feature graphs constant, a padding operation is performed. After every two convolution layers, the pooling layer is added for maximum pooling. The pooling core size is 2×2, and the step size is 2×2. The feature graph was downsampled, and the number of channels was doubled in the next two convolution layers. Similarly, in the last convolution layer, flatten layer is added to flatten the data and connect the MLP network, gradually reducing the output dimension to one dimension. The total process is represented in Equation (7), where j^px is the output of the final neural network.
(7)j^px=σmt⊤σmt−1⊤⋯σm1⊤CNNWp,x+d1⋯+dt−1+dt,where σ is a nonlinear function. ReLu activators are used in all convolution layers and full connection layers except sigmoid activation function at the last full connection layer. The number of modal parameters of the total body is shown in Table 1.Figure 2
The structure diagram of CNN model in this paper.Table 1
Convolutional neural network partial model parameter.
Network layerModel parameterOutput sizeConvolution layer 13×3 convolution kernels, step length 1, same size filling32×32×4Convolution layer 23×3 convolution kernels, step length 1, same size filling32×32×4Pooling layer 12×2 pooling kernels, step length 2, without filling16×16×4Convolution layer 33×3 convolution kernels, step length 1, same size filling16×16×8Convolution layer 43×3 convolution kernels, step length 1, same size filling16×16×8Pooling layer 22×2 pooling kernels, step length 2, without filling8×8×8Convolution layer 53×3 convolution kernels, step length 1, same size filling8×8×16Convolution layer 63×3 convolution kernels, step length 1, same size filling8×8×16Full connection layer 1—256Full connection layer 2—16Full connection layer 3—1


## 2.2.3. The Loss Function

The loss function is mainly a square loss function, which is defined on the premise that the observation results obey the Gaussian distribution. In practical problems, the interactive information between users and advertisements does not necessarily follow the Gaussian distribution function design. This algorithm adopts the idea of binary classification and uses “0” and “1” to represent the relationship between users and advertisements, “0” means irrelevant, and “1” means relevant.j^px represents the convolutional networks. Output represents the likelihood of predicting that advertising x is related to user p. To ensure and celebrate j^px probabilistic meanings, limit their values to [0, 1]. Therefore, the activation function of the last layer of the neural network is sigmoid function, and the loss function used is shown in
(8)L=−∑p,x∈J∪J−jpxexpj^px+1−jpxexp1−j^px,where J is the positive sample set, J− is the negative sample set, jpx represents the connection between user p and advertising x, and j^px represents the final output of the convolutional network. Adam optimization algorithm [25] was adopted in the final model training. The dropout layer was added to the MLP part of the model to solve the problem of trained fitting and enhance the model generalization ability.


## 3. Experimental Results and Analysis

### 3.1. Data Collection and Preprocessing

The data set adopted in this paper comes from the real we-media advertising technology application platform WeChat public account. The whole process of personalized advertising recommendation system starts from data collection. The relevant data to be collected mainly includes user basic information, advertising data, contextual information such as time and location, interactive behavior information such as user comments, and user browsing history. The basic user information mainly comes from user registration and information improvement functions in the relevant platform system. Advertising data can be obtained from public data sets of some equation agencies or by self-scraping, but most of the datasets in the study were not exposed or used internal data. Time and position light context information is obtained by device time, GPS, etc. Interactive information can be obtained such as user comments and user browsing history from related logs such as cookies.The data acquired in the above data acquisition stage may be accumulated in data noise, data loss, and other situations, which will affect the user preference acquisition and the effect of subsequent recommendation process. Therefore, in order to standardize the input data of personalized advertising recommendation system, it is necessary to preprocess further acquired data, such as calculation and quantification. It can be divided into shallow processing and deep processing according to the complexity of data processing and the intuitive degree of processing effect. The shallow processing mainly applied user’s intuitive data, through the relatively simple standard and method, and obtains the high quantification degree result, such as a hierarchical (1-5) representation of user interest, or a self-defined project score, and the impact of missing link data. A distributed representation of user’s browsing history yields a vector representation of the user. By comparing with the set threshold, the data noise can be filtered. Different quantized values are set for different time periods to distinguish, for example, assign different quantitative values to working days and rest days to distinguish. The old state of the data set is integrated into a single historical state, while the latest state of limited data is retained, etc. In addition, data classification criteria can be altered in order to have a comprehensive evaluation of research results. For example, the threshold used to filter data is modified, or the proportion of training set and test set is reformed.The abovementioned data processing or expansion of shallow methods is of limited help to the recommendation process, and it is difficult to deal with complex scenes. Therefore, in-depth data processing should be considered. However, deep processing mainly aims at complex data of users and uses relevant mining or acquisition techniques to obtain potentially extensible data features or representations. For example, the topic acquisition or mining technology can be used to map user behaviors such as historical posting and forwarding into the potential topic space to help obtain user preferences by click, behavioral data and advertising information, parameterizing potential space, etc. Keywords are obtained through user comments and feedback on advertising, and users’ attitudes toward related topics are analyzed. Additionally, users’ emotional data can be acquired via processing microblog data.


### 3.2. Algorithm Performance Analysis

The data set adopted in this paper has about 8 million users, including 1 numerical feature and 31 categorical features (including 11 multivalued categorical feature). The data set has about 8 million users and contains 1 numerical feature and 31 categorical features (including 11 multivalued categorical feature). AUC (area under curve) scoring was adopted for model evaluation because the sample positive and negative ratio was imbalanced (the ratio of positive and negative samples was about 1 : 20) [26]. AUC is defined as the area under the ROC (receiver-operating characteristic curve) curve bounded by the coordinate axes. The horizontal and vertical coordinates of the ROC curve were false positive rate (FPR: FP/(TN+FP)) and true rate (TPR: TP/(TP+FN)). AUC score can be understood as the probability that positive samples rank ahead of negative samples. When the prediction result is completely correct, the AUC value is 1; so, the larger the AUC value is, the more accurate the classification result is. Table 2 is the confusion matrix table.Table 2
The confusion matrix table.
Predict the actualPredictingPositivePositivePositiveTPFPNegativeFNTNIn this experiment, the three models were trained for several times, and the final result was the average AUC of many experiments. The experimental results are shown in Table3 and Figure 3.Table 3
Original data set results.
ModelAUC valueDCN [27]0.728614VSM [28]0.737315Proposed0.759341Figure 3
The ROC curve.As can be indicated from the results in Table3, the AUC value of the VSM vector space model [27] is higher than that of DCN model [28] due to its second-order combination characteristics. However, the proposed GraphSAGE model, due to the addition of deep neural network to learn high-order feature combination, has higher AUC values than LR and FM models. As can be concluded from Figure 3, the front of the ROC curve is approximately a straight line x=0 due to the unbalanced proportion of positive and negative samples. The true rate of GraphSAGE behind the ROC curve is higher than that of VSM vector space model and DCN model; so, the AUC value of GraphSAGE is higher than that of VSM vector space model and DCN model. Combined with the results in Table 3 and Figure 3, it can be shown that the GraphSAGE model can effectively mine high-order combination features and has better recommendation effect than VSM vector space model and DCN model.


### 3.3. Comparative Analysis of Algorithm Performance

In order to verify the performance of algorithm personalized recommendation,HR@k was selected as an evaluation index to comprehensively measure the performance of algorithm results under two indexes, namely, disorder and order. Let Rp be the recommendation list of user’ p on the test set and Np be the advertisement list of user interaction. Recall rate is defined as the proportion of ads in Rp that end up interacting with users in the test set. The calculation equation is as follows:
(9)Rg=∑p∈PRp⋂Np∑p∈PNp.The larger theRg value is, the higher the recall rate of the recommendation algorithm is. Since the value of Rg is closely related to the length of the recommended list, the conditional setting is often indicated directly with Rg@k, represented as HR@k.Equation (7) is the basic model of the recommendation algorithm in this paper. Since it is a dichotomous problem, “0” and “1” can be used to indicate whether the advertisement is recommended. The sigmoid function is selected to limit the result between 0 and 1 to obtain the specific loss function. As shown in Equation (8), model parameters are trained by minimizing loss function.The convergence of the model is verified by experiments. In the process of training and learning, early stop method is used to avoid the occurrence of overfitting phenomenon. 500 iterations were trained on the data set of WeChat public account, and the experimental results are shown in Figure4. With the increase of training times, both of them show stable state, so the convergence performance of the algorithm is good.Figure 4
The training loss and training results of HR@10.
(a)
The training loss(b)
The training results of HR@10


## 3.1. Data Collection and Preprocessing

The data set adopted in this paper comes from the real we-media advertising technology application platform WeChat public account. The whole process of personalized advertising recommendation system starts from data collection. The relevant data to be collected mainly includes user basic information, advertising data, contextual information such as time and location, interactive behavior information such as user comments, and user browsing history. The basic user information mainly comes from user registration and information improvement functions in the relevant platform system. Advertising data can be obtained from public data sets of some equation agencies or by self-scraping, but most of the datasets in the study were not exposed or used internal data. Time and position light context information is obtained by device time, GPS, etc. Interactive information can be obtained such as user comments and user browsing history from related logs such as cookies.The data acquired in the above data acquisition stage may be accumulated in data noise, data loss, and other situations, which will affect the user preference acquisition and the effect of subsequent recommendation process. Therefore, in order to standardize the input data of personalized advertising recommendation system, it is necessary to preprocess further acquired data, such as calculation and quantification. It can be divided into shallow processing and deep processing according to the complexity of data processing and the intuitive degree of processing effect. The shallow processing mainly applied user’s intuitive data, through the relatively simple standard and method, and obtains the high quantification degree result, such as a hierarchical (1-5) representation of user interest, or a self-defined project score, and the impact of missing link data. A distributed representation of user’s browsing history yields a vector representation of the user. By comparing with the set threshold, the data noise can be filtered. Different quantized values are set for different time periods to distinguish, for example, assign different quantitative values to working days and rest days to distinguish. The old state of the data set is integrated into a single historical state, while the latest state of limited data is retained, etc. In addition, data classification criteria can be altered in order to have a comprehensive evaluation of research results. For example, the threshold used to filter data is modified, or the proportion of training set and test set is reformed.The abovementioned data processing or expansion of shallow methods is of limited help to the recommendation process, and it is difficult to deal with complex scenes. Therefore, in-depth data processing should be considered. However, deep processing mainly aims at complex data of users and uses relevant mining or acquisition techniques to obtain potentially extensible data features or representations. For example, the topic acquisition or mining technology can be used to map user behaviors such as historical posting and forwarding into the potential topic space to help obtain user preferences by click, behavioral data and advertising information, parameterizing potential space, etc. Keywords are obtained through user comments and feedback on advertising, and users’ attitudes toward related topics are analyzed. Additionally, users’ emotional data can be acquired via processing microblog data.


## 3.2. Algorithm Performance Analysis

The data set adopted in this paper has about 8 million users, including 1 numerical feature and 31 categorical features (including 11 multivalued categorical feature). The data set has about 8 million users and contains 1 numerical feature and 31 categorical features (including 11 multivalued categorical feature). AUC (area under curve) scoring was adopted for model evaluation because the sample positive and negative ratio was imbalanced (the ratio of positive and negative samples was about 1 : 20) [26]. AUC is defined as the area under the ROC (receiver-operating characteristic curve) curve bounded by the coordinate axes. The horizontal and vertical coordinates of the ROC curve were false positive rate (FPR: FP/(TN+FP)) and true rate (TPR: TP/(TP+FN)). AUC score can be understood as the probability that positive samples rank ahead of negative samples. When the prediction result is completely correct, the AUC value is 1; so, the larger the AUC value is, the more accurate the classification result is. Table 2 is the confusion matrix table.Table 2
The confusion matrix table.
Predict the actualPredictingPositivePositivePositiveTPFPNegativeFNTNIn this experiment, the three models were trained for several times, and the final result was the average AUC of many experiments. The experimental results are shown in Table3 and Figure 3.Table 3
Original data set results.
ModelAUC valueDCN [27]0.728614VSM [28]0.737315Proposed0.759341Figure 3
The ROC curve.As can be indicated from the results in Table3, the AUC value of the VSM vector space model [27] is higher than that of DCN model [28] due to its second-order combination characteristics. However, the proposed GraphSAGE model, due to the addition of deep neural network to learn high-order feature combination, has higher AUC values than LR and FM models. As can be concluded from Figure 3, the front of the ROC curve is approximately a straight line x=0 due to the unbalanced proportion of positive and negative samples. The true rate of GraphSAGE behind the ROC curve is higher than that of VSM vector space model and DCN model; so, the AUC value of GraphSAGE is higher than that of VSM vector space model and DCN model. Combined with the results in Table 3 and Figure 3, it can be shown that the GraphSAGE model can effectively mine high-order combination features and has better recommendation effect than VSM vector space model and DCN model.


## 3.3. Comparative Analysis of Algorithm Performance

In order to verify the performance of algorithm personalized recommendation,HR@k was selected as an evaluation index to comprehensively measure the performance of algorithm results under two indexes, namely, disorder and order. Let Rp be the recommendation list of user’ p on the test set and Np be the advertisement list of user interaction. Recall rate is defined as the proportion of ads in Rp that end up interacting with users in the test set. The calculation equation is as follows:
(9)Rg=∑p∈PRp⋂Np∑p∈PNp.The larger theRg value is, the higher the recall rate of the recommendation algorithm is. Since the value of Rg is closely related to the length of the recommended list, the conditional setting is often indicated directly with Rg@k, represented as HR@k.Equation (7) is the basic model of the recommendation algorithm in this paper. Since it is a dichotomous problem, “0” and “1” can be used to indicate whether the advertisement is recommended. The sigmoid function is selected to limit the result between 0 and 1 to obtain the specific loss function. As shown in Equation (8), model parameters are trained by minimizing loss function.The convergence of the model is verified by experiments. In the process of training and learning, early stop method is used to avoid the occurrence of overfitting phenomenon. 500 iterations were trained on the data set of WeChat public account, and the experimental results are shown in Figure4. With the increase of training times, both of them show stable state, so the convergence performance of the algorithm is good.Figure 4
The training loss and training results of HR@10.
(a)
The training loss(b)
The training results of HR@10


## 4. Conclusion

With the evolution and acceptance of we-media platforms, traditional advertising recommendation algorithms can no longer meet the personalized needs. Personalized advertising recommendation is increasingly favored by “we-media” platforms and has become the main way for advertisers to identify user preferences and boost advertising revenue. In this paper, a deep learning fusion model algorithm is proposed to finalize the task of network representation learning by the GraphSAGE model. The bipartite graph model is applied to network representation learning method to decompose user and advertisement into two homogeneous networks. Each dimensional relationship matrix between user and advertising feature is obtained by crossproduct operation. Convolutional neural network is used to capture the high-order interaction relations in each dimension of the feature. Compared with other algorithms, there is no need to retrain the whole model when new nodes are added to the graph. The recall rate and discount rate of the recommendation algorithm are improved greatly and have good convergence. The GraphSAGE model can optimize advertising strategy, reduce advertising cost, and improve the conversion rate of advertising. Simultaneously, users can avoid accepting irrelevant advertising messages and better protect their privacy. The efficiency of the proposed algorithm will be analyzed in the future work.



---

*Source: 1632735-2022-03-01.xml*