# US 2026/0301884 A1 · Learning High Order Structures from Molecular SMILES/SELFIES Strings with Transformers

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

- Number: US 2026/0301884 A1
- Document ID: US20260301884A1
- Status: Published application
- Kind: A1
- Application number: 19/096,262
- Filed: 2025-03-31
- Published: 2026-10-01
- Earliest claimed: 2025-03-31
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Thanh Lam Hoang; Raúl Fernández Díaz; Mykhaylo Zayats; Vanessa Lopez Garcia
- Web page: https://patentgrep.com/patent/US20260301884A1

## CPC

- G16C 20/70: Machine learning, data mining or chemometrics
- G16C 20/90: Programming languages; Computing architectures; Database systems; Data warehousing
- G16C: COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE

## Abstract

A computer-implemented method to improve the performance of transformers in learning molecular representations from SMILES/SELFIES strings is presented. More specifically, an illustrative embodiment includes transformers learning high-order interaction between important substructures of molecules, and thus enhancing the ability of those transformers to learn and predict drug-related properties from molecular representations. According to other illustrative embodiments, a computer system and computer program product for improving the performance of transformers in learning molecular representations from SMILES/SELFIES strings are provided.

## Claims

### Claim 1

A computer implemented method, comprising:
encoding, using a set of processors, a molecular graph of a chemical molecule into a sequence string representation of the chemical molecule;
masking, using a machine learning model, all tokens in the sequence string representation corresponding to a chemical substructure within the molecular graph of the chemical molecule using a plurality of discontinuous substrings in the sequence string representation, wherein the plurality of discontinuous substrings in the sequence string representation correspond to a plurality of connected subgraphs in the molecular graph;
generating, using the machine learning model, a concise representation comprising a hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures; and
training the set of transformer structures of the machine learning model to predict the hash vector.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the sequence string representation comprises at least one of a SMILES representation and a SELFIES representation.

### Claim 3 (depends on 1)

The computer implemented method of claim 1, wherein masking comprises masking all tokens corresponding to atoms in the plurality of connected subgraphs in the molecular graph within a non-zero maximum distance r from an origin atom A.

### Claim 4 (depends on 3)

The computer implemented method of claim 3, wherein generating the concise representation comprising the hash vector representing the plurality of discontinuous substrings in the sequence string representation comprises iteratively hashing a concatenation of atoms and bonds within the non-zero maximum distance r from the origin atom A.

### Claim 5 (depends on 3)

The computer implemented method of claim 3, wherein the molecular graph comprises a 3-dimensional molecular graph.

### Claim 6 (depends on 1)

The computer implemented method of claim 1, further comprising, after coding, masking at least one individual token in the sequence string representation.

### Claim 7 (depends on 6)

The computer implemented method of claim 6, wherein training the set of transformer structures of the machine learning model comprises training to predict both the hash vector and the at least one individual token in the sequence string representation.

### Claim 8 (depends on 1)

The computer implemented method of claim 1, further comprising:
masking, using the machine learning model, all tokens in the sequence string representation corresponding to another chemical substructure within the molecular graph of the chemical molecule using another plurality of discontinuous substrings in the sequence string representation; and
generating, using the machine learning model, another concise representation comprising another hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures,
wherein training the set of transformer structures of the machine learning model comprises training the set of transformer structures of the machine learning model comprises to predict the another hash vector.

### Claim 9 (depends on 1)

The computer implemented method of claim 1, further comprising assessing, using the machine learning model, at least one drug property of a candidate chemical molecule based on at least one of absorption, distribution, metabolism, excretion, and toxicity.

### Claim 10 (depends on 8)

The computer implemented method of claim 8, further comprising, responsive to assessing, chemically synthesizing the chemical molecule.

### Claim 11 (depends on 8)

The computer implemented method of claim 8, further comprising, responsive to assessing, trialing the molecule comprising administering at least one sample of the chemical molecule to at least one specimen.

### Claim 12

A computer system comprising:
a processor set;
a set of one or more computer readable storage media;
program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations:
encoding, using the processor set, a molecular graph of a chemical molecule into a sequence string representation of the chemical molecule;
masking, using a machine learning model, all tokens in the sequence string representation corresponding to a chemical substructure within the molecular graph of the chemical molecule using a plurality of discontinuous substrings in the sequence string representation, wherein the plurality of discontinuous substrings in the sequence string representation correspond to a plurality of connected subgraphs in the molecular graph;
generating, using the machine learning model, a concise representation comprising a hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures; and
training the set of transformer structures of the machine learning model to predict the hash vector.

### Claim 13 (depends on 12)

The computer system of claim 12, wherein the sequence string representation comprises at least one of a SMILES representation and a SELFIES representation.

### Claim 14 (depends on 12)

The computer system of claim 12, wherein masking comprises masking all tokens corresponding to atoms in the plurality of connected subgraphs in the molecular graph within a non-zero maximum distance r from an origin atom A.

### Claim 15 (depends on 14)

The computer system of claim 14, wherein generating the concise representation comprising the hash vector representing the plurality of discontinuous substrings in the sequence string representation comprises iteratively hashing a concatenation of atoms and bonds within the non-zero maximum distance r from the origin atom A.

### Claim 16 (depends on 14)

The computer system of claim 14, wherein the molecular graph comprises a 3-dimensional molecular graph.

### Claim 17

A computer program product comprising:
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more storage media, for causing a processor set to perform the following computer operations:
encoding, using a set of processors, a molecular graph of a chemical molecule into a sequence string representation of the chemical molecule;
masking, using a machine learning model, all tokens in the sequence string representation corresponding to a chemical substructure within the molecular graph of the chemical molecule using a plurality of discontinuous substrings in the sequence string representation, wherein the plurality of discontinuous substrings in the sequence string representation correspond to a plurality of connected subgraphs in the molecular graph;
generating, using the machine learning model, a concise representation comprising a hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures; and
training the set of transformer structures of the machine learning model to predict the hash vector.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the sequence string representation comprises at least one of a SMILES representation and a SELFIES representation.

### Claim 19 (depends on 17)

The computer program product of claim 17, wherein masking comprises masking all tokens corresponding to atoms in the plurality of connected subgraphs in the molecular graph within a non-zero maximum distance r from an origin atom A.

### Claim 20 (depends on 19)

The computer program product of claim 19, wherein generating the concise representation comprising the hash vector representing the plurality of discontinuous substrings in the sequence string representation comprises iteratively hashing a concatenation of atoms and bonds within the non-zero maximum distance r from the origin atom A.

### Claim 21 (depends on 19)

The computer program product of claim 19, wherein the molecular graph comprises a 3-dimensional molecular graph.

### Claim 22

A computer implemented method, comprising:
encoding, using a set of processors, a molecular graph of a chemical molecule into a sequence string representation of the chemical molecule;
masking, using a machine learning model, all tokens in the sequence string representation corresponding to a chemical substructure within the molecular graph of the chemical molecule using a plurality of discontinuous substrings in the sequence string representation, wherein the plurality of discontinuous substrings in the sequence string representation correspond to a plurality of connected subgraphs in the molecular graph;
generating, using the machine learning model, a concise representation comprising a hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures; and
training the set of transformer structures of the machine learning model to predict the hash vector,
wherein the sequence string representation comprises at least one of a SMILES representation and a SELFIES representation, and
wherein masking comprises masking all tokens corresponding to atoms in the plurality of connected subgraphs in the molecular graph within a non-zero maximum distance r from an origin atom A.

### Claim 23 (depends on 22)

The computer implemented method of claim 22, wherein generating the concise representation comprising the hash vector representing the plurality of discontinuous substrings in the sequence string representation comprises iteratively hashing a concatenation of atoms and bonds within the non-zero maximum distance r from the origin atom A.

### Claim 24

A computer system comprising:
a processor set;
a set of one or more computer readable storage media;
program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations:
encoding, using the processor set, a molecular graph of a chemical molecule into a sequence string representation of the chemical molecule;
masking, using a machine learning model, all tokens in the sequence string representation corresponding to a chemical substructure within the molecular graph of the chemical molecule using a plurality of discontinuous substrings in the sequence string representation, wherein the plurality of discontinuous substrings in the sequence string representation correspond to a plurality of connected subgraphs in the molecular graph;
generating, using the machine learning model, a concise representation comprising a hash vector representing the plurality of discontinuous substrings in the sequence string representation, wherein the machine learning model comprises a set of transformer structures; and
training the set of transformer structures of the machine learning model to predict the hash vector,
wherein the sequence string representation comprises at least one of a SMILES representation and a SELFIES representation, and
wherein masking comprises masking all tokens corresponding to atoms in the plurality of connected subgraphs in the molecular graph within a non-zero maximum distance r from an origin atom A.

### Claim 25 (depends on 24)

The computer system of claim 24, wherein generating the concise representation comprising the hash vector representing the plurality of discontinuous substrings in the sequence string representation comprises iteratively hashing a concatenation of atoms and bonds within the non-zero maximum distance r from the origin atom A.
