# US 2023/0067528 A1 · Multimodal domain embeddings via contrastive learning

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

- Number: US 2023/0067528 A1
- Document ID: US20230067528A1
- Status: Published application
- Kind: A1
- Application number: 17/410,701
- Filed: 2021-08-24
- Published: 2023-03-02
- Earliest claimed: 2021-08-24
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Zhihui GUO; Pramod Kumar SHARMA; Liang DU; Robin ABRAHAM
- Web page: https://patentgrep.com/patent/US20230067528A1

## CPC

- G16B 15/00: ICT specially adapted for analysing two-dimensional [2D] or three-dimensional [3D] molecular structures, e.g. structural or functional relations or structure alignment
- G16C 20/70: Machine learning, data mining or chemometrics
- G06F 18/2155: {characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling}
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G16H 70/40: relating to drugs, e.g. their side effects or intended usage
- G06N 3/048: Activation functions
- G16C 20/30: Prediction of properties of chemical compounds, compositions or mixtures
- G16C 20/40: Searching chemical structures or physicochemical data
- G16B: BIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
- 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
- G16H: HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA

## Abstract

Systems and methods are provided for building and training machine learning models configured to generate in-domain embeddings and perform multimodal analysis inside the same domain. The models include a first encoder trained to receive input from one or more entities represented in a first modality and to encode the one or more entities in the first modality, such that the first encoder is configured to output a first set of embeddings. The models also include a second encoder trained to receive input from one or more entities represented in the second modality and to encode the one or more entities in the second modality, such that the second encoder is configured to output a second set of embeddings. The models also include a projection layer configured to project the first set of embeddings and the second set of embeddings to a shared contrastive space.

## Claims

### Claim 1

A computing system configured to build a machine learning model that is trainable to perform in-domain embedding analysis, the computing system comprising:
one or more processors; and
one or more hardware storage devices storing one or more computer-readable instructions that are executable by the one or more processors to configure the computing system to at least:
obtain a first encoder of the machine learning model trained to receive one or more entities represented in a first modality and encode the one or more entities in the first modality such that the first encoder is configured to output a first set of embeddings;
obtain a second encoder of the machine learning model trained to receive as input one or more entities represented in a second modality and encode the one or more entities in the second modality such that the second encoder is configured to output a second set of embeddings; and
configure a projection layer of the machine learning model to project the first set of embeddings and the second set of embeddings to a shared contrastive space.

### Claim 2 (depends on 1)

The computing system of claim 1, the one or more computer-readable instructions being further executable to further configure the computing system to:
train a first tokenizer of the machine learning model to tokenize the one or more entities in the first modality into a first set of tokens prior to the first encoder receiving as input the one or more entities in the first modality; and
train a second tokenizer of the machine learning model to tokenize the one or more entities in the second modality into a second set of tokens prior to the second encoder receiving as input the one or more entities in the second modality, the first encoder and second encoder being configured to receive the first set of tokens and second set of tokens at a global level.

### Claim 3 (depends on 1)

The computing system of claim 1, the one or more computer-readable instructions being further executable to further configure the computing system to:
configure a global average pooling layer of the machine learning model to integrate the first set of embeddings and second set of embeddings prior to the projection layer projecting the first set of embeddings and second set of embeddings to the shared contrastive space.

### Claim 4

A computing system configured to train a machine learning model to perform in-domain embedding analysis, the computing system comprising:
one or more processors; and
one or more hardware storage devices storing one or more computer-readable instructions that are executable by the one or more processors to configure the computing system to at least:
obtain a machine learning model comprising a first encoder trained to encode embeddings in a first modality and a second encoder trained to encode embeddings in a second modality, wherein the machine learning model is configured to project a first set of encodings output from the first encoder and a second set of encodings output from the second encoder to a shared contrastive embedding space;
obtain a training dataset comprising a first dataset comprising data objects in the first modality and a second dataset comprising data objects in the second modality, each data object in the first dataset corresponding to a different data object in the second dataset such that the training dataset comprises a set of candidate cross-modal pairs;
apply the first dataset in the first modality to the first encoder to obtain a first output;
apply the second dataset in the second modality to the second encoder to obtain a second output;
project the first output and the second output to the shared contrastive embedding space; and
apply a contrastive loss function to obtain a multi-modal dataset comprising a set of positive pairs and a set of negative pairs relating the first dataset in the first modality to the second dataset in the second modality.

### Claim 5 (depends on 4)

The computing system of claim 4, the one or more computer-readable instructions being further executable to further configure the computing system to:
applying one or more target entities in the first modality to the machine learning model to obtain a third output in the first modality.

### Claim 6 (depends on 5)

The computing system of claim 5, the one or more computer-readable instructions being further executable to further configure the computing system to:
applying the third output of a target entity in the first modality as a query to obtain entities predicted to be similar to the target entity.

### Claim 7 (depends on 5)

The computing system of claim 5, wherein the third output of the one or more target entities comprises a cluster map.

### Claim 8 (depends on 7)

The computing system of claim 7, the one or more computer-readable instructions being further executable to further configure the computing system to:
based on information obtained for a particular modality, identifying hidden links among clusters included in the cluster map.

### Claim 9 (depends on 4)

The computing system of claim 4, the one or more computer-readable instructions being further executable to further configure the computing system to:
obtain a third output of a target entity in the first modality to obtain one or more entities in the second modality that are predicted to be similar to the target entity.

### Claim 10 (depends on 4)

The computing system of claim 4 the one or more computer-readable instructions being further executable to further configure the computing system to:
applying one or more target entities in the first modality to the machine learning model to obtain a third output in the first modality, and applying entities in the second modality to the machine learning model to obtain fourth output in the second modality, wherein the third output comprises a cluster map in the first modality and the fourth output comprises a cluster map in the second modality; and
identify a link between a particular cluster in the first modality to one or more clusters in the second modality based on a set of cluster properties extracted from the cluster map.

### Claim 11 (depends on 4)

The computing system of claim 4, the one or more computer-readable instructions being further executable to further configure the computing system to:
apply a target entity in the first modality and an entity corresponding to the target entity in the second modality at a same time to the machine learning model to obtain a fifth output configured as a general representation of the entity in a particular domain.

### Claim 12 (depends on 11)

The computing system of claim 11, wherein the fifth output comprises a cluster map of entities in a general representation space.

### Claim 13

A method for training a machine learning model to perform molecular similarity analysis, the method comprising:
obtaining a machine learning model comprising a first encoder configured to encode embeddings in a first molecular modality and a second encoder configured to encode embeddings in a second molecular modality, wherein the machine learning model is configured to project a first set of encodings output from the first encoder and a second set of encodings output from the second encoder to a multimodal molecular embedding space;
obtaining a training dataset comprising a first dataset comprising molecular representations in the first molecular modality and a second dataset comprising molecular representations in the second molecular modality, each molecular representation in the first dataset (i) being associated with a particular molecule and (ii) corresponding to at least one molecular representation in the second dataset that is associated with the particular molecule, such that the training dataset comprises a set of candidate cross-modal molecular pairs; and
training the machine learning model with the training dataset to configure the machine learning model to perform molecular similarity analysis by at least:
applying the first dataset in the first molecular modality to the first encoder to obtain a first set of molecular embeddings;
applying the second dataset in the second molecular modality to the second encoder to obtain a second set of molecular embeddings;
projecting the first set of molecular embeddings and the second set of molecular embeddings to the multimodal molecular embedding space; and
applying a contrastive loss function to obtain a multimodal dataset comprising a set of positive pairs and a set of negative pairs relating the first dataset in the first molecular modality to the second dataset in the second molecular modality, such that the machine learning model is trained to predict molecular similarity based on learning the set of positive pairs and set of negative pairs.

### Claim 14 (depends on 13)

The method of claim 13, wherein the training dataset is an unlabeled dataset such that the machine learning model is trained on the training dataset under self-supervision.

### Claim 15 (depends on 13)

The method of claim 13, wherein the first molecular modality is SMILES and the second molecular modality is IUPAC.

### Claim 16 (depends on 13)

The method of claim 13, further comprising:
receiving a user input comprising a query to find one or more candidate molecules that are predicted to be similar to a target molecule;
calculating one or more similarity score(s) between the target molecule and one or more candidate molecules;
based on the one or more similarity score(s), determining a ranking of the one or more candidate molecules; and
returning a list of the one or more candidate molecules to a user, the list organized according to the ranking.

### Claim 17 (depends on 16)

The method of claim 16, wherein the target molecule and the one or more candidate molecules are represented in a same modality.

### Claim 18 (depends on 16)

The method of claim 16, wherein the target molecule is represented in the first molecular modality and the one or more candidate molecules are represented in the second molecular modality.

### Claim 19 (depends on 13)

The method of claim 13, further comprising:
prior to applying the first dataset in the first molecular modality to the first encoder, tokenizing the first dataset to obtain a first set of token vectors associated with the first molecular modality; and
prior to applying the second dataset in the second molecular modality to the second encoder, tokenizing the second dataset to obtain a second set of token vectors associated with the second molecular modality,
wherein the first set of token vectors is applied to the first encoder and the second set of token vectors is applied to the second encoder, each set of token vectors being applied to its respective encoder at a global molecule level.

### Claim 20 (depends on 13)

The method of claim 13, further comprising:
receiving a user input configured to query a database of drugs with a target drug; and
predicting that the target drug is similar to one or more drugs included in the database of drugs.
