A method and system for predicting molecular properties based on nuclear charge ordering and KAN fusion
By fusing nuclear charge sorting with KAN, the problems of limited receptive field and high computational complexity in existing molecular property prediction models are solved, achieving efficient and accurate molecular property prediction, which has important applications, especially in drug discovery and materials design.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-03
AI Technical Summary
Existing molecular property prediction models have shortcomings in terms of limited receptive field, high computational complexity, and insufficient feature fusion, making it difficult to effectively capture long-range interactions in molecules and perform adaptive feature fusion.
A method based on nuclear charge sorting and KAN fusion is adopted. Local chemical environment features are extracted through message passing neural network, and ordered atomic node sequences are generated by combining nuclear charge sorting. A selective state space model is used for global context modeling, and dynamic feature fusion is performed through Kolmogorov-Arnold network to achieve adaptive nonlinear fusion of local and global features.
It significantly improves the model's ability to perceive long-range molecular dependencies and pharmacophores, can efficiently process large-scale molecular graphs, is suitable for large-scale virtual screening, and improves the accuracy and generalization ability of molecular property prediction.
Smart Images

Figure CN121281694B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of artificial intelligence and computational chemistry, and in particular to a method and system for predicting molecular properties based on nuclear charge sorting and KAN (Kolmogorov-Arnold) fusion. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Molecular property prediction (MPP) is a crucial step in modern drug discovery and materials design. Its goal is to rapidly and accurately predict the biological activity (e.g., binding affinity to target proteins), pharmacokinetic properties (e.g., solubility, permeability), and toxicity of candidate molecules using computational models, thereby guiding experimental synthesis and significantly reducing R&D costs and timelines. Current mainstream methods fall into two main categories: graph neural network (GNN)-based methods and graph transformer-based methods. GNNs aggregate local neighborhood information through message passing mechanisms, effectively encoding the local chemical environment of molecules (e.g., functional groups, bond order). However, these models have significant limitations: firstly, the receptive field is limited by the number of network layers, making it difficult to model the ubiquitous and crucial long-range interactions in molecules, such as π-π conjugation, hydrogen bond networks, and steric hindrance effects; secondly, as the network depth increases, node features tend to become uniform, leading to "oversmoothing" and degrading model performance. The Graph Transformer obtains a global receptive field through a self-attention mechanism, but its computational complexity increases quadratically with the number of atoms in the molecular graph, resulting in high computational costs and making it difficult to apply to the screening of large-scale molecular libraries. Furthermore, existing methods often employ simple weighted summation or splicing operations when fusing local and global features. This static, linear fusion approach cannot adaptively adjust the information proportions based on the chemical environment of the atoms, limiting the model's expressive power and prediction accuracy.
[0004] In recent years, selective state-space models (such as Mamba) have demonstrated powerful capabilities in modeling linearly complex sequences. However, when applied to molecular graphs, the arbitrary order of node inputs severely impacts their performance. Existing sorting strategies, such as those based on node degree, random sorting, or character ordering from the SMILES string, lack explicit chemical meaning. This arbitrary sorting can lead to chemically adjacent atoms being separated in the sequence, or chemically critical atoms (such as activity-determining heteroatoms) being placed at the end of the sequence and thus unable to be effectively addressed, severely weakening the model's ability to learn correct structure-property relationships. Meanwhile, the emerging Kolmogorov-Arnold network (KAN) has been shown to have stronger function approximation capabilities than multilayer perceptrons (MLPs), but it has not yet been used for the dynamic fusion of molecular features. Summary of the Invention
[0005] To address the core pain points of existing MPP models in the aforementioned background technology, namely "limited receptive field", "high computational complexity" and "insufficient feature fusion", this invention provides a molecular property prediction method and system based on nuclear charge sorting and KAN fusion, which is guided by chemical intuition and can balance computational efficiency, global information perception capability and adaptive feature fusion.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] The first aspect of the present invention provides a method for predicting molecular properties based on nuclear charge ordering and KAN fusion.
[0008] A molecular property prediction method based on nuclear charge ordering and KAN fusion includes:
[0009] Obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix;
[0010] The graph structure data is input into a message-passing neural network. Through multiple rounds of message passing, aggregation, and update operations, atomic node embedding representations and chemical bond edge embedding representations containing local chemical environments are obtained.
[0011] Read the nuclear charge number of each atomic node, rearrange the embedding representation of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes;
[0012] Based on the atomic node sequence, a selective state-space model is used to obtain the global atomic node embedding representation;
[0013] The atomic node embedding representation and the global atomic node embedding representation are input into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained.
[0014] Based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, the attention score is determined, and the enhanced representations of all atomic nodes are weighted and fused to obtain the global molecular characterization vector.
[0015] Based on the global molecular characterization vector, the predicted values of molecular properties are obtained.
[0016] Furthermore, the nuclear charge number of each atomic node is read, and the embedding representations of all atomic nodes are rearranged according to the size of the nuclear charge number to generate a sequence of atomic nodes; the method includes:
[0017] The random walk structure code of each atomic node is concatenated with the original feature of that atom to obtain the first concatenated feature;
[0018] Read the nuclear charge number of each atomic node, sort the products of all atomic node embedding representations and the first splicing feature in ascending order according to the size of the nuclear charge number, and generate an atomic node sequence.
[0019] Furthermore, based on the atomic node sequence, a selective state space model is adopted to obtain a global atomic node embedding representation. The method includes: inputting the atomic node sequence into the selective state space model, calculating the gating vector according to the atomic node sequence through linear projection and activation function, and then modulating the shared state transition matrix to achieve selective state update based on the input content, thereby obtaining the global atomic node embedding representation.
[0020] Furthermore, the atomic node embedding representation and the global atomic node embedding representation are input into a KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. These are then weighted and fused to obtain the enhanced representation of each atomic node. The method includes:
[0021] By concatenating the atomic node embedding representation and the global atomic node embedding representation, the second concatenation feature of each atomic node is obtained;
[0022] The second concatenation feature of each atomic node is input into a KAN layer to obtain an intermediate vector;
[0023] The intermediate vector is input into a linear layer and a Softmax function to generate the weights of the atomic node embedding representation and the weights of the global atomic node embedding representation.
[0024] We perform a weighted fusion of the atomic node embedding representation and the global atomic node embedding representation to obtain an enhanced representation for each atomic node.
[0025] Furthermore, a weighted fusion of the atomic node-based embedding representation and the global atomic node embedding representation is performed to obtain the enhanced representation of each atomic node; expressed by the following formula:
[0026]
[0027] in, An enhanced representation of atomic nodes; This represents the embedding representation of atomic nodes; The weights represent the embedding representation of atomic nodes; The weights represent the embedding representations of global atomic nodes; This represents the weight of the global atomic node embedding representation.
[0028] Furthermore, based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, an attention score is determined, and the enhanced representations of all atomic nodes are weighted and fused to obtain a global molecular representation vector; the method includes:
[0029] The chemical bond edges of each atom node are embedded and represented, and the edge context vector is obtained by mean pooling and an MLP transformation.
[0030] The enhanced representation of each atom node and the edge context vector of that atom are concatenated, and then the attention score is calculated with a learnable query vector.
[0031] The graph-level representation is obtained by weighted summation of the enhanced representations of all atomic nodes based on the attention scores normalized using Softmax.
[0032] The chemical bond edges of each atom node are embedded and transformed using MLP to obtain the global edge representation;
[0033] By concatenating the graph-level representation and the global edge representation, a graph-level molecular characterization is obtained.
[0034] A second aspect of the present invention provides a molecular property prediction system based on nuclear charge ordering and KAN fusion.
[0035] A molecular property prediction system based on nuclear charge ordering and KAN fusion includes:
[0036] The data preprocessing and input module is used to obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix.
[0037] The message passing neural network module is used to input the graph structure data into the message passing neural network, and through multiple rounds of message passing, aggregation and update operations, obtain the atomic node embedding representation and chemical bond edge embedding representation containing the local chemical environment;
[0038] The nuclear charge sorting module is used to read the nuclear charge number of each atomic node, rearrange the embedded representations of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes;
[0039] The global context modeling module is used to obtain the global atomic node embedding representation based on the atomic node sequence and using a selective state-space model;
[0040] The dynamic feature fusion module is used to input the atomic node embedding representation and the global atomic node embedding representation into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained.
[0041] The graph readout module is used to determine the attention score based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, and to perform weighted fusion of the enhanced representations of all atomic nodes to obtain the global molecular characterization vector.
[0042] The prediction module is used to obtain predicted values of molecular properties based on the global molecular characterization vector.
[0043] A third aspect of the present invention provides a computer device comprising:
[0044] A processor, adapted to execute computer programs;
[0045] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the molecular property prediction method based on nuclear charge ordering and KAN fusion as described in the first aspect above.
[0046] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and to execute steps in the molecular property prediction method based on nuclear charge sorting and KAN fusion as described in the first aspect above.
[0047] The fifth aspect of the present invention provides a computer program product or computer program.
[0048] This invention provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the molecular property prediction method based on nuclear charge ordering and KAN fusion as described in the first aspect above.
[0049] Compared with the prior art, the beneficial effects of the present invention are:
[0050] This invention provides a molecular graph node sorting method with clear chemical meaning and no need for additional training, providing high-quality input for subsequent sequence models; designs a modeling mechanism that can effectively capture global long-range dependencies of molecules in linear time complexity; creates a novel module that can dynamically and nonlinearly fuse local and global features based on the chemical environment of the atoms themselves; and organically integrates the above three innovations to form an end-to-end, high-performance overall solution for molecular property prediction.
[0051] This invention sorts nodes by nuclear charge, an intrinsic property closely related to chemical properties, providing strong chemical priors for sequence models, ensuring that key atoms are given priority, and significantly improving the model's ability to perceive long-range molecular dependencies and pharmacophores.
[0052] This invention uses a linear complexity selective state-space model (Mamba) to replace the quadratic complexity self-attention mechanism, enabling the model to efficiently process large-scale molecular graphs and making it suitable for large-scale virtual screening.
[0053] This invention is the first to introduce KAN into molecular representation learning for feature fusion. Through its powerful nonlinear fitting capability, it generates dynamic fusion weights for each atom, achieving adaptive and refined fusion of local details and global context, breaking through the expression bottleneck of traditional linear fusion. Attached Figure Description
[0054] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0055] Figure 1 This is a flowchart illustrating a molecular property prediction method based on nuclear charge ordering and KAN fusion, as shown in an embodiment of the present invention.
[0056] Figure 2 This is an overall architecture diagram of the molecular property prediction method based on nuclear charge sorting and KAN fusion, as shown in an embodiment of the present invention.
[0057] Figure 3 This is a detailed processing flowchart of nuclear charge sequencing and Mamba scanning (NC-Mamba module) as shown in an embodiment of the present invention;
[0058] Figure 4 This is a flowchart illustrating the workflow of the KAN dynamic mixing module (KDM) according to an embodiment of the present invention;
[0059] Figure 5 This is a histogram comparing the model performance obtained by applying different node sorting strategies (nuclear charge, degree, random) to a classification dataset, as shown in an embodiment of the present invention.
[0060] Figure 6 This is a histogram comparing the model performance obtained by applying different node sorting strategies (nuclear charge, degree, random) to a regression dataset, as shown in an embodiment of the present invention.
[0061] Figure 7 This is a schematic diagram of the t-SNE visualization of the BACE dataset classification results shown in an embodiment of the present invention;
[0062] Figure 8 This is a schematic diagram of the t-SNE visualization of the BBBP dataset classification results shown in an embodiment of the present invention;
[0063] Figure 9 This is a scatter plot of regression prediction results for the FreeSolv dataset shown in an embodiment of the present invention;
[0064] Figure 10 This is a scatter plot of the regression prediction results of the ESOL dataset shown in an embodiment of the present invention;
[0065] Figure 11 This is a structural diagram of a molecular property prediction system based on nuclear charge ordering and KAN fusion, as shown in an embodiment of the present invention.
[0066] Figure 12 This is a structural diagram of a computer device shown in an embodiment of the present invention. Detailed Implementation
[0067] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0068] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0069] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0070] The data in all embodiments of this invention cover 10 datasets in drug discovery and computational chemistry, covering multiple key areas, to demonstrate the powerful performance of the model on a variety of tasks, including physicochemical properties, biological activity, and pharmacokinetic toxicity.
[0071] BBBP: Predicting whether a molecule can cross the blood-brain barrier is crucial for the design of drugs for the central nervous system.
[0072] BACE: Predicts whether a molecule is an effective inhibitor of β-secretase 1, an enzyme associated with Alzheimer's disease.
[0073] HIV: Predicting whether a molecule has the ability to suppress HIV viral replication.
[0074] Tox21: Predicts 12 different toxic pathways, such as the nuclear receptor signaling pathway.
[0075] SIDER: Predicts whether molecules will produce side effects in 27 organ systems.
[0076] ClinTox: Comparing drug toxicity in clinical trials with whether it ultimately receives FDA approval.
[0077] ToxCast: Based on high-throughput screening experiments, predict the activity of molecules against hundreds of biological targets.
[0078] ESOL: Predicts the solubility of molecules in water (log mol / L), which is an important physicochemical property.
[0079] FreeSolv: Predicts the change in free energy of molecules as they transition from the gas phase to the aqueous phase, and is related to solubility and binding affinity.
[0080] Lipophilicity: Predicts the partition coefficient (logD) of a molecule in an octanol / water system, which directly affects the absorption, distribution, metabolism, and excretion of a drug.
[0081] Figure 1 This is a flowchart illustrating a molecular property prediction method based on nuclear charge ordering and KAN fusion, as shown in an embodiment of the present invention; see reference. Figure 1 The method includes:
[0082] Obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix;
[0083] The graph structure data is input into a message-passing neural network. Through multiple rounds of message passing, aggregation, and update operations, atomic node embedding representations and chemical bond edge embedding representations containing local chemical environments are obtained.
[0084] Read the nuclear charge number of each atomic node, rearrange the embedding representation of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes;
[0085] Based on the atomic node sequence, a selective state-space model is used to obtain the global atomic node embedding representation;
[0086] The atomic node embedding representation and the global atomic node embedding representation are input into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained.
[0087] Based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, the attention score is determined, and the enhanced representations of all atomic nodes are weighted and fused to obtain the global molecular characterization vector.
[0088] Based on the global molecular characterization vector, the predicted values of molecular properties are obtained.
[0089] This invention uses a message-passing neural network (MPNN) to encode local features of molecular graphs, generating local node embeddings and edge embeddings. It introduces an ascending sorting strategy based on atomic nucleus charge number to transform the molecular graph into a chemically meaningful sequence of nodes. A selective state-space model with linear complexity, guided by nuclear charge, is used to perform a global scan of the sequence, capturing long-range dependencies. A dynamic hybrid module based on the Kolmogorov-Arnold network is designed to achieve node-level adaptive nonlinear fusion of local and global features. Finally, a graph readout mechanism with edge awareness and a task-specific prediction head are used to output molecular property prediction results. This invention fundamentally solves the inherent problems of limited receptive fields in existing GNNs and high computational complexity in Transformers by synergistically combining chemically guided sorting, efficient global modeling, and intelligent feature fusion. While maintaining linear computational complexity, it significantly improves the accuracy and generalization ability of molecular property prediction, achieving state-of-the-art performance on 10 benchmark datasets, providing core technical support for efficient and accurate drug discovery.
[0090] Figure 2 This is an overall architecture diagram of the molecular property prediction method based on nuclear charge ordering and KAN fusion, as shown in an embodiment of the present invention; see reference. Figure 2The molecular property prediction method based on nuclear charge ordering and KAN fusion described in this embodiment is described in detail below, including the following steps:
[0091] Step 1: Molecular graph data acquisition: Read molecules from the dataset and represent them as attribute graphs. Here, V is the set of atomic nodes, and E is the set of chemical bond edges. The atomic feature matrix X contains information such as atom type, degree, and formal charge; the edge feature matrix E contains information such as bond type, whether it is conjugated, and whether it is in a ring.
[0092] Step 2: Local Feature Extraction: Input the molecular graph G into a three-layer message-passing neural network (MPNN), which includes the following steps:
[0093] Step 2.1 Initialize edge features: ,in, Represents edge characteristics.
[0094] Step 2.2 Initialize node features and concatenate the random walk structure encoding: ,in, Representing node characteristics, This represents the random walk structure encoding.
[0095] Step 2.3 Perform T rounds of iterative message passing, including node aggregation, node update, edge aggregation, and edge update.
[0096] Step 2.3.1 Node Aggregation: For each node v, aggregate information from its neighboring nodes and connecting edges: ,in This represents a permutation-invariant aggregate function (e.g., summation). This represents the set of neighboring nodes of node v. It is a learnable message function, where t represents the t-th layer in the MPNN network. This represents the feature representation of node v in the previous layer. This represents the feature representation of node u in the previous layer. This represents the message after node aggregation.
[0097] Step 2.3.2 Node Update: Update the representation of each node using the aggregated message: ,in, This represents an update function implemented as a residual multilayer perceptron with normalization and dropout methods.
[0098] Step 2.3.3 Edge aggregation: For each edge Aggregate information from adjacent edges in the line graph: ,in Represents the message function at the edge level. This represents adjacent edges in a line graph. This represents the message after edge aggregation. Representing an edge At the (t) 1) Edge features at the layer level.
[0099] Step 2.3.4 Edge Update: The representation of each edge is then updated as follows: ,in It is an edge update function, which is implemented as a residual multilayer perceptron with batch normalization and activation functions.
[0100] Step 2.4 finally yields the local node embedding. and local edge embedding Where T represents the number of layers in the message passing network.
[0101] Step 3: Nuclear charge-guided serialization: such as Figure 3 As shown, the nuclear charge number of each atomic node v is read. Calculate the sorted index Based on this value, all atomic nodes are stably sorted in ascending order to generate a node sequence with clear chemical meaning. In this process, the random walk structure code of each node is concatenated with its original features (embedded vectors obtained by mapping the chemical properties of atoms through MLP) to preserve topological information.
[0102] After rearranging, the node sequence is obtained. ,in The permutation matrix is represented by Z. Since Z encodes the nuclear charge number, this simple rule can simultaneously capture electronegativity, atomic radius, and reactivity trends, allowing the model to "see" the pharmacophore atoms in advance without requiring additional parameters.
[0103] In this embodiment, the sorting is deterministic; for isomers, the sorting result is uniquely determined by the atomic nucleus charge number.
[0104] Step 4: Global Context Modeling. The sorted node sequence is input into a selective state-space model. This model scans the sequence in linear time complexity, dynamically filtering the information flow through an input dependency selection mechanism, and outputting a global atomic node embedding representation containing global long-range dependencies. For example, two nitrogen atoms located at opposite ends of a molecule, despite being far apart on the graph, can establish a direct connection in this sequence model.
[0105] It is input into a single-level Mamba module, which has gating parameters that depend on the input. and shared parameters For the i-th token, its cyclic update is represented as:
[0106]
[0107]
[0108]
[0109] in, It is the linear projection matrix used to calculate the selection gate; This represents the element-wise SiLU / Swish activation function; It is the input-dependent gate vector (s hidden states); It is a shared transition matrix; It is after gating The value of the matrix in token i; It is a column vector of all 1s, therefore Broadcast the gating action to the entire matrix; symbol This represents the element-wise product (Hadamard product). It depends on the input and is by The vector generated by linear projection; It is the latent state (hidden memory) of the state-space model at position i; It is a skip connection matrix; This is the global context embedding of atom i. This selection mechanism can dynamically filter out remotely relevant context information. To compensate for the loss of explicit edge information during serialization, each atomic feature is concatenated with its random walk structure encoding before sorting, ensuring that the ring component can be restored through the SSM kernel.
[0110] Step 5: KAN dynamic mixing: as shown Figure 4 As shown, the local atomic node embedding representations obtained in step 2 and the global atomic node embedding representations obtained in step 4 are input into a dynamic hybrid module based on the Kolmogorov-Arnold network. The KAN dynamic hybrid module (KDM) uses a data-driven nonlinear gating mechanism to autonomously learn the ratio of local to global information required for each atom. While maintaining the general approximation capability of the Kolmogorov-Arnold network, it requires fewer parameters than a conventional multilayer perceptron of the same width. The KDM processing flow is as follows: First, the local embedding representations are... With global embedding representation The data is concatenated and refined using a multi-head attention mechanism, then fed into a KAN-based feedforward block residual stack (ResKAN layer + KAN-FFN) to achieve adaptive nonlinear fusion. The final output is an atomic-level embedding representation. It can be directly used for graph-level readout operations. The specific steps include the following:
[0111] Step 5.1 For each node v, concatenate its local and global features: .
[0112] Step 5.2 will Input a KAN layer: .in, It consists of learnable B-spline basis functions, with K=6 basis functions. The KAN output... This will be fed into subsequent linear gating layers. Since all nodes share the same spline mesh, this module introduces only O(2dK + sd) number of parameters, which are independent of the graph size.
[0113] Step 5.3: Transfer the intermediate vector Two-dimensional fusion weights are generated through a linear layer and a softmax function. .in, It is a learnable linear mapping matrix that will output an s-dimensional KAN. Compressed into a two-dimensional logical value vector; The weights are normalized using the Softmax function and are used to control the proportion of local and global feature contributions of atom v.
[0114] Step 5.4 performs weighted summation and residual connection to obtain the final node representation: .symbol This represents the element-wise product (Hadamard product); since it is... It is a scalar, so this is a normal scaling operation; The residual skip connections can stabilize gradient flow and accelerate convergence.
[0115] KDM achieves adaptive, highly expressive, and efficient feature fusion through atomic-level gating. Hydroxyl groups can highlight local polarity features, while aromatic nitrogen atoms can make full use of global conjugation effects. Compared with ReLU-MLP, KAN spline functions achieve stronger approximation capabilities with fewer parameters, thereby improving the characterization quality at different molecular scales. Experiments have verified that shared spline grids combined with residual jump connections can accelerate convergence and effectively suppress overfitting.
[0116] Step 6: Molecular Representation Generation: Based on the final atomic node representation obtained in Step 5, a graph-level readout is performed using an edge-aware attention pooling mechanism to aggregate and generate a global molecular representation vector. The attention weights are jointly determined by the atomic node representation and its neighborhood edge embedding representation, specifically including the following steps:
[0117] Step 6.1 uses edge-aware attention pooling to aggregate edge context for each node: .in, This represents the local chemical bonding environment information obtained by passing and aggregating all edges connected to node v, centered on it; This represents the final edge representation from the MPNN module. This represents the mean pooling operation. It is responsible for converting the original edge features into contextual representations that are compatible with node embeddings.
[0118] Step 6.2 Calculate attention weights: And by weighted summation, a graph-level representation is obtained. Among them, vector Training in conjunction with downstream tasks enables the attention mechanism to simultaneously consider node features and their local edge context information during graph-level aggregation.
[0119] Step 6.3 Edge Feature Integration: For explicit utilization The key-level information captured in the dataset is used to compute global edge representations by directly pooling the MPNN edge features: .in It is the final edge embedding from the MPNN module. These edge features are projected onto the compressed representation space. The final graph-level embedding fuses node and edge information: .
[0120] Step 7 Attribute Prediction: Input the global molecular representation vector into the task-specific prediction layer and output the final molecular attribute prediction value.
[0121] Step 7.1 will Input a task-specific two-layer MLP prediction head and output the molecular attribute prediction results.
[0122] Step 7.2 Training by minimizing standard empirical risk: ,in For cross-entropy loss, Let y represent the model's predicted values for molecular properties, y represent the true values, and D represent the number of samples in the training dataset D. The computational complexity of the prediction module remains O(n + m), linearly related to the number of atoms and edges, thus ensuring the scalability of the model when training on large datasets of millions of molecules.
[0123] The following embodiment is a complete process of predicting the properties of a molecule called "Imipramine" using the molecular property prediction method based on nuclear charge ordering and KAN fusion described in this invention.
[0124] 1. Data Preparation: Using the RDKit cheminformatics toolkit, load the SMILES string for "imipramine" and convert it into a molecular graph. Extract atomic features (including atom type, degree, formal charge, hybridization state, whether it is on a ring, etc.) and bond features (bond type, whether it is conjugated, stereochemistry, etc.). Initialize the atomic feature dimension to d=128, and the edge feature dimension to 128 as well.
[0125] 2. Local Feature Extraction: Construct a four-layer MPNN. Each layer includes: (1) Node Message Aggregation: For each atom, aggregate information from all its neighboring atoms and connection bonds, with the aggregation function being summation. (2) Node Update: Use a gated recurrent unit (GRU) as the update function, combining its previous state and aggregated messages to generate a new state. (3) Edge Update: Based on the information of adjacent edges, update the representation of each edge through an MLP. After four layers of propagation, the local node embedding is obtained. (The molecule has 28 atoms) and local edge embedding .
[0126] 3. Nuclear charge ranking:
[0127] (1) Read the nuclear charge number Z of each atom (the molecule contains C (Z=6), H (Z=1), N (Z=7)).
[0128] (2) Perform stable ascending order sorting: all H atoms (Z=1) are placed first, followed by C atoms (Z=6), and finally N atoms (Z=7). For atoms that are both C or H, perform secondary sorting according to node degree.
[0129] (3) Before sorting, a 16-dimensional random walk structure code (RWSE) is calculated for each atom and concatenated with the original 128-dimensional atom features to form a 144-dimensional feature vector.
[0130] (4) Based on the sort index, for Rearrange to obtain an ordered sequence .
[0131] 4. Global context modeling:
[0132] (1) Input a Mamba block. The hidden state dimension of this Mamba block is s=16.
[0133] (2) The Mamba block performs a linear scan of a 28-bit sequence and dynamically constructs long-range dependencies between atoms through its selection mechanism. For example, two nitrogen atoms located at opposite ends of a molecule, despite being far apart on the graph, can establish a direct link in this sequence model.
[0134] (3) Output global node embedding By reversing the order, it can be restored to its original atomic order.
[0135] 5. KAN dynamic mixing:
[0136] (1) For each atom v, splicing and ,get .
[0137] (2) Input a KAN layer. This KAN layer transforms each dimension of the 256-dimensional input using K=5 B-spline basis functions. Output an intermediate vector. .
[0138] (3) Through a linear layer Together with Softmax, we generate fusion weights, for example, for a nitrogen atom, we get [α=0.35, β=0.65].
[0139] (4) Calculate the final atomic representation: This indicates that, for this nitrogen atom, the model focuses more on utilizing global contextual information.
[0140] 6. Molecular characterization generation:
[0141] (1) For each atom, aggregate edge context information from the edges it is connected to. .
[0142] (2) Calculate attention weights .
[0143] (3) For all atoms Weighted summation yields a 128-dimensional global molecular representation vector. The final graph-level embedding integrates node and edge information:
[0144] 7. Attribute prediction: Input a two-layer MLP (256-dimensional hidden layer, 1-dimensional output layer), use the SILU activation function, and finally output the pIC50 prediction value of the molecule's inhibition of the 5-hydroxytryptamine transporter (SERT).
[0145] In one or more embodiments, this embodiment verifies the effectiveness of the nuclear charge ranking strategy through comparative experiments. On the BACE dataset (β-secretase 1 inhibitor classification task), with all other hyperparameters fixed and only the node ranking strategy changed, five independent experiments were conducted, and the average ROC-AUC was taken. The results are as follows: Figure 5 , Figure 6 As shown.
[0146] (1) Random sorting: ROC-AUC is 93.1% ± 0.8%, which is the worst performance and unstable.
[0147] (2) Degree ranking: ROC-AUC is 94.5% ± 0.4%, which is better than random, but still limited.
[0148] (3) Nuclear charge ranking (this invention): The ROC-AUC reached 97.0% ± 0.05%, which is significantly better than the former two, and the standard deviation is extremely small, showing excellent stability and accuracy.
[0149] This experiment strongly demonstrates that nuclear charge sequencing, a chemically driven approach, can provide sequence models with inputs of far higher quality than traditional strategies.
[0150] In one or more embodiments, this embodiment demonstrates the accurate predictive capability of the present invention on regression tasks. The model was trained and tested on the Lipophilicity dataset (which predicts the molecular lipid-water partition coefficient logD). Figure 7 , Figure 8 , Figure 9 , Figure 10 A scatter plot showing the model's predicted values and the experimental true values on the test set is presented. It can be seen that the data points are closely distributed on both sides of the ideal diagonal of y=x, with a fitting coefficient of determination R² reaching 0.92 and a root mean square error (RMSE) as low as 0.668. This indicates that the method of this invention also has extremely high prediction accuracy and reliability for continuous molecular properties.
[0151] This invention achieves state-of-the-art performance on multiple molecular property prediction benchmark datasets (such as Tox21, BACE, FreeSolv, etc.), while maintaining high accuracy and exhibiting better training stability and chemical interpretability.
[0152] The task predictions conducted in this invention include two types of molecular property prediction tasks: (1) Classification task (Table 1): predicting whether a molecule has a certain discrete property (such as whether it is toxic, whether it inhibits a certain protein, etc.), which belongs to the category judgment problem of molecular properties. The evaluation index is ROC-AUC. (2) Regression task (Table 2): predicting the continuous value properties of molecules, such as solubility, lipid-water partition coefficient, etc., which belongs to the numerical estimation problem of molecular properties. The evaluation index is RMSE. Both of these types of tasks are standard and commonly used molecular prediction task forms in current medicinal chemistry and cheminformatics.
[0153] Table 1. Comparison of classification performance of the method of the present invention and existing technologies on multiple benchmark datasets.
[0154]
[0155] Table 2. Comparison of regression performance of the method of the present invention and existing technologies on multiple benchmark datasets.
[0156]
[0157] The data sources for the classification tasks (Table 1) include: BBBP (predicting whether a drug can cross the blood-brain barrier), BACE (predicting whether it inhibits β-secretase), HIV (predicting whether it inhibits HIV), Tox21 (predicting toxicity-related receptor activation), SIDER (predicting drug side effects), Clintox (predicting whether a drug has clinical toxicity), and ToxCast (predicting environmental chemical toxicity). These data come from publicly available databases such as those from NIH, EPA, and DeepChem.
[0158] The regression task data sources (Table 2) include: ESOL (predicting water solubility), FreeSolv (predicting solvation free energy), and Lipophilicity (predicting lipid-water partition coefficient logD). These data are used to evaluate the model's ability to quantitatively predict continuous molecular properties. This embodiment collected these data through legal means.
[0159] This invention employs GCN (classical graph convolutional network), MPNN (message passing neural network), GEM (graph embedding model), DimNet / MolCLR / Uni-Mol (representative graph-based or self-supervised learning methods in recent years), and GPS + Transformer / Performer / BigBird (benchmark models combining graph signal and sequence modeling) for experimental comparison. It can be seen that, in Table 1, the higher the numerical value of the model's results on different classification datasets, the better. In Table 2, the lower the numerical value of the results obtained on three different regression datasets, the better. The KAN-NC-Mamba model proposed in this invention achieves excellent results in both types of tasks, demonstrating its excellent molecular characterization ability, strong generalization, and high prediction reliability.
[0160] The above combination Figure 1 The molecular property prediction method based on nuclear charge ordering and KAN fusion provided in the embodiments of the present invention has been described in detail. Next, the molecular property prediction system based on nuclear charge ordering and KAN fusion provided in the embodiments of the present invention will be described in conjunction with the accompanying drawings.
[0161] Figure 11 This is a schematic diagram of the molecular property prediction system based on nuclear charge ordering and KAN fusion, as shown in an embodiment of the present invention. Figure 11 The system described in this invention includes:
[0162] The data preprocessing and input module is used to obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix.
[0163] The message passing neural network module is used to input the graph structure data into the message passing neural network, and through multiple rounds of message passing, aggregation and update operations, obtain the atomic node embedding representation and chemical bond edge embedding representation containing the local chemical environment;
[0164] The nuclear charge sorting module is used to read the nuclear charge number of each atomic node, rearrange the embedded representations of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes;
[0165] The global context modeling module is used to obtain the global atomic node embedding representation based on the atomic node sequence and using a selective state-space model;
[0166] The dynamic feature fusion module is used to input the atomic node embedding representation and the global atomic node embedding representation into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained.
[0167] The graph readout module is used to determine the attention score based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, and to perform weighted fusion of the enhanced representations of all atomic nodes to obtain the global molecular characterization vector.
[0168] The prediction module is used to obtain predicted values of molecular properties based on the global molecular characterization vector.
[0169] In some embodiments, the nuclear charge sorting module is specifically used to: concatenate the random walk structure encoding of each atomic node with the original feature of the atom to obtain a first concatenated feature; read the nuclear charge number of each atomic node, and sort the product of all atomic node embedding representations and the first concatenated feature in ascending order according to the size of the nuclear charge number to generate an atomic node sequence.
[0170] In some embodiments, the global context modeling module is specifically used to: input the atomic node sequence into a selective state space model, calculate a gating vector based on the atomic node sequence through linear projection and activation function, and then modulate the shared state transition matrix to achieve selective state update based on the input content, thereby obtaining a global atomic node embedding representation.
[0171] In some embodiments, the dynamic feature fusion module is specifically used for: concatenating the atomic node embedding representation and the global atomic node embedding representation to obtain a second concatenated feature for each atomic node; inputting the second concatenated feature of each atomic node into a KAN layer to obtain an intermediate vector; inputting the intermediate vector into a linear layer and a Softmax function to generate the weights of the atomic node embedding representation and the global atomic node embedding representation; and performing weighted fusion based on the atomic node embedding representation and the global atomic node embedding representation to obtain an enhanced representation for each atomic node.
[0172] In some embodiments, a weighted fusion of the atomic node embedding representation and the global atomic node embedding representation is performed to obtain an enhanced representation for each atomic node; expressed by the following formula:
[0173]
[0174] in, An enhanced representation of atomic nodes; This represents the embedding representation of atomic nodes; The weights represent the embedding representation of atomic nodes; The weights represent the embedding representations of global atomic nodes; This represents the weight of the global atomic node embedding representation.
[0175] In some embodiments, the graph readout module is specifically configured to: embed the chemical bond edge representation of each atomic node into an edge context vector by mean pooling and an MLP transformation; concatenate the augmented representation of each atomic node with the edge context vector of that atom, and then calculate an attention score with a learnable query vector; perform a weighted summation of the augmented representations of all atomic nodes based on the attention score normalized using Softmax to obtain a graph-level representation; transform the chemical bond edge embedding representation of each atomic node into a global edge representation by an MLP transformation; and concatenate the graph-level representation and the global edge representation to obtain a graph-level molecular characterization.
[0176] The system described in this embodiment also includes: a data input interface supporting multiple molecular formats such as SMILES strings and SDF files; a feature calculation module automatically calculating atomic and bond features and initializing graph data; a KAN-NC-Mamba core engine integrating a pre-trained model with MPNN, nuclear charge sorter, Mamba model, and KAN hybrid module; a task configurator allowing users to select preset prediction tasks such as toxicity, solubility, and activity; and a result output and visualization interface that not only outputs predicted values but also visualizes key atom weights and attention, providing chemical interpretation.
[0177] According to embodiments of the present invention, the molecular property prediction system based on nuclear charge ordering and KAN fusion can correspond to the execution of the method described in the embodiments of the present invention, and the above and other operations and / or functions of each module of the molecular property prediction system based on nuclear charge ordering and KAN fusion are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the code will not be elaborated here.
[0178] See Figure 12 The diagram shows the structure of a computer device, which includes a processor, a communication interface, and a computer-readable storage medium. The processor, communication interface, and computer-readable storage medium are connected via a bus or other means. The communication interface is used to receive and send data. The computer-readable storage medium can be stored in the computer device's memory. The computer-readable storage medium stores computer programs, including program instructions, and the processor executes the program instructions stored in the computer-readable storage medium. The processor (or CPU, Central Processing Unit) is the computing and control core of the computer device, adapted to implement one or more instructions, specifically adapted to load and execute one or more instructions to implement the corresponding steps in the embodiment of the molecular property prediction method based on nuclear charge sorting and KAN fusion.
[0179] This embodiment provides a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the processing system of the computer device.
[0180] Furthermore, this storage space also contains one or more instructions suitable for loading and execution by the processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM memory or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer-readable storage medium located remotely from the aforementioned processor.
[0181] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above embodiment of the molecular property prediction method based on nuclear charge sorting and KAN fusion.
[0182] This embodiment provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding steps in the above-described embodiment of the molecular property prediction method based on nuclear charge ordering and KAN fusion.
[0183] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0184] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0185] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0186] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0187] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0188] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A molecular property prediction method based on nuclear charge ordering and KAN fusion, characterized in that, include: Obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix; The graph structure data is input into a message-passing neural network. Through multiple rounds of message passing, aggregation, and update operations, atomic node embedding representations and chemical bond edge embedding representations containing local chemical environments are obtained. Read the nuclear charge number of each atomic node, rearrange the embedding representation of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes; Based on the atomic node sequence, a selective state-space model is used to obtain the global atomic node embedding representation; The atomic node embedding representation and the global atomic node embedding representation are input into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained. Based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, the attention score is determined, and the enhanced representations of all atomic nodes are weighted and fused to obtain the global molecular characterization vector. Based on the global molecular characterization vector, the predicted values of molecular properties are obtained.
2. The molecular property prediction method based on nuclear charge ordering and KAN fusion according to claim 1, characterized in that, The method involves reading the nuclear charge number of each atomic node, rearranging the embedding representations of all atomic nodes according to the nuclear charge number, and generating a sequence of atomic nodes. The method includes: The random walk structure code of each atomic node is concatenated with the original feature of that atom to obtain the first concatenated feature; Read the nuclear charge number of each atomic node, sort the products of all atomic node embedding representations and the first splicing feature in ascending order according to the size of the nuclear charge number, and generate an atomic node sequence.
3. The molecular property prediction method based on nuclear charge ordering and KAN fusion according to claim 1, characterized in that, Based on atomic node sequences, a selective state space model is used to obtain a global atomic node embedding representation. The method includes: inputting the atomic node sequence into the selective state space model, calculating the gating vector based on the atomic node sequence through linear projection and activation function, and then modulating the shared state transition matrix to achieve selective state update based on the input content, thereby obtaining the global atomic node embedding representation.
4. The molecular property prediction method based on nuclear charge ordering and KAN fusion according to claim 1, characterized in that, The atomic node embedding representation and the global atomic node embedding representation are input into a KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. These are then weighted and fused to obtain the enhanced representation of each atomic node. The method includes: By concatenating the atomic node embedding representation and the global atomic node embedding representation, the second concatenation feature of each atomic node is obtained; The second concatenation feature of each atomic node is input into a KAN layer to obtain an intermediate vector; The intermediate vector is input into a linear layer and a Softmax function to generate the weights of the atomic node embedding representation and the weights of the global atomic node embedding representation. We perform a weighted fusion of the atomic node embedding representation and the global atomic node embedding representation to obtain an enhanced representation for each atomic node.
5. The molecular property prediction method based on nuclear charge ordering and KAN fusion according to claim 4, characterized in that, We perform a weighted fusion of the atomic node embedding representation and the global atomic node embedding representation to obtain the enhanced representation of each atomic node; Expressed using the following formula: in, An enhanced representation of atomic nodes; This represents the embedding representation of atomic nodes; The weights represent the embedding representation of atomic nodes; The weights represent the embedding representation of global atomic nodes; This represents the weight of the global atomic node embedding representation.
6. The molecular property prediction method based on nuclear charge ordering and KAN fusion according to claim 1, characterized in that, Based on chemical bond edge embedding representation and enhanced representation of each atomic node, an attention score is determined, and the enhanced representations of all atomic nodes are weighted and fused to obtain a global molecular representation vector; the method includes: The chemical bond edges of each atom node are embedded and represented, and the edge context vector is obtained by mean pooling and an MLP transformation. The enhanced representation of each atom node and the edge context vector of that atom are concatenated, and then the attention score is calculated with a learnable query vector. The graph-level representation is obtained by weighted summation of the enhanced representations of all atomic nodes based on the attention scores normalized using Softmax. The chemical bond edges of each atom node are embedded and transformed using MLP to obtain the global edge representation; By concatenating the graph-level representation and the global edge representation, a graph-level molecular characterization is obtained.
7. A molecular property prediction system based on nuclear charge ordering and KAN fusion, characterized in that, include: The data preprocessing and input module is used to obtain the graph structure data of the molecule to be predicted, including the set of atomic nodes, the set of chemical bond edges, the node feature matrix, and the edge feature matrix. The message passing neural network module is used to input the graph structure data into the message passing neural network, and through multiple rounds of message passing, aggregation and update operations, obtain the atomic node embedding representation and chemical bond edge embedding representation containing the local chemical environment; The nuclear charge sorting module is used to read the nuclear charge number of each atomic node, rearrange the embedded representations of all atomic nodes according to the size of the nuclear charge number, and generate a sequence of atomic nodes; The global context modeling module is used to obtain the global atomic node embedding representation based on the atomic node sequence and using a selective state-space model; The dynamic feature fusion module is used to input the atomic node embedding representation and the global atomic node embedding representation into the KAN-based dynamic mixing module to obtain the weights of the atomic node embedding representation and the global atomic node embedding representation. After weighted fusion, the enhanced representation of each atomic node is obtained. The graph readout module is used to determine the attention score based on the chemical bond edge embedding representation and the enhanced representation of each atomic node, and to perform weighted fusion of the enhanced representations of all atomic nodes to obtain the global molecular characterization vector. The prediction module is used to obtain predicted values of molecular properties based on the global molecular characterization vector.
8. A computer device, characterized in that, A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program, which, when executed by the processor, implements the steps of the molecular property prediction method based on nuclear charge sorting and KAN fusion as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and to execute the steps of the molecular property prediction method based on nuclear charge sorting and KAN fusion as described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps in the molecular property prediction method based on nuclear charge sorting and KAN fusion as described in any one of claims 1-6.
Citation Information
Patent Citations
Drug interaction prediction method and system based on graph neural network
CN116403730A
Molecular performance prediction method and system based on layered characterization
CN120808912A