A positive electrode material performance curve prediction method and system combining a transformer and a diffusion model
By combining the Transformer and diffusion models to predict the performance curves of cathode materials, this method solves the problems of low accuracy and insufficient generalization ability in the prediction of electrode material performance curves in existing technologies, and achieves efficient and accurate performance curve prediction, thereby enhancing information fusion and prediction accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies lack effective methods for predicting the performance curves of electrode materials, especially machine learning methods that can efficiently and accurately predict the complex performance curves of electrode materials. Furthermore, there is a lack of specific workflow designs for combining Transformer and diffusion models to predict the performance curves of electrode materials, resulting in low prediction accuracy, weak generalization ability, insufficient sequence modeling ability, inadequate utilization of conditional information, unstable training, and slow inference speed.
A method for predicting the performance curve of cathode materials using a joint Transformer and diffusion model is proposed. Through steps S1-S5, the feature information of cathode materials is converted into fixed-dimensional numerical vectors, and a joint prediction model is constructed, including a Transformer encoding module and a diffusion refining module. The Transformer encoder is used to capture the semantic association of material features, and the diffusion model is iteratively optimized to finally generate the performance curve prediction results.
It improves the accuracy and generalization ability of electrode material performance curve prediction, enhances information fusion capability, reduces prediction complexity and time consumption, achieves predictions that are more consistent with the actual physical space, and improves the prediction accuracy and generalization of the model.
Smart Images

Figure CN122436082A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrode material performance prediction, and in particular to a method and system for predicting the performance curves of cathode materials using a combined Transformer and diffusion model. Background Technology
[0002] Electrochemical energy storage technology, especially energy storage devices represented by batteries, plays a crucial role in addressing issues such as the depletion of fossil fuels and uneven energy distribution, demonstrating significant application potential and commercial value. In battery systems, the performance of electrode materials directly affects core indicators such as energy density and safety, making related research a key focus for industry professionals. Faced with ever-increasing performance demands, developing electrode materials with high energy density, low cost, and high reliability has become an urgent goal for battery technology development.
[0003] Compared to single-dimensional performance indicators (such as the average voltage and specific capacity of electrode materials), the performance curves of electrodes (such as discharge curves and capacity cycle retention curves) are more difficult to predict, but also have deeper application value.
[0004] In recent years, machine learning has been widely used as an efficient tool for predicting and screening electrode materials, providing a new research paradigm for traditional experimental trial-and-error methods. Transformers, as the foundation of large language models, were initially designed to perfectly achieve end-to-end semantic transformation in the field of natural language translation. The rapid development of various variants and workflow paradigms combining them with other models has provided more efficient and diverse options for engineering implementations based on machine learning. Diffusion models, as the most prominent models in image and video generation, are also increasingly widely used in natural science fields such as physics, chemistry, and materials science. However, instances of machine learning models in predicting electrode material performance curves are still relatively few, and prediction methods combining the above two models still lack examples and specific workflow designs. Summary of the Invention
[0005] The purpose of this invention is to solve the technical problems in the prior art, such as the lack of effective methods for predicting the performance curves of electrode materials, especially the lack of machine learning methods that can efficiently and accurately predict the complex performance curves of electrode materials, as well as the lack of specific workflow design for combining Transformer and diffusion models to predict the performance curves of electrode materials, which leads to low prediction accuracy, weak generalization ability, insufficient sequence modeling ability, insufficient utilization of conditional information, unstable training, and slow inference speed.
[0006] To achieve the above objectives, the present invention employs the following technical means:
[0007] This invention provides a method for predicting the performance curves of cathode materials using a combined Transformer and diffusion model, comprising the following steps:
[0008] Step S1: Collect the characteristic information of the cathode material and determine the type of performance curve to be predicted. The characteristic information includes material properties that can be vectorized and characterized.
[0009] Step S2: Based on preset encoding rules, the feature information is converted into a fixed-dimensional numerical vector, and the performance curve sequence is interpolated and sampled to a fixed length to obtain the model input data;
[0010] Step S3: Divide the sample data into datasets according to the model application scenario;
[0011] Step S4: Construct a joint prediction model, which includes a Transformer encoding module and a diffusion refining module. The Transformer encoding module is used to convert the vectorized feature information into a hidden layer feature vector containing semantic associations of material features. The diffusion refining module uses the Transformer decoder output and the voltage sequence of the performance curve as conditional inputs to iteratively optimize the initial prediction sequence to obtain the final performance curve prediction result.
[0012] Step S5: Train the joint prediction model using the preprocessed performance curve sequence as the target label, and evaluate the model performance based on the test set.
[0013] This invention is based on the need to predict the performance of battery cathode materials and the design of machine learning models with strong generalization ability. In order to solve the technical problems of insufficient prediction accuracy and difficulty in information fusion and encoding, this invention creatively adopts a method that combines Transformer and diffusion model, which improves the prediction accuracy of the model and adapts to different types of information input.
[0014] In the above scheme, in step S1, the characteristic information of the positive electrode material includes chemical formula, discharge rate and cycle number, and the performance curve is the discharge voltage curve.
[0015] Based on the needs and considerations of information fusion coding, this invention creatively adopts the following steps S2.1 and S2.2 in order to solve the technical problem that different types of feature information are difficult to be effectively encoded and used in the same model. This allows the machine learning model to make full use of textual information such as chemical formulas as well as numerical information such as discharge rate and cycle number.
[0016] In the above scheme, step S2, the vectorization encoding includes:
[0017] Step S2.1: Encode the numerical features into a 16-dimensional vector using a numerical repetition method;
[0018] Step S2.2: For chemical formula features, take chemical elements as the smallest semantic unit, weight and scale the 200-dimensional vectors corresponding to each element according to their normalized atomic content in the chemical formula, and concatenate the feature vectors of all elements to form the first chemical formula encoding vector. When the number of elements is less than 9, fill the zero vector to a uniform length.
[0019] For chemical formula features, 22 atomic features are used as the smallest semantic unit. Each atomic feature is represented as a 16-dimensional vector using 16 statistical strategies. The vectors generated by all atomic features are concatenated to form the second chemical formula encoding vector.
[0020] Step S2.3: Sample 100 points uniformly on the voltage axis of the performance curve sequence, and obtain the capacity sequence corresponding to each sampling point through one-dimensional linear interpolation.
[0021] In the above scheme, in step S2.2, the first chemical formula encoding vector is used as the input of the Transformer encoder, and the second chemical formula encoding vector generated in step S2.2 and the numerical feature encoding vector are used together as the input of the Transformer decoder.
[0022] In the above scheme, in step S3, the dataset is divided according to the number of cycles: for each cathode material, the performance curves corresponding to the first 40% of the cycle cycles are taken as the training set, the curves corresponding to the middle 10% of the cycle cycles are taken as the validation set, and the curves corresponding to the last 50% of the cycle cycles are taken as the test set.
[0023] This invention, based on the need for high-precision prediction and the consideration of effective information fusion, addresses the technical challenges of effective information transmission and fusion by establishing a condition constructor that merges the decoder output of the Transformer model with voltage sequence conditions into diffusion conditions. Specifically, the voltage sequence of the discharge voltage curve is transformed into a 128-dimensional vector sequence from a point-by-point voltage scalar through a voltage condition projection layer composed of two fully connected networks. This vector sequence is then concatenated with the decoder output and flattened to form the diffusion conditions. This module effectively transmits the Transformer decoder output to the diffusion model while simultaneously integrating voltage sequence information into the diffusion conditions of the model.
[0024] In the above scheme, in step S4, the Transformer encoding module includes:
[0025] Encoder layer: The encoder input features are mapped to a 128-dimensional hidden dimension through the input embedding layer, and then processed by an 8-head multi-head self-attention mechanism, a 512-dimensional feedforward neural network, residual connections, layer normalization and Dropout regularization.
[0026] Decoder layer: The input features of the decoder are mapped to a 128-dimensional hidden dimension through the input embedding layer, and then processed by an 8-head multi-head self-attention mechanism, an 8-head cross-attention mechanism, a 512-dimensional feedforward neural network, residual connections, layer normalization and Dropout regularization.
[0027] Output layer: By combining two stacked linear layers, the GELU activation function, layer normalization and Dropout regularization, the decoder output is linearly interpolated in one dimension along the sequence length to obtain the initial prediction of a 100-dimensional capacity sequence.
[0028] In the above scheme, step S4, the diffusion refining module includes:
[0029] Condition Constructor: The Transformer decoder output and the voltage condition (during data preprocessing, each discharge voltage performance curve is represented as two sequences of voltage and capacity corresponding to 100 discrete sampling points. Each curve generates a voltage sequence by uniformly sampling 100 points on the voltage axis based on its own voltage range, while the corresponding capacity sequence sampled on the voltage sequence is used for prediction, corresponding to step S2.3) are merged into a diffusion condition. The 100 points in the voltage sequence are projected into 128-dimensional vectors through two fully connected layers to form a tensor [Batch, 100, 128]. Then, average aggregation is performed on the sequence dimension to form a tensor [Batch, 128], which is then concatenated with the decoder output.
[0030] Diffusion scheduler: Defines the forward noise addition and backward sampling process, sets 50 sampling steps, and in each step sends the current noisy sequence, time step and diffusion conditions into the refinement network to predict the initial state, and updates the next state according to the preset noise scheduling strategy;
[0031] The diffusion refinement network receives a noisy sequence, time step, and diffusion conditions. It then uses a linear transformation to increase the sequence dimension to 128 dimensions. Combining the time step representation with sinusoidal position encoding and conditional embedding, it performs conditional injection through an 8-head cross-attention mechanism. Finally, it is refined by a Transformer encoder and mapped back to a 1-dimensional output.
[0032] In the above scheme, during the backsampling process of the diffusion scheduler, the initial state of the refined network prediction is used to guide the iterative denoising of the noisy sequence, and finally outputs a refined prediction sequence with shape [batch_size, seq_len, 1].
[0033] In the above scheme, in step S5, the training optimization objective is the mean square error between the refined sequence and the standardized target capacity sequence, and includes an L1 regularization term and a gradient clipping strategy.
[0034] This invention also provides a cathode material performance curve prediction system combining Transformer and diffusion models, including a data preprocessing module, a Transformer encoding module, a diffusion refining module, and a model training module. The system is characterized in that each module works together to execute the steps described above, thereby achieving automated prediction of the discharge voltage curve of the cathode material.
[0035] Because the present invention employs the above-mentioned technical means, it has the following beneficial effects:
[0036] 1. By combining steps S2.1 and S2.2, this invention enables the Transformer to adapt to different types of information input, thereby enhancing the model's information extraction and fusion capabilities.
[0037] 2. This invention incorporates voltage sequences as conditional information into the diffusion model by designing a conditional constructor, enabling the output of the Transformer decoder to be effectively transmitted to the diffusion model. At the same time, the voltage sequence of the performance curve is also organically integrated into the diffusion conditions of the diffusion model, thereby enhancing the accuracy of the results.
[0038] 3. Through the design of step S2.3, this invention reduces the prediction space of the two-dimensional performance curve to a one-dimensional state, thereby reducing the complexity and time consumption of prediction. At the same time, the combination of the two models works together to make the prediction space in the model form not only limited to the discharge voltage curve of the cathode material, but also adaptable to all two-dimensional performance curves, thereby improving the generalization to a certain extent.
[0039] 4. This invention employs a core technology combining a Transformer encoder-decoder architecture with a diffusion model. The Transformer encoder-decoder architecture is used to capture the complex mapping relationship between various types of material information and performance curves, which can constrain the denoising search space and achieve effective aggregation of information from different types of materials. The introduction of the diffusion model is a synchronous evolution of the overall sequence relationship of the performance curves, making the overall prediction more consistent with the actual physical space. The synergy of the two enhances the generalization of the model and further improves its accuracy. Attached Figure Description
[0040] Figure 1 This is a simplified flowchart of the present invention;
[0041] Figure 2 This is a summary graph of the prediction metrics at each time step when the present invention makes predictions on the test set.
[0042] Figure 3 This is a summary graph of the prediction metrics for each time step when a traditional neural network makes predictions on the test set.
[0043] Figure 4This is a summary graph of the prediction metrics for each time step when the Transformer is making predictions on the test set.
[0044] Figure 5 This is a summary graph of the prediction metrics at each time step when the diffusion-only model makes predictions on the test set.
[0045] Figure 6 Box plots of R² and MAE at time step 50 for the four methods after five experiments using five random seeds. Detailed Implementation
[0046] The embodiments of the present invention will be described in detail below. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, any modifications or equivalent substitutions made to the present invention should be covered within the scope of the claims of the present invention.
[0047] Furthermore, to better illustrate the present invention, numerous specific details are set forth in the following detailed embodiments. Those skilled in the art will understand that the present invention can be practiced without these specific details.
[0048] This invention provides a method for predicting the performance curves of cathode materials using a combined Transformer and diffusion model, comprising the following steps:
[0049] S1. Collect and organize various characteristic information of cathode materials from information sources such as specific experiments, scientific research papers or online databases, and determine the performance curves that need to be predicted.
[0050] As long as the characteristic information of the cathode material can be vectorized through certain means, this characteristic information can be used as the input of the model used in this method and applied to the performance prediction task of the sequential representation of cathode materials.
[0051] Specifically, in the example of predicting the discharge voltage curve of the cathode material, the feature information used is three features: the chemical formula of the electrode material, the discharge rate during the discharge voltage curve test, and the number of cycles. The performance curve to be predicted is the discharge voltage curve of the cathode material. The data source used to train and verify the model performance is the dataset published in the paper "Deep learning of experimental electrochemistry for battery cathodes across diverse compositions".
[0052] S2. Perform data preprocessing: encode various characteristic information of the cathode material into a vectorized representation according to certain rules and determine the input position in the model; interpolate and sample the performance curve sequence to be predicted to a fixed length and determine the sequence content to be predicted.
[0053] There are not many restrictions on the methods for encoding feature information. The core idea is to encode features into vector representations of a certain length using rules that have a certain level of expert knowledge and are adapted to the model's input requirements. Sampling of the performance curve sequence is a balance between maintaining curve accuracy and the limitations of equipment and computing power.
[0054] Specifically, in the example of discharge voltage curve prediction, various numerical cathode material characteristics (discharge rate and cycle number during discharge voltage curve testing) are encoded into a 16-dimensional vector using a simple numerical repetition method. Symbolic characteristics (i.e., chemical formulas) are then encoded using two dimensions to determine the smallest semantic unit, achieving two types of initial encoding:
[0055] The first approach uses existing element representations as a reference (i.e., each chemical element is first represented as a usable vector of uniform length, such as one-thermal encoding—constructing a vector space of equal length based on the number of element types, with each element corresponding to a one-thermal vector that is 1 only in a specific position and 0 in the rest). Each chemical element in the chemical formula is used as the smallest semantic unit, and the vector corresponding to each element is weighted and scaled according to its normalized atomic content in the chemical formula to obtain the feature vector of that element in the current material. Specifically, a chemical formula is ultimately represented as an encoded vector formed by concatenating all 200-dimensional vectors of weighted and scaled elements. If the cathode material contains fewer than 9 elements, then 0 vectors are uniformly filled in the subsequent positions to make the vector representation length of all materials uniform.
[0056] The second method uses one atomic characteristic of all elements in each chemical formula (a total of 22 atomic characteristics are selected, namely atomic number, Mendeleev element number, atomic weight, melting point, group in the periodic table, period in the periodic table, covalent radius, electronegativity, number of valence electrons in s orbitals, number of valence electrons in p orbitals, number of valence electrons in d orbitals, number of valence electrons in f orbitals, total number of valence electrons, number of unfilled s orbitals, number of unfilled p orbitals, number of unfilled d orbitals, number of unfilled f orbitals, total number of unfilled orbitals, single-atom volume at 0 K ground state, 0 The bandgap energy in the K ground state is used as the smallest semantic unit. Each smallest semantic unit is represented by a vector of length 16 using 16 statistical strategies (robust mole fraction weighted mean, maximum value of characteristic, minimum value of characteristic, range, standard deviation, weighted first quartile, weighted third quartile, mole fraction weighted interquartile range, maximum absolute value of adjacent differences in ascending sequence, arithmetic mean of adjacent absolute differences in ascending sequence of attributes, mole fraction weighted median, stoichiometric Shannon entropy, maximum mole fraction, ratio of maximum to minimum value of elemental attribute, ratio of maximum value of elemental attribute to robust weighted mean, and ratio of mole fraction of element corresponding to minimum and maximum value of attribute). A complete chemical formula is ultimately represented as an encoded vector formed by concatenating the vectors generated by the statistical strategies for all atomic features.
[0057] Finally, the chemical formula information generated by the first semantic unit segmentation method is used as the input to the model encoder. The dimension of each word is the same as the length of the vector after weighted scaling of each element, which is 200 dimensions. The chemical formula information generated by the second semantic unit segmentation method, as well as the discharge rate and cycle number information during the discharge voltage curve test, are used as the input to the decoder. The dimension of each word is 16 dimensions.
[0058] In the specific example of discharge voltage curve prediction, each processed performance curve is represented as a two-dimensional sequence corresponding to 100 discrete sampling points. Each curve is first divided into 100 points uniformly along the voltage axis to generate a voltage sampling grid based on its voltage range. Then, one-dimensional linear interpolation is performed on the curve to obtain a capacity sequence corresponding to each voltage grid point. The final model needs to predict the capacity sequence of the discharge voltage curve for each cathode material, while the uniformly sampled voltage sequence serves as one of the inputs to the diffusion model.
[0059] S3. Divide the sample data into appropriate datasets.
[0060] How the dataset is divided depends on the final use case of the model.
[0061] Taking discharge voltage curve prediction as an example, the goal is to build a prediction model that can reduce the number of experimental cycle tests. Therefore, the dataset is divided according to the number of cycles: for each cathode material, regardless of how many cycle tests it has actually completed, the voltage curves corresponding to the first 40% of the cycle cycles are uniformly taken as the training set, the curves corresponding to the middle 10% of the cycle cycles are taken as the validation set, and the curves corresponding to the last 50% of the cycle cycles are taken as the test set.
[0062] S4. Construct a joint model.
[0063] The overall design concept is as follows: The Transformer is used for sequence encoding to first transform the spatial semantics of various known features of the cathode material. Then, the diffusion model utilizes the deep knowledge information output by the Transformer to obtain a complete prediction result of the cathode material's performance. The Transformer can only predict the overall trend of the performance sequence, and its fitting accuracy for sequence details such as voltage jumps, cyclic decay inflection points, and local subtle fluctuations is insufficient. The diffusion model, relying on the global deep semantic prior of the Transformer, iteratively denoises to refine the local details of the sequence. This bidirectional adaptation achieves a complete prediction performance that is accurate in both global patterns and local details. This complementary and synergistic effect is not a conventional superposition effect of existing known technologies. The model in this method can be based on the PyTorch deep learning framework and is specifically constructed from three parts: a data preprocessing module, a Transformer sequence prediction module, and a diffusion module. Taking discharge voltage curve prediction as an example, the model construction method is as follows:
[0064] Data preprocessing module:
[0065] Data preprocessing is performed before training and prediction, with zero-mean, unit-variance standardization applied to encoder features, decoder features, and curve sequences. The mean and standard deviation are fitted onto the training set, and the validation and test sets are transformed using the parameters fitted from the training set to ensure data distribution consistency and avoid data leakage.
[0066] Transformer sequence prediction module:
[0067] Encoder Layer: First, an input embedding layer is set up, which maps the encoder input features (shape: [batch_size, encoder_token_num, encoder_token_dim]) to the model's hidden dimension d_model=128 through linear transformation and the GELU activation function. Then comes the specific encoder, which consists of a custom encoder layer. Each encoder layer includes: an 8-head multi-head self-attention mechanism, a feedforward neural network with a hidden layer dimension of d_model * 4, as well as residual connections, layer normalization, and Dropout regularization. The material feature information output by the encoder is represented as memory with a shape of [batch_size, encoder_token_num, d_model].
[0068] Decoder Layer: First, an input embedding layer is set up, which maps the decoder input features (shape: [batch_size, decoder_token_num, decoder_token_dim]) to d_model=128 through linear transformation and GELU activation function. Then comes the specific decoder, which consists of a custom decoder layer. Each decoder layer includes: an 8-head multi-head self-attention mechanism, an 8-head cross-attention mechanism (query from the decoder, key and value from the encoder memory), a feedforward neural network with a hidden layer dimension of d_model*4, residual connections, layer normalization, and Dropout regularization. The sequence output by the decoder after combining the encoder output information has a shape of [batch_size, decoder_token_num, d_model].
[0069] Transformer Output Layer: This output layer is a combination of a linear layer, GELU activation function, layer normalization, and Dropout regularization. Two layers are stacked together. The decoder output is input into this layer, and one-dimensional linear interpolation is applied along the sequence length dimension to obtain an initial prediction sequence consistent with the target discharge voltage curve capacity sequence dimension, along with the decoder output. Both are then used by the subsequent diffusion refining module.
[0070] Diffusion Refining Module:
[0071] Condition Constructor: Combines the Transformer decoder output with the voltage condition into a diffusion condition. 100 points in the voltage sequence of the discharge voltage curve are projected into 128-dimensional vectors through two fully connected layers to form tensors [Batch, 100, 128]. Then, average aggregation is performed on the sequence dimension to form tensors [Batch, 128], which are concatenated with the decoder output and flattened into a diffusion condition with a shape of [batch_size, (decoder_token_num + 1)×128].
[0072] The diffusion scheduler is responsible for defining and planning the forward denoising and backward sampling processes. During forward denoising, the output of the Transformer output layer is denoised at the initial time step to obtain the initial prediction. This serves as the starting point for backsampling. During backsampling, 50 sampling steps are set, with each step taking the current... Batch time step The condition is fed into the refined network for prediction. Then follow the formula:
[0073]
[0074] in This represents the cumulative signal-to-noise ratio (SNR) coefficient at time step t, obtained by multiplying the SNR of all forward diffusion steps. This represents the cumulative signal-to-noise ratio coefficient corresponding to the previous time t−1, which is used to achieve stepwise denoising and restoration from time t to t−1;
[0075] The update yields the discrete next step. Last Update When the loop ends, you get a refined_sequence with shape [batch_size, seq_len, 1].
[0076] Diffusion Refining Network: This network receives (x) at each sampling step t (t, condition) and predict x0. First, a combination of a linear layer and the GELU activation function is set to render the noisy sequence x. tThe last dimension ([batch_size, seq_len, 1]) is increased to 128 to obtain x_emb. Next, sinusoidal positional encoding is used to encode the discrete time step t to 128 dimensions, resulting in t_emb. Then, the diffusion condition is linearly reshaped into (decoder_token_num+1) 128-dimensional vectors, followed by linear transformation, GELU activation, and layer normalization to obtain cond_emb. Then, an 8-head cross-attention mechanism (the query is the result of broadcasting t_emb along the sequence dimension and adding it to x_emb, with key and value being cond_emb) is used for condition injection. Finally, a 1-layer Transformer encoder refines the conditionally injected sequence, and a 2-layer multilayer perceptron maps the dimension of each time step back to 1 dimension to obtain the final predicted sequence refined_sequence.
[0077] S5. Using the sequence of performance curves to be predicted as the target labels, train the model using the preprocessed and partitioned data and obtain the evaluation results.
[0078] The optimization objective is the mean squared error between the refined sequence and the standardized target capacity sequence, with L1 regularization and gradient clipping included. The pre-processed data is then input into the model for actual training.
[0079] Finally, the prediction model constructed using the method of this invention achieved the following best performance on the test set (the training and test datasets are derived from academic papers): R² values of 0.82, 0.87, and 0.85 at time steps 25, 50, and 75, respectively; and MAE values of 3.94, 7.09, and 15.05, respectively. The method of this invention is optimal compared to the best performance of three methods: traditional neural networks (R² at time steps 25, 50, and 75 are 0.66, 0.37, and 0.71; MAE is 6.33, 22.11, and 20.65, respectively), Transformer only (R² at time steps 25, 50, and 75 are 0.58, 0.49, and 0.55; MAE is 5.94, 16.82, and 24.21, respectively), and diffusion only (R² at time steps 25, 50, and 75 are 0.69, 0.76, and 0.79; MAE is 4.06, 9.89, and 16.68, respectively). This indicates that the encoding method and joint strategy used in this invention can more effectively utilize existing information of various types to achieve higher accuracy in performance curve prediction. Five experiments were conducted using five random seeds for each of the four methods. The box plots of R² and MAE at time step 50 show that the comparison results are not due to randomness and are representative.
Claims
1. A method for predicting the performance curves of cathode materials using a combined Transformer and diffusion model, characterized in that, Includes the following steps: Step S1: Collect the characteristic information of the cathode material and determine the type of performance curve to be predicted. The characteristic information includes material properties that can be vectorized and characterized. Step S2: Based on preset encoding rules, the feature information is converted into a fixed-dimensional numerical vector, and the performance curve sequence is interpolated and sampled to a fixed length to obtain the model input data; Step S3: Divide the sample data into datasets according to the model application scenario; Step S4: Construct a joint prediction model, which includes a Transformer encoding module and a diffusion refining module. The Transformer encoding module is used to convert the vectorized feature information into a hidden layer feature vector containing semantic associations of material features. The diffusion refining module uses the Transformer decoder output and the voltage sequence of the performance curve as conditional inputs to iteratively optimize the initial prediction sequence to obtain the final performance curve prediction result. Step S5: Train the joint prediction model using the preprocessed performance curve sequence as the target label, and evaluate the model performance based on the test set.
2. The method according to claim 1, characterized in that, In step S1, the characteristic information of the positive electrode material includes chemical formula, discharge rate and cycle number, and the performance curve is the discharge voltage curve.
3. The method according to claim 1, characterized in that, In step S2, the vectorization encoding includes: Step S2.1: Encode the numerical features into a 16-dimensional vector using a numerical repetition method; Step S2.2: For chemical formula features, take chemical elements as the smallest semantic unit, weight and scale the 200-dimensional vectors corresponding to each element according to their normalized atomic content in the chemical formula, and concatenate the feature vectors of all elements to form the first chemical formula encoding vector. When the number of elements is less than 9, fill the zero vector to a uniform length. For chemical formula features, 22 atomic features are used as the smallest semantic unit. Each atomic feature is represented as a 16-dimensional vector using 16 statistical strategies. The vectors generated by all atomic features are concatenated to form the second chemical formula encoding vector. Step S2.3: Sample 100 points uniformly on the voltage axis of the performance curve sequence, and obtain the capacity sequence corresponding to each sampling point through one-dimensional linear interpolation.
4. The method according to claim 3, characterized in that, In step S2.2, the first chemical formula encoding vector is used as the input of the Transformer encoder, and the second chemical formula encoding vector generated in step S2.2 and the numerical feature encoding vector are used together as the input of the Transformer decoder.
5. The method according to claim 1, characterized in that, In step S3, the dataset is divided according to the number of cycles: for each cathode material, the performance curves corresponding to the first 40% of the cycles are taken as the training set, the curves corresponding to the middle 10% of the cycles are taken as the validation set, and the curves corresponding to the last 50% of the cycles are taken as the test set.
6. The method according to claim 1, characterized in that, In step S4, the Transformer encoding module includes: Encoder layer: The encoder input features are mapped to a 128-dimensional hidden dimension through the input embedding layer, and then processed by an 8-head multi-head self-attention mechanism, a 512-dimensional feedforward neural network, residual connections, layer normalization and Dropout regularization. Decoder layer: The input features of the decoder are mapped to a 128-dimensional hidden dimension through the input embedding layer, and then processed by an 8-head multi-head self-attention mechanism, an 8-head cross-attention mechanism, a 512-dimensional feedforward neural network, residual connections, layer normalization and Dropout regularization. Output layer: By combining two stacked linear layers, the GELU activation function, layer normalization and Dropout regularization, the decoder output is linearly interpolated in one dimension along the sequence length to obtain the initial prediction of a 100-dimensional capacity sequence.
7. The method according to claim 1, characterized in that, In step S4, the diffusion refining module includes: Condition constructor: Combines the Transformer decoder output with the voltage condition into a diffusion condition, where 100 points in the voltage sequence are projected into 128-dimensional vectors through two fully connected network layers to form tensors [Batch, 100, 128]. Then, average aggregation is performed on the sequence dimension to form tensors [Batch, 128], which are then concatenated with the decoder output. Diffusion scheduler: Defines the forward noise addition and backward sampling process, sets 50 sampling steps, and in each step sends the current noisy sequence, time step and diffusion conditions into the refinement network to predict the initial state, and updates the next state according to the preset noise scheduling strategy; The diffusion refinement network receives a noisy sequence, time step, and diffusion conditions. It then uses a linear transformation to increase the sequence dimension to 128 dimensions. Combining the time step representation with sinusoidal position encoding and conditional embedding, it performs conditional injection through an 8-head cross-attention mechanism. Finally, it is refined by a Transformer encoder and mapped back to a 1-dimensional output.
8. The method according to claim 7, characterized in that, During the backsampling process of the diffusion scheduler, the initial state of the refined network prediction is used to guide the iterative denoising of the noisy sequence, and finally outputs a refined prediction sequence with shape [batch_size, seq_len, 1].
9. The method according to claim 1, characterized in that, In step S5, the training optimization objective is the mean squared error between the refined sequence and the standardized target capacity sequence, and includes an L1 regularization term and a gradient clipping strategy.
10. A system for predicting the performance curves of cathode materials using a combined Transformer and diffusion model, comprising a data preprocessing module, a Transformer encoding module, a diffusion refining module, and a model training module, characterized in that, Each module works in concert to execute the steps of the method as described in any one of claims 1-9, thereby achieving automated prediction of the discharge voltage curve of the cathode material.