# US 2022/0044766 A1 · Class-dependent machine learning based inferences

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0044766 A1
- Document ID: US20220044766A1
- Status: Published application
- Kind: A1
- Application number: 16/984,331
- Filed: 2020-08-04
- Published: 2022-02-10
- Earliest claimed: 2020-08-04
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Alessandra Toniato; Philippe Schwaller; Teodoro Laino
- Web page: https://patentgrep.com/patent/US20220044766A1

## CPC

- G16C 20/10: Analysis or design of chemical reactions, syntheses or processes
- G06F 18/211: Selection of the most significant subset of features
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 5/04: Inference or reasoning models
- G06V 10/82: using neural networks
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G16C 20/70: Machine learning, data mining or chemometrics
- G16C: COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A computer-implemented method of performing class-dependent, machine learning based inferences includes accessing a test input and N class identifiers, wherein each class identifier of the N class identifiers identifies a respective class among M possible classes; forming N test input data structures, wherein each test input data structure of the N test input data structures is formed by aggregating the test input with a different one of the N class identifiers; performing an inference for each of the N test input data structures using a machine learning model that is trained using examples associating example input data structures with respective example outputs, wherein each respective example input data structure is formed by aggregating an example input with a different one of the N class identifiers; and returning a class-dependent inference result for each respective test input data structure based on the inference obtained for each respective test input data structure.

## Claims

### Claim 1

A computer-implemented method of performing class-dependent, machine learning based inferences, the method comprising:
accessing a test input and N class identifiers, wherein each class identifier of the N class identifiers identifies a respective class among M possible classes;
forming N test input data structures, wherein each test input data structure of the N test input data structures is formed by aggregating the test input with a different one of the N class identifiers;
generating an inference for each of the N test input data structures using a machine learning model that is trained using examples associating example input data structures with respective example outputs, wherein each respective example input data structure is formed by aggregating an example input with a different one of the N class identifiers; and
returning a class-dependent inference result for each respective test input data structure based on the inference generated for each respective test input data structure.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further including, prior to accessing the test input:
accessing a training set including the examples associating the example input data structures with the respective example outputs; and
training the machine learning model according to the examples.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein:
inferences are generated based on N sets of features extracted from the N input data structures, respectively; and
the machine learning model is a model trained based on features extracted from the example input data structures.

### Claim 4 (depends on 3)

The computer-implemented method of claim 3, wherein:
each of the N test input data structures is formed by concatenating a string representing the test input with a string representing the different one of the N identifiers; and
each of the example input data structures used to train the machine learning model are formed by concatenating a string representing the example input with the string representing the different one of the N class identifiers.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein:
the N sets of features are extracted from tokenized versions of the N input data structures;
the machine learning model is trained based on features extracted from tokenized versions of the example input data structures; and
each of the tokenized versions of the N input data structures and the tokenized versions of the example input data structures are obtained by applying a same tokenization algorithm.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein:
the machine learning model includes an encoder-decoder structure, including one or more encoders connected to one or more decoders, wherein each of the encoders and each of the decoders involves an attention layer and a feed-forward neural network, interoperating so as to generate the inference for each of the N test in put data structures by predicting probabilities of possible outputs.

### Claim 7 (depends on 5)

The computer-implemented method of claim 5, wherein:
the strings representing the test input, the example inputs, and the class identifiers are strings obtained according to a same set of syntactic rules; and
the tokenization algorithm is devised in accordance with the syntactic rules.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, further comprising:
generating respective tokens from the strings representing the N class identifier based on the tokenization algorithm.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein:
the strings representing the test input data structures and the strings representing the example data input structures are ASCII strings specifying structures of chemical species corresponding to chemical reaction products; and
each the example outputs used to train the machine learning model are ASCII strings formed by aggregating specifications of structures of two or more precursors of the chemical reaction products.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein:
the ASCII strings are formulated according to a simplified molecular-input line-entry system.

### Claim 11 (depends on 1)

The computer-implemented method of claim 1, wherein:
the M possible classes include one or more of the following categories of chemical reactions: heteroatom alkylation and arylation, acylation, c—c bond forming, aromatic heterocycle formation, deprotection, protection, reduction, oxidation, functional group interconversion, functional group addition, and resolution; and
a miscellaneous class for unrecognized chemical reactions.

### Claim 12

The computer-implemented method 11, wherein:
the M possible classes include classes pertaining to each of the chemical reactions.

### Claim 13 (depends on 1)

The computer-implemented method of claim 1, wherein M≥N≥2.

### Claim 14 (depends on 1)

The computer-implemented method of claim 1, wherein N=M.

### Claim 15 (depends on 1)

The computer-implemented method of claim 1, further comprising:
automatically selecting the n class identifier based on the accessed test input, wherein N<M.

### Claim 16 (depends on 1)

The computer-implemented method of claim 1, further comprising, prior to accessing the test input and the N class identifiers:
receiving a user selection of the test input and the N class identifiers.

### Claim 17

A computer-implemented method of machine learning based retrosynthesis planning, the method comprising:
accessing a test input and N class identifiers, wherein the test input is a string specifying a structure of a chemical species corresponding to a chemical reaction product, and wherein each class identifier of the N class identifiers is a string identifying a respective class among M possible classes of chemical reactions;
forming N test input data structures, wherein each test input data structure of the N test input data structures is formed by concatenating the test input with a different one of the N class identifiers;
generating an inference for each of the N test input data structures using a machine learning model that is trained using examples associating example input data structures with respective example outputs, wherein each respective example input data structure is formed by concatenating an example input with a different one of the N class identifiers, each respective input data structure is a string specifying structures of chemical species corresponding to chemical reaction products, and each respective example output is a string formed by aggregating specifications of structures of two or more precursors of the chemical reaction products; and
returning a class-dependent inference result for each respective test input data structure based on the inference generated for each respective test input data structure.

### Claim 18 (depends on 17)

The computer-implemented method of claim 17, further comprising:
performing a chemical reaction according to the class-dependent inference results returned.

### Claim 19 (depends on 17)

The computer-implemented method of claim 17, wherein:
the strings representing the test input, the example inputs, the example outputs, and the N class identifiers are strings formed according to a same set of syntactic rules; and
the same set of syntactic rules are in accordance with a simplified molecular-input line-entry system.

### Claim 20

A computer system for performing class-dependent, machine learning based inferences, the computer system comprising:
one or more computer processors,
one or more computer readable storage media, and
program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions including instructions to:
access a test input and N class identifiers, wherein each class identifier of the N class identifiers identifies a respective class among M possible classes;
form N test input data structures, wherein each test input data structure of the N test input data structures is formed by aggregating the test input with a different one of the N class identifiers;
generate an inference for each of the N test input data structures using a machine learning model that is trained using examples associating example input data structures with respective example outputs, wherein each respective example input data structure is formed by aggregating an example input with a different one of the N class identifiers; and
return a class-dependent inference result for each respective test input data structure based on the inference generated for each respective test input data structure.
