Multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment

By designing a multi-task collaborative attention TSK fuzzy system modeling method, the modeling problem of multi-task safety evaluation scenarios of fermented food is solved, and efficient and interpretable multi-task evaluation results are achieved.

CN119785924APending Publication Date: 2025-04-08JIANGNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411840086.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to effectively model and evaluate multi-task safety assessment scenarios for fermented foods, and lacks interpretability and difficulty in exploring potential relationships between tasks.

Method used

A multi-task collaborative attention TSK fuzzy system modeling method (MTCA_TSK) is designed, and an intelligent evaluation model with interpretability and efficient multi-task learning ability is constructed using multi-task fuzzy rule structure and a model optimization algorithm based on collaborative learning regularization.

Benefits of technology

Effective modeling of the multi-task safety assessment scenario of fermented food is realized, the interpretability of the evaluation and multi-task collaborative learning ability are improved, and the overall performance of the model on multiple tasks is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785924A_ABST
    Figure CN119785924A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of intelligent computing, and particularly relates to a multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment. The method comprises two main parts, namely a new multi-task TSK fuzzy system model structure and a multi-task collaborative optimization process. In the intelligent evaluation model, a proposed multi-task cooperative processing unit is used to carry out cooperation among a plurality of evaluation tasks, and specific information of each task and related information among the tasks are extracted by respectively utilizing a multi-task feature selection layer and a task attention structure, so that the evaluation performance of each evaluation task is better improved. In the collaborative optimization process, specific information of each task is more efficiently mined and utilized by using multi-task collaborative regularization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent computing, and in particular relates to a multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment. Technical Background

[0002] Safety assessment of fermented foods at various stages of the production process often involves diverse assessment tasks and assessment indicators. Taking rice wine as an example, the safety assessment of its production process involves assessment tasks at multiple stages, such as raw material processing (rice soaking, steaming, cooling and jar nesting), saccharification and fermentation, fermentation (pre-fermentation and post-fermentation), pressing, frying, blending, and filling. Each task may involve safety assessments of various risks such as biological pollution and chemical pollution (heavy metals, plasticizers) as well as quality assessments such as taste and flavor. For example, in the pre-fermentation stage of rice wine, the safety assessment includes the assessment of alcohol content, sugar content and acidity; in the blending and filling stages, the assessment tasks are mainly based on the sugar content, acidity, alcohol, content of higher alcohols in the wine, as well as modal data such as appearance and smell to assess the quality and grade of the wine. Many fermented food production often involves traditional processes, and human experience is sometimes required when conducting safety assessments based on test data. At present, the intelligent modeling process of fermentation food safety assessment tasks often lacks comprehensibility, and is difficult to be used to explore the potential correlations between multiple safety assessment tasks, and it is difficult to clearly construct the correspondence between various correlation factors and evaluation indicators.

[0003] Through in-depth research, we found that the current research on intelligent assessment of fermented food safety in my country is still in its infancy, with a lack of technical accumulation, and the following key technical bottlenecks need to be overcome: (1) Fermented food safety assessment often involves multiple assessment tasks in the links of raw materials, production and circulation. In addition, each assessment task even has the characteristics of multiple performance objectives. Therefore, how to propose an intelligent model modeling architecture suitable for multi-task safety assessment scenarios needs to be studied urgently. (2) The interpretability of the fermented food safety assessment process is another core demand for realizing intelligent assessment. Therefore, how to construct an interpretable reasoning mechanism for the intelligent assessment model and a multi-task collaborative learning mechanism based on this are also very important research tasks.

[0004] Regarding how to propose a multi-task collaborative learning strategy suitable for multi-task scenarios of fermented food safety assessment, existing research can be simply divided into the following categories: 1. Hard collaborative strategy: different tasks share the parameters of the underlying network, while using their own independent dedicated layers at the high level. This method is suitable for scenarios where tasks are highly correlated, but when the tasks are unrelated or conflicting, negative transfer problems may occur. 2. Soft collaborative strategy: each task has an independent network, but the parameters of different tasks are encouraged to be close to each other through regularization or constraint mechanisms. This method can flexibly handle the heterogeneity between tasks and avoid negative transfer caused by excessive sharing. However, this method has high requirements for the design of regularization and requires a deep understanding of the correlation between tasks before modeling. 3. Hybrid representation strategy of sharing and task-specific: the model learns task-shared representation and task-specific representation for each task at the same time, and improves the model performance by fusing these two representations. This method can take into account the commonalities and differences between tasks and flexibly adapt to the needs of different tasks. However, this method may make the structure and training process of the model too complicated. 4. Task relationship modeling strategy, explicitly modeling the relationship between tasks, and introducing the modeled task dependencies into the sharing strategy. This method is more flexible and interpretable, and can flexibly adjust the degree of sharing according to the task relationship. However, this method requires prior information or additional steps to learn the task relationship. In summary, the existing design of multi-task sharing strategies still faces major challenges.

[0005] There are currently two mainstream strategies for providing an interpretable reasoning mechanism for multi-task models. The first is to choose a relatively simple intrinsically interpretable model, such as a linear model, a tree-based model, and a rule-based model. The second is to use a post-hoc interpretable method, using methods such as visualization and example explanation to explain the decision-making process of the model while ensuring model performance. The TSK fuzzy system is a rule-based interpretable model with strong data-driven learning capabilities. Therefore, it has received widespread attention and has made significant progress in the multi-task field in recent years. As mentioned in the review, how to establish an efficient and transparent multi-task learning algorithm is still a challenging task. Summary of the invention

[0006] In view of the above shortcomings of the prior art, the present invention provides a multi-task collaborative attention TSK fuzzy system modeling method (MTCA_TSK) for fermented food safety assessment. The present invention mainly includes two parts: first, the present invention designs a new multi-task fuzzy rule structure as a sharing strategy between tasks to coordinate multiple safety assessment tasks, and then constructs a multi-task TSK fuzzy system model; then, the present invention designs a model optimization algorithm based on collaborative learning regularization for the multi-task TSK fuzzy system.

[0007] The technical solution of the present invention is as follows:

[0008] A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment includes the following steps:

[0009] Step 1: Identify a multi-task dataset of fermented foods for training There are K tasks, each with the same feature dimension D, and the number of samples in each task is N. k .

[0010] Step 2: According to the number of tasks and dimensions of the data set, determine the number of rules R of the TSK fuzzy system, define the basic structure of multi-task fuzzy rules, and build and initialize the MTCA_TSK model.

[0011] 2.1 Define the structure of multi-task fuzzy rules. The rule antecedent uses a set of fuzzy sets based on Gaussian membership function, and the rule consequence uses a multi-task collaborative processing unit.

[0012] The fuzzy rule antecedent output is calculated according to the following formula:

[0013]

[0014] The output of the fuzzy rule consequence is calculated according to the following formula:

[0015]

[0016] 2.2. Multi-task collaborative processing unit The structure is as follows:

[0017] Multi-tasking collaborative processing unit A multi-task feature selection layer, a task co-attention structure and a decision maker corresponding to each task are used. middle:

[0018] 2.2.1 Using the multi-task feature selection layer, the discriminant features of the input x for each task are extracted according to the following formula

[0019]

[0020] in, is a multi-task feature selection matrix, whose kth column Used to mine discriminative features for the kth task from the input x Where ⊙ is the Hadamard product. norm is the BatchNorm layer, which is used to maintain the numerical scale of the discriminative features.

[0021] 2.2.2 Using the task attention structure, extract the fusion features of each task according to the following formula:

[0022]

[0023] in, is the feature mapping matrix, which maps the discriminant features from D-dimensional space to D v dimensional target space. It is also a feature mapping matrix, D k is the feature dimension after mapping.

[0024] 2.2.3 Based on the obtained discriminant features and fusion features, the output of the multi-task processing unit is obtained according to the following formula:

[0025]

[0026] 2.3 Initializing model parameters

[0027] Determine the number of fuzzy rules R and use K-means clustering to determine the antecedent parameters of each multi-task fuzzy rule And the antecedent parameter Initialize to 1, and use uniform distribution U(0,1) to initialize all parameters in the subsequent part.

[0028] Step 3: Construct the objective function of the multi-task TSK fuzzy system and perform model optimization.

[0029] Construct the objective function of the multi-task TSK fuzzy system, the formula is as follows:

[0030]

[0031] in, is the dataset X of the kth task k Evaluation results on multi-task fuzzy systems.

[0032] 1) Item 1 To evaluate the error term, used to train the parameters of the multi-task fuzzy system.

[0033] 2) Item 2 Used to identify single features shared among multiple tasks in a single rule.

[0034] 3) Item 3 Used to study whether a single feature in a single rule is effective for a specific task.

[0035] Taking formula (7) as the objective function, the AdamW optimizer is selected to use the batch gradient descent (MBGD) method to optimize the proposed multi-task fuzzy system model to obtain the optimal solution of the model parameters.

[0036] Step 4: Obtain the final evaluation results of the multi-task TSK fuzzy system.

[0037] According to the following formula, the multi-task fuzzy system can be obtained for input x∈X k evaluation process.

[0038]

[0039] The advantages of the present invention include the following points:

[0040] 1) Different from the existing methods, the present invention proposes an intelligent assessment model named MTCA_TSK for the safety assessment of fermented foods. The model designs a multi-task fuzzy rule using a multi-task collaborative processing unit as the rule consequence. The multi-task fuzzy rule can mine its own unique information for each assessment task of fermented food and extract relevant information from other related assessment tasks, and simultaneously use it for the assessment prediction of the task. Therefore, MTCA_TSK can be effectively applied to the multi-task modeling scenario of fermented food safety assessment.

[0041] 2) The present invention uses the TSK fuzzy system as the basic model and uses interpretable multi-task fuzzy rules as the basic components, so the proposed MTCA_TSK model has strong interpretability. Therefore, the intelligent evaluation model constructed for fermented food safety assessment can have a good interpretable reasoning mechanism and can clearly provide clear and definite reasoning basis for the reasoning process of each sample.

[0042] 3) The effectiveness of this method was verified on a real fermentation dataset. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is the overall framework diagram of the multi-task TSK fuzzy system of the present invention.

[0044] Figure 2 Basic structure diagram of multi-task fuzzy rules. DETAILED DESCRIPTION

[0045] The present invention is described in detail below with reference to the accompanying drawings and embodiments:

[0046] like Figure 1-2 As shown, the present invention implements a multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment.

[0047] The method includes two main parts: a new multi-task TSK fuzzy system intelligent evaluation model and a multi-task collaborative optimization method for model optimization. In the intelligent evaluation model, the proposed multi-task collaborative processing unit is used to perform collaboration between multiple evaluation tasks, and the unique information of each task and the related information between tasks are extracted by using the multi-task feature selection layer and the task attention structure respectively, so as to better improve the evaluation performance of each evaluation task. In the collaborative optimization process, the present invention uses multi-task collaborative regularization to achieve more efficient mining and utilization of the unique information of each task.

[0048] Example 1

[0049] A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment includes the following steps:

[0050] Step 1: Determine the number of tasks K, feature dimension D, and number of samples N for each task in the training dataset k .

[0051] Step 2: Determine the number of fuzzy rules of the model and other hyperparameters in the model.

[0052] Step 3: Perform k-means clustering on the dataset and initialize the model parameters of MTCA_TSK.

[0053] Step 4: Optimize model parameters using the proposed optimization method.

[0054] Step 5: Obtain the final multi-task TSK fuzzy system model.

[0055] In Example 1, the present invention uses a glutamate fermentation process data (Glutamic Acid Fermentation Process Modeling) to construct and evaluate the model. The specific information of the data set is as follows.

[0056] Glutamic acid fermentation process dataset (abbreviated as Fermentation): The glutamate fermentation process has strong nonlinear time-varying characteristics. Its input features include fermentation time h, bacterial concentration X(h), glutamate concentration P(h), glucose concentration S(h), stirring speed R(h) and ventilation volume Q(h), where h=0,2,…,28 is the time point. The Fermentation dataset has three output variables: glucose concentration s(h+2), bacterial concentration X(h+2) and glutamate concentration P(h+2) at time point h+2. Each of its outputs is an evaluation task. Obviously, this is also a multi-task dataset containing 3 evaluation tasks.

[0057] Table 1 summarizes the evaluation results of the invented MTCA_TSK algorithm and the other six comparison algorithms. The smaller the values ​​of the evaluation indicators RMSE and RRSE, the better the performance of the model. The experiment compares the evaluation performance of each task in the Fermentation dataset and the comprehensive performance of the entire dataset. For easy observation, we mark the optimal value in each comparison data in bold. From the experimental results in Table 1, it can be observed that: (1) On the Fermentation dataset, MTCA_TSK outperforms the comparison algorithms in terms of overall performance on Fermentation, indicating that the multi-task collaboration mechanism proposed in MTCA_TSK can well handle the correlation between evaluation tasks and thus improve the overall performance of the model. (2) Observing the test results of three single-task models and four multi-task models, it can be seen that: if the multi-task model can correctly analyze the relationship between different tasks and use a reasonable information sharing strategy, the multi-task model can significantly improve the overall performance on multiple tasks. (3) The goal of the multi-task model is to improve the overall optimal result on multiple tasks. Therefore, when a multi-task model achieves the best overall performance, it may not be the best on a single task, that is, it may perform worse than some single-task models on a certain task.

[0058] Example 2

[0059] The present invention continues to analyze the effectiveness of the proposed task attention mechanism and the collaborative regularization method. The MTCA_TSK without the task attention mechanism is called MTCA_TSK1, and the MTCA_TSK without the collaborative regularization is called MTCA_TSK2. The comparative experiments of the three algorithms are summarized in Table 2.

[0060] The results in Table 2 show that MTCA_TSK outperforms MTCA_TSK1 and MTCA_TSK2. At the same time, in most tasks, MTCA_TSK2 outperforms MTCA_TSK1. These comparison results show that the proposed task attention mechanism can effectively promote information exchange between tasks, thereby improving the prediction performance of the model. In addition, the introduction of the collaborative regularization method can well assist the discriminative feature learning of each task, thereby significantly improving the overall performance of the multi-task model.

[0061] Table 1 Performance comparison of different algorithms on the Fermentation dataset (mean ± variance)

[0062]

[0063] Table 2 Comparison results of MTCA_TSK1, MTCA_TSK2 and MTCA_TSK on the Fermentation dataset (mean ± variance)

[0064]

Claims

1. A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment, characterized in that: The following steps are involved: Step 1: Identify a multi-task dataset of fermented foods for training The number of tasks K, the feature dimension D, and the number of samples N for each task k ; Step 2: According to the number of tasks and dimensions of the data set, determine the number of rules of the TSK fuzzy system, define the basic structure of multi-task fuzzy rules, and build and initialize the MTCA-TSK model; Step 2.1 Define the structure of multi-task fuzzy rules: The rule antecedent uses a set of fuzzy sets based on Gaussian membership function, and the rule consequent uses a multi-task collaborative processing unit. The fuzzy rule antecedent output is calculated according to the following formula: The output of the fuzzy rule consequence is calculated according to the following formula: Step 2.2 Multi-task collaborative processing unit The structure is as follows: Multi-tasking collaborative processing unit A multi-task feature selection layer, a task co-attention structure, and a decision maker corresponding to each evaluation task are used; Step 2.3 Initialize model parameters Determine the number of fuzzy rules R and use K-means clustering to determine the antecedent parameters of each multi-task fuzzy rule And the antecedent parameter Initialize to 1, and use uniform distribution U(0,1) to initialize all parameters in the subsequent part; Step 3: Construct the objective function of the multi-task TSK fuzzy system and optimize the model; Step 4: Obtain the final prediction results of the multi-task TSK fuzzy system.

2. A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment as claimed in claim 1, characterized in that: The specific operation of the third step is as follows: Construct the objective function of MTCA_TSK, the formula is as follows: in, is the dataset X of the kth task k Evaluation results on MTCA_TSK; Taking formula (3) as the objective function, the AdamW optimizer is selected to use the batch gradient descent (MBGD) method to optimize the proposed MTCA_TSK model and obtain the optimal solution of the model parameters.

3. A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment as claimed in claim 1, characterized in that: The specific operation of the fourth step is as follows: The prediction process of the MTCA_TSK model for input x is obtained according to the following formula:

4. A multi-task collaborative attention TSK fuzzy system modeling method for fermented food safety assessment as claimed in claim 1, characterized in that: In step 2.2, the specific operations are as follows: In multi-tasking collaborative processing unit middle: Step 2.2.1 Use the multi-task feature selection layer to extract the discriminant features of the input x for each task according to the following formula in, is a multi-task feature selection matrix, whose kth column Used to mine discriminative features for the kth task from the input x Where ⊙ is the Hadamard product; norm is the BatchNorm layer, which is used to maintain the numerical scale of the discriminant features; Step 2.2.2 uses the task attention structure to extract the fusion features of each task according to the following formula: in, is the feature mapping matrix, which maps the discriminant features from D-dimensional space to D v dimensional target space; It is also a feature mapping matrix, D k is the feature dimension after mapping; Step 2.2.3 Based on the obtained discriminant features and fusion features, the decision maker of the multi-task processing unit for each evaluation task can be expressed as follows: