IP Library Granted Patent US 12,632,739
Granted Patent B2
US 12,632,739 · App. 17/367,130 · Granted May 19, 2026

Text-based event detection method and apparatus, computer device, and storage medium

Inventors: Xiaozhi Wang (Shenzhen, CN); Zhiyuan Liu (Shenzhen, CN); Xu Han (Shenzhen, CN); Maosong Sun (Shenzhen, CN); Peng Li (Shenzhen, CN); Jie Zhou (Shenzhen, CN)
Assignee: Tencent Technology (Shenzhen) Company Limited
G06N3/088G06N3/045
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,632,739
App. No.
17/367,130
Granted
May 19, 2026
Kind
B2
Abstract

A training method includes obtaining a first data set and a second data set, each of the first data set and the second data set including event instances, the event instances include text and events corresponding to the text. The training method also includes training an adversarial network using the first data set and the second data set, the adversarial network includes processing circuitry configured as a generator and a discriminator. The discriminator is configured to output first reliable probabilities of the event instances in the first data set, and second reliable probabilities of the event instances inputted by the generator. A loss function of the adversarial network is used to adjust a parameter of the adversarial network, to maximize the first reliable probabilities and minimize the second reliable probabilities. The method further includes obtaining, by the trained adversarial network, a reliable event instance in the second data set.

Claims (77)

1 . A training method comprising:

obtaining a first data set and a second data set, each of the first data set and the second data set comprises event instances, the event instances comprising text and events corresponding to the text, the first data set comprising standard event instances, and the second data set comprising non-standard event instances;

training an adversarial network using the first data set and the second data set, the adversarial network comprising processing circuitry configured as an encoder, a generator, and a discriminator, wherein the training comprises:

encoding, by the encoder, each event instance in the first data set and the second data set during each round of adversarial training, to obtain an embedding vector of each event instance in the first data set and the second data set, the embedding vector indicating each word in the text corresponding to the respective event instance, and a positional relation between words;

selecting, by the generator and based on a confusion probability of each event instance in the second data set, a subset of event instances from the second data set, wherein the confusion probability of each event instance indicates a probability that the discriminator incorrectly discriminates the corresponding event instance;

inputting, to the discriminator, the embedding vectors of the event instances in the first data set and the selected subset of event instances in the second data set;

outputting, by the discriminator, first reliable probabilities of the event instances in the first data set, and second reliable probabilities of the selected subset of event instances in the second data set, wherein a reliable probability of an event instance indicates a probability that the corresponding event instance is reliable;

calculating a first loss function according to the first reliable probabilities of the first event instances, the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances;

calculating a second loss function according to the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances; and

adjusting one or more parameters of the encoder and the discriminator according to the first loss function, and at least one parameter of the generator according to the second loss function, wherein the adjusting maximizes the first reliable probabilities and minimizes the second reliable probabilities; and

obtaining, by the trained adversarial network, a reliable event instance in the second data set.

2 . The training method according to claim 1 , wherein the training the adversarial network comprises:

processing, by the generator, the embedding vector of each event instance in the second data set, to obtain the confusion probability of each event instance in the second data set; processing, by the discriminator, the embedding vectors of first event instances from the first data set and the second event instances, to obtain an output result of the discriminator, the output result comprising the first reliable probabilities of the first event instances, and the second reliable probabilities of the second event instances;

calculating, in response to a determination that the output result of the discriminator does not converge, a loss value according to one or more of the first loss function, the second loss function, the confusion probabilities obtained by the generator, and the output result of the discriminator; and

adjusting the parameter of the adversarial network according to the loss value.

3 . The training method according to claim 2 , wherein the calculating the loss value comprises:

sampling the first event instances, to obtain first sampling instances;

sampling the second event instances, to obtain second sampling instances; and

calculating the loss value according to one or more of the first loss function, the second loss function, the confusion probabilities obtained by the generator for the second sampling instances, and an output result of the discriminator respectively for the first sampling instances and the second sampling instances.

4 . The training method according to claim 1 , wherein the calculating the second loss value comprises: obtaining an average reliable probability of the second event instances, according to the second reliable probabilities of the second event instances; and calculating the second loss value, according to the second loss function, the average reliable probability, and the confusion probabilities of the second event instances.

5 . The training method according to claim 1 , wherein the obtaining the reliable event instance in the second data set comprises:

adding a target event instance selected from the second data set by a trained generator to the first data set, in response to a determination that the second reliable probability of the target event instance outputted by the discriminator of the trained adversarial network is higher than a first probability threshold.

6 . The training method according to claim 1 , wherein the obtaining the first data set and the second data set comprises:

obtaining the first data set;

obtaining an event labeling rule according to the first data set, the event labeling rule comprising a correspondence between the standard event instances and trigger words in text of the standard event instances;

labeling each piece of text not included in the first data set according to the event labeling rule, to obtain a candidate data set;

pre-training the discriminator using the first data set, to obtain a pre-trained discriminator;

processing, by the pre-trained discriminator, each event instance in the candidate data set, to obtain a reliable probability of each event instance in the candidate data set; and

extracting the second data set from the candidate data set, according to the reliable probability of each event instance in the candidate data set.

7 . The training method according to claim 6 , wherein the obtaining the first data set comprises:

obtaining the first data set that is manually labeled.

8 . The training method according to claim 1 , wherein the obtaining the first data set and the second data set comprises:

labeling each piece of text in event instances of an initial data set according to a preset event labeling rule, the event labeling rule comprising a correspondence between an event and a trigger word;

pre-training the discriminator using the initial data set;

processing, by the pre-trained discriminator, each event instance in the initial data set, to obtain a reliable probability of each event instance in the initial data set; and

obtaining the first data set and the second data set from the initial data set, according to the reliable probability of each event instance in the initial data set.

9 . The training method according to claim 8 , wherein the obtaining the first data set and the second data set from the initial data set comprises:

adding each event instance in the initial data set whose reliable probability is higher than a second probability threshold into the first data set; and

adding each event instance in the initial data set whose reliable probability is lower than or equal to the second probability threshold into the second data set.

10 . A non-transitory computer-readable storage medium, storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the training method according to claim 1 .

11 . A text-based event detection method comprising:

obtaining a text to be processed;

processing, by processing circuitry of an adversarial network, the text, the adversarial network having been trained using a first data set and a second data set, the first data set comprising standard event instances, the second data set comprising non-standard event instances, the adversarial network comprising an encoder, a generator, and a discriminator, wherein the adversarial network is trained by:

encoding, by the encoder, each event instance in the first data set and the second data set during each round of adversarial training, to obtain an embedding vector of each event instance in the first data set and the second data set, the embedding vector indicating each word in the text corresponding to the respective event instance, and a positional relation between words;

selecting, by the generator and based on a confusion probability of each event instance in the second data set, a subset of event instances from the second data set, wherein the confusion probability of each event instance indicates a probability that the discriminator incorrectly discriminates the corresponding event instance;

inputting, to the discriminator, the embedding vectors of the event instances in the first data set and the selected subset of event instances in the second data set;

outputting, by the discriminator, first reliable probabilities of the event instances in the first data set, and second reliable probabilities of the selected subset of event instances in the second data set, wherein a reliable probability of an event instance indicates a probability that the corresponding event instance is reliable;

calculating a first loss function-according to the first reliable probabilities of the first event instances, the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances;

calculating a second loss function according to the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances; and

adjusting one or more parameters of the encoder and the discriminator according to the first loss function, and at least one parameter of the generator according to the second loss function, wherein the adjusting maximizes the first reliable probabilities and minimizes the second reliable probabilities; and

obtaining an event corresponding to the text, according to an output result of the discriminator in the adversarial network for the text.

12 . A training apparatus comprising:

processing circuitry configured to

obtain a first data set and a second data set, each of the first data set and the second data set comprises event instances, the event instances comprising text and events corresponding to the text, the first data set comprising standard event instances, and the second data set comprising non-standard event instances;

train an adversarial network using the first data set and the second data set, the adversarial network comprising an encoder, a generator, and a discriminator, wherein the processing circuitry is configured to train the adversarial network by:

causing the encoder to encode each event instance in the first data set and the second data set during each round of adversarial training, to obtain an embedding vector of each event instance in the first data set and the second data set, the embedding vector indicating each word in the text corresponding to the respective event instance, and a positional relation between words;

causing the generator to:

select, based on a confusion probability of each event instance in the second data set, a subset of event instances from the second data set, wherein the confusion probability of each event instance indicates a probability that the discriminator incorrectly discriminates the corresponding event instance;

input, to the discriminator, the embedding vectors of the event instances in the first data set and the selected subset of event instances in the second data set; and

causing the discriminator to output first reliable probabilities of the event instances in the first data set, and second reliable probabilities of the selected subset of event instances in the second data set, wherein a reliable probability of an event instance indicates a probability that the corresponding event instance is reliable;

calculating a first loss function according to the first reliable probabilities of the first event instances, the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances;

calculating a second loss function according to the second reliable probabilities of the second event instances, and the confusion probabilities of the second event instances; and

adjusting one or more parameters of the encoder and the discriminator according to the first loss function, and at least one parameter of the generator according to the second loss function the adversarial network, wherein the adjusting maximizes the first reliable probabilities and minimizes the second reliable probabilities; and

obtain, by the trained adversarial network, a reliable event instance in the second data set.

13 . The training apparatus according to claim 12 , wherein the processing circuitry is configured to calculate the second loss value by

obtaining an average reliable probability of the second event instances, according to the second reliable probabilities of the second event instances; and

calculating the second loss value, according to the second loss function, the average reliable probability, and the confusion probabilities of the second event instances.

14 . The training apparatus according to claim 12 , wherein the processing circuitry is configured to

process, by the generator, the embedding vector of each event instance in the second data set, to obtain the confusion probability of each event instance in the second data set;

process, by the discriminator, the embedding vectors of first event instances from the first data set and the second event instances, to obtain an output result of the discriminator, the output result comprising the first reliable probabilities of the first event instances, and the second reliable probabilities of the second event instances;

calculate, in response to a determination that the output result of the discriminator does not converge, a loss value according to one or more of the first loss function, the second loss function, the confusion probabilities obtained by the generator, and the output result of the discriminator; and

adjust the parameter of the adversarial network according to the loss value.

15 . The training apparatus according to claim 14 , wherein the processing circuitry is configured to calculate the loss value by

sampling the first event instances, to obtain first sampling instances;

sampling the second event instances, to obtain second sampling instances; and

calculating the loss value according to one or more of the first loss function, the second loss function, the confusion probabilities obtained by the generator for the second sampling instances, and output results of the discriminator respectively for the first sampling instances and the second sampling instances.

16 . The training apparatus according to claim 12 , wherein the processing circuitry is configured to obtain the reliable event instance in the second data set by adding a target event instance selected from the second data set by a trained generator to the first data set, in response to a determination that the second reliable probability of the target event instance outputted by the discriminator of the trained adversarial network is higher than a first probability threshold.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2021
From: WANG, XIAOZHI; LIU, ZHIYUAN; HAN, XU; SUN, MAOSONG; LI, PENG; ZHOU, JIE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 057257/0680 →
Priority Claims (1)
CN 201910471605.1 · May 31, 2019 · national
Continuity (2)
Continuation PCTCN2020093189 · May 29, 2020
Related Publication 20210334665A1 · Oct 28, 2021
References Cited (14)
US 9224386B1 · Weber · 2015 [cited by examiner]
US 20100082331A1 · Brun · 2010 [cited by examiner]
US 20180314716A1 · Kim · 2018 [cited by examiner]
US 20190114348A1 · Gao · 2019 [cited by applicant]
US 20190122120A1 · Wu · 2019 [cited by examiner]
CN 106557566A · 2017 [cited by applicant]
CN 109492764A · 2019 [cited by applicant]
CN 109766432A · 2019 [cited by applicant]
CN 110188172A · 2019 [cited by applicant]
Li et al, 2018, “A Generative Model for category text generation” (Year: 2018). [cited by examiner]
Visa et al, 2011, “Confusion Matrix-based Feature Selection” (Year: 2011). [cited by examiner]
Yuan et al, 2017, “Hard-Aware Deeply Cascaded Embedding” (Year: 2017). [cited by examiner]
Lopez-Paz & Oquab, “Revisiting Classifier Two-Sample Tests”, 2018 (Year: 2018). [cited by examiner]
International Search Report and Written Opinion Issued Dec. 28, 2020 in International Application No. PCT/CN2020/093189, with English translation, 9 pgs. [cited by applicant]