User missing attribute completion method and system based on time sequence bipartite graph neural network
By transforming the user attribute matrix into a temporal bipartite graph structure and using graph neural networks and LSTM models for edge prediction, the problem of missing data in the user attribute matrix is solved, improving the accuracy and flexibility of data mining and modeling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2026-03-31
AI Technical Summary
The existing user attribute matrix has the problem of missing data. Traditional methods are difficult to effectively handle mixed data types and time series data, and lack flexibility, resulting in poor data mining and modeling performance.
The user attribute matrix is modeled as a temporal bipartite graph structure. Graph neural networks are used for node embedding and edge prediction. Node features and edge features are extracted through graph convolutional neural networks, and LSTM models are used to fuse temporal features. A multi-task learning edge prediction model is constructed to handle categorical and continuous variables.
It enables efficient completion of missing data in user attribute matrices, improving the accuracy and flexibility of data mining and modeling, and is suitable for missing data completion in time series tables.
Smart Images

Figure CN116881716B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of missing attribute completion and graph neural networks, and relates to a method and system for user missing attribute completion. Background Technology
[0002] User attributes refer to the basic characteristics or classification criteria used to describe users in digital products or services. User attributes are categorized into fixed attributes and time-varying attributes based on their time-varying nature. Fixed attributes are those that remain relatively stable over time, such as a user's gender, place of origin, height, and registration time. Time-varying attributes, on the other hand, are those that change frequently over time, including a user's preferences and interests in online content, entertainment, culture, etc., as user preferences may differ at different times. Accurate user attributes help products or services better understand and analyze users, thereby better meeting user needs and improving user loyalty. Simultaneously, user attributes can also help businesses implement more refined marketing strategies, increase market share, and drive business growth. Therefore, understanding user attributes and effectively analyzing and utilizing them is crucial for the commercial success of digital products or services. Furthermore, users are often numerous, and the user attributes of multiple users can form a user attribute matrix. Businesses can analyze the similarities in attribute characteristics among different users to uncover potential customers.
[0003] However, user attribute matrices are often incomplete, with missing information in certain attribute fields for a particular user. The reasons for missing attributes are varied, typically including: some information is temporarily unavailable or too costly to obtain; human error such as forgetting to fill in information or misunderstanding the data; and non-human factors such as malfunctions in data acquisition equipment, storage media, or transmission media. The impact of missing user attributes on data mining and modeling is significant. First, a large number of missing attributes leads to the loss of a large amount of useful information in data mining and modeling; second, data mining models become more uncertain, and data patterns are harder to grasp; and third, data containing null values can disrupt the modeling process, resulting in unreliable output.
[0004] Data imputation is a common approach to solving this problem, which involves estimating missing values from non-missing values in a dataset. For decades, missing data imputation has been an active research area in statistics and machine learning. Statistical methods for data imputation often provide useful theoretical properties, but they suffer from significant drawbacks: (1) they tend to make strong assumptions about the data distribution; (2) they lack the flexibility to handle mixed data types containing both continuous and categorical variables; and (3) matrix imputation-based methods cannot be generalized to unseen samples, requiring retraining when the model encounters new data samples. In recent years, deep learning models have also been used to solve the feature imputation problem. However, these models have significant limitations. Denoising autoencoder (DAE) models and generative adversarial imputation networks (GAIN) use only a single observation (user) as input to estimate missing features, lacking the complex interactions between multiple observations (users) and features. Graph neural network-based methods have also been proposed in the context of matrix imputation. However, these methods assume a limited range of values in their model design, lack the flexibility to handle mixed data types containing both continuous and categorical variables, and are only applicable to single tabular data, which limits their applicability to the problem of missing data completion in time series tabular data. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a method and system for completing missing user attributes based on a temporal bipartite graph neural network.
[0006] This invention considers the structural and temporal characteristics of user attributes, models user attributes as a temporal bipartite graph structure, and proposes a temporal bipartite graph neural network method for completing missing user attributes based on existing graph neural network architectures. This transforms the problem of completing missing user attributes into an edge prediction problem within a temporal bipartite graph. The technical solution of this invention is as follows:
[0007] A method and system for user missing attribute completion based on temporal bipartite graph neural network, comprising the following steps:
[0008] S1: Preprocess the time-series user attribute matrix data, encode categorical attributes using one-hot vectors, and scale the data to [0, 1] using the MinMax normalization method for continuous attributes;
[0009] S2: Construct a time-series bipartite graph structure for user attributes, where each user in the time-series user attribute matrix is treated as a user node, each attribute as an attribute node, and each record value of a user attribute as an edge connecting the user node and the attribute node.
[0010] S3: Use graph neural networks to compute the embedding vectors of user and attribute nodes in the temporal bipartite graph;
[0011] S4: Concatenate the user node embedding vector and the attribute node embedding vector at both ends of each edge in the temporal bipartite graph to generate the edge representation of user node-attribute node.
[0012] S5: A multi-task learning temporal bipartite graph user node-attribute node edge prediction model is constructed using linear layers, where categorical and continuous variables share the preceding linear layers, and only the last linear layer is different.
[0013] S6: Using supervised learning, some known edges in the temporal bipartite graph are first removed manually. Then, these edges are predicted by reconstruction. The model is continuously trained by comparing the difference between the predicted edge values and the actual edge values. Finally, the trained model is used to predict the missing edges in the graph.
[0014] S7: After predicting the missing edges of the time-series bipartite graph, write the predicted values back to the original matrix and inversely transform the categorical and continuous variables back to their original forms.
[0015] Furthermore, in S1, a user attribute matrix consisting of n users and m attribute features is defined as D∈R. n×m Each row D[i,:] represents all attributes of a user, and each column D[:,j] represents all user records for each attribute. The j-th feature of the i-th user is represented by D. ij The time-series user attribute matrix includes attribute matrices at k different time steps, where the users and attributes in each matrix are consistent. User attributes are generally of two types: categorical variables and continuous variables. Categorical variables are names that describe the category of something, and their values are categorical data; for example, "gender" is a categorical variable with values of "male" or "female." Continuous variables are variables that can take any value within a certain range, such as "income." Different preprocessing methods are used for different variable types to ensure flexibility. For categorical variables, each... Categorical variables are mapped to discrete numerical variables and encoded using one-hot vectors. For example, for the categorical variable "gender", "male" is first mapped to 0 and "female" to 1. Then, one-hot vectors are used for encoding. The 0th bit (from right to left) of the encoding vector for "male" is 1, and the rest are 0. The 1st bit of the encoding vector for "female" is 1, and the rest are 0. Therefore, the final encoding vector result for "male" is [0, 1], and the encoding vector result for "female" is [1, 0]. For continuous variables, MinMax normalization is used to normalize the attributes to eliminate numerical differences caused by different dimensions of different attributes.
[0016] Furthermore, in S2, the user attribute matrix lacks a natural graph structure and cannot be directly input into the model for training. Therefore, each user in the user attribute matrix is treated as a user node, each attribute as an attribute node, and each record value of the user attribute is used as an edge connecting the user node and the attribute node, thereby transforming the user attribute matrix into a bipartite graph structure. Transforming each matrix in the temporal user attribute matrix into a bipartite graph yields a temporal bipartite graph with k time steps.
[0017] In the missing data problem, certain feature values are missing, represented by a mask matrix M∈{0,1}. n×m Only when M ij D can only be observed when = 1. ij The values of the feature matrix D and the mask M can be represented as an undirected bipartite graph G = (V, E), where V = V D ∪V F V D ={u1, ..., u n}, V F ={v1, ..., v m} is a set of nodes consisting of user nodes and attribute nodes; It is a set of edges, where edges exist only in user nodes and attribute nodes; edge features Take the value of the corresponding feature If Dij is a categorical variable, then convert it to a one-hot vector and assign it to... To simplify symbols Using e in the context of the feature matrix D ij Using e in the context of graph G uv .
[0018] Furthermore, in step S3, after initializing the node and edge features in the bipartite graph, a graph convolutional neural network is used to pass information between nodes in the bipartite graph. In each GNN layer l, the message passing function passes the source node... Embedding and edge embedding The concatenation is used as input:
[0019]
[0020] Among them AGG l It is an aggregation function, σ is a nonlinear function, and P (l) These are trainable weights, CONCAT is the vector concatenation function, and N(v) are the neighboring nodes of node v.
[0021] Node embedding vectors in layer l Updated to:
[0022]
[0023] Q (l) These are trainable weights;
[0024] edge embedding vector of layer l Updated to:
[0025]
[0026] Among them W (l) These are trainable weights;
[0027] After L iterations, the final node embedding vector and known edge embedding vector of the bipartite graph at each time step can be generated, where L is the number of layers of the GNN.
[0028] The representation is obtained on the bipartite graph at each time step t following the steps above. Then, LSTM is used to fuse them to obtain the final result.
[0029] Furthermore, in S4, for the edge e to be predicted, the edge prediction input features are obtained by aggregating the node embedding vectors generated in S3 based on the two vertices u and v connected by the edge:
[0030] h uv =AGG(h u h v (4)
[0031] Where h uv It is the edge prediction input feature. AGG is a vector aggregation function. Different aggregation functions can be used to extract the edge prediction input features, such as summation, averaging and concatenation.
[0032] Furthermore, in S5, the model input is the input features generated in S4, which, after passing through multiple linear layers, yield the final attribute edge prediction result. Categorical and continuous variables share the preceding linear layers, differing only in the last linear layer. The number of output units for categorical variables is n, where n is the maximum number of categories in the table of categorical variables, optimized using the cross-entropy classification loss function. The number of output units for continuous variables is 1, optimized using the mean squared error loss function, as shown in the following formula:
[0033]
[0034] Where |E| is the total number of predicted edges, L cls It is the cross-entropy classification loss function, L mse It is the mean squared error loss function, e uv It is the true value, θ(h) uv ) is the model's predicted value.
[0035] Furthermore, S6 specifically includes:
[0036] S6-1: From the constructed dataset, take all observable data points as the training set and divide a portion of it into a test set;
[0037] S6-2: Use stochastic gradient descent to update the neural network parameters, iterating for a total of m times. After each parameter update, calculate the accuracy of missing value imputation in the test set, including the accuracy of categorical variables and the mean absolute error (MAE) of continuous variables.
[0038] S6-3: Compare and save the hyperparameter with the highest accuracy in m iterations, which gives the network model used for user attribute edge prediction;
[0039] S6-4: Apply the obtained network model to the actual missing edges in the temporal user attribute bipartite graph.
[0040] Furthermore, in S7, for each time step of the predicted bipartite graph, the missing edges... The corresponding data in the original user attribute matrix is: For categorical variables, the predicted category values are mapped back to the corresponding category names; for continuous variables, the predicted normalized values are inversely transformed to the original value range using MinMax.
[0041] The advantages of this invention are: it transforms the temporal user attribute matrix into a temporal bipartite graph structure, uses a graph convolutional neural network to aggregate and extract node and edge features from the graph, enables full interaction between different users (rows) and different attributes (columns) through the graph neural network, and uses an LSTM sequence model to fuse temporal features. Furthermore, it naturally transforms the user attribute imputation problem into an edge prediction problem in a bipartite graph. Then, it constructs a multi-task edge prediction model. For categorical and continuous variables, it stacks multiple shared linear layers to improve the model's generalization ability, and uses different output heads to allow the model to flexibly handle categorical and continuous variables. Next, based on the aggregated node features, it predicts the output of missing edges. Finally, it writes the output of missing edges back into the original user attributes. Attached Figure Description
[0042] Figure 1 This is the overall flowchart of the present invention.
[0043] Figure 2 This is a schematic diagram of the present invention converting time-series user attributes into a time-series bipartite graph.
[0044] Figure 3 This is a schematic diagram of the user attribute completion architecture based on graph neural networks of the present invention. Detailed Implementation
[0045] The technical solution of the present invention will be clearly and completely explained and described below with reference to the accompanying drawings.
[0046] Example 1
[0047] A method for completing missing user attributes based on a temporal bipartite graph neural network, the overall process is as follows: Figure 1 It includes the following steps:
[0048] S1: Preprocess the time-series user attribute matrix data. Encode categorical attributes using one-hot vectors and scale the data to [0, 1] using Min-Max normalization for continuous attributes. Define a user attribute matrix consisting of n users and m attribute features as D∈R. n×m Each row D[i,:] represents all attributes of a user, and each column D[:,j] represents all user records for each attribute. The j-th feature of the i-th user is represented by D. ij The time-series user attribute matrix includes attribute matrices at k different time steps, where the users and attributes in each matrix are consistent. User attributes are generally of two types: categorical variables and numerical variables. A categorical variable is a name describing the category of something, and its value is categorical data; for example, "gender" is a categorical variable with values of "male" or "female". Continuous variables are variables that can take any value within a certain range; for example, "income" is a continuous numerical variable. Different preprocessing methods are used for different variable types to ensure flexibility. For categorical variables, [the preprocessing steps are not specified in the original text]. Each category is mapped to a discrete numerical variable and encoded using one-hot vectors. For example, for the category variable "gender", "male" is first mapped to 0 and "female" to 1. Then, one-hot vectors are used for encoding. The 0th bit (from right to left) of the encoding vector for "male" is 1, and the rest are 0. The 1st bit of the encoding vector for "female" is 1, and the rest are 0. Therefore, the final encoding vector result for "male" is [0, 1], and the encoding vector result for "female" is [1, 0]. For continuous variables, MinMax normalization is used to normalize the attributes to eliminate numerical differences caused by different dimensions of different attributes.
[0049] S2: Construct a time-series user attribute bipartite graph structure. Treat each user in the time-series user attribute matrix as a user node, each attribute as an attribute node, and each record value of a user attribute as an edge connecting user nodes and attribute nodes. Since the user attribute matrix lacks a natural graph structure and cannot be directly input into the model for training, we transform the user attribute matrix into a bipartite graph structure by treating each user as a user node, each attribute as an attribute node, and each record value of a user attribute as an edge connecting user nodes and attribute nodes. Transforming each matrix in the time-series user attribute matrix into a bipartite graph yields a time-series bipartite graph with k time steps.
[0050] In the missing data problem, certain feature values are missing, represented by a mask matrix M∈{0,1}. n×m Only when M ij D can only be observed when = 1. ij The values of the feature matrix D and the mask M can be represented as an undirected bipartite graph G = (V, E), where V = V D ∪V F V D ={u1, ..., u n}, V F ={v1, ..., v m} is a set of nodes consisting of user nodes and attribute nodes; It is a set of edges, where edges exist only in user nodes and attribute nodes; edge features Take the value of the corresponding feature If D ij If it is a categorical variable, then convert it into a one-hot vector and then assign it to... To simplify symbols Using e in the context of the feature matrix D ij Using e in the context of graph G uv The conversion process is as follows: Figure 2 As shown;
[0051] S3: Use a graph neural network to calculate the embedding vectors of user and attribute nodes in the temporal bipartite graph; after initializing the node and edge features in the bipartite graph, use a graph convolutional neural network to pass information between nodes in the bipartite graph. In each GNN layer l, the message passing function passes the source node... Embedding and edge embedding The concatenation is used as input:
[0052]
[0053] Among them AGG l It is an aggregation function, σ is a nonlinear function, and P (l) These are trainable weights, CONCAT is the vector concatenation function, and N(v) are the neighboring nodes of node v.
[0054] Node embedding vectors in layer l Updated to:
[0055]
[0056] Q (l) These are trainable weights;
[0057] edge embedding vector of layer l Updated to:
[0058]
[0059] Among them W (l) These are trainable weights;
[0060] After L iterations, the final node embedding vector and known edge embedding vector of the bipartite graph at each time step can be generated, where L is the number of layers of the GNN.
[0061] The representation is obtained on the bipartite graph at each time step t following the steps above. Then, LSTM is used to fuse them to obtain the final result. Overall architecture as follows Figure 3 As shown;
[0062] S4: Concatenate the user node embedding vectors and attribute node embedding vectors at both ends of each edge in the temporal bipartite graph to generate the user node-attribute node edge representation; for the edge e to be predicted, aggregate the node embedding vectors generated in S3 based on the two vertices u and v connected by the edge to obtain the edge prediction input features:
[0063] h uv =AGG(h u h v (4)
[0064] Where h uv It is an edge prediction input feature. AGG is a vector aggregation function. Different aggregation functions can be used to extract edge prediction input features, such as summation, averaging, and concatenation. In this invention, concatenation is used to preserve node features as much as possible.
[0065] S5: A multi-task learning user node-attribute node edge prediction model is constructed using linear layers. Categorical and continuous variables share the preceding linear layers, with only the last linear layer differing. The model input is the input features generated in S4, which, after passing through multiple linear layers, yield the final attribute edge prediction result. Categorical and continuous variables share the preceding linear layers, with only the last linear layer differing. The number of output units for categorical variables is n, where n is the maximum number of categories in the table. The cross-entropy classification loss function is used for optimization. The number of output units for continuous variables is 1, and the mean squared error loss function is used for optimization. The specific formula is as follows:
[0066]
[0067] Where |E| is the total number of predicted edges, L cls It is the cross-entropy classification loss function, L mse It is the mean squared error loss function, e uv It is the true value, θ(h)uv () is the model's predicted value;
[0068] S6: Using supervised learning, some known edges in the temporal bipartite graph are first artificially removed. Then, these edges are predicted by reconstruction. The model is continuously trained by analyzing the difference between the predicted edge values and the actual edge values. Finally, the trained model is used to predict missing edges in the graph. Specifically:
[0069] S6-1: From the constructed dataset, take all observable data points as the training set and divide a portion of it into a test set;
[0070] S6-2: Use stochastic gradient descent to update the neural network parameters, iterating for a total of m times. After each parameter update, calculate the accuracy of missing value imputation in the test set, including the accuracy of categorical variables and the mean absolute error (MAE) of continuous variables.
[0071] S6-3: Compare and save the hyperparameter with the highest accuracy in m iterations, which gives the network model used for user attribute edge prediction;
[0072] S6-4: Apply the obtained network model to the actual missing edges in the temporal user attribute bipartite graph;
[0073] S7: After predicting the missing edges in the time-series bipartite graph, write the predicted values back to the original matrix and inversely transform the categorical and continuous variables back to their initial forms; for each time step of the predicted missing edge in the bipartite graph... have For categorical variables, the predicted category values are mapped back to the corresponding category names; for continuous variables, the predicted normalized values are inversely transformed to the original value range using MinMax.
[0074] Example 2
[0075] This invention provides a student table completion method based on a temporal bipartite graph neural network for completing missing user attributes. The overall process is as follows: Figure 1 The steps include:
[0076] S1: Preprocess the time-series student table attribute matrix data. Categorical attributes are encoded using one-hot vectors, and continuous attributes are scaled to [0, 1] using MinMax normalization. A student attribute matrix consisting of n students and m attribute features is defined as D∈R. n×m Each row D[i,:] represents all attributes of a student, and each column D[:,j] represents all student records for each attribute. The j-th feature of the i-th student is represented by D. ij The student table attribute matrix data is shown in the table below:
[0077] gender age Number of times to check in while running Lung capacity score Standing long jump results 50m running time 12-minute run time GPA male 20 39 4627 2.38 NAN 2900 3.7 female 21 NAN 3200 2.12 8.2 2300 3.9 male NAN 43 6623 2.43 6.9 3300 3.2 male 21 35 NAN 2.35 7.4 NAN 3.6 female 20 37 2895 NAN 8.4 2200 3.8
[0078] In this table, each row records a student's basic information, attendance records, physical fitness test information, and GPA information for a specific year during their four years of university. There are four years of information, meaning the time-series student table attribute matrix has four time steps. NAN indicates that the data is missing. The table has eight attributes, with gender being a categorical attribute and the rest being continuous attributes. For the categorical attribute "gender," "male" is first mapped to 0, and "female" to 1. Then, one-hot vectors are used for encoding. The 0th bit (from right to left) of the encoding vector for "male" is 1, and the rest are 0. The 1st bit of the encoding vector for "female" is 1, and the rest are 0. Therefore, the final encoding vector result for "male" is [0, 1], and the encoding vector result for "female" is [1, 0]. For continuous variables, MinMax normalization is used to normalize the attributes to eliminate numerical differences caused by different attribute units.
[0079] S2: Construct a time-series user attribute bipartite graph structure. Treat each student in the time-series student attribute matrix as a user node, each attribute as an attribute node, and each record value of a user attribute as an edge connecting user nodes and attribute nodes. Since the user attribute matrix lacks a natural graph structure and cannot be directly input into the model for training, we use each user in the matrix as a user node, each attribute as an attribute node, and each record value of a user attribute as an edge connecting user nodes and attribute nodes, thus transforming the user attribute matrix into a bipartite graph structure. Transforming each matrix in the time-series user attribute matrix into a bipartite graph yields a time-series bipartite graph with k time steps. In this example, k = 4.
[0080] In the missing data problem, certain feature values are missing, represented by a mask matrix M∈{0,1}. n×m Only when M ij D can only be observed when = 1. ij The values of the feature matrix D and the mask M can be represented as an undirected bipartite graph G = (V, E), where V = V D ∪V F V D ={u1, ..., u n}, V F ={v1, ..., v m} is a set of nodes consisting of user nodes and attribute nodes; It is a set of edges, where edges exist only in user nodes and attribute nodes; edge features Take the value of the corresponding feature If D ij If it is a categorical variable, then convert it into a one-hot vector and then assign it to... To simplify symbols Using e in the context of the feature matrix D ij Using e in the context of graph G uv The conversion process is as follows: Figure 2 As shown;
[0081] S3: Use a graph neural network to calculate the embedding vectors of user and attribute nodes in the temporal bipartite graph; after initializing the node and edge features in the bipartite graph, use a graph convolutional neural network to pass information between nodes in the bipartite graph. In each GNN layer l, the message passing function passes the source node... Embedding and edge embedding The concatenation is used as input:
[0082]
[0083] Among them AGG l It is an aggregation function, σ is a nonlinear function, and P (l) These are trainable weights, CONCAT is the vector concatenation function, and N(v) are the neighboring nodes of node v.
[0084] Node embedding vectors in layer l Updated to:
[0085]
[0086] Q (l) These are trainable weights;
[0087] edge embedding vector of layer l Updated to:
[0088]
[0089] Among them W (l) These are trainable weights;
[0090] After L iterations, the final node embedding vector and known edge embedding vector of the bipartite graph at each time step can be generated, where L is the number of layers of the GNN.
[0091] The representation is obtained on the bipartite graph at each time step t following the steps above. Then, LSTM is used to fuse them to obtain the final result. Overall architecture as follows Figure 3 As shown;
[0092] S4: Concatenate the user node embedding vectors and attribute node embedding vectors at both ends of each edge in the temporal bipartite graph to generate the user node-attribute node edge representation; for the edge e to be predicted, aggregate the node embedding vectors generated in S3 based on the two vertices u and v connected by the edge to obtain the edge prediction input features:
[0093] h uv =AGG(h u h v (4)
[0094] Where h uv It is an edge prediction input feature. AGG is a vector aggregation function. Different aggregation functions can be used to extract edge prediction input features, such as summation, averaging, and concatenation. In this invention, concatenation is used to preserve node features as much as possible.
[0095] S5: A multi-task learning user node-attribute node edge prediction model is constructed using linear layers. Categorical and continuous variables share the preceding linear layers, with only the last linear layer differing. The model input is the input features generated in S4, which, after passing through multiple linear layers, yield the final attribute edge prediction result. Categorical and continuous variables share the preceding linear layers, with only the last linear layer differing. The number of output units for categorical variables is n, where n is the maximum number of categories in the table. The cross-entropy classification loss function is used for optimization. The number of output units for continuous variables is 1, and the mean squared error loss function is used for optimization. The specific formula is as follows:
[0096]
[0097] Where |E| is the total number of predicted edges, L cls It is the cross-entropy classification loss function, L mse It is the mean squared error loss function, e uv It is the true value, θ(h) uv () is the model's predicted value;
[0098] S6: Using supervised learning, some known edges in the temporal bipartite graph are first artificially removed. Then, these edges are predicted by reconstruction. The model is continuously trained by analyzing the difference between the predicted edge values and the actual edge values. Finally, the trained model is used to predict missing edges in the graph. Specifically:
[0099] S6-1: From the constructed dataset, take all observable data points as the training set and divide a portion of it into a test set;
[0100] S6-2: Use stochastic gradient descent to update the neural network parameters, iterating for a total of m times. After each parameter update, calculate the accuracy of missing value imputation in the test set, including the accuracy of categorical variables and the mean absolute error (MAE) of continuous variables.
[0101] S6-3: Compare and save the hyperparameter with the highest accuracy in m iterations, which gives the network model used for user attribute edge prediction;
[0102] S6-4: Apply the obtained network model to the actual missing edges in the temporal user attribute bipartite graph;
[0103] S7: After predicting the missing edges in the time-series bipartite graph, write the predicted values back to the original student attribute matrix, and inversely transform the categorical and continuous variables back to their initial forms; for each time step of the predicted missing edges in the bipartite graph... have For categorical variables, the predicted category values are mapped back to the corresponding category names; for continuous variables, the predicted normalized values are inversely transformed to the original value range using MinMax, resulting in a complete student attribute table after attribute completion.
[0104] The embodiments described in this specification are merely examples of implementations of the inventive concept. The scope of protection of this invention should not be considered as limited to the specific forms described in the embodiments. The scope of protection of this invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A user missing attribute completion method based on a timing bipartite graph neural network, characterized in that The steps are as follows: S2: Constructing a user attribute time sequence bipartite graph structure, taking each user in the time sequence user attribute matrix as a user node, each attribute as an attribute node, and each record value of the user attribute as an edge connecting the user node and the attribute node; S1: Preprocess the time-series user attribute matrix data, encode the categorical attributes using one-hot vectors, and scale the data to ; S3: Using a graph neural network to calculate the embedding vectors of the user and attribute nodes in the time sequence bipartite graph; S5: Using a linear layer to construct a multi-task learning time sequence bipartite graph user node-attribute node edge prediction model, wherein the classification variable and the continuous variable share the front linear layer, and only the linear layer of the last layer is different; specifically, the model input is the edge prediction input feature generated in S4, and after passing through multiple linear layers, the final attribute edge prediction result is obtained; S4: concatenate the embedding vector of each edge in the time-ordered bipartite graph and the embedding vector of the attribute node to generate the edge prediction input feature of the user node-attribute node ; Wherein the classification variable and the continuous variable share the front linear layer, and only the linear layer of the last layer is different; the output unit number of the classification variable is n, n is the maximum number of categories in the table classification variable, and a cross-entropy classification loss function is used for optimization, while the output unit number of the continuous variable is 1, and a mean square error loss function is used for optimization, and the specific formula is as follows: S6: In a supervised learning manner, first, some known edges in the time sequence bipartite graph are artificially removed, then the edges are predicted by reconstruction, and the difference between the predicted edge value and the true edge value is continuously trained, and finally the trained model is used to predict the missing edges in the graph; wherein is the predicted total number of edges, is a cross-entropy classification loss function, is a mean squared error loss function, is the true value, is the predicted value of the model; S7: After predicting the missing edges of the time sequence bipartite graph, the predicted value is written back to the original matrix, and the classification variable and the continuous variable are transformed back to the original form. The classification variable is a name that explains the category of things, and its value is classification data; 2. The user missing attribute completion method based on the temporal bipartite graph neural network according to claim 1, wherein, In S1, a [something] will be made from individual users and The user attribute matrix, composed of 10 attribute features, is defined as follows: each of the lines All attributes of a user, each column All user records that are an attribute, the first The first user's Each feature is represented as The time-series user attribute matrix includes The attribute matrices are at different time steps, where the users and attributes are consistent in each matrix; the user attributes are of two types: categorical variables and continuous variables. The continuous variable is a variable that can take any value within a certain interval; different preprocessing methods are adopted for different variable types to ensure the flexibility of the method; for classification variables, each classification is mapped to a discrete numerical variable and encoded using a one-hot vector; For continuous variables, MinMax normalization is used to normalize the attributes to eliminate the numerical differences caused by different attribute dimensions. S6 specifically is:
3. The user missing attribute completion method based on the temporal bipartite graph neural network according to claim 1, wherein, In the S2, the user attribute matrix lacks a natural graph structure, and cannot be directly input into the model for training and learning, so each user in the user attribute matrix is taken as a user node, each attribute is taken as an attribute node, and each record value of the user attribute is taken as an edge connecting the user node and the attribute node, so as to convert the user attribute matrix into a bipartite graph structure; each matrix in the time-series user attribute matrix is converted into a bipartite graph, so as to obtain a time-series bipartite graph with one time step. a time-series bipartite graph with one time step. In the missing data problem, some feature values are missing, denoted as a mask matrix where the value of can only be observed when ; the feature matrix and the mask can be represented as an undirected bipartite graph where is a node set consisting of user nodes and attribute nodes; is an edge set, where edges only exist between user nodes and attribute nodes; side features taking the value of the corresponding feature ; if is a categorical variable, it is converted to a one-hot vector and then assigned to ; to simplify notation , we use in the context of the feature matrix D in the context of the graph G.
4. The user missing attribute completion method based on the temporal bipartite graph neural network according to claim 1, wherein, In the S3, after initializing the node features and edge features in the bipartite graph, the graph convolutional neural network is used to perform information transmission between nodes in the bipartite graph, and in each GNN layer , the message passing function takes the concatenation of the embedding of the source node and the edge embedding as input: wherein is a polymeric function, is a non-linear function, is a trainable weight, is a vector concatenation function, is a node adjacent node of a node node embedding vectors of layers is updated to: wherein are trainable weights; Edge embedding vector of a layer is updated to: wherein are trainable weights; After After several iterations, the final node embedding vector and known edge embedding vector of the bipartite graph at each time step can be generated, where It represents the number of layers in the GNN. At each time step The representation is obtained on the bipartite graph of the above steps After that, the final representation is obtained by fusing with LSTM .
5. The user missing attribute completion method based on the temporal bipartite graph neural network according to claim 1, wherein, In S4, for the edge to be predicted , according to the two vertices connected by the edge and , the edge prediction input features are aggregated using the node embedding vectors generated in S3: wherein is an edge prediction input feature, is a vector aggregation function, different aggregation functions can be utilized to extract edge prediction input features, using concatenation to preserve node features.
6. The user missing attribute completion method based on a temporal bipartite graph neural network according to claim 1, wherein, S6-1: From the constructed data set, all observable data points are taken as a training set, and a part of the test set is divided from the training set; S6-2: Update the neural network parameters using stochastic gradient descent, a total of m times, and calculate the accuracy of missing value filling in the test set after updating the parameters each time, including the correct rate of the classification variable and the mean absolute error (MAE) of the continuous variable; S6-3: Compare and save the highest accuracy of the m iterations of the hyperparameters, that is, the network model for user attribute edge prediction is obtained; S6-4: Apply the obtained network model to the truly missing edges in the time sequence user attribute bipartite graph. For classification variables, the predicted category value is mapped back to the corresponding category name; 7. The user missing attribute completion method based on the temporal bipartite graph neural network according to claim 1, wherein, S7. For each time step in the prediction, the missing edges in the bipartite graph are predicted corresponding to the presence of a user attribute in the original user attribute matrix ; For continuous variables, the predicted normalized value is de-normalized to the original value range using MinMax.
Citation Information
Patent Citations
Multi-dimensional time sequence prediction method based on self-attention mechanism and graph convolutional network
CN114818515A
Heterogeneous graph representation learning method fusing text attributes
CN115659234A