A method for classifying goods based on chebyshev interpolation
By using Chebyshev interpolation, the problem of low accuracy and efficiency of graph neural networks in product classification is solved, achieving more efficient product classification and model training, and improving the robustness and scalability of the model.
Patent Information
- Application Number
- CN202211443668.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-11-18
AI Technical Summary
Existing graph neural networks suffer from insufficient classification accuracy and low training efficiency in product classification, especially in large-scale product networks where the models exhibit poor robustness and scalability.
A Chebyshev-based interpolation method is adopted. By constructing a graph structure, calculating the Laplacian matrix and performing k-layer propagation, and combining Chebyshev interpolation to learn graph convolution operations, the parameters are optimized using mini-batch computation and gradient descent algorithms to achieve product classification.
It improves the accuracy and training speed of product classification, enhances the scalability of the model, avoids the problem of insufficient memory, and achieves faster model training and more efficient product classification.
Smart Images

Figure CN116028860B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of artificial intelligence, and in particular to a commodity classification method based on Chebyshev interpolation. BACKGROUND
[0002] In recent years, with the rapid development of Internet technology, the e-commerce industry has shown a rapid growth trend, and the online commodity transaction mode occupies a large part of people's shopping mode. According to the China E-commerce Report (2021) released by the Ministry of Commerce of China, the e-commerce transaction volume in China reached 42.3 trillion yuan in 2021, with a year-on-year growth of 19.6%. According to relevant research reports, there are more than 470 million e-commerce related enterprises in China, and the number of e-commerce practitioners exceeds 60 million. These data show the vigorous development and huge scale of the current e-commerce industry. In recent years, people's trend of using the Internet to shop has further increased, and a series of Internet supermarkets such as Tmall Supermarket and Meituan Buy Food have emerged as the times require. With the large-scale development of e-commerce and the explosive growth of e-commerce groups, how to effectively classify and manage commodities has become an important link. If the classification and management cost of commodities can be reduced, the efficiency of business operation will be increased, and the user experience in shopping search can be improved to quickly find the commodities that they want to purchase. In general, effective classification and management of commodities in e-commerce can not only reduce the operating cost of businesses, but also improve the shopping experience of users, and it is necessary.
[0003] With the increasing size of goods in e-commerce, the traditional method of classifying goods cannot effectively solve the existing classification problem because of high cost and long time. For example, if we choose to classify goods by manpower, not only will it require a lot of manpower and time cost because of the large size of goods, but also it will cause the classification of goods to be unclear because of work fatigue. Borrowing computer technology to realize the automatic classification of goods is a more effective and reliable way, one of the important methods is to realize the classification of goods through graph neural network. Graph neural network is a kind of machine learning method, which first models the record information of goods selling, buying and other information, constructs graph structure data, and trains neural network model based on the characteristics of goods itself and the constructed graph structure, so as to achieve the purpose of classifying and predicting unknown category goods. The method of classifying goods based on graph neural network has played a role in some e-commerce platforms, such as Amazon, Alibaba and other platforms, which use graph neural network to train and learn the common purchase network of goods, so as to classify the goods. However, due to the wide and large number of existing goods categories, it is particularly important to train and learn the large-scale goods network, and the complexity of the goods network also brings difficulties to ensure the accuracy of the classification of goods. The existing methods either lack in classification accuracy or are not efficient in model training. Therefore, how to improve the accuracy of goods classification by graph neural network while maintaining high training speed is a problem worth studying.
[0004] The prior art related to the present application is generalized PageRank graph neural network, which mainly uses generalized PageRank technology to improve graph neural network. The specific scheme and shortcomings of which will be introduced below.
[0005] The generalized PageRank graph neural network combines the generalized PageRank technology and the graph neural network to improve the graph neural network, so as to improve the effect of goods classification. For a well-constructed goods transaction graph structure G, the nodes represent goods, the edges between the nodes represent two goods being purchased at the same time, and each node has a vector to describe the characteristics of the goods itself, which is recorded as matrix X. First, the generalized PageRank graph neural network will transform the characteristics of the goods X, which is completed by using a fully connected neural network; then the transformed characteristics are propagated by using the generalized PageRank technology, which can be expressed as where P represents a normalized adjacency matrix, and w represents a learnable coefficient. Essentially, this process can be seen as using a polynomial to approximate a graph convolution operation, the key is to learn effective coefficients w. After the graph propagation of the features, the vector representation Y of each commodity node can be obtained, and finally the probability score of each category can be calculated using Y to obtain the prediction score of the category to which the commodity belongs.
[0006] The key technology of the generalized PageRank graph neural network is to learn a graph convolution operation using a polynomial, that is, to learn effective coefficients w. However, since there is no restriction on this learning process, it is difficult to learn effective coefficients w. When learning the coefficients w, the generalized PageRank graph neural network generally first initializes them, such as random initialization, initialization using personalized PageRank technology, etc. The results obtained by different initialization methods often differ greatly, which shows that the generalized PageRank graph neural network is not robust enough and has weak learning ability. In addition, the transformation and learning of the graph convolution of the commodity's own features using the neural network are performed end-to-end, which requires the commodity's own features and commodity transaction graph structure to be placed in the GPU memory, which limits the scalability of the model. When the number of commodities to be classified is large, the training cannot be performed due to insufficient GPU memory. In summary, the generalized PageRank graph neural network has the defects of insufficient robustness, learning difficulty and poor scalability. SUMMARY
[0007] Therefore, the present application first proposes a commodity classification method based on Chebyshev interpolation, which realizes the classification of commodities through eight steps;
[0008] S1, input commodity and transaction record data, and construct a graph structure G using transaction information, wherein the nodes represent different commodities, and the edges represent two different commodities being purchased or sold at the same time;
[0009] S2, for each commodity node, construct a feature vector for the feature representation of itself;
[0010] S3, calculate the Laplacian matrix L of the graph structure G, and normalize and scale L to obtain a new Laplacian matrix
[0011] S4, for the commodity's own feature X and the Laplacian matrix The propagation process of k layers is performed for K rounds, and the propagation results of each layer are obtained and stored locally;
[0012] S5, read the propagation results of each layer in small batches, and learn the graph convolution operation based on Chebyshev interpolation;
[0013] S6, performing feature transformation on the node representation subjected to the graph convolution operation, and completing using a neural network;
[0014] S7, updating the parameters in the graph convolution and the neural network subjected to feature transformation through gradient descent, and converging to obtain a final representation of the commodity;
[0015] S8, calculating scores of the final commodity categories using a scoring function, completing commodity classification according to the scores of the categories to which the commodities belong, and outputting the predicted categories of each commodity.
[0016] The specific construction method of the graph structure is as follows: first, numbering all the commodities, using the numbers 0, 1, 2...n as the IDs of the commodities; then, converting the purchase and sale relationships between the commodities into a graph structure G, the graph structure G including all the commodities, i.e., the target commodities to be classified and other commodities, all the commodities corresponding to the nodes on the graph structure, the common purchase relationships between the commodities corresponding to the edges on the graph structure, using V to represent the set of all the commodity nodes and using E to represent the set of all the edges in the graph structure, the edges being undirected edges without weights; using an adjacency matrix to represent the graph structure G, and recording the adjacency matrix as A, if two commodities i and j have an edge in the graph structure G, the corresponding point a ij =1 in the adjacency matrix A, otherwise, if two commodities i and j do not have an edge in the graph structure G, the corresponding point a ij =0 in the adjacency matrix A.
[0017] The specific construction method of the feature vector is as follows: for any commodity i in the graph structure G, a vector representation x i of dimension d is obtained, the values in the vector x i reflecting different feature information of the commodity, including the size, color, production date, and manufacturer information of the product, the construction of the vector being realized through word embedding technology, each commodity node in the graph structure G having a vector representation x of dimension d, for n commodities, an n by d dimensional feature representation matrix X is obtained, wherein each row represents a feature vector representation of a commodity, and each column represents feature information of different dimensions.
[0018] The specific method for calculating the Laplacian matrix is as follows: the Laplacian matrix L of the graph structure G is equal to a degree matrix minus an adjacency matrix, the degree matrix representing the degrees of each node in the graph structure G, in numerical terms, equaling the sum of each row of the adjacency matrix A, the degrees of each node being placed on the diagonal of the matrix to form the degree matrix, using D to represent the degree matrix, and the Laplacian matrix L=D-A.
[0019] The specific method for performing normalization processing and scaling processing on the Laplacian matrix is as follows: first, calculating the -1 / 2 power of the degree matrix, then multiplying the Laplacian matrix by D-1 / 2 The normalized Laplacian matrix is obtained, and eigenvalue decomposition is performed to obtain L=UΛU T , wherein U represents an eigenvector matrix, Λ represents an eigenvalue diagonal matrix, U T is the transpose matrix of U, and the eigenvalue of L is denoted as Λ=diag(λ1, λ2,... λ n ), and each eigenvalue λ∈[0, 2] can be obtained;
[0020] Then, the eigenvalues of the Laplacian matrix are scaled to [-1, 1] through scaling processing on the normalized Laplacian matrix, and a new Laplacian matrix is obtained, wherein λ max represents the maximum eigenvalue of the normalized Laplacian matrix L, I represents a unit matrix, the eigenvalues of
[0021] The specific mode of the propagation is that the Laplacian matrix is used for graph propagation, and the propagation of each layer is performed by multiplying the Laplacian matrix by the self-feature X of the commodity, that is, , wherein X (0) =X represents the initial state of the propagation, k represents different layers, and K rounds of propagation are performed to obtain the representation of each layer, that is, X, X (1) ,..., and X (K) K+1 representation results are obtained, and the representation results are stored locally; during the K rounds of the k-layer propagation process, the time complexity of multiplying the Laplacian matrix by the self-feature X of the commodity is O(md), wherein m represents the number of non-zero elements in the Laplacian matrix , which is also the number of edges of the graph structure G.
[0022] The specific process of learning the graph convolution operation based on Chebyshev interpolation is that three steps of initializing the parameters to be learned, calculating the corresponding Chebyshev polynomials according to the propagation results of each layer, and completing the Chebyshev interpolation learning graph convolution operation are performed.
[0023] S51, the parameters to be learned are initialized and converted into Chebyshev interpolation coefficients;
[0024] The number of the parameters to be learned is the same as the number of the graph propagation layers, that is, K+1. The K+1 parameters to be learned are denoted as θ1, θ2,..., θ K , and are initialized as 1, and the Chebyshev interpolation coefficients , wherein θ j represents the K+1 parameters to be learned, Tk (x j ) represents the Chebyshev polynomial, x j represents the Chebyshev point;
[0025] S52, according to the propagation result of each layer, calculate the corresponding Chebyshev polynomial;
[0026] The Chebyshev polynomial is defined on the Laplacian matrix The Chebyshev polynomial defined on is Where I represents the unit matrix;
[0027] In the S4 step, the K+1 layer graph propagation representation is X, X (1) ,... X (K) , where The Chebyshev polynomial is multiplied by the result of each layer graph propagation to obtain the corresponding commodity node representation, using X, X (1) ,... X (K) to calculate That is And so on;
[0028] Small batch calculation is used in the calculation of the above-mentioned graph propagation operation defined by the Chebyshev polynomial;
[0029] S53, combining the coefficients of Chebyshev interpolation and Chebyshev polynomials, completing the Chebyshev interpolation learning graph convolution operation,
[0030] The coefficients of the Chebyshev interpolation and the graph propagation operation defined by the Chebyshev polynomial are combined to complete the Chebyshev interpolation learning graph convolution operation, which can be represented as The coefficients of the Chebyshev interpolation w k , θ j in
[0031] The specific way of the feature transformation is: for the Chebyshev interpolation based graph convolution , denoted as Z, that is Using a neural network to perform feature transformation on Z to represent Y = f Θ (Z), where f Θ (.) represents a neural network function and contains parameters Θ to be learned, and Y represents the output result after feature transformation.
[0032] The specific method of the gradient descent algorithm is that: in the commodity co-purchase graph structure G, a part of nodes are known commodity categories, which are called training set nodes and account for a small part, and the remaining nodes are unknown commodity categories, which are target nodes for commodity classification. First, the parameters to be learned need to be initialized, and the parameters Θ are randomly initialized. Then, the initialized graph convolution and neural network model can obtain the corresponding output result. The result is compared with the true result of the training set nodes and the loss is calculated. This process is completed through a corresponding loss function, such as a cross-entropy loss function for commodity classification. Then, the gradient of the parameters is calculated, and the loss value and the gradient are used to update the parameters. Finally, after repeating the processes of 'obtaining the output result, calculating the loss and gradient, and updating the parameters' for multiple times, the output of the model will tend to be stable, and it is considered that the model has converged.
[0033] The specific method of the commodity classification is that: when performing commodity classification, the parameters θ j and Θ read into the model, and the K+1 layer graph propagation representation X, X (1) ,... X (K) stored in the disk are read into the memory; then, the graph convolution operation and the feature transformation using the neural network are performed in turn to obtain the final representation of the commodity for classification; finally, the scoring function is used to score the final representation of the commodity to obtain the probability of the commodity belonging to each category.
[0034] Specifically, the function for scoring the final representation of the commodity is generally a normalized exponential function, which is represented as where y i represents the final representation vector of any commodity node, C represents the number of commodity categories, and S i represents the score value of the commodity belonging to category i. Finally, the highest S i can be obtained.
[0035] The technical effects to be achieved by the present application are:
[0036] The embodiment of the present application provides a commodity classification method based on Chebyshev interpolation, which solves the problems of poor technical effect, insufficient scalability, slow speed and the like of the existing commodity classification technology.
[0037] Specifically, the method provided by the embodiment of the present application utilizes the strong fitting capability of Chebyshev interpolation, can effectively learn better graph convolution, and realizes more accurate commodity classification effect; secondly, the present application utilizes the technology of pre-computing graph propagation and storing it in the disk to effectively avoid the problem that large-scale commodity networks cannot be calculated due to insufficient memory, and the calculation complexity of Chebyshev interpolation is linear time, which all ensures the high scalability of the embodiment of the present application; finally, the graph convolution based on Chebyshev interpolation can learn a suitable filter function faster, which benefits from the faster convergence speed of Chebyshev interpolation approximation, so the method provided by the embodiment of the present application can train the model faster and improve the speed of commodity classification. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 A flowchart of a commodity classification method based on Chebyshev interpolation;
[0039] Figure 2 A specific flowchart of step S5; DETAILED DESCRIPTION
[0040] The following is a preferred embodiment of the present application and further describes the technical solutions of the present application in combination with the drawings, but the present application is not limited to this embodiment.
[0041] The present application proposes a commodity classification method based on Chebyshev interpolation, which will classify the commodities sold on e-commerce platforms in this embodiment, and finally output the category of each commodity. For example, on e-commerce platforms such as Tmall and Jingdong, the sold commodities are generally classified into men's clothing, women's clothing, luggage, digital products, home appliances, and fresh food, etc. This embodiment will classify all sold commodities in this way to facilitate the display of merchants and the selection of users.
[0042] Specifically, the feature information and transaction records of the commodities are taken as input data, and through eight steps, the classification of the commodities is realized, and finally the predicted category of each commodity is output.
[0043] S1, for all sold commodities and transaction record data, a graph structure G is constructed using transaction information, the nodes of the graph structure are different commodities, and the edges between the nodes represent that two different commodities are purchased or sold at the same time.
[0044] First, all the goods are numbered, for example, using the numbers 0, 1, 2...n as the ID of the goods; then the purchase and sale relationship between the goods is converted into a graph structure G, which includes all the goods, that is, the target goods to be classified and other goods. All the goods correspond to the nodes on the graph structure, and the common purchase relationship between the goods corresponds to the edges on the graph structure, where V represents the set of all goods nodes, E represents the set of all edges in the graph structure, and the graph structure G includes n nodes and m edges.
[0045] The goods in the embodiment of the application refer to all known goods on the e-commerce platform, and the relationship between the goods can be the relationship of being purchased at the same time. For example, all the sales goods in the Tmall supermarket and the relationship of being purchased at the same time in the sales record.
[0046] Specifically, for the goods sales network of e-commerce platforms such as Tmall, Amazon and Jingdong, the goods of the sales network are corresponded to the nodes on the graph structure, and the common purchase relationship between the goods is corresponded to the edges on the graph structure. Specifically, if goods i and goods j are purchased at the same time, an edge between goods i and goods j is established on the graph structure. It should be noted that these edges are all regarded as undirected edges and have no weight, so the graph structure G is an undirected and unweighted graph structure.
[0047] The embodiment of the application uses an adjacency matrix to represent the graph structure G, and the adjacency matrix is denoted as A. Specifically, if two goods i and j have an edge on the graph structure G, the corresponding point a ij =1 in the adjacency matrix A, and otherwise, if two goods i and j have no edge on the graph structure G, the corresponding point a ij =0 in the adjacency matrix A.
[0048] S2, for each goods node, construct its own feature vector representation, mainly through the name, production date, manufacturer and other information of the goods to construct the feature vector;
[0049] For each goods in the graph structure G, it contains some existing feature information that can be used to help complete the goods classification. First, these information needs to be converted into a vector form to facilitate the use in the subsequent model training.
[0050] Specifically, for any goods i in the graph structure G, the embodiment of the application obtains a vector representation x i of dimension d for it, and the value in the vector x i reflects the different feature information of the goods. For example, assuming that there is a piece of goods “clothes”, the size, color, production date, manufacturer and other information of the goods can all reflect its own features, and these features are converted into a vector x for easy representation and use.
[0051] The process of converting the self-characteristic information of the commodity into vector representation can be completed by using word embedding technology. Specifically, for a certain characteristic dimension, for example, manufacturer, different commodities can have different manufacturers, and can also have the same manufacturer, so the final vector representation x obtained by using word embedding technology should meet: the representation of the commodities with the same manufacturer should be similar, and the representation of the commodities with different manufacturers should be different.
[0052] Each commodity node in the graph structure G has a vector representation x with a dimension of d. For n commodities, an n by d dimensional feature representation matrix X can be obtained, where each row represents the feature vector representation of a commodity, and each column represents the characteristic information of different dimensions.
[0053] S3, calculate the Laplacian matrix L of the graph structure G, and normalize and scale L;
[0054] The graph structure G is an undirected and unweighted simple graph, as described above, we use the adjacency matrix A to represent it. The value in the adjacency matrix A represents the connection condition. If a ij =1 indicates that there is an edge between node i and node j, and if a ij =0 indicates that there is no edge between node i and node j.
[0055] The Laplacian matrix L of the graph structure G is equal to the degree matrix minus the adjacency matrix. The degree matrix represents the degree of each node in the graph structure G, which is also equal to the sum of each row of the adjacency matrix A in numerical value. The degree of each node is placed on the diagonal of the matrix to form the degree matrix, which is represented by D. Therefore, the Laplacian matrix L=D-A.
[0056] The normalization of the Laplacian matrix is to make the subsequent calculation more convenient and stable. First, calculate the-1 / 2 power of the degree matrix, i.e. D -1 / 2 Only the-1 / 2 power of each element on the diagonal line needs to be calculated, then the normalized Laplacian matrix can be obtained by multiplying the left and right of the Laplacian matrix by D -1 / 2 respectively. Specifically, the normalized Laplacian matrix L=D -1 / 2 (D-A)D -1 / 2 =I-D -1 / 2 AD -1 / 2 , where I represents the unit matrix, D -1 / 2 AD -1 / 2 is also called the normalized adjacency matrix.
[0057] It can be observed that the normalized Laplace matrix L is a real symmetric matrix, and it can be proven that it satisfies positive semidefiniteness. Therefore, its eigenvalue decomposition yields L = UΛU T Where U represents the eigenvector matrix, Λ represents the eigenvalue diagonal matrix, U T Let L be the transpose of U, and let L's eigenvalues be Λ = diag(λ1, λ2, ..., λ). n We can obtain each eigenvalue λ∈[0, 2]. In order to learn graph convolution using Chebyshev interpolation, we first need to scale the eigenvalues of the Laplacian matrix to the range [-1, 1]. This can be done by scaling the normalized Laplacian matrix.
[0058] Specifically, a new Laplacian matrix can be obtained through scaling. Where λ max Let L represent the largest eigenvalue of the normalized Laplacian matrix, and I represent the identity matrix. eigenvalues
[0059] S4, for the product's intrinsic features X and the Laplace matrix The k-layer propagation process is executed in K rounds, and the propagation results of each layer are obtained and stored locally.
[0060] The propagation process here refers to the use of the Laplace matrix. Graph propagation is performed, specifically the propagation at each layer using the Laplace matrix. Multiply by the product's inherent characteristics X, i.e. Where X (0) = X represents the initial state of propagation, and k represents the number of different layers. After K rounds of propagation, the representation of each layer can be obtained, i.e., X, X (1) , ...X (K) There are K+1 representation results in total, and these representation results are then stored locally for use in subsequent calculations.
[0061] During the K-level propagation process, which involves K rounds, the Plas matrix... X is an n x n sparse matrix, and X is an n x d dense matrix, where d is generally much smaller than n. Therefore, the Laplace matrix is used for each propagation layer. The time complexity of multiplying by the product's intrinsic characteristics X is O(md), where m represents the Laplace matrix. The non-zero elements in the graph are also the number of edges in the graph structure G. Each layer of representation X obtained after propagation... (k) It is also an n-by-d dense matrix, but because d is relatively small, it will not occupy too much local disk space.
[0062] S5 reads the propagation results of each layer in small batches and learns the convolution operation of the learning graph based on Chebyshev interpolation;
[0063] like Figure 2 As shown, step S5 of the product classification method based on Chebyshev interpolation in an embodiment of the present invention specifically includes:
[0064] S51, initialize the parameters to be learned and convert them into Chebyshev interpolation coefficients;
[0065] The number of parameters to be learned is the same as the number of graph propagation layers, which is also K+1. These K+1 parameters to be learned are denoted as θ1, θ2, ..., θ... K They are then initialized to 1. Chebyshev interpolation first requires converting these K+1 parameters into Chebyshev interpolation coefficients.
[0066] This process involves Chebyshev polynomials and Chebyshev points. A Chebyshev polynomial is a set of polynomials defined in the interval [-1, 1]. Specifically, for any number x ∈ [-1, 1], a Chebyshev polynomial is defined by a set of ternary relations, where T is the Chebyshev polynomial. k (x)=2T k-1 (x)-T k-2 (x), where T0(x) = 1, T1(x) = x. For example, the first four terms of the Chebyshev polynomial are T0(x) = 1, T1(x) = x, T2(x) = 2x - 1, T3(x) = 4x. 2 -3x.
[0067] Chebyshev points represent the zeros of a Chebyshev polynomial, and the Chebyshev polynomial T... k The Chebyshev point of (x) can be represented as x j =cos((j+1 / 2)π / k), where j = 0, 1, ..., k-1. The Chebyshev polynomial T is needed when converting the parameters to Chebyshev interpolation coefficients. K+1 The Chebyshev point of (x), i.e., x j =cos((j+1 / 2)π / (K+1)), where j = 0, 1, ... K.
[0068] Specifically, the coefficients of Chebyshev interpolation Where θ j T represents K+1 parameters to be learned. k (x j ) represents the Chebyshev polynomial, x j This represents the Chebyshev point.
[0069] S52, Calculate the corresponding Chebyshev polynomial based on the propagation results of each layer;
[0070] What needs to be computed here is the Chebyshev polynomial defined on the Laplacian matrix of the graph structure G. As mentioned before, the eigenvalues of the Laplacian matrix are known. Thus, the Chebyshev polynomial can be defined on the Laplacian matrix . Specifically, the Chebyshev polynomial defined on is where I denotes the identity matrix.
[0071] In S4, the K+1-layer graph propagation representation X, X (1) ,... X (K) is obtained, where Thus, multiplying the above Chebyshev polynomial with the result of each layer of graph propagation can obtain the corresponding item node representation. Specifically, one can use X, X (1) ,... X (K) pre-stored on the disk to compute i.e. This realizes the computation of the product of the Chebyshev polynomial defined on the Laplacian and the feature matrix X, i.e., the computation of the graph propagation operation defined using the Chebyshev polynomial, using X, X (1) ,... X (K) pre-computed and stored on the disk.
[0072] The K+1-layer graph propagation representation X, X (1) ,... X (K) stored on the disk are n by d dense matrices, representing the vector representation of each item node of, thus one can use mini-batch computation when computing the above graph propagation operation defined using the Chebyshev polynomial, i.e., only take a part of nodes each time for computation, which is called a mini-batch and denoted as b. Using mini-batch b for computation can effectively increase the scalability of the model, because one can avoid the problem of insufficient GPU memory by reducing the size of the mini-batch b when training.
[0073] S53, combining the coefficients of the Chebyshev interpolation and the Chebyshev polynomial, completes the Chebyshev interpolation learning graph convolution operation.
[0074] Having obtained the coefficients of the Chebyshev interpolation and the graph propagation operation defined using the Chebyshev polynomial , one can then complete the operation of learning graph convolution based on the Chebyshev interpolation by combining the two. Specifically, the graph convolution can be represented as where the coefficients wk and are obtained by calculation in the previous steps.
[0075] It can be seen that the Chebyshev interpolation-based graph convolution operation is a weighted combination of different layer graph propagation operations, and the weight coefficients are obtained by the coefficients of Chebyshev interpolation, that is, the coefficients are The coefficients w of Chebyshev interpolation k θ in j K+1 can be learned, and essentially the K+1 parameters learn the function value of a function h at Chebyshev points x j , which can also be seen as fitting this function h by Chebyshev interpolation.
[0076] In the graph neural network, this function h is generally referred to as a graph filter function, and different functions h can filter different data sets and improve the expression ability of the graph neural network. In commodity classification, for different commodity and commodity purchase networks of different e-commerce platforms, the required h function is often different. As described above, by directly learning the function value of h function at x j , some reasonable constraints can be imposed on the h function, so that a more effective filter function can be learned, for example, the h filter function is generally required to be non-negative.
[0077] S6, performing feature transformation on the node representation subjected to the graph convolution operation, using a neural network to complete;
[0078] For the Chebyshev interpolation-based graph convolution It describes the representation result of each commodity node combining its own features X and the commodity co-purchase graph structure G. Next, after feature transformation on the representation result, it can be used to solve the commodity classification problem.
[0079] Specifically, let the Chebyshev interpolation-based graph convolution be Z, that is, Using a neural network to perform feature transformation on z can be represented as Y=f Θ (Z), where f Θ (.) represents a neural network function and contains parameters Θ to be learned, and Y represents the output result after feature transformation. For example, a two-layer neural network function f Θ (.) used for commodity classification can be represented as Y=σ(σ(ZW1)W2), where σ represents a nonlinear activation function, and W1 and W2 both represent parameter matrices to be learned.
[0080] S7, update the parameters in the graph convolution and the neural network for feature transformation by gradient descent, and converge to obtain the final representation of the commodity;
[0081] Graph convolution based on Chebyshev interpolation The coefficients in the function which contains K+1 parameters θ that need to be learned j The neural network f Θ for feature transformation contains parameters Θ that need to be learned, and the two parameters can be learned and updated by the gradient descent algorithm until convergence.
[0082] Specifically, in the commodity co-purchase graph structure G, a part of the nodes are known commodity categories, which are called training set nodes and account for a small part, and the remaining nodes are unknown commodity categories, which are the target nodes for commodity classification. The process of learning parameters using the gradient descent algorithm is mainly carried out on the training set nodes. First, the parameters to be learned need to be initialized, for example, the parameters θ j are all initialized to 1, and the parameters Θ are randomly initialized. Then, the initialized graph convolution and neural network model can obtain the corresponding output results, which are compared with the true results of the training set nodes to calculate the loss. This process is completed by a corresponding loss function, such as the cross-entropy loss function for commodity classification. Next, the gradient of the parameters is calculated, and the loss value and the gradient are used to update the parameters. Finally, after repeating the process of "obtaining output results, calculating loss and gradient, and updating parameters" several times, the output of the model will tend to be stable, and at this time it is said that the model has converged.
[0083] After the model converges, it is also called that the training is completed, and at this time the parameters θ j and the parameters Θ have learned effective results. Storing these results obtains a commodity classification method based on Chebyshev interpolation.
[0084] S8, use the scoring function to calculate the score of the final commodity category, and complete the commodity classification according to the score of the commodity category.
[0085] When performing commodity classification, first read the trained and stored parameters θ j and the parameters Θ into the model, and read the K+1 layer graph propagation representation X, X (1) ,... X (K) stored in the disk into the memory; then perform graph convolution operation and feature transformation using neural network in turn to obtain the final representation of the commodity for classification; finally, use the scoring function to score the final representation of the commodity to obtain the probability of the commodity belonging to each category.
[0086] In particular, the function that scores the final representation of an item is generally a normalized exponential function, which is represented as where y i represents the final representation vector of any item node, C represents the number of categories of item classification, S i represents the score value of the item belonging to category i. Finally, the highest S i The classification result of the item can be obtained, and the predicted category of each item is output.
Claims
1. A product classification method based on Chebyshev interpolation, characterized in that: The product classification is accomplished through eight steps; S1, Input product and transaction record data, and construct a graph structure using transaction information. , where nodes represent different products and edges represent two different products being bought or sold at the same time; S2, For each product node, construct a feature vector for its own feature representation; S3, computation graph structure Laplace matrix and to Normalization and scaling are performed to obtain the new Laplacian matrix. ; S4, Regarding the product's own characteristics and Laplace matrix ,implement - The propagation process of the layer The process involves round-robin propagation, obtaining the propagation results of each layer, and storing them locally. S5, read the propagation results of each layer in small batches, and perform convolution operation on the learning graph based on Chebyshev interpolation; the specific process of the convolution operation on the learning graph based on Chebyshev interpolation is as follows: initialize the parameters to be learned. Based on the propagation results of each layer, the corresponding Chebyshev polynomial is calculated, and the Chebyshev interpolation learning graph convolution operation is completed in three steps. S51, Initialize the parameters to be learned And convert them into Chebyshev interpolation coefficients; The number of parameters to be learned is the same as the number of graph propagation layers. One, will this The parameters that need to be learned are denoted as follows: And initialized to 1, the coefficients of Chebyshev interpolation ,in Represents K+1 parameters to be learned. Represents the Chebyshev polynomial. Represents the Chebyshev point; S52, calculate the corresponding Chebyshev polynomial based on the propagation results of each layer; Define the Chebyshev polynomial on the Laplace matrix. Above, defined in Chebyshev polynomials on are ,in Represents the identity matrix; Obtained in step S4 Layered graph propagation is represented as ,in The Chebyshev polynomial is multiplied by the result of propagation at each level of the graph to obtain the corresponding product node representation, using pre-stored data on disk. calculate ,Right now ; Mini-batch computation is used when computing the graph propagation operation defined by the Chebyshev polynomial above. S53 combines the coefficients and polynomials of Chebyshev interpolation to perform the convolution operation on the Chebyshev interpolation learning graph. The coefficients of the Chebyshev interpolation and the graph propagation operation defined by the Chebyshev polynomial are used. The two are combined to perform the operation of learning graph convolution based on Chebyshev interpolation, where graph convolution is represented as: Chebyshev interpolation coefficients In yes The parameters for learning are as described above. Parameter fitting graph filter function ; S6 performs feature transformation on the node representations that have undergone graph convolution operations, which is accomplished using a neural network; S7 updates the parameters in the graph convolution and feature transformation neural network through gradient descent and converges to obtain the final representation of the product. S8 uses a scoring function to calculate a score for the final product category, completes the product classification based on the score of the product's category, and outputs the predicted category for each product; The specific method for product classification is as follows: When classifying products, firstly, the trained and stored parameters are... and parameters Read it into the model and store it on the disk as described above. Layered graph propagation representation The data is read into memory; then graph convolution and feature transformation using a neural network are performed sequentially to obtain the final representation of the product used for classification; finally, a scoring function is used to score the final representation of the product to obtain the probability that the product belongs to each category. Specifically, the function used to score the final representation of a product is generally a normalized exponential function, which represents... ,in This represents the final representation vector of any product node. Indicates the number of product categories. This indicates that the product belongs to a category. Finally, check the highest score. The product classification results are obtained.
2. The product classification method based on Chebyshev interpolation as described in claim 1, characterized in that: The specific method for constructing the graph structure is as follows: First, all products are numbered using numbers. This serves as the ID for the product; then, the purchase and sale relationships between products are transformed into a graph structure. , graph structure This includes all goods, namely the target goods to be categorized and other goods. All goods correspond to nodes in the graph structure, and the common purchasing relationships between goods correspond to edges in the graph structure. Represents the set of all product nodes, using This represents the set of all edges in a graph structure, where all edges are undirected and have no weight; the adjacency matrix is used to represent the graph structure. Represent the adjacency matrix and denote it as follows: If two items and goods In graph structure When there are connected edges, the adjacency matrix The corresponding point Conversely, for two items and goods In graph structure When there are no connected edges, the adjacency matrix The corresponding point .
3. The product classification method based on Chebyshev interpolation as described in claim 2, characterized in that: The specific method for constructing the feature vector is as follows: for graph structures any item To obtain a dimension for it. vector representation ,vector The values in the vector reflect different features of the product, including its size, color, production date, and manufacturer information. The vector is constructed using word embedding technology, forming a graph structure. Each product node in the data has one dimension. vector representation ,for One item, get one take 3D feature representation matrix Each row represents the feature vector of a product, and each column represents feature information of different dimensions.
4. The product classification method based on Chebyshev interpolation as described in claim 3, characterized in that: The specific method for calculating the Laplacian matrix is as follows: Graph structure Laplace matrix The degree matrix is equal to the degree matrix minus the adjacency matrix; the degree matrix represents the graph structure. The degree of each node in the matrix is numerically equal to the adjacency matrix. Summing each row and placing the degree of each node on the diagonal of the matrix creates the degree matrix. To represent the degree matrix, the Laplace matrix .
5. A product classification method based on Chebyshev interpolation as described in claim 4, characterized in that: The specific method for normalizing and scaling the Laplacian matrix is as follows: First, calculate the degree matrix. The power is then raised to the power of the power, and the Laplace matrix is multiplied by a power on both the left and right sides respectively. After obtaining the normalized Laplacian matrix, its eigenvalues are decomposed to obtain... ,in Represents the eigenvector matrix, Represents an eigenvalue diagonal matrix. yes The transpose of the matrix, denoted as eigenvalues To obtain each eigenvalue ; Then, by scaling the normalized Laplacian matrix, the eigenvalues of the Laplacian matrix are scaled to... Between these, a new Laplace matrix is obtained. , ,in Represents the normalized Laplace matrix The largest eigenvalue, Represents the identity matrix. eigenvalues .
6. The product classification method based on Chebyshev interpolation as described in claim 5, characterized in that: The specific method of propagation is as follows: using the Laplace matrix. Graph propagation is performed, specifically the propagation at each layer using the Laplace matrix. Multiplied by the product's own characteristics ,Right now ,in Indicates the initial state of propagation. Representing different levels, after K rounds of propagation, the representation of each level is obtained, i.e. common Each representation result is then stored locally; execution - The propagation process of the layer In this process, each layer of propagation uses the Laplace matrix. Multiplied by the product's own characteristics The time complexity of time is 1000. ,in Represents the Laplace matrix Non-zero elements in a graph structure are also part of the graph structure. The number of sides.
7. The product classification method based on Chebyshev interpolation as described in claim 6, characterized in that: The specific method of feature transformation is as follows: for graph convolution based on Chebyshev interpolation... Recorded as That is, Using neural networks The feature transformation is represented as ,in Represents a neural network function and includes parameters to be learned. , This represents the output result after feature transformation.
8. The product classification method based on Chebyshev interpolation as described in claim 7, characterized in that: The specific method of the gradient descent algorithm is as follows: in the co-purchase graph structure of goods... A portion of the nodes have known product categories; these nodes are called training set nodes, and they constitute a small portion. The remaining nodes have unknown product categories and are the target nodes for product classification. First, the parameters to be learned need to be initialized. The model is randomly initialized. Then, the initialized graph convolutional and neural network model produces the corresponding output. This output is compared with the true output of the training set nodes, and the loss is calculated. This process is accomplished using the cross-entropy loss function used for product classification. Next, the gradient of the parameters is calculated, and the parameters are updated using the loss value and the gradient. Finally, after repeating the process of "obtaining the output, calculating the loss and gradient, and updating the parameters" multiple times, the model's output will tend to stabilize, indicating that the model has converged.