Method and apparatus for predicting affinity of antibody sequence to antigen sequence, and computer device and storage medium

The characteristics of antigen sequences and antibody sequences are extracted and fused by computer equipment to predict their affinity, solving the problem of difficulty in predicting the affinity of antibody sequences for antigen sequences in the prior art, improving the accuracy and efficiency of prediction, and promoting immunotherapy and vaccines design.

WO2024234815A1PCT designated stage expired Publication Date: 2024-11-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/082139
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-18
Filing Date
2024-03-18
Publication Date
2024-11-21

AI Technical Summary

Technical Problem

The prior art lacks effective methods to predict the affinity of antibody sequences for antigen sequences, which affects the development of immunotherapy and vaccine design.

Method used

Information about antigen sequences and antibody sequences is obtained through computer equipment, antigen sequence characteristics, light chain sequence characteristics and heavy chain sequence characteristics are extracted, and they are fused for full ligation to predict the affinity of antibody sequences for antigen sequences.

Benefits of technology

It improves the accuracy and efficiency of antibody sequence affinity prediction for antigen sequences, and promotes the progress of immunotherapy and vaccine design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082139_21112024_PF_FP_ABST
    Figure CN2024082139_21112024_PF_FP_ABST
Patent Text Reader

Abstract

A method for predicting the affinity of an antibody sequence to an antigen sequence. The method is executed by a computer device, and comprises: acquiring antigen sequence information and antibody sequence information, wherein the antibody sequence information comprises light chain sequence information and heavy chain sequence information of the antibody sequence, the antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in a light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in a heavy chain of the antibody sequence (301); extracting antigen sequence features from the antigen sequence information, extracting light chain sequence features from the light chain sequence information, and extracting heavy chain sequence features from the heavy chain sequence information (302); fusing the antigen sequence features, the light chain sequence features, and the heavy chain sequence features to obtain fused sequence features (303); and performing full connection on the fused sequence features to obtain an affinity detection result, wherein the affinity detection result represents the affinity of the antibody sequence to the antigen sequence (304).
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, computer equipment and storage medium for predicting affinity of antibody sequence to antigen sequence

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 202310562554X, filed on May 18, 2023, entitled “Affinity Prediction Method, Apparatus, Computer Equipment and Storage Medium,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for predicting the affinity of an antibody sequence for an antigen sequence. Background Art

[0004] Antigen sequences are substances that the immune system needs to eliminate. They can induce an immune response and bind to the antibody sequences produced by the immune response, triggering immune defense and playing a vital role in maintaining human health. Studying the affinity of antibody sequences for specific antigen sequences is crucial for understanding the immune system and can further facilitate the design and development of immunotherapies and vaccines. Therefore, a method for predicting the affinity of antibody sequences for specific antigen sequences is urgently needed.

[0005] Summary of the Invention

[0006] The present invention provides a method, apparatus, computer device, and storage medium for predicting the affinity of an antibody sequence for an antigen sequence. The technical solution is as follows:

[0007] In one aspect, a method for predicting the affinity of an antibody sequence for an antigen sequence is provided, the method being performed by a computer device, the method comprising:

[0008] Obtaining antigen sequence information and antibody sequence information, wherein the antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence, wherein the antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence;

[0009] Extracting antigen sequence features from the antigen sequence information, extracting light chain sequence features from the light chain sequence information, and extracting heavy chain sequence features from the heavy chain sequence information;

[0010] fusing the antigen sequence signature, the light chain sequence signature, and the heavy chain sequence signature to obtain a fusion sequence signature; and

[0011] The fusion sequence features are fully connected to obtain an affinity test result, which represents the affinity of the antibody sequence to the antigen sequence.

[0012] In another aspect, a device for predicting affinity of an antibody sequence for an antigen sequence is provided, the device comprising:

[0013] an information acquisition module, configured to acquire antigen sequence information and antibody sequence information, wherein the antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence, wherein the antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence;

[0014] a feature extraction module, configured to extract antigen sequence features from the antigen sequence information, extract light chain sequence features from the light chain sequence information, and extract heavy chain sequence features from the heavy chain sequence information;

[0015] a feature fusion module, configured to fuse the antigen sequence feature, the light chain sequence feature, and the heavy chain sequence feature to obtain a fusion sequence feature; and

[0016] The full connection module is used to perform full connection on the fusion sequence features to obtain an affinity test result, wherein the affinity test result represents the affinity of the antibody sequence to the antigen sequence.

[0017] The first key feature, the first value feature and the first query feature are fused. The second key feature, the second value feature and the second query feature are fused. On the other hand, a computer device is provided, which includes a processor and a memory, and the memory stores at least one computer program. The at least one computer program is loaded and executed by the processor to implement the method for predicting the affinity of the antibody sequence to the antigen sequence as described in the above aspects.

[0018] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method for predicting the affinity of an antibody sequence for an antigen sequence as described in the above aspects.

[0019] On the other hand, a computer program product is provided, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the method for predicting affinity of an antibody sequence for an antigen sequence as described in the above aspects.

[0020] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.

[0022] FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0023] FIG2 is a schematic diagram of the combination of an antigen sequence and an antibody sequence provided in an embodiment of the present application;

[0024] FIG3 is a flow chart of a method for predicting affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application;

[0025] FIG4 is a schematic diagram of the structure of an affinity prediction model provided in an embodiment of the present application;

[0026] FIG5 is a flow chart of a method for predicting affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application;

[0027] FIG6 is a schematic diagram of extracting antigen sequence characteristics provided in an embodiment of the present application;

[0028] FIG7 is a schematic diagram of the structure of an MF-CNN model provided in an embodiment of the present application;

[0029] FIG8 is a flow chart of a method for training an affinity prediction model provided in an embodiment of the present application;

[0030] FIG9 is a flow chart of a pre-training method for an antigen encoding network provided in an embodiment of the present application;

[0031] FIG10 is a flowchart of a pre-training method for a light chain encoding network provided in an embodiment of the present application;

[0032] FIG11 is a flowchart of a light chain encoding network pre-training method provided in an embodiment of the present application;

[0033] FIG12 is a schematic diagram of a performance test result provided in an embodiment of the present application;

[0034] FIG13 is a schematic diagram of another performance test result provided in an embodiment of the present application;

[0035] FIG14 is a schematic diagram of the structure of an apparatus for predicting affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application;

[0036] FIG15 is a schematic structural diagram of another apparatus for predicting affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application;

[0037] FIG16 is a schematic structural diagram of a terminal provided in an embodiment of the present application;

[0038] FIG17 is a schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0040] It is understood that the terms "first," "second," and the like used herein may be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are used solely to distinguish one concept from another. For example, a first semantic feature may be referred to as a second semantic feature, and similarly, a second semantic feature may be referred to as a first semantic feature, without departing from the scope of this application.

[0041] Here, "at least one" refers to one or more than one. For example, at least one antibody sequence can be one antibody sequence, two antibody sequences, three antibody sequences, or any other integer greater than or equal to one. "A plurality" refers to two or more than two. For example, a plurality of antibody sequences can be two antibody sequences, three antibody sequences, or any other integer greater than or equal to two. "Each" refers to each of at least one. For example, "each antibody sequence" refers to each antibody sequence in a plurality of antibody sequences. If the plurality of antibody sequences is three antibody sequences, "each antibody sequence" refers to each antibody sequence in the three antibody sequences.

[0042] It is understandable that in the embodiments of this application, related data such as antigen sequence information and antibody sequence information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0043] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0044] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.

[0045] Natural language processing (NLP) is a key area of ​​research in computer science and artificial intelligence. It studies the theories and methods that enable effective communication between humans and computers using natural language. Natural language processing integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use in everyday life—and is closely linked to the study of linguistics.

[0046] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0047] The following describes the method for predicting the affinity of an antibody sequence for an antigen sequence provided in the examples of the present application based on artificial intelligence technology and machine learning technology.

[0048] The method for predicting the affinity of an antibody sequence to an antigen sequence provided in the embodiments of the present application can be used in a computer device. Optionally, the computer device is a terminal or a server. Optionally, the server is an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network) and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto.

[0049] In one possible implementation, the computer program involved in the embodiments of the present application can be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected through a communication network. Multiple computer devices distributed at multiple locations and interconnected through a communication network can constitute a blockchain system.

[0050] FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to FIG1 , the implementation environment includes: a terminal 101 and a server 102. Terminal 101 and server 102 are connected via a wireless or wired network. Optionally, server 102 is used to train an affinity prediction model, which is used to predict the affinity of an antibody sequence for an antigen sequence. Server 102 sends the trained affinity prediction model to terminal 101, which can then use the affinity prediction model to predict the affinity of the antibody sequence for the antigen sequence.

[0051] It should be noted that Figure 1 only uses the example of server 102 training the affinity prediction model and sending it to terminal 101. In another embodiment, the server can also predict the affinity of the antibody sequence to the antigen sequence through the affinity prediction model, and then send the predicted affinity test result to terminal 101.

[0052] The method for predicting the affinity of an antibody sequence for an antigen sequence provided in the embodiments of the present application can be applied to any scenario where the affinity of an antibody sequence for an antigen sequence needs to be detected.

[0053] In drug development, understanding the affinity of antibody sequences for antigen sequences is crucial for developing high-affinity antibody sequences or selecting appropriate antigen sequences. In immunodiagnosis, predicting the affinity of antibody sequences for antigen sequences can assist in the development of highly sensitive and specific diagnostic kits. High-affinity antibody sequences can more easily bind to and detect antigen sequences, thereby improving diagnostic accuracy and sensitivity. Furthermore, in vaccine development, predicting the affinity of antibody sequences for antigen sequences can assist in evaluating the potential protective effects of vaccine candidates. High-affinity antibody sequences can effectively bind to and eliminate pathogens, thereby enhancing the protective efficacy of vaccines.

[0054] Figure 2 is a schematic diagram of the combination of an antigen sequence and an antibody sequence provided in an embodiment of the present application. As shown in Figure 2, the antigen sequence includes a Heavy Chain and a Light Chain. The light chain and the heavy chain respectively include a series of variable regions and constant regions. The variable region contains the CDR (Complementarity Determining Region) that the antibody sequence recognizes a specific antigen sequence, including the important CDR3 (Complementarity Determining Region). CDR3 is the most diverse and important region in the antibody structure, and it plays a key role in antibody recognition of antigens. CDRH3 is the CDR3 of the heavy chain. Among them, the amino group of an amino acid and the carboxyl group of another amino acid can condense into a peptide. The antigen sequence and the antibody sequence are combined, and the size of the affinity can be used to measure the tightness of the combination. Assuming that the light chain and heavy chain of the antigen sequence and the antibody sequence contain the key information required to describe the affinity of the combination, the light chain and heavy chain of the antigen sequence and the antibody sequence can be used to predict the affinity of the antigen sequence and the antibody sequence.

[0055] FIG3 is a flow chart of a method for predicting affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG3 , the method includes:

[0056] 301. The computer device obtains antigen sequence information and antibody sequence information. The antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence. The antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence.

[0057] Antigen sequences are substances that the immune system needs to eliminate. Antigen sequences can induce an immune response in the body and can bind to antibody sequences produced by the immune response to produce immune defense (specific reaction). Antigen sequences are composed of amino acids. Antibody sequences are proteins specifically synthesized by the immune system, also known as immunoglobulins. Antibody sequences can recognize and bind to pathogens that invade the human body, such as bacteria, viruses, fungi, etc., and play an important role in the immune response. Antibody sequences include heavy chains and light chains. The variable regions of heavy chains and light chains can specifically bind to antigen sequences. The heavy chain is the large polypeptide subunit of the antibody sequence, while the light chain is the small polypeptide subunit of the antibody sequence. Antibodies are usually composed of four polypeptide chains, namely two identical light chains with a smaller relative molecular mass and two identical heavy chains with a larger relative molecular mass. Antibodies are symmetrical structures connected by disulfide bonds.

[0058] In an embodiment of the present application, a computer device obtains antigen sequence information of an antigen sequence and antibody sequence information of an antibody sequence, wherein the antigen sequence and the antibody sequence are antigen sequences and antibody sequences for which affinity is to be predicted, and the antigen sequence can be a complete antigen or a portion of a complete antigen sequence, for example, the antigen sequence can be a portion of a sequence consisting of amino acids of an antigenic epitope of an antigen, and the antigenic epitope is also called an antigenic determinant, which refers to a site on an antigen that can specifically bind to an antibody binding site and determine the specificity of the antigen. The antibody sequence can be a complete antibody or a portion of a complete antibody sequence, for example, the antibody sequence can be a portion of a sequence consisting of amino acids in a variable region of an antibody, and the variable region of an antibody comprises a decisive region in the antibody that recognizes a specific antigen.

[0059] The antibody sequence information includes the light chain sequence information and heavy chain sequence information of the antibody sequence. The light chain sequence information represents the amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents the amino acids in the heavy chain of the antibody sequence. Considering that the light chain and heavy chain of the antibody sequence each contain key information required to describe the binding affinity, this application separates the sequence information of the light chain and heavy chain and processes them separately.

[0060] 302. The computer device extracts antigen sequence features from the antigen sequence information, extracts light chain sequence features from the light chain sequence information, and extracts heavy chain sequence features from the heavy chain sequence information.

[0061] After obtaining the antigen sequence information, light chain sequence information, and heavy chain sequence information, the computer device performs feature extraction on the antigen sequence information to obtain an antigen sequence feature, which represents the type of each amino acid in the antigen sequence and the connection structure of multiple amino acids. The computer device extracts a light chain sequence feature from the light chain sequence information, which represents the type of each amino acid in the light chain of the antibody sequence and the connection structure of multiple amino acids. The computer device extracts a heavy chain sequence feature from the heavy chain sequence information, which represents the type of each amino acid in the heavy chain of the antibody sequence and the connection structure of multiple amino acids.

[0062] Among them, the antigen sequence features, light chain sequence features and heavy chain sequence features can be features in the form of vectors or matrix forms, etc., which is not limited in the embodiments of the present application.

[0063] 303. The computer device fuses the antigen sequence characteristics, the light chain sequence characteristics and the heavy chain sequence characteristics to obtain a fusion sequence characteristic.

[0064] After acquiring the antigen sequence features, light chain sequence features, and heavy chain sequence features, the computer device fuses the antigen sequence features, light chain sequence features, and heavy chain sequence features to generate a fusion sequence feature. This fusion sequence feature encompasses the features of the antigen sequence, light chain, and heavy chain, enriching the feature expression of the fusion sequence feature.

[0065] 304. The computer device performs full connection on the fusion sequence features to obtain an affinity test result, which indicates the affinity of the antibody sequence to the antigen sequence.

[0066] Since the fusion sequence features obtained by the computer equipment cover the features of the antigen sequence, the features of the light chain, and the features of the heavy chain, and the antigen sequence, light chain, and heavy chain contain the key information required to describe the affinity of the binding, affinity test results for the antigen sequence and antibody sequence can be obtained by fully connecting the fusion sequence features. Among them, the process of fully connecting the fusion sequence features is also the process of affinity prediction based on the fusion sequence features, that is, the process of performing regression based on the fusion sequence features to obtain affinity test results for the antigen sequence and antibody sequence.

[0067] The method provided in the embodiments of the present application comprehensively considers the characteristics of the amino acids in the antigen sequence, the characteristics of the amino acids in the light chain of the antibody sequence, and the characteristics of the amino acids in the heavy chain of the antibody sequence when predicting the affinity of the antibody sequence for the antigen sequence. From the two aspects of the heavy chain and the light chain, the potential connection between the characteristics of the amino acids in the antigen sequence and the characteristics of the amino acids in the light chain and the characteristics of the amino acids in the heavy chain is considered, thereby predicting the affinity of the antibody sequence for the antigen sequence. Not only is the factor considered more comprehensive, but also the heavy chain and light chain are divided into two granularities, which is conducive to improving the accuracy of the predicted affinity.

[0068] In another embodiment, a computer device stores an affinity prediction model for predicting the affinity of an antibody sequence for an antigen sequence. FIG4 is a schematic diagram of the structure of an affinity prediction model provided in an embodiment of the present application. As shown in FIG4 , the affinity prediction model includes: an antigen encoding network, a light chain encoding network, a heavy chain encoding network, a fusion network, and a fully connected network.

[0069] The antigen encoding network, light chain encoding network, and heavy chain encoding network are each connected to the fusion network, which is then connected to the fully connected network. The antigen encoding network is used to extract features from antigen sequence information, the light chain encoding network is used to extract features from light chain sequence information, and the heavy chain encoding network is used to extract features from heavy chain sequence information. The fusion network is used to fuse the features extracted from the antigen encoding network, light chain encoding network, and heavy chain encoding network. The fully connected network is used to fully connect the features to predict affinity test results.

[0070] In one possible implementation, the fusion network includes a first convolutional network, a second convolutional network, and a third convolutional network. The first convolutional network is connected to the antigen encoding network, and the first convolutional network is used to convolve the antigen sequence features output by the antigen encoding network to obtain deep antigen sequence features. The second convolutional network is connected to the light chain encoding network, and the second convolutional network is used to convolve the light chain sequence features output by the light chain encoding network to obtain deep light chain sequence features. The third convolutional network is connected to the heavy chain encoding network, and the third convolutional network is used to convolve the heavy chain sequence features output by the heavy chain encoding network to obtain deep heavy chain sequence features.

[0071] As shown in Figure 4, the input of the antigen encoding network is antigen sequence information, the input of the light chain encoding network is light chain sequence information, and the input of the heavy chain encoding network is heavy chain sequence information. The first convolutional network, the second convolutional network, and the third convolutional network respectively output the deep antigen sequence features, light chain sequence features, and heavy chain sequence features obtained by convolution. The deep antigen sequence features, light chain sequence features, and heavy chain sequence features are then fused to obtain fused sequence features. The input of the fully connected network is the fused sequence features, and the output of the fully connected network is the affinity detection result.

[0072] FIG5 is a flow chart of a method for predicting the affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device, which predicts the affinity test results using the affinity prediction model shown in FIG4 above. The affinity prediction model includes: an antigen encoding network, a light chain encoding network, a heavy chain encoding network, a fusion network, and a fully connected network. Referring to FIG5 , the method includes:

[0073] 501. The computer device obtains antigen sequence information and antibody sequence information. The antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence. The antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence.

[0074] The process of step 501 is the same as that of step 301 above, and will not be repeated here.

[0075] 502. The computer device extracts features of the antigen sequence information through the antigen encoding network in the affinity prediction model to obtain antigen sequence features.

[0076] The computer device inputs the antigen sequence information into the antigen encoding network in the affinity prediction model, and the antigen encoding network extracts features of the antigen sequence information and outputs antigen sequence features.

[0077] In one possible implementation, the antigen encoding network can be a BERT (Bidirectional Encoder Representations from Transformers) model structure or a Roformer (Rotary Transformers) model structure. BERT is obtained by pre-training a deep bidirectional Transformer encoder, and Roformer is a transformer with rotational position embedding.

[0078] In one possible implementation, a computer device extracts features from antigen sequence information using an antigen encoding network in an affinity prediction model to obtain antigen sequence features, including: determining a first semantic feature and a first spatial feature of the antigen sequence information using the antigen encoding network, and generating the antigen sequence features based on the first semantic feature and the first spatial feature. The first semantic feature represents features of multiple amino acids in the antigen sequence information, and the first spatial feature represents features of the positions of multiple amino acids in the antigen sequence information.

[0079] Among them, the antigen sequence information represents multiple amino acids in the antigen sequence, and the antigen sequence information can include amino acid features of multiple amino acids in the antigen sequence. An amino acid feature can be called a Token, and a Token represents an amino acid. The first Token in the antigen sequence information is [cls], [cls] represents the first Token, and the last Token in the antigen sequence information is [eos], [eos] represents the last Token. Based on the multiple amino acid features in the antigen sequence information, a first semantic feature and a first spatial feature can be determined. The first semantic feature represents the features of the multiple amino acids themselves in the antigen sequence information, and the first spatial feature represents the features of the positions of multiple amino acids in the antigen sequence information. The computer device generates the antigen sequence feature based on the first semantic feature and the first spatial feature through the antigen encoding network.

[0080] In the embodiments of the present application, when extracting antigen sequence features, the characteristics of the amino acids themselves in the antigen sequence and the positional characteristics between the amino acids are comprehensively considered, so that the features expressed by the extracted antigen sequence features are richer, and the accuracy of the antigen sequence features is improved, which is conducive to ensuring the accuracy of subsequent affinity prediction based on the antigen sequence features.

[0081] Optionally, the process of generating the antigen sequence feature according to the first semantic feature and the first spatial feature includes the following steps 5021 to 5023:

[0082] 5021. Perform feature extraction on the first semantic feature and the first spatial feature to obtain a first key feature, a first value feature, and a first query feature.

[0083] The first query feature, first key feature, and first value feature each belong to different feature spaces. Each amino acid in the antigen sequence has its own first key feature, first value feature, and first query feature. The first value feature represents the characteristics of the amino acid itself. The first query feature and first key feature are used to determine the feature vector of the attention weight.

[0084] Optionally, the process of the computer device acquiring the first query feature, the first key feature, and the first value feature includes: multiplying the first semantic feature by the first parameter matrix to obtain a semantic matrix, and acquiring the first query feature, the first key feature, and the first value feature corresponding to the first semantic feature based on the semantic matrix. Multiplying the first spatial feature by the second parameter matrix to obtain a spatial matrix, and acquiring the first query feature, the first key feature, and the first value feature corresponding to the first spatial feature based on the spatial matrix.

[0085] Among them, the first parameter matrix and the second parameter matrix are used for spatial transformation, and the first parameter matrix and the second parameter matrix are model parameters obtained by training. After obtaining the semantic matrix, the computer device splits the semantic matrix into the first query feature, the first key feature and the first value feature corresponding to the first semantic feature. After obtaining the spatial matrix, the spatial matrix is ​​split into the first query feature, the first key feature and the first value feature corresponding to the first spatial feature. For example, taking the first parameter matrix as an example, the first parameter matrix is ​​a 3-dimensional parameter matrix, and the semantic matrix obtained by multiplying the first semantic feature and the first parameter matrix is ​​a 3-dimensional semantic matrix. The computer device uses each dimension of the semantic matrix as the first query feature, the first key feature and the first value feature corresponding to the first semantic feature.

[0086] 5022. Fuse the first key feature, the first value feature, and the first query feature to obtain a candidate antigen sequence feature.

[0087] After obtaining the first key feature, the first value feature and the first query feature, the computer device fuses the first key feature, the first value feature and the first query feature to obtain the candidate antigen sequence feature.

[0088] Optionally, the computer device fuses the first key feature, the first value feature and the first query feature to obtain a process of candidate antigen sequence features, comprising: normalizing the product of the first query feature, the first key feature and the scaling factor to obtain a normalized feature, and determining the product of the normalized feature and the first value feature as the candidate antigen sequence feature. The computer device obtains the scaling factor, which represents the normalized scaling multiple. In an embodiment of the present application, the computer device uses the scaling factor as a normalization parameter to normalize the product to obtain a normalized feature, which characterizes the correlation between the first query feature and the first key feature. The computer device can use the normalized feature as the weight of the first value feature, so the computer device determines the product between the normalized feature and the first value feature as the candidate antigen sequence feature.

[0089] The computer device uses the following formula to fuse the first key feature, the first value feature, and the first query feature to obtain the candidate antigen sequence feature:

[0090] Among them, A represents the candidate antigen sequence feature, Q represents the first query feature, K represents the first key feature, and T represents transposition. represents the scaling factor, V represents the first-valued feature, and softmax(·) represents the normalization function.

[0091] 5023. Perform multiple transformations on the candidate antigen sequence features to obtain antigen sequence features.

[0092] The affinity prediction model may include a layered structure for performing multiple transformations on candidate antigen sequence features. The computing device may input candidate antigen sequence features into the first layer of the layered structure, perform feature extraction at each layer, and output the feature extraction results to the next layer for continued feature extraction, until the last layer in the layered structure outputs antigen sequence features. In other embodiments, starting from the third layer of the structure, feature extraction may combine feature extraction results from at least two previous layers.

[0093] Optionally, the computer device uses a feedforward neural network to perform multiple transformations on the candidate antigen sequence features to obtain the antigen sequence features. The feedforward neural network can be represented by the following formula: B = FFN(A) = max(0, AW1+b1)W2+b2;

[0094] Where B represents the antigen sequence feature, FFN(·) represents the feedforward neural network, A represents the candidate antigen sequence feature, max(·) represents the maximum value, and W1, b1, W2, and b2 represent the model parameters in the feedforward neural network.

[0095] FIG6 is a schematic diagram of an embodiment of the present application for extracting antigen sequence features. As shown in FIG6 , the input features are tokens in the antigen sequence information, for example, the tokens in the antigen sequence information include [cls], E, V, Q, L…[eos]. The semantic features and spatial features of each amino acid are determined based on the tokens in the antigen sequence information. The semantic features and spatial features of each amino acid are extracted through the antigen encoding network to obtain output features. The output features are antigen sequence features. The dimension of the antigen sequence features is the same as that of the antigen sequence information. The antigen sequence features include deep features of each amino acid in the antigen sequence.

[0096] 503. The computer device extracts light chain sequence features from the light chain sequence information through the light chain encoding network in the affinity prediction model.

[0097] The computer device inputs the light chain sequence information into the light chain encoding network in the affinity prediction model, and the light chain encoding network extracts features of the light chain sequence information and outputs light chain sequence features.

[0098] In one possible implementation, the network structure of the light chain encoding network can be a BERT model structure or a Roformer model structure. BERT is obtained by pre-training a deep bidirectional Transformer encoder, and Roformer is a transformer with rotation position embedding.

[0099] In one possible implementation, a computer device extracts light chain sequence features from light chain sequence information using a light chain encoding network in an affinity prediction model, including: determining, using the light chain encoding network, a second semantic feature and a second spatial feature of the light chain sequence information; and generating a light chain sequence feature based on the second semantic feature and the second spatial feature. The second semantic feature represents a feature of multiple amino acids in the light chain sequence information, and the second spatial feature represents a feature of the positions of multiple amino acids in the light chain sequence information.

[0100] Among them, the light chain sequence information represents multiple amino acids in the light chain sequence, and the light chain sequence information may include amino acid features of multiple amino acids in the light chain sequence. One amino acid feature can be called a Token, and one Token represents one amino acid. The first Token in the light chain sequence information is [cls], and [cls] represents the first Token. The last Token in the light chain sequence information is [eos], and [eos] represents the last Token. Based on the multiple amino acid features in the light chain sequence information, a second semantic feature and a second spatial feature can be determined. The second semantic feature represents the features of the multiple amino acids themselves in the light chain sequence information, and the second spatial feature represents the features of the positions of multiple amino acids in the light chain sequence information. The computer device generates a light chain sequence feature based on the second semantic feature and the second spatial feature through the light chain encoding network.

[0101] In the examples of the present application, when extracting light chain sequence features, the characteristics of the amino acids themselves in the light chain sequence and the positional characteristics between the amino acids are comprehensively considered, so that the features expressed by the extracted light chain sequence features are richer, and the accuracy of the light chain sequence features is improved, which is conducive to ensuring the accuracy of subsequent affinity prediction based on the light chain sequence features.

[0102] Optionally, the process of generating a light chain sequence feature based on the second semantic feature and the second spatial feature includes the following steps 5031 to 5033:

[0103] 5031. Perform feature extraction on the second semantic feature and the second spatial feature to obtain a second key feature, a second value feature, and a second query feature.

[0104] Each amino acid in the light chain has its own second key feature, second value feature, and second query feature. The second value feature represents the feature of the amino acid itself, and the second query feature and second key feature are used to determine the feature vector of the attention weight.

[0105] Optionally, the process of the computer device acquiring the second query feature, the second key feature, and the second value feature includes: multiplying the second semantic feature by a third parameter matrix to obtain a semantic matrix, and acquiring the second query feature, the second key feature, and the second value feature corresponding to the second semantic feature based on the semantic matrix. Multiplying the second spatial feature by a fourth parameter matrix to obtain a spatial matrix, and acquiring the second query feature, the second key feature, and the second value feature corresponding to the second spatial feature based on the spatial matrix.

[0106] The third parameter matrix and the fourth parameter matrix are used for spatial transformation, and the third parameter matrix and the fourth parameter matrix are model parameters obtained through training.

[0107] 5032. Fuse the second key feature, the second value feature, and the second query feature to obtain a candidate light chain sequence feature.

[0108] After obtaining the second key feature, the second value feature and the second query feature, the computer device fuses the second key feature, the second value feature and the second query feature to obtain the candidate light chain sequence feature.

[0109] Optionally, the computer device fuses the second key feature, the second value feature and the second query feature to obtain a candidate light chain sequence feature, including: normalizing the product of the second query feature, the second key feature and the scaling factor to obtain a normalized feature, and determining the product of the normalized feature and the second value feature as the candidate light chain sequence feature.

[0110] 5033. Perform multiple transformations on the candidate light chain sequence features to obtain light chain sequence features.

[0111] The affinity prediction model may include a layered structure for performing multiple transformations on candidate light chain sequence features. The computing device may input the candidate light chain sequence features into the first layer of the layered structure, perform feature extraction on each layer, and output the feature extraction results to the next layer for continued feature extraction, until the last layer in the layered structure outputs the antigen sequence features. In other embodiments, starting from the third layer in the structure, feature extraction results from at least two previous layers may be combined.

[0112] Optionally, the computer device uses a feedforward neural network to perform multiple transformations on the candidate light chain sequence features to obtain light chain sequence features.

[0113] 504. The computer device extracts heavy chain sequence features from the heavy chain sequence information through the heavy chain encoding network in the affinity prediction model.

[0114] The computer device inputs the heavy chain sequence information into the heavy chain encoding network in the affinity prediction model, and the heavy chain encoding network extracts features of the heavy chain sequence information and outputs heavy chain sequence features.

[0115] In one possible implementation, the network structure of the re-encoding network can be a BERT model structure or a Roformer model structure. BERT is obtained by pre-training a deep bidirectional Transformer encoder, and Roformer is a transformer with rotated position embedding.

[0116] In one possible implementation, a computer device extracts heavy chain sequence features from heavy chain sequence information using a heavy chain encoding network in an affinity prediction model, including: determining, using the heavy chain encoding network, a third semantic feature and a third spatial feature of the heavy chain sequence information; and generating a heavy chain sequence feature based on the third semantic feature and the third spatial feature. The third semantic feature represents a feature of multiple amino acids in the heavy chain sequence information, and the third spatial feature represents a feature of the positions of multiple amino acids in the heavy chain sequence information.

[0117] Among them, the heavy chain sequence information represents multiple amino acids in the heavy chain sequence, and the heavy chain sequence information can include amino acid features of multiple amino acids in the heavy chain sequence. One amino acid feature can be called a Token, and one Token represents one amino acid. The first Token in the heavy chain sequence information is [cls], and [cls] represents the first Token. The last Token in the heavy chain sequence information is [eos], and [eos] represents the last Token. Based on the multiple amino acid features in the heavy chain sequence information, a third semantic feature and a third spatial feature can be determined. The third semantic feature represents the features of the multiple amino acids themselves in the heavy chain sequence information, and the third spatial feature represents the features of the positions of multiple amino acids in the heavy chain sequence information. The computer device generates a heavy chain sequence feature based on the third semantic feature and the third spatial feature through the heavy chain encoding network.

[0118] In the examples of the present application, when extracting the heavy chain sequence features, the characteristics of the amino acids themselves in the heavy chain sequence and the positional characteristics between the amino acids are comprehensively considered, so that the features expressed by the extracted heavy chain sequence features are richer, and the accuracy of the heavy chain sequence features is improved, which is conducive to ensuring the accuracy of subsequent affinity prediction based on the heavy chain sequence features.

[0119] Optionally, the process of generating a heavy chain sequence feature according to the third semantic feature and the third spatial feature includes the following steps 5041 to 5043:

[0120] 5041. Perform feature extraction on the third semantic feature and the third spatial feature to obtain a third key feature, a third value feature, and a third query feature.

[0121] Each amino acid in the heavy chain has its own third key feature, third value feature, and third query feature. The third value feature represents the characteristics of the amino acid itself, and the third query feature and third key feature are used to determine the feature vector of the attention weight.

[0122] Optionally, the process of the computer device acquiring the third query feature, the third key feature, and the third value feature includes: multiplying the third semantic feature by a fifth parameter matrix to obtain a semantic matrix, and acquiring the third query feature, the third key feature, and the third value feature corresponding to the third semantic feature based on the semantic matrix. Multiplying the third spatial feature by a sixth parameter matrix to obtain a spatial matrix, and acquiring the third query feature, the third key feature, and the third value feature corresponding to the third spatial feature based on the spatial matrix.

[0123] The fifth parameter matrix and the sixth parameter matrix are used for spatial transformation, and the fifth parameter matrix and the sixth parameter matrix are model parameters obtained through training.

[0124] 5042. Fuse the third key feature, the third value feature, and the third query feature to obtain a candidate heavy chain sequence feature.

[0125] After obtaining the third key feature, the third value feature and the third query feature, the computer device fuses the third key feature, the third value feature and the third query feature to obtain the candidate heavy chain sequence feature.

[0126] Optionally, the computer device fuses the third key feature, the third value feature and the third query feature to obtain a candidate heavy chain sequence feature, including: normalizing the product of the third query feature, the third key feature and the scaling factor to obtain a normalized feature, and determining the product of the normalized feature and the third value feature as the candidate heavy chain sequence feature.

[0127] 5043. Perform multiple transformations on the candidate heavy chain sequence features to obtain heavy chain sequence features.

[0128] The affinity prediction model may include a layered structure for performing multiple transformations on candidate heavy chain sequence features. The computing device may input the candidate heavy chain sequence features into the first layer of the layered structure, perform feature extraction at each layer, and output the feature extraction results to the next layer for continued feature extraction, until the last layer in the layered structure outputs the antigen sequence features. In other embodiments, starting from the third layer in the structure, feature extraction may be combined with feature extraction results outputted from at least two previous layers.

[0129] Optionally, the computer device uses a feedforward neural network to perform multiple transformations on the candidate heavy chain sequence features to obtain the heavy chain sequence features.

[0130] 505. The computer device fuses the antigen sequence features, light chain sequence features and heavy chain sequence features through the fusion network in the affinity prediction model to obtain the fusion sequence features.

[0131] In one possible implementation, the fusion network includes a first convolutional network, a second convolutional network, and a third convolutional network. The computer device inputs the antigen sequence feature into the first convolutional network, and the first convolutional network performs multiple convolutions on the antigen sequence feature to obtain a deep antigen sequence feature. The light chain sequence feature is input into the second convolutional network, and the second convolutional network performs multiple convolutions on the light chain sequence feature to obtain a deep light chain sequence feature. The heavy chain sequence feature is input into the third convolutional network, and the third convolutional network performs multiple convolutions on the heavy chain sequence feature to obtain a deep heavy chain sequence feature. The deep antigen sequence feature, the deep light chain sequence feature, and the deep heavy chain sequence feature are fused (for example, spliced) to obtain a fusion sequence feature.

[0132] Optionally, the network structure of the first convolutional network, the second convolutional network and the third convolutional network is a MF-CNN (Multimodal Fusion Convolutional Neural Network) model structure.

[0133] Among them, the MF-CNN model structure can be expressed by the following formula: M = MultiConv(Roformer(seq));

[0134] Among them, M represents the output of the MF-CNN model (also known as the deep sequence features in this application), Roformer(seq) represents the output of the encoding network (also known as the sequence features in this application), and MultiConv(·) represents the MF-CNN model.

[0135] The MF-CNN model structure is shown in Figure 7. The MF-CNN model includes multiple layers of CNN (Convolutional Neural Networks). Each CNN contains three convolutional layers, one pooling layer, and three fully connected layers.

[0136] Optionally, the network structure of the first convolutional network, the second convolutional network and the third convolutional network can also be a recurrent neural network with timing information.

[0137] 506. The computer device fully connects the fusion sequence features through the fully connected network in the affinity prediction model to obtain an affinity test result. The affinity test result represents the affinity of the antibody sequence to the antigen sequence.

[0138] The computer device inputs the fusion sequence features into the fully connected network, and the fully connected network fully connects the fusion sequence features and outputs the affinity detection results.

[0139] In one possible implementation, the affinity test result is an affinity value. A larger affinity value indicates a greater affinity of the antibody sequence for the antigen sequence, and a smaller affinity value indicates a smaller affinity of the antibody sequence for the antigen sequence. In another possible implementation, the affinity test result is a binary classification result. When the affinity test result is a first value, it indicates that the antibody sequence has affinity for the antigen sequence, and when the affinity test result is a second value, it indicates that the antibody sequence has no affinity for the antigen sequence. For example, the first value is 1 and the second value is 0.

[0140] In one possible implementation, the fully connected network is a DNN (Deep Neural Networks). Optionally, the fully connected network can be represented by the following formula: Out = FC(Concat[M]) + Concat[M];

[0141] Among them, M represents the fusion sequence feature, Out represents the affinity detection result, Concat represents the connection function, and FC(·) represents the fully connected layer.

[0142] The method provided in the embodiments of the present application comprehensively considers the characteristics of the amino acids in the antigen sequence, the characteristics of the amino acids in the light chain of the antibody sequence, and the characteristics of the amino acids in the heavy chain of the antibody sequence when predicting the affinity of the antibody sequence for the antigen sequence. From the two aspects of the heavy chain and the light chain, the potential connection between the characteristics of the amino acids in the antigen sequence and the characteristics of the amino acids in the light chain and the characteristics of the amino acids in the heavy chain is considered, thereby predicting the affinity of the antibody sequence for the antigen sequence. Not only is the factor considered more comprehensive, but also the heavy chain and light chain are divided into two granularities, which is conducive to improving the accuracy of the predicted affinity.

[0143] FIG8 is a flow chart of a method for training an affinity prediction model provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG8 , the method includes:

[0144] 801. A computer device obtains sample antigen sequence information, sample antibody sequence information, and a true affinity test result. The sample antibody sequence information includes sample light chain sequence information and sample heavy chain sequence information. The true affinity test result indicates the true affinity of the sample antibody sequence to the sample antigen sequence.

[0145] The sample antibody sequence information includes sample light chain sequence information and sample heavy chain sequence information of the sample antibody sequence. The sample antigen sequence information represents the amino acids in the sample antigen sequence. The sample light chain sequence information represents the amino acids in the light chain of the sample antibody sequence. The sample heavy chain sequence information represents the amino acids in the heavy chain of the sample antibody sequence.

[0146] The process of step 801 is the same as that of step 301 above, and will not be repeated here.

[0147] 802. The computer device extracts features of the sample antigen sequence information, the sample light chain sequence information, and the sample heavy chain sequence information respectively through the affinity prediction model to obtain the sample antigen sequence features, the sample light chain sequence features, and the sample heavy chain sequence features.

[0148] The computer device inputs the sample antigen sequence information, the sample light chain sequence information and the sample heavy chain sequence information into the affinity prediction model. The affinity prediction model extracts features of the sample antigen sequence information, the sample light chain sequence information and the sample heavy chain sequence information respectively, and outputs the sample antigen sequence features, the sample light chain sequence features and the sample heavy chain sequence features.

[0149] In one possible implementation, the affinity prediction model includes an antigen encoding network, a light chain encoding network, and a heavy chain encoding network. The process of obtaining the sample antigen sequence characteristics, the sample light chain sequence characteristics, and the sample heavy chain sequence characteristics by a computer device includes the following steps 8021 to 8023.

[0150] 8021. Through the antigen encoding network, feature extraction is performed on the sample antigen sequence information to obtain the sample antigen sequence features.

[0151] Optionally, the computer device determines a first sample semantic feature and a first sample spatial feature of the sample antigen sequence information through the antigen encoding network, and performs feature extraction on the first sample semantic feature and the first sample spatial feature to obtain a sample antigen sequence feature. The first sample semantic feature represents a feature of multiple amino acids in the sample antigen sequence information, and the first sample spatial feature represents a feature of the positions of multiple amino acids in the sample antigen sequence information.

[0152] Optionally, extracting features from the first sample semantic features and the first sample spatial features to obtain a sample antigen sequence feature includes: extracting features from the first sample semantic features and the first sample spatial features to obtain a first sample key feature, a first sample value feature, and a first sample query feature; fusing the first sample key feature, the first sample value feature, and the first sample query feature to obtain a candidate sample antigen sequence feature; and performing multiple transformations on the candidate sample antigen sequence feature to obtain the sample antigen sequence feature.

[0153] 8022. Through the light chain encoding network, feature extraction is performed on the sample light chain sequence information to obtain the sample light chain sequence features.

[0154] Optionally, the computer device determines a second sample semantic feature and a second sample spatial feature of the sample light chain sequence information through the light chain encoding network, and performs feature extraction on the second sample semantic feature and the second sample spatial feature to obtain a sample light chain sequence feature. The second sample semantic feature represents a feature of multiple amino acids in the sample light chain sequence information, and the second sample spatial feature represents a feature of the positions of multiple amino acids in the sample light chain sequence information.

[0155] Optionally, the process of extracting features from the second sample semantic features and the second sample spatial features to obtain the sample light chain sequence features includes: extracting features from the second sample semantic features and the second sample spatial features to obtain a second sample key feature, a second sample value feature, and a second sample query feature; fusing the second sample key feature, the second sample value feature, and the second sample query feature to obtain a candidate sample light chain sequence feature; and performing multiple transformations on the candidate sample light chain sequence feature to obtain the sample light chain sequence feature.

[0156] 8023. Perform feature extraction on the sample heavy chain sequence information through the heavy chain encoding network to obtain the sample heavy chain sequence features.

[0157] Optionally, the computer device determines a third sample semantic feature and a third sample spatial feature of the sample heavy chain sequence information through the heavy chain encoding network, and performs feature extraction on the third sample semantic feature and the third sample spatial feature to obtain a sample heavy chain sequence feature. The third sample semantic feature represents a feature of multiple amino acids in the sample heavy chain sequence information, and the third sample spatial feature represents a feature of the positions of multiple amino acids in the sample heavy chain sequence information.

[0158] Optionally, the process of extracting features from the third sample semantic features and the third sample spatial features to obtain the sample heavy chain sequence features includes: extracting features from the third sample semantic features and the third sample spatial features to obtain a third sample key feature, a third sample value feature, and a third sample query feature; fusing the third sample key feature, the third sample value feature, and the third sample query feature to obtain the sample candidate heavy chain sequence features; and performing multiple transformations on the sample candidate heavy chain sequence features to obtain the sample heavy chain sequence features.

[0159] 803. The computer device fuses the sample antigen sequence characteristics, the sample light chain sequence characteristics and the sample heavy chain sequence characteristics through the affinity prediction model to obtain the sample fusion sequence characteristics.

[0160] In one possible implementation, the affinity prediction model includes a fusion network, and the computer device fuses the sample antigen sequence characteristics, the sample light chain sequence characteristics, and the sample heavy chain sequence characteristics through the fusion network to obtain the sample fusion sequence characteristics.

[0161] Optionally, the fusion network includes a first convolutional network, a second convolutional network, and a third convolutional network. The computer device inputs the sample antigen sequence feature into the first convolutional network, and the first convolutional network performs multiple convolutions on the sample antigen sequence feature to obtain a deep sample antigen sequence feature. The sample light chain sequence feature is input into the second convolutional network, and the second convolutional network performs multiple convolutions on the sample light chain sequence feature to obtain a deep sample light chain sequence feature. The sample heavy chain sequence feature is input into the third convolutional network, and the third convolutional network performs multiple convolutions on the sample heavy chain sequence feature to obtain a deep sample heavy chain sequence feature. The deep sample antigen sequence feature, the deep sample light chain sequence feature, and the deep sample heavy chain sequence feature are fused to obtain a sample fusion sequence feature.

[0162] 804. The computer device performs full connection on the sample fusion sequence features through the affinity prediction model to obtain the sample affinity detection result.

[0163] In one possible implementation, the affinity prediction model includes a fully connected network, and the computer device fully connects the sample fusion sequence features through the fully connected network to obtain the sample affinity detection result.

[0164] 805. The computer device trains an affinity prediction model based on the sample affinity test results and the actual affinity test results.

[0165] The computer device obtains the true affinity test results of the sample antigen sequence and the sample antibody sequence. The true affinity test results represent the true affinity of the sample antibody sequence to the sample antigen sequence. The sample affinity test results obtained by the computer device are the affinity predicted by the affinity prediction model. The computer device trains the affinity prediction model based on the difference between the sample affinity test results and the true affinity test results.

[0166] Since the goal of an affinity prediction model is to predict the true affinity of a sample antibody sequence for a sample antigen sequence, the more similar the sample affinity test results are to the true affinity test results, the more accurate the affinity prediction model. The computer device then trains the affinity prediction model based on the difference between the sample affinity test results and the true affinity test results, thereby reducing the difference between the sample affinity test results obtained by the trained affinity prediction model and the true affinity test results, thereby improving the predictive ability of the affinity prediction model and thereby improving the accuracy of the affinity prediction model.

[0167] In one possible implementation, the computer device repeats steps 801 to 805 to iteratively train the affinity prediction model. In response to the number of iterations reaching a first threshold, the computer device stops training the affinity prediction model. Alternatively, in response to the loss value obtained in the current iteration being no greater than a second threshold, the computer device stops training the affinity prediction model. The first threshold and the second threshold are both arbitrary values, for example, the first threshold is 1000 or 1500, and the second threshold is 0.004 or 0.003.

[0168] The method provided in the embodiments of the present application comprehensively considers the characteristics of the amino acids in the antigen sequence, the characteristics of the amino acids in the light chain of the antibody sequence, and the characteristics of the amino acids in the heavy chain of the antibody sequence when training an affinity prediction model for predicting the affinity of the antibody sequence to the antigen sequence. From the two aspects of the heavy chain and the light chain, the affinity prediction model learns the potential connection between the characteristics of the amino acids in the antigen sequence and the characteristics of the amino acids in the light chain and the characteristics of the amino acids in the heavy chain, thereby predicting the affinity of the antibody sequence to the antigen sequence. Not only are the factors considered more comprehensively, but the heavy chain and light chain are also divided into two granularities, which is conducive to improving the predictive ability of the affinity prediction model.

[0169] The affinity prediction model includes an antigen encoding network, a light chain encoding network, and a heavy chain encoding network. Prior to training the affinity prediction model, these networks can be either untrained or pre-trained. After pre-training, the pre-trained networks are used to construct the affinity prediction model, which is then trained.

[0170] Pre-training is the process of unsupervised learning using large datasets. By training on large amounts of unlabeled data, the model automatically learns patterns and regularities in the data, enabling it to better handle various tasks. Pre-training is typically performed using neural networks, which extract high-level feature representations of the data through a layer-by-layer learning process.

[0171] Among them, the pre-training process of the antigen encoding network, the light chain encoding network and the heavy chain encoding network refers to the embodiments shown in Figures 9 to 11 below.

[0172] FIG9 is a flow chart of a method for pre-training an antigen encoding network provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG9 , the method includes:

[0173] 901. A computer device obtains first antigen sequence information, masks amino acid information at some positions in the first antigen sequence information, and obtains second antigen sequence information.

[0174] The first antigen sequence information can be the antigen sequence information of any antigen sequence, the first antigen sequence information represents the amino acids in the antigen sequence, and the antigen sequence includes multiple amino acids. The first antigen sequence information includes amino acid information at multiple positions, and the amino acid information at each position represents the amino acid at that position.

[0175] The computer device randomly masks the amino acid information at some positions in the first antigen sequence information to obtain the second antigen sequence information, and the amino acid information at some positions in the second antigen sequence information is unknown.

[0176] In one possible implementation, the computer device replaces the amino acid information at some positions in the first antigen sequence information with preset characters, such as [Mask]. For example, if the first antigen sequence information is "MDVLY", the "V" and "Y" in the first antigen sequence information are masked, that is, "V" and "Y" are replaced with [Mask], and the resulting second antigen sequence information is "MD[Mask]L[Mask]".

[0177] 902. The computer device predicts the amino acid information at the masked position in the second antigen sequence information through the antigen encoding network to obtain a first prediction probability, where the first prediction probability represents the predicted probability that the amino acid at the masked position in the first antigen sequence information belongs to each amino acid.

[0178] The computer device inputs the second antigen sequence information into the antigen encoding network, and the antigen encoding network predicts the amino acid information at the masked position in the second antigen sequence information and outputs a first prediction probability.

[0179] In one possible implementation, during the pre-training process, the antigen encoding network further includes an output layer compared to the affinity prediction model. After completing the pre-training of the antigen encoding network, the output layer in the antigen encoding network is removed, and the antigen encoding network after removing the output layer is used to construct the affinity prediction model. The computer device then determines the semantic features and spatial features of the second antigen sequence information through the antigen encoding network, extracts the semantic features and spatial features, and obtains antigen sequence features. Among them, the semantic features represent the features of multiple amino acids in the antigen sequence information, and the spatial features represent the features of the positions of multiple amino acids in the antigen sequence information. The output layer is then used to predict the antigen sequence features to obtain a first prediction probability.

[0180] The process of extracting the antigen sequence features of the second antigen sequence information by the antigen encoding network is the same as the process of extracting the antigen sequence features in the embodiment shown in FIG5 , and will not be described in detail here.

[0181] 903. The computer device trains the antigen encoding network based on the first predicted probability and the first true probability, where the first true probability represents the true probability that the amino acid at the masked position in the first antigen sequence information belongs to each amino acid.

[0182] The computer device obtains a first true probability, which represents the true probability that the amino acid at the masked position in the first antigen sequence information belongs to each amino acid. The first predicted probability obtained by the computer device is predicted by the antigen encoding network. The computer device trains the antigen encoding network based on the difference between the first predicted probability and the first true probability.

[0183] Since the goal of the antigen encoding network is to predict the true probability of the amino acid at the masked position in the first antigen sequence information belonging to each amino acid, the more similar the first predicted probability is to the first true probability, the stronger the ability of the antigen encoding network to extract antigen sequence features. The computer device then trains the first predicted probability and the first true probability based on the difference between the first predicted probability and the first true probability, so as to reduce the difference between the first predicted probability and the first true probability obtained by the trained antigen encoding network, thereby improving the feature extraction ability of the antigen encoding network, thereby enabling the antigen encoding network to initially learn to extract antigen sequence features.

[0184] The method provided in the embodiment of the present application pre-trains the antigen encoding network in a self-supervised manner based on the sample antigen sequence information, thereby improving the ability of the antigen encoding network to extract features based on the antigen sequence information. The pre-trained antigen encoding network is subsequently used to construct an affinity prediction model, which is beneficial to reducing the training pressure of the affinity prediction model and ensuring the accuracy of the affinity prediction model.

[0185] FIG10 is a flowchart of a method for pre-training a light chain encoding network provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG10 , the method includes:

[0186] 1001. A computer device obtains first light chain sequence information, masks amino acid information at some positions in the first light chain sequence information, and obtains second light chain sequence information.

[0187] The first light chain sequence information may be light chain sequence information of any light chain, wherein the first light chain sequence information represents amino acids in the light chain, wherein the light chain includes multiple amino acids. The first light chain sequence information includes amino acid information at multiple positions, wherein the amino acid information at each position represents the amino acid at that position.

[0188] The computer device randomly masks the amino acid information at some positions in the first light chain sequence information to obtain the second light chain sequence information. The amino acid information at some positions in the second light chain sequence information is unknown. The masking method for the first light chain sequence information is similar to the masking method for the first antigen sequence information in the embodiment shown in FIG. 9 above, and will not be repeated here.

[0189] 1002. The computer device predicts the amino acid information at the masked position in the second light chain sequence information through the light chain encoding network to obtain a second prediction probability, where the second prediction probability represents the probability that the amino acid at the masked position in the predicted first light chain sequence information belongs to each amino acid.

[0190] The computer device inputs the second light chain sequence information into the light chain encoding network, and the light chain encoding network predicts the amino acid information at the masked position in the second light chain sequence information and outputs a second prediction probability.

[0191] In one possible implementation, during the pre-training process, compared to the affinity prediction model, the light chain encoding network further includes an output layer. After completing the pre-training of the light chain encoding network, the output layer in the light chain encoding network is removed, and the light chain encoding network after removing the output layer is used to construct the affinity prediction model. The computer device then determines the semantic features and spatial features of the second light chain sequence information through the light chain encoding network, performs feature extraction on the semantic features and spatial features, and obtains light chain sequence features. Among them, the semantic features represent the features of multiple amino acids in the light chain sequence information, and the spatial features represent the features of the positions of multiple amino acids in the light chain sequence information. The output layer is then used to predict the light chain sequence features to obtain a second prediction probability.

[0192] The process of extracting the light chain sequence features of the second light chain sequence information by the light chain encoding network is the same as the process of extracting the light chain sequence features in the embodiment shown in FIG5 , and will not be repeated here.

[0193] 1003. The computer device trains the light chain encoding network based on the second predicted probability and the second true probability, where the second true probability represents the true probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid.

[0194] The computer device obtains a second true probability, which represents the true probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid. The second predicted probability obtained by the computer device is predicted by the light chain encoding network. The computer device trains the light chain encoding network based on the difference between the second predicted probability and the second true probability.

[0195] Since the goal of the light chain encoding network is to predict the true probability of the amino acid at the masked position in the first light chain sequence information belonging to each amino acid, the more similar the second predicted probability is to the second true probability, the stronger the ability of the light chain encoding network to extract light chain sequence features. The computer device then trains the second predicted probability and the second true probability based on the difference between the second predicted probability and the second true probability, so as to reduce the difference between the second predicted probability and the second true probability obtained by the trained light chain encoding network, thereby improving the feature extraction ability of the light chain encoding network, thereby enabling the light chain encoding network to initially learn to extract light chain sequence features.

[0196] The method provided in the embodiments of the present application pre-trains the light chain encoding network in a self-supervised manner based on the sample light chain sequence information, thereby improving the ability of the light chain encoding network to extract features based on the light chain sequence information. The pre-trained light chain encoding network is subsequently used to construct an affinity prediction model, which is beneficial to reducing the training pressure of the affinity prediction model and ensuring the accuracy of the affinity prediction model.

[0197] FIG11 is a flowchart of a method for pre-training a light chain encoding network provided in an embodiment of the present application. The embodiment of the present application is executed by a computer device. Referring to FIG11 , the method includes:

[0198] 1101. A computer device obtains first heavy chain sequence information, masks amino acid information at some positions in the first heavy chain sequence information, and obtains second heavy chain sequence information.

[0199] The first heavy chain sequence information may be the heavy chain sequence information of any heavy chain, the first heavy chain sequence information representing amino acids in the heavy chain, the heavy chain including multiple amino acids, the first heavy chain sequence information including amino acid information at multiple positions, the amino acid information at each position representing the amino acid at that position.

[0200] The computer device randomly masks the amino acid information at some positions in the first heavy chain sequence information to obtain the second heavy chain sequence information. The amino acid information at some positions in the second heavy chain sequence information is unknown. The masking method for the first heavy chain sequence information is similar to the masking method for the first antigen sequence information in the embodiment shown in FIG. 9 above, and will not be repeated here.

[0201] 1102. The computer device predicts the amino acid information at the masked position in the second heavy chain sequence information through the heavy chain encoding network to obtain a third prediction probability, where the third prediction probability represents the probability that the amino acid at the masked position in the predicted first heavy chain sequence information belongs to each amino acid.

[0202] The computer device inputs the second heavy chain sequence information into the heavy chain encoding network, and the heavy chain encoding network predicts the amino acid information at the masked position in the second heavy chain sequence information and outputs a third prediction probability.

[0203] In one possible implementation, during the pre-training process, compared to the affinity prediction model, the heavy chain encoding network further includes an output layer. After completing the pre-training of the heavy chain encoding network, the output layer in the heavy chain encoding network is removed, and the heavy chain encoding network after removing the output layer is used to construct the affinity prediction model. The computer device then determines the semantic features and spatial features of the second heavy chain sequence information through the heavy chain encoding network, performs feature extraction on the semantic features and spatial features, and obtains heavy chain sequence features. Among them, the semantic features represent the features of multiple amino acids in the heavy chain sequence information, and the spatial features represent the features of the positions of multiple amino acids in the heavy chain sequence information. The output layer is then used to predict the heavy chain sequence features to obtain a third prediction probability.

[0204] The process of extracting the heavy chain sequence features of the second heavy chain sequence information by the heavy chain encoding network is the same as the process of extracting the heavy chain sequence features in the embodiment shown in FIG5 , and will not be repeated here.

[0205] 1103. The computer device trains the heavy chain encoding network based on the third predicted probability and the third true probability, where the third true probability represents the true probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid.

[0206] The computer device obtains a third true probability, which represents the true probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid. The third predicted probability obtained by the computer device is predicted by the heavy chain encoding network. The computer device trains the heavy chain encoding network based on the difference between the third predicted probability and the third true probability.

[0207] Since the goal of the heavy chain encoding network is to predict the true probability of the amino acid at the masked position in the first heavy chain sequence information belonging to each amino acid, the more similar the third predicted probability is to the third true probability, the stronger the ability of the heavy chain encoding network to extract heavy chain sequence features. The computer device then trains the third predicted probability and the third true probability based on the difference between the third predicted probability and the third true probability, so as to reduce the difference between the third predicted probability and the third true probability obtained by the trained heavy chain encoding network, thereby improving the feature extraction ability of the heavy chain encoding network, thereby enabling the heavy chain encoding network to initially learn to extract heavy chain sequence features.

[0208] The method provided in the embodiments of the present application pre-trains the heavy chain encoding network in a self-supervised manner based on the sample heavy chain sequence information, thereby improving the ability of the heavy chain encoding network to extract features based on the heavy chain sequence information. The pre-trained heavy chain encoding network is subsequently used to construct an affinity prediction model, which is beneficial to reducing the training pressure of the affinity prediction model and ensuring the accuracy of the affinity prediction model.

[0209] In order to verify the effectiveness of the embodiments of the present application, the method provided in the embodiments of the present application was subjected to performance testing on a plurality of antigen sequence-antibody sequence data sets, which included a binary classification data set and an affinity regression data set. The affinity test result in the binary classification data set is a numerical value used to indicate whether it has affinity, and the affinity test result in the affinity regression data set is a numerical value used to indicate the size of the affinity. The test process compares the affinity prediction model proposed in the embodiments of the present application with the affinity prediction model proposed in the related art. The affinity prediction model proposed in the related art includes an affinity prediction model based on machine learning, which predicts affinity by methods such as CNN and ensemble learning. The affinity prediction model proposed in the related art also includes a BERT model that has not been pre-trained, etc.

[0210] Figure 12 is a schematic diagram of a performance test result provided by an embodiment of the present application. A binary classification data set is used for performance testing. As shown in Figure 12, the Roc Curve (Receiver Operating Characteristic Curve) of each model is on the left. Roc Curve is a curve used to evaluate the performance of a binary classification model. Roc Curve uses the true positive rate (True Positive Rate) as the vertical axis and the false positive rate (False Positive Rate) as the horizontal axis, where the true positive rate represents the ratio of the binary classification model correctly classifying positive examples, and the false positive rate represents the ratio of the binary classification model incorrectly classifying negative examples as positive examples. The "Ours" curve in Figure 12 represents the Roc Curve of the affinity prediction model proposed in the embodiment of the present application, which can reach a maximum of 0.930. The remaining curves are the Roc Curves of the affinity prediction models proposed in the related art. It can be seen from the figure that the Roc Curve of the affinity prediction model proposed in the embodiment of the present application is significantly better than the Roc Curve of the affinity prediction model proposed in the related art. As shown in Figure 12, the right side shows the PR curve (Precision-Recall Curve) of each model. The PR curve has coverage as the horizontal axis and precision as the vertical axis. The "Ours" curve in Figure 12 represents the PR curve of the affinity prediction model proposed in the embodiment of the present application, which can reach a maximum of 0.923. The remaining curves are the PR curves of affinity prediction models proposed in related art. As can be seen from the figure, the PR curve of the affinity prediction model proposed in the embodiment of the present application is significantly better than the PR curves of affinity prediction models proposed in related art.

[0211] FIG13 is a schematic diagram of another performance test result provided by an embodiment of the present application. Affinity regression datasets are used for performance testing. FIG13 shows the performance test results of multiple models on three datasets, with the ordinates representing the Pearson correlation coefficient (correlation coefficient for measuring linear relationships) and the Spearman correlation coefficient (correlation coefficient for measuring dependence). The “Ours” curve in FIG13 represents the affinity prediction model proposed in the embodiment of the present application. As can be seen from FIG13 , on the three datasets, the Pearson correlation coefficient and Spearman correlation coefficient of the affinity prediction model proposed in the embodiment of the present application both exceed the Pearson correlation coefficient and Spearman correlation coefficient of the affinity prediction model proposed in the related art.

[0212] FIG14 is a schematic diagram of the structure of an apparatus for predicting the affinity of an antibody sequence to an antigen sequence provided in an embodiment of the present application. Referring to FIG14 , the apparatus comprises:

[0213] Information acquisition module 1401 is used to acquire antigen sequence information and antibody sequence information, where the antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence. The antigen sequence information represents the amino acids in the antigen sequence, the light chain sequence information represents the amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents the amino acids in the heavy chain of the antibody sequence.

[0214] Feature extraction module 1402, for extracting antigen sequence features from antigen sequence information, extracting light chain sequence features from light chain sequence information, and extracting heavy chain sequence features from heavy chain sequence information;

[0215] Feature fusion module 1403, used to fuse antigen sequence features, light chain sequence features, and heavy chain sequence features to obtain fusion sequence features;

[0216] The full connection module 1404 is used to perform full connection on the fusion sequence features to obtain an affinity test result, which represents the affinity of the antibody sequence to the antigen sequence.

[0217] The apparatus for predicting the affinity of an antibody sequence for an antigen sequence provided in an embodiment of the present application comprehensively considers the characteristics of the amino acids in the antigen sequence, the characteristics of the amino acids in the light chain of the antibody sequence, and the characteristics of the amino acids in the heavy chain of the antibody sequence when predicting the affinity of the antibody sequence for the antigen sequence. From the perspectives of the heavy chain and the light chain, the apparatus considers the potential connection between the characteristics of the amino acids in the antigen sequence and the characteristics of the amino acids in the light chain and the characteristics of the amino acids in the heavy chain, thereby predicting the affinity of the antibody sequence for the antigen sequence. Not only is the consideration of factors more comprehensive, but the apparatus also divides the heavy chain and light chain into two granularities, which is conducive to improving the accuracy of the predicted affinity.

[0218] Optionally, the affinity detection result is obtained through an affinity prediction model, which includes an antigen encoding network, a light chain encoding network, and a heavy chain encoding network; the feature extraction module 1402 is used to:

[0219] Extract antigen sequence features from antigen sequence information through antigen encoding network;

[0220] Extracting light chain sequence features from light chain sequence information through a light chain encoding network;

[0221] Heavy chain sequence features are extracted from heavy chain sequence information through the heavy chain encoding network.

[0222] Optionally, the feature extraction module 1402 is configured to:

[0223] Through the antigen coding network, the first semantic feature and the first spatial feature of the antigen sequence information are determined, the first semantic feature represents the characteristics of multiple amino acids in the antigen sequence information, and the first spatial feature represents the characteristics of the positions of multiple amino acids in the antigen sequence information; the antigen sequence feature is generated based on the first semantic feature and the first spatial feature.

[0224] Optionally, the feature extraction module 1402 is configured to:

[0225] Performing feature extraction on the first semantic feature and the first spatial feature to obtain a first key feature, a first value feature, and a first query feature;

[0226] The first key feature, the first value feature and the first query feature are fused to obtain a candidate antigen sequence feature;

[0227] The candidate antigen sequence features are transformed multiple times to obtain the antigen sequence features.

[0228] Optionally, the feature extraction module 1402 is configured to:

[0229] The second semantic feature and the second spatial feature of the light chain sequence information are determined through the light chain encoding network, where the second semantic feature represents the features of multiple amino acids in the light chain sequence information, and the second spatial feature represents the features of the positions of multiple amino acids in the light chain sequence information; the light chain sequence feature is generated based on the second semantic feature and the second spatial feature.

[0230] Optionally, the feature extraction module 1402 is configured to:

[0231] Perform feature extraction on the second semantic feature and the second spatial feature to obtain a second key feature, a second value feature, and a second query feature;

[0232] Fusing the second key feature, the second value feature, and the second query feature to obtain a candidate light chain sequence feature;

[0233] The candidate light chain sequence features are transformed multiple times to obtain light chain sequence features.

[0234] Optionally, the feature extraction module 1402 is configured to:

[0235] The third semantic feature and the third spatial feature of the heavy chain sequence information are determined through the heavy chain encoding network. The third semantic feature represents the features of multiple amino acids in the heavy chain sequence information, and the third spatial feature represents the features of the positions of multiple amino acids in the heavy chain sequence information. The heavy chain sequence feature is generated based on the third semantic feature and the third spatial feature.

[0236] Optionally, the feature extraction module 1402 is configured to:

[0237] Performing feature extraction on the third semantic feature and the third spatial feature to obtain a third key feature, a third value feature, and a third query feature;

[0238] fusing the third key feature, the third value feature, and the third query feature to obtain a candidate heavy chain sequence feature;

[0239] The candidate heavy chain sequence features are transformed multiple times to obtain heavy chain sequence features.

[0240] Optionally, referring to FIG15 , the apparatus further includes a first training module 1405 configured to:

[0241] Obtaining sample antigen sequence information, sample antibody sequence information, and true affinity test results. The sample antibody sequence information includes sample light chain sequence information and sample heavy chain sequence information. The true affinity test results indicate the true affinity of the sample antibody sequence to the sample antigen sequence.

[0242] Through the affinity prediction model, feature extraction is performed on the sample antigen sequence information, sample light chain sequence information, and sample heavy chain sequence information respectively to obtain the sample antigen sequence feature, sample light chain sequence feature, and sample heavy chain sequence feature; the sample antigen sequence feature, sample light chain sequence feature, and sample heavy chain sequence feature are fused to obtain the sample fusion sequence feature; the sample fusion sequence feature is fully connected to obtain the sample affinity test result;

[0243] Based on the sample affinity test results and the actual affinity test results, the affinity prediction model is trained.

[0244] Optionally, referring to FIG15 , the antigen encoding network is a trained network, and the apparatus further includes a second training module 1406 for:

[0245] Obtaining first antigen sequence information, masking amino acid information at some positions in the first antigen sequence information, and obtaining second antigen sequence information;

[0246] The amino acid information at the masked position in the second antigen sequence information is predicted using the antigen encoding network to obtain a first prediction probability, where the first prediction probability represents the predicted probability that the amino acid at the masked position in the first antigen sequence information belongs to each amino acid;

[0247] The antigen encoding network is trained based on the first predicted probability and the first true probability, where the first true probability represents the true probability that the amino acid at the masked position in the first antigen sequence information belongs to each amino acid.

[0248] Optionally, referring to FIG15 , the light chain encoding network is a trained network, and the apparatus further includes a third training module 1407 for:

[0249] Obtaining first light chain sequence information, masking amino acid information at some positions in the first light chain sequence information, to obtain second light chain sequence information;

[0250] Using the light chain encoding network, the amino acid information at the masked position in the second light chain sequence information is predicted to obtain a second prediction probability, where the second prediction probability represents the predicted probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid;

[0251] Based on the second predicted probability and the second true probability, the light chain encoding network is trained, where the second true probability represents the true probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid.

[0252] Optionally, referring to FIG15 , the heavy chain encoding network is a trained network, and the apparatus further includes a fourth training module 1408 for:

[0253] obtaining first heavy chain sequence information, masking amino acid information at some positions in the first heavy chain sequence information, and obtaining second heavy chain sequence information;

[0254] Predicting the amino acid information at the masked position in the second heavy chain sequence information using the heavy chain encoding network to obtain a third prediction probability, where the third prediction probability represents the predicted probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid;

[0255] The heavy chain encoding network is trained based on the third predicted probability and the third true probability, where the third true probability represents the true probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid.

[0256] It should be noted that the apparatus for predicting the affinity of an antibody sequence for an antigen sequence provided in the above embodiment is merely illustrative of the division of the functional modules described above. In actual applications, the above functions can be distributed among different functional modules as needed, i.e., the internal structure of a computer device can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the apparatus for predicting the affinity of an antibody sequence for an antigen sequence provided in the above embodiment and the method for predicting the affinity of an antibody sequence for an antigen sequence provide the same concept. The specific implementation process is detailed in the method embodiments and will not be further described here.

[0257] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for predicting the affinity of an antibody sequence for an antigen sequence in the above embodiment.

[0258] Optionally, the computer device is provided as a terminal. FIG16 shows a schematic diagram of the structure of a terminal 1600 provided in an exemplary embodiment of the present application. The terminal 1600 includes: a processor 1601 and a memory 1602.

[0259] The processor 1601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0260] Memory 1602 may include one or more computer-readable storage media, which may be non-transitory. Memory 1602 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1602 is used to store at least one computer program, which is used to be used by processor 1601 to implement the method for predicting the affinity of an antibody sequence for an antigen sequence provided in the method embodiment of the present application.

[0261] In some embodiments, terminal 1600 may optionally include a peripheral device interface 1603 and at least one peripheral device. Processor 1601, memory 1602, and peripheral device interface 1603 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1603 via a bus, signal lines, or circuit boards. Optionally, the peripheral device includes at least one of a radio frequency circuit 1604, a display screen 1605, a camera assembly 1606, an audio circuit 1607, and a power supply 1608.

[0262] The peripheral device interface 1603 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1601 and the memory 1602. In some embodiments, the processor 1601, the memory 1602, and the peripheral device interface 1603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1601, the memory 1602, and the peripheral device interface 1603 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0263] RF circuit 1604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1604 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1604 may optionally include an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1604 may communicate with other devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1604 may also include circuitry related to NFC (Near Field Communication), although this application does not limit this.

[0264] The display screen 1605 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1605 is a touch screen display, the display screen 1605 also has the ability to collect touch signals on the surface or above the surface of the display screen 1605. The touch signal can be input as a control signal to the processor 1601 for processing. At this time, the display screen 1605 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1605, which is set on the front panel of the terminal 1600; in other embodiments, there can be at least two display screens 1605, which are respectively set on different surfaces of the terminal 1600 or in a folding design; in other embodiments, the display screen 1605 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1600. Even more, the display screen 1605 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1605 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0265] The camera assembly 1606 is used to capture images or videos. Optionally, the camera assembly 1606 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal 1600, and the rear camera is arranged on the back of the terminal 1600. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1606 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0266] The audio circuit 1607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1601 for processing, or input into the radio frequency circuit 1604 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 1600. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1601 or the radio frequency circuit 1604 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1607 may also include a headphone jack.

[0267] Power supply 1608 is used to power various components in terminal 1600. Power supply 1608 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1608 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0268] Those skilled in the art will understand that the structure shown in FIG16 does not constitute a limitation on the terminal 1600 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0269] Optionally, the computer device is provided as a server. Figure 17 is a structural diagram of a server provided in an embodiment of the present application. The server 1700 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1701 and one or more memories 1702, wherein the memory 1702 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1701 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.

[0270] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method for predicting the affinity of an antibody sequence for an antigen sequence of the above embodiment.

[0271] An embodiment of the present application further provides a computer program product, including a computer program, which is loaded and executed by a processor to implement the method for predicting the affinity of an antibody sequence for an antigen sequence as described in the above embodiment.

[0272] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0273] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for predicting the affinity of an antibody sequence for an antigen sequence, performed by a computer device, the method comprising: Acquire antigen sequence information and antibody sequence information, wherein the antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence, wherein the antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence; Extracting antigen sequence features from the antigen sequence information, extracting light chain sequence features from the light chain sequence information, and extracting heavy chain sequence features from the heavy chain sequence information; fusing the antigen sequence feature, the light chain sequence feature and the heavy chain sequence feature to obtain a fusion sequence feature; and The fusion sequence features are fully connected to obtain an affinity test result, which indicates the affinity of the antibody sequence to the antigen sequence.

2. The method according to claim 1, wherein the affinity detection result is obtained by an affinity prediction model, wherein the affinity prediction model includes an antigen encoding network, a light chain encoding network, and a heavy chain encoding network; wherein extracting antigen sequence features from the antigen sequence information, extracting light chain sequence features from the light chain sequence information, and extracting heavy chain sequence features from the heavy chain sequence information comprises: extracting antigen sequence features from the antigen sequence information through the antigen encoding network; Extracting light chain sequence features from the light chain sequence information through the light chain encoding network; Heavy chain sequence features are extracted from the heavy chain sequence information through the heavy chain encoding network.

3. The method according to claim 2, wherein extracting antigen sequence features from the antigen sequence information through the antigen encoding network comprises: Determining, by means of the antigen encoding network, a first semantic feature and a first spatial feature of the antigen sequence information, wherein the first semantic feature represents a feature of a plurality of amino acids in the antigen sequence information, and the first spatial feature represents a feature of a position of a plurality of amino acids in the antigen sequence information; An antigen sequence feature is generated according to the first semantic feature and the first spatial feature.

4. The method according to claim 2 or 3, wherein generating an antigen sequence feature according to the first semantic feature and the first spatial feature comprises: Performing feature extraction on the first semantic feature and the first spatial feature to obtain a first key feature, a first value feature, and a first query feature; fusing the first key feature, the first value feature and the first query feature to obtain a candidate antigen sequence feature; The candidate antigen sequence feature is transformed multiple times to obtain the antigen sequence feature.

5. The method according to any one of claims 2 to 4, wherein extracting light chain sequence features from the light chain sequence information through the light chain encoding network comprises: Determining, by means of the light chain encoding network, a second semantic feature and a second spatial feature of the light chain sequence information, wherein the second semantic feature represents a feature of a plurality of amino acids in the light chain sequence information, and the second spatial feature represents a feature of a position of a plurality of amino acids in the light chain sequence information; A light chain sequence feature is generated according to the second semantic feature and the second spatial feature.

6. The method according to claim 5, wherein generating a light chain sequence feature according to the second semantic feature and the second spatial feature comprises: Performing feature extraction on the second semantic feature and the second spatial feature to obtain a second key feature, a second value feature, and a second query feature; fusing the second key feature, the second value feature and the second query feature to obtain a candidate light chain sequence feature; The candidate light chain sequence features are transformed multiple times to obtain the light chain sequence features.

7. The method according to any one of claims 2 to 6, wherein extracting heavy chain sequence features from the heavy chain sequence information through the heavy chain encoding network comprises: Determining, by means of the heavy chain encoding network, a third semantic feature and a third spatial feature of the heavy chain sequence information, wherein the third semantic feature represents a feature of multiple amino acids in the heavy chain sequence information, and the third spatial feature represents a feature of positions of multiple amino acids in the heavy chain sequence information; A heavy chain sequence feature is generated according to the third semantic feature and the third spatial feature.

8. The method according to claim 7, wherein generating a heavy chain sequence feature according to the third semantic feature and the third spatial feature comprises: Performing feature extraction on the third semantic feature and the third spatial feature to obtain a third key feature, a third value feature, and a third query feature; fusing the third key feature, the third value feature and the third query feature to obtain a candidate heavy chain sequence feature; The candidate heavy chain sequence features are transformed multiple times to obtain the heavy chain sequence features.

9. The method according to any one of claims 2 to 8, wherein the training process of the affinity prediction model comprises: Acquiring sample antigen sequence information, sample antibody sequence information and a true affinity test result, wherein the sample antibody sequence information includes sample light chain sequence information and sample heavy chain sequence information, and the true affinity test result indicates the true affinity of the sample antibody sequence to the sample antigen sequence; By using the affinity prediction model, feature extraction is performed on the sample antigen sequence information, the sample light chain sequence information and the sample heavy chain sequence information respectively to obtain sample antigen sequence features, sample light chain sequence features and sample heavy chain sequence features; Fusion of the sample antigen sequence feature, the sample light chain sequence feature and the sample heavy chain sequence feature to obtain a sample fusion sequence feature; Fully connecting the sample fusion sequence features to obtain sample affinity detection results; The affinity prediction model is trained based on the sample affinity detection result and the true affinity detection result.

10. The method according to claim 9, wherein the light chain encoding network is a trained network, and the training process of the light chain encoding network comprises: Obtaining first light chain sequence information, and masking amino acid information at some positions in the first light chain sequence information to obtain second light chain sequence information; Using the light chain encoding network, predicting the amino acid information at the masked position in the second light chain sequence information to obtain a second prediction probability, wherein the second prediction probability indicates the predicted probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid; The light chain encoding network is trained based on the second predicted probability and the second true probability, wherein the second true probability represents the true probability that the amino acid at the masked position in the first light chain sequence information belongs to each amino acid.

11. The method according to claim 9 or 10, wherein the heavy chain encoding network is a trained network, and the training process of the heavy chain encoding network comprises: obtaining first heavy chain sequence information, and masking amino acid information at some positions in the first heavy chain sequence information to obtain second heavy chain sequence information; Predicting the amino acid information at the masked position in the second heavy chain sequence information by the heavy chain encoding network to obtain a third prediction probability, wherein the third prediction probability indicates the predicted probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid; The heavy chain encoding network is trained based on the third predicted probability and the third true probability, wherein the third true probability represents the true probability that the amino acid at the masked position in the first heavy chain sequence information belongs to each amino acid.

12. A device for predicting the affinity of an antibody sequence for an antigen sequence, the device comprising: An information acquisition module, used to acquire antigen sequence information and antibody sequence information, wherein the antibody sequence information includes light chain sequence information and heavy chain sequence information of the antibody sequence, wherein the antigen sequence information represents amino acids in the antigen sequence, the light chain sequence information represents amino acids in the light chain of the antibody sequence, and the heavy chain sequence information represents amino acids in the heavy chain of the antibody sequence; a feature extraction module, configured to extract antigen sequence features from the antigen sequence information, extract light chain sequence features from the light chain sequence information, and extract heavy chain sequence features from the heavy chain sequence information; A feature fusion module, used to fuse the antigen sequence feature, the light chain sequence feature and the heavy chain sequence feature to obtain a fusion sequence feature; and The full connection module is used to perform full connection on the fusion sequence features to obtain an affinity test result, wherein the affinity test result indicates the affinity of the antibody sequence to the antigen sequence.

13. A computer device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for predicting affinity of an antibody sequence for an antigen sequence as described in any one of claims 1 to 11.

14. A computer-readable storage medium, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the method for predicting affinity of an antibody sequence for an antigen sequence as claimed in any one of claims 1 to 11.

15. A computer program product, comprising a computer program, wherein the computer program is loaded and executed by a processor to implement the method for predicting affinity of an antibody sequence for an antigen sequence according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Semantic feature extraction model training method and device, equipment and storage medium

    CN113723105A

  • Binding affinity prediction method and device based on antigen and antibody sequences

    CN114464247A

  • Data processing method and device, computer equipment, medium and program product

    CN115116548A

  • Affinity prediction method, device, equipment and storage medium

    CN115148277A

  • Affinity prediction method and device, computer equipment and storage medium

    CN116959575A

Cited By

  • Method and system for predicting affinity of antibody mutant and antigen

    CN119446289A