A new user behavior identification method and system based on transfer learning

By combining knowledge distillation and temperature scaling techniques in new user behavior recognition, soft labels are generated and training data sets are expanded, the shortcomings of existing transfer learning methods in individual differences capture and generalization capabilities are solved, and more efficient new user behavior recognition performance is achieved.

CN119397285BActive Publication Date: 2025-05-02NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510008279.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-05-02
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

The existing transfer learning methods are difficult to fully capture inter-individual differences in new user behavior recognition, resulting in limited generalization capabilities of the model and possible negative transfer.

Method used

Combining knowledge distillation technology, soft labels are generated using teacher models, and probability distribution is adjusted through temperature scaling technology to improve the training method of student models. At the same time, self-training and consistency regularization methods are adopted to generate labels and extend the training dataset.

Benefits of technology

It improves the generalization ability of the model when facing unseen data, alleviates negative migration, reduces the risk of overfitting, and improves the performance of new user behavior recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397285B_ABST
    Figure CN119397285B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for identifying new user behavior based on transfer learning, the method comprising: training a teacher model using a labeled data set of a source domain, the teacher model being used to identify user behavior in the source domain; generating pseudo labels for unlabeled data in a target domain based on the teacher model; training a student model using the labeled data of the source domain and unlabeled data in the target domain with pseudo labels; and identifying the behavior pattern of the new user based on the trained student model. The student model of the present invention can more easily learn subtle signals that contribute to correct classification from the teacher model, and helps the model learn more generalized feature representations, rather than over-relying on the model's knowledge of specific tasks, so as to reduce the negative transfer phenomenon that may occur during direct transfer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of perception recognition technology, and specifically relates to a new user behavior recognition method and system based on transfer learning. Background Art

[0002] With the advancement of human behavior recognition technology and the continuous expansion of its application scope, it is particularly important to build a model that can adapt to individual differences. In the field of human behavior recognition, the ability of the model to effectively predict on unknown data has important practical significance.

[0003] In order to train a human behavior recognition model for a specific user, a large amount of labeled data from different users must be collected. However, differences in individual behavior patterns and sensor wearing locations may lead to significant differences in data distribution. For example, when performing the same behavior, different individuals may have different movement angles and speeds, which may lead to significant differences in the data recorded by the sensor, further making the collection of labeled data time-consuming and costly. However, it is relatively easy to collect a large amount of unlabeled data from new users. Therefore, how to accurately identify behavior patterns in the unlabeled data of new users becomes a key point of research.

[0004] In current research, transfer learning enables the model to utilize labeled data from other tasks or users, reducing the reliance on a large amount of labeled data for new users. Therefore, transfer learning has gradually become a popular method in the field of new user behavior recognition. By transferring the knowledge of existing models to new user behavior recognition tasks, transfer learning can significantly reduce the amount of data required, thereby significantly reducing the cost of model training. However, most transfer learning methods rely mainly on the knowledge of the source task to improve the performance on the target task. However, if there are large differences between the source task and the target task, for example, due to significant differences in behavior patterns, physiological characteristics, and usage habits between users, traditional transfer learning models may fail to fully capture these individual differences, making it difficult to meet the personalized needs of all users, thereby limiting the generalization ability of the model. In addition, transfer learning may sometimes lead to negative transfer, that is, the performance of the model on the target user is reduced due to the transfer process. This may be due to the model overfitting the characteristics of the source user data while ignoring the specific characteristics of the target task. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention provides a new user behavior recognition method and system based on transfer learning, which uses the transfer learning method to improve the performance of new user behavior recognition. The present invention combines knowledge distillation technology to enable the model to learn a smoother and more generalized prediction distribution from the target domain. Compared with traditional transfer learning, the model is usually trained with hard labels, that is, the label of each sample is a certain category. The student model in knowledge distillation is trained not only with hard labels, but also with soft labels output by the teacher model, which helps to improve the generalization ability of the model when facing unseen data.

[0006] In addition, through the temperature scaling technology in knowledge distillation, the probability distribution of the teacher model output can be adjusted to make the difference between different categories smaller, that is, the probability distribution is smoother. In this way, the student model can more easily learn those subtle signals from the teacher model that help correct classification. This method helps the model learn more general feature representations, rather than over-relying on the model's knowledge of specific tasks, to reduce the negative transfer phenomenon that may occur during direct transfer.

[0007] The present invention can also significantly expand the training data set by automatically generating labels for unlabeled data without additional labor costs. By training on a large amount of unlabeled data, the generalization ability of the model is further improved and the risk of overfitting is reduced. Consistency regularization is introduced in the distillation loss by adding noise to the input data and requiring the model to produce consistent predictions for the input before and after the change.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] A new user behavior recognition method based on transfer learning, the method comprising:

[0010] A teacher model is trained using a source data set of a source domain, the teacher model is used to identify user behavior in the source domain, and the source data set is a labeled data set; the method of training the teacher model using the source data set of the source domain includes: enhancing data in the source data set to form a weakly enhanced data set; merging the source data set with the weakly enhanced data set to form a merged data set; using a hard label set of the source data set on the merged data set; and training the teacher model by minimizing the teacher cross entropy loss;

[0011] Based on the teacher model, a soft label is generated for a target data set, and the target data set is an unlabeled data set; the soft label is generated for the target data set based on the teacher model, including: based on the teacher model, predicting the target data set to generate a soft label for each sample; ranking the samples in each category according to the prediction confidence; in each category, selecting samples with confidence greater than a preset confidence threshold as soft label data to form a filtered target data set and a filtered teacher target soft label set; and, using a sensor signal transformation function, enhancing the filtered target data set to form a strongly enhanced filtered target data set;

[0012] The student model is trained using the source data set and the target data set with soft labels; including: using the student model to predict the source data set to generate a first soft label set; forming a student loss with the generated first soft label set and the hard label set; using the student model to predict the strongly enhanced filtered target data set to generate a second soft label set; forming a distillation loss with the generated second soft label set and the filtered teacher target soft label set; and using the weighted sum of the student loss and the distillation loss as a loss function to guide the training of the student model;

[0013] and identifying the behavior pattern of the new user based on the trained student model;

[0014] Further, the sensor signal transformation function is three continuous sensor signal transformation functions, including adding random Gaussian noise, applying random 3D rotation and inverting input signal values.

[0015] Further, the generating the first soft label set and the hard label set to form a student loss comprises calculating the teacher cross entropy loss using the hard label set and the first soft label set;

[0016] The generating the second soft label set and the filtering teacher target soft label set to form a distillation loss includes calculating a KL divergence loss using the second soft label set and the filtering teacher target soft label set.

[0017] Furthermore, the loss function is:

[0018] ;

[0019] in, is the teacher cross entropy loss function; represents the KL divergence loss function, which obtains the data after applying consistency regularization to the source data set , and Input the predictions of the student model The soft labels predicted by the teacher model for the target dataset The matching distance between The parameters of the teacher model are ; 1 and λ 2 is a hyperparameter that needs to be adjusted, which is used to balance the teacher cross entropy loss and KL divergence loss, and λ 1 +λ 2 =1.

[0020] Furthermore, the function of the teacher cross entropy loss is:

[0021] ;

[0022] in, is the merged dataset, Indicates the behavior category label; Denotes the parameter of the teacher model as θ, Indicates in the window The behavior label is Its value is 1 when it is, otherwise it is 0; is the prediction window The label is probability.

[0023] A system for implementing the new user behavior identification method based on transfer learning as described above comprises:

[0024] A teacher model, wherein the teacher model is trained using a source data set of a source domain, and the teacher model is used to identify user behaviors in the source domain, and the source data set is a labeled data set;

[0025] A soft label generation module, used to generate a soft label for a target data set based on the teacher model, wherein the target data set is an unlabeled data set;

[0026] A student model, wherein the student model is trained using the source data set and a target data set with soft labels;

[0027] and a recognition module for recognizing the behavior pattern of the new user based on the trained student model.

[0028] The present invention can combine knowledge distillation technology on the basis of transfer learning to learn more generalized prediction distribution. In addition, the self-training method and consistency regularization method are used in the training process to enable the model to learn more robust features and further improve the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but do not constitute an improper limitation of the present invention. In the drawings:

[0030] Figure 1 The overall structure of the system of the present invention is shown in FIG. Figure 1 ;

[0031] Figure 2 The process of the method of the present invention is shown in FIG. Figure 1 ;

[0032] Figure 3 is a schematic diagram of a teacher model of the system of the present invention;

[0033] Figure 4 The process of the method of the present invention is shown in FIG. Figure 2 ;

[0034] Figure 5 A schematic diagram of a label generation module of the system of the present invention;

[0035] Figure 6 The process of the method of the present invention is shown in FIG. Figure 3 ;

[0036] Figure 7 is a schematic diagram of a student model of the system of the present invention;

[0037] Figure 8 The process of the method of the present invention is shown in FIG. Figure 4 ;

[0038] Fig. 9 The overall structure of the system of the present invention is schematically shown Figure 2 . DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0040] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms and the like is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device, element, module, system, platform or device referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. The following description of the present invention is only understood as a description of individual embodiments of the technical solution of the present invention. Other embodiments are not reflected in the following description, but it does not mean that the present invention excludes these other embodiments, and the technical solution of the present invention is not limited to the specific implementation methods described below, and the protection scope of the present invention is not limited to only the specific implementation methods described below. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should belong to the scope of protection of the present invention.

[0041] It should be noted that if the terms "first", "second", etc. appear in the specification and claims of the present invention and the above-mentioned drawings, the description is only used to distinguish similar objects, and is not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0042] In some embodiments, the algorithm pipeline of the present invention includes three parts: teacher model training, label generation, and student model training. Figure 1 shown.

[0043] Teacher model training: In this stage, an efficient supervised learning model, called the teacher model, is trained using the labeled dataset of the source domain. The model aims to learn an accurate decision function to accurately identify user behaviors in the source domain. Since the model is trained on rich labeled data, it is usually able to capture the key features and patterns of the behavior recognition task.

[0044] Label generation: In the second stage, the teacher model is used to generate soft labels for the unlabeled dataset of the target domain. Although these soft labels may not be completely accurate, they provide preliminary category information for the target domain data. This process is achieved by thresholding the model's predicted probabilities, and a soft label is only generated when the confidence of the prediction exceeds a certain threshold.

[0045] Student model training: Finally, the new model constructed, the student model, aims to imitate the behavior of the teacher model. The student model uses both the labeled data of the source domain and the target domain data with soft labels, and learns useful knowledge from the teacher model through knowledge distillation and transfer learning techniques. The training goal of the student model is to minimize the difference between its prediction and the prediction of the teacher model and ensure good performance on the target domain data with pseudo labels.

[0046] In some embodiments, Figure 1 and Figure 2 As shown, a new user behavior recognition method based on transfer learning includes:

[0047] S1: Using a source data set in a source domain to train a teacher model, the teacher model is used to identify user behaviors in the source domain, and the source data set is a labeled data set;

[0048] S2: Generate soft labels for a target data set based on the teacher model, where the target data set is an unlabeled data set;

[0049] S3: training a student model using the source data set and the target data set with soft labels;

[0050] S4: Based on the trained student model, identify the behavior pattern of the new user.

[0051] In some embodiments, Figure 3 and Figure 4 As shown, the step S1 of training the teacher model using the source data set of the source domain includes:

[0052] S11: enhancing the data in the source data set to form a weakly enhanced data set;

[0053] Specifically, eight signal transformations are applied to the source data set to enhance the source data to form a weakly enhanced data set. The eight signal transformations can be adding random Gaussian noise, scaling the signal by a random factor, applying random 3D rotation, reversing the time direction of the input signal, negating the input signal value, distorting the signal, randomly adjusting the channel, and randomly perturbing the time series signal.

[0054] S12: merging the source data set and the weakly enhanced data set to form a merged data set;

[0055] This combined dataset is 9 times larger and contains copies of the original data and each of its transformations, which provides richer data for end-to-end training.

[0056] S13: Using the hard label set of the source dataset on the merged dataset; S14: Training the teacher model by minimizing the teacher cross entropy loss.

[0057] This supervised learning process enables the model to capture key features relevant to action recognition and maintain the stability of its predictions in the face of data transformations.

[0058] In some embodiments, Figure 5 and Figure 6 As shown, the step S2 of generating a soft label for the target data set based on the teacher model includes:

[0059] S21: Based on the teacher model, predict the target data set and generate a soft label for each sample;

[0060] S22: Rank the samples in each category according to the prediction confidence;

[0061] S23: In each category, select samples whose confidence is greater than a preset confidence threshold as soft label data to form a filtered target data set and a filtered teacher target soft label set.

[0062] Generating soft labels in a self-training manner can serve as a reinforcement mechanism to continuously update and adjust the model's understanding of uncertain or difficult-to-classify samples, promoting gradual learning and improvement of the model. Soft labels help the student model generalize to new user data more effectively, especially when the behavior patterns of these users are slightly different from those in the training data. The advantage of generating soft labels is that they provide richer information than hard labels, especially when the teacher model has uncertainty in its predictions for certain samples, allowing the student model to learn the uncertainty differences between data points, which is particularly important for dealing with ambiguous or overlapping categories.

[0063] In some embodiments, Figure 5 and Figure 6 As shown, the method generates soft labels for unlabeled data in the target domain based on the teacher model, and further includes:

[0064] S24: Using the sensor signal transformation function, the filtered target data set is enhanced to form a strongly enhanced filtered target data set.

[0065] Adding random rotations, noise, and negative values ​​to sensor data can learn representations that are invariant to sensor heterogeneity, orientation position, and offset variance, potentially capturing cross-domain data distribution differences to some extent. By using the transformed dataset for training the student model, feature representations that are insensitive to these perturbations can be learned.

[0066] In some embodiments, the sensor signal transformation function is three consecutive sensor signal transformation functions including adding random Gaussian noise, applying random 3D rotation, and inverting input signal values.

[0067] In some embodiments, Figure 7 and Figure 8 As shown, the step S3 of training the student model using the source data set and the target data set with soft labels includes:

[0068] S31: Use the student model to predict the source data set to generate a first soft label set;

[0069] S32: The generated first soft label set and the hard label set form a student loss;

[0070] S33: using the student model to predict the strongly enhanced filtered target data set to generate a second soft label set;

[0071] S34: forming a distillation loss with the generated second soft label set and the filtered teacher target soft label set;

[0072] S35: Using the weighted sum of the student loss and the distillation loss as the loss function to guide the training of the student model.

[0073] The student model is trained using a transfer learning setting similar to the one used in the previous section. The encoder of the teacher model is frozen and transferred to the student model. The classifier head of the student model is fine-tuned. Through this process, the student model is aligned with the target domain distribution of the new user while retaining the useful feature extraction layers in the early stages of the model. Therefore, the student model needs to be trained by jointly optimizing two different loss terms.

[0074] In some embodiments, the generated first soft label set and the hard label set form a student loss, including calculating the teacher cross entropy loss using the hard label set and the first soft label set; the student loss promotes the student model to master the classification task learned by the teacher model.

[0075] The generating the second soft label set and the filtering teacher target soft label set to form a distillation loss includes calculating a KL divergence loss using the second soft label set and the filtering teacher target soft label set.

[0076] In some embodiments, the loss function is:

[0077] ;

[0078] in, is the teacher cross entropy loss function; represents the KL divergence loss function, which obtains the data after applying consistency regularization to the source data set , and Input the predictions of the student model The soft labels predicted by the teacher model for the target dataset The matching distance between The parameters of the teacher model are ; 1 and λ 2 is a hyperparameter that needs to be adjusted, which is used to balance the teacher cross entropy loss and KL divergence loss, and λ 1 +λ 2 =1.

[0079] In some embodiments, the function of the teacher cross entropy loss is:

[0080] ;

[0081] in, is the merged dataset, Indicates the behavior category label; Denotes the parameter of the teacher model as θ, Indicates in the window The behavior label is Its value is 1 when it is, otherwise it is 0; is the prediction window The label is probability.

[0082] In some embodiments, Figure 1 , 3 As shown in , 5, 7 and 9, the present invention also provides a system 1 for implementing the new user behavior identification method based on transfer learning as described above, comprising:

[0083] A teacher model 11, wherein the teacher model is trained using a source data set of a source domain, and the teacher model is used to identify user behaviors in the source domain, and the source data set is a labeled data set;

[0084] A soft label generation module 12, used to generate a soft label for a target data set based on the teacher model, wherein the target data set is an unlabeled data set;

[0085] A student model 13, wherein the student model is trained using the source data set and the target data set with soft labels;

[0086] And an identification module 14 is used to identify the behavior pattern of the new user based on the trained student model.

[0087] Optionally, specific examples in the present invention may refer to the examples described in the above embodiments and optional implementation modes.

[0088] The specific embodiments of the present invention described above are for description only and do not represent the advantages or disadvantages of the embodiments.

[0089] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0090] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the system embodiments described above are only exemplary, for example, multiple devices can be combined or integrated into another system, or some features can be ignored or not executed.

[0091] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A new user behavior identification method based on transfer learning, characterized in that: The method includes: A teacher model is trained using a source data set of a source domain, the teacher model is used to identify user behavior in the source domain, and the source data set is a labeled data set; the method of training the teacher model using the source data set of the source domain includes: enhancing data in the source data set to form a weakly enhanced data set; merging the source data set with the weakly enhanced data set to form a merged data set; using a hard label set of the source data set on the merged data set; and training the teacher model by minimizing the teacher cross entropy loss; Based on the teacher model, a soft label is generated for a target data set, and the target data set is an unlabeled data set; the soft label is generated for the target data set based on the teacher model, including: based on the teacher model, predicting the target data set to generate a soft label for each sample; ranking the samples in each category according to the prediction confidence; in each category, selecting samples with confidence greater than a preset confidence threshold as soft label data to form a filtered target data set and a filtered teacher target soft label set; and, using a sensor signal transformation function, enhancing the filtered target data set to form a strongly enhanced filtered target data set; The student model is trained using the source data set and the target data set with soft labels; including: using the student model to predict the source data set to generate a first soft label set; forming a student loss with the generated first soft label set and the hard label set; using the student model to predict the strongly enhanced filtered target data set to generate a second soft label set; forming a distillation loss with the generated second soft label set and the filtered teacher target soft label set; and using the weighted sum of the student loss and the distillation loss as a loss function to guide the training of the student model; and identifying the behavior pattern of the new user based on the trained student model; The generating the first soft label set and the hard label set to form a student loss includes calculating the teacher cross entropy loss using the hard label set and the first soft label set; The forming a distillation loss with the generated second soft label set and the filtered teacher target soft label set includes calculating a KL divergence loss using the second soft label set and the filtered teacher target soft label set; The loss function is: ; in, is the teacher cross entropy loss function; represents the KL divergence loss function, which obtains the data after applying consistency regularization to the source data set , and Input the predictions of the student model The soft labels predicted by the teacher model for the target dataset The matching distance between The parameters of the teacher model are ; λ1 and λ2 are hyperparameters that need to be adjusted, which are used to balance the teacher cross entropy loss and the KL divergence loss, and λ1+λ2=1.

2. The new user behavior identification method based on transfer learning according to claim 1 is characterized in that: The sensor signal transformation functions are three continuous sensor signal transformation functions, including adding random Gaussian noise, applying random 3D rotation, and inverting input signal values.

3. The new user behavior identification method based on transfer learning according to claim 2 is characterized in that: The function of the teacher cross entropy loss is: ; in, is the merged dataset, Indicates the behavior category label; Denotes the parameter of the teacher model as θ, Indicates in the window The behavior label is Its value is 1 when it is, otherwise it is 0; is the prediction window The label is probability.

4. A system for implementing the new user behavior identification method based on transfer learning as described in any one of claims 1 to 3, characterized in that: include: A teacher model, wherein the teacher model is trained using a source data set of a source domain, and the teacher model is used to identify user behaviors in the source domain, and the source data set is a labeled data set; A soft label generation module, used to generate a soft label for a target data set based on the teacher model, wherein the target data set is an unlabeled data set; A student model, wherein the student model is trained using the source data set and a target data set with soft labels; and a recognition module for recognizing the behavior pattern of the new user based on the trained student model.

Citation Information

Patent Citations

  • Infrared weak and small target detection method and device based on semi-supervised mixed domain adaptation

    CN116310655A

  • Cross-domain human behavior recognition method based on knowledge distillation

    CN117711064A