hottub.patents
US 12,566,596 B2#3304416 Most CitedActiveUnited States (USPTO)Utility

Graph path prediction and masked language modelling joint training algorithm for language models

0Forward Citations (#3304416 Global)
0.0/yrCitation Velocity (#3304416 Global)
0.00Citation PageRank (#3304416 Global)
3Prior Art Cited
18Claims (4 Indep. · 14 Dep.)
7Drawings / Sheets

Abstract

In an embodiment providing natural language processing (NLP), a computer generates a histogram that correctly represents a graph that represents a lexical text, and generates a token sequence encoder that is trainable and untrained. During training such as pretraining, the token sequence encoder infers an encoded sequence that incorrectly represents the lexical text, and the encoded sequence is dense and saves space. To increase the accuracy of the sequence encoder by learning, the token sequence encoder is adjusted based on, as discussed herein, an indirectly measured numeric difference between the encoded sequence that incorrectly represents the lexical text and the histogram that correctly represents the graph.

Interactive Citation Constellation Global Citation Ranking

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

Claims (18 — 4 Independent, 14 Dependent)

  1. Claim 1Independent Claim

    A method comprising: training a token sequence encoder that is untrained by: a) generating a histogram that correctly represents a graph that represents a lexical text; b) inferring from the lexical text, by the token sequence encoder, an encoded sequence that incorrectly represents the lexical text; c) generating a decoded histogram by decoding the encoded sequence that incorrectly represents the lexical text; d) measuring a difference between the decoded histogram and the histogram that correctly represents the graph; and e) adjusting the token sequence encoder based on said difference between said histograms; and inferring from a second lexical text, by the token sequence encoder, a second encoded sequence that correctly represents the second lexical text; wherein the method is performed by one or more computers.

  2. Claim 2Depends on #1

    The method of claim 1 wherein: said decoding the encoded sequence that incorrectly represents the lexical text is performed by a linear decoder; the token sequence encoder is nonlinear.

  3. Claim 3Depends on #1

    The method of claim 1 wherein: the method further comprises multitask learning by the token sequence encoder; said inferring the encoded sequence that incorrectly represents the lexical text and said adjusting the token sequence encoder occur during said multitask learning by the token sequence encoder.

  4. Claim 4Depends on #1

    The method of claim 1 wherein: the method further comprises: generating a lossy representation of the lexical text, and inferring, by the token sequence encoder, an encoded sequence that incorrectly represents the lossy representation of the lexical text; said adjusting the token sequence encoder is further based on the encoded sequence that incorrectly represents the lossy representation of the lexical text.

  5. Claim 5Depends on #4

    The method of claim 4 wherein: said generating the lossy representation of the lexical text comprises excluding at least one token from a token sequence that represents the lexical text; the method further comprises inferring, by a machine learning model, the at least one token; said adjusting based on the encoded sequence that incorrectly represents the lossy representation of the lexical text is based on said inferring the at least one token.

  6. Claim 6Depends on #1

    The method of claim 1 wherein said generating the histogram that correctly represents the graph comprises counting occurrences of a particular n-gram in the graph.

  7. Claim 7Depends on #1

    The method of claim 1 wherein the graph is at least one selected from a group consisting of a directed graph and a dataflow graph.

  8. Claim 8Depends on #1

    The method of claim 1 wherein: the encoded sequence that incorrectly represents the lexical text has a fixed size; said inferring the encoded sequence that incorrectly represents the lexical text comprises accepting a variable length sequence of lexical tokens.

  9. Claim 9Depends on #8

    The method of claim 8 wherein each lexical token in the variable length sequence of lexical tokens represents multiple vertices.

  10. Claim 10Independent Claim

    A method comprising: detecting that a parse error in a lexical text prevents generation of a graph that represents the lexical text; generating, by a token sequence encoder, a fixed-size encoded sequence that represents the lexical text; and inferring, from the fixed-size encoded sequence that represents the lexical text, a code completion of an expression in a logic statement in the lexical text; wherein the method is performed by an integrated development environment (IDE).

  11. Claim 11Independent Claim

    One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause: training a token sequence encoder that is untrained by: a) generating a histogram that correctly represents a graph that represents a lexical text; b) inferring from the lexical text, by the token sequence encoder, an encoded sequence that incorrectly represents the lexical text; c) generating a decoded histogram by decoding the encoded sequence that incorrectly represents the lexical text; d) measuring a difference between the decoded histogram and the histogram that correctly represents the graph; and e) adjusting the token sequence encoder based on said difference between said histograms; and inferring from a second lexical text, by the token sequence encoder, a second encoded sequence that correctly represents the second lexical text.

  12. Claim 12Depends on #11

    The one or more non-transitory computer-readable media of claim 11 wherein: said decoding the encoded sequence that incorrectly represents the lexical text is performed by a linear decoder; the token sequence encoder is nonlinear.

  13. Claim 13Depends on #11

    The one or more non-transitory computer-readable media of claim 11 wherein: the instructions further cause multitask learning by the token sequence encoder; said inferring the encoded sequence that incorrectly represents the lexical text and said adjusting the token sequence encoder occur during said multitask learning by the token sequence encoder.

  14. Claim 14Depends on #11

    The one or more non-transitory computer-readable media of claim 11 wherein: the instructions further cause: generating a lossy representation of the lexical text, and inferring, by the token sequence encoder, an encoded sequence that incorrectly represents the lossy representation of the lexical text; said adjusting the token sequence encoder is further based on the encoded sequence that incorrectly represents the lossy representation of the lexical text.

  15. Claim 15Depends on #14

    The one or more non-transitory computer-readable media of claim 14 wherein: said generating the lossy representation of the lexical text comprises excluding at least one token from a token sequence that represents the lexical text; the instructions further cause inferring, by a machine learning model, the at least one token; said adjusting based on the encoded sequence that incorrectly represents the lossy representation of the lexical text is based on said inferring the at least one token.

  16. Claim 16Depends on #11

    The one or more non-transitory computer-readable media of claim 11 wherein said generating the histogram that correctly represents the graph comprises counting occurrences of a particular n-gram in the graph.

  17. Claim 17Depends on #11

    The one or more non-transitory computer-readable media of claim 11 wherein the instructions further cause: after said training the token sequence encoder, receiving a second graph that is a portion of a third graph by incompletely receiving a data stream that consists of the third graph, and inferring, by the token sequence encoder and without completely receiving the third graph, an encoded sequence that represents the second graph.

  18. Claim 18Independent Claim

    One or more non-transitory computer-readable media storing instructions that, when executed by an integrated development environment (IDE), cause: detecting that a parse error in a lexical text prevents generation of a graph that represents the lexical text; generating, by a token sequence encoder, a fixed-size encoded sequence that represents the lexical text; and inferring, from the fixed-size encoded sequence that represents the lexical text, a code completion of an expression in a logic statement in the lexical text.

Technical Overview & Description

FIELD OF THE INVENTION The present invention relates to natural language processing (NLP). Herein is machine learning pretraining to infer an encoded sequence from a lexical token sequence that represents a lexical text. BACKGROUND Language models built for natural language processing (NLP), such as bidirectional encoder representations from transformers (BERT), have been shown to perform well on a wide variety of languages. Natural languages may lack unambiguous formal structural patterns for syntax and grammar. However, a programming language may have parsing production rules and internal grammar that a natural language does not, and naively applying a natural language model to a programming language task may neglect the inherent and rigorously formal structure present in source code, potentially leading to suboptimal code representation. Logical graphs are a tool frequently used to represent relationships between items. Examples of such graphs are an abstract syntax tree (AST) for static structure and a flow graph for dynamic interaction, which is not a tree, and a graph herein may or may not be a tree. These various graphs can capture syntactic and semantic information of source code by, for example, representing relationships between variables and statements. Generalized machine learning approaches, such as NLP with BERT but without graph analytics, may have accuracy decreased by an incomplete or missing representation of the various internal interrelationships within composite data. A specialized machine learning approach may instead be painstakingly designed to expect a perfect (i.e. non-lossy) representation of a specialized graph only for a special application, and only graphs of a single, narrow knowledge domain with a special, discrete, and explicit representation whose handcrafted structural limitations are based on application specific or domain specific schematic presumptions such as cyclicity, edge directedness, vertex degree (i.e. edge count) based o

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.

References Cited — Backward Prior Art (3)

PatentTitleYearCitations

Non-Patent Literature (10)

  • Dasgupta, Arpan et al.,
  • “
  • Review of extreme multilabel classification
  • ”
  • , 2023, 47 pages.
  • Kementchedjhieva, Yova et al.,
  • “
  • An exploration of encoder-decoder approaches to multi-label classification for legal and biomedical text
  • ”
  • , CoRR, abs/2305.05627, 2023, available: https://doi.org/10.48550/arXiv.2305.05627, 14 pages.