Training of object association model
By introducing a weak supervision mechanism into the training of the object association model and using the confidence score difference to train the model, the problems of high labor costs and high labeling difficulty are solved, and efficient and accurate model training is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MICROSOFT TECHNOLOGY LICENSING LLC
- Filing Date
- 2021-06-25
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies require significant manpower and complex dataset labeling when training object association models, resulting in models that cannot meet product requirements.
By acquiring target semantic objects and natural language text sequences, the confidence score differences are determined, and a weakly supervised mechanism is used to train an object association model, reducing the cost and difficulty of labeling training datasets and improving labeling accuracy and efficiency.
It significantly reduces the cost and difficulty of labeling training datasets, and improves labeling accuracy and model performance.
Smart Images

Figure CN115526177B_ABST
Abstract
Description
Background Technology
[0001] In human-computer interaction tasks such as semantic parsing and intelligent question answering, associating textual units in human natural language with semantic objects (e.g., entities, processing operations) stored and recognized by machines is a crucial step. To ensure the rapid and accurate determination of the association between textual units and semantic objects, a corresponding machine learning model, known as an object association model, is typically trained. Model training requires a large training dataset; however, labeling this dataset is labor-intensive and challenging, resulting in models that often fail to meet product requirements. Therefore, a model training solution that relies on minimal human resources is desired. Summary of the Invention
[0002] According to the implementation of this disclosure, a scheme for training an object association model is proposed. In this scheme, a target semantic object and a text sequence of natural language are obtained, the text sequence comprising multiple text units. A first confidence score is determined for the target semantic object being mentioned in the text sequence. A second confidence score is determined for the target semantic object being mentioned in the text sequence when the first text unit is ignored. The object association model is trained based at least on the first confidence difference between the first and second confidence scores, the text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the multiple text units. This significantly reduces the cost and difficulty of labeling training datasets and improves labeling accuracy and efficiency.
[0003] The summary section is provided for the purpose of simplifying the description of the subject matter, which will be further described in the detailed embodiments below. The summary section is not intended to identify key or principal features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. Attached Figure Description
[0004] Figure 1 A block diagram of a computing device capable of implementing multiple implementations of the present disclosure is shown;
[0005] Figure 2A An illustrative system for determining a second association score during model training is shown, according to some implementations of this disclosure;
[0006] Figure 2B An illustrative system for determining a first association score during model training is shown, according to some implementations of this disclosure;
[0007] Figure 3 Flowcharts illustrating the process for training an object association model according to some implementations of this disclosure are shown; and
[0008] Figure 4 A flowchart illustrating an example process for training an object association model according to some implementations of this disclosure is shown.
[0009] In these accompanying figures, the same or similar reference symbols are used to indicate the same or similar elements. Detailed Implementation
[0010] This disclosure will now be discussed with reference to several example implementations. It should be understood that these implementations are discussed only to enable those skilled in the art to better understand and thus implement this disclosure, and not to imply any limitation on the scope of this disclosure.
[0011] As used herein, the term "comprising" and its variations are to be interpreted as open-ended terms meaning "including but not limited to". The term "based on" is to be interpreted as "at least partially based on". The terms "an implementation" and "an implementation" are to be interpreted as "at least one implementation". The term "another implementation" is to be interpreted as "at least one other implementation". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0012] As used in this paper, the term "model" refers to a model that learns the relationship between inputs and outputs from training data, enabling it to generate corresponding outputs for a given input after training. Model generation can be based on machine learning techniques. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs using multiple layers of processing units. A neural network model is an example of a deep learning-based model. In this paper, "model" may also be referred to as a "machine learning model," "learning model," "machine learning network," or "learning network," and these terms are used interchangeably.
[0013] A neural network is a machine learning network based on deep learning. A neural network processes input and provides a corresponding output, typically consisting of an input layer, an output layer, and one or more hidden layers between the input and output layers. Neural networks used in deep learning applications often include many hidden layers, thus increasing the network's depth. The layers of a neural network are connected sequentially, so that the output of the previous layer is provided as the input to the next layer. The input layer receives the input to the neural network, while the output layer's output serves as the final output. Each layer of a neural network includes one or more nodes (also called processing nodes or neurons), each node processing the input from the layer above.
[0014] Machine learning typically comprises three phases: training, testing, and usage (also known as inference). In the training phase, a given model is trained using a large amount of training data, iteratively, until the model can consistently generate inferences that meet the expected goals from the training data. Through training, the model can be considered to have learned the relationship between inputs and outputs (also known as the input-output mapping) from the training data. The parameter values of the trained model are determined. In the testing phase, test inputs are applied to the trained model to test whether it can provide the correct output, thus determining the model's performance. In the usage phase, the model can be used to process actual inputs based on the trained parameter values to determine the corresponding output.
[0015] Figure 1 A block diagram of a computing device 100 capable of implementing multiple implementations of the present disclosure is shown. It should be understood that... Figure 1 The computing device 100 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the implementation described in this disclosure. Figure 1 As shown, computing device 100 includes computing devices in the form of general-purpose computing devices. Components of computing device 100 may include, but are not limited to, one or more processors or processing devices 110, memory 120, storage devices 130, one or more communication units 140, one or more input devices 150, and one or more output devices 160.
[0016] In some implementations, computing device 100 can be implemented as various user terminals or service terminals. Service terminals can be servers, large computing devices, etc., provided by various service providers. User terminals can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, sites, units, devices, multimedia computers, multimedia tablets, internet nodes, communicators, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof. It is also foreseeable that computing device 100 can support any type of user-facing interface (such as "wearable" circuitry).
[0017] Processing device 110 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 120. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of computing device 100. Processing device 110 may include a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor, a controller, and / or a microcontroller, etc.
[0018] Computing device 100 typically includes multiple computer storage media. Such media can be any available media accessible to computing device 100, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 120 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 130 can be removable or non-removable media and may include machine-readable media, such as memory, flash drives, disks, or any other media capable of storing information and / or data and accessible within computing device 100.
[0019] The computing device 100 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 1 As shown, disk drives for reading from or writing to removable, non-volatile disks and optical disc drives for reading from or writing to removable, non-volatile optical discs can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces.
[0020] The communication unit 140 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 100 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 100 can operate in a networked environment using logical connections to one or more other servers, personal computers (PCs), or another general network node.
[0021] Input device 150 can be one or more various input devices, such as a mouse, keyboard, data import device, etc. Output device 160 can be one or more output devices, such as a monitor, data export device, etc. Computing device 100 can also communicate with one or more external devices (not shown) via communication unit 140 as needed. External devices, such as storage devices, display devices, etc., can communicate with one or more devices that enable user interaction with computing device 100, or with any device (e.g., network card, modem, etc.) that enables computing device 100 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interface (not shown).
[0022] In some implementations, in addition to being integrated into a single device, some or all of the components of computing device 100 may be configured in the form of a cloud computing architecture. In a cloud computing architecture, these components can be remotely deployed and can work together to achieve the functionality described herein. In some implementations, cloud computing provides computing, software, data access, and storage services without requiring end users to know the physical location or configuration of the systems or hardware providing these services. In various implementations, cloud computing provides services over a wide area network (such as the Internet) using appropriate protocols. For example, cloud computing providers offer applications over a wide area network, and these applications can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture, along with the corresponding data, may be stored on servers at remote locations. Computing resources in a cloud computing environment may be consolidated at remote data center locations or they may be distributed. Cloud computing infrastructure can provide services through shared data centers, even if they appear as a single access point for users. Therefore, the components and functionality described herein can be provided from service providers at remote locations using a cloud computing architecture. Alternatively, they may be provided from conventional servers, or they may be installed directly or otherwise on client devices.
[0023] Computing device 100 can be used to implement model training in various implementations of this disclosure. Memory 120 may include one or more modules having one or more program instructions that can be accessed and executed by processing unit 110 to implement the functionality of the various implementations described herein. For example, memory 120 may include model training module 122 for performing training operations on an object association model. Computing device 100 can be used to implement model training in various implementations of this disclosure. Figure 1As shown, computing device 100 can receive dataset 170 for model training via input device 150. Computing device 100, such as model training module 122 within computing device 100, can automatically train an object association model using training dataset 170 until the model parameters converge. Computing device 100 can also provide trained model parameters 180.
[0024] Despite Figure 1 In the example, computing device 100 receives training dataset 170 from input device 150 and model parameters 180 are provided by output device 160, but this is merely illustrative and not intended to limit the scope of this disclosure. Computing device 100 may also receive training dataset 170 from other devices (not shown) via communication unit 140, and / or provide model parameters 180 externally via communication unit 140.
[0025] In this paper, an object association model is trained to determine the associations between individual text units in natural language and machine-recognizable semantic objects, in order to provide accurate data for subsequent processing tasks such as semantic parsing. Semantic objects are sometimes also called logical concepts, semantic cognitions, or semantic ideas. The association between text units and semantic objects is also known as text unit-to-semantic object grounding.
[0026] During model training, the model training module 122 can receive a training dataset 170 for training the object association model via the input device 150. The training dataset 170 may be user-annotated and input by the user, or obtained or received from other sources such as public datasets. The model training module 122 is configured to train the model based on the training dataset 170 and output the current model parameters as output 180 when the model parameters converge or when the number of iterations of model training exceeds a threshold number. Output 180 may optionally be output via output device 160 for subsequent model testing and application. Embodiments of this disclosure are not limited in this respect.
[0027] It should be understood that Figure 1 The components and arrangements of the computing device shown are merely examples, and a computing device suitable for implementing the example implementations described in this disclosure may include one or more different components, other components, and / or different arrangements. Figure 1 The input training dataset and output to the model parameters shown are merely examples.
[0028] For semantic parsing, traditional methods can rely on rule-based heuristic algorithms. This requires manually configuring high-quality dictionaries and manually writing rules, resulting in inflexible parsing and high human resource costs. Alternatively, as mentioned above, traditional semantic parsing can train models using training datasets; however, dataset labeling is difficult, again leading to high human resource costs.
[0029] As mentioned above, when performing semantic parsing, intelligent question answering, and other operations, it is usually necessary to determine the relationship between text units in human natural language and machine-recognizable semantic objects stored in the machine. In this paper, text units in natural language can refer to text units in natural language text input by the user, such as words (in Latin-based languages such as English) or phrases (in Eastern languages such as Chinese). Semantic objects can depend on the specific association task. For example, in a query task related to a data table, it is desirable to determine whether text units in a natural language query statement correspond to various elements in a stored data table. In such a task, semantic objects can typically include elements in a structured data table stored in computing device 110, such as headers, cell values, aggregation functions, symbols, etc., and the processing operations to be performed on these elements, such as summation, averaging, filtering, etc. As another example, in a knowledge base-related task, it is desirable to determine whether text units in a natural language statement correspond to entities in a knowledge base. In this case, semantic objects can include entities in a knowledge base maintained by computing device 110.
[0030] As an example, in a scenario where the answer to a user's question is determined based on information from a structured data table, the text sequence of the user's input question is "How Many total games were at Braly stadium?", while the semantic objects present in the structured table are "sum" (addition symbol) and "venue" (venue). Therefore, it is necessary to at least determine the association between the text unit "total" and the semantic object "sum", and between the text unit "stadium" and the semantic object "venue".
[0031] It should be understood that the above are merely some examples of associations between text units and semantic objects. In other tasks, any other semantic objects may be defined as needed. The implementation of this disclosure is not limited in this respect.
[0032] Traditional object association model training methods typically involve manually determining which text unit in the training data's text sequence is associated with which semantic object, and then labeling the association results. Since the text sequences and semantic objects used in the training dataset are far more complex than in the example above, the human cost required for manual labeling of training data is considerable, and data labeling errors are possible.
[0033] According to the implementation of this disclosure, a scheme for training an object association model is proposed. In this scheme, a target semantic object and a text sequence of natural language are obtained, the text sequence comprising multiple text units. A first confidence score is determined for the target semantic object being mentioned in the text sequence. A second confidence score is determined for the target semantic object being mentioned in the text sequence when the first text unit is ignored. The object association model is trained based at least on the first confidence difference between the first and second confidence scores, the text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the multiple text units. According to the above scheme, only the labeling of whether a semantic object is mentioned in the corresponding text sequence is needed as supervision information for model information, which significantly reduces the cost and difficulty of labeling the training dataset and improves labeling accuracy and efficiency. Furthermore, training the model based on such supervision information can also improve the performance of the trained object association model.
[0034] Some example implementations of this disclosure will be described in more detail below with reference to the accompanying drawings.
[0035] As briefly described above, to alleviate the problem of large dataset annotation workload caused by traditional strongly supervised model training methods, this disclosure introduces a weak supervision mechanism to train object association models. To introduce the weak supervision mechanism, an object prediction model needs to be pre-trained to predict whether a specific semantic object is mentioned in a text sequence. The text sequence used for training is known as x = {x1, x2, ..., x...}. N} and the semantic object set C = {c1, c2, ..., c K} Where N represents the number of text units in the text sequence, and K represents the number of semantic objects in the semantic object set. Given x and C, the goal of the object prediction model is to identify semantic objects c in the semantic object set. k Whether it is mentioned in text sequence x.
[0036] To train an object prediction model, some implementations can automatically acquire or manually annotate semantic objects c from a set of semantic objects. k Supervision information kIt should be understood that since this supervision information only concerns whether a semantic object is mentioned in the text sequence, it significantly reduces the difficulty of annotation. Furthermore, the ability to automatically obtain supervision information in some downstream tasks greatly reduces the cost of preparing training data during model training, lowers the cost of manual annotation, and reduces potential errors introduced by manual annotation, making the supervision information more accurate.
[0037] In some implementations, annotation information can be automatically retrieved from SQL database queries. Taking text-SQL as an example, if a database-related semantic object in the SQL is considered to be mentioned in the sequence of user-input question text, the supervision information is... k =1; If a semantic object in the database in the SQL is considered not mentioned in the question text, the supervision information l k =0. From the SQL query statement transformed from the question text sequence, it is possible to determine which semantic objects are mentioned and which are not mentioned, thereby obtaining the corresponding supervision information. Table 1 below shows several examples of automatically obtaining annotation information based on SQL query statements.
[0038] Table 1
[0039]
[0040] In Table 1, when the question text sequence is “Show name1,country2,age3 for all singers4ordered by age3 from the oldest3 to the youngest.”, the corresponding SQL query statement “SELECT name1,country2,age3 FROM singer4ORDER BY age3 DESC” can be automatically retrieved from the historical query information of the SQL database. (Note that the numbers 1, 2, 3, 4, etc., in the question text sequence and SQL query statement in Table 1 are only used to indicate the text units and their corresponding semantic objects in the SQL database, not the content of the text sequence and SQL query statement). Since the SQL query statement includes the semantic objects “name”, “country”, “age”, and “singer”, this means that these semantic objects are all mentioned in the question text sequence. Accordingly, the supervision information for these semantic objects can be automatically determined. k =1. As for other semantic objects that may exist in the SQL database, such as other tables and column names, since these semantic objects are not mentioned in the aforementioned question text sequence, the supervision information for these semantic objects can be automatically determined. k =0.
[0041] Similarly, in Table 1, when another question text sequence is "Where1 is the youngest2 teacher3 from?", the corresponding SQL query statement "SELECT hometown1 FROM teacher3 ORDER BY age2 ASC LIMIT 1" can be automatically retrieved from the historical query information of the SQL database. Since the SQL query statement includes the semantic objects "hometown", "age", and "teacher", this means that these semantic objects are all mentioned in the question text sequence. Accordingly, supervision information for these semantic objects can be automatically determined. k =1. As for other semantic objects that may exist in the SQL database, since these semantic objects are not mentioned in the aforementioned question text sequence, the supervision information for these semantic objects can be automatically determined. k =0.
[0042] Similarly, in Table 1, based on another question text sequence, "For each semester, what is the name and id of the one with the most students registered?" and the corresponding SQL query, "SELECT semester name, semester id FROM semesters1 JOIN student enrolment ON semesters.semester id = student enrolment.semester id GROUP BY semester id3 ORDER BY COUNT(*) DESC LIMIT 1", it can be similarly determined that the semantic objects "semesters", "semester name", "semester id", and "student enrolment" are all mentioned in the aforementioned question text sequence. Therefore, the corresponding supervisory information can be automatically determined. k =1, and can also determine supervision information l for other semantic objects. k =0.
[0043] The above methods can automatically collect text sequences, semantic objects, and supervision information for semantic objects.
[0044] Once sufficient text sequences, semantic objects, and corresponding supervision information have been collected, the object prediction model can be trained to perform operations such as binary classification (mentioned or not mentioned) on the feature representation of each semantic object. Specifically, the object prediction model can output a confidence score for each semantic object being mentioned in the input text sequence. The text sequence and the set of semantic objects can both be sequentially input into a pre-trained language model (PLM) to obtain the text feature representation of each text unit and the object feature representation of each semantic object.
[0045] Assuming to use <q1,q2,...,q N > represents the text sequence x = {x1, x2, ..., x} N The text features of} are represented by, using <e1,e2,...,e K > represents a set of semantic objects C = {c1, c2, ..., c...} K If the object features are represented by}, then the extraction of feature representations by the pre-trained language model can be represented as:
[0046]
[0047] Based on feature representation, the probability of a semantic object being mentioned in a text sequence by an object prediction model can be represented as follows:
[0048] p k =Sigmoid(W l e k (1)
[0049] Where p k Represents semantic object c k The probability of being mentioned in a text sequence (referred to as the confidence score in this paper), W l These are the model parameters of the object prediction model, whose values are learned through the training process, and e k It is a semantic object c k The object feature representation. Since the text sequence and the semantic object are input together into the pre-trained language model, the output object feature representation can characterize the characteristics of the semantic object relative to the text sequence. Therefore, based on this object feature representation, it can be determined whether the semantic object is mentioned in the text sequence.
[0050] Because of sufficient supervised information, the training process of the object prediction model is simple, and the cost of labeling datasets is low. After training a high-performance object prediction model, the object association model can be trained. Based on the object prediction model, the object association model can be trained. This disclosure proposes to train the object association model by deleting text units one by one from the text sequence used to train the object association model, and observing the difference in confidence scores given by the object prediction model before and after deletion. Thus, the object prediction model can be trained by providing only weak supervised information on whether semantic objects are mentioned in the text sequence, without needing specific association details between each text unit and each semantic object.
[0051] Figure 2A and Figure 2B This demonstrates part of the process of training an object association model in a weakly supervised manner using an object prediction model. Figure 2A An illustrative system 200 for determining association scores during model training, according to some implementations of this disclosure, is shown. For example... Figure 2A As shown, sequence 210, used as training data, is input into object association model 220. Sequence 210 includes a start character “[CLS]”, text sequence 211, delimiter “[SEP]”, and semantic object 212. Text sequence 211 contains several text units, such as the text units “How”, “many”, “total”, “games”, “were”, “at”, “braly”, and “stadium”. Semantic object 212 can be a collection of semantic objects containing multiple semantic objects. To clearly describe the embodiment, Figure 2A The example shown only illustrates the case with a single semantic object, "Venue". In other examples, depending on the set of semantic objects of interest, multiple semantic objects may exist, separated by the delimiter "[SEP]". It should be understood that the input sequences given herein are merely examples and are not intended to limit the scope of this disclosure.
[0052] When training the object association model 220, it is still assumed that the text sequence used for training is represented as x = {x1, x2, ..., x}. N The semantic object set is represented as C = {c1, c2, ..., c}. K The task of object association model 220 is to find the association relationship between each text unit in the text sequence and each semantic object in the semantic object set. Therefore, an N×K matrix is generated as the model output during the association process. Each element in this matrix indicates the association score between a text unit and a semantic object. Since... Figure 2AIf there is only one semantic object, i.e., K=1, then the object association model 240 can output N association scores (since the text sequence 211 includes 8 text units, N equals 8 in this example). It should be understood that in... Figure 2A In the text sequence 211, the association scores G1, ..., G8 are the association scores between the corresponding text units "How", "many", "total", "games", "were", "at", "braly", "stadium" and the semantic object "Venue" 212.
[0053] like Figure 2A As shown, the object association model 220 includes a pre-trained language model 230 and an association model 240. When sequence 210 is input into object association model 220, the pre-trained language model 230 in object association model 220 can be configured to extract text feature representations of each of the multiple text units “How”, “many”, “total”, “games”, “were”, “at”, “braly”, and “stadium” in text sequence 211, and object feature representations of the semantic object “Venue” 212. It should be understood that the pre-trained language model 230 has self-supervised learning capabilities; therefore, the pre-trained language model 230 and the association model 240 can determine the association score between each text unit in text sequence 21 and the semantic object 212. The association score can be represented, for example, as follows:
[0054]
[0055] Where We and Wq are both learnable parameters, and d is the semantic object c. k Object feature representation e k The dimension of . Furthermore, in some examples, the association score can be normalized as follows:
[0056]
[0057] To better supervise the association scores, this disclosure also utilizes the pre-trained object prediction model 250 described above to provide weak supervision information. For example... Figure 2AAs shown, the object prediction model 250 obtains multiple text feature representations of multiple text units "How", "many", "total", "games", "were", "at", "braly", and "stadium" in the text sequence 211, and the object feature representation of the semantic object "Venue" 212 from the pre-trained language model 230. Based on the object feature representation, the object prediction model 250 can determine the confidence score P1 of the semantic object 212 being mentioned in the text sequence 211. The processing in the object prediction model 250 is as shown in Equation (1) above. Since the text sequence 211 and the semantic object 212 are input together into the pre-trained language model 230, the output object feature representation can characterize the characteristics of the semantic object 212 relative to the text sequence 211. Therefore, based on this object feature representation, it can be determined whether the semantic object 212 is mentioned in the text sequence 211.
[0058] Next, the text units in text sequence 211 will be ignored (i.e., deleted) one by one, thus forming a new text sequence. Since the only difference between the new text sequence and the original text sequence 211 is the ignored text units, by comparing the probability of semantic object 212 being mentioned in the new text sequence with the probability of text sequence 211 being mentioned in the new text sequence, it can usually be determined that the ignored text units in the new text sequence with the larger probability change are most likely associated with semantic object 212.
[0059] Figure 2B An example is shown after deleting a text unit during model training. For example... Figure 2B As shown, sequence 210', used as training data, is input into object association model 220. Sequence 210' contains a start symbol "[CLS]", a new text sequence 211', a separator "[SEP]", and a semantic object 212. It should be understood that the "stadium" element, which was originally present in text sequence 211, is omitted in the new text sequence 211'; in other words, the new text sequence 211' is obtained by deleting the text unit "stadium" from text sequence 211. In some implementations, "stadium" can be replaced with a predefined text symbol (e.g., "[UNK]") 213 to form the new text sequence 211'. In this case, as... Figure 2B As shown, the text units in the new text sequence 211' contain "How", "many", "total", "games", "were", "at", "braly", and "[UNK]". It should be understood that the above encoding method is merely an example and is not intended to limit the scope of this disclosure. Other encoding methods can be used to implement the above operations.
[0060] To predict whether semantic object 212 is mentioned in the new text sequence 211', the pre-trained language model 230 extracts the text feature representations of multiple text units "How", "many", "total", "games", "were", "at", "braly", and "[UNK]" in the text sequence 211', as well as the object feature representation of semantic object "Venue" 212. Based on the extracted object feature representations, the object prediction model 250 can determine the confidence score P2 of semantic object "Venue" 212 being mentioned in text sequence 211'. The processing in the object prediction model 250 is as shown in Equation (1) above. Since the text unit "stadium" is ignored, the pre-trained language model 230 does not focus on the features of this text unit, so that the extracted object feature representation of semantic object "Venue" can reflect the characteristics of semantic object "Venue" relative to text sequence 211' when the text unit "stadium" is ignored.
[0061] Therefore, by calculating the difference between P1 and P2, the confidence difference Δ8 can be determined when the text unit "stadium" is ignored. Similarly, the confidence differences Δ1, ..., Δ7 for other text units in text sequence 211 can also be determined, such as... Figure 2B As shown, the confidence difference sequence consisting of confidence differences Δ1, ..., Δ8 can be used to train the supervised object association model 220.
[0062] In some implementations, if multiple semantic objects exist, the confidence difference sequence can be determined for each semantic object in a similar manner. Generally, for a text sequence x = {x1, x2, ..., x...} N} and the semantic object set C = {c1, c2, ..., c K} can determine the confidence level difference sequence.
[0063] The confidence difference determined for each text unit can be used to determine the likelihood that the text unit is associated with a semantic object, also known as an association score. For example, for a given text unit, a larger confidence difference means that the probability of the semantic object being mentioned in the text sequence is significantly reduced if that text unit is ignored, thus indicating a higher likelihood that the text unit is associated with a semantic object. Figure 2BIn the example shown, since the text unit "stadium" is associated with the semantic object "Venue", the probability that the semantic object "Venue" is mentioned in the text sequence 211 containing the text unit "stadium" should be significantly greater than the probability that the semantic object "Venue" is mentioned in the new text sequence 211' ignoring the text unit "stadium". In some implementations, the greater the difference in confidence between a text unit and a semantic object, the higher the probability that the text unit is associated with the semantic object, i.e., the higher the association score. Conversely, the smaller the association score, the lower the probability.
[0064] In some implementations, when training the object association model 220, additional weak supervision information can also be obtained for the text sequence 210 to indicate whether each semantic object in the semantic object set is mentioned in the text sequence 210. For example, if semantic object c k When mentioned in a text sequence, supervisory information can be represented as l k =1; if semantic object c k If not mentioned in the text sequence, the supervisory information can be represented as l k =0. Similar to the supervision information used in training the object prediction model 250, the aforementioned supervision information can be obtained automatically from downstream task data or through manual annotation. The supervision information can be used to further modify the confidence difference given by the object prediction model, thereby modifying the association score between text units and semantic objects.
[0065] Based on additional supervisory information, the confidence difference can be represented as follows:
[0066]
[0067] Where Δ n,k This indicates that the text unit x is being referred to. n and semantic object c k Defined confidence level difference, l k It refers to semantic object c in the semantic object collection. k Additional supervision information (e.g., l) k =0 or 1); p k Indicated in semantic object c k Confidence score of mentions in the complete text sequence Represents semantic object c k After deleting text unit x n The confidence score of the text mentioned in the subsequent text sequence.
[0068] According to equation (4), if l k =0, meaning the supervisory information indicates the semantic object c. kIf it is not mentioned in the text sequence, then Δ n,k It is determined to be 0. In the above equation (4), the max function can also be used to identify possible erroneous results, while only those in p are retained. k Greater than The difference in confidence levels under different circumstances is because, theoretically, the confidence score given by the object prediction model 250 after deleting a certain text unit will be different. It will decrease.
[0069] In some implementations, the above equation (4) is transmitted via the supervisory information l k Adjusted confidence level difference Δ n,k It can be determined for text unit x n The association score is determined by the object prediction model 250. In some implementations, the association score determined based on confidence differences can be used as weight information to influence the training of the object association model 220. Therefore, the training objective function of the object association model 220 can be constructed using the association score determined by confidence differences and the association score determined by the object association model 220. The training objective function can be based, for example, on a combined score of the two types of association scores, which can be represented as follows:
[0070]
[0071] Where Δ n,k This indicates that the text unit x is being referred to. n and semantic object c k The determined confidence level difference (i.e., the text unit x given by the object prediction model 250) n With semantic object c k (correlation score), α n,k This represents the association score between the text unit xn and the semantic object ck, as determined by the object association model 220.
[0072] In equation (5) above, Δ n,k This can be considered as an application to the association score α directly determined by the object association model 220. n,k The weights. The training objective of object association model 220 is to make Δ n,k and α n,k The weights and increases can be used, for example, to maximize or increase the above equation (5) to the convergence target. During the training process, the object association model 220 can be trained iteratively according to the above training objective function. For example, if the combined score determined based on the training objective function decreases in one iteration, the parameters in the training objective function need to be adjusted "punishly" until the combined score determined based on the training objective function is maximized, thereby realizing the training process of the object association model 220.
[0073] It should be understood that Figure 2A and Figure 2B The text sequences and semantic objects given are merely specific examples for illustrative purposes; any other text sequences and semantic objects are acceptable. During the training of the object association model, in order to achieve convergence, a certain number of text sequences will be collected as training data and trained on a specific set of semantic objects. These are well known to those skilled in the art and will not be elaborated upon here.
[0074] According to the implementation of this disclosure, an object prediction model can be trained based on weakly supervised information indicating the presence of semantic objects in text training. This model can then be used to assist in training a desired object association model, thus avoiding the need for precise supervisory information regarding the relationships between individual text units and semantic objects, which is required for directly training the object association model. Consequently, the cost of labeling training data can be reduced, and the performance of the trained object association model can be improved.
[0075] Figure 3 A flowchart of a process 300 for training an object association model according to some implementations of this disclosure is shown. Process 300 can be implemented at computing device 100, for example at model training module 122, to determine model parameters 180 based on a weakly supervised training dataset 170. For ease of discussion, reference will be made to… Figure 2A and Figure 2B Let's describe the process 300.
[0076] In box 310, computing device 100 can acquire a target semantic object and a first text sequence of natural language. The first text sequence includes multiple text units.
[0077] exist Figure 2A In the example, the first text sequence 211 may include the text units “How”, “many”, “total”, “games”, “were”, “at”, “braly”, and “stadium”, and the semantic object 212 of the example may include “Venue”. It should be understood that... Figure 2A The text units and semantic objects described herein are exemplary. Text units can be words from any human language (such as Latin-based languages like English) or phrases (such as Eastern languages like Chinese). Semantic objects 212 can be any machine-recognizable data associated with natural language, or they can be entities in a knowledge base maintained by computing device 110, or elements in a structured table stored in computing device 110, such as headers, cell values, aggregation functions, symbols, etc.
[0078] In box 320, computing device 100 can use an object prediction model to determine a first confidence score of the target semantic object being mentioned in the first text sequence.
[0079] In some example implementations, to determine the first confidence score, computing device 100 may utilize a pre-trained language model (PLM) 230 to extract multiple textual feature representations of the text units “How,” “many,” “total,” “games,” “were,” “at,” “braly,” and “stadium,” as well as object feature representations of the semantic objects. The PLM is included in the object association model 220. Furthermore, computing device 100 may utilize an object prediction model 240 to determine the first confidence score based on the object feature representations.
[0080] In box 330, computing device 100 can determine a second confidence score of the target semantic object being mentioned in the first text sequence if the first text unit in the first text sequence is ignored.
[0081] For example, in Figure 2B In the example, to determine the second confidence score for the text unit "stadium", the text unit "stadium" can be replaced with a predetermined text symbol "[UNK]", and multiple text units other than the text unit "stadium", such as "How", "many", "total", "games", "were", "at", "braly", the predetermined text symbol "[UNK]", and semantic object 212, are input into the pre-trained language model 230 to extract the corresponding feature representations. The extracted object feature representation of semantic object 212 is then input into the object prediction model 210 to determine the second confidence score of the target semantic object mentioned in the text sequence 211' where the text unit "stadium" is ignored.
[0082] In box 340, computing device 100 can train an object association model based at least on a first confidence difference between a first confidence score and a second confidence score, a first text sequence, and a target semantic object. The object association model is configured to determine whether the target semantic object is associated with one of a plurality of text units in the first text sequence.
[0083] In some example implementations, computing device 100 can utilize a trained object prediction model to determine a first confidence score and a second confidence score, respectively. Computing device 100 can also acquire training data for the object prediction model and train the object prediction model based on the training data. As an example, the training data includes a second text sequence, semantic objects, and supervision information for the semantic objects, whereby the supervision information indicates whether the semantic objects are mentioned in the second text sequence. The text sequence, semantic objects, and supervision information used to train the object prediction model may be the same as or different from the text sequence, semantic objects, and supervision information used to train the object association model.
[0084] To illustrate the training process of the object association model in more detail, please refer to... Figure 4 This section discusses example training methods for object association models. Figure 4 A flowchart of an example process 400 for training an object association model according to some implementations of this disclosure is shown. Process 400 can be implemented at computing device 100, such as at model training module 122, to determine model parameters 180 based on a weakly supervised training dataset 170. For ease of discussion, reference will be made to... Figure 2A and Figure 2B Let's describe process 400.
[0085] In box 410, computing device 100 determines a first association score for a first text unit (e.g., “stadium”) based on a first confidence difference. The first association score indicates the likelihood that a target semantic object (e.g., semantic object 212 “Venue”) is associated with a text unit (e.g., “stadium”).
[0086] In some example implementations, to determine the first association score, computing device 100 may first acquire supervision information for the target semantic object. The supervision information for the target semantic object is used to indicate whether the target semantic object is mentioned in the first text sequence; for example, it could be obtained from downstream task data or manually annotated semantic objects c from a set of semantic objects. k Additional supervisory data k , l k It can be labeled as 0 or 1 to indicate whether the semantic object is mentioned or not. The computing device 100 can make the determination. If the supervision information for the target semantic object indicates that the semantic object is mentioned in the first text sequence, a first association score can be calculated based on the first confidence difference. Furthermore, if the supervision information for the target semantic object indicates that the semantic object is not mentioned in the first text sequence, a first association score can be determined to indicate that the semantic object is not associated with the first text unit. For example, the association score based on the confidence difference can be determined by the above equation (4).
[0087] In box 420, computing device 100 uses an object association model to determine a second association score for the first text unit based on a first text sequence (e.g., a text sequence 211 including all text units “How”, “many”, “total”, “games”, “were”, “at”, “braly”, “stadium”) and a target semantic object (e.g., “Venue”). This second association score indicates the likelihood that the target semantic object is associated with the first text unit.
[0088] In box 430, computing device 100 constructs a training objective function for the object association model based on a first association score and a second association score, the training objective function being based on an increase in the combined score of the first and second association scores. In box 440, computing device 100 updates the parameter values of the object association model based on the training objective function.
[0089] It should be understood that computing device 100 needs to iteratively determine the association result between the target semantic object and each text unit. As an example, computing device 100 may be further configured to determine another text unit in the first text sequence (e.g., in...). Figure 2A The target semantic object is mentioned in the updated first text sequence with a third confidence score when the text unit "braly" in the Chinese text sequence 211 is ignored, and the object association model is also trained based on the second confidence difference between the first confidence score and the third confidence score.
[0090] In some example implementations, computing device 100 can determine the association score for training a second text unit in a similar manner to the first text unit. Specifically, computing device 100 can determine a third association score for another text unit (e.g., “braly”) based on a second confidence difference, the third association score indicating the likelihood that the target semantic object is associated with the other text unit. Computing device 100 can utilize the object association model to determine a fourth association score for another text unit based on a first text sequence including all text units and the semantic object, the fourth association score indicating the likelihood that the target semantic object is associated with the other text unit. Computing device 100 can continue to construct a training objective function for object association model 220 based on the third and fourth association scores, the training objective function being configured to be based on the increase of the combined score of the third and fourth association scores. Furthermore, computing device 100 can update the parameter values of object association model 220 based on the training objective function.
[0091] The following are some example implementations of this disclosure.
[0092] In one aspect, this disclosure provides a computer-implemented method. The method includes: acquiring a target semantic object and a first text sequence of natural language, the first text sequence comprising a plurality of text units; determining a first confidence score for the target semantic object being mentioned in the first text sequence; determining a second confidence score for the target semantic object being mentioned in the first text sequence when the first text units in the first text sequence are ignored; and training an object association model based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
[0093] In some example implementations, a trained object prediction model is used to determine the first confidence score and the second confidence score, respectively. The method further includes: acquiring training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, the supervision information for the semantic object indicating whether the semantic object is mentioned in the second text sequence; and training the object prediction model based on the training data.
[0094] In some example implementations, training the object association model includes: determining a first association score for the first text unit based on the first confidence difference, the first association score indicating the probability that the target semantic object is associated with the first text unit; using the object association model, determining a second association score for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the probability that the target semantic object is associated with the first text unit; constructing a training objective function for the object association model based on the first association score and the second association score, the training objective function being based on an increase in the combined score of the first association score and the second association score; and updating the parameter values of the object association model based on the training objective function.
[0095] In some example implementations, determining the first association score includes: obtaining supervision information for the target semantic object, the supervision information indicating whether the target semantic object is mentioned in the first text sequence; if the supervision information indicates that the target semantic object is mentioned in the first text sequence, calculating the first association score based on the first confidence difference; and if the supervision information indicates that the target semantic object is not mentioned in the first text sequence, determining the first association score to indicate that the target semantic object is not associated with the first text unit.
[0096] In some example implementations, training the object association model includes: determining a third confidence score of the target semantic object being mentioned in the first text sequence when a second text unit in the first text sequence is ignored; and further training the object association model based on a second confidence difference between the first confidence score and the third confidence score.
[0097] In some example implementations, training the object association model based on the second confidence difference further includes: determining a third association score for the second text unit based on the second confidence difference, the third association score indicating the probability that the target semantic object is associated with the second text unit; using the object association model, determining a fourth association score for the second text unit based on the first text sequence and the target semantic object, the fourth association score indicating the probability that the target semantic object is associated with the second text unit; constructing a training objective function for the object association model based on the third and fourth association scores, the training objective function being based on an increase in the combined score of the third and fourth association scores; and updating the parameter values of the object association model based on the training objective function.
[0098] In some example implementations, determining the second confidence score includes: replacing the first text unit with a predetermined text symbol; and determining the second confidence score based on the other text units besides the first text unit, the predetermined text symbol, and the target semantic object.
[0099] In some example implementations, determining the first confidence score includes: using a pre-trained language model (PLM) to extract multiple text feature representations of the plurality of text units and a first object feature representation of the target semantic object, the PLM being included in the object association model; and determining the first confidence score based on the first object feature representation, wherein determining the second confidence score includes: using the PLM to extract text feature representations of other text units among the plurality of text units besides the first text unit and a second object feature representation of the target semantic object; and determining the second confidence score based on the second object feature representation.
[0100] In another aspect, this disclosure provides an electronic device. The electronic device includes: a processor; and a memory coupled to the processor and containing instructions stored thereon, the instructions, when executed by the processor, causing the device to perform the following actions: acquiring a target semantic object and a text sequence of natural language, the first text sequence comprising a plurality of text units; determining a first confidence score for the target semantic object being mentioned in the first text sequence; determining a second confidence score for the target semantic object being mentioned in the first text sequence when the first text unit in the first text sequence is ignored; and training an object association model based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
[0101] In some example implementations, a trained object prediction model is used to determine the first confidence score and the second confidence score, respectively. The action further includes: acquiring training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, the supervision information for the semantic object indicating whether the semantic object is mentioned in the second text sequence; and training the object prediction model based on the training data.
[0102] In some example implementations, training the object association model includes: determining a first association score for the first text unit based on the first confidence difference, the first association score indicating the probability that the target semantic object is associated with the first text unit; using the object association model, determining a second association score for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the probability that the target semantic object is associated with the first text unit; constructing a training objective function for the object association model based on the first association score and the second association score, the training objective function being based on an increase in the combined score of the first association score and the second association score; and updating the parameter values of the object association model based on the training objective function.
[0103] In some example implementations, determining the first association score includes: obtaining supervision information for the target semantic object, the supervision information indicating whether the target semantic object is mentioned in the first text sequence; if the supervision information for the target semantic object indicates that the target semantic object is mentioned in the first text sequence, calculating the first association score based on the first confidence difference; and if the supervision information for the target semantic object indicates that the target semantic object is not mentioned in the first text sequence, determining the first association score to indicate that the target semantic object is not associated with the first text unit.
[0104] In some example implementations, training the object association model includes: determining a third confidence score of the target semantic object being mentioned in the first text sequence when a second text unit in the first text sequence is ignored; and further training the object association model based on a second confidence difference between the first confidence score and the third confidence score.
[0105] In some example implementations, training the object association model based on the second confidence difference further includes: determining a third association score for the second text unit based on the second confidence difference, the third association score indicating the probability that the target semantic object is associated with the second text unit; using the object association model, determining a fourth association score for the second text unit based on the first text sequence and the target semantic object, the fourth association score indicating the probability that the target semantic object is associated with the second text unit; constructing a training objective function for the object association model based on the third and fourth association scores, the training objective function being based on an increase in the combined score of the third and fourth association scores; and updating the parameter values of the object association model based on the training objective function.
[0106] In some example implementations, determining the second confidence score includes: replacing the first text unit with a predetermined text symbol; and determining the second confidence score based on the other text units besides the first text unit, the predetermined text symbol, and the target semantic object.
[0107] In some example implementations, determining the first confidence score includes: using a pre-trained language model (PLM) to extract multiple text feature representations of the plurality of text units and an object feature representation of the target semantic object, the PLM being included in the object association model; and determining the first confidence score based on the first object feature representation, wherein determining the second confidence score includes: using the PLM to extract text feature representations of other text units among the plurality of text units besides the first text unit and a second object feature representation of the target semantic object; and determining the second confidence score based on the second object feature representation.
[0108] In another aspect, this disclosure provides a computer program product tangibly stored in a computer storage medium and including computer-executable instructions, which, when executed by a device, cause the device to perform the following actions: acquiring a target semantic object and a first text sequence of natural language, the first text sequence comprising a plurality of text units; determining a first confidence score in which the target semantic object is mentioned in the first text sequence; determining a second confidence score in which the target semantic object is mentioned in the first text sequence when the first text unit in the first text sequence is ignored; and training an object association model based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
[0109] In some example implementations, a trained object prediction model is used to determine the first confidence score and the second confidence score, respectively. The action further includes: acquiring training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, the supervision information for the semantic object indicating whether the semantic object is mentioned in the second text sequence; and training the object prediction model based on the training data.
[0110] In some example implementations, training the object association model includes: determining a first association score for the first text unit based on the first confidence difference, the first association score indicating the probability that the target semantic object is associated with the first text unit; using the object association model, determining a second association score for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the probability that the target semantic object is associated with the first text unit; constructing a training objective function for the object association model based on the first association score and the second association score, the training objective function being based on an increase in the combined score of the first association score and the second association score; and updating the parameter values of the object association model based on the training objective function.
[0111] In some example implementations, determining the first association score includes: obtaining supervision information for the target semantic object, the supervision information indicating whether the target semantic object is mentioned in the first text sequence; if the supervision information indicates that the target semantic object is mentioned in the first text sequence, calculating the first association score based on the first confidence difference; and if the supervision information indicates that the target semantic object is not mentioned in the first text sequence, determining the first association score to indicate that the target semantic object is not associated with the first text unit.
[0112] In some example implementations, training the object association model includes: determining a third confidence score in which the target semantic object is mentioned in the text sequence when a second text unit in the first text sequence is ignored; and further training the object association model based on a second confidence difference between the first confidence score and the third confidence score.
[0113] In some example implementations, training the object association model based on the second confidence difference further includes: determining a third association score for the second text unit based on the second confidence difference, the third association score indicating the probability that the target semantic object is associated with the second text unit; using the object association model, determining a fourth association score for the second text unit based on the text sequence and the target semantic object, the fourth association score indicating the probability that the target semantic object is associated with the second text unit; constructing a training objective function for the object association model based on the third and fourth association scores, the training objective function being based on an increase in the combined score of the third and fourth association scores; and updating the parameter values of the object association model based on the training objective function.
[0114] In some example implementations, determining the second confidence score includes: replacing the first text unit with a predetermined text symbol; and determining the second confidence score based on the other text units besides the first text unit, the predetermined text symbol, and the target semantic object.
[0115] In some example implementations, determining the first confidence score includes: using a pre-trained language model (PLM) to extract multiple text feature representations of the plurality of text units and a first object feature representation of the target semantic object, the PLM being included in the object association model; and determining the first confidence score based on the first object feature representation, wherein determining the second confidence score includes: using the PLM to extract text feature representations of other text units among the plurality of text units besides the first text unit and a second object feature representation of the target semantic object; and determining the second confidence score based on the second object feature representation.
[0116] In another aspect, this disclosure provides a computer-readable medium having computer-executable instructions stored thereon, which, when executed by a device, cause the device to perform the methods described above.
[0117] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, example types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Load Programmable Logic Devices (CPLDs), and so on.
[0118] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of a single implementation may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0121] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A computer-implemented method, comprising: Obtain a target semantic object and a first text sequence of natural language, wherein the first text sequence comprises multiple text units; Determine the first confidence score of the target semantic object being mentioned in the first text sequence; Determine a second confidence score for the target semantic object being mentioned in the first text sequence when the first text unit in the first text sequence is ignored; as well as An object association model is trained based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
2. The method according to claim 1, wherein a trained object prediction model is used to determine the first confidence score and the second confidence score respectively, the method further comprising: Acquire training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, wherein the supervision information for the semantic object indicates whether the semantic object is mentioned in the second text sequence; as well as The object prediction model is trained based on the training data.
3. The method according to claim 1, wherein training the object association model comprises: Based on the first confidence difference, a first association score is determined for the first text unit, the first association score indicating the likelihood that the target semantic object is associated with the first text unit; Using the object association model, a second association score is determined for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the likelihood that the target semantic object is associated with the first text unit; A training objective function for the object association model is constructed based on the first association score and the second association score, wherein the training objective function is based on the increase of the combined score of the first association score and the second association score; as well as The parameter values of the object association model are updated based on the training objective function.
4. The method of claim 3, wherein determining the first association score comprises: Obtain supervisory information for the target semantic object, wherein the supervisory information for the target semantic object indicates whether the target semantic object is mentioned in the first text sequence; If the supervision information for the target semantic object indicates that the target semantic object is mentioned in the first text sequence, the first association score is calculated based on the first confidence difference; as well as If the supervision information for the target semantic object indicates that the target semantic object is not mentioned in the first text sequence, the first association score is determined to indicate that the target semantic object is not associated with the first text unit.
5. The method according to claim 1, wherein training the object association model comprises: A third confidence score is determined when the target semantic object is mentioned in the first text sequence, provided that the second text unit in the first text sequence is ignored; as well as The object association model is also trained based on a second confidence difference between the first confidence score and the third confidence score.
6. The method of claim 5, wherein training the object association model based on the second confidence difference further comprises: Based on the second confidence difference, a third association score is determined for the second text unit, the third association score indicating the likelihood that the target semantic object is associated with the second text unit; Using the object association model, a fourth association score is determined for the second text unit based on the first text sequence and the target semantic object, the fourth association score indicating the likelihood that the target semantic object is associated with the second text unit; A training objective function for the object association model is constructed based on the third association score and the fourth association score, wherein the training objective function is based on the increase of the combined score of the third association score and the fourth association score; as well as The parameter values of the object association model are updated based on the training objective function.
7. The method of claim 1, wherein determining the second confidence score comprises: Replace the first text unit with a predetermined text symbol; as well as The second confidence score is determined based on the other text units besides the first text unit, the predetermined text symbols, and the target semantic object.
8. The method of claim 1, wherein determining the first confidence score comprises: A pre-trained language model (PLM) is used to extract multiple text feature representations of the multiple text units and a first object feature representation of the target semantic object, wherein the PLM is included in the object association model; as well as The first confidence score is determined based on the first object feature representation, and The determination of the second confidence score includes: The PLM is used to extract the text feature representations of the other text units besides the first text unit and the second object feature representation of the target semantic object from the plurality of text units; as well as The second confidence score is determined based on the second object feature representation.
9. An electronic device, comprising: processor; as well as A memory, coupled to the processor and containing instructions stored thereon, which, when executed by the processor, cause the device to perform the following actions: Obtain a target semantic object and a first text sequence of natural language, wherein the first text sequence comprises multiple text units; Determine the first confidence score of the target semantic object being mentioned in the first text sequence; Determine a second confidence score for the mention of the target semantic object in the first text sequence when the first text unit in the first text sequence is ignored; and An object association model is trained based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
10. The device of claim 9, wherein the first confidence score and the second confidence score are determined using a trained object prediction model, the action further comprising: Acquire training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, wherein the supervision information for the semantic object indicates whether the semantic object is mentioned in the second text sequence; as well as The object prediction model is trained based on the training data.
11. The device of claim 9, wherein training the object association model comprises: Based on the first confidence difference, a first association score is determined for the first text unit, the first association score indicating the likelihood that the target semantic object is associated with the first text unit; Using the object association model, a second association score is determined for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the likelihood that the target semantic object is associated with the first text unit; A training objective function for the object association model is constructed based on the first association score and the second association score, wherein the training objective function is based on the increase of the combined score of the first association score and the second association score; as well as The parameter values of the object association model are updated based on the training objective function.
12. The device of claim 11, wherein determining the first association score comprises: Obtain supervisory information for the target semantic object, wherein the supervisory information for the target semantic object indicates whether the target semantic object is mentioned in the first text sequence; If the supervision information for the target semantic object indicates that the target semantic object is mentioned in the first text sequence, the first association score is calculated based on the first confidence difference; as well as If the supervision information for the target semantic object indicates that the target semantic object is not mentioned in the first text sequence, the first association score is determined to indicate that the target semantic object is not associated with the first text unit.
13. The device of claim 9, wherein training the object association model comprises: A third confidence score is determined when the target semantic object is mentioned in the first text sequence, provided that the second text unit in the first text sequence is ignored; as well as The object association model is also trained based on a second confidence difference between the first confidence score and the third confidence score.
14. The device of claim 13, wherein training the object association model based on the second confidence difference further comprises: Based on the second confidence difference, a third association score is determined for the second text unit, the third association score indicating the likelihood that the target semantic object is associated with the second text unit; Using the object association model, a fourth association score is determined for the second text unit based on the first text sequence and the target semantic object, the fourth association score indicating the likelihood that the target semantic object is associated with the second text unit; A training objective function for the object association model is constructed based on the third association score and the fourth association score, wherein the training objective function is based on the increase of the combined score of the third association score and the fourth association score; as well as The parameter values of the object association model are updated based on the training objective function.
15. The device of claim 9, wherein determining the second confidence score comprises: Replace the first text unit with a predetermined text symbol; as well as The second confidence score is determined based on the other text units besides the first text unit, the predetermined text symbols, and the target semantic object.
16. The device of claim 9, wherein determining the first confidence score comprises: A pre-trained language model (PLM) is used to extract multiple text feature representations of the multiple text units and a first object feature representation of the target semantic object, wherein the PLM is included in the object association model; as well as The first confidence score is determined based on the first object feature representation, and The determination of the second confidence score includes: The PLM is used to extract the text feature representations of the other text units besides the first text unit and the second object feature representation of the target semantic object from the plurality of text units; as well as The second confidence score is determined based on the second object feature representation.
17. A computer program product, said computer program product being tangibly stored in a computer storage medium and including computer-executable instructions, which, when executed by a device, cause the device to perform the following actions, said actions including: Obtain a target semantic object and a first text sequence of natural language, wherein the first text sequence comprises multiple text units; Determine the first confidence score of the target semantic object being mentioned in the first text sequence; Determine a second confidence score for the target semantic object being mentioned in the first text sequence when the first text unit in the first text sequence is ignored; as well as An object association model is trained based at least on a first confidence difference between the first confidence score and the second confidence score, the first text sequence, and the target semantic object, the object association model being configured to determine whether the target semantic object is associated with one of the plurality of text units.
18. The computer program product of claim 17, wherein the first confidence score and the second confidence score are determined using a trained object prediction model, the action further comprising: Acquire training data for the object prediction model, the training data including a second text sequence, a semantic object, and supervision information for the semantic object, wherein the supervision information for the semantic object indicates whether the semantic object is mentioned in the second text sequence; as well as The object prediction model is trained based on the training data.
19. The computer program product of claim 17, wherein training the object association model comprises: Based on the first confidence difference, a first association score is determined for the first text unit, the first association score indicating the likelihood that the target semantic object is associated with the first text unit; Using the object association model, a second association score is determined for the first text unit based on the first text sequence and the target semantic object, the second association score indicating the likelihood that the target semantic object is associated with the first text unit; A training objective function for the object association model is constructed based on the first association score and the second association score, wherein the training objective function is based on the increase of the combined score of the first association score and the second association score; as well as The parameter values of the object association model are updated based on the training objective function.
20. The computer program product of claim 19, wherein determining the first association score comprises: Obtain supervisory information for the target semantic object, wherein the supervisory information indicates whether the target semantic object is mentioned in the first text sequence; If the supervision information for the target semantic object indicates that the target semantic object is mentioned in the first text sequence, the first association score is calculated based on the first confidence difference; as well as If the supervision information for the target semantic object indicates that the target semantic object is not mentioned in the first text sequence, the first association score is determined to indicate that the target semantic object is not associated with the first text unit.