Method for simultaneously identifying multiple psychological risk factors of pilot based on multi-task learning
By recording gradient conflicts in multi-task learning and transforming high-conflict layers, combined with the loss logarithmic transformation strategy, the problems of negative migration and gradient conflict in the identification of pilot psychological risk factors are solved, and the accurate identification and performance improvement of multiple psychological risk factors are achieved. , ensuring flight safety.
Patent Information
- Application Number
- CN202410959685.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-15
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-01
AI Technical Summary
The existing multi-task learning method has negative transfer problems in the identification of pilot psychological risk factors, which leads to the difference in private features hindering performance improvement when the model learns common characteristics of different tasks, and the gradient conflict and learning speed are inconsistent during the optimization process, which is difficult to Achieve accurate identification of multiple psychological risk factors.
By recording the gradient conflict situation of the shared layer during the training process, the high-conflict layer is transformed into a task-specific layer, and a loss logarithmic transformation strategy is adopted to reduce the difference in loss scale and learning speed of different tasks, so as to achieve the separation of common features and private features. study.
It effectively improves the identification performance of multiple psychological risk factors, avoids performance degradation caused by differences, realizes the accurate identification of multiple psychological risk factors for pilots, and ensures flight safety.
Smart Images

Figure CN118873141A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of physiological signal recognition, and in particular to a method for simultaneously recognizing multiple psychological risk factors of pilots based on multi-task learning. Background Art
[0002] Safety is the lifeline of the civil aviation industry. According to a survey by the International Air Transport Association (IATA), 80-90% of flight accidents are caused by human factors. Among human factors, psychological risk factors are the most difficult to detect due to their concealment and subjectivity. Therefore, if the psychological risk factors of pilots can be effectively identified, the pilot's driving performance can be effectively guaranteed, and flight safety can be further guaranteed.
[0003] In the actual flight driving and flight training process of pilots, what needs to be paid attention to is often not isolated single psychological risk factors, but a set of psychological risk factors that characterize the pilot's current psychological risk state from multiple dimensions. Specifically, when pilots are conducting simulated flight training and actual flight driving, whether there is mental pressure due to lack of confidence in the correctness and accuracy of operations, whether there is reduced alertness due to long-term flight or training, whether there are emotions such as doubts and panic caused by unexpected special situations that do not conform to the expected flight process, whether there is mental fatigue caused by the imbalance between training and study life, and other psychological states and psychological stress risk factors that may affect flight safety are all different dimensions of psychological risks that are concerned in the application. Therefore, when using a physiological signal sample to identify multiple factors in the psychological risk factor set, it is more meaningful to make good use of the common characteristics of different psychological risk factors contained in the sample to learn complementarity than to train multiple models in isolation.
[0004] Since the common features of different tasks can be used to complement each other and differentiate private features to improve the generalization ability and prediction accuracy of the model, the multi-task learning (MTL) framework is usually used in the above task scenarios to achieve this requirement by sharing parameters between models of different tasks. Multi-task learning can achieve better performance than learning each task separately while keeping the overall model size small, while meeting both efficiency and accuracy.
[0005] However, when multi-task learning methods learn through complementary learning of different tasks, the differences between different tasks lead to the main challenge of multi-task learning - negative transfer. Although the common features between different tasks are easier to be learned by the model when multiple tasks are learned together, the differentiated information between different tasks will also hinder the model's learning of common parameters. That is, the model may cause the performance of other tasks to decline due to learning the private features of a specific task, and the overall performance may even be worse than learning alone. Specifically, this task conflict situation is mainly reflected in the conflicting gradients that may appear in the optimization process, that is, the gradients of the two tasks point to different directions, and the update of one task will have a negative impact on the other task. On the other hand, the scale of the training gradients of different tasks is also inconsistent, resulting in different learning speeds of different tasks during the training process. Task gradients with larger magnitudes may dominate the update vector, causing the optimization process to prioritize certain specific tasks instead of treating all tasks with equal importance, and ultimately it is difficult to converge to an ideal solution.
[0006] Existing multi-task learning research has not taken into account the field of psychological risk factor identification for pilots. Therefore, it is necessary to design a method that can learn different factors complementary to each other while avoiding the negative impact caused by negative transfer, that is, a method for simultaneously identifying multiple psychological risk factors for pilots based on multi-task learning, based on the commonalities and differences of different psychological risk factors. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention proposes a method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning. The method utilizes the strategy of high-conflict layer task specification to realize the separation learning of common characteristics and private characteristics of psychological risk factors, and adopts loss logarithmic transformation to reduce the difference in loss scale and loss change speed of learning tasks of different factors, so as to improve the recognition performance.
[0008] The technical solution adopted by the present invention is:
[0009] A method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning comprises the following steps:
[0010] Step S1: Based on several preset identification tasks about pilot psychological risks, train the preset conflict model f c , and record the conflict model f in each training iteration round c The gradient conflict situation of each shared layer, where the gradient conflict situation of the shared layer is the sum of the gradient conflict intensities of all tasks with gradient conflicts in this training iteration round; the gradient conflict intensity is represented by the cosine value of the angle between the gradient vectors of the two tasks. When the cosine value is less than 0, it means that there is a gradient conflict. The larger the absolute value of the cosine value, the stronger the gradient conflict.
[0011] Step S2: Calculate the conflict model f c The sum of the gradient conflict intensities accumulated in all iterations of each shared layer in the gradient conflict severity c is obtained. (l) , and the first K largest c (l) The corresponding shared layer is converted into a task-specific layer (i.e., different tasks do not use shared parameters in this layer of the model), and the model f is obtained, where K is a preset value;
[0012] Step S3: Initialize the parameters of model f and train the transformed model f using the loss logarithmic transformation strategy:
[0013] Step S4: input the pilot's real-time ECG data into the trained multi-task model f to obtain the pilot's multiple psychological risk factor identification results.
[0014] Furthermore, the conflict model f c It is a deep neural network with ResNet as the backbone network.
[0015] Furthermore, the conflict model f c The feature extraction network part is used as a shared layer.
[0016] Furthermore, in step S1, based on a number of preset identification tasks about pilot psychological risks, the conflict model f is trained by the cross entropy loss function. c For each task in the model, the total loss is the sum of the losses of each task; that is, the conflict model f c The feature extraction network extracts features from the collected pilot's ECG data signals, and then inputs the extracted signal features into the classifiers corresponding to each task, and obtains the recognition and prediction results of the corresponding tasks based on the outputs of the corresponding classifiers.
[0017] Furthermore, in step S1, in the conflict model f c During the training process, the gradients of each shared layer of all tasks are recorded Among them, g t (l) is the task gradient of task t in the shared layer l, L represents the number of shared layers, and T represents the number of tasks;
[0018] Calculate the gradient conflict intensity between any two tasks in each shared layer layer by layer, and accumulate the gradient conflict severity of the shared layer l in, is the gradient vector angle between any two tasks i and j.
[0019] Furthermore, the loss logarithmic conversion strategy in step S3 is specifically:
[0020] definition Represents the classification loss of task t, then according to the formula Calculate the total loss of the trained converted model f, where T represents the number of tasks.
[0021] The technical solution provided by the present invention brings at least the following beneficial effects:
[0022] When it is necessary to simultaneously identify multiple psychological risk factors of pilots, the present invention can make full use of the common characteristics of different psychological risk factor tasks to improve the performance of psychological risk factor identification, while avoiding the problem of performance degradation caused by differences in different tasks, thereby achieving simultaneous and effective accurate identification of multiple psychological risk factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A process diagram of a method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in detail and completely in conjunction with the drawings in the implementation of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present invention.
[0026] The embodiment of the present invention discloses a method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning. The method first explores the model layer where gradient conflicts mainly occur during the learning process of multiple psychological risk factor tasks in the process of training the conflict model, and converts the layer with the most serious gradient conflict into a task-specific layer to avoid the differences between factors inhibiting each other's learning when different factors are learned; then, the converted model is retrained, and the loss logarithmic transformation strategy is used to reduce the loss scale difference and loss learning speed difference between different psychological risk factor learning tasks, so that multiple tasks can be learned simultaneously. The present invention is targeted at the simultaneous identification of multiple psychological risk factors for pilots in flight scenarios, so that different psychological risk factor identification tasks can be learned complementary, and more accurate and efficient psychological risk factor identification is achieved, ensuring the flight safety of pilots in simulated flight training and actual flight scenarios.
[0027] As a possible implementation, see Figure 1 The specific implementation steps of the method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning provided by the embodiment of the present invention include:
[0028] Step S1, training conflict model f c , and record the gradient conflict of each shared layer (i.e. the network layer shared during the conflict model training and the inference model training, usually the feature extraction part) in each training iteration round;
[0029] In this embodiment, the conflict model f c is a deep learning model whose backbone network is ResNet; preferably, the conflict model f c The network structure can adopt ResNet-18.
[0030] Specifically, the model f is trained by cross entropy loss c Several tasks with thresholds in (pilot psychological risk classification tasks considering different factors), where the cross entropy loss is: n represents the number of samples involved in training, I(i=y i ) represents an exponential function. If the predicted result is consistent with the true label, the function value is 1, otherwise it is 0; f i is the extracted sample feature, p() represents the classification probability of the current task output by the model, and the total loss of the model is the sum of the losses of each task, that is, T represents the number of tasks.
[0031] The gradient conflict of the shared layer is the sum of the gradient conflict intensities of all tasks with gradient conflicts in this training iteration. The gradient conflict intensity is represented by the cosine value of the angle between the gradient vectors of two tasks. When the cosine value is less than 0, there is a gradient conflict. The larger the absolute value of the cosine value, the stronger the gradient conflict.
[0032] Specifically, the gradients of all tasks in each shared layer are recorded during training. g t (l) The task gradient of task t in the lth shared layer is defined as L, and the number of tasks is T. The gradient conflict between any two tasks in the layer is calculated layer by layer and summed up to get the severity of the gradient conflict of all shared layers in the current iteration round. c (l) is the severity of the gradient conflict of the lth shared layer, is the gradient vector angle between any two tasks i and j. In this embodiment, there are three tasks, including the pilot's emotional state, mental stress and mental fatigue.
[0033] Step S2: Calculate the conflict model f c The sum of the severity of the gradient conflicts accumulated in all iterations of each shared layer in (l) , and transform the K layers with the highest gradient conflict severity into task-specific layers to obtain the model f:
[0034] Specifically, the gradient conflicts in each iteration round recorded in step S1 are used to calculate c (l) , that is, I is the number of iterative training;
[0035] Task-specific layers mean that different tasks do not use shared parameters in this layer of the model. K layers are transformed into task-specific layers, that is, the parameters of these K model layers are task-specific, and the parameters obtained by training different tasks are different;
[0036] In this embodiment, the value of K is 5.
[0037] Step S3: Initialize the parameters of model f and train the transformed model f using the loss logarithmic transformation strategy:
[0038] The loss logarithm conversion strategy is to calculate the sum of the logarithms of all task losses when calculating the model loss, that is,
[0039] Specifically, the loss of each task is the cross entropy loss
[0040] Step S4: Input the pilot's real-time ECG data x into the trained multi-task model f to obtain the pilot's multiple psychological risk factor recognition results r(x):
[0041] Specifically, the multiple psychological risk factor identification results include m results, namely r(x) = [r1(x), r2(x), ..., rm (x)];
[0042] In this embodiment, the multiple psychological risk factor identification results include three results, namely, emotional state identification results, mental stress identification results, and mental fatigue identification results.
[0043] In the embodiment of the present invention, Figure 1 It shows how to learn task-specific private features based on the high-conflict layer specific strategy. It is assumed that the parameters of the feature extractor part of the model are shared by all tasks (such as the three classification tasks of the pilot's emotional state, mental stress and mental fatigue in this embodiment) in the initial state, that is, only the common features between tasks are learned in the initial state, including the negative impact of all gradient conflicts on task learning. Assume that the model contains a total of L layers, where any convolutional layer, pooling layer, batch normalization layer and activation layer are regarded as a network layer in the model. In this embodiment of the present invention, there are three tasks involved, and each task T i The gradient of the common parameters of the lth layer can be expressed as g i (l) ,use Represents task T i The gradient of the layer parameters and the task T at layer l j The gradient g of the layer l with respect to the layer parameters i (l) The angle between The smaller it is, the stronger the conflict is. After I iterations, the cumulative conflict levels of each layer are sorted, and the largest K (for example, 5) layers are selected as task-specific layers, and finally the model is inferred and trained. However, in the actual model training process, the loss magnitudes of different tasks are different, and the speed of change of different losses is also different. Since the losses of multiple psychological risk factors are considered at the same time, the difference in loss scale and learning speed of different factors may cause the learning process to be dominated by psychological risk factors with large loss scales, and the optimization process tends to lose psychological risk factors with large changes. In the end, multiple psychological risk factors cannot converge to the ideal situation together. Since the conflict model in the high-conflict layer specification strategy aims to explore the frequency of gradient conflicts at different model levels, the logarithmic transformation of the loss may affect the performance of gradient conflicts. Therefore, the loss is not transformed during the conflict model training process; while in the inference model training process, the model loss changes to: in, The total loss of the model, is the classification loss for task t.
[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0045] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for simultaneously identifying multiple psychological risk factors of pilots based on multi-task learning, characterized in that: The following steps are involved: Step S1: Based on several preset identification tasks about pilot psychological risks, train the preset conflict model f c , and record the conflict model f in each training iteration round c The gradient conflict situation of each shared layer, where the gradient conflict situation of the shared layer is the sum of the gradient conflict intensities of all tasks with gradient conflicts in this training iteration round; the gradient conflict intensity is represented by the cosine value of the angle between the gradient vectors of two tasks, and when the cosine value is less than 0, it means that there is a gradient conflict; Step S2: Calculate the conflict model f c The sum of the gradient conflict intensities accumulated in all iterations of each shared layer in the gradient conflict severity c is obtained. (l) , and the first K largest c (l) The corresponding shared layer is transformed into a task-specific layer to obtain the model f, where K is a preset value; Step S3: Initialize the parameters of model f and train the transformed model f using the loss logarithmic transformation strategy: Step S4: input the pilot's real-time ECG data into the trained multi-task model f to obtain the pilot's multiple psychological risk factor identification results.
2. The method according to claim 1, characterized in that Conflict Model c It is a deep neural network with ResNet as the backbone network.
3. The method according to claim 1, characterized in that The conflict model f c The feature extraction network part is used as a shared layer.
4. The method according to claim 1, characterized in that In step S1, based on several preset identification tasks about pilot psychological risks, the conflict model f is trained by the cross entropy loss function. c For each task in the model, the total loss is the sum of the losses of each task; For each pilot psychological risk identification task, the conflict model f c The feature extraction network extracts features from the collected pilot's ECG data signals, and then inputs the extracted signal features into the classifier corresponding to each recognition task, and obtains the recognition prediction result of the corresponding task based on the output of the corresponding classifier.
5. The method according to claim 1, characterized in that In step S1, in the conflict model f c During the training process, the gradients of each shared layer of all tasks are recorded Among them, g t (l) is the task gradient of task t in the shared layer l, L represents the number of shared layers, and T represents the number of tasks; Calculate the gradient conflict intensity between any two tasks in each shared layer layer by layer, and accumulate the gradient conflict severity of the shared layer l in, is the gradient vector angle between any two tasks i and j.
6. The method according to claim 1, characterized in that The loss logarithmic transformation strategy in step S3 is specifically: definition represents the classification loss of task t, then according to the formula Calculate the total loss of the trained converted model f, where T represents the number of tasks.
7. The method according to claim 1, characterized in that Conflict Model c Set to ResNet-18.
8. The method according to claim 7, characterized in that The value of parameter K is set to 5.
