hottub.patents
US 12,801,849 B2#3072564 Most CitedActiveUnited States (USPTO)Utility

System and method for context insertion for contrastive Siamese network training

0Forward Citations (#3072564 Global)
0.0/yrCitation Velocity (#3072564 Global)
0.00Citation PageRank (#3072564 Global)
34Prior Art Cited
21Claims (3 Indep. · 18 Dep.)
11Drawings / Sheets

Abstract

A method includes receiving an input utterance that is a continuation of a previous utterance. The method also includes, using a trained Siamese network, determining input utterance embeddings representing tokens from the input utterance, pooling the input utterance embeddings with a context token embedding representing a class associated with the previous utterance to generate a representative input utterance embedding, and determining a representative embedding associated with each of multiple possible classes. Each possible class is associated with first and second threshold boundaries. The method further includes, using the trained Siamese network, determining a similarity score for each possible class based on a distance between the representative input utterance embedding and a selected threshold boundary of the representative embedding for that possible class and identifying a class for the input utterance based on the determined similarity scores. In addition, the method includes performing an action corresponding to the identified class.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 34 · Forward citations: 0.

Claims (21 — 3 Independent, 18 Dependent)

  1. Claim 1Independent Claim

    A method comprising: receiving an input utterance that is a continuation of a previous utterance; using a trained Siamese network: determining input utterance embeddings representing tokens from the input utterance; pooling the input utterance embeddings with a context token embedding representing a class associated with the previous utterance to generate a representative input utterance embedding, wherein the pooling comprises assigning attention weights to the input utterance embeddings based on the context token embedding; determining a representative embedding associated with each of multiple possible classes, wherein each possible class is associated with (i) a first threshold boundary that encompasses embeddings of utterances that specify that possible class and (ii) a second threshold boundary that encompasses embeddings of continuation utterances with context, wherein determining the representative embedding includes selecting the representative embedding associated with each of the multiple possible classes as a class target, and wherein the class target represents a centroid embedding for an associated class of the multiple possible classes; determining a similarity score for each possible class based on a distance between the representative input utterance embedding and a selected threshold boundary of the representative embedding for that possible class, the selected threshold boundary comprising the first threshold boundary or the second threshold boundary; and identifying a class for the input utterance based on the determined similarity scores; and performing an action corresponding to the identified class.

  2. Claim 2Depends on #1

    The method of claim 1, wherein: one of the possible classes comprises an unhandled class for utterances that do not belong to any of the other possible classes, and the unhandled class is associated with a specified similarity score or another score given by a negative soft maximum of the similarity scores of the other possible classes.

  3. Claim 3Depends on #1

    The method of claim 1, wherein the input utterance embeddings are pooled using a mean pooling technique.

  4. Claim 4Depends on #1

    The method of claim 1, wherein the input utterance embeddings and the context token embedding are pooled using a learnable attention layer and using the context token embedding representing the class associated with the previous utterance as one of a query, a key, or a value.

  5. Claim 5Depends on #1

    The method of claim 1, wherein the distance between the representative input utterance embedding and the second threshold boundary is greater than the distance between the representative input utterance embedding and the first threshold boundary.

  6. Claim 6Depends on #1

    The method of claim 1, wherein: the first threshold boundary is used as the selected threshold boundary when the input utterance is not in context with that possible class; and the second threshold boundary is used as the selected threshold boundary when the input utterance is in context with that possible class.

  7. Claim 7Depends on #1

    The method of claim 1, wherein pooling the input utterance embeddings comprises using a representation of the context from the class associated with the previous utterance to further contextualize the input utterance and generate the representative input utterance embedding.

  8. Claim 8Depends on #1

    The method of claim 1, wherein the Siamese network is trained using a multi-target loss function.

  9. Claim 9Depends on #1

    The method of claim 1, wherein each class is associated with the first threshold boundary at a first distance from the class target and the second threshold boundary at a second distance from the class target, the second distance greater than the first distance.

  10. Claim 10Independent Claim

    An electronic device comprising: at least one processing device configured to: receive an input utterance that is a continuation of a previous utterance; use a trained Siamese network to: determine input utterance embeddings representing tokens from the input utterance; pool the input utterance embeddings with a context token embedding representing a class associated with the previous utterance to generate a representative input utterance embedding, the at least one processing device configured to assign attention weights to the input utterance embeddings based on the context token embedding; determine a representative embedding associated with each of multiple possible classes, wherein each possible class is associated with (i) a first threshold boundary that encompasses embeddings of utterances that specify that possible class and (ii) a second threshold boundary that encompasses embeddings of continuation utterances with context, wherein, to determine the representative embedding, the at least one processing device is configured to select the representative embedding associated with each of the multiple possible classes as a class target, and wherein the class target represents a centroid embedding for an associated class of the multiple possible classes; determine a similarity score for each possible class based on a distance between the representative input utterance embedding and a selected threshold boundary of the representative embedding for that possible class, the selected threshold boundary comprising the first threshold boundary or the second threshold boundary; and identify a class for the input utterance based on the determined similarity scores; and perform an action corresponding to the identified class.

  11. Claim 11Depends on #10

    The electronic device of claim 10, wherein: one of the possible classes comprises an unhandled class for utterances that do not belong to any of the other possible classes, and the unhandled class is associated with a specified similarity score or another score given by a negative soft maximum of the similarity scores of the other possible classes.

  12. Claim 12Depends on #10

    The electronic device of claim 10, wherein the at least one processing device is configured to pool the input utterance embeddings using a mean pooling technique.

  13. Claim 13Depends on #10

    The electronic device of claim 10, wherein the at least one processing device is configured to pool the input utterance embeddings using a learnable attention layer and using the context token embedding representing the class associated with the previous utterance as one of a query, a key, or a value.

  14. Claim 14Depends on #10

    The electronic device of claim 10, wherein the distance between the representative input utterance embedding and the second threshold boundary is greater than the distance between the representative input utterance embedding and the first threshold boundary.

  15. Claim 15Depends on #10

    The electronic device of claim 10, wherein: the first threshold boundary is used as the selected threshold boundary when the input utterance is not in context with that possible class; and the second threshold boundary is used as the selected threshold boundary when the input utterance is in context with that possible class.

  16. Claim 16Depends on #10

    The electronic device of claim 10, wherein, to pool the input utterance embeddings, the at least one processing device is configured to use a representation of the context from the class associated with the previous utterance to further contextualize the input utterance and generate the representative input utterance embedding.

  17. Claim 17Depends on #10

    The electronic device of claim 10, wherein the Siamese network is trained using a multi-target loss function.

  18. Claim 18Independent Claim

    A non-transitory machine-readable medium containing instructions that when executed cause at least one processor of an electronic device to: receive an input utterance that is a continuation of a previous utterance; use a trained Siamese network to: determine input utterance embeddings representing tokens from the input utterance; pool the input utterance embeddings with a context token embedding representing a class associated with the previous utterance to generate a representative input utterance embedding, wherein the instructions when executed cause the at least one processor to assign attention weights to the input utterance embeddings based on the context token embedding; determine a representative embedding associated with each of multiple possible classes, wherein each possible class is associated with (i) a first threshold boundary that encompasses embeddings of utterances that specify that possible class and (ii) a second threshold boundary that encompasses embeddings of continuation utterances with context, wherein the instructions that when executed cause the at least one processor to determine the representative embedding include instructions that when executed cause the at least one processor to select the representative embedding associated with each of the multiple possible classes as a class target, and wherein the class target represents a centroid embedding for an associated class of the multiple possible classes; determine a similarity score for each possible class based on a distance between the representative input utterance embedding and a selected threshold boundary of the representative embedding for that possible class, the selected threshold boundary comprising the first threshold boundary or the second threshold boundary; and identify a class for the input utterance based on the determined similarity scores; and perform an action corresponding to the identified class.

  19. Claim 19Depends on #18

    The non-transitory machine-readable medium of claim 18, wherein: one of the possible classes comprises an unhandled class for utterances that do not belong to any of the other possible classes, and the unhandled class is associated with a specified similarity score or another score given by a negative soft maximum of the similarity scores of the other possible classes.

  20. Claim 20Depends on #18

    The non-transitory machine-readable medium of claim 18, wherein the instructions when executed cause the at least one processor to pool the input utterance embeddings using a mean pooling technique.

  21. Claim 21Depends on #18

    The non-transitory machine-readable medium of claim 18, wherein the instructions when executed cause the at least one processor to pool the input utterance embeddings and the context token embedding using a learnable attention layer and using the context token embedding representing the class associated with the previous utterance as one of a query, a key, or a value.

Technical Overview & Description

CROSS-REFERENCE TO RELATED APPLICATION AND PRIORITY CLAIM This application claims priority under 35 U.S.C. § 119(e) to U.S. Provisional Patent Application No. 63/345,614 filed on May 25, 2022, which is hereby incorporated by reference in its entirety. TECHNICAL FIELD This disclosure relates generally to natural language processing systems. More specifically, this disclosure relates to a system and method for context insertion for contrastive Siamese network training. BACKGROUND Siamese network training can be very effective for similarity-based machine learning tasks. Siamese network training can involve training multiple networks to place phrases relative to each other, rather than relative to an embedding space directly. For example, to determine the similarity between two phrases, an output embedding from a pretrained large language model (LLM) such as BERT for each phrase can be calculated independently, and their similarity can be determined based on the “ closeness ” of the outputs using a distance metric (such as negative Euclidian distance or cosine similarity). This differs from standard classification techniques in which the output of a pretrained LLM is used directly for classification. Training in this way allows a network to learn both the output embedding of an input phrase and the target's embedding simultaneously, giving it an enhanced ability to learn complex relationships. SUMMARY This disclosure provides a system and method for context insertion for contrastive Siamese network training. In a first embodiment, a method includes receiving an input utterance that is a continuation of a previous utterance. The method also includes, using a trained Siamese network, determining input utterance embeddings representing tokens from the input utterance. The method further includes, using the trained Siamese network, pooling the input utterance embeddings with a context token embedding representing a class associated with the previous utterance to generate a

Cited By — Indexed Forward Citations (0 of 0 total)

No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.

Non-Patent Literature (10)

  • International Search Report and Written Opinion of the International Searching Authority dated Aug. 29, 2023 in connection with International Patent Application No. PCT/KR2023/006873, 13 pages.
  • Kim et al.,
  • “
  • Sentence Similarity Prediction based on Siamese CNN-Bidirectional LSTM with Self-attention,
  • ”
  • Journal of KIISE, vol. 46, No. 3, Mar. 2019, 5 pages.
  • Jung et al.,
  • “
  • Speaker Recognition Using Convolutional Siamese Neural Networks,
  • ”