Chromatographic difference peak recognition method based on interactive attention

CN122944591APending Publication Date: 2026-10-20CHINA TOBACCO GUIZHOU IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230332.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0003]现有的一种色谱差异峰识别方法是通过传统单变量统计分析方法如t检验、方差分析等进行,该方法仅独立评估各色谱峰的差异性,但无法捕捉峰与峰之间的协同交互作用,易遗漏组合标志物信息,存在识别结果不精确的问题

Benefits of technology

[0040]本申请将集成梯度用于色谱特征贡献度归因,避免传统筛选方法主观性强、稳定性差的缺陷,实现对每个色谱峰贡献度的定量、精细化计算,识别结果更可靠、更具解释性。同时本申请将交互注意力与集成梯度(或加权差值)深度结合,可自动捕捉峰间复杂关联,解决了传统线性方法无法适配真实色谱数据非线性特征的问题,相比传统差异筛选方法,精准度和适配性更优。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application relates to the field of chemometrics and discloses a method for identifying chromatographic difference peaks based on interactive attention. The method includes: constructing a sample matrix and a category label vector; constructing an interactive attention model, randomly initializing each model parameter with a fixed seed, iteratively training based on the sample set and category label vector, updating all parameters using a cross-entropy loss function until training is complete and the optimal values ​​of each model parameter are obtained; setting a baseline sample vector and an integration step number, generating an interpolation coefficient sequence based on the integration step number; generating interpolation point vectors corresponding to each sample in the sample set based on the baseline sample vector, the chromatographic data vector of the sample, and the interpolation coefficient sequence; calculating the integrated gradient attribution score vector of the sample based on each interpolation point vector and the trained interactive attention model; and obtaining the contribution of each chromatographic peak based on the integrated gradient attribution score vector of all samples. The identification results of this application are more reliable and more interpretable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of chemometrics and detection technology, specifically to a method for identifying chromatographic difference peaks based on interactive attention. Background Technology

[0002] Chromatographic analysis is a core technical means for sample separation and detection, widely used in tobacco production, disease diagnosis, drug quality control, and food origin traceability. In chromatographic analysis, accurately identifying key chromatographic peaks that cause differences between different types of samples is crucial for understanding the material basis of these differences and revealing the underlying biological or chemical mechanisms. However, chromatographic data typically contains a large number of peaks. How to automatically select characteristic peaks that contribute significantly to classification decisions from this vast amount of data is a core technical problem that urgently needs to be solved in the field of chemometrics.

[0003] One existing method for identifying chromatographic peak differences is through traditional univariate statistical analysis methods such as t-tests and analysis of variance. This method only independently assesses the differences between each chromatographic peak, but it cannot capture the synergistic interaction between peaks, and it is easy to miss information on combined markers, resulting in inaccurate identification results. Summary of the Invention

[0004] This application provides a method for identifying chromatographic difference peaks based on interactive attention. This method captures the correlation between peaks through interactive attention and combines it with integrated gradient attribution to achieve a more accurate assessment of peak contribution, thus overcoming the shortcomings of traditional methods and adapting to the needs of complex chromatographic data.

[0005] In a first aspect, this application provides a method for identifying chromatographic difference peaks based on interactive attention, including:

[0006] Construct a sample matrix and a category label vector. The sample matrix is ​​constructed based on the peak area of ​​each chromatographic peak of each sample in the sample set and processed by the Pareto method. The sample set includes at least two classes of samples.

[0007] Construct an interactive attention model, randomly initialize each model parameter with a fixed seed, and perform iterative training based on the sample set and class label vector. Update all parameters using the cross-entropy loss function until training is complete, and obtain the optimal values ​​of each model parameter. Each model parameter includes the query weight matrix, key weight matrix, value weight matrix, classifier weight matrix, and classifier bias vector.

[0008] Set the baseline sample vector and the number of integration steps, and generate the interpolation coefficient sequence based on the number of integration steps;

[0009] For each sample in the sample set, the interpolation point vectors corresponding to the sample are generated based on the baseline sample vector, the chromatographic data vector of the sample, and the interpolation coefficient sequence. The integrated gradient attribution score vector of the sample is calculated based on the interpolation point vectors and the trained interactive attention model. The chromatographic data vector of the sample is the row vector corresponding to the sample in the sample matrix.

[0010] The contribution score vector is obtained based on the integrated gradient attribution score vector of all samples in the sample set. Each element in the contribution score vector represents the contribution of its corresponding chromatographic peak.

[0011] In some implementations of this application, the ensemble gradient attribution score vector of the samples is calculated based on each interpolation point vector and the trained interactive attention model, including:

[0012] For each interpolation point vector, input the interpolation point vector into the trained interactive attention model to obtain the gradient vector of that interpolation point vector;

[0013] The accumulated gradient is updated based on the gradient vector. The updated accumulated gradient is equal to the sum of the original accumulated gradient and the gradient vector. The initial value of the accumulated gradient is the zero vector.

[0014] Iterate through all interpolation point vectors to obtain the final accumulated gradient;

[0015] The average gradient is obtained by dividing the final accumulated gradient by the number of integration steps.

[0016] The integrated gradient attribution score vector of a sample is determined based on the product of the sample difference and the average gradient, where the sample difference is the difference between the sample's chromatographic data vector and the baseline sample vector.

[0017] In some implementations of this application, the contribution score vector is obtained based on the ensemble gradient attribution score vector of all samples in the sample set, including:

[0018] The cumulative contribution vector is obtained by summing the absolute values ​​of each element in the integrated gradient attribution score vector of each sample in the sample set.

[0019] The contribution score vector is obtained by dividing the cumulative contribution vector by the total number of samples. The value of the j-th element of the contribution score vector is used to characterize the contribution of the j-th chromatographic peak of the sample to the classification decision. The larger the element value, the more important the chromatographic peak is to the classification decision.

[0020] In some implementations of this application, after obtaining the contribution score vector based on the ensemble gradient attribution score vector of all samples in the sample set, the following is also included:

[0021] Normalization is performed based on the contribution score vector;

[0022] Based on the numerical values ​​of each element in the normalized contribution score vector, the chromatographic peaks are sorted in descending order, and a ranking list of contribution peaks is output.

[0023] In some implementations of this application, iterative training is performed based on the sample set and class label vectors, and all parameters are updated using the cross-entropy loss function until the iterative training is completed, obtaining the optimal values ​​of each model parameter, including:

[0024] In each training session, for each sample, the gradient values ​​of each model parameter corresponding to that sample are obtained;

[0025] For each model parameter, the gradient values ​​of all samples in the sample set are accumulated, and the model parameters are updated based on the average of the accumulated gradient values.

[0026] The training is iterated until the specified number of iterations is reached, and the optimal value of each model parameter is determined based on the updated model parameters obtained from the last training iteration.

[0027] In some implementations of this application, the gradient values ​​of each model parameter corresponding to each sample are obtained, including:

[0028] For each sample, the corresponding classification prediction probability and cross-entropy loss value are obtained based on the model forward propagation;

[0029] The initial gradients of each model parameter corresponding to the sample are determined based on the classification prediction probability and the cross-entropy loss value.

[0030] The gradient values ​​of each model parameter corresponding to the sample are obtained by backpropagation of the model.

[0031] In some implementations of this application, for each sample, the corresponding predicted probability and cross-entropy loss value are obtained based on the model's forward propagation, including:

[0032] For each sample, based on the initialized model parameters and the sample's chromatographic data vector, the query vector, key vector, and value vector of that sample are obtained, and the correlation score between the vectors is calculated.

[0033] Obtain the product of the query vector and key vector of the sample, normalize the product, and obtain the attention weight value of the sample.

[0034] The feature representation of the sample is obtained by weighting and summing the value vector using attention weights.

[0035] Sample classification is performed based on feature representation to obtain the classification prediction probability of the sample;

[0036] The cross-entropy loss value of the sample is obtained based on the classification prediction probability and the class label vector.

[0037] In some implementations of this application, the baseline sample vector is a zero vector.

[0038] In some implementations of this application, the interpolation coefficient sequence is a sequence of coefficients that are equally spaced on the interval [0,1], and the total number of coefficients is equal to the number of integration steps.

[0039] This application has the following beneficial effects:

[0040] This application integrates gradients for attributing chromatographic feature contributions, avoiding the subjective and unstable shortcomings of traditional screening methods. It achieves quantitative and refined calculation of the contribution of each chromatographic peak, resulting in more reliable and interpretable identification results. Furthermore, this application deeply combines interactive attention with integrated gradients (or weighted differences), automatically capturing complex inter-peak correlations. This solves the problem that traditional linear methods cannot adapt to the nonlinear characteristics of real chromatographic data, offering superior accuracy and adaptability compared to traditional difference screening methods. Attached Figure Description

[0041] Figure 1 The chromatograms of simulated representative samples of the first, second, and third classes provided in one embodiment of this application are shown.

[0042] Figure 2 This paper presents a graph showing the change of cross-entropy loss value with the number of iterations according to an embodiment of this application.

[0043] Figure 3 This paper shows a distribution diagram of chromatographic peak contribution scores in the simulation data provided in one embodiment of this application;

[0044] Figure 4 The following is a characteristic curve diagram of a certain fragrance and flavor sample A, B and C based on chemical substances provided in one embodiment of this application;

[0045] Figure 5 The diagram shows the distribution of chromatographic peak contribution scores for chemical substances in the fragrance and flavor sample data provided in one embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0047] While existing deep learning methods can achieve high-precision classification of chromatographic peaks, they generally lack the ability to explain the attribution of input features, resulting in a "black box" characteristic in the model decision-making process and failing to provide an understandable basis for peak contribution assessment.

[0048] To address the aforementioned issues, this application provides a method for identifying chromatographic difference peaks based on interactive attention. This method automatically learns the interaction weights between peaks through interactive attention and combines them with integrated gradients to quantify peak contributions, providing a reliable basis for biomarker screening.

[0049] The chromatographic difference peak identification method based on interactive attention provided in this application includes the following steps:

[0050] Step S1: Construct a sample matrix and a category label vector. The sample matrix is ​​constructed based on the peak area of ​​each chromatographic peak of each sample in the sample set and is processed by centering or Pareto method. The sample set includes at least two types of samples.

[0051] Specifically, step S1 is the data preparation stage. At least two groups of samples from different categories are selected to form a sample set. Each sample is analyzed by gas chromatography-mass spectrometry (GC-MS) to obtain the corresponding chromatogram. Peak detection and peak area integration are performed on each chromatogram to identify and record the retention time and corresponding peak area value of each chromatographic peak. After peak alignment, p common chromatographic peaks are identified, ensuring that all samples have the same peak dimension.

[0052] Construct a sample-peak area matrix X, which is n rows and p columns, where n is the total number of samples and p is the total number of chromatographic peaks. The element in the i-th row and j-th column of matrix X represents the peak area value of the i-th sample at the j-th chromatographic peak. Simultaneously, construct a category label vector Y, with a length of n, where each element is an integer between 1 and K, representing the category to which the corresponding sample belongs, and K is the total number of sample categories.

[0053] To improve the stability and convergence speed of subsequent model training and eliminate the influence of magnitude differences between different chromatographic peaks, the sample-peak area matrix X is processed using Pareto, resulting in a processed data matrix X1, which still has n rows and p columns. Specifically, the Pareto processing is roughly as follows: for each chromatographic peak, the average value of that peak across all samples is calculated; then, the peak area of ​​each sample is subtracted from this average value, and the result is divided by the square root of the standard deviation to obtain the processed peak area data.

[0054] Step S2: Construct the interactive attention model, randomly initializing each model parameter with a fixed seed. The classifier is trained iteratively using the cross-entropy loss function. Based on the sample set and class label vectors, all parameters are updated using the cross-entropy loss function as the optimization objective until training is complete, obtaining the optimal values ​​of each model parameter. Each model parameter includes the query weight matrix, key weight matrix, value weight matrix, classifier weight matrix, and classifier bias vector.

[0055] In this step, building an interactive attention model requires setting key parameters for the interactive self-attention model, including the feature dimension dim (ranging from 4 to 16), the learning rate, and the number of model training iterations. Parameter settings must balance model training efficiency and analytical accuracy, providing a clear basis for subsequent model initialization and training.

[0056] Specifically, the interactive attention model consists of the following computational layers:

[0057] 1) Input layer, obtains the chromatographic data vector x of a processed sample. i The dimension of this vector is p;

[0058] 2) Query vector computation layer, which maps the input to the query vector through the first linear transformation;

[0059] 3) Key vector computation layer, which maps the input to a key vector through a second linear transformation;

[0060] 4) Value vector computation layer, which maps the input to a value vector through a third linear transformation;

[0061] 5) Attention score calculation layer: calculates the dot product of the query vector and the key vector and scales it;

[0062] 6) Attention weight conversion layer, which uses the Sigmoid function to convert scores into weights between 0 and 1;

[0063] 7) Feature fusion layer: The attention weights are multiplied by the value vector to obtain the fused features;

[0064] 8) Classification score calculation layer, which maps the fused features to scores for each category through a fourth linear transformation;

[0065] 9) Probability output layer: The scores are converted into category probability distributions using the Softmax function.

[0066] Furthermore, the model parameters of the interactive attention model also include a query weight matrix, a key weight matrix, a value weight matrix, a classifier weight matrix, and a classifier bias vector. In this application, the above model parameters are randomly initialized using a fixed seed to ensure that the initialization results are repeatable.

[0067] Specifically, the following values ​​are used to initialize the model parameters:

[0068] Query weight matrix W q (Its dimension is p×dim): Sampled from a normal distribution with a mean of 0 and a standard deviation of 0.02, this matrix is ​​used to transform the input chromatographic peak area vector into a query vector;

[0069] Key weight matrix W k(Its dimension is p×dim): Sampled from a normal distribution with a mean of 0 and a standard deviation of 0.02, this matrix is ​​used to transform the input chromatographic peak area vector into a bond vector;

[0070] Weight matrix W v (Its dimension is p×dim): Sampled from a normal distribution with a mean of 0 and a standard deviation of 0.02, this matrix is ​​used to transform the input chromatographic peak area vector into a value vector;

[0071] Classifier weight matrix W c (Its dimension is dim×K): Each element in the matrix is ​​multiplied by 0.01 for scaling control. This matrix is ​​used to transform the fused features into classification scores.

[0072] Classifier bias vector b c (Its dimension is 1×K): It is initialized as a zero vector, which is used to provide bias terms for the scores of each category.

[0073] Step S3: Set the baseline sample vector and the number of integration steps, and generate the interpolation coefficient sequence based on the number of integration steps.

[0074] Specifically, the baseline sample vector x base Construct a zero vector, meaning all elements of this vector have a value of 0. Baseline sample vector x base The dimension is 1 row and p columns. In chromatographic analysis, a zero baseline represents a blank sample containing no chromatographic signal, which is used as the reference origin for attribution calculations.

[0075] The number of integration steps (steps) is a positive integer greater than zero, ranging from 30 to 100, with 50 being the preferred value. The number of integration steps determines the discrete approximation accuracy of the path integral; a larger number of steps results in higher integration accuracy, but also increases the computational cost.

[0076] The interpolation coefficient sequence consists of *steps* equally spaced interpolation coefficients generated within the interval [0, 1]. Based on this sequence, discrete sampling points along a straight path from the baseline sample to the original sample can be formed. Specifically, the *m*th interpolation coefficient *a*... m The expression is: a m = m / (steps-1), where m = 0, 1, 2, ..., steps-1. For example, when the number of integration steps is 50, the second interpolation coefficient a m The value is 1 / 49 = 0.0204.

[0077] Step S4: For each sample in the sample set, generate the interpolation point vector corresponding to the sample based on the baseline sample vector, the sample's chromatographic data vector, and the interpolation coefficient sequence. Calculate the integrated gradient attribution score vector of the sample based on each interpolation point vector and the trained interactive attention model. The chromatographic data vector of the sample is the row vector corresponding to the sample in the sample matrix.

[0078] Specifically, for each sample in the sample set, perform the following operations:

[0079] Step S41: Initialize the accumulated gradient variable h. Create a chromatographic data vector x corresponding to the i-th input sample. i A zero vector with the same dimensions, having 1 row and p columns.

[0080] Step S42: Traverse along the integration path and calculate the ensemble gradient attribution score vector for each sample. That is, for each interpolation coefficient a in the interpolation coefficient sequence... m Perform the following sub-operations:

[0081] Sub-operation A: Based on the interpolation coefficient sequence, the chromatographic data vector of the sample, and the baseline sample vector x base Generate the interpolation point vectors along the integration path corresponding to this sample. Specifically, the formula for calculating the m-th interpolation point vector of the i-th sample is: x i_m = x base + a m × (x i - x base ).

[0082] interpolation point vector x i_m This represents the m-th intermediate state on the straight path from the baseline sample to the original sample, when a m When x = 0, i_m Equal to the baseline sample vector, when a m When x = 1, i_m It equals the original sample chromatographic data vector.

[0083] Sub-operation B: Calculate the input gradient. Input the interpolation point vector into the trained interactive attention model, perform one forward propagation, and obtain the model's predicted probability for the target class. The target class is either the true class label of the current sample or the class predicted by the model. Perform one backpropagation through an automatic differentiation mechanism to calculate the gradient vector g(a) of the predicted probability with respect to the interpolation point vector. m = ∂J / ∂x i_m , where J is the prediction probability.

[0084] Gradient vector g(a) mThe dimension of ) is 1 row and p columns. Its j-th element represents the rate of change of the predicted probability when the area of ​​the j-th chromatographic peak changes slightly, that is, the sensitivity of the chromatographic peak at the current interpolation point.

[0085] Sub-operation C: Accumulate gradient. This calculates the gradient vector g(a) at the current interpolation point vector. m The accumulated gradient is added to the accumulated gradient h, and the value of the accumulated gradient is updated, i.e., h = h + g(a m ).

[0086] Sub-operation D: Calculate the integrated gradient. After traversing all steps interpolation point vectors, divide the accumulated gradient h by the number of integration steps to obtain the average gradient. Then, multiply the average gradient by the difference between the original sample chromatographic data vector and the baseline sample vector, i.e., (x... i - x base This process yields the ensemble gradient attribution score vector IG for the i-th sample. The ensemble gradient attribution score vector IG has a dimension of 1 row and p columns, and the absolute value of its j-th element represents the degree to which the j-th chromatographic peak contributes to the model's classification of the current sample as the target category.

[0087] Step S5: Obtain the contribution score vector based on the integrated gradient attribution score vector of all samples in the sample set.

[0088] Specifically, for all samples in the sample set, step S4 is repeated to obtain the integrated gradient attribution score vector for each sample. Then, the absolute values ​​of each element of the integrated gradient attribution score vector for each sample are taken, and the elements are summed to obtain the cumulative contribution vector. Finally, the cumulative contribution vector is divided by the total number of test samples to obtain the contribution score vector. The contribution score vector has a dimension of 1 row and p columns, where the j-th element represents the average contribution of the j-th chromatographic peak across all test samples. The larger this value, the greater the contribution of the chromatographic peak to the classification decision, i.e., the more important the chromatographic peak is to the classification decision.

[0089] This step integrates gradients for attributing chromatographic feature contributions, avoiding the subjective and unstable shortcomings of traditional screening methods. It enables quantitative and refined calculation of the contribution of each chromatographic peak, resulting in more reliable and interpretable identification results. Furthermore, this application employs an integrated gradient method to integrate the gradient along the complete path from the baseline to the sample, effectively overcoming the attribution failure problem of traditional single-point gradient methods where the gradient approaches zero when the model output probability nears saturation.

[0090] Step S6: Normalize the contribution score vector. Based on the numerical values ​​of each element in the normalized contribution score vector, sort the chromatographic peaks in descending order and output a list of contribution rankings of the chromatographic peaks.

[0091] This involves normalizing the contribution score vector so that the sum of the contribution scores of all chromatographic peaks equals 1. The values ​​of each element in the normalized contribution score vector range from 0 to 1, and the sum of the scores of all peaks is strictly equal to 1. Normalization makes it easier to understand and compare intuitively.

[0092] Then, the normalized contribution score vector is sorted in descending order of the values ​​of its elements to generate a ranking list of chromatographic peak contributions. A higher value indicates a greater contribution of the peak to the classification decision, making it a key marker for distinguishing different categories of samples.

[0093] Furthermore, in step S2, determining the optimal values ​​of each model parameter may include the following steps:

[0094] In each training iteration, for each sample in the sample set, the sample is input into the model for forward propagation to obtain the classification prediction probability. The cross-entropy loss value is then calculated based on the classification prediction probability and the label vector. Finally, starting from the cross-entropy loss value, the query weight matrix W is calculated through backpropagation. q Key weight matrix W k Value weight matrix W v Classifier weight matrix W c and classifier bias b c The gradient value.

[0095] That is, start the model training process and train the interactive self-attention model step by step according to the set number of iterations:

[0096] In each iteration, the model first undergoes forward propagation: based on the initialized model parameters, the centered chromatographic data is transformed into query vectors, key vectors, and value vectors, and the correlation scores between the vectors are calculated; the product of the query vector and key vector of the sample is obtained, and the product is normalized to obtain the attention weight value of the sample; the attention weight value of the sample is used to perform a weighted summation of its corresponding value vector to obtain the feature representation of the sample; the sample classification is calculated based on the feature representation to obtain the classification prediction probability of the sample, and the model loss function is obtained by combining the classification prediction probability and the class label vector.

[0097] Then, the gradient values ​​of each model parameter are calculated, and the gradients of the query vector, key vector, value vector, classification-related weight matrix and bias matrix are updated according to the set learning rate to gradually reduce the model loss value.

[0098] Repeat the forward propagation, gradient calculation, and parameter update process described above until the set number of iterations of training are completed. Stop model training, and you will obtain the trained interactive self-attention model.

[0099] This application introduces an interactive attention method, which automatically mines deep nonlinear interaction information between peaks without requiring manual parameter setting, thus solving the technical defects of traditional methods that lead to "missed judgments" or "false judgments" due to their inability to adapt to the nonlinear characteristics of data. Furthermore, this application introduces an integrated gradient (or weighted difference) method, which back-attributes the model's discriminative contribution to the original chromatographic peak space, addressing the pain point that traditional "black box" models cannot provide scientific decision-making basis, resulting in a lack of credibility of analytical results in quality control or medical diagnosis.

[0100] This application combines interactive attention with integrated gradient (or weighted difference) to automatically capture complex inter-peak correlations, solving the problem that traditional linear methods cannot adapt to the nonlinear characteristics of real chromatographic data. Compared with traditional difference screening methods, it has better accuracy and adaptability.

[0101] The following are examples of testing tobacco flavoring samples using the method described in this application.

[0102] Example 1: Simulated Data Experiment

[0103] (1) Simulation data construction:

[0104] Simulated chromatographic data was constructed, containing 50 samples from each of three categories, totaling 150 samples. Each sample had 100 chromatographic peaks, with peak signal intensities centered at 3. Several peaks from each category were selected and their response intensities were shifted positively or negatively. Specifically, peaks 1-5 of the first category were shifted positively by 0.7, and peaks 20-25 by 1.3; peaks 50-53 of the second category were shifted positively by 0.9, and peaks 78-83 by 1.0; and peaks 95-97 of the third category were shifted positively by 1.5. This simulated the coexistence of differential and background peaks in real chromatographic data. The chromatographic peak curves for representative samples of each category are shown below. Figure 1 As shown.

[0105] The preprocessed simulated chromatographic data is input into the constructed interactive attention model. The model is iteratively optimized and trained using the cross-entropy loss function until the loss value stabilizes and the model converges, completing the adaptive learning of the model parameters. During this process, the model automatically learns and captures the correlation features and weight distribution between chromatographic peaks through interactive attention.

[0106] Figure 2 This is a curve showing how the cross-entropy loss value changes with the number of iterations during model training. Figure 2 As can be seen, the loss value gradually decreases and eventually stabilizes with the increase of the number of iterations, indicating that the model can converge effectively and the parameters reach a stable state. The constructed interactive attention model is well trained and has reliable performance, and can be used for subsequent calculation and analysis of chromatographic peak contribution.

[0107] After the model training is completed, based on the converged stable model, the ensemble gradient method is used to perform attribution calculation on the classification results. The integral is solved along the input feature path, and finally the contribution value of each chromatographic peak to the classification decision is obtained, realizing the quantitative identification and contribution ranking of the difference peaks.

[0108] Figure 3 The contribution weight distribution of 100 chromatographic peaks obtained based on this method is presented. The results show that the top 24 chromatographic peaks with the highest contribution weights calculated by this method are completely consistent with the pre-set difference peaks in the simulated data. This indicates that this method can accurately identify the characteristic peaks that play a key role in the classification results, and the evaluation results of the chromatographic peak contribution are true and reliable, demonstrating high accuracy and rationality.

[0109] Example 2: Identification of Differential Peaks in Fragrance and Flavor Samples

[0110] (1) Materials, reagents and instruments

[0111] Samples of tobacco flavorings and fragrances: 27 for sample A, 28 for sample B, and 7 for sample C. Methanol (chromatographic grade): Tianjin Kemei Chemical Reagent Co., Ltd.; Phenethyl acetate: ≥99%, Beijing Bailingwei Technology Co., Ltd.; n-Heptadecane: ≥99%, Sigma-Aldrich, USA.

[0112] TriplusRSH-Trace1310-ISQLT Gas Chromatography-Mass Spectrometry System: Thermo Fisher Scientific, USA;

[0113] Analytical balance AG104: sensitivity 0.1 mg, Mettler Toledo, Switzerland;

[0114] Pipette: 100 μL, Eppendorf, USA.

[0115] (2) Preparation of standard solutions

[0116] Weigh 0.05 g of phenethyl acetate and 0.015 g of n-heptadecane internal standard sample into a 50 mL volumetric flask, then add methanol to make up to the volume to prepare a mixed internal standard solution. The concentration of phenethyl acetate is 1 mg / mL.

[0117] (3) Instrument operating conditions

[0118] Static headspace analyzer: Sample equilibration temperature: 140℃; Sample loop temperature: 170℃; Transfer line temperature: 180℃; Sample equilibration time: 20 min; Sample vial pressurization pressure: 130 kPa; Pressurization time: 0.20 min; Gas filling time: 0.5 min; Sample loop equilibration time: 0.2 min; Sample injection time: 0.5 min.

[0119] Gas chromatography conditions: Column: DB-624 capillary column (60m*0.32mm*1.8μm); Injector temperature: 180℃; Carrier gas: High-purity helium (99.999%); Flow rate: 2.0mL / min (constant flow mode); Split ratio: 20:1; Temperature program: 80℃, hold for 1 min, increase to 210℃ at a rate of 4℃ / min, then increase to 240℃ at a rate of 20℃ / min and hold for 10 min.

[0120] Mass spectrometry conditions: transfer line temperature: 240 °C; ionization method: electron impact source (EI); ionization energy: 70 eV; ion source temperature: 280 °C; solvent delay time: 6 min; scan mode: full scan mode (SCAN) + selected ion mode (SIM), SCAN mass range: 33 amu ~ 450 amu.

[0121] (4) Sample pretreatment

[0122] Weigh 0.05 g of sample, accurate to 0.0001 g, place the sample into a 20 mL headspace vial, add 100 μL of internal standard solution, immediately cap and seal, and analyze according to the above conditions.

[0123] (4) Results Analysis

[0124] First, the GC-MS data of the flavor and fragrance samples were analyzed for qualitative peak identification and quantitative peak area, and characteristic peak curves (including retention time and relative peak area, compound peak area divided by internal standard area) were obtained for each sample. Figure 4 (As shown). Analysis yielded material information and peak areas for 48 chromatographic peaks.

[0125] Following the steps described above, the chromatographic peak curve data of flavorings and fragrances were preprocessed using Pareto, and then the processed data was input into the interactive attention model to complete training and learning. Furthermore, the contribution score of each chromatographic peak was calculated using an ensemble gradient method, and the results are as follows: Figure 5 As shown.

[0126] As shown in the figure, the contribution of the chromatographic peaks in samples A, B, and C, in descending order, is: peak 40 (anesinol), peak 11 (myrcene), peak 45 (eugenol), peak 10 (juniperene), peak 17 (γ-terpinene), peak 23 (linalool), peak 8 (α-pinene), and peak 16 ((+)-limonene). The results indicate that these substances play a decisive role in the quality assessment of samples from different sources; therefore, the content of these substances can be used to control the quality of fragrances and flavorings.

[0127] This application combines interactive attention to uncover inter-peak correlations and then utilizes ensemble gradients to achieve accurate quantitative attribution of feature peak contributions, resulting in a more comprehensive and objective overall evaluation. The solution automates the process from data preprocessing and feature learning to contribution ranking, enabling rapid and standardized evaluation of flavor and fragrance quality and key feature localization, improving detection efficiency and facilitating widespread application in practical quality inspection, formulation control, and authenticity verification.

[0128] The specific embodiments described above illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Although the description of this application is presented in conjunction with some embodiments, this does not mean that the features of this application are limited to this embodiment. On the contrary, the purpose of describing the application in conjunction with embodiments is to cover other options or modifications that may be derived based on the claims of this application. This application may also be implemented without using these details. Furthermore, to avoid confusion or obscuring the focus of this application, some specific details have been omitted in the description. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.

[0129] In the embodiments of this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.

[0130] In the embodiments of this application, "and / or" 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 existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0131] In the description of this application, it should be noted that the terms "upper", "lower", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0132] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "set," "install," "connect," and "fit" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0133] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for identifying chromatographic difference peaks based on interactive attention, characterized in that, include: Construct a sample matrix and a category label vector. The sample matrix is ​​constructed based on the peak area of ​​each chromatographic peak of each sample in the sample set and processed by the Pareto method. The sample set includes at least two classes of samples. An interactive attention model is constructed, and each model parameter is randomly initialized with a fixed seed. Iterative training is performed based on the sample set and the category label vector. All parameters are updated using the cross-entropy loss function until the iterative training is completed. The optimal values ​​of each model parameter are obtained. Each model parameter includes a query weight matrix, a key weight matrix, a value weight matrix, a classifier weight matrix, and a classifier bias vector. Set the baseline sample vector and the number of integration steps, and generate an interpolation coefficient sequence based on the number of integration steps; For each sample in the sample set, interpolation point vectors corresponding to the sample are generated based on the baseline sample vector, the chromatographic data vector of the sample, and the interpolation coefficient sequence. The integrated gradient attribution score vector of the sample is calculated based on each interpolation point vector and the trained interactive attention model. The chromatographic data vector of the sample is the row vector corresponding to the sample in the sample matrix. The contribution score vector is obtained based on the integrated gradient attribution score vector of all samples, and each element in the contribution score vector represents the contribution of its corresponding chromatographic peak.

2. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, The integrated gradient attribution score vector of the sample is calculated based on the interpolation point vectors and the trained interactive attention model, including: For each interpolation point vector, the interpolation point vector is input into the trained interactive attention model to obtain the gradient vector of the interpolation point vector; The accumulated gradient is updated based on the gradient vector. The updated accumulated gradient is equal to the sum of the unupdated accumulated gradient and the gradient vector. The initial value of the accumulated gradient is the zero vector. Iterate through all the interpolation point vectors to obtain the final accumulated gradient; The average gradient is obtained by dividing the final accumulated gradient by the number of integration steps. The integrated gradient attribution score vector of the sample is determined based on the product of the sample difference and the average gradient, wherein the sample difference is the difference between the chromatographic data vector of the sample and the baseline sample vector.

3. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, The contribution score vector is obtained based on the integrated gradient attribution score vector of all samples, including: The cumulative contribution vector is obtained by summing the absolute values ​​of each element in the integrated gradient attribution score vector of each sample. The contribution score vector is obtained by dividing the cumulative contribution vector by the total number of samples. The value of the j-th element of the contribution score vector is used to characterize the contribution of the j-th chromatographic peak of the sample to the classification decision. The larger the element value, the more important the chromatographic peak is to the classification decision.

4. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, After obtaining the contribution score vector from the integrated gradient attribution score vector based on all samples, the following is also included: The contribution score vector is then normalized. Based on the numerical values ​​of each element in the normalized contribution score vector, the chromatographic peaks are sorted in descending order, and a ranking list of contribution peaks is output.

5. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, The cross-entropy loss function is used to update all parameters until iterative training is complete, obtaining the optimal values ​​of each model parameter, including: In each training iteration, for each sample, the gradient values ​​of each of the model parameters corresponding to that sample are obtained; For each model parameter, the gradient values ​​of all samples in the sample set are accumulated, and the model parameters are updated based on the average of the accumulated gradient values. The above training is iterated until the set number of iterations is reached, and the optimal value of each model parameter is determined based on the updated model parameters obtained from the last training.

6. The method for identifying chromatographic difference peaks based on interactive attention according to claim 5, characterized in that, For each sample, obtain the gradient values ​​of each of the model parameters corresponding to that sample, including: For each sample, the corresponding classification prediction probability is obtained based on the model forward propagation; The cross-entropy loss value of the sample is obtained based on the classification prediction probability and the category label vector; Starting with the cross-entropy loss value, the gradient values ​​of each model parameter are calculated through backpropagation.

7. The method for identifying chromatographic difference peaks based on interactive attention according to claim 6, characterized in that, For each sample, the corresponding classification prediction probability is obtained based on the model's forward propagation. The cross-entropy loss of the sample is then obtained based on the classification prediction probability and the class label vector, including: For each sample, based on the initialized model parameters and the chromatographic data vector of the sample, the query vector, key vector, and value vector of the sample are obtained, and the correlation score between the vectors is calculated. Obtain the product of the query vector and the key vector of the sample, normalize the product, and obtain the attention weight value of the sample. The feature representation of the sample is obtained by weighting and summing the value vector using the attention weight values; Based on the feature representation, sample classification calculation is performed to obtain the classification prediction probability of the sample; Based on the classification prediction probability and the category label vector, the cross-entropy loss value of the sample is obtained.

8. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, The baseline sample vector is a zero vector.

9. The method for identifying chromatographic difference peaks based on interactive attention according to claim 1, characterized in that, The interpolation coefficient sequence is a sequence of coefficients that are equally spaced on the interval [0,1], and the total number of coefficients is equal to the number of integration steps.