Method, computer device, and computer program for recommending related products
A natural language inference-based model with a Siamese network enhances product recommendations for cold items by integrating content and historical data, addressing imbalanced recommendations and improving accuracy in large-scale systems.
Patent Information
- Application Number
- JP2023071001
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-06-20
- Filing Date
- 2023-04-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2043-04-24
AI Technical Summary
Existing product recommendation systems struggle with recommending related products for items with insufficient user history, known as 'cold items', leading to imbalanced recommendation gradients and limited effectiveness.
A related product recommendation model is developed using a natural language inference task to classify relationships between products based on content information, combined with a Siamese network for dynamic embedding, creating a robust model that considers both content and historical data to recommend products.
The model effectively recommends related products even for items with limited user history, leveraging natural language inference and Siamese network learning to optimize embeddings and improve recommendation accuracy across large-scale data sets.
Smart Images

Figure 0007586958000001 
Figure 0007586958000002 
Figure 0007586958000003
Abstract
Description
[Technical field]
[0001] The following description relates to techniques for recommending related products. [Background technology]
[0002] In Internet product recommendations, it is common to use purchase history to select and recommend products that are optimized for an individual.
[0003] The main methods used for product recommendations include collaborative filtering, which selects users with similar purchasing histories to the user to whom the product is to be recommended, and recommends products that have been purchased by similar users but that the target user has not yet purchased, and algorithms such as association rule mining, which uses the purchasing records of multiple users to recommend products that are likely to be purchased or clicked on simultaneously for each product.
[0004] For example, Patent Document 1 (registered on February 2, 2009) discloses a technology that automatically recommends product information related to a product by using the product code, product name, or model of the product recognized by an information recommendation agent installed on a user terminal device. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Korean Patent No. 10-0882716 Summary of the Invention [Problem to be solved by the invention]
[0006] We provide a related product recommendation model that is robust to cold items, based on a natural language inference task of classifying relationships between sentences. [Means for solving the problem]
[0007] A method executed on a computer device, the computer device including at least one processor configured to execute computer-readable instructions contained in a memory, the method including: constructing, by the at least one processor, a contrastive pair dataset for a natural language inference task using content information associated with products based on a history of the products in a shopping domain; and generating, by the at least one processor, a product recommendation model for application to the shopping domain by pre-training a language model for the natural language inference task using the contrastive pair dataset.
[0008] According to one aspect, the constructing step may construct the control paired dataset by selecting a hypothesis product corresponding to a plurality of positive samples and a plurality of negative samples for each premise product.
[0009] According to another aspect, the constructing step may include constructing a positive data pair consisting of content information of each product for a product pair having an entailment relationship, and constructing a positive data pair consisting of content information of each product for a product pair having a contradiction relationship.
[0010] According to another aspect, the configuring step may include a step of selecting a product pair clicked within a time limit as a positive sample, and a step of using the product selected as the positive sample as a seed and selecting a product displayed together with the seed product that was not clicked within the time limit as a negative sample.
[0011] According to another aspect, the time limit may be determined based on at least one of a purchase conversion rate for the clicked product and a category change degree.
[0012] According to another aspect, the step of selecting the positive samples may include excluding at least one of products in a certain category and products with display bias from the selection of the positive samples.
[0013] According to another aspect, the selecting of the negative samples may include selecting, as the negative samples, products that have not been clicked within the time limit and have a certain level or more of impressions.
[0014] According to another aspect, the generating step may generate the product recommendation model by fine-tuning a Bidirectional Encoder Representations from Transformer (BERT) model through the natural language inference task using the control paired dataset.
[0015] According to another aspect, the generating step may include a step of fitting whether the premise product and the hypothesis product are related to each other by simultaneously inputting content information in natural language for the premise product and the hypothesis product into one network and performing encoding and softmax.
[0016] According to another aspect, the method may further include extending the product recommendation model by a joint learning model by using the product recommendation model as a base model and jointly learning a Siamese network on the base model, by the at least one processor.
[0017] According to another aspect, the expanding step may include a step of obtaining a first loss based on the natural language inference task and a second loss based on the Siamese network using one encoding model, and then optimizing the product recommendation model using a final loss calculated backward from the first loss and the second loss.
[0018] According to another aspect, the expanding step may include optimizing the product recommendation model using a final loss calculated as a weighted sum of a first loss based on the natural language inference task and a second loss based on the Siamese network.
[0019] According to another aspect, the method may further include, for a given reference product, utilizing the product recommendation model by the at least one processor, recommending related products based on content information of the reference product.
[0020] According to yet another aspect, the recommending step may include constructing a pool of related products for the reference product based on embeddings of individual products based on the Siamese network, and reranking the relevance of the related product pool to the reference product based on an inference result of the natural language inference task.
[0021] A computer program is provided for causing a computer device to carry out the method.
[0022] A computer device is provided, the computer device including at least one processor configured to execute computer-readable instructions contained in a memory, the at least one processor processing a process of constructing a controlled paired dataset for a natural language inference task using content information associated with a product based on a history of the product in a shopping domain, and a process of generating a product recommendation model for application to the shopping domain by pre-training a language model for the natural language inference task using the controlled paired dataset. Effect of the Invention
[0023] According to an embodiment of the present invention, it is possible to provide services for large-scale data using a model that learns the association between two products using content information in natural language based on a natural language inference task of classifying the relationship between sentences, and to recommend products for which user data such as purchase history is lacking as related products.
[0024] According to an embodiment of the present invention, a reference product and a comparison product are simultaneously input into one network, and the dynamic relevance between products can be fitted by encoding with reference to mutual data within the network, thereby realizing a related product recommendation model that includes not only content information for products but also history information in-house.
[0025] According to an embodiment of the present invention, a dynamic and highly variance embedding space can be constructed as a model for related product recommendation by combining a Siamese network with a natural language inference task-based model. [Brief description of the drawings]
[0026] [Figure 1] FIG. 1 illustrates an example of a network environment in accordance with an embodiment of the present invention. [Diagram 2]FIG. 2 is a block diagram illustrating an example of a computing device in accordance with an embodiment of the present invention. [Diagram 3] 4 is a flow chart illustrating an example of a method that may be performed by a computing device in accordance with an embodiment of the present invention. [Figure 4] FIG. 13 is a diagram illustrating an example of an embedding space for related products. [Diagram 5] FIG. 13 is a diagram illustrating an example of an embedding space for related products. [Figure 6] FIG. 1 illustrates an example of a Siamese network structure. [Figure 7] 4 is a flowchart illustrating a process of generating a related product recommendation model in accordance with an embodiment of the present invention. [Figure 8] FIG. 2 illustrates an example of a controlled paired dataset for a natural language reasoning task in accordance with an embodiment of the present invention. [Figure 9] FIG. 2 illustrates an example of a network structure based on a natural language inference task according to an embodiment of the present invention. [Figure 10] FIG. 2 is a diagram illustrating an example of a related product recommendation model for a text companion relationship task structure in an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0027] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0028] FIELD OF THE DISCLOSURE The present invention relates to a technique for recommending related products.
[0029] An embodiment including the subject matter specifically disclosed in this specification can provide a related product recommendation model that is robust to cold items based on a natural language inference task of classifying relationships between sentences.
[0030] The related product recommendation system according to the embodiment of the present invention may be realized by at least one computer device, and the related product recommendation method according to the embodiment of the present invention may be executed by at least one computer device included in the related product recommendation system. In this case, a computer program according to an embodiment of the present invention may be installed and executed in the computer device, and the computer device may execute the related product recommendation method according to the embodiment of the present invention according to the control of the executed computer program. The above-mentioned computer program may be recorded in a computer-readable recording medium in combination with the computer device to cause the computer to execute the related product recommendation method.
[0031] Fig. 1 is a diagram showing an example of a network environment in one embodiment of the present invention. The network environment in Fig. 1 shows an example including a plurality of electronic devices 110, 120, 130, 140, a plurality of servers 150, 160, and a network 170. Such Fig. 1 is merely an example for explaining the invention, and the number of electronic devices and the number of servers are not limited to those shown in Fig. 1. Furthermore, the network environment in Fig. 1 is merely an example of an environment applicable to this embodiment, and the environment applicable to this embodiment is not limited to the network environment in Fig. 1.
[0032] The electronic devices 110, 120, 130, 140 may be fixed terminals or mobile terminals realized by computer devices. Examples of the electronic devices 110, 120, 130, 140 include smartphones, mobile phones, navigation systems, personal computers (PCs), notebook PCs, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), tablets, etc. As an example, FIG. 1 shows a smartphone as an example of the electronic device 110, but in the embodiment of the present invention, the electronic device 110 may mean one of various physical computer systems that can communicate with other electronic devices 120, 130, 140 and / or servers 150, 160 via a network 170 using a substantially wireless or wired communication method.
[0033] The communication method is not limited, and may include not only a communication method using a communication network (for example, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network) that the network 170 can include, but also short-range wireless communication between devices. For example, the network 170 may include any one or more of a personal area network (PAN), a local area network (LAN), a campus area network (CAN), a metropolitan area network (MAN), a wide area network (WAN), a broadband network (BBN), the Internet, and the like. Furthermore, the network 170 may include any one or more of a network topology including, but not limited to, a bus network, a star network, a ring network, a mesh network, a star-bus network, a tree or hierarchical network, and the like.
[0034] Each of the servers 150, 160 may be realized by one or more computing devices that communicate with the multiple electronic devices 110, 120, 130, 140 via the network 170 to provide instructions, codes, files, content, services, etc. For example, the server 150 may be a system that provides a service (such as a product recommendation service, for example) to the multiple electronic devices 110, 120, 130, 140 connected via the network 170.
[0035] 2 is a block diagram showing an example of a computer device according to an embodiment of the present invention. Each of the electronic devices 110, 120, 130, and 140 and the servers 150 and 160 described above may be realized by a computer device 200 shown in FIG.
[0036] Such a computer device 200 may include a memory 210, a processor 220, a communication interface 230, and an input / output interface 240, as shown in FIG. 2. The memory 210 is a computer-readable recording medium and may include a random access memory (RAM), a read only memory (ROM), and a permanent mass storage device such as a disk drive. Here, a permanent mass storage device such as a ROM or a disk drive may be included in the computer device 200 as a separate permanent storage device separate from the memory 210. The memory 210 may also store an operating system and at least one program code. Such software components may be loaded into the memory 210 from a computer-readable recording medium separate from the memory 210. Such separate computer-readable recording medium may include a computer-readable recording medium such as a floppy drive, a disk, a tape, a DVD / CD-ROM drive, a memory card, etc. In another embodiment, the software components may be loaded into the memory 210 through a communication interface 230 that is not a computer-readable recording medium. For example, the software components may be loaded into the memory 210 of the computing device 200 based on a computer program installed by a file received over the network 170 .
[0037] The processor 220 may be configured to process instructions of a computer program by performing basic arithmetic, logic, and input / output operations. The instructions may be provided to the processor 220 by the memory 210 or the communication interface 230. For example, the processor 220 may be configured to execute instructions received according to program code stored in a storage device, such as the memory 210.
[0038] The communication interface 230 may provide a function for the computer device 200 to communicate with other devices (for example, the above-mentioned recording device) via the network 170. For example, requests, instructions, data, files, etc. generated by the processor 220 of the computer device 200 according to program codes recorded in a recording device such as the memory 210 may be transmitted to other devices via the network 170 under the control of the communication interface 230. Conversely, signals, instructions, data, files, etc. from other devices may be received by the computer device 200 via the communication interface 230 of the computer device 200 via the network 170. The signals, instructions, data, etc. received via the communication interface 230 may be transmitted to the processor 220 or the memory 210, and the files, etc. may be recorded on a recording medium (the above-mentioned permanent recording device) that the computer device 200 may further include.
[0039] The input / output interface 240 may be a means for interfacing with the input / output device 250. For example, the input device may include a device such as a microphone, a keyboard, or a mouse, and the output device may include a device such as a display and a speaker. As another example, the input / output interface 240 may be a means for interfacing with a device in which functions for input and output are integrated into one, such as a touch screen. The input / output device 250 may be configured as a single device together with the computer device 200.
[0040] Also, in other embodiments, computing device 200 may include fewer or more components than those of Figure 2. However, most prior art components need not be explicitly illustrated. For example, computing device 200 may be implemented to include at least some of the input / output devices 250 described above, and may further include other components such as a transceiver, a database, etc.
[0041] Specific embodiments of a method and apparatus for recommending related products are described below.
[0042] In order to recommend related products in the shopping domain, recommendation models based on collaborative filtering, Meta Product2Vector (MPV)-based recommendation models, Siamese networks, and triplet network-based recommendation models are used.
[0043] The performance of such related product recommendation models depends on how much or little user history a user has. Because recommendations are made mainly for products with a certain amount of history, there is a high possibility of a recommendation gradient phenomenon in which history is concentrated in a few products. In other words, there is a problem that cold items with insufficient history have fewer chances to be recommended compared to warm items with a lot of history.
[0044] This embodiment provides a new methodology that enables diverse product recommendations even when there is little history between a user and the products, and can provide a related product recommendation model that is strong against cold items based on a sentence association task, which is a natural language inference task that classifies relationships between sentences.
[0045] In this specification, history may refer to a user's click history and purchase history for products on a shopping domain, as well as interactions between the product and the user, such as adding to a cart, setting a "like," and the like.
[0046] The computer device 200 according to the present embodiment may provide a product recommendation service to a client by connecting to a dedicated application installed on the client or a web / mobile site related to the computer device 200. A related product recommendation system implemented by a computer may be configured in the computer device 200. For example, the related product recommendation system may be implemented in the form of a program that operates independently, or may be implemented in the form of an in-app of a specific application so as to be operable on the specific application.
[0047] The processor 220 of the computer device 200 may be realized by components for executing the following related product recommendation method. Depending on the embodiment, the components of the processor 220 may be selectively included or excluded in the processor 220. Also, depending on the embodiment, the components of the processor 220 may be separated or combined to express the functions of the processor 220.
[0048] Such processor 220 and components of processor 220 may control computer device 200 to execute steps included in the following related product recommendation method. For example, processor 220 and components of processor 220 may be implemented to execute instructions from the operating system code and at least one program code included in memory 210.
[0049] Here, the components of the processor 220 may represent different functions that are executed by the processor 220 according to instructions provided by program code stored in the computer device 200 .
[0050] The processor 220 may read the necessary instructions from the memory 210, which is loaded with instructions related to the control of the computing device 200. In this case, the read instructions may include instructions for controlling the processor 220 to perform the steps described below.
[0051] The steps included in the related product recommendation method described below may be performed in an order different from that shown in the figures, some of the steps may be omitted, or additional processes may be included.
[0052] FIG. 3 is a flow chart illustrating an example method that may be performed by a computing device in accordance with an embodiment of the present invention.
[0053] Referring to FIG. 3, in step 310, the processor 220 may generate a related product recommendation model based on a natural language inference task that classifies the relationship between products using content information of the products. The content information is additional information (side information) composed of natural language related to the product, and may include, for example, a product name, a brand, a model, a category, and product attributes. The natural language inference task is a task in the natural language field that determines whether a hypothesis sentence is appropriately connected to a premise sentence, and classifies the relationship between two sentences as entailment (i.e., true) or contradiction (i.e., false). As an example, the processor 220 may generate a model that appropriately understands content information in a shopping domain based on a language model. In the language model, a natural language inference task may be used as a pre-training task called next sentence prediction. The processor 220 may generate the related product recommendation model by pre-training a language model to determine the relevance between products through a natural language inference task using content information composed of natural language.
[0054] In step 320, the processor 220 may recommend related products based on content information of the reference product using a related product recommendation model for a given reference product. The processor 220 may recommend, as related products, products in the same category that can be substituted for the reference product, products in other categories that can be easily used together with the reference product and have high compatibility, etc., using a product clicked or purchased by a user as the reference product. In this case, the processor 220 may provide a product recommendation service by first generating a product pool that may be related to each other, and then re-ranking the relevance of the product pool according to the inference result of the natural language inference task. The processor 220 may infer the relevance of two sentences using content information of the reference product as a premise sentence and content information of the comparison product as a hypothesis sentence, and may recommend a product that is predicted to have an implication relationship with the reference product as a related product.
[0055] The process of generating a related product recommendation model that is effective for cold items will be specifically described as follows.
[0056] A collaborative filtering-based recommendation model, which is one of the methodologies for solving the cold item recommendation problem, uses a method to find embeddings for items based on the user's history and various additional information (side information) of the item, and then optimizes the embedding of the item found based on the history and the additional information so that they are close to each other. When using a collaborative filtering-based recommendation model, for items without history, related products are recommended based on the additional information of the item.
[0057] However, in the case of recommendation models based on collaborative filtering, the size of the data increases due to collaborative filtering, requiring a lot of time and resources for learning, so there are limitations to their application to services that involve large amounts of data on users, items, etc., such as shopping, making them unsuitable.
[0058] The MPV-based recommendation model, another methodology for solving the cold item recommendation problem, uses a learning method to increase the similarity between the eigenvector obtained using the product ID for a pair of related products and the vector that encodes content information. In other words, the MPV-based recommendation model generates an embedding by encoding content information such as product name, brand, and category as well as characteristics based on history, and optimizes it to increase the similarity with the embedding of the clicked product.
[0059] However, in the case of an MPV-based recommendation model, since it only increases the similarity to positive samples, it has the effect of bringing embeddings closer between classes, but cannot move embeddings farther between classes. Furthermore, in an MPV-based recommendation model, cold items without history do not have history-based embeddings, so recommendations are made only based on the similarity between contents, unlike warm items that can utilize history-based embeddings. In the end, there is a limitation in that the information contained in user history is not fully utilized in cold item recommendations.
[0060] Another methodology for solving the cold item recommendation problem, the Siamese network-based recommendation model, learns embeddings encoded with product content information for related product pairs using contrastive loss (triplet loss in the case of a triplet network).
[0061] Related products may be defined as two types. The first type refers to products of the same type that can be substituted for the seed product, and the second type refers to other types of products that are suitable for use with the seed product and are compatible with the seed. In the case of the first type, the seed product and the related products are of the same type, so they are related products to each other. Therefore, related products of the first type can be clustered in an embedding space that utilizes similarity. However, when the first and second types are mixed, they include products of different types from the seed product and are not related products to each other, making clustering difficult.
[0062] FIG. 4 shows an example of a first type of embedding space 400, and FIG. 5 shows an example of an embedding space 500 in which the first and second types are mixed.
[0063] 4, in the first type embedding space 400, for the seed product "iPhone", "Galaxy S" and "Pfizer Smartphone" are products that belong to the category of smartphones and are the same type of products. Therefore, since the related products of the seed "iPhone", "Galaxy S" and "Pfizer Smartphone", are related products to each other, there is no difficulty in clustering.
[0064] Referring to FIG. 5, in the embedding space 500 in which the first and second types are mixed, the first type product "Galaxy S" and the second type product "iPhone case" are included as related products to the seed product "iPhone", but "Galaxy S" and "iPhone case" are not related products to each other. Therefore, the seed "iPhone" tries to fit "Galaxy S" and "iPhone case" in a position close to itself, but "Galaxy S" and "iPhone case" are fitted so as to move away from each other, so a dilemma occurs in which these products cannot be collected into one cluster. Furthermore, "Galaxy case", which is a related product of "Galaxy S", must be far away from "iPhone case" because it is not a related product, but must be close to "Galaxy S", and "Galaxy S" must be close to the seed "iPhone", so they cannot be collected into one cluster either.
[0065] FIG. 6 is a diagram showing an example of a Siamese network structure.
[0066] Referring to FIG. 6, the Siamese network 600 is based on metric learning and is a model that uses a metric to calculate the distance indicating the similarity of characteristics between two objects. The Siamese network 600 learns to separate products having dissimilar characteristics from a reference product serving as an anchor, and generates individual embeddings for each product in a network that shares weights with the reference product and the comparison product, so that the embedding of the reference product does not change even if the comparison product changes. Therefore, since it has an embedding with a fixed value, it is difficult to cluster dynamic associations between products.
[0067] Although the metric learning of the Siamese network 600 has excellent data clustering performance, if the data itself is not clustered properly, the overall model performance will be degraded. Furthermore, in the case of a service with large-scale data such as the shopping domain, an extremely large embedding size is required, which causes limitations on the service.
[0068] In this embodiment, a related product recommendation model having a structure that can easily fit dynamic related relationships between products is generated.
[0069] FIG. 7 is a flow chart illustrating a process of generating a related product recommendation model in an embodiment of the present invention.
[0070] Referring to FIG. 7, in step 701, the processor 220 may construct a contrastive pair dataset for a sentence association task (natural language inference task) based on a history for a product on a shopping domain.
[0071] As an example, the processor 220 may select a pair of products that are clicked together by the user within a predefined time limit as a positive sample. In this case, the time limit may be determined in consideration of a purchase conversion rate for the clicked products and a degree of change in product category. For example, if a user clicks one product and then clicks another product within 10 minutes, content information of the two products may be configured as a positive data set. In the case of a shopping domain, since there are factors that make it difficult to obtain a positive sample, such as abusive users, differences in product distribution in each category, and popular products, category restrictions and removal of display bias may be additionally applied. For example, products in some categories or products that have an extremely high display rate compared to other products may be excluded from the selection of positive samples. In addition, the processor 220 may additionally use products that are the same but have different product names in the catalog as positive samples so as to grasp the main context of the products.
[0072] In addition, the processor 220 may use the product included in the positive sample as a seed, and select products that have not been clicked together with the seed within a time limit as negative samples. In particular, the processor 220 may randomly select products that have been displayed more than a certain number of times from among products that have not been clicked within a time limit after the seed has been clicked, and use them as negative samples.
[0073] The processor 220 may select positive samples and negative samples based on the history, and may configure a dataset using content information consisting of natural language for the products selected as the positive samples and negative samples. Referring to FIG. 8, the processor 220 may select a hypothetical product 802 corresponding to a plurality of positive samples and negative samples for the same premise product 801 in order to learn both content information and history information, and may configure a learning dataset 800 consisting of positive data pairs and negative data pairs. By selecting the hypothetical product 802 for the premise product 801 based on history, a dataset 800 for learning features for history, such as collaborative filtering, may be generated. The dataset 800 for the sentence association task may include a classification label 803, and a label indicating an entailment relationship ("entailment") may be defined for a positive data pair, and a label indicating a contradiction relationship ("contradiction") may be defined for a negative data pair. The processor 220 may perform additional adjustment of the dataset through data analysis and experiments according to the target task and raw data distribution, etc.
[0074] 7 again, in step 702, the processor 220 may generate a first related product recommendation model by pre-training a language model using a contrastive paired dataset of a sentence association task. For example, the processor 220 may adopt a Bidirectional Encoder Representations from Transformer (BERT) model or an Electra Small Model as a Pre-trained Language Model (PLM), and then fine-tune the model through a natural language inference task having two labels (entailment, contradiction), thereby realizing the first related product recommendation model.
[0075] FIG. 9 is a diagram illustrating an example of a network structure based on a natural language inference task in an embodiment of the present invention.
[0076] 9, the text association task structure 900, which is a natural language inference task, simultaneously receives inputs of anchors and comparison samples in one network, and performs both encoding and softmax while referring to each other's data within the network. The text association task structure 900 is capable of generating different internal embeddings (hidden states) depending on the comparison samples even for the same anchor, so the embeddings are not fixed and it is easy to fit the dynamic association between products.
[0077] FIG. 10 shows an example of a related product recommendation model 1000 of a text-associative relation task structure.
[0078] 10, the processor 220 may generate a related product recommendation model 1000 by pre-training a BERT model through a natural language inference task using a contrastive paired dataset 800 consisting of content information of a premise product 801 and a hypothesis product 802 as input data. Since different premise products 801 serving as anchors can be internally encoded differently for the same hypothesis product 802, even a relatively small model can solve the fitting problem in the embedding space 500 where the first and second types are mixed.
[0079] In the case of the related product recommendation model 1000 generated based on a language model such as BERT, by determining the relevance between two products using content information consisting of natural language, it has the ability to appropriately extract important context from product names, brands, categories, etc., just like general language models.
[0080] 7 again, in step 703, the processor 220 may generate a second related product recommendation model by using the first related product recommendation model as a base model, jointly learning a Siamese network on the base model, and extending the first related product recommendation model by the joint learning model. Using one encoding model, a loss by model learning using a natural language inference task and a loss by Siamese network learning are sequentially obtained, and then the two losses are calculated backward at once to reduce the obtained final loss, thereby generating the second related product recommendation model.
[0081] The detailed process of generating the second related product recommendation model will be described as follows.
[0082] The dataset structure for generating the second related product recommendation model is the same as the dataset 800 described with reference to FIG.
[0083] The processor 220 concatenates the content information of products A and B as a single data for the natural language inference task, forwards it as input to the encoding model, and then calculates the loss (hereinafter referred to as the "natural language inference task loss").
[0084] The processor 220 inputs only the content information of product A into the same network and then determines the CLS embedding of the last layer, and similarly inputs only the content information of product B into the network and then determines the CLS embedding of the last layer.
[0085] After processor 220 calculates the similarity distance (e.g., Euclidean distance) of the CLS embedding between product A and product B, it may configure a loss (hereinafter referred to as "Siamese network loss") so that the distance is closer when product A and product B are in an entailment relationship, and the distance is larger when product A and product B are in a contradiction relationship.
[0086] The processor 220 may generate a second related product recommendation model by optimizing the model using a final loss calculated as a weighted sum of the natural language inference task loss and the Siamese network loss. In this case, the natural language inference task loss and the Siamese network loss may be applied in a one-to-one ratio, or, depending on the embodiment, weights for the natural language inference task loss and the Siamese network loss may be applied differently.
[0087] In the case of the second related product recommendation model, the advantages of both networks can be enjoyed. The Siamese network has the advantage that it can generate embeddings of individual products, so that it can find product candidates to recommend by distance-based embedding. Furthermore, when the weights of the network are learned in collaboration with a natural language inference task that can refer to all individual tokens of the product pair at the input and hidden state stage, tuning can be performed based on more information than when the Siamese network alone learns the hidden state for each token from the input embedding to the last layer.
[0088] The processor 220 may provide a product recommendation service by first generating a pool of products that are likely to be related to a reference product based on embedding of individual products using a Siamese network, and then reranking the relevance of the product pool to the reference product based on the inference results of a natural language inference task.
[0089] The first related product recommendation model may be applied as a final model for the product recommendation service according to the present invention, and in some embodiments, the second related product recommendation model may be applied. As an example, the processor 220 may apply the related product recommendation model differently depending on the user or the category of the reference product. For example, in the case of a user who searches various categories, the second related product recommendation model may be applied to recommend related products, and in the case of a user who searches only limited categories, the first related product recommendation model may be applied to recommend related products. In addition, if the reference product belongs to category A, the first related product recommendation model may be applied to recommend related products, and if the reference product belongs to category B, the second related product recommendation model may be applied to recommend related products.
[0090] As described above, according to the embodiment of the present invention, a service can be provided for large-scale data using a model that learns the relevance between two products using content information composed of natural language based on a natural language inference task that classifies the relationship between sentences, and a product lacking user data such as a purchase history can be recommended as a related product. According to the embodiment of the present invention, a reference product and a comparison product can be simultaneously input into one network, and a dynamic relevance between products can be fitted by encoding with reference to the data between them within the network, thereby realizing a related product recommendation model that is in-house generated not only for content information about products but also for history information. According to the embodiment of the present invention, a Siamese network can be combined with a model based on a natural language inference task to configure an embedding space that is dynamic but has large changes as a model for recommending related products.
[0091] The above-mentioned devices may be realized by hardware components, software components, and / or a combination of hardware and software components. For example, the devices and components described in the embodiments may be realized using one or more general-purpose or special-purpose computers, such as a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), a programmable logic unit (PLU), a microprocessor, or various devices capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications that run on the OS. The processing device may also respond to the execution of the software to access, record, manipulate, process, and generate data. For convenience of understanding, a single processing device may be described as being used, but one skilled in the art will understand that the processing device may include multiple processing elements and / or multiple types of processing elements. For example, the processing device may include multiple processors or one processor and one controller. Other processing configurations, such as parallel processors, are also possible.
[0092] The software may include computer programs, codes, instructions, or a combination of one or more of these, and may configure a processing device to operate as desired or instruct the processing device, either independently or collectively. The software and / or data may be embodied in any type of machine, component, physical device, computer storage medium, or device to be interpreted by the processing device or to provide instructions or data to the processing device. The software may be distributed and stored or executed in a distributed manner on computer systems connected by a network. The software and data may be stored on one or more computer-readable storage media.
[0093] The method according to the embodiment may be realized in the form of program instructions executable by various computer means and recorded on a computer-readable medium. Here, the medium may be one that continuously records a computer-executable program or one that temporarily records the program for execution or download. The medium may be one of various recording or storage means in the form of a single or multiple hardware devices combined, and may not be limited to a medium directly connected to a certain computer system, but may be one that is distributed over a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and ROMs, RAMs, flash memories, etc., configured to record program instructions. Other examples of the medium include recording media or storage media managed by application stores that distribute applications, or sites, servers, etc. that supply or distribute various other software.
[0094] Although the embodiments have been described based on the limited embodiments and drawings as above, those skilled in the art will be able to make various modifications and variations from the above description. For example, the described techniques may be performed in an order different from that described, and / or the components of the described systems, structures, devices, circuits, etc. may be combined or combined in a manner different from that described, or may be counterbalanced or replaced by other components or equivalents, and still achieve suitable results.
[0095] Therefore, different embodiments are within the scope of the appended claims provided they are equivalent to the claims. [Explanation of symbols]
[0096] 110, 120, 130, 140: Electronic equipment 150, 160: Server 170: Network
Claims
1. 1. A method implemented on a computer device, comprising: The computing device includes at least one processor configured to execute computer-readable instructions contained in a memory; The method comprises: The at least one processor constructs a control paired data set for a natural language inference task using content information related to the products based on a history of the products in a shopping domain, the control paired data set being constructed as a learning data set including positive data pairs and negative data pairs by selecting hypothetical products corresponding to a plurality of positive samples and negative samples for each premise product; and and generating a product recommendation model for application to the shopping domain by pre-training a language model for the natural language inference task using the at least one processor utilizing the controlled pairs data set. A method comprising:
2. The configuring steps include: constructing a positive data pair consisting of content information of each product for the product pair having an entailment relationship; constructing a negative data pair consisting of content information of each product for a product pair having a contradictory relationship; The method of claim 1 , comprising:
3. The configuring steps include: selecting the product pairs clicked within the time limit as positive samples; and selecting the product selected as the positive sample as a seed, and selecting products that are not clicked within the time limit among the products displayed together with the seed product as negative samples. The method of claim 1 , comprising:
4. The time limit is determined based on at least one of a purchase conversion rate for the clicked product and a category change degree. The method according to claim 3, characterized in that
5. The step of selecting a positive sample comprises: excluding at least one of products in a certain category and products with display bias from the selection of the positive sample; The method of claim 3 , comprising:
6. The step of selecting a negative sample comprises: Among the products that were not clicked within the time limit, products that have been displayed a certain number of times or more are selected as the negative samples. The method according to claim 3, characterized in that
7. The generating step includes: Fine-tuning a Bidirectional Encoder Representations from Transformer (BERT) model using the natural language inference task with the controlled paired dataset to generate the product recommendation model. The method according to claim 1 , characterized in that
8. The generating step includes: A step of simultaneously inputting content information consisting of natural language for the premise product and the hypothetical product into one network and fitting whether the premise product and the hypothetical product are related to each other by performing encoding and softmax. The method of claim 1 , comprising:
9. The method comprises: The at least one processor uses the product recommendation model as a base model, and extends the product recommendation model by jointly training a Siamese network on the base model to generate a second related product recommendation model. The method of claim 1 further comprising:
10. The step of generating a second related product recommendation model by expanding the product recommendation model includes: obtaining a first loss based on the natural language inference task and a second loss based on the Siamese network using one encoding model, and optimizing the product recommendation model according to a final loss calculated using the first loss and the second loss as a backward step to generate the second related product recommendation model.
10. The method of claim 9, comprising:
11. The step of generating a second related product recommendation model by expanding the product recommendation model includes: optimizing the product recommendation model using a final loss calculated as a weighted sum of a first loss based on the natural language inference task and a second loss based on the Siamese network; 10. The method of claim 9, comprising:
12. The method comprises: the at least one processor, for a given reference product, recommending related products based on content information of the reference product utilizing the product recommendation model. The method of claim 9 further comprising:
13. The recommending step comprises: constructing a pool of related instruments for the reference instrument based on embeddings of individual instruments based on the Siamese network; and re-ranking the relevance of the related product pool to the reference product according to an inference result of the natural language inference task; The method of claim 12, comprising:
14. A computer program product for causing a computer device to carry out the method according to any one of claims 1 to 13.
15. 1. A computing device comprising: At least one processor configured to execute computer-readable instructions contained in the memory. Including, The at least one processor A step of constructing a control pair data set for a natural language inference task using content information related to a product based on a history of the product in a shopping domain, the step including: constructing the control pair data set as a learning data set consisting of positive data pairs and negative data pairs by selecting hypothetical products corresponding to a plurality of positive samples and negative samples for each premise product; and generating a product recommendation model for application to the shopping domain by pre-training a language model for the natural language inference task using the contrastive paired dataset; A computer device that processes.
16. The at least one processor The product pairs that are clicked within the time limit are selected as positive samples. The product selected as the positive sample is used as a seed, and products that have not been clicked within the time limit since being displayed together with the seed product and that have a certain level of display count or more are selected as negative samples.
16. The computer device of claim 15.
17. The at least one processor Fitting the related state of the premise product and the hypothesis product by simultaneously inputting content information consisting of natural language into one network and executing encoding and softmax for the premise product and the hypothesis product.
16. The computer device of claim 15.
18. The at least one processor The product recommendation model is used as a base model, and a Siamese network is jointly trained on the base model to extend the product recommendation model and generate a second related product recommendation model.
16. The computer device of claim 15.
Citation Information
Patent Citations
Multimedia recommendation method and device, electronic equipment and storage medium
CN114201625A
Commodity recommendation method based on Tucker decomposition and knowledge graph
CN114240539A
Method for recommending information of goods and system for executing the method
KR100882716B1
Complementary item recommendations based on multi-modal embeddings
US20210073891A1
