Training method and device of semantic relation recognition model and terminal

A technology for semantic relationship and recognition model, applied in the training field of semantic relationship recognition model, can solve the problem of inaccurate semantic relationship recognition, and achieve the effect of improving classification effect, shortening prediction time, and improving prediction efficiency.

Active Publication Date: 2019-08-30
BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF6 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

lead to inaccurate recognition of semantic relations

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Training method and device of semantic relation recognition model and terminal
  • Training method and device of semantic relation recognition model and terminal
  • Training method and device of semantic relation recognition model and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0065] In a specific embodiment, a training method of a semantic relationship recognition model is provided, such as figure 1 shown, including:

[0066] Step S10: input the sample data set into the initial pre-training model, output the representation information of the sample sentence, the sample data set includes a plurality of sample semantic units;

[0067] In an example, the sample data set includes a plurality of sample semantic units, and the sample semantic units may be basic semantic units serving as training data. The sample semantic unit may be a vocabulary or a word, for example, "taste", "good", "unpalatable" and so on. Multiple sample semantic units can form various sample semantic sentences, for example, "The taste is not bad, and the portion is also sufficient!", "But the environment is average, it is a comparison value for group buying, and friends can also go" and so on. A pre-trained model is a model trained on a large dataset. Pre-trained models can be m...

Embodiment 2

[0102] In a specific implementation, the multi-task learning process of sentiment analysis task and text relation task learning together is as follows: image 3 shown.

[0103] Split the chapter dataset into arg1 and arg2. arg1 and arg2 represent two EDU sentences and feed them into a BERT network learned on large-scale unsupervised data. In the input layer, arg1_1...arg1_i...arg1_n is the word vector representing the input arg1, and arg2_1...arg2_i...arg2_n is the word vector representing the input arg2. sep is a special character used for sentence segmentation, for example, space, comma, period, etc. cls (classification) is the characteristic character of the classification function.

[0104] arg1_1...arg1_i...arg1_n and arg2_1...arg2_i...arg2_n go through a multi-layer transformation network model (transformer model), and at the output layer, arg1_1...arg1_i...arg1_n is obtained as the representation word vector of output arg1, and arg2_1...arg2_i...arg2_n is the represe...

Embodiment 3

[0111] In another specific embodiment, a training device for a semantic relationship recognition model is provided, such as Figure 4 shown, including:

[0112] The representation information acquisition module 10 of the sample sentence is used to input the sample data set into the initial pre-training model, and output the representation information of the sample sentence, the sample data set includes a plurality of sample semantic units;

[0113] The feature word splicing module 20 is used to obtain a plurality of feature words, and splicing a plurality of feature words to obtain the representation information of the spliced ​​feature words;

[0114] The semantic relationship category analysis module 30 is used to input the representation information of the sample sentence and the representation information of the spliced ​​feature words into the initial classifier, and output the semantic relationship category between the sample semantic units;

[0115]Model adjustment mod...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention provides a training method and device for a semantic relation recognition model and a terminal, and the method comprises the steps: inputting a sample data set into aninitial pre-training model, outputting the representation information of sample sentences, and enabling the sample data set to comprise a plurality of sample semantic units; obtaining a plurality of feature words, and splicing the plurality of feature words to obtain representation information of the spliced feature words; inputting the representation information of the sample sentences and the representation information of the splicing feature words into an initial classifier, and outputting semantic relationship categories among the sample semantic units; adjusting the initial pre-training model and the initial classifier to obtain a new pre-training model and a new classifier; and establishing a semantic relation recognition model according to the new pre-training model and the new classifier. And the feature words are used as strong features in the chapter relationship, so that the classification effect on the specific semantic relationship can be improved. When the semantic relation recognition model is used for predicting the semantic relation category, the prediction time is shortened, and the prediction efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of machine learning, in particular to a training method, device and terminal for a semantic relationship recognition model. Background technique [0002] Discourse semantic relationship recognition is a basic task of natural language processing, which usually refers to identifying the semantic relationship between elementary semantic units (EDU, Elementary discourse unit) in natural language. It is widely used in reading comprehension systems, sentiment analysis systems, and dialogue question answering systems. For a chapter-level document, there may be multi-category semantic relations between basic semantic units. For example, common semantic relationship categories include extended relationship (an introduction and description of a thing or entity that is refined or generalized), causal relationship (a document with a causal representation, which can be causal and consequent, or causal and causal) , tur...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/35G06F16/33G06F17/27
CPCG06F16/35G06F16/3344G06F40/30
Inventor 高参何伯磊肖欣延
Owner BEIJING BAIDU NETCOM SCI & TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products