A polymer characterization method and system based on graph neural network-transformer
Patent Information
- Application Number
- CN202610891265.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2046-06-18
AI Technical Summary
[0003]本申请提供一种基于图神经网络-Transformer的聚合物表征方法及系统,解决了现有技术因周期结构表达不充分及空间结构利用不足而导致聚合物性质预测精度低与泛化性能差的技术问题
[0014]本申请提供一种基于图神经网络-Transformer的聚合物表征方法及系统,通过构建包含虚拟边的周期分子图表示,在有限图结构中显式刻画了聚合物的平移对称性,结合高维结构模拟机制将二维拓扑特征映射至具备旋转不变性的三维特征空间,从根本上解决了现有技术中聚合物周期结构表达不充分与空间构象信息缺失的核心缺陷;在此基础上,采用编码器-解码器架构配合多重构损失函数进行自监督预训练,使模型能够学习到兼具物理一致性与信息完备性的通用聚合物表征;最终,该表征在玻璃化转变温度、回转半径等多种物性预测任务中展现出优异的精度与外推能力,解决了现有技术因周期结构表达不充分及空间结构利用不足而导致聚合物性质预测精度低与泛化性能差的技术问题。
Smart Images

Figure CN122551953B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence-driven polymer materials informatics, and in particular to a polymer characterization method and system based on graph neural network-Transformer. Background Technology
[0002] Currently, in the field of polymer material research and development, the acquisition of key characterization information for polymers usually relies on experimental testing or theoretical simulation. While data-driven machine learning methods have improved efficiency to some extent, they often treat repeating units as isolated small molecular graph structures when processing polymer systems, ignoring the inherent translational symmetry and long-range periodicity of polymer chains. Furthermore, they are difficult to effectively characterize the influence of three-dimensional spatial conformations on physical properties, resulting in insufficient extrapolation ability of models when faced with novel backbones or changes in end-group chemical environments. Therefore, there is an urgent need for a method to solve the technical problems of low accuracy and poor generalization performance in polymer property prediction caused by insufficient expression of periodic structures and inadequate utilization of spatial structures in existing technologies. Summary of the Invention
[0003] This application provides a polymer characterization method and system based on graph neural network-Transformer, which solves the technical problems of low accuracy and poor generalization performance of polymer property prediction caused by insufficient expression of periodic structure and insufficient utilization of spatial structure in the prior art.
[0004] To achieve the above objectives, this application adopts the following technical solution: Firstly, a polymer characterization method based on a graph neural network-Transformer is provided, comprising: acquiring a polymer repeating unit structure and constructing a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure; extracting atomic features and edge features from the polymer virtual graph and fusing them to obtain initial molecular features; performing high-dimensional structural simulation on the initial molecular features using a spatial matrix formed by splicing multiple two-dimensional rotation matrices to obtain transformed molecular features; performing message passing and neighborhood aggregation on the transformed molecular features based on the graph attention mechanism of the graph neural network to obtain polymer atomic representations, and obtaining polymer molecular representations through pooling operations; inputting the polymer molecular representations into a Transformer decoder to generate corresponding SMILES sequences, connected matrices, and atomic number sequences; training a graph neural network-Transformer model based on the reconstruction error between the SMILES sequences, connected matrices, and atomic number sequences and the corresponding real labels; generating polymer molecular representations using the trained graph neural network-Transformer model, and predicting polymer properties based on the polymer molecular representations to obtain the predicted results of the target polymer properties.
[0005] In conjunction with the first aspect mentioned above, in one possible implementation, the graph neural network-Transformer model is trained based on the reconstruction errors between the SMILES sequence, the connected matrix, and the atomic number sequence and the corresponding real labels. This includes: inputting the polymer molecule representation into the Transformer decoder to generate the corresponding SMILES sequence, connected matrix, and atomic number sequence; determining the first sequence reconstruction error between the SMILES sequence and the corresponding real SMILES sequence; determining the mean square error between the connected matrix and the corresponding real connected matrix; determining the second sequence reconstruction error between the atomic number sequence and the corresponding real atomic number sequence; and updating the parameters of the graph neural network-Transformer model based on the training loss function composed of the first sequence reconstruction error, the mean square error, and the second sequence reconstruction error to obtain the trained graph neural network-Transformer model.
[0006] In conjunction with the first aspect mentioned above, in one possible implementation, a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges is constructed based on the polymer repeating unit structure. This includes: performing a validity check on the SMILES expression corresponding to the polymer repeating unit structure and filtering out abnormal structures containing preset placeholder group identifiers; copying and connecting the filtered polymer repeating unit structures to generate corresponding trimer structures and identifying the intermediate repeating units in the trimer structure; extracting the atomic nodes and inter-atomic chemical bond connections in the intermediate repeating units; constructing an initial polymer graph using the atomic nodes as graph nodes and the inter-atomic chemical bond connections as ordinary edges; identifying polymerization connection sites in the intermediate repeating units and determining the atomic nodes directly connected to each polymerization connection site; establishing virtual edges between the atomic nodes directly connected to each polymerization connection site to characterize cross-repetition unit connections; and adding the virtual edges to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
[0007] In conjunction with the first aspect mentioned above, one possible implementation involves extracting atomic and edge features from the polymer virtual graph and fusing them to obtain initial molecular features. This includes: extracting atomic features corresponding to each atomic node in the polymer virtual graph, including atomic type, valence, hybridization state, charge state, aromaticity state, and electron donor / acceptor properties; extracting edge features corresponding to each edge in the polymer virtual graph, including chemical bond type, bond order information, conjugation state, and edge connection direction; performing association mapping between atomic features and edge features based on the connection relationship between each atomic node and edge; and fusing and encoding the associated mapped atomic and edge features to obtain the corresponding initial molecular features.
[0008] In conjunction with the first aspect mentioned above, in one possible implementation, a high-dimensional structural simulation of the initial molecular features is performed using a spatial matrix formed by splicing multiple two-dimensional rotation matrices to obtain the transformed molecular features. This includes: constructing multiple two-dimensional rotation matrices based on a preset rotation angle; wherein each two-dimensional rotation matrix is used to characterize the local spatial conformational changes in the corresponding subspace; splicing the multiple two-dimensional rotation matrices along the diagonal direction to construct the corresponding spatial matrix; rotating the spatial matrix by an angle to obtain the corresponding symmetric equivalent spatial matrix; mapping the initial molecular features to the feature spaces corresponding to the spatial matrix and the symmetric equivalent spatial matrix, respectively, to obtain spatial features and symmetric equivalent spatial features; and performing weighted fusion of the spatial features and the symmetric equivalent spatial features to obtain the transformed molecular features.
[0009] In conjunction with the first aspect mentioned above, in one possible implementation, a graph attention mechanism based on a graph neural network performs message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic representations, and then obtains polymer molecular representations through pooling operations. This includes: assigning the transformed molecular features to corresponding atomic nodes as node features for each atomic node; determining the set of neighboring nodes corresponding to each atomic node based on the node connection relationships in the polymer virtual graph; calculating the feature correlation between each atomic node and its corresponding neighboring nodes in the set of neighboring nodes to obtain corresponding attention weights, and normalizing the attention weights to obtain attention coefficients corresponding to each neighboring node; performing weighted aggregation on the node features in the set of neighboring nodes based on the attention coefficients to complete message passing and neighborhood information fusion between nodes, thus obtaining polymer atomic representations; and performing pooling operations on the polymer atomic representations to obtain the corresponding polymer molecular representations.
[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the polymer molecular representation is input into a Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence. This includes: inputting the polymer molecular representation into a feedforward neural network for dimensionality mapping to obtain the corresponding low-dimensional feature vector; inputting the low-dimensional feature vector into a Transformer decoder for sequence generation based on a self-attention mechanism to obtain the corresponding SMILES sequence; performing molecular graph analysis on the generated SMILES sequence to obtain the corresponding inter-atomic connectivity relationships; constructing the corresponding connectivity matrix based on the inter-atomic connectivity relationships; and generating the corresponding atomic number sequence based on the atomic identification information in the SMILES sequence.
[0011] In conjunction with the first aspect mentioned above, in one possible implementation, a trained graph neural network-Transformer model is used to generate polymer molecular characterization, and polymer property prediction is performed based on the polymer molecular characterization to obtain the target polymer property prediction result. This includes: inputting the repeating unit structure of the polymer to be tested into the trained graph neural network-Transformer model to obtain the corresponding polymer molecular characterization; inputting the polymer molecular characterization into a preset property prediction model to establish a mapping relationship between the polymer molecular characterization and the target property; and determining the target polymer property prediction result corresponding to the polymer to be tested based on the mapping relationship. The target polymer property includes at least one of glass transition temperature, radius of gyration, free volume fraction, crystallization temperature, and density. The property prediction model includes a machine learning model or a deep learning model.
[0012] Secondly, a polymer characterization system based on a graph neural network (Transformer) is provided, comprising: a polymer virtual graph construction module, an initial feature generation module, a high-dimensional structure simulation module, a graph representation learning module, a Transformer decoding module, a model training module, and a property prediction module; wherein, the polymer virtual graph construction module is used to obtain the polymer repeating unit structure and construct a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure; the initial feature generation module is used to extract atomic features and edge features from the polymer virtual graph and fuse them to obtain initial molecular features; the high-dimensional structure simulation module is used to perform high-dimensional structure simulation on the initial molecular features using a spatial matrix formed by splicing multiple two-dimensional rotation matrices to obtain the transformed molecular features; the graph representation learning module is used for... A graph attention mechanism based on a graph neural network performs message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic representations, and then obtains polymer molecular representations through pooling operations. A Transformer decoding module is used to input the polymer molecular representations into the Transformer decoder to generate corresponding SMILES sequences, connectivity matrices, and atomic number sequences. A model training module is used to train the graph neural network-Transformer model based on the reconstruction error between the SMILES sequences, connectivity matrices, and atomic number sequences and the corresponding real labels. A property prediction module is used to generate polymer molecular representations using the trained graph neural network-Transformer model and predict polymer properties based on the polymer molecular representations to obtain the predicted results of the target polymer properties.
[0013] In conjunction with the second aspect above, in one possible implementation, the polymer virtual graph construction module is further configured to: perform a validity check on the SMILES expression corresponding to the polymer repeating unit structure, filtering out abnormal structures containing preset placeholder group identifiers; copy and connect the filtered polymer repeating unit structures to generate the corresponding trimer structure, and determine the intermediate repeating units in the trimer structure; extract the atomic nodes and the chemical bond connections between atoms in the intermediate repeating units; construct an initial polymer graph by using the atomic nodes as graph nodes and the chemical bond connections between atoms as ordinary edges; identify the polymerization connection sites in the intermediate repeating units, and determine the atomic nodes directly connected to each polymerization connection site; establish virtual edges between the atomic nodes directly connected to each polymerization connection site to characterize the cross-repetition unit connection relationship; add the virtual edges to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
[0014] This application provides a polymer characterization method and system based on graph neural networks (Transformers). By constructing a periodic molecular graph representation containing virtual edges, the translational symmetry of polymers is explicitly characterized in a finite graph structure. Combined with a high-dimensional structure simulation mechanism, two-dimensional topological features are mapped to a three-dimensional feature space with rotation invariance, fundamentally solving the core defects of insufficient expression of polymer periodic structure and lack of spatial conformation information in existing technologies. On this basis, an encoder-decoder architecture combined with a multi-reconstruction loss function is used for self-supervised pre-training, enabling the model to learn a general polymer characterization that combines physical consistency and information completeness. Finally, this characterization exhibits excellent accuracy and extrapolation ability in various property prediction tasks such as glass transition temperature and radius of gyration, solving the technical problems of low accuracy and poor generalization performance of polymer property prediction caused by insufficient expression of periodic structure and insufficient utilization of spatial structure in existing technologies.
[0015] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0016] Figure 1 A system architecture diagram of a polymer characterization system based on graph neural network-Transformer is provided for embodiments of this application; Figure 2 A schematic flowchart of a polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 3 A schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 4 A schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 5 A schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 6 A schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 7 A schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided for embodiments of this application; Figure 8 This is a schematic flowchart of another polymer characterization method based on graph neural network-Transformer provided in the embodiments of this application. Detailed Implementation
[0017] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.
[0018] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0019] The polymer characterization method based on graph neural network-Transformer provided in this application can be applied to, for example... Figure 1 The polymer characterization system based on graph neural network-Transformer shown below, such as Figure 1 As shown, the system includes: a polymer virtual graph construction module 101, an initial feature generation module 102, a high-dimensional structure simulation module 103, a graph representation learning module 104, a Transformer decoding module 105, a model training module 106, and a property prediction module 107. The system includes the following modules: a polymer virtual graph construction module 101, which acquires the polymer repeating unit structure and constructs a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure; an initial feature generation module 102, which extracts atomic and edge features from the polymer virtual graph and fuses them to obtain initial molecular features; a high-dimensional structure simulation module 103, which uses a spatial matrix formed by splicing multiple two-dimensional rotation matrices to perform high-dimensional structure simulation on the initial molecular features to obtain transformed molecular features; and a graph representation learning module 104, which uses the graph attention mechanism of a graph neural network to perform message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic representations and performs pooling operations. The polymer molecular characterization is obtained; the Transformer decoding module 105 is used to input the polymer molecular characterization into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix and atomic number sequence; the model training module 106 is used to train the graph neural network-Transformer model based on the reconstruction error between the SMILES sequence, connectivity matrix and atomic number sequence and the corresponding real label; the property prediction module 107 is used to generate the polymer molecular characterization using the trained graph neural network-Transformer model, and to predict the polymer properties based on the polymer molecular characterization to obtain the target polymer property prediction result.
[0020] In this embodiment, the polymer virtual graph construction module is further configured to: perform a validity check on the SMILES expression corresponding to the polymer repeating unit structure, and filter out abnormal structures containing preset placeholder group identifiers; copy and connect the filtered polymer repeating unit structures to generate the corresponding trimer structure, and determine the intermediate repeating units in the trimer structure; extract the atomic nodes and the chemical bond connections between atoms in the intermediate repeating units; construct an initial polymer graph by using the atomic nodes as graph nodes and the chemical bond connections between atoms as ordinary edges; identify the polymerization connection sites in the intermediate repeating units, and determine the atomic nodes directly connected to each polymerization connection site; establish virtual edges between the atomic nodes directly connected to each polymerization connection site to characterize the cross-repetition unit connection relationship; add the virtual edges to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
[0021] To address the technical problems of low accuracy and poor generalization performance in polymer property prediction due to insufficient expression of periodic structures and inadequate utilization of spatial structures in existing technologies, this application provides a polymer characterization method based on graph neural networks (Transformers). Figure 2 A schematic flowchart of the polymer characterization method based on graph neural network-Transformer provided in the embodiments of this application is shown below. Figure 2 As shown, the method includes: S201. Obtain the polymer repeating unit structure.
[0022] Among them, the polymer repeating unit structure refers to the smallest periodic structural segment that can represent the chemical composition and connection mode of the polymer chain. It is usually stored in the database in the form of SMILES strings, InChI codes or molecular diagram files.
[0023] In this embodiment, the system reads structural descriptors of polymer repeating units in batches from a pre-built polymer dataset or an external cheminformatics platform via a data interface. The system then performs format verification and standardization preprocessing on the read data to ensure that subsequent processing modules can correctly parse the input structures. The system can also be configured with a caching mechanism to keep frequently accessed repeating unit structures in memory, thereby improving overall processing efficiency.
[0024] It should be noted that the obtained repeating unit structure should have undergone basic chemical rationality verification, but whether it contains specific placeholders or end-group identifiers is not subject to mandatory filtering at this stage. The specific legality detection logic can be flexibly configured in subsequent graph construction steps according to actual needs.
[0025] Based on the above steps, automated acquisition and standardized access of polymer raw structure data were achieved, providing a unified and reliable input source for subsequent feature engineering and avoiding processing interruptions or parsing errors caused by heterogeneous data formats.
[0026] S202. Construct a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure.
[0027] Among them, the polymer virtual graph is a special graph data structure that, while retaining the real chemical bond connections between atoms within the molecule (ordinary edges), introduces additional virtual edges that characterize the periodic connections across repeating units, thereby simulating the topological environment of an infinitely long polymer chain in a finite graph structure.
[0028] In this embodiment, the system first parses the atomic connections within repeating units to generate a basic graph structure. It then identifies aggregation sites based on preset periodic boundary conditions and adds virtual edges between corresponding atomic nodes to close the topological loop. The entire construction process is automated, supporting batch parallel processing. The generated polymer virtual graph is stored in the form of an adjacency list or a sparse matrix, facilitating direct reading by subsequent graph neural network modules.
[0029] It should be noted that the introduction of virtual edges is a key feature that distinguishes this scheme from traditional small molecule graph representation. They do not correspond to real chemical bonds, but rather serve as an information transmission channel, enabling the model to perceive the translational symmetry and long-range correlation of polymer chains. The specific virtual edge connection strategy can be adaptively adjusted according to the polymer type (such as linear, branched, or cross-linked).
[0030] Based on the above steps, the discrete repeating unit structure is transformed into a graph representation containing periodic topological information, which effectively solves the problem of losing chain environment information due to truncation processing in traditional methods, enabling the model to equivalently represent infinitely long chain systems under limited computing resources.
[0031] S203. Extract atomic and edge features from the polymer virtual graph and fuse them to obtain the initial molecular features.
[0032] Among them, atomic features and edge features describe the physical and chemical properties of nodes and edges in the graph, respectively, while initial molecular features encode these discrete properties into dense representations in a continuous vector space, which serve as input tensors for subsequent deep learning models.
[0033] In this embodiment, the system traverses all nodes and edges in the polymer virtual graph, queries or calculates the attribute values of each element according to a predefined feature dictionary, and converts them into fixed-dimensional feature vectors through an embedding layer or a linear mapping layer. The system employs strategies such as splicing, addition, or gated fusion to integrate associated atomic features and edge features, generating an initial molecular feature matrix containing rich local chemical environment information.
[0034] It is important to note that the feature extraction and fusion process should maintain permutation invariance to the graph structure, meaning the order of nodes should not affect the final feature representation. Simultaneously, the design of the fusion strategy must balance information integrity and computational efficiency, avoiding the introduction of excessive redundant dimensions that could lead to overfitting in subsequent models.
[0035] Based on the above steps, the symbolic chemical structure information is transformed into a numerical tensor representation, enabling the model to learn the complex mapping relationship between structure and properties using optimization algorithms such as gradient descent, providing semantically rich low-level input for high-dimensional feature abstraction.
[0036] S204. High-dimensional structural simulation of the initial molecular features is performed using a spatial matrix formed by splicing multiple two-dimensional rotation matrices to obtain the transformed molecular features.
[0037] Among them, the space matrix is a high-dimensional linear transformation operator composed of multiple low-dimensional rotation operators. Its function is to implicitly introduce spatial configuration changes and rotation invariance through algebraic operations without relying on explicit three-dimensional coordinates, so that the features of the two-dimensional graph have three-dimensional geometric perception capabilities.
[0038] In this embodiment, the system generates a set of two-dimensional rotation matrices according to preset parameters, and splices them into a spatial matrix and its symmetric equivalent form in a block-diagonal manner. The system projects the initial molecular features into the subspaces defined by these two matrices respectively, and performs weighted fusion on the two sets of projected features to output the transformed molecular features that incorporate spatial conformation information. This process is entirely based on matrix multiplication, and the computational overhead is far lower than that of molecular dynamics simulations or three-dimensional conformation searches.
[0039] It should be noted that this high-dimensional structure simulation mechanism is essentially a data augmentation and regularization method. It forces the model to learn feature representations robust to spatial rotation, rather than memorizing specific two-dimensional projection poses. The rotation angle and fusion weights can be used as learnable parameters or hyperparameters in training to adapt to the conformational flexibility differences of different polymer systems.
[0040] Based on the above steps, the information loss of two-dimensional graph structures in representing three-dimensional flexible chains is made up for with extremely low computational cost, enabling the model to capture physical properties closely related to spatial arrangement, breaking through the limitation of traditional graph neural networks that can only handle topological connections.
[0041] S205. The graph attention mechanism based on graph neural network performs message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic characterization, and obtains polymer molecular characterization through pooling operation.
[0042] Among them, the graph attention mechanism allows the model to adaptively assign importance weights to different neighbor nodes during message passing, thereby focusing on local structures that contribute more to the current task; the pooling operation compresses the variable-length atomic-level representation into a fixed-length molecular-level global representation.
[0043] In this embodiment, the system uses the transformed molecular features as node input and iteratively updates the node state through a multi-layer graph attention network. In each layer, the system calculates the attention coefficients between the central node and its neighboring nodes, and aggregates the neighbor information accordingly. After several layers of propagation, the system performs average pooling, max pooling, or attention pooling on the final representation of all nodes, outputting a compact vector representing the entire polymer molecule.
[0044] It should be noted that the distribution of attention weights is inherently interpretable and can be used to identify functional groups or structural pathways in polymers that play a dominant role in specific properties. The selection of pooling strategies should comprehensively consider the polymer molecular weight distribution and property sensitivity to avoid losing key local information due to over-compression.
[0045] Based on the above steps, a hierarchical feature extraction from the atomic-level local environment to the molecular-level global semantics was achieved, enabling the model to adaptively capture multi-scale structure-property correlations and enhancing the characterization ability and prediction accuracy of complex polymer systems.
[0046] S206. Input the polymer molecule characterization into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence.
[0047] Among them, the Transformer decoder is a sequence generation model based on the self-attention mechanism. Its task is to reverse reconstruct continuous molecular representations into discrete structured outputs, including one-dimensional sequences, two-dimensional topological matrices and element composition information, thereby verifying the information completeness of the representation and providing multiple supervision signals.
[0048] In this embodiment, the system feeds the polymer molecule characterization, after dimensional adaptation, into a Transformer decoder, which progressively generates a sequence of SMILES characters. Simultaneously, the system performs syntactic parsing on the generated SMILES to reconstruct the connectivity matrix and extracts atomic identifiers from the sequence to generate an atomic number sequence. These three outputs together constitute a multi-perspective reconstruction of the original polymer structure.
[0049] It should be noted that the design of generating multiple heterogeneous outputs is not redundant, but rather to prevent the model from getting stuck in local optima or feature collapse under a single reconstruction objective. The connectivity matrix constrains topological correctness, the atomic number sequence constrains element conservation, and the SMILES sequence constrains the legality of chemical semantics. The three work together to ensure the physical consistency of the latent space.
[0050] Based on the above steps, the representations learned by the encoder are subjected to strong constraints through the multimodal reconstruction task, which forces the model to retain complete chemical and topological information during the compression process, providing high-quality, information-free pre-trained features for downstream property prediction.
[0051] S207. Based on the reconstruction error between the SMILES sequence, the connectivity matrix, and the atomic number sequence and the corresponding real labels, the graph neural network-Transformer model is trained.
[0052] The reconstruction error measures the deviation between the model-generated output and the true structure, and is the core supervision signal driving model parameter updates. The training process aims to minimize this error, causing the encoder-decoder to converge to a stable state that accurately represents the polymer structure.
[0053] In this embodiment, the system inputs polymer molecular characterization into a Transformer decoder to generate corresponding SMILES sequences, a connectivity matrix, and an atomic number sequence. It determines the first sequence reconstruction error between the SMILES sequence and the corresponding true SMILES sequence; the mean square error between the connectivity matrix and the corresponding true connectivity matrix; and the second sequence reconstruction error between the atomic number sequence and the corresponding true atomic number sequence. Based on the first sequence reconstruction error, the mean square error, and the second sequence reconstruction error, a training loss function composed of preset weights is used to update the parameters of the graph neural network-Transformer model, resulting in a trained graph neural network-Transformer model. The system uses the backpropagation algorithm to calculate gradients and uses optimizers such as Adam or SGD to update model parameters. During training, strategies such as learning rate scheduling, early stopping, and gradient pruning can also be introduced to improve convergence stability and generalization performance.
[0054] It should be noted that the training at this stage falls under the category of self-supervised pre-training and can be performed without any property labels. This allows the model to fully utilize massive amounts of unlabeled polymer structure data to learn general representations, significantly reducing its dependence on expensive experimental data. The combination of loss functions can be dynamically adjusted according to the training stage, for example, initially focusing on sequence reconstruction and later strengthening topological constraints.
[0055] As an example, the system can use cross-entropy loss to calculate SMILES reconstruction error, mean squared error to calculate connectivity matrix bias, and classification loss to calculate atomic number error. The three are weighted and summed in a 1:1:1 ratio. The system is trained for 100 epochs using the AdamW optimizer with a batch size of 64. If the validation set loss does not decrease for 10 consecutive epochs, early stopping is triggered.
[0056] Based on the above steps, general prior knowledge of polymer structure was extracted from large-scale unlabeled data through self-supervised learning, giving the model powerful feature extraction capabilities and transfer potential, laying a solid foundation for subsequent small-sample property prediction tasks.
[0057] S208. Use the trained graph neural network-Transformer model to generate polymer molecular characterization, and predict polymer properties based on the polymer molecular characterization to obtain the prediction results of the target polymer properties.
[0058] Among them, property prediction takes the general molecular characterization obtained from pre-training as input and establishes a mapping relationship between it and specific physicochemical properties through a lightweight downstream model, thereby achieving efficient and accurate end-to-end prediction.
[0059] In this embodiment, the system freezes or partially fine-tunes the encoder portion of the pre-trained model, inputs the molecular characterization of the polymer to be tested into the pre-trained property prediction head, and outputs the corresponding property values or categories. The prediction head can be a simple fully connected layer or a more complex machine learning or deep learning model, depending on the task complexity and data scale.
[0060] It should be noted that, since the pre-trained representations already contain rich structural and chemical information, downstream prediction models typically require only a small amount of labeled data to achieve high accuracy, and exhibit good versatility across different tasks. Furthermore, the system supports multi-task joint prediction, further improving data utilization efficiency and prediction consistency.
[0061] As an example, for glass transition temperature prediction, the system can input a 512-dimensional molecular characterization into a three-layer MLP regression head, or superimpose a random forest model on the characterization; for crystallization behavior classification, a Softmax classifier can be used. All prediction results are accompanied by confidence estimates to facilitate user assessment of reliability.
[0062] Based on the above steps, the pre-trained representations can be seamlessly transferred to diverse downstream applications, achieving efficient mapping from structure to properties and effectively reducing the computational cost and experimental cycle of high-throughput screening and material design.
[0063] The embodiments of this application form a complete and efficient polymer characterization pipeline by constructing a periodic virtual graph, introducing high-dimensional structure simulation, and adopting multi-reconstruction pre-training and attention-driven hierarchical representation learning, which fundamentally solves the problems of insufficient expression of periodic structures and lack of spatial information in the prior art.
[0064] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 3 As shown, the above S202 can be specifically implemented through the following S301 to S308, which are explained in detail below: S301. Perform a validity check on the SMILES expression corresponding to the polymer repeating unit structure and filter out abnormal structures containing preset placeholder group identifiers.
[0065] Among them, the preset placeholder group identifier refers to the non-standard symbols used in cheminformatics databases to represent unknown substituents or general connection points, such as [R], [R1], [R2], [A], etc. These symbols cannot be recognized as specific atomic nodes or chemical bonds by conventional molecular graph parsing engines, which will lead to subsequent graph construction failures or topological errors.
[0066] In this embodiment, the system iterates through the input set of polymer SMILES strings, using regular expression matching or built-in validation functions in the chemical toolkit to scan for the existence of the aforementioned preset placeholder group identifiers. Once a target identifier is detected, the system marks the record as an abnormal sample and moves it to a filtering queue, retaining only valid SMILES that pass the validity check for subsequent processing. This detection process supports a custom extended placeholder blacklist to adapt to differences in annotation specifications across different data sources.
[0067] It should be noted that legality checks are not limited to placeholder filtering; they can also include multiple rules such as valence state rationality checks, ring system closure verification, and atom type compliance checks to ensure the chemical semantic integrity of the input data. The filtered dataset should record the rejection rate and the distribution of reasons for rejection to facilitate tracing data quality issues.
[0068] Based on the above steps, this step effectively prevents the risk of graph construction interruption caused by non-standard data annotation, and ensures that all subsequent processing steps are based on molecular structures with clear chemical semantics and computable values, thereby improving the robustness and automation of the overall process.
[0069] S302. The filtered polymer repeating unit structure is copied and connected to generate the corresponding trimer structure, and the intermediate repeating unit in the trimer structure is determined.
[0070] Among them, the trimer structure refers to the linear oligomer formed by replicating a single polymer repeating unit three times along the main chain direction. Its purpose is to simulate the local chemical environment of repeating units in an infinitely long chain through molecular fragments of finite length. The middle repeating unit refers to the repeating unit located in the center of the trimer with adjacent units connected on both sides. Its boundary atoms are not affected by the end group effect and best represent the true state of the bulk polymer.
[0071] In this embodiment, the system reads the filtered monomers (SMILES) and automatically performs two copy-join operations according to predefined polymerization reaction rules or linkage site markers to generate trimer SMILES or molecular objects containing three consecutive repeating units. Based on the linkage order index or atomic tags, the system accurately locates and extracts the intermediate repeating unit as the core object for subsequent graph construction. This process supports configurations of various linkage modes, such as head-to-tail and head-to-head, to adapt to different polymerization mechanisms.
[0072] It should be noted that the choice of trimer over dimer or tetramer is a trade-off between computational efficiency and information integrity. While dimer is computationally faster, intermediate units are still affected by end-group interference; tetramers and above provide a more realistic environment, but the number of atoms increases linearly, significantly increasing the message passing overhead of the graph neural network. Trimer, on the other hand, ensures that intermediate units are fully embedded in the periodic environment while keeping computational costs within an acceptable range.
[0073] As an example, for polyvinyl alcohol monomers, the system protects the hydroxyl groups in its SMILES, connects three units through esterification reaction rules to generate a trimer molecule; then, the intermediate unit composed of carbon atoms 4 to 8 is identified by atom mapping number, and the rest is regarded as environmental context and is retained but not involved in the core graph construction.
[0074] Based on the above steps, this step obtains a representation of the local chemical environment without end-group contamination at minimal computational cost without introducing expensive periodic boundary condition calculations. This enables the model to learn structural features that truly reflect the bulk polymer properties and avoids the boundary artifact problem that is common in traditional monomer repeating unit modeling.
[0075] S303, extract the atomic nodes and chemical bond connections between atoms in the intermediate repeating units.
[0076] Atomic nodes refer to all the chemical element entities that make up the intermediate repeating units. Each node carries basic attributes such as atomic number and isotope information. Chemical bond connections describe the covalent bond states between nodes, including single bonds, double bonds, triple bonds and aromatic bonds. Together, they constitute the topological framework of the molecular diagram.
[0077] In this embodiment, the system invokes a molecular analysis engine to perform a depth-first traversal of the intermediate repeating units, enumerating all non-hydrogen atoms (or including explicit hydrogen atoms as needed) as a node set, and simultaneously recording the bond order and bond type between each pair of atoms to form an edge set. This extraction process is strictly limited to the intermediate units, but retains the connection bond information with adjacent units for subsequent virtual edge construction. The extraction results are temporarily stored in a standardized graph data structure, supporting fast random access.
[0078] It is important to note that the extraction of nodes and edges should maintain consistency; that is, both endpoints of each edge must exist in the node set to avoid dangling edges or isolated nodes. For special structures such as aromatic systems, the system needs to undergo Kekuléization or use aromatic bond notation to ensure accurate representation of bond-level information. Furthermore, the extraction process should also record the stereochemical configurations of atoms (such as chiral centers and cis-trans isomers) to provide stereo information support for subsequent feature encoding.
[0079] Based on the above steps, this step accurately transforms the chemical structure into a discrete graph theory representation, providing a structured input basis for subsequent numerical feature extraction and neural network operations, and ensuring a lossless correspondence between topological information and the original molecular structure.
[0080] S304. Construct an initial polymer graph by using atomic nodes as graph nodes and chemical bond connections between atoms as ordinary edges.
[0081] The initial polymer graph refers to a graph structure that only contains the actual chemical bonds within the molecules and has not yet introduced any periodic boundary information. It reflects the topological connectivity of the repeating units themselves and serves as the basic carrier for subsequent superposition of virtual edges to form a complete polymer virtual graph.
[0082] In this embodiment, the system instantiates a graph object as the initial polymer graph, using the set of atomic nodes as the vertex set and chemical bond connections as the edge set. This graph object is stored using an adjacency matrix or adjacency list, supports directed or undirected representation, and can be appended with a node / edge attribute dictionary. At this stage, the system does not perform any feature assignments or transformations, but only establishes a pure topological framework to maintain the modularity and debuggability of the construction process.
[0083] It should be noted that although the initial polymer graph does not exhibit periodicity, its topological structure itself contains rich chemical information, such as ring size, branching degree, and functional group positions. During construction, the connectivity of the graph should be ensured to conform to chemical intuition. For multi-component or ionic polymers, multiple subgraphs can be constructed and connected by special edges, or they can be uniformly incorporated into a single graph structure for processing. The specific strategy depends on the application scenario.
[0084] S305. Identify the aggregation connection sites in the intermediate repeating units and determine the atomic nodes directly connected to each aggregation connection site.
[0085] Among them, polymerization linkage sites refer to the chemical positions in repeating units that participate in chain growth reactions. They are usually explicitly indicated in SMILES by special markers such as [*] and [X], or implicitly defined through reaction templates. The atomic nodes directly connected to each polymerization linkage site refer to the actual atoms in the molecular diagram that are connected to the site by single bonds. They are the physical anchors for cross-unit information transmission.
[0086] In this embodiment, the system scans the atomic or bond properties of intermediate repeating units to locate all virtual atoms or special bonds marked as aggregation sites. For each identified site, the system queries its neighbor list to obtain the index of the real atomic node directly bonded to it. If the site marker has been removed, the corresponding atom is inferred in reverse based on a pre-stored site mapping table or chemical rules. This identification process supports complex topologies such as multi-site and asymmetric connections.
[0087] It is important to note that accurate identification of polymerization sites is a prerequisite for constructing correct virtual edges. For non-vinyl polymerization systems such as condensation polymerization and ring-opening polymerization, the sites may involve heteroatoms or atoms within functional groups, requiring judgment based on a reaction mechanism knowledge base. The system should provide a site verification mechanism, such as checking whether the valence state of the site atoms is saturated or whether they are located on the main chain path, to prevent topological distortions caused by misidentification.
[0088] Based on the above steps, this step accurately locates the physical interface for periodic information injection, ensuring that the virtual edges can accurately bridge the key atoms of adjacent repeating units, making the constructed virtual graph topologically equivalent to a local segment of an infinitely long chain, thus avoiding periodic modeling failure caused by site misalignment.
[0089] S306. Establish virtual edges between atomic nodes that are directly connected to each aggregation connection site to represent the connection relationship across repeating units.
[0090] Virtual edges are artificially added non-chemical bond connections that do not change the electronic structure or geometric configuration of molecules. They only serve as information channels in the message passing process of graph neural networks to simulate the topological associations and chemical environment continuity between adjacent repeating units in polymer chains.
[0091] In this embodiment, the system creates new edge records between corresponding directly connected atomic nodes based on the aggregation site pairs. Each virtual edge can be assigned a specific edge type label (such as "virtual" or "periodic") to distinguish it from ordinary chemical bonds, and an independent feature initialization strategy can be set. The directionality of the virtual edge can be set to directed according to the aggregation direction, or undirected for simplified processing. This operation can be performed by modifying the graph data structure in-situ or generating a new graph copy.
[0092] It should be noted that the introduction of virtual edges is the core mechanism for achieving periodic consistency modeling in this scheme. It enables the graph neural network to perceive the chain environment on both sides of the repeating unit without explicitly constructing a supercell or applying periodic boundary conditions, thereby learning translation-invariant feature representations. The number of virtual edges is independent of the degree of aggregation and depends only on the connection valence of the repeating unit; therefore, the computational cost is constant.
[0093] As an example, for linear polyethylene, the system adds a virtual edge between the carbon atoms at both ends of the intermediate unit to form a loop topology; for cross-linked polymers, multiple virtual edges may be established between the end atoms of multiple side chains to simulate periodic connections in a three-dimensional network. Virtual edges can be assigned different initial embedding vectors than ordinary edges in subsequent feature extraction to help the model distinguish between real bonds and periodic associations.
[0094] Based on the above steps, this step embeds the topological prior of an infinitely long chain into a finite graph at extremely low computational cost, enabling the model to capture structural patterns and electronic effects that cross the boundaries of repeating units, fundamentally solving the inherent defect of traditional small molecule graph characterization methods in handling polymer periodicity.
[0095] S307. Add virtual edges to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
[0096] Among them, the polymer virtual graph is a composite graph structure that integrates real chemical topology and artificial periodic constraints. It not only retains the accurate chemical information inside the repeating units, but also completes the cross-unit association paths through virtual edges. It is a standardized input object for subsequent feature extraction and model training.
[0097] In this embodiment, the system merges the set of virtual edges into the initial polymer graph, updates the adjacency and edge attribute tables, and forms the final polymer virtual graph. This graph object encapsulates complete nodes, ordinary edges, virtual edges, and their metadata. The system can also perform normalization processing on the graph, such as node reordering, self-loop removal, and multi-edge merging, to ensure data structure consistency.
[0098] It should be noted that the polymer virtual graph, as an intermediate representation, is designed to balance information completeness and computational friendliness. The existence of virtual edges does not affect the chemical validity verification of molecules, but in graph neural networks, they are treated as normal edges participating in message passing. This decoupled design allows the same graph construction process to be adapted to different types of polymers (linear, branched, and mesh-like), requiring only adjustments to the virtual edge generation rules.
[0099] Based on the above steps, this step generates a standardized graph representation that combines chemical realism and periodic equivalence, providing a unified and information-rich input foundation for subsequent feature extraction and high-dimensional structure simulation, and ensuring the physical consistency and reproducibility of the entire representation learning process.
[0100] S308. Extract atomic and edge features from the polymer virtual graph and fuse them to obtain the initial molecular features.
[0101] Among them, atomic features are numerical descriptions of the physicochemical properties of each node in the graph, edge features are quantitative expressions of the connectivity properties of each edge (including ordinary edges and virtual edges), and initial molecular features are dense vector representations that can be directly processed by neural networks, generated by associative mapping and fusion encoding of the two. Their quality directly determines the upper limit of the effect of subsequent high-dimensional structure simulation and representation learning.
[0102] In this embodiment, the system first traverses all nodes of the polymer virtual graph, extracting multidimensional atomic features including atom type, valence, hybridization state, charge state, aromaticity state, and electron donor / acceptor properties. Simultaneously, it traverses all edges, extracting multidimensional edge features including bond type, bond order information, conjugation state, and edge connection direction. Based on node-edge relationships, the system aggregates edge features to connected nodes or dynamically weights them using an attention mechanism, then concatenates them with atomic features and fuses them through linear transformation or gated units to generate an initial molecular feature matrix of fixed dimensions. The entire process supports GPU parallel acceleration and batch processing optimization.
[0103] It is important to note that the choice of feature dimensions must balance information coverage and computational efficiency. Electron donor-acceptor properties in atomic features are particularly crucial for predicting photoelectric properties, while conjugated states in edge features directly affect the characterization of electrical conductivity and optical band gap. The fusion strategy should avoid dimensionality explosion caused by simple splicing; dimensionality reduction projection or adaptive fusion mechanisms can be employed. Furthermore, the features of virtual edges should be initialized or learned separately to distinguish them from real chemical bonds, helping the model identify periodic signals.
[0104] As an example, the system maps discrete features such as atom type (6 types), valence state (5 types), and hybridization (4 types) into 32-dimensional vectors through an embedding layer. Continuous features such as charge and aromaticity are directly normalized and concatenated to obtain 64-dimensional atomic features. Similarly, edge features are encoded into 32-dimensional vectors. Then, through a preprocessing layer before message passing, the atomic features of each node are concatenated with the average features of its connected edges and fused into 128-dimensional initial molecular features through a ReLU-activated fully connected layer. Virtual edge features are initialized to all-zero vectors and adaptively learned during training.
[0105] The embodiments of this application fully transform the symbolic chemical structure into a numerical tensor rich in physicochemical semantics. This not only preserves the topological connectivity information but also embeds the electronic structure and stereochemical environment, providing sufficient and structured underlying input for subsequent high-dimensional structure simulations and effectively enhancing the model's ability to characterize complex polymer structure-property relationships.
[0106] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 4 As shown, the above S204 can be specifically implemented through the following S401 to S405, which are explained in detail below: S401. Construct multiple two-dimensional rotation matrices based on preset rotation angles.
[0107] Among them, the two-dimensional rotation matrix is an orthogonal matrix used to perform rotational transformations on vectors in a two-dimensional plane. In this scheme, it is used as a basic operator to characterize the local spatial conformational changes of polymers. Each matrix corresponds to an independent conformational degree of freedom or subspace.
[0108] In this embodiment, the system generates a corresponding number of two-dimensional rotation matrices based on a preset set of rotation angle parameters. These rotation angles can be fixed hyperparameters or learnable parameters that are dynamically updated during the training process. The system substitutes each rotation angle into the standard rotation matrix formula to generate a series of 2×2 basis transformation matrices for subsequent high-dimensional space construction. This process is completed entirely at the numerical computation level and does not involve the generation or optimization of any real three-dimensional coordinates.
[0109] It should be noted that the use of two-dimensional rotation matrices instead of three-dimensional rotation matrices or quaternions is based on a trade-off between computational efficiency and representational capability. The conformational changes of polymer chains can essentially be decomposed into several dihedral angle changes around single bonds, and each dihedral angle change can be approximated as a projection transformation within a local two-dimensional plane. By combining multiple two-dimensional matrices, it is sufficient to implicitly encode complex three-dimensional conformational information in a high-dimensional feature space, while avoiding the nonlinear constraints and computational overhead associated with three-dimensional rotations.
[0110] S402. Concatenate multiple two-dimensional rotation matrices along the diagonal to construct the corresponding spatial matrix.
[0111] The space matrix is a high-dimensional block diagonal matrix composed of multiple low-dimensional rotation operators. Its function is to map the initial molecular features into a composite feature space composed of multiple independent rotation subspaces, thereby simulating the multi-dimensional conformational degrees of freedom of polymers at the algebraic level.
[0112] In this embodiment, the system arranges multiple two-dimensional rotation matrices sequentially and concatenates them into a high-dimensional square matrix through a block diagonalization operation. The off-diagonal blocks of this matrix are all zero matrices, ensuring the orthogonality and independence between the rotation subspaces. The concatenated spatial matrix has a dimension of 2k×2k, where k is the number of two-dimensional rotation matrices, i.e., the number of construct subspaces.
[0113] Preferably, the space matrix Satisfy the following formula:
[0114] in, The spatial matrix is a 2k×2k dimensional block diagonal matrix; This is the block diagonalization operator; This is the 2×2 rotation matrix corresponding to the i-th rotated sub-block; Let be the rotation angle parameter of the i-th sub-block. k is the number of rotated sub-blocks; 0 is the zero matrix. It represents a 2k×2k dimensional real matrix space.
[0115] It should be noted that the block-diagonal structure design has a clear physical correspondence: each 2×2 sub-block is responsible for capturing a specific type of conformational mode in the polymer structure (such as main chain torsion, side chain oscillation, or ring folding), while zero off-diagonal blocks mean that these modes are decoupled in the feature space. This structured inductive bias is more consistent with the physical motion of polymer chains than fully connected transformations, which helps to improve the generalization ability and interpretability of the model.
[0116] Based on the above steps, this step integrates discrete local rotation operators into a unified high-dimensional conformation simulator through structured matrix splicing operations, enabling the model to process multiple conformational degrees of freedom in parallel and enhancing the capacity to characterize complex spatial structures of polymers.
[0117] S403. Rotate the space matrix by an angle to obtain the corresponding symmetric equivalent space matrix.
[0118] Among them, the symmetric equivalent space matrix refers to the variant obtained by applying a global rotation offset to the original space matrix. Its core function is to introduce rotation invariance constraints, forcing the feature representation learned by the model to not depend on a specific absolute rotation angle, but to focus on relative conformational relationships.
[0119] In this embodiment, the system adds an offset to the rotation angle of all sub-blocks based on the spatial matrix. This generates a new block diagonal matrix as a symmetric equivalent representation. This offset... These can be fixed values, randomly sampled values, or learnable parameters. By applying the original space matrix and the symmetric equivalent space matrix to the same input features respectively, the system obtains two sets of geometrically equivalent but numerically different feature projections, providing a basis for comparison for subsequent invariant learning.
[0120] It should be noted that polymers are in constant thermal motion in real-world environments, and their macroscopic properties should not change with overall rotation. By explicitly constructing and combining symmetric equivalent representations, the model is forced to learn characteristics robust to global rotation, effectively mitigating orientation bias caused by incomplete sampling of training data conformations and improving the physical consistency of prediction results.
[0121] As an example, the system can perform a global rotation offset. Let it be π / 4 or randomly sampled within [0, 2π]. For the aforementioned 16×16 spatial matrix, if the original angle set is... Then the angle set of the symmetric equivalent matrix becomes In actual training, It can be used as a data augmentation technique to dynamically change in each batch, further enhancing the rotation invariance of the model.
[0122] Based on the above steps, without adding extra three-dimensional coordinate calculations, the feature representation is given rotational symmetry through a simple angle offset operation, making the model output more stable and reliable, especially suitable for polymer property prediction tasks that are sensitive to conformational average properties.
[0123] S404. Map the initial molecular features to the feature spaces corresponding to the spatial matrix and the symmetric equivalent space matrix, respectively, to obtain the spatial features and the symmetric equivalent space features.
[0124] Mapping refers to the process of transforming the initial molecular feature vector into a rotating subspace defined by the spatial matrix through matrix multiplication. The resulting spatial features and symmetric equivalent spatial features represent the conformational encoding of the same molecule in different rotating reference frames.
[0125] In this embodiment, the system multiplies the initial molecular feature vector with a spatial matrix to obtain a first set of transformation features; simultaneously, it multiplies the initial molecular feature vector with a symmetric equivalent spatial matrix to obtain a second set of transformation features. These two sets of features retain the original topological information while being injected with different spatial conformational contexts. The entire mapping process is a purely linear operation and can be efficiently executed in parallel on a GPU.
[0126] It should be noted that the mapping here is not a simple feature rotation, but a structured feature reorganization. Due to the block diagonal property of the spatial matrix, different dimensional subsets of the initial features are assigned to different rotation subspaces for processing, which is equivalent to implicit semantic grouping and geometric modulation of the features. This mechanism allows the model to explore the conformation-related manifold structure in the feature space while maintaining computational efficiency.
[0127] Based on the above steps, this step realizes the transformation from static topological features to dynamic conformational features, enabling the model to obtain an intermediate representation rich in spatial geometric information even without the constraint of three-dimensional coordinate input, providing a more physically meaningful input for subsequent attention aggregation.
[0128] S405. Weighted fusion of spatial features and symmetric equivalent spatial features is performed to obtain the transformed molecular features.
[0129] Weighted fusion refers to the process of linearly combining two sets of rotational features using an adjustable coefficient. Its purpose is to balance the contribution of the original conformational information and rotational invariance constraints, and to avoid losing necessary conformational details due to overemphasis on symmetry.
[0130] In this embodiment, the system uses a weighted summation method to merge spatial features with symmetric equivalent spatial features. The fusion weight is a scalar between 0 and 1, which can be used as a hyperparameter or as a learnable parameter in end-to-end training. The final output transformed molecular features contain rich conformational diversity information and have a certain degree of rotational robustness, and can be directly used as node input for subsequent graph attention networks.
[0131] Based on the above steps, this step successfully transforms the output of high-dimensional structure simulation into a molecular characterization that combines rich information and physical robustness through a controllable feature fusion strategy. This effectively compensates for the inherent defects of traditional two-dimensional graph neural networks in polymer three-dimensional conformation modeling and improves the accuracy and generalization performance of downstream property prediction.
[0132] This application's embodiments, by constructing a block-based diagonal rotation matrix, introducing symmetric equivalent representation and a weighted fusion mechanism, achieve efficient simulation and rotational invariance constraints of polymer spatial conformation without explicit three-dimensional coordinates. This enables the model to implicitly learn three-dimensional geometric information from two-dimensional topological structures, fundamentally solving the technical problem of insufficient utilization of spatial structures in existing technologies.
[0133] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 5 As shown, the above S205 can be implemented by the following S501 to S505, which are explained in detail below: S501. Assign the transformed molecular features to the corresponding atomic nodes as node features of each atomic node.
[0134] The transformed molecular features refer to the dense vector representation that integrates spatial conformation information and rotation invariance after high-dimensional structure simulation processing in Example 3. Its dimension is usually matched with the input dimension of the hidden layer of the graph neural network.
[0135] In this embodiment, the system maps the transformed molecular feature matrix to each atom node in the polymer virtual graph by row index, completing the assignment operation from the global feature tensor to the graph node attributes. If the transformed feature dimension is inconsistent with the preset input dimension of the GNN, the system will first perform dimension alignment through a linear projection layer before performing the assignment.
[0136] It should be noted that the feature assignment here is not a simple numerical copy, but rather establishes a precise correspondence between the continuous feature space and the discrete graph topology. For atomic nodes connected by virtual edges, the assigned features also contain periodic conformational information across units, which allows subsequent message passing to naturally cross the boundaries of repeating units and perceive the long-range chain environment.
[0137] As an example, if the transformed molecular features are 128-dimensional vectors, while the first layer of the GNN requires 256 dimensions for input, the system performs a linear transformation using a 128×256 learnable weight matrix before assigning the values to the nodes; conversely, if the features are redundant, they are compressed through a dimensionality reduction layer to avoid parameter explosion.
[0138] Based on the above steps, this step achieves seamless connection between the high-dimensional structure simulation output and the graph neural network input, enabling spatial configuration information to propagate on the graph topology and overcoming the limitation of traditional GNNs that can only process static topological features.
[0139] S502. Based on the node connection relationship in the polymer virtual graph, determine the set of neighboring nodes corresponding to each atomic node.
[0140] The neighborhood node set refers to all nodes directly connected to the central atom node in the polymer virtual graph. This includes both atoms connected by real chemical bonds (ordinary edges) and atoms connected by periodic associations (virtual edges). Both are considered equally important sources of information during the message passing phase.
[0141] In this embodiment, the system traverses the adjacency list or edge index list of the polymer virtual graph, dynamically constructing a set of neighbor indexes for each central node. Since the polymer virtual graph may contain self-loops or multiple edges, the system performs deduplication or retains multiple connections according to preset rules to enhance signal strength when constructing the neighborhood. This neighborhood definition strictly follows the graph topology, ensuring that the message passing path is completely consistent with the real chemical environment and periodic constraints of the polymer.
[0142] It should be noted that incorporating nodes connected by virtual edges into the neighborhood is the key to achieving periodic consistency modeling in this scheme. In traditional small molecule GNNs, boundary atoms often suffer from characterization bias due to missing neighbors; however, in this embodiment, the neighborhood completed by virtual edges allows boundary atoms to obtain complete local environmental information, thereby eliminating the end-base effect interference caused by artificial truncation.
[0143] Based on the above steps, an information propagation path that conforms to the physical reality of polymers is defined, enabling graph neural networks to perform message passing operations equivalent to infinite periodic systems on finite graph structures, thus ensuring the physical correctness of feature learning.
[0144] S503. Calculate the feature correlation between each atomic node and its corresponding neighboring nodes in the set of neighboring nodes to obtain the corresponding attention weights, and normalize the attention weights to obtain the attention coefficients corresponding to each neighboring node.
[0145] Among them, the attention weight reflects the degree of contribution of neighboring nodes to the feature update of the central node, and the normalized attention coefficient is the probability distribution value used for weighted aggregation. The sum of these values is 1, which ensures the stability of the feature scale during message passing.
[0146] In this embodiment, the system employs an additive attention mechanism to calculate relevance. The system concatenates the features of the central node with the features of each neighboring node, inputs this concatenation into a shared single-layer feedforward network, and obtains an unnormalized attention score through the LeakyReLU activation function. The system then performs Softmax normalization on the scores of all neighbors of the same central node to generate the final attention coefficients. This calculation process supports multi-head parallelism, meaning multiple sets of independent attention parameters work simultaneously to capture structure-property association patterns in different subspaces.
[0147] It should be noted that the adaptive nature of the attention coefficients allows the model to automatically identify key atoms or functional groups that dominate specific properties. For example, when predicting the glass transition temperature, the model may assign higher attention weights to rigid groups in the main chain; while when predicting solubility, it may focus more on polar side chains. Furthermore, the attention weights on virtual edges can also be monitored separately as an interpretability metric for assessing the utilization of periodic information.
[0148] S504. Based on the attention coefficient, the node features in the neighborhood node set are weighted and aggregated to complete the message passing between nodes and the fusion of neighborhood information, and obtain the polymer atom characterization.
[0149] Weighted aggregation refers to the process of linearly combining the feature vectors of neighboring nodes according to their corresponding attention coefficients, while polymer atom representation is the updated feature vector obtained by each atom node after single-layer or multi-layer message passing, which integrates local chemical environment and spatial conformation information.
[0150] In this embodiment, the system performs a weighted summation of the features (or linearly transformed features) of neighboring nodes based on attention coefficients, and then uses a nonlinear activation function (such as ELU or ReLU) to obtain the updated node features of the current layer. When multi-head attention is used, the system can concatenate or average the aggregation results of each head. By stacking multiple such message-passing layers, the representation of each atom gradually integrates structural information over a wider range, ultimately forming a higher-order polymer atom representation.
[0151] It should be noted that weighted polymerization is essentially a soft-selective information fusion strategy. Compared to traditional averaging or summation polymerization, it can preserve more fine-grained structural differences. Especially when dealing with complex polymers containing heteroatoms or functional groups, the attention mechanism can effectively distinguish the atomic contributions of different roles, such as main chain and side chain, donor and acceptor, avoiding the feature homogenization problem caused by excessive smoothing.
[0152] S505. Perform pooling operation on polymer atomic characterization to obtain the corresponding polymer molecular characterization.
[0153] Pooling is a process of compressing a variable-length set of node-level features into a fixed-length vector. Polymer molecular characterization is this fixed-length vector, which summarizes the global topology, chemical composition, and spatial conformation information of the entire polymer repeating unit. It is the core interface connecting the encoder and decoder or downstream property prediction head.
[0154] In this embodiment, the system supports multiple pooling strategies, including global average pooling, global max pooling, Set2Set pooling, and attention pooling. The system can configure a default strategy or select the optimal strategy through hyperparameter search based on task requirements. For example, for molecular weight-sensitive properties, attention pooling can be used to preserve size information; for properties dominated by local functional groups, max pooling can be used to highlight salient features. The molecular representation dimension after pooling is typically aligned with the input dimension of the Transformer decoder.
[0155] It is important to note that the choice of pooling strategy directly affects the information retention of molecular characterization. While simple average pooling is computationally efficient, it may dilute key local signals; whereas Set2Set or attention pooling, while better preserving structural details, increases computational overhead. This scheme supports flexible switching through modular design to adapt to the differentiated needs of various polymer property prediction tasks. Furthermore, the pooling operation should maintain permutation invariance to the node arrangement to ensure the uniqueness of the characterization.
[0156] Based on the above steps, this step condenses discrete atomic-level information into compact molecular-level semantic vectors, realizing the construction of a bridge from microstructure to macroscopic properties, while maintaining the robustness of the representation to graph structure transformations.
[0157] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 6 As shown, the above S206 can be implemented by the following S601 to S605, which are explained in detail below: S601. Input the polymer molecule characterization into the feedforward neural network for dimension mapping to obtain the corresponding low-dimensional feature vector.
[0158] In this context, the feedforward neural network (FFN) acts as a dimensional adapter and semantic converter, while the low-dimensional feature vector transforms the structured representation output by the encoder into a sequence generation conditional vector suitable for processing by the Transformer decoder.
[0159] In this embodiment, the system inputs the polymer molecular representation into an FFN consisting of two linear layers and an activation function. The first layer projects the high-dimensional molecular representation to an intermediate bottleneck layer, and the second layer maps it to the embedding dimension required by the decoder. The parameters of this FFN are updated end-to-end with the entire model during training, enabling it to learn the optimal nonlinear transformation from the structural representation space to the sequence generation space.
[0160] It should be noted that FFN is introduced instead of directly using linear projection in order to increase the nonlinear expressive power of feature transformation. Polymer molecular characterization contains complex topological and geometric information, while SMILES sequence generation relies on linear grammatical and semantic rules, creating a modal gap between the two. FFN effectively bridges this gap through nonlinear activation and dimensionality compression, improving the generation quality and convergence speed of the decoder.
[0161] Based on the above steps, this step completes the feature adaptation from the structural encoder to the sequence decoder, providing semantically rich and dimensionally matched conditional inputs for high-quality SMILES generation.
[0162] S602. Input the low-dimensional feature vector into the Transformer decoder and generate the sequence based on the self-attention mechanism to obtain the corresponding SMILES sequence.
[0163] Among them, the Transformer decoder is a sequence generation model based on autoregression, while the SMILES sequence is a standardized string representation describing the chemical structure of polymer repeating units. Its generation process is subject to the conditional constraints of low-dimensional feature vectors.
[0164] In this embodiment, the system uses low-dimensional feature vectors as the memory input to the decoder. At each generation step, the decoder queries this memory vector using a cross-attention mechanism and combines it with previously generated historical tokens to predict the probability distribution of the next SMILES character. During training, a Teacher Forcing strategy is used to accelerate convergence. During inference, decoding strategies such as greedy search, beam search, or kernel sampling can be used to balance generation accuracy and diversity. The generated SMILES sequences must undergo grammatical validation to ensure they are valid chemical expressions.
[0165] It should be noted that the Transformer decoder's self-attention mechanism enables it to capture long-range dependencies within the SMILES sequence, such as grammatical rules like bracket matching and ring numbering closure, which are difficult for traditional RNNs to handle effectively. Simultaneously, the cross-attention mechanism ensures that each generated character maintains semantic alignment with the original molecular representation, avoiding the generation of illusionary molecules unrelated to the input structure.
[0166] As an example, the decoder employs a 6-layer Transformer Block, with each layer containing 8 attention heads and an embedding dimension of 256. During inference, a beam search with a beam width of 5 is used, and a maximum generation length of 100 is set.
[0167] Based on the above steps, this step achieves a precise inverse mapping from continuous latent space to discrete chemical symbols, verifies the completeness of information in molecular characterization, and provides a basic output for subsequent calculation of multiple reconstruction loss.
[0168] S603. Perform molecular diagram analysis on the generated SMILES sequence to obtain the corresponding interatomic connections.
[0169] Molecular graph analysis refers to the process of converting a one-dimensional SMILES string into a two-dimensional graph structure. The connection relationships between atoms are the adjacency information of node pairs in this graph structure, which is used to construct a connectivity matrix to provide topological supervision signals.
[0170] In this embodiment, the system invokes a cheminformatics toolkit (such as RDKit) to perform real-time parsing of the SMILES sequence. The parser first identifies atomic symbols and nested bracket structures, then reconstructs ring connections based on numerical labels, and finally completes the hydrogen atoms and bond orders according to implicit valence rules. Upon successful parsing, the system extracts the connection states between all non-hydrogen atom pairs, forming a sparse edge list or a dense adjacency matrix. If parsing fails, the topological loss term for that sample is set to zero to avoid gradient anomalies.
[0171] It should be noted that reversing the connectivity matrix from SMILES creates a strong topological constraint on the decoder. SMILES sequences themselves exhibit isomorphism and heterogeneity (the same molecule can have multiple valid SMILES notations), and relying solely on sequence reconstruction loss may lead the model to learn incorrect topological mappings. The connectivity matrix, however, is a canonical representation of the molecule, unaffected by the order of writing, forcing the model to ensure the correctness of the underlying topology when generating sequences, effectively mitigating the ambiguity problem in sequence generation.
[0172] Based on the above steps, this step establishes a two-way verification mechanism between sequence generation and topological structure, forcing the decoder not only to learn to generate syntactically correct strings, but also to understand the real connection logic of molecules, thereby improving the structural fidelity of the representation.
[0173] S604. Construct the corresponding connected matrix based on the connection relationships between atoms.
[0174] Among them, the connectivity matrix is a matrix representation of the molecular graph topology. Its element values characterize whether there are chemical bonds connecting corresponding atom pairs, and it is a direct quantitative indicator for measuring the accuracy of model topology reconstruction.
[0175] In this embodiment, the system initializes an N×N zero matrix (N being the number of atoms) based on the inter-atomic connectivity, and then sets the corresponding positions of connected atom pairs to 1 (or bond order value). For batch processing, the system performs padding alignment on molecules of different sizes and uses a mask matrix to mask invalid positions to ensure the accuracy of loss calculation. The constructed connectivity matrix is compared with the real label matrix under the same node sorting. If the node sorting is inconsistent, a graph matching algorithm is first executed for alignment.
[0176] It's important to note that the construction of the connectivity matrix must consider the consistency of node order. Since the order in which SMILES are generated may differ from the order of nodes in the original graph, direct comparison can lead to erroneous high losses. Therefore, before training, the system rearranges the connectivity matrix of the true labels according to the order in which SMILES are generated, or introduces a distance metric that maintains the permutation invariant into the loss function. This detail is a key engineering safeguard for implementing the topology reconstruction loss.
[0177] As an example, the system employs the Hungarian algorithm or a graph matching method based on the Weisfeiler-Lehman test to align the nodes of the generated molecules sequentially to the real molecules before constructing the connected matrix. For repeating units containing 20 atoms, the alignment time is less than 1ms, thus not becoming a training bottleneck.
[0178] Based on the above steps, this step generates a topological supervision signal that can be used for gradient optimization, enabling the model to continuously correct the structural consistency of its internal representation during training, thus avoiding the topological drift problem common in pure sequence generation.
[0179] S605. Generate the corresponding atomic number sequence based on the atomic identification information in the SMILES sequence.
[0180] The atomic number sequence is an encoding of each element type arranged in the SMILES generation order. It is used to provide a monitoring signal at the elemental composition level to ensure that the generated molecule is consistent with the original input in terms of chemical composition.
[0181] In this embodiment, while parsing the SMILES sequence, the system extracts the atomic number (e.g., C=6, O=8, N=7) corresponding to each atomic symbol, forming an integer sequence. The length of this sequence is consistent with the number of SMILES tokens (after removing special control characters). The system compares the generated atomic number sequence with the true label sequence bit by bit, calculating cross-entropy or classification loss. This loss term is independent of the sequence reconstruction loss and specifically constrains the accuracy of element types.
[0182] It should be noted that atomic number sequence reconstruction is introduced to compensate for the shortcomings of SMILES sequence reconstruction loss. SMILES loss mainly focuses on character-level syntactic correctness, but has low sensitivity to element types (for example, mistakenly generating N instead of C may only lead to a small change in loss, but the chemical meaning is completely different). Atomic number sequence, as an explicit element conservation constraint, forces the model to strictly adhere to elemental composition during generation, preventing chemically unreasonable element substitutions and enhancing the chemical robustness of the representation.
[0183] This application implements adaptive identification and information aggregation of key structural paths in polymers through graph attention mechanism, and imposes comprehensive constraints on molecular characterization through the triple reconstruction objectives (sequence, topology, and elements) of the Transformer decoder. This not only verifies the completeness of the characterization information, but also enhances the robustness and generalization ability of the pre-trained model through multimodal supervision signals, providing a high-quality feature foundation for downstream property prediction.
[0184] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 7 As shown, the above S207 can be specifically implemented through the following S701 to S704, which are explained in detail below: S701. Determine the first sequence reconstruction error between the SMILES sequence and the corresponding real SMILES sequence.
[0185] The first sequence reconstruction error is used to measure the semantic deviation between the polymer chemical language description generated by the model and the real chemical language description. It is usually calculated using cross-entropy loss or negative log-likelihood loss, reflecting the model's learning degree of polymer chemical syntax rules and the order of local functional groups.
[0186] In this embodiment, the system performs a bit-by-bit comparison between the probability distribution of SMILES characters generated autoregressively by the Transformer decoder and the One-Hot encoding of the real labels, accumulating the cross-entropy values at all time steps as the first sequence reconstruction error. To alleviate the non-uniqueness problem of SMILES representation, the system can normalize the real SMILES before training or introduce data augmentation during training, enabling the model to learn more robust sequence mapping relationships. This error term drives the model to master basic chemical vocabulary and syntactic structures, serving as a fundamental supervisory signal to ensure the legitimacy of generated molecules.
[0187] S702. Determine the mean square error between the connected matrix and the corresponding true connected matrix.
[0188] Among them, the mean square error of the connectivity matrix is used to quantify the difference between the generated molecule and the real molecule in the two-dimensional topological connection structure. Its value directly reflects the model's accuracy in restoring the bonding relationship between atoms, the ring system structure and the overall skeleton connectivity. It is a key geometric constraint to combat the ambiguity of sequence generation.
[0189] In this embodiment, the system performs element-wise squared difference operations between the N×N connected matrix and the true label matrix, and takes the average value as the loss term. Considering that most positions in the molecular graph are disconnected (sparse), the system can use weighted MSE or Dice Loss to increase attention to positive samples (i.e., real chemical bonds) and avoid insufficient learning of bonding information due to a large number of zero elements dominating the gradient. This error term forces the model to retain explicit structured topological information in the latent space, rather than merely memorizing sequence statistical regularities.
[0190] It should be noted that connected matrices are permutation invariant, and the order in which SMILES are generated may cause node index misalignment. Therefore, graph matching or node reordering operations must be performed before calculating MSE to ensure that the two matrices are compared under the same atomic correspondence. Otherwise, false high loss will occur, which will mislead the training direction.
[0191] S703. Determine the second sequence reconstruction error between the atomic number sequence and the corresponding true atomic number sequence.
[0192] Among them, the second sequence reconstruction error focuses on the conservation constraints at the elemental composition level. By comparing the elemental type codes of atoms at each position in the generated sequence with those in the real sequence, it prevents element substitution or loss during the reconstruction process and ensures that the generated molecule is strictly consistent with the original input in terms of chemical composition.
[0193] In this embodiment, the system calculates the cross-entropy loss by combining the atomic category probability distribution obtained from the decoder output through the Softmax layer with the true atomic number labels. This loss term is independent of the SMILES character-level loss and is specifically optimized for elemental properties. Since the element type determines the core physicochemical properties of atoms, such as valence and electronegativity, this constraint is crucial for maintaining the accuracy of polymer electronic structure and property predictions, effectively avoiding property prediction biases caused by confusion between elements in the same group (such as O and S, N and P).
[0194] Based on the above steps, this step constructs an element-level strong regularization mechanism, which, together with sequence loss and topological loss, forms a three-in-one self-supervised learning objective encompassing semantics, structure, and composition, fundamentally ensuring the chemical integrity of the pre-trained representation and lossless information compression.
[0195] S704. The parameters of the graph neural network-Transformer model are updated based on the training loss function composed of the first sequence reconstruction error, the mean square error, and the second sequence reconstruction error, to obtain the trained graph neural network-Transformer model.
[0196] The training loss function is a scalar objective function that combines the three heterogeneous errors mentioned above according to a preset strategy. Its design aims to balance semantic fluency, topological correctness and element conservation, driving the encoder-decoder to converge to a stable state that combines generation and representation capabilities.
[0197] In this embodiment, the system uses a weighted summation method to construct the total loss: Weight It can be a fixed hyperparameter, or it can be used as a learnable parameter in training, or it can be dynamically adjusted according to the training phase. The first sequence reconstruction error between the SMILES sequence and the corresponding true SMILES sequence. This represents the mean square error between the connected matrix and the corresponding true connected matrix. This refers to the second sequence reconstruction error between the atomic number sequence and the corresponding true atomic number sequence. For example, in the early stages of training, emphasis is placed on... To learn grammar quickly, and increase in the middle stage t-weights are used to refine the topology and improve it later. The weights are adjusted to calibrate element details. The system utilizes the AdamW optimizer to minimize the total loss and combines techniques such as gradient accumulation and mixed-precision training to improve training efficiency and stability.
[0198] It's important to note that combining multi-task losses is not a simple summation, but rather a coordinated gradient direction achieved through weight adjustment. If one loss term dominates the gradient for an extended period, it may lead to underfitting in other tasks; conversely, if the magnitudes of the various losses differ too greatly, smaller loss terms are easily overwhelmed by noise. Therefore, reasonable loss normalization and dynamic weight scheduling are crucial details for achieving high-quality pre-training.
[0199] In one possible implementation of the embodiments of this application, combined with Figure 2 ,like Figure 8 As shown, the above S208 can be specifically implemented through the following S801 to S803, which are explained in detail below: S801. Input the repeating unit structure of the polymer to be tested into the trained graph neural network-Transformer model to obtain the corresponding polymer molecular characterization.
[0200] This step is the interface for transferring the pre-trained model to downstream applications. The polymer to be tested can be a novel structure not seen in the training set. The model maps it to the learned unified latent space through forward propagation and outputs a dense vector of fixed dimensions as the universal fingerprint of the polymer.
[0201] In this embodiment, the system loads the trained encoder weights, freezes or partially unfreezes their parameters, and processes the newly input polymer repeating units through steps S201-S206, outputting a polymer molecule representation by the graph representation learning module. This representation vector encapsulates the topological, geometric, electronic, and periodic information of the molecule, and because it has undergone multiple reconstruction pre-training, each dimension has a clear physical semantics, which can be directly used as input features for downstream tasks without the need for manual redesign of descriptors.
[0202] It should be noted that for downstream tasks with small sample sizes, it is generally recommended to freeze the encoder parameters and train only the prediction head to avoid overfitting. For tasks with large data volumes or significant domain differences, LoRA and other parameter fine-tuning techniques can be used to perform lightweight adaptation of the encoder, injecting domain-specific information while retaining general knowledge.
[0203] Based on the above steps, this step realizes the instantaneous conversion from structure to general representation, seamlessly transferring the knowledge accumulated in the pre-training stage to practical applications, and significantly reducing the threshold and cost of characterizing new materials.
[0204] S802. Input the polymer molecular characterization into the preset property prediction model to establish the mapping relationship between the polymer molecular characterization and the target property.
[0205] Among them, the pre-defined property prediction model is the bridge connecting general representations and specific physical property indicators. It takes various forms and can flexibly select machine learning or deep learning models according to task complexity, data scale and interpretability requirements. It is responsible for fitting the manifold structure related to the target property in the high-dimensional representation space.
[0206] In this embodiment, the system supports multiple prediction models: for small to medium-sized datasets (<10k samples), traditional machine learning models such as Random Forest, SVR, or XGBoost are preferred because they are robust to overfitting to small samples and provide feature importance outputs; for large-scale datasets or tasks requiring the capture of higher-order nonlinear relationships, deep learning models such as MLP, GNN, or Attention-based regressors can be selected. The model takes molecular representations as input and outputs continuous numerical values or discrete categories. During training, only the prediction model parameters are updated (or the encoder is jointly fine-tuned), and the loss function is selected from MSE, Huber Loss, or CrossEntropy depending on the task type.
[0207] It should be noted that, due to the highly structured nature of the pre-trained representations, even simple linear regression models can achieve good results, which verifies the linear separability and information density of the representations themselves. When choosing complex models, regularization techniques should be used to prevent over-mining of pre-trained features, which could lead to a decline in generalization performance.
[0208] S803. Determine the predicted properties of the target polymer corresponding to the polymer to be tested based on the mapping relationship.
[0209] Among them, the target polymer property prediction results are the final quantitative indicators output by the system, covering multiple dimensions such as thermal, mechanical, and transport properties. Their accuracy and reliability directly determine the effectiveness of material screening and design decisions.
[0210] In this embodiment, the system infers the molecular characterization of the polymer under test based on the mapping model established in S802 and outputs predicted values for the target properties. Supported properties include, but are not limited to: glass transition temperature (Tg), radius of gyration (Rg), free volume fraction (FFV), crystallization temperature (Tc), and density. For multi-task scenarios, the system can output multiple property values simultaneously and provide confidence intervals or uncertainty estimates to assist users in assessing prediction risks.
[0211] It should be noted that the prediction difficulty and data quality vary significantly depending on the nature of the data. The system should incorporate property-specific post-processing logic, such as applying physical upper and lower bounds to the Tg prediction and performing non-negative correction on the FFV prediction, to ensure that the output conforms to basic physical principles. Furthermore, for extrapolated samples that exceed the model's applicable domain, proactive warnings should be issued rather than blindly outputting values.
[0212] The embodiments of this application achieve efficient and accurate transfer from general characterization to specific physical properties through flexible downstream prediction model access and multi-property joint output mechanism.
[0213] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0214] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A polymer characterization method based on graph neural network-Transformer, characterized in that, include: Obtain the polymer repeating unit structure, and construct a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure; Atomic and edge features are extracted from the polymer virtual graph and fused to obtain initial molecular features; A high-dimensional structural simulation of the initial molecular features is performed using a spatial matrix formed by concatenating multiple two-dimensional rotation matrices to obtain the transformed molecular features, specifically including: Multiple two-dimensional rotation matrices are constructed based on preset rotation angles; each two-dimensional rotation matrix is used to characterize the local spatial configuration changes in the corresponding subspace. Multiple two-dimensional rotation matrices are joined together along the diagonal direction to construct a corresponding spatial matrix; By rotating the space matrix by an angle, the corresponding symmetric equivalent space matrix is obtained; The initial molecular features are mapped to the feature spaces corresponding to the spatial matrix and the symmetric equivalent space matrix, respectively, to obtain spatial features and symmetric equivalent space features; The spatial features and symmetric equivalent spatial features are weighted and fused to obtain the transformed molecular features; The graph attention mechanism based on graph neural networks performs message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic characterization, and obtains polymer molecular characterization through pooling operation. The polymer molecule characterization is input into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence. Based on the reconstruction error between the SMILES sequence, the connectivity matrix, and the atomic number sequence and the corresponding real labels, the graph neural network-Transformer model is trained; The trained graph neural network-Transformer model is used to generate polymer molecular characterization, and polymer properties are predicted based on the polymer molecular characterization to obtain the predicted results of the target polymer properties.
2. The method according to claim 1, characterized in that, The process of training the graph neural network-Transformer model based on the reconstruction error between the SMILES sequence, the connectivity matrix, and the atomic number sequence and the corresponding true labels includes: The polymer molecule characterization is input into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence. Determine the first sequence reconstruction error between the SMILES sequence and the corresponding real SMILES sequence; Determine the mean square error between the connectivity matrix and the corresponding true connectivity matrix; Determine the second sequence reconstruction error between the atomic number sequence and the corresponding true atomic number sequence; The parameters of the graph neural network-Transformer model are updated based on the training loss function composed of the first sequence reconstruction error, the mean square error, and the second sequence reconstruction error, to obtain the trained graph neural network-Transformer model.
3. The method according to claim 1, characterized in that, The construction of a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges based on the polymer repeating unit structure includes: Perform a validity check on the SMILES expression corresponding to the polymer repeating unit structure and filter out abnormal structures containing preset placeholder group identifiers; The filtered polymer repeating unit structure is replicated and linked to generate the corresponding trimer structure, and the intermediate repeating unit in the trimer structure is determined. Extract the atomic nodes and chemical bond connections between atoms in the intermediate repeating units; The atomic nodes are used as graph nodes, and the chemical bond connections between the atoms are used as ordinary edges to construct an initial polymer graph; Identify the aggregation connection sites in the intermediate repeating units, and determine the atomic nodes directly connected to each aggregation connection site; Virtual edges are established between atomic nodes that are directly connected to each aggregation connection site to represent the connection relationship across repeating units; The virtual edges are added to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
4. The method according to claim 1, characterized in that, The extraction of atomic and edge features from the polymer virtual graph and their fusion to obtain initial molecular features includes: Extract the atomic features corresponding to each atomic node in the polymer virtual graph. The atomic features include atomic type, valence, hybridization state, charge state, aromaticity state, and electron donor and acceptor properties. Extract the edge features corresponding to each edge in the polymer virtual graph. The edge features include chemical bond type, bond order information, conjugation state, and edge connection direction. Based on the connection relationship between each atomic node and the edge, the atomic features and edge features are associated and mapped. The atomic features and edge features after association mapping are fused and encoded to obtain the corresponding initial molecular features.
5. The method according to claim 1, characterized in that, The graph attention mechanism based on a graph neural network performs message passing and neighborhood aggregation on the transformed molecular features to obtain polymer atomic characterization, and obtains polymer molecular characterization through pooling operations, including: The transformed molecular features are assigned to the corresponding atomic nodes, serving as the node features of each atomic node; Based on the node connection relationships in the polymer virtual graph, determine the set of neighboring nodes corresponding to each atomic node; The feature correlation between each atomic node and its corresponding neighboring nodes in the set of neighboring nodes is calculated to obtain the corresponding attention weight, and the attention weight is normalized to obtain the attention coefficient corresponding to each neighboring node. Based on the attention coefficient, the node features in the neighborhood node set are weighted and aggregated to complete the message passing between nodes and the fusion of neighborhood information, and obtain the polymer atom characterization. The polymer atom characterization is subjected to a pooling operation to obtain the corresponding polymer molecular characterization.
6. The method according to claim 1, characterized in that, The step of inputting the polymer molecule characterization into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence includes: The polymer molecule characterization is input into a feedforward neural network for dimension mapping to obtain the corresponding low-dimensional feature vector; The low-dimensional feature vector is input into the Transformer decoder, and the sequence is generated based on the self-attention mechanism to obtain the corresponding SMILES sequence. Molecular diagram analysis was performed on the generated SMILES sequence to obtain the corresponding interatomic connections; Construct a corresponding connectivity matrix based on the connection relationships between the atoms; Generate the corresponding atomic number sequence based on the atomic identification information in the SMILES sequence.
7. The method according to claim 1, characterized in that, The process involves generating polymer molecular characterizations using a trained graph neural network-Transformer model, and predicting polymer properties based on these characterizations to obtain target polymer property prediction results, including: The repeating unit structure of the polymer to be tested is input into the trained graph neural network-Transformer model to obtain the corresponding polymer molecular characterization. The polymer molecular characterization is input into a preset property prediction model to establish a mapping relationship between the polymer molecular characterization and the target property; Based on the mapping relationship, the predicted property results of the target polymer corresponding to the polymer to be tested are determined; The target polymer properties include at least one of glass transition temperature, radius of gyration, free volume fraction, crystallization temperature, and density. The property prediction model includes a machine learning model or a deep learning model.
8. A polymer characterization system based on graph neural network-Transformer, characterized in that, include: The module includes a polymer virtual graph construction module, an initial feature generation module, a high-dimensional structure simulation module, a graph representation learning module, a Transformer decoding module, a model training module, and a property prediction module. The polymer virtual graph construction module is used to obtain the polymer repeating unit structure and construct a polymer virtual graph containing atomic nodes, ordinary edges and virtual edges based on the polymer repeating unit structure. The initial feature generation module is used to extract atomic and edge features from the polymer virtual graph and fuse them to obtain initial molecular features; The high-dimensional structure simulation module is used to perform high-dimensional structure simulation on the initial molecular features using a spatial matrix formed by splicing multiple two-dimensional rotation matrices to obtain transformed molecular features. Specifically, it includes: constructing multiple two-dimensional rotation matrices based on a preset rotation angle; wherein each two-dimensional rotation matrix is used to characterize local spatial conformation changes in a corresponding subspace; splicing the multiple two-dimensional rotation matrices along the diagonal direction to construct a corresponding spatial matrix; rotating the spatial matrix to obtain a corresponding symmetric equivalent spatial matrix; mapping the initial molecular features to the feature spaces corresponding to the spatial matrix and the symmetric equivalent spatial matrix, respectively, to obtain spatial features and symmetric equivalent spatial features; and performing weighted fusion of the spatial features and symmetric equivalent spatial features to obtain the transformed molecular features. The graph representation learning module is used to perform message passing and neighborhood aggregation on the transformed molecular features based on the graph attention mechanism of the graph neural network to obtain polymer atomic representation, and obtain polymer molecular representation through pooling operation. The Transformer decoding module is used to input the polymer molecule characterization into the Transformer decoder to generate the corresponding SMILES sequence, connectivity matrix, and atomic number sequence. The model training module is used to train the graph neural network-Transformer model based on the reconstruction error between the SMILES sequence, the connectivity matrix, the atomic number sequence and the corresponding real labels. The property prediction module is used to generate polymer molecular characterization using a trained graph neural network-Transformer model, and to predict polymer properties based on the polymer molecular characterization to obtain the target polymer property prediction results.
9. The system according to claim 8, characterized in that, The polymer virtual graph construction module is also used for: Perform a validity check on the SMILES expression corresponding to the polymer repeating unit structure and filter out abnormal structures containing preset placeholder group identifiers; The filtered polymer repeating unit structure is replicated and linked to generate the corresponding trimer structure, and the intermediate repeating unit in the trimer structure is determined. Extract the atomic nodes and chemical bond connections between atoms in the intermediate repeating units; The atomic nodes are used as graph nodes, and the chemical bond connections between the atoms are used as ordinary edges to construct an initial polymer graph; Identify the aggregation connection sites in the intermediate repeating units, and determine the atomic nodes directly connected to each aggregation connection site; Virtual edges are established between atomic nodes that are directly connected to each aggregation connection site to represent the connection relationship across repeating units; The virtual edges are added to the initial polymer graph to obtain a polymer virtual graph containing atomic nodes, ordinary edges, and virtual edges.
Citation Information
Patent Citations
Polymer informatics method based on graph neural network and attention mechanism
CN118571365A
Polymer multi-property prediction method based on self-supervised feature learning
CN121905352A
