IP Library Granted Patent US 12,314,341
Granted Patent B2
US 12,314,341 · App. 17/153,011 · Granted May 27, 2025

Method and apparatus for training embedding vector generation model

Inventors: GyuBum Han (Suwon-si, KR); Jehun Jeon (Suwon-si, KR); Inkyu Choi (Seoul, KR)
Assignee: Samsung Electronics Co., Ltd.
G06F18/214G06F18/22G06F40/295G06F40/30
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,314,341
App. No.
17/153,011
Granted
May 27, 2025
Kind
B2
Abstract

A method and apparatus for training an embedding vector generation model are provided, the method includes identifying a keyword in a query sentence, generating an embedding vector of the query sentence and an embedding vector of the keyword based on the embedding vector generation model, and training the embedding vector generation model such that a first similarity between the embedding vector of the query sentence and the embedding vector of the keyword is greater than a second similarity between an embedding vector of a reference sentence that does not include the keyword and the embedding vector of the keyword.

Claims (41)

1. A processor-implemented method of training an embedding vector generation model, the method comprising:

identifying a keyword in a query sentence;

generating an embedding vector of the query sentence and an embedding vector of the keyword based on the embedding vector generation model; and

training the embedding vector generation model such that a first similarity between the embedding vector of the query sentence and the embedding vector of the keyword is greater than a second similarity between an embedding vector of a reference sentence and the embedding vector of the keyword,

wherein the embedding vector generation model is pre-trained based on any one or any combination of a general sentence and a conversational sentence, and

wherein the keyword comprises at least one word in the query sentence and a length of the keyword is less than a length of the general sentence or the conversational sentence.

2. The method of claim 1 , wherein

the generating of the embedding vectors comprises generating the embedding vector of the query sentence and the embedding vector of the keyword based on a pre-trained embedding vector generation model, and

the training of the embedding vector generation model comprises fine tuning the embedding vector generation model such that the first similarity is greater than the second similarity.

3. The method of claim 1 , wherein the training of the embedding vector generation model comprises training the embedding vector generation model such that a similarity of the embedding vector of the keyword output from the embedding vector generation model to the embedding vector of the query sentence is greater than a similarity of the embedding vector of the reference sentence to the embedding vector of the query sentence, in response to the keyword being input to the embedding vector generation model.

4. The method of claim 1 , wherein the reference sentence does not include the keyword and is selected from among sentences belonging to a category that is different from a category of the query sentence.

5. The method of claim 1 , wherein the identifying of the keyword comprises identifying the keyword in the query sentence based on any one or any combination of pre-tagged information in the query sentence or by performing named entity recognition (NER) on the query sentence.

6. The method of claim 1 , wherein the embedding vector generation model is an encoder corresponding to a language model.

7. The method of claim 1 , wherein

the embedding vector of the query sentence is fine-tuned based on identification information corresponding to the query sentence, and

the embedding vector generation model is fine-tuned based on the fine-tuned embedding vector of the query sentence.

8. The method of claim 7 , wherein the fine-tuned embedding vector of the query sentence has a same number of dimensions as a number of dimensions of the embedding vector of the query sentence.

9. The method of claim 1 , wherein the query sentence is acquired from text data input by a user or a voice signal uttered by the user.

10. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of claim 1 .

11. The method of claim 1 , further comprising:

generating the embedding vector of the reference sentence;

determining the first similarity and the second similarity.

12. The method of claim 1 , wherein the reference sentence does not include the keyword and is determined from a different category than the query sentence.

13. The method of claim 1 , wherein the reference sentence does not include the keyword and is selected based on the keyword.

14. An apparatus for training an embedding vector generation model, the apparatus comprising:

a memory configured to store the embedding vector generation model; and

a processor configured to:

generate an embedding vector of a query sentence and an embedding vector of a keyword identified in the query sentence, based on the embedding vector generation model; and

train the embedding vector generation model such that a first similarity between the embedding vector of the query sentence and the embedding vector of the keyword is greater than a second similarity between an embedding vector of a reference sentence and the embedding vector of the keyword,

wherein the embedding vector generation model is pre-trained based on any one or any combination of a general sentence and a conversational sentence, and

wherein the keyword comprises at least one word in the query sentence and a length of the keyword is less than a length of the general sentence or the conversational sentence.

15. The apparatus of claim 14 , wherein the processor is further configured to train the embedding vector generation model such that a similarity of the embedding vector of the keyword output from the embedding vector generation model to the embedding vector of the query sentence is greater than a similarity of the embedding vector of the reference sentence to the embedding vector of the query sentence, in response to the keyword being input to the embedding vector generation model.

16. The apparatus of claim 14 , wherein the processor is further configured to:

generate the embedding vector of the query sentence and the embedding vector of the keyword based on a pre-trained embedding vector generation model; and

perform fine tuning of the embedding vector generation model such that the first similarity is greater than the second similarity.

17. The apparatus of claim 14 , wherein the reference sentence does not include the keyword and is selected from among sentences belonging to a category that is different from a category of the query sentence.

18. The apparatus of claim 14 , wherein the processor is further configured to identify the keyword in the query sentence based on any one or any combination of pre-tagged information in the query sentence or by performing named entity recognition (NER) on the query sentence.

19. The apparatus of claim 14 , wherein the processor is further configured to:

generate the embedding vector of the reference sentence; and

determine the first similarity and the second similarity.

20. The apparatus of claim 14 , wherein the reference sentence does not include the keyword and is selected based on the keyword.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 20, 2021
From: HAN, GYUBUM; JEON, JEHUN; CHOI, INKYU
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 054964/0665 →
Priority Claims (1)
KR 10-2020-0104025 · Aug 19, 2020 · national
Continuity (1)
Related Publication 20220058433A1 · Feb 24, 2022
References Cited (20)
US 9852177B1 · Cheung et al. · 2017 [cited by applicant]
US 20170316775A1 · Le et al. · 2017 [cited by applicant]
US 20180144234A1 · Devesa · 2018 [cited by applicant]
US 20200026959A1 · Lee · 2020 [cited by examiner]
US 20200081982A1 · Tu · 2020 [cited by examiner]
US 20200125673A1 · Aharonov · 2020 [cited by examiner]
US 20210056169A1 · Bahirwani · 2021 [cited by examiner]
US 20210141798A1 · Steedman Henderson · 2021 [cited by examiner]
US 20210200813A1 · Xu · 2021 [cited by examiner]
US 20210319051A1 · Duan · 2021 [cited by examiner]
US 20220301072A1 · Wang · 2022 [cited by examiner]
US 20220318507A1 · Barkan · 2022 [cited by examiner]
CN 110147882A · 2019 [cited by applicant]
JP 4987530B2 · 2012 [cited by applicant]
JP 6679683B2 · 2020 [cited by applicant]
KR 102055899B1 · 2019 [cited by applicant]
Palangi, Hamid, et al., “Deep Sentence Embedding using Long Short-Term Memory Networks: Analysis and Application to Information Retrieval,” [cited by applicant]
Kim, Bosung, et al., “An Effective Sentence Similarity Measure Method Based FAQ System Using Self-Attentive Sentence Embedding,” [cited by applicant]
Oh, Kyo-Joong, et al., “Question Understanding Based on Sentence Embedding on Dialog Systems for Banking Service.” [cited by applicant]
Miao, Changyu, et al., “Keyword-Attentive Deep Semantic Matching,” [cited by applicant]