Information retrieval model training methods and devices
By using generative adversarial network training methods, the problems of non-click document redundancy and insufficient training data in information retrieval systems are solved, enabling the identification of high-quality documents and determination of relevance, thereby improving model accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
- Filing Date
- 2021-01-05
- Publication Date
- 2026-04-17
AI Technical Summary
In existing information retrieval systems, non-click documents are often considered redundant and low-quality, which cannot effectively help improve model accuracy. At the same time, insufficient training data may lead to model overfitting and decreased accuracy.
A generative adversarial network training method is adopted. By generating the network, text pairs that are difficult for the discriminant network to recognize are sampled from the set of unclicked texts. Virtual adversarial perturbations are added during the training process to train the discriminant network to determine the relationship between the text pairs and generate high-quality unclicked documents.
It effectively identifies high-quality non-click documents, solves the model overfitting problem, and improves the accuracy and relevance determination ability of the information retrieval model.
Smart Images

Figure CN113722450B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of computer technology, and more specifically to information retrieval model training methods, apparatus, electronic devices, and computer-readable media. Background Technology
[0002] Information retrieval systems, upon receiving a user query, search and sort a list of documents, placing the most relevant documents first to meet the user's information needs and increase click-through rates. Such retrieval systems are widely used in various applications, including but not limited to web search, product recommendations, text retrieval, personalized advertising, and question answering. Currently, generative adversarial networks are frequently applied to information retrieval systems.
[0003] However, current information retrieval systems often suffer from the following technical problems: clicked documents are generally considered highly relevant to the user's query and represent the user's preferences, while non-clicked documents are generally considered less relevant. Although there are usually more non-clicked documents than clicked documents, many of these are redundant and of low quality, failing to effectively contribute to improving the information retrieval model. There is a need for an effective method to identify high-quality non-clicked documents and to effectively determine the relevance of documents to the aforementioned user query. Furthermore, during the training process, the aforementioned information retrieval systems may experience overfitting due to insufficient training data, leading to a decrease in model accuracy. Summary of the Invention
[0004] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0005] Some embodiments of this disclosure provide information retrieval model training methods, apparatuses, electronic devices, and computer-readable media to address the technical problems mentioned in the background section above.
[0006] Firstly, some embodiments of this disclosure provide an information retrieval model training method, which includes: acquiring target query information corresponding to a target user, a training text set, and an unclicked text set, wherein the training text set includes a text set related to the target query information and a file set unrelated to the target query information, and the unclicked text set is the file set not clicked by the target user; combining each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, obtaining a training text pair set and an unclicked text pair set; acquiring a pre-established generative adversarial network, wherein the generative adversarial network includes... A generator network and a discriminator network are used. The generator network is used to sample text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having the aforementioned relationship and that do not have a relationship. The discriminator network is used to determine whether the text pairs sampled by the generator network have the aforementioned relationship. The set of unclicked text pairs is used as the input to the generator network. The unclicked text pairs sampled by the generator network and the set of training text pairs are used as the input to the discriminator network. The generator network and the discriminator network are trained. The trained discriminator network is determined as the first information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs.
[0007] Optionally, training the generator network and the discriminator network, and determining the trained discriminator network as the first information retrieval model, includes the following training steps: fixing the parameters of the generator network, using the set of unclicked text pairs as input to the generator network, using the unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminator network, and training the discriminator network using machine learning methods; fixing the parameters of the trained discriminator network, using the set of unclicked text pairs as input to the generator network, and training the generator network using reinforcement learning methods; determining the accuracy of the discrimination result output by the trained discriminator network; and, in response to determining that the accuracy is greater than a predetermined threshold, determining the most recently trained discriminator network as the first information retrieval model.
[0008] Optionally, the above method further includes: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-executing the above training steps using the most recently trained generator network and discriminator network.
[0009] Optionally, the first information retrieval model described above includes a predetermined scoring function.
[0010] Optionally, the scoring function described above is used to score each text in the text set input to the first information retrieval model or to sort the texts in the text set.
[0011] Optionally, the text set input to the first information retrieval model includes one of the following: a text set of questions and answers, a text set of web searches, and a text set of product recommendations. Specifically, if the text set is the text set of questions and answers, the first information retrieval model is applied as a question-and-answer model; if the text set is the text set of web searches, the first information retrieval model is applied as a web search model; and if the text set is the text set of product recommendations, the first information retrieval model is applied as a product recommendation model.
[0012] Optionally, the question-answering model has a corresponding pre-determined first scoring function, the web search model has a corresponding pre-determined second scoring function, and the product recommendation model has a corresponding pre-determined third scoring function.
[0013] Optionally, the above-mentioned generative network includes a normalized exponential function, and the probability of sampling each unclicked text in the above-mentioned unclicked text set is determined based on the normalized exponential function with a temperature parameter.
[0014] The second part, some embodiments of this disclosure, provide an information retrieval model training method. This method includes: acquiring target query information corresponding to a target user, a training text set, and an unclicked text set, wherein the training text set includes a text set related to the target query information and a file set unrelated to the target query information, and the unclicked text set is the file set unclicked by the target user; acquiring a pre-established generative adversarial network, wherein the generative adversarial network includes a generator network and a discriminator network, the generator network being used to sample unclicked text from the unclicked text set that the discriminator network cannot easily identify the related relationships and that have no related relationship with the target query information. The discriminant network is used to compare the degree of association between the unclicked text sampled by the generator network and the degree of association between the training text sampled from the training text set. The unclicked text set is used as the input to the generator network, and the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information are used as the input to the discriminant network. The generator network and the discriminant network are trained, and the trained discriminant network is determined as the second information retrieval model. During the training process, the discriminant network adds corresponding virtual adversarial perturbations to the unclicked text sampled by the generator network and the training text sampled from the training text set.
[0015] Optionally, training the generator network and the discriminator network, and determining the trained discriminator network as the second information retrieval model, includes the following training steps: fixing the parameters of the generator network, using the unclicked text set as input to the generator network, using the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set as input to the discriminator network, and training the discriminator network using machine learning methods; fixing the parameters of the trained discriminator network, using the unclicked text set as input to the generator network, and training the generator network using reinforcement learning methods; determining the accuracy of the discrimination result output by the trained discriminator network; and, in response to determining that the accuracy is greater than a predetermined threshold, determining the most recently trained discriminator network as the second information retrieval model.
[0016] Optionally, the above method further includes: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-executing the above training steps using the most recently trained generator network and discriminator network.
[0017] Optionally, the second information retrieval model described above is used to compare the degree of association between at least two input texts.
[0018] Thirdly, some embodiments of this disclosure provide an information retrieval model training apparatus, comprising: a first acquisition unit configured to acquire target query information corresponding to a target user, a training text set, and an unclicked text set, wherein the training text set includes a text set associated with the target query information and a file set unrelated to the target query information, and the unclicked text set is the file set not clicked by the target user; a combination unit configured to combine each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, thereby obtaining a training text pair set and an unclicked text pair set; and a second acquisition unit configured to acquire a pre-established generative adversarial network, wherein... The aforementioned generative adversarial network includes a generator network and a discriminator network. The generator network is used to sample text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having the aforementioned relationship and that do not have a relationship. The discriminator network is used to determine whether the text pairs sampled by the generator network have the aforementioned relationship. The training unit is configured to use the set of unclicked text pairs as input to the generator network, and the set of unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminator network to train the generator network and the discriminator network. The trained discriminator network is determined as the first information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs.
[0019] Optionally, the training unit can be configured to perform the following training steps: fixing the parameters of the generator network, using the set of unclicked text pairs as input to the generator network, using the unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminator network, and training the discriminator network using machine learning methods; fixing the parameters of the trained discriminator network, using the set of unclicked text pairs as input to the generator network, and training the generator network using reinforcement learning methods; determining the accuracy of the discrimination result output by the trained discriminator network; and in response to determining that the accuracy is greater than a predetermined threshold, identifying the most recently trained discriminator network as the first information retrieval model.
[0020] Optionally, the apparatus further includes: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-executing the training steps using the most recently trained generator network and discriminator network.
[0021] Optionally, the first information retrieval model described above includes a predetermined scoring function.
[0022] Optionally, the scoring function described above is used to score each text in the text set input to the first information retrieval model or to sort the texts in the text set.
[0023] Optionally, the text set input to the first information retrieval model includes one of the following: a text set of questions and answers, a text set of web searches, and a text set of product recommendations. Specifically, if the text set is the text set of questions and answers, the first information retrieval model is applied as a question-and-answer model; if the text set is the text set of web searches, the first information retrieval model is applied as a web search model; and if the text set is the text set of product recommendations, the first information retrieval model is applied as a product recommendation model.
[0024] Optionally, the question-answering model has a corresponding pre-determined first scoring function, the web search model has a corresponding pre-determined second scoring function, and the product recommendation model has a corresponding pre-determined third scoring function.
[0025] Optionally, the above-mentioned generative network includes a normalized exponential function, and the probability of sampling each unclicked text in the above-mentioned unclicked text set is determined based on the normalized exponential function with a temperature parameter.
[0026] Fourthly, some embodiments of this disclosure provide an information retrieval model training apparatus, comprising: a first acquisition unit configured to acquire target query information corresponding to a target user, a training text set, and an unclicked text set, wherein the training text set includes a text set related to the target query information and a file set unrelated to the target query information, and the unclicked text set is the file set unclicked by the target user; and a second acquisition unit configured to acquire a pre-established generative adversarial network, wherein the generative adversarial network includes a generator network and a discriminator network, the generator network being used to sample texts from the unclicked text set that are difficult for the discriminator network to identify as having the aforementioned relationship and that do not have a relationship with the target query information. The discriminant network is used to compare the degree of association between the unclicked text sampled by the generator network and the degree of association between the training text sampled from the training text set. The training unit is configured to take the unclicked text set as input to the generator network, and take the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information as input to the discriminant network. The generator network and the discriminant network are trained, and the trained discriminant network is determined as the second information retrieval model. During the training process, the discriminant network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the training text pairs.
[0027] Optionally, the training unit can be configured to perform the following training steps: fix the parameters of the generator network, use the unclicked text set as input to the generator network, use the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set as input to the discriminator network, and train the discriminator network using machine learning methods; fix the parameters of the trained discriminator network, use the unclicked text set as input to the generator network, and train the generator network using reinforcement learning methods; determine the accuracy of the discrimination result output by the trained discriminator network; in response to determining that the accuracy is greater than a predetermined threshold, determine the most recently trained discriminator network as the second information retrieval model.
[0028] Optionally, the apparatus further includes: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-executing the training steps using the most recently trained generator network and discriminator network.
[0029] Optionally, the second information retrieval model described above is used to compare the degree of association between at least two input texts.
[0030] Fifthly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a memory storing one or more programs thereon, which, when executed by the one or more processors, cause the one or more processors to perform the information retrieval model training method of the first or second aspect described above.
[0031] Sixthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the information retrieval model training method of the first or second aspect described above.
[0032] The various embodiments of this disclosure have the following beneficial effects: the first information retrieval model obtained through the information retrieval model training method of some embodiments of this disclosure can effectively identify high-quality non-clicked documents and effectively determine the relevance of documents related to the user query. Specifically, the inventors have found that clicked documents are generally considered to be data with high relevance to the user query, representing the user's preferences, while non-clicked documents are generally considered to be data with low relevance to the user query. Although there are usually more non-clicked documents than clicked documents, many non-clicked documents are redundant and of low quality, and cannot effectively help improve the information retrieval model. In addition, the above-mentioned information retrieval system may experience overfitting during training due to insufficient training data, leading to a decrease in model accuracy. Based on this, the information retrieval model training method of some embodiments of this disclosure uses the generative network in the trained generative adversarial network to effectively identify high-quality non-clicked documents, and uses the judgment network in the trained generative adversarial network to quickly and effectively determine the relevance of documents related to the user query. The generator network samples text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having the aforementioned relationship and that do not have a relationship. The discriminator network then determines whether the text pairs sampled by the generator network have the aforementioned relationship. Furthermore, during training, the discriminator network adds corresponding virtual adversarial perturbations to both the unclicked text pairs sampled by the generator network and the training text pair set. This can mitigate the potential overfitting issue caused by insufficient training data. Attached Figure Description
[0033] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0034] Figure 1 This is a schematic diagram illustrating an application scenario of the information retrieval model training method according to some embodiments of this disclosure;
[0035] Figure 2 This is a flowchart of some embodiments of the information retrieval model training method according to this disclosure;
[0036] Figure 3 This is a schematic diagram illustrating an application scenario of the information retrieval model training method according to some embodiments of this disclosure;
[0037] Figure 4 This is a flowchart of some embodiments of the information retrieval model training method according to this disclosure;
[0038] Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the information retrieval model training apparatus according to this disclosure;
[0039] Figure 6 These are schematic diagrams illustrating the structure of some embodiments of the information retrieval model training apparatus according to this disclosure;
[0040] Figure 7 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0041] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0042] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0043] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0044] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0045] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0046] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0047] Figure 1 This is a schematic diagram of an application scenario of an information retrieval model training method according to some embodiments of the present disclosure.
[0048] like Figure 1As shown, firstly, the electronic device 101 can acquire target query information 104, training text set 103, and unclicked text set 105 corresponding to the target user 102. The training text set 103 includes a set of texts related to the target query information 104 and a set of files not related to the target query information 104. The unclicked text set 105 is the set of files that the target user 102 has not clicked. In this application scenario, the training text set 103 may include: a first training file 1031, a second training file 1032, a third training file 1033, and a fourth training file 1034. The unclicked text set 105 may include: a first unclicked file 1051, a second unclicked file 1052, and a third unclicked file 1053. The first training sample 1031, the second training sample 1032, and the third training sample 1033 may be texts related to the target query information 104. The fourth training sample 1034 mentioned above can be a file that is not related to the target query information 104 mentioned above.
[0049] Then, each training text in the training text set 103 and each unclicked text in the unclicked text set 105 are combined with the target query information 104 to generate training text pairs and unclicked text pairs, resulting in training text pair set 106 and unclicked text pair set 107. In this application scenario, the first training text 1031 in the training text set 103 is combined with the target query information 104 to obtain (first training text, target query information) 1061 in the training text pair set 106. The second training text 1032 in the training text set 103 is combined with the target query information 104 to obtain (second training text, target query information) 1062 in the training text pair set 106. The third training text 1033 in the training text set 103 is combined with the target query information 104 to obtain (third training text, target query information) 1063 in the training text pair set 106. The fourth training text 1034 in the training text set 103 is combined with the target query information 104 to obtain (fourth training text, target query information) 1064 in the training text pair set 106. The first unclicked text 1051 in the unclicked text set 105 is combined with the target query information 104 to obtain (first unclicked text, target query information) 1071 in the unclicked text pair set 107. The second unclicked text 1052 in the unclicked text set 105 is combined with the target query information 104 to obtain (second unclicked text, target query information) 1072 in the unclicked text pair set 107. The third unclicked text 1053 in the unclicked text set 105 is combined with the target query information 104 to obtain (third unclicked text, target query information) 1073 in the unclicked text pair set 107.
[0050] Then, a pre-established generative adversarial network 108 is obtained, wherein the generative adversarial network 108 includes a generator network 1082 and a discriminator network 1081. The generator network 1082 is used to sample text pairs from the unclicked text pair set 107 that are difficult for the discriminator network 1081 to identify as having the aforementioned correlation and that do not have a correlation. The discriminator network 1081 is used to determine whether the text pairs sampled by the generator network 1082 have the aforementioned correlation. As an example, the text pairs sampled from the unclicked text pair set 107 that are difficult for the discriminator network 1081 to identify as having the aforementioned correlation and that do not have a correlation could be (first unclicked text, target query information) 1071.
[0051] Finally, the unclicked text pair set 107 is used as the input to the generator network 1081, and the unclicked text pairs sampled by the generator network 1082 and the training text pair set 106 are used as the input to the discriminator network 1081. The generator network 1082 and the discriminator network 1081 are trained to obtain the trained generative adversarial network 109. The trained discriminator network 1091 is determined as the first information retrieval model. During training, the discriminator network 1081 adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network 1082 and the training text pair set 106. In this application scenario, the unclicked text pair sampled by the generator network 1082 can be (first unclicked text, target query information) 1071. The trained generative adversarial network 109 includes: the trained generator network 1092 and the trained discriminator network 1091.
[0052] It should be noted that the aforementioned electronic device 101 can be either hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster of multiple servers or electronic devices, or as a single server or a single electronic device. When the electronic device is software, it can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0053] It should be understood that Figure 1 The number of electronic devices 101 shown is merely illustrative. Any number of electronic devices 101 may be used depending on the implementation requirements.
[0054] Continue to refer to Figure 2 , Figure 2 A flow 200 illustrating some embodiments of an information retrieval model training method according to the present disclosure is shown. This information retrieval model training method includes the following steps:
[0055] Step 201: Obtain the target query information, training text set, and unclicked text set corresponding to the target user.
[0056] In some embodiments, the entity executing the information retrieval model training method (e.g.) Figure 1The electronic device 100 shown can acquire target query information, training text set, and unclicked text set corresponding to the target user via wired or wireless connection. The training text set includes text sets related to the target query information and file sets unrelated to it. The unclicked text set consists of file sets not clicked by the target user. The amount of text data in the training text set related to the target query information is significantly greater than the amount of text data in the file sets unrelated to the target query information. Since the target user often clicks text related to the target query information, the probability that text in the unclicked text set is associated with the target query information is lower than that of text in the text set clicked by the target user.
[0057] It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future wireless connection methods.
[0058] As an example, the target query information corresponding to the target user could be: "What are the components of a computer host?", and the text related to the target query information could include, but is not limited to, at least one of the following: "Computer components include the motherboard," "Computer components include memory, hard drive, and graphics card." The text related to the target query information could also include, but is not limited to, at least one of the following: "The computer has 4GB of memory," "The mobile phone has a standby time of 13 hours."
[0059] Step 202: Combine each training text in the above training text set and each unclicked text in the above unclicked text set with the above target query information to generate training text pairs and unclicked text pairs, thus obtaining a training text pair set and an unclicked text pair set.
[0060] In some embodiments, the execution entity may combine each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, thereby obtaining a training text pair set and an unclicked text pair set.
[0061] As an example, the training text could be: "Computer components include the motherboard." The target query could be: "What components are included in a computer host?" The unclicked text could be: "The computer's memory capacity is 4GB." Combining the training text and the unclicked text with the target query respectively yields training text pairs ("Computer components include the motherboard," "What components are included in a computer host?") and unclicked text pairs ("The computer's memory capacity is 4GB," "What components are included in a computer host?").
[0062] Step 203: Obtain the pre-established generative adversarial network.
[0063] In some embodiments, the executing entity may acquire a pre-established generative adversarial network (GAN). The GAN includes a generator network and a discriminator network. The generator network samples text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having a relationship and that do not actually have a relationship. The discriminator network determines whether the text pairs sampled by the generator network have a relationship. It should be noted that the text pairs that the discriminator network cannot easily identify as having a relationship and that do not actually have a relationship may be text pairs that appear to have a relationship but do not. For example, the target query information may be: "Does a computer host's accessories include a graphics card?". The text pairs that the discriminator network cannot easily identify as having a relationship and that do not actually have a relationship may be ("The computer's graphics card is a 1080ti", "Does a computer host's accessories include a graphics card?"). Both "The computer's graphics card is a 1080ti" and "Does a computer host's accessories include a graphics card?" relate to the computer's graphics card. However, there is no relationship between "The computer's graphics card is a 1080ti" and "Does a computer host's accessories include a graphics card?".
[0064] In addition, the aforementioned generative network can be a convolutional neural network (e.g., various convolutional neural network structures containing convolutional layers, pooling layers, unpooling layers, and deconvolutional layers) used for text sampling. The aforementioned discriminative network can be a convolutional neural network (e.g., various convolutional neural network structures containing fully connected layers, where the fully connected layers can perform classification functions). Furthermore, the aforementioned discriminative network can also be other model structures used to implement classification functions, such as Support Vector Machines (SVMs).
[0065] It should be noted that generative adversarial networks are used to solve the information retrieval problem. A set of query information can be provided. (where N is a positive integer) and text library (Where M is a positive integer), the above generative adversarial network can be based on the predicted text in the text library and query information. The relationships between documents are used to perform retrieval or sorting. It can represent the text in the text library and the target query information based on the user's information needs. The relevant conditional probabilities. Among them, It can represent the user's information needs. This indicates that the relevant information is the information that the user needs. This can indicate that the relevant information is not the information that the user needs.
[0066] Here, the objective function for training the generator network G and the discriminator network D during generative adversarial training can be expressed by the following formula:
[0067]
[0068] in, Represents the information of the i-th query. Parameters that characterize the generator network. The parameters characterize the discriminant network. It can characterize the text distribution in the text library that is related to the i-th query information. It can characterize the expected distribution of texts in the text library that are related to the i-th query information. Representing the i-th query information, the text is related, and the parameters are... The loss function. Characterization estimation The text distribution of the generative network G. Representing the i-th query information, the text is unrelated and the parameters are... The loss function is defined as follows. This loss function can be the cross-entropy loss function: ,in, It can be a Sigmoid (Sigmoid function). It can be represented as a function corresponding to the discriminant network.
[0069] In some alternative implementations of certain embodiments, the generator network includes a normalized exponential function, and the probability of sampling each unclicked text in the unclicked text set is determined based on the normalized exponential function with a temperature parameter. As an example, the probability of sampling each unclicked text in the unclicked text set can be determined by the following formula:
[0070]
[0071] in, Characterizing temperature parameters, It can characterize the function corresponding to the generator network. This represents the text sampled from the above unclicked text set.
[0072] Step 204: Train the above-mentioned generator network and the above-mentioned discriminator network, and determine the trained discriminator network as the first information retrieval model.
[0073] In some embodiments, the executing entity may use the set of unclicked text pairs as input to the generating network, and use the unclicked text pairs sampled by the generating network and the set of training text pairs as input to the discriminative network to train the generating network and the discriminative network, and determine the trained discriminative network as the first information retrieval model. During the training process, the discriminative network incorporates corresponding virtual adversarial perturbations into the unclicked text pairs sampled by the generating network and the set of training text pairs.
[0074] In some optional implementations of certain embodiments, training the above-mentioned generator network and the above-mentioned discriminator network, and determining the trained discriminator network as the first information retrieval model, can be performed by the following training steps:
[0075] The first step is to fix the parameters of the above-mentioned generator network, take the above-mentioned set of unclicked text pairs as the input of the generator network, take the unclicked text pairs sampled by the generator network and the above-mentioned set of training text pairs as the input of the discriminator network, and use machine learning methods to train the discriminator network.
[0076] It should be noted that the parameters of the aforementioned discriminant network without adding virtual adversarial perturbations to the input can be trained using the following formula. :
[0077]
[0078] in, The parameters of the generative network after training are represented. It represents the distribution of related texts generated by the network after training.
[0079] In addition, the parameters of the aforementioned discriminant network, which incorporates virtual adversarial perturbations into the input, can be trained using the following formula. :
[0080]
[0081] in, This is the loss function corresponding to the adversarial perturbation. It is determined by the following formula:
[0082]
[0083] in, This can be represented as the adversarial perturbation to be added to the vector corresponding to query information i. This can be represented as the adversarial perturbation to be added to the text correspondence vector input into the discriminant network. Conditional probability and The KL divergence between them. and It can be determined using the following formula:
[0084]
[0085]
[0086] in, and It can be a random vector.
[0087] The second step involves fixing the parameters of the trained discriminator network, using the aforementioned set of unclicked text pairs as input to the generator network, and training the generator network using reinforcement learning methods. Alternatively, the executing entity can combine machine learning methods with backpropagation, gradient descent, and other algorithms to train the generator network.
[0088] The parameters of the generative network can be trained using the following formula:
[0089]
[0090] in, To generate the parameters of the network after training.
[0091] In addition, the generative network directly samples text from the unclicked text set using a policy gradient-based reinforcement learning method. Therefore, it can be calculated using the following formula. gradient:
[0092]
[0093] in, It can represent the l-th sampled text. The reward for the l-th sampled text used when the given query information is the i-th query information.
[0094] The third step is to determine the accuracy of the discrimination results output by the trained discrimination network.
[0095] Fourth step: In response to determining that the accuracy rate is greater than a predetermined threshold (e.g., 80%), the most recently trained discriminant network is identified as the first information retrieval model.
[0096] Optionally, in response to determining that the accuracy is less than or equal to the predetermined threshold, the training steps are re-executed using the most recently trained generator network and discriminator network.
[0097] In some optional implementations of some embodiments, the first information retrieval model described above includes a predetermined scoring function.
[0098] Optionally, the scoring function described above is used to score each text in the text set input to the first information retrieval model or to sort the texts in the text set.
[0099] Optionally, the text set input to the first information retrieval model includes one of the following: a text set of questions and answers, a text set of web searches, and a text set of product recommendations. Specifically, if the text set is the text set of questions and answers, the first information retrieval model is applied as a question-and-answer model; if the text set is the text set of web searches, the first information retrieval model is applied as a web search model; and if the text set is the text set of product recommendations, the first information retrieval model is applied as a product recommendation model.
[0100] Optionally, the question-answering model has a corresponding pre-determined first scoring function, the web search model has a corresponding pre-determined second scoring function, and the product recommendation model has a corresponding pre-determined third scoring function.
[0101] As an example, the first scoring function mentioned above can be the following formula:
[0102]
[0103] in, It can be a vector with the value q. It can be a vector with text d. It can be the modulus of the vector q. It can be the modulus of a vector whose text is d. The problem is represented as the transpose of the vector q.
[0104] As an example, the second scoring function mentioned above can be the following formula:
[0105]
[0106] In this context, a pair of queries and text can be represented as a unified vector. The above vector It can be determined using TF-IDF (Term Frequency–Inverse Document Frequency), BM25 algorithm, language model scores, etc. The deviation vector It is a scalar. and It can be a weight matrix. It can be a regular activation function.
[0107] As an example, the third scoring function mentioned above can be the following formula:
[0108]
[0109] It can be the product The vector. It can be the product The transpose of a vector. It can be the product The deviation term of the vector.
[0110] The above embodiments of this disclosure have the following beneficial effects: The first information retrieval model obtained through the information retrieval model training method of some embodiments of this disclosure can effectively identify high-quality non-clicked documents and effectively determine the relevance of documents related to the user query. Specifically, the inventors have found that clicked documents are generally considered to be data with high relevance to the user query, representing the user's preferences, while non-clicked documents are generally considered to be data with low relevance to the user query. Although there are usually more non-clicked documents than clicked documents, many non-clicked documents are redundant and of low quality, and cannot effectively help improve the information retrieval model. In addition, the above information retrieval system may experience overfitting during training due to insufficient training data, leading to a decrease in model accuracy. Based on this, the information retrieval model training method of some embodiments of this disclosure uses the generative network in the trained generative adversarial network to effectively identify high-quality non-clicked documents, and uses the judgment network in the trained generative adversarial network to quickly and effectively determine the relevance of documents related to the user query. The generator network samples text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having the aforementioned relationship and that do not have a relationship. The discriminator network then determines whether the text pairs sampled by the generator network have the aforementioned relationship. Furthermore, during training, the discriminator network adds corresponding virtual adversarial perturbations to both the unclicked text pairs sampled by the generator network and the training text pair set. This can mitigate the potential overfitting issue caused by insufficient training data.
[0111] Figure 3This is a schematic diagram of an application scenario of an information retrieval model training method according to some embodiments of the present disclosure.
[0112] Figure 3 In this application scenario, electronic device 301 can acquire target query information corresponding to the target user, training text set 302, and unclicked text set 303. The training text set 302 includes a set of texts related to the target query information and a set of files unrelated to the target query information. The unclicked text set 303 consists of the set of files not clicked by the target user. In this application scenario, the training text set 302 may include: a first training file 3021, a second training file 3022, a third training file 3023, and a fourth training file 3024. The unclicked text set 303 may include: a first unclicked file 3031, a second unclicked file 3032, and a third unclicked file 3033. The first training sample 3021, the second training sample 3022, and the third training sample 3023 can be texts related to the target query information. The fourth training sample 3024 can be a file unrelated to the target query information.
[0113] Then, a pre-established generative adversarial network 304 is obtained, wherein the generative adversarial network 304 includes a generator network 3042 and a discriminator network 3041. The generator network 3042 is used to sample unclicked texts from the unclicked text set that are difficult for the discriminator network 3041 to identify the above-mentioned correlation and have no correlation with the above-mentioned target query information (in this application scenario, it can be the second unclicked sample 3023). The discriminator network 3041 is used to compare the degree of correlation between the unclicked texts sampled by the generator network 3042 and the degree of correlation between the training texts sampled from the training text set 302 (in this application scenario, it can be the third training sample 3023).
[0114] Finally, the unclicked text set 303 is used as the input to the generator network 3042. The unclicked text sampled by the generator network 3042 (which in this application scenario could be the second unclicked sample 3023), the training text sampled from the training text set 302 (which in this application scenario could be the third training sample 3023), and the ordered text set 306 related to the target query information are used as the input to the discriminator network 3041. The generator network 3042 and the discriminator network 3041 are trained to obtain the trained generative adversarial network 305. The trained discriminator network 3051 is then defined as the second information retrieval model. The trained generative adversarial network 305 includes: the trained generator network 3052 and the trained discriminator network 3051.
[0115] It should be noted that the aforementioned electronic device 301 can be either hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster of multiple servers or electronic devices, or as a single server or a single electronic device. When the electronic device is software, it can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0116] It should be understood that Figure 3 The number of electronic devices 301 shown is merely illustrative. Any number of electronic devices 301 can be used depending on implementation requirements.
[0117] Continue to refer to Figure 4 , Figure 4 A flow 400 illustrating some embodiments of an information retrieval model training method according to the present disclosure is shown. This information retrieval model training method includes the following steps:
[0118] Step 401: Obtain the target query information, training text set, and unclicked text set corresponding to the target user.
[0119] In some embodiments, the entity executing the information retrieval model training method (e.g.) Figure 3 The electronic device 301 shown can acquire target query information, a training text set, and an unclicked text set corresponding to the target user via a wired or wireless connection. The training text set includes text sets related to the target query information and file sets unrelated to it. The unclicked text set consists of file sets not clicked by the target user. The amount of text data in the training text set related to the target query information is significantly greater than the amount of text data in the file sets unrelated to the target query information. Since the target user often clicks text related to the target query information, the probability that text in the unclicked text set is associated with the target query information is lower than that of text in the text set clicked by the target user.
[0120] It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other currently known or future wireless connection methods.
[0121] As an example, the target query information corresponding to the target user could be: "What are the components of a computer host?", and the text related to the target query information could include, but is not limited to, at least one of the following: "Computer components include the motherboard," "Computer components include memory, hard drive, and graphics card." The text related to the target query information could also include, but is not limited to, at least one of the following: "The computer has 4GB of memory," "The mobile phone has a standby time of 13 hours."
[0122] Step 402: Obtain the pre-established generative adversarial network.
[0123] In some embodiments, the executing entity may acquire a pre-established generative adversarial network. This generative adversarial network includes a generator network and a discriminator network. The generator network samples unclicked text from the unclicked text set that the discriminator network cannot easily identify the correlation between the unclicked text and that has no correlation with the target query information. The discriminator network compares the correlation degree of the unclicked text sampled by the generator network with the correlation degree of the training text sampled from the training text set.
[0124] Specifically, the text pairs that the aforementioned discriminant network cannot easily identify as having a relationship and that do not actually have a relationship can be text pairs that appear to have a relationship but do not. For example, the target query could be: "Does the computer host's accessories include the graphics card?", and the text pairs that the aforementioned discriminant network cannot easily identify as having a relationship and that do not actually have a relationship could be ("The computer's graphics card is a 1080ti", "Does the computer host's accessories include the graphics card?"). Both "The computer's graphics card is a 1080ti" and "Does the computer host's accessories include the graphics card?" relate to the computer's graphics card. However, there is no relationship between "The computer's graphics card is a 1080ti" and "Does the computer host's accessories include the graphics card?".
[0125] As an example, the unclicked text sampled by the generator network shows a strong correlation with the target query information. The training text sampled from the training text set shows a weaker correlation with the target query information. Therefore, the discriminator network can be ranked according to the correlation between the unclicked text sampled by the generator network and the training text sampled from the training text set: The correlation between the unclicked text sampled by the generator network > The correlation between the training text sampled from the training text set.
[0126] It should be noted that the objective function of the pre-established generative adversarial network can be the following formula:
[0127] in, Represents the information of the i-th query. Parameters that characterize the generator network. The parameters characterize the discriminant network. It can be a sample taken from the training sample set. It can be a sample taken from an unclicked sample set. It can be the i-th query information, and the sampled from the training sample set is... The samples sampled from the unclicked sample set are The parameters are The loss function.
[0128] It should be noted that when standard cross-entropy is used as the loss function, the loss function can be the following formula:
[0129]
[0130] Step 403: Train the above-mentioned generator network and the above-mentioned discriminator network, and determine the trained discriminator network as the second information retrieval model.
[0131] In some embodiments, the executing entity may use the unclicked text set as input to the generator network, and the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information as input to the discriminator network. The generator network and the discriminator network are then trained, and the trained discriminator network is determined as the second information retrieval model. The ordered text set related to the target query information is predetermined. During training, the discriminator network incorporates corresponding virtual adversarial perturbations into the unclicked text sampled by the generator network and the training text sampled from the training text set.
[0132] It should be noted that the parameters of the above discriminant network can be trained using the following formula. :
[0133]
[0134] in, This is the loss function corresponding to the adversarial perturbation. It is determined by the following formula:
[0135]
[0136] in, This can be represented as the adversarial perturbation to be added to the vector corresponding to query information i. It can represent the adversarial perturbation to be added to the text-to-text vector sampled from the training text set. It can be represented as the adversarial perturbation to be added to the text vectors sampled from the unclicked text set. Conditional probability and The KL divergence between them. , and It can be determined using the following formula:
[0137]
[0138] in, , and It can be a random vector.
[0139] In some optional implementations of certain embodiments, training the generator network and the discriminator network described above, and determining the trained discriminator network as the second information retrieval model, may include the following training steps:
[0140] The first step is to fix the parameters of the above-mentioned generator network, take the above-mentioned unclicked text set as the input of the generator network, take the unclicked text sampled by the generator network, the training text sampled from the above-mentioned training text set, and the above-mentioned ordered text set as the input of the discriminator network, and train the discriminator network using machine learning methods.
[0141] The second step is to fix the parameters of the trained discriminator network, use the above-mentioned unclicked text set as the input of the above-mentioned generator network, and train the above-mentioned generator network using reinforcement learning methods.
[0142] The parameters in the aforementioned generative network can be determined using the following formula:
[0143]
[0144] The third step is to determine the accuracy of the discrimination results output by the trained discrimination network.
[0145] Fourth step: In response to determining that the accuracy rate is greater than a predetermined threshold, the most recently trained discriminant network is identified as the second information retrieval model.
[0146] Optionally, in response to determining that the accuracy is less than or equal to the predetermined threshold, the training steps are re-executed using the most recently trained generator network and discriminator network.
[0147] In some alternative implementations of some embodiments, the second information retrieval model described above is used to compare the degree of association between at least two input texts.
[0148] The information retrieval model training method of some embodiments of this disclosure can first obtain target query information corresponding to the target user, a training text set, and an unclicked text set. The training text set includes a text set related to the target query information and a file set unrelated to the target query information. The unclicked text set is the file set that the target user has not clicked. Then, a pre-established generative adversarial network (GAN) is obtained. The GAN includes a generator network and a discriminator network. The generator network samples unclicked text from the unclicked text set that the discriminator network cannot easily identify the correlation with and that has no correlation with the target query information. The discriminator network compares the correlation degree of the unclicked text sampled by the generator network with the correlation degree of the training text sampled from the training text set. Finally, the generator network and the discriminator network are trained by using the set of unclicked text as input, the unclicked text sampled by the generator network, the training text sampled from the training text set as input, and the ordered text set related to the target query information as input. The trained discriminator network is then used as the second information retrieval model. During training, the discriminator network incorporates corresponding virtual adversarial perturbations into the unclicked text sampled by the generator network and the training text sampled from the training text set. This virtual adversarial perturbation helps prevent overfitting due to insufficient training data. The second information retrieval model can easily and effectively determine the degree of correlation between at least two texts input to it.
[0149] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an information retrieval model training device, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0150] like Figure 5As shown, an information retrieval model training device 500 in some embodiments includes: a first acquisition unit 501, a combination unit 502, a second acquisition unit 503, and a training unit 504. The first acquisition unit 501 is configured to acquire target query information corresponding to a target user, a training text set, and a set of unclicked texts. The training text set includes a text set related to the target query information and a file set unrelated to the target query information. The unclicked text set is the file set that the target user has not clicked. The combination unit 502 is configured to combine each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, resulting in a training text pair set and an unclicked text pair set. The second acquisition unit 503 is configured to acquire a pre-established generative adversarial network, wherein the generative adversarial network includes a generative network... The generator network and the discriminant network are configured to sample text pairs from the set of unclicked text pairs that the discriminant network cannot easily identify as having the aforementioned relationship and that do not have a relationship, and to determine whether the text pairs sampled by the generator network have the aforementioned relationship; the training unit 504 is configured to use the set of unclicked text pairs as input to the generator network, and to use the unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminant network, to train the generator network and the discriminant network, and to determine the trained discriminant network as the first information retrieval model, wherein the discriminant network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs during the training process.
[0151] In some optional implementations of certain embodiments, the training unit 504 may be further configured to perform the following training steps: fixing the parameters of the generator network, using the set of unclicked text pairs as input to the generator network, using the unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminator network, and training the discriminator network using a machine learning method; fixing the parameters of the trained discriminator network, using the set of unclicked text pairs as input to the generator network, and training the generator network using a reinforcement learning method; determining the accuracy of the discrimination result output by the trained discriminator network; and, in response to determining that the accuracy is greater than a predetermined threshold, identifying the most recently trained discriminator network as the first information retrieval model.
[0152] In some optional implementations of some embodiments, the training unit 504 may be further configured to: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-execute the training steps using the most recently trained generator network and discriminator network.
[0153] In some optional implementations of some embodiments, the first information retrieval model described above includes a predetermined scoring function.
[0154] In some optional implementations of some embodiments, the scoring function is used to score each text in the text set input to the first information retrieval model or to sort the texts in the text set.
[0155] In some optional implementations of some embodiments, the text set input to the first information retrieval model includes one of the following: a text set of questions and answers, a text set of web searches, and a text set of product recommendations. Specifically, if the text set is the text set of questions and answers, the first information retrieval model is applied as a question-and-answer model; if the text set is the text set of web searches, the first information retrieval model is applied as a web search model; and if the text set is the text set of product recommendations, the first information retrieval model is applied as a product recommendation model.
[0156] In some optional implementations of some embodiments, the question-answering model has a corresponding predetermined first scoring function, the web search model has a corresponding predetermined second scoring function, and the product recommendation model has a corresponding predetermined third scoring function.
[0157] In some alternative implementations of some embodiments, the generator network includes a normalized exponential function, and the probability of sampling each unclicked text in the unclicked text set is determined based on the normalized exponential function with a temperature parameter.
[0158] It is understandable that the units described in the device 500 are related to the reference. Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.
[0159] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an information retrieval model training device, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0160] like Figure 6As shown, an information retrieval model training device 600 in some embodiments includes: a first acquisition unit 601, a second acquisition unit 602, and a training unit 603. The first acquisition unit 601 is configured to acquire target query information corresponding to a target user, a training text set, and a set of unclicked texts. The training text set includes a text set related to the target query information and a file set unrelated to the target query information. The unclicked text set is the file set not clicked by the target user. The second acquisition unit 603 is configured to acquire a pre-established generative adversarial network (GAN). The GAN includes a generator network and a discriminator network. The generator network is used to sample texts from the unclicked text set that are difficult for the discriminator network to identify as having a relationship with the target query information. For unclicked texts that have no relation to the query information, the discriminant network is used to compare the degree of relation between the unclicked texts sampled by the generator network and the degree of relation between the training texts sampled from the training text set. The training unit 603 is configured to take the unclicked text set as input to the generator network, and take the unclicked texts sampled by the generator network, the training texts sampled from the training text set, and the ordered text set related to the target query information as input to the discriminant network. The generator network and the discriminant network are trained, and the trained discriminant network is determined as the second information retrieval model.
[0161] In some optional implementations of certain embodiments, the training unit 603 is further configured to perform the following training steps: fixing the parameters of the generator network, using the unclicked text set as input to the generator network, using the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set as input to the discriminator network, and training the discriminator network using a machine learning method; fixing the parameters of the trained discriminator network, using the unclicked text set as input to the generator network, and training the generator network using a reinforcement learning method; determining the accuracy of the discrimination result output by the trained discriminator network; and, in response to determining that the accuracy is greater than a predetermined threshold, identifying the most recently trained discriminator network as the second information retrieval model.
[0162] In some optional implementations of some embodiments, the training unit 603 is further configured to: in response to determining that the accuracy is less than or equal to the predetermined threshold, re-execute the training steps using the most recently trained generator network and discriminator network, wherein the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text sampled by the generator network and the training text sampled from the training text set during the training process.
[0163] In some alternative implementations of some embodiments, the second information retrieval model described above is used to compare the degree of association between at least two input texts.
[0164] It is understandable that the units described in the device 600 are related to the reference. Figure 4 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 600 and the units contained therein, and will not be repeated here.
[0165] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0166] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.
[0167] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of some embodiments of this disclosure.
[0168] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0169] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0170] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire target query information corresponding to the target user, a training text set, and a set of unclicked texts, wherein the training text set includes a text set related to the target query information and a file set unrelated to the target query information, and the unclicked text set is the file set not clicked by the target user; combine each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, obtaining a training text pair set and an unclicked text pair set; acquire a pre-established generative adversarial network, wherein the aforementioned generative adversarial network... The adversarial network includes a generator network and a discriminator network. The generator network is used to sample text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify as having the aforementioned relationship and that do not have a relationship. The discriminator network is used to determine whether the text pairs sampled by the generator network have the aforementioned relationship. The set of unclicked text pairs is used as the input to the generator network, and the unclicked text pairs sampled by the generator network and the set of training text pairs are used as the input to the discriminator network. The generator network and the discriminator network are trained, and the trained discriminator network is determined as the first information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs.Obtain target query information, training text set, and unclicked text set corresponding to the target user. The training text set includes a text set related to the target query information and a file set unrelated to the target query information. The unclicked text set is the file set not clicked by the target user. Obtain a pre-established generative adversarial network (GAN), comprising a generator network and a discriminator network. The generator network samples unclicked text from the unclicked text set that the discriminator network cannot easily identify the relationship with and that has no relationship with the target query information. The discriminator network compares the unclicked text sampled by the generator network with the text sampled by the generator network. The degree of association between the unclicked text and the degree of association between the training text sampled from the training text set are considered. The unclicked text set is used as the input to the generator network, and the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information are used as the input to the discriminator network. The generator network and the discriminator network are trained, and the trained discriminator network is determined as the second information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text sampled by the generator network and the training text sampled from the training text set.
[0171] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0173] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first acquisition unit, a combination unit, a second acquisition unit, and a training unit. The names of these units do not necessarily limit the specific unit; for example, the first acquisition unit may also be described as "a unit that acquires target query information, a training text set, and an unclicked text set corresponding to the target user."
[0174] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0175] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for training an information retrieval model, comprising: Obtain target query information, training text set, and unclicked text set corresponding to the target user. The training text set includes a text set that is related to the target query information and a file set that is not related to the target query information. The unclicked text set is the file set that the target user has not clicked. Each training text in the training text set and each unclicked text in the unclicked text set are combined with the target query information to generate training text pairs and unclicked text pairs, thus obtaining a training text pair set and an unclicked text pair set. Obtain a pre-established generative adversarial network, wherein the generative adversarial network includes a generator network and a discriminator network. The generator network is used to sample text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify the association relationship and that the association relationship does not exist. The discriminator network is used to determine whether the text pairs sampled by the generator network have the association relationship. The set of unclicked text pairs is used as the input to the generator network, and the set of unclicked text pairs sampled by the generator network and the set of training text pairs are used as the input to the discriminator network. The generator network and the discriminator network are trained, and the trained discriminator network is determined as the first information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs.
2. The method according to claim 1, wherein, The step of training the generator network and the discriminator network, and determining the trained discriminator network as the first information retrieval model, includes: Perform the following training steps: The parameters of the generator network are fixed, the set of unclicked text pairs is used as the input of the generator network, and the unclicked text pairs sampled by the generator network and the set of training text pairs are used as the input of the discriminator network. The discriminator network is trained using machine learning methods. The parameters of the trained discriminator network are fixed, and the set of unclicked text pairs is used as the input of the generator network. The generator network is then trained using reinforcement learning. Determine the accuracy of the discrimination results output by the trained discrimination network; In response to determining that the accuracy is greater than a predetermined threshold, the most recently trained discriminant network is identified as the first information retrieval model.
3. The method according to claim 2, wherein, The method further includes: In response to determining that the accuracy is less than or equal to the predetermined threshold, the training step is re-executed using the most recently trained generator network and discriminator network.
4. The method according to claim 1, wherein, The first information retrieval model includes a pre-determined scoring function.
5. The method according to claim 4, wherein, The scoring function is used to score each text in the text set input to the first information retrieval model or to sort the texts in the text set.
6. The method according to claim 5, wherein, The text set input to the first information retrieval model includes one of the following: a text set of questions and answers, a text set of web searches, and a text set of product recommendations. Specifically, if the text set is the text set of questions and answers, the first information retrieval model is applied as a question-and-answer model; if the text set is the text set of web searches, the first information retrieval model is applied as a web search model; and if the text set is the text set of product recommendations, the first information retrieval model is applied as a product recommendation model.
7. The method according to claim 6, wherein, The question-answering model has a corresponding pre-determined first scoring function, the web search model has a corresponding pre-determined second scoring function, and the product recommendation model has a corresponding pre-determined third scoring function.
8. The method according to claim 1, wherein, The generating network includes a normalized exponential function, and the probability of sampling each unclicked text in the unclicked text set is determined based on the normalized exponential function with a temperature parameter.
9. A method for training an information retrieval model, comprising: Obtain target query information, training text set, and unclicked text set corresponding to the target user. The training text set includes a text set that is related to the target query information and a file set that is not related to the target query information. The unclicked text set is the file set that the target user has not clicked. A pre-established generative adversarial network is obtained, wherein the generative adversarial network includes a generator network and a discriminator network. The generator network is used to sample unclicked text from the unclicked text set that the discriminator network cannot easily identify the correlation and that there is no correlation between them and the target query information. The discriminator network is used to compare the correlation degree of the unclicked text sampled by the generator network with the correlation degree of the training text sampled from the training text set. The unclicked text set is used as the input to the generator network. The unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information are used as the input to the discriminator network. The generator network and the discriminator network are trained. The trained discriminator network is determined as the second information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text sampled by the generator network and the training text sampled from the training text set.
10. The method according to claim 9, wherein, The step of training the generator network and the discriminator network, and determining the trained discriminator network as the second information retrieval model, includes: Perform the following training steps: The parameters of the generator network are fixed, the unclicked text set is used as the input of the generator network, and the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set are used as the input of the discriminator network. The discriminator network is trained using machine learning methods. The parameters of the trained discriminator network are fixed, and the set of unclicked texts is used as the input of the generator network. The generator network is then trained using reinforcement learning. Determine the accuracy of the discrimination results output by the trained discrimination network; In response to determining that the accuracy is greater than a predetermined threshold, the most recently trained discriminant network is identified as the second information retrieval model.
11. The method according to claim 10, wherein, The method further includes: In response to determining that the accuracy is less than or equal to the predetermined threshold, the training step is re-executed using the most recently trained generator network and discriminator network.
12. The method according to claim 9, wherein, The second information retrieval model is used to compare the degree of association between at least two input texts.
13. An information retrieval model training device, comprising: The first acquisition unit is configured to acquire target query information, training text set, and unclicked text set corresponding to the target user. The training text set includes a text set that is related to the target query information and a file set that is not related to the target query information. The unclicked text set is the file set that the target user has not clicked. The combination unit is configured to combine each training text in the training text set and each unclicked text in the unclicked text set with the target query information to generate training text pairs and unclicked text pairs, thereby obtaining a training text pair set and an unclicked text pair set; The second acquisition unit is configured to acquire a pre-established generative adversarial network, wherein the generative adversarial network includes a generator network and a discriminator network. The generator network is used to sample text pairs from the set of unclicked text pairs that the discriminator network cannot easily identify the association relationship and that do not have an association relationship. The discriminator network is used to determine whether the text pairs sampled by the generator network have the association relationship. The training unit is configured to use the set of unclicked text pairs as input to the generator network, and the set of unclicked text pairs sampled by the generator network and the set of training text pairs as input to the discriminator network, to train the generator network and the discriminator network, and to determine the trained discriminator network as the first information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text pairs sampled by the generator network and the set of training text pairs.
14. An information retrieval model training device, comprising: The first acquisition unit is configured to acquire target query information, training text set, and unclicked text set corresponding to the target user. The training text set includes a text set that is related to the target query information and a file set that is not related to the target query information. The unclicked text set is the file set that the target user has not clicked. The second acquisition unit is configured to acquire a pre-established generative adversarial network, wherein the generative adversarial network includes a generator network and a discriminator network. The generator network is used to sample unclicked text from the unclicked text set that the discriminator network cannot easily identify the correlation and that there is no correlation between the unclicked text and the target query information. The discriminator network is used to compare the correlation degree of the unclicked text sampled by the generator network with the correlation degree of the training text sampled from the training text set. The training unit is configured to take the set of unclicked text as input to the generator network, and take the unclicked text sampled by the generator network, the training text sampled from the training text set, and the ordered text set related to the target query information as input to the discriminator network. The generator network and the discriminator network are trained, and the trained discriminator network is determined as the second information retrieval model. During the training process, the discriminator network adds corresponding virtual adversarial perturbations to the unclicked text sampled by the generator network and the training text sampled from the training text set.
15. An electronic device comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 12.
16. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Model training method and device, data retrieval method and device, equipment and storage medium
CN112084150A
Method and device for generating information evaluation model
CN112115257A