CN113112005A - Domain self-adaption method based on attention mechanism - Google Patents

Domain self-adaption method based on attention mechanism Download PDF

Info

Publication number
CN113112005A
CN113112005A CN202110456916.8A CN202110456916A CN113112005A CN 113112005 A CN113112005 A CN 113112005A CN 202110456916 A CN202110456916 A CN 202110456916A CN 113112005 A CN113112005 A CN 113112005A
Authority
CN
China
Prior art keywords
domain
sample
attention
loss function
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110456916.8A
Other languages
Chinese (zh)
Inventor
何克磊
季雯
霍静
许悦
高阳
张峻峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University filed Critical Nanjing University
Priority to CN202110456916.8A priority Critical patent/CN113112005A/en
Publication of CN113112005A publication Critical patent/CN113112005A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a domain self-adaptive method based on an attention mechanism, which comprises the following steps of obtaining a third sample of a second source domain of a second domain of an unsupervised domain self-adaptive model and a fourth sample of a second target domain of the second domain through a converter of the unsupervised domain self-adaptive model based on a first sample of the first source domain of the first domain and a second sample of the first target domain of the first domain of the unsupervised domain self-adaptive model, obtaining a conversion prediction result of the unsupervised domain self-adaptive model through a neural network model and an attention obtaining mechanism, obtaining a prediction loss model through a loss function model, and realizing alignment based on the attention mechanism in cross-domain through minimizing an intra-domain consistency function based on attention, improving the performance of the unsupervised domain self-adaptive model, improving the efficiency of the model and the accuracy of cross-domain adaptation, it is possible to locate distinct areas with high sensitivity to small variations in these areas.

Description

Domain self-adaption method based on attention mechanism
Technical Field
The invention relates to the field of deep neural networks, in particular to a field self-adaptive method based on an attention mechanism.
Background
Training tasks using deep neural networks often requires manual labeling of data sets as supervisory information. However, manually labeling data sets is time consuming and laborious. One possible approach is to use already labeled data for the relevant task domain. However, data distribution in different task domains often differs greatly, and the performance of the model is greatly reduced during model migration. Therefore, the unsupervised domain adaptive method has received a lot of attention in recent years.
The definition of the classical unsupervised domain adaptive learning scenario is that when the source domain has a large number of labeled samples and the target domain has no or only a small number of labeled samples, we hope that the model trained in the source domain can have better generalization performance on the target domain, which forms one. The model is trained by using the source domain samples with rich information, and the model can be well adapted to the transfer learning method of the sample distribution of the target domain.
The current unsupervised field adaptive methods can be briefly divided into two categories:
(1) method based on non-antagonistic learning
Such methods typically use a metric to measure and minimize the difference in high-order characteristics of the source and target domains. For example, using the Maximum Mean Difference (MMD) as a criterion, after finding a kernel function, both source domain and target domain features are mapped onto a hubert (Hilbert) space of a regeneration kernel, where the distribution distance is narrowed to extract domain invariant (domainvariant) features. For simple distributions, this approach can align the two domain distributions well, but for complex distributions it is often not good.
(2) Methods based on antagonistic learning.
Such methods are typically used when the source and target domains are widely distributed. The antagonism-based learning approach minimizes the difference of the source and target domains by learning the domain distribution.
For example, Ganin et al propose that Domain-antagonistic migration networks (DANN) contain not only a loss for label prediction but also a loss for Domain classification, so that the network learns both classification goals and Domain information. The Maximum Classification Difference (MCD) method proposed by Saito et al establishes two classifiers for classifying source domain samples. For the target sample, the two classifiers must have different task-specific decision boundaries. Lee et al propose Drop-to-adapt (dta) that utilizes antagonistic Dropout to learn robust discriminative features and robustness by implementing clustering assumptions.
However, the performance of these methods still remains to be improved, as they only directly align the two domain distributions, but do not exploit the potential distribution information directly of the two domains. Moreover, only two domain global features are used in the alignment process of the methods, and a global feature network contains a large amount of redundant information and is computationally inefficient. From the global perspective, the traditional consistency learning method for aligning the distribution of two domains based on global features is not efficient. For some fine-grained classification tasks, the characteristic with identification is often used as a decision for output prediction, and other parts may convey redundant noise.
Disclosure of Invention
The invention aims to introduce a domain adaptation method based on an attention mechanism, which focuses more on identified regions and improves the performance of a domain adaptive model.
In order to solve the technical problem, the invention provides a field adaptive method based on an attention mechanism, which comprises the following steps of:
s1, obtaining a third sample of a second source domain of a second field and a fourth sample of a second target domain of the second field of the unsupervised field self-adaptive model through a converter of the unsupervised field self-adaptive model based on a first sample of the first source domain of the first field and a second sample of the first target domain of the first field of the unsupervised field self-adaptive model;
s2, obtaining a conversion prediction result of the unsupervised field self-adaptive model through a neural network model and an attention obtaining mechanism based on the first sample, the second sample, the third sample and the fourth sample;
and S3, obtaining a predicted loss model through a loss function model based on the conversion prediction result, and realizing cross-domain alignment based on an attention mechanism by minimizing an attention-based intra-domain consistency function, thereby improving the performance of the unsupervised domain self-adaptive model.
Preferably, the loss function model includes an input loss function model, an intra-domain loss function model, and an inter-domain loss function model;
the input loss function model is used for obtaining input loss when the first sample and the second sample respectively pass through the converter;
the intra-domain loss function model is used for obtaining a first intra-domain loss between the first sample and the third sample after the attention obtaining mechanism and a second intra-domain loss between the second sample and the fourth sample;
the inter-domain loss function model is used to obtain a first inter-domain loss between the first sample and the third sample, and a second inter-domain loss between the second sample and the fourth sample.
Preferably, the first label of the first and third swatches are identical;
the second label of the second and fourth samples is identical.
Preferably, the input loss function model includes, but is not limited to, a cross entropy loss function.
Preferably, the inter-domain loss function model comprises an output loss function model;
based on the consistency of output prediction results of the first target domain and the second target domain, an output loss function model is constructed for limiting the consistency of semantic information before and after conversion;
and constructing an inter-domain loss function model by adding a regularization term based on the output loss function model and the input loss function model.
Preferably, the input loss function model comprises a source domain input loss function model and a target domain input loss function model;
the source domain input loss function model is used for obtaining a first input loss of a first sample;
the target domain input loss function model is used to obtain a second input loss for the second sample.
Preferably, the method for constructing the intra-domain loss function model comprises the following steps:
s2.1, based on a first sample, a second sample, a third sample and a fourth sample, obtaining a first feature map corresponding to the first sample, a second feature map corresponding to the second sample, a third feature map corresponding to the third sample and a fourth feature map corresponding to the fourth sample through a neural network model;
s2.2, converting the first feature diagram, the second feature diagram, the third feature diagram and the fourth feature diagram into a first attention diagram corresponding to the first feature diagram, a second attention diagram corresponding to the second feature diagram, a third attention diagram corresponding to the third feature diagram and a fourth attention diagram corresponding to the fourth feature diagram respectively based on an attention obtaining mechanism;
s2.3, constructing a first intra-domain loss function by setting a first discriminator based on the first attention map and the fourth attention map;
s2.4, constructing a second intra-domain loss function by setting a second discriminator based on the second attention diagram and the third attention diagram;
and S2.5, constructing an intra-domain loss function model based on attention consistency through the first intra-domain loss function and the second intra-domain loss function based on the antagonistic learning environment.
Preferably, the first intra-domain loss function is a first intra-domain attention consistency loss function based on the source domain;
the second intra-domain penalty function is a second intra-domain attention consistency penalty function based on the target domain.
Preferably, the intra-domain loss function model is based on attention consistency
Figure BDA0003040832120000051
The expression of (a) is:
Figure BDA0003040832120000052
where a denotes an attention map, s denotes a source domain, t denotes a target domain, DAS denotes a first discriminator, DAt denotes a second discriminator, At → s is a third attention map, At denotes a second attention map, and Y' is a label representing a sample source domain having the same dimension as that of the attention map a.
Preferably, the neural network model comprises at least a Resnet50 neural network model;
the attention computing mechanism includes at least a CAM attention computing mechanism.
The invention discloses the following technical effects:
compared with the existing method, the method adds the attention-based domain adaptation, improves the efficiency of the model and the accuracy of the cross-domain adaptation, can locate the distinguishing regions, has high sensitivity to the tiny changes of the regions, and gives less attention to the irrelevant regions, so the accuracy is higher.
The discriminator allows the network to pay more attention to areas of inconsistency between the two domains to eliminate subtle differences.
Based on the two points, the method is particularly suitable for tasks with high fine granularity, and the accuracy is greatly improved.
The invention can realize automatic batch labeling of the label-free data set by utilizing the existing data set, and does not depend on specific human priori knowledge, thereby having good generalization.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in FIG. 1, the invention discloses a domain adaptive method based on an attention mechanism, which comprises the following steps:
s1, obtaining a third sample of a second source domain of a second field and a fourth sample of a second target domain of the second field of the unsupervised field self-adaptive model through a converter of the unsupervised field self-adaptive model based on a first sample of the first source domain of the first field and a second sample of the first target domain of the first field of the unsupervised field self-adaptive model;
s2, obtaining a conversion prediction result of the unsupervised field self-adaptive model through a neural network model and an attention obtaining mechanism based on the first sample, the second sample, the third sample and the fourth sample;
and S3, obtaining a predicted loss model through a loss function model based on the conversion prediction result, and realizing cross-domain alignment based on an attention mechanism by minimizing an attention-based intra-domain consistency function, thereby improving the performance of the unsupervised domain self-adaptive model.
The loss function model comprises an input loss function model, an intra-domain loss function model and an inter-domain loss function model; the input loss function model is used for obtaining input loss when the first sample and the second sample respectively pass through the converter; the intra-domain loss function model is used for obtaining a first intra-domain loss between the first sample and the third sample after the attention obtaining mechanism and a second intra-domain loss between the second sample and the fourth sample; the inter-domain loss function model is used to obtain a first inter-domain loss between the first sample and the third sample, and a second inter-domain loss between the second sample and the fourth sample.
The first label of the first and third samples is identical; the second label of the second and fourth samples is identical.
The input loss function model includes, but is not limited to, a cross entropy loss function.
The inter-domain loss function model comprises an output loss function model; based on the consistency of output prediction results of the first target domain and the second target domain, an output loss function model is constructed for limiting the consistency of semantic information before and after conversion; and constructing an inter-domain loss function model by adding a regularization term based on the output loss function model and the input loss function model.
The input loss function model comprises a source domain input loss function model and a target domain input loss function model; the source domain input loss function model is used for obtaining a first input loss of a first sample; the target domain input loss function model is used to obtain a second input loss for the second sample.
The construction method of the intra-domain loss function model comprises the following steps:
s2.1, based on a first sample, a second sample, a third sample and a fourth sample, obtaining a first feature map corresponding to the first sample, a second feature map corresponding to the second sample, a third feature map corresponding to the third sample and a fourth feature map corresponding to the fourth sample through a neural network model;
s2.2, converting the first feature diagram, the second feature diagram, the third feature diagram and the fourth feature diagram into a first attention diagram corresponding to the first feature diagram, a second attention diagram corresponding to the second feature diagram, a third attention diagram corresponding to the third feature diagram and a fourth attention diagram corresponding to the fourth feature diagram respectively based on an attention obtaining mechanism;
s2.3, constructing a first intra-domain loss function by setting a first discriminator based on the first attention map and the fourth attention map;
s2.4, constructing a second intra-domain loss function by setting a second discriminator based on the second attention diagram and the third attention diagram;
and S2.5, constructing an intra-domain loss function model based on attention consistency through the first intra-domain loss function and the second intra-domain loss function based on the antagonistic learning environment.
The first intra-domain loss function is a first intra-domain attention consistency loss function based on the source domain; the second intra-domain penalty function is a second intra-domain attention consistency penalty function based on the target domain.
Intra-domain loss function model based on attention consistency
Figure BDA0003040832120000091
The expression of (a) is:
Figure BDA0003040832120000092
where a denotes an attention map, s denotes a source domain, t denotes a target domain, DAS denotes a first discriminator, DAt denotes a second discriminator, At → s is a third attention map, At denotes a second attention map, and Y' is a label representing a sample source domain having the same dimension as that of the attention map a.
The neural network model comprises at least a Resnet50 neural network model;
the attention computing mechanism includes at least a CAM attention computing mechanism.
Example 1: attention, feature and output based domain adaptation
1. Let the source domain be S and the target domain be T, take a single set of sample input as an example, and randomly extract a sample X from each of the domains S and Ts,XtAs input, a converter is used to generate samples of the other field respectively as Xs→tAnd Xt→sThe converter comprises a generator and an arbiter with a loss LGAnd LD
The converted sample is consistent with the label of the original sample, because the converter only changes the knowledge of sample style and the like, but basically keeps semantic consistency; namely XsAnd Xs→tConsistent label, XtAnd Xt→sThe labels are consistent.
2. And processing the sample and inputting the processed sample into a neural network such as Resnet50 and the like to obtain a prediction result.
3. Computing input X using a loss functionsAnd Xs→tThe predicted loss of (c) is calculated as follows, taking cross entropy loss (CEL, cross entropy) as an example:
Figure BDA0003040832120000101
Figure BDA0003040832120000102
where C is the classifier in the neural network and S 'and T' are the feature distributions of the images generated by the transformation.
4. Based on 3.1, Xt→sAnd XtShould be consistent, so the present implementation proposes a loss of output consistency to limit semantic information consistency before and after conversion:
Figure BDA0003040832120000103
5. the inter-domain consistency mainly comprises the label prediction consistency of cross-domain samples, and lambda is added as a regularization term, so that the inter-domain consistency loss function is as follows:
Figure BDA0003040832120000104
6. the inter-domain consistency loss function is used for parameter updating and model optimization in the training process, and the source domain and the target domain can share parameters of the neural network in the process generally.
7. In the training process, an attempt is made to minimize an inter-domain loss function so as to reduce the feature distribution difference between the source domain and the target domain, so that the aim of limiting the consistency of semantic information and style of samples of the source domain and the target domain is achieved, and the domain adaptation based on output is realized.
8. For a fine-grained task, output-only domain adaptation lacks sensitivity to fine regions.
9. Methods that only output coherences lack constraints on samples in the domain, i.e. XsAnd Xt→sAnd XtAnd Xs→t
Based on 8 and 9, the invention combines domain adaptation based on features and attention to improve the accuracy of classification tasks. The specific method comprises the following steps:
10. obtaining a feature map after passing the converted sample and the original sample through a feature extractor (which can be realized by a neural network model such as Resnet 50) to obtain Fs,Ft→s,Ft,Fs→t
11. A learning strategy is generated using the countermeasures such that the feature distributions between the source domain and the target domain are aligned.
12. In order to realize the feature-based domain adaptive method, two discriminators D are providedFs,DFtAnd the method is used for distinguishing the domain distribution of the feature map (namely, the source domain of the sample to which the feature map belongs).
The specific implementation method comprises the following steps:
13. in the antagonistic learning environment, the loss function is:
Figure BDA0003040832120000111
where Y is a label representing the area of origin of the sample in the same dimension as the attention map a.
14. Since the two pairs of cross-domain features are jointly optimized, the resulting loss of consistency is the accumulation of errors caused by the two features.
15. In the discrimination process, the intra-domain feature consistency of the source domain is attempted to reach Fs,Ft→sSo the loss function of the source domain is defined as:
Figure BDA0003040832120000112
similarly, the feature alignment of the target domain may be defined as:
Figure BDA0003040832120000113
16. since the feature map F will convey global information of the samples, there is some redundancy. And more attention is given to the features with the identification degrees, so that tasks such as classification prediction and the like are simpler and have higher accuracy.
17. In particular, for a fine-grained task, even a small change between the source domain and the target domain may have a large effect on the model prediction result.
18. Based on 16 and 17, the present invention incorporates attention alignment for source domain samples and target domain conversion to source domain samples, i.e., alignment XsAnd Xt→sThe attention of (1) is sought.
19. A feature map F obtained by passing the converted sample and the original sample through a feature extractor (which can be realized by a neural network model such as Resnet50, etc.)s,Ft→s,Ft,Fs→tThen obtaining an attention diagram A through an attention computing mechanism such as CAM and the likes,At→s,At,As→t
Taking the original sample of the source domain as an example, taking the CAM attention computing mechanism as an example, the feature mapping is
Figure BDA0003040832120000121
Wherein F's,jIs the output feature map F of the jth channels′(Fs' is a pre-GAP feature),
Figure BDA0003040832120000122
is the jth weight that predicts the fully-connected layer of the ith class.
20. In order to improve the performance of the unsupervised domain adaptive method, on the basis of the domain adaptive method based on the output and the characteristics, the invention implements a new domain adaptive method based on the output, the characteristics and the attention mechanism and a related loss function by combining the attention mechanism.
21. To make it practicalIn the field self-adaptive method part based on attention mechanism in the invention, two discriminators D are providedAs,DAtAnd (3) domain distribution for the discriminant attention map (namely, for the source domain of the sample to which the discriminant attention map belongs).
DAsIs applied to As,At→s;DAtIs applied to At,As→t
22. The attention consistency loss function is defined as:
Figure BDA0003040832120000123
where Y' is a label representing the area of origin of the sample in the same dimension as the attention map a.
23. The attention-based intra-domain consistency loss function for the source domain is:
Figure BDA0003040832120000131
24. the attention-based intra-domain consistency loss function for the target domain is:
Figure BDA0003040832120000132
based on the above, DAsIs aligned with AsAnd At→sThe domain distribution of (2).
25. Based on the above, the intra-domain consistency total loss function is:
Figure BDA0003040832120000133
26. based on the above, the overall loss function is:
Figure BDA0003040832120000134
in the embodiment of the invention, neural networks such as Resnet50 and the like can be used as a backbone network for feature extraction, samples are output through the neural networks, and semantic information consistency of cross-domain samples is kept by minimizing a loss function for the output. The method comprises the steps that a sample is processed through a feature extractor to obtain a feature graph to provide global information, the feature graph is processed through an attention calculation mechanism such as CAM and the like to obtain an attention graph to provide local information, and through continuous iteration and parameter optimization, a feature extraction network extracts features with consistency when the attention graph is distributed on a source domain and a target domain, so that good performance can be obtained on the target domain by utilizing a model with supervision information training of the source domain. And through an attention mechanism, the model focuses more on a local area with identification, and the prediction performance of the model is improved. With the improvement of the model performance, the accuracy of the attention mechanism is continuously improved, and a part with more identification significance is extracted. Cross-domain attention-based mechanism alignment is achieved by minimizing an attention-based intra-domain coherence function. Through the methods, the invention effectively improves the performance of the unsupervised domain adaptive model, namely the domain adaptation based on the output, the characteristics and the attention mechanism.
The above solution of the invention can be applied to a plurality of specific works, and the following are only exemplary to give some specific application directions: labeling of unlabeled datasets for machine learning model training. For example, for classifying cartoon face features, currently, there are few cartoon face features with labels, but a large number of real face sample data sets with labels already exist. The method can use a real face sample data set as a source domain to predict the face features of the cartoon in batches.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present invention in its spirit and scope. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A domain adaptive method based on an attention mechanism is characterized by comprising the following steps:
s1, obtaining a third sample of a second source domain of a second domain of an unsupervised domain adaptive model and a fourth sample of a second target domain of the second domain through a converter of the unsupervised domain adaptive model based on a first sample of the first source domain of the first domain and a second sample of the first target domain of the first domain of the unsupervised domain adaptive model;
s2, obtaining a conversion prediction result of the unsupervised field self-adaptive model through a neural network model and an attention obtaining mechanism based on the first sample, the second sample, the third sample and the fourth sample;
and S3, obtaining a prediction loss model through a loss function model based on the conversion prediction result, and realizing cross-domain alignment based on an attention mechanism by minimizing an attention-based intra-domain consistency function, thereby improving the performance of the unsupervised domain self-adaptive model.
2. The attention mechanism-based domain adaptation method of claim 1,
the loss function model comprises an input loss function model, an intra-domain loss function model and an inter-domain loss function model;
the input loss function model is used for obtaining the input loss of the first sample and the second sample when the first sample and the second sample respectively pass through the converter;
the intra-domain loss function model is used for obtaining a first intra-domain loss between the first sample and the third sample and a second intra-domain loss between the second sample and the fourth sample after being processed by the attention obtaining mechanism;
the inter-domain loss function model is used to obtain a first inter-domain loss between the first sample and the third sample and a second inter-domain loss between the second sample and the fourth sample.
3. The attention mechanism-based domain adaptation method of claim 2,
the first label of the first and third swatches are identical;
the second label of the second and fourth samples is identical.
4. The attention mechanism-based domain adaptation method of claim 2,
the input loss function model includes, but is not limited to, a cross entropy loss function.
5. The attention mechanism based domain adaptation method of claim 3,
the inter-domain loss function model comprises an output loss function model;
based on the consistency of the output prediction results of the first target domain and the second target domain, constructing the output loss function model for limiting the consistency of semantic information before and after conversion;
and building the inter-domain loss function model by adding a regularization term based on the output loss function model and the input loss function model.
6. The attention mechanism-based domain adaptation method of claim 5,
the input loss function model comprises a source domain input loss function model and a target domain input loss function model;
the source domain input loss function model is used for obtaining a first input loss of the first sample;
the target domain input loss function model is used to obtain a second input loss of the second sample.
7. The attention mechanism-based domain adaptation method of claim 2,
the method for constructing the intra-domain loss function model comprises the following steps:
s2.1, based on the first sample, the second sample, the third sample and the fourth sample, obtaining a first feature map corresponding to the first sample, a second feature map corresponding to the second sample, a third feature map corresponding to the third sample and a fourth feature map corresponding to the fourth sample through the neural network model;
s2.2, converting the first feature map, the second feature map, the third feature map and the fourth feature map into a first attention map corresponding to the first feature map, a second attention map corresponding to the second feature map, a third attention map corresponding to the third feature map and a fourth attention map corresponding to the fourth feature map respectively based on an attention obtaining mechanism;
s2.3, constructing a first intra-domain loss function by setting a first discriminator based on the first attention map and the fourth attention map;
s2.4, constructing a second intra-domain loss function by setting a second discriminator based on the second attention diagram and the third attention diagram;
and S2.5, constructing the intra-domain loss function model based on attention consistency through the first intra-domain loss function and the second intra-domain loss function based on a confrontation learning environment.
8. The attention mechanism based domain adaptation method of claim 7,
the first intra-domain loss function is a first intra-domain attention consistency loss function based on a source domain;
the second intra-domain loss function is a second intra-domain attention consistency loss function based on the target domain.
9. The attention mechanism based domain adaptation method of claim 8,
the intra-domain loss function model based on attention consistency
Figure FDA0003040832110000041
The expression of (a) is:
Figure FDA0003040832110000042
where A denotes an attention map, s denotes a source domain, t denotes a target domain, and DASDenotes a first discriminator, DAtDenotes a second discriminator, At→sFor the third attention diagram, AtRepresenting a second attention map, Y' is a label representing the area of origin of the sample in the same dimension as the attention map a.
10. The attention mechanism-based domain adaptation method of claim 1,
the neural network model comprises at least a Resnet50 neural network model;
the attention computing mechanism includes at least a CAM attention computing mechanism.
CN202110456916.8A 2021-04-27 2021-04-27 Domain self-adaption method based on attention mechanism Pending CN113112005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110456916.8A CN113112005A (en) 2021-04-27 2021-04-27 Domain self-adaption method based on attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110456916.8A CN113112005A (en) 2021-04-27 2021-04-27 Domain self-adaption method based on attention mechanism

Publications (1)

Publication Number Publication Date
CN113112005A true CN113112005A (en) 2021-07-13

Family

ID=76720138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110456916.8A Pending CN113112005A (en) 2021-04-27 2021-04-27 Domain self-adaption method based on attention mechanism

Country Status (1)

Country Link
CN (1) CN113112005A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180268266A1 (en) * 2017-03-17 2018-09-20 Nec Laboratories America, Inc. Surveillance system for recognition in unlabeled videos with domain adversarial learning and knowledge distillation
CN111160462A (en) * 2019-12-30 2020-05-15 浙江大学 Unsupervised personalized human activity recognition method based on multi-sensor data alignment
CN111242157A (en) * 2019-11-22 2020-06-05 北京理工大学 Unsupervised domain self-adaption method combining deep attention feature and conditional opposition
CN111814854A (en) * 2020-06-28 2020-10-23 北京交通大学 Target re-identification method adaptive to unsupervised domain
CN111832514A (en) * 2020-07-21 2020-10-27 内蒙古科技大学 Unsupervised pedestrian re-identification method and unsupervised pedestrian re-identification device based on soft multiple labels
CN111860678A (en) * 2020-07-29 2020-10-30 中国矿业大学 Unsupervised cross-domain pedestrian re-identification method based on clustering
CN112183581A (en) * 2020-09-07 2021-01-05 华南理工大学 Semi-supervised mechanical fault diagnosis method based on self-adaptive migration neural network
US20210117737A1 (en) * 2019-10-18 2021-04-22 Korea University Research And Business Foundation Earthquake event classification method using attention-based convolutional neural network, recording medium and device for performing the method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180268266A1 (en) * 2017-03-17 2018-09-20 Nec Laboratories America, Inc. Surveillance system for recognition in unlabeled videos with domain adversarial learning and knowledge distillation
US20210117737A1 (en) * 2019-10-18 2021-04-22 Korea University Research And Business Foundation Earthquake event classification method using attention-based convolutional neural network, recording medium and device for performing the method
CN111242157A (en) * 2019-11-22 2020-06-05 北京理工大学 Unsupervised domain self-adaption method combining deep attention feature and conditional opposition
CN111160462A (en) * 2019-12-30 2020-05-15 浙江大学 Unsupervised personalized human activity recognition method based on multi-sensor data alignment
CN111814854A (en) * 2020-06-28 2020-10-23 北京交通大学 Target re-identification method adaptive to unsupervised domain
CN111832514A (en) * 2020-07-21 2020-10-27 内蒙古科技大学 Unsupervised pedestrian re-identification method and unsupervised pedestrian re-identification device based on soft multiple labels
CN111860678A (en) * 2020-07-29 2020-10-30 中国矿业大学 Unsupervised cross-domain pedestrian re-identification method based on clustering
CN112183581A (en) * 2020-09-07 2021-01-05 华南理工大学 Semi-supervised mechanical fault diagnosis method based on self-adaptive migration neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
季雯: ""无监督领域自适应方法研究及跨模态视觉应用"", 《中国优秀硕士学位论文全文数据库》, 15 February 2022 (2022-02-15) *

Similar Documents

Publication Publication Date Title
Li et al. Cost-sensitive and hybrid-attribute measure multi-decision tree over imbalanced data sets
Giusto et al. Identifying business cycle turning points in real time with vector quantization
CN111339990B (en) Face recognition system and method based on dynamic update of face features
CN110084610B (en) Network transaction fraud detection system based on twin neural network
US5572597A (en) Fingerprint classification system
CN111414461A (en) Intelligent question-answering method and system fusing knowledge base and user modeling
CN113326731A (en) Cross-domain pedestrian re-identification algorithm based on momentum network guidance
CN113269647B (en) Graph-based transaction abnormity associated user detection method
CN113361627A (en) Label perception collaborative training method for graph neural network
CN114255371A (en) Small sample image classification method based on component supervision network
Pang et al. Improving deep forest by screening
Li et al. Self-weighted unsupervised LDA
CN112668633B (en) Adaptive graph migration learning method based on fine granularity field
CN112395901A (en) Improved face detection, positioning and recognition method in complex environment
CN113112005A (en) Domain self-adaption method based on attention mechanism
CN115098681A (en) Open service intention detection method based on supervised contrast learning
CN110942089B (en) Multi-level decision-based keystroke recognition method
Wang et al. TIToK: A solution for bi-imbalanced unsupervised domain adaptation
Zhou et al. Difficult Novel Class Detection in Semisupervised Streaming Data
Amalia et al. The Application of Modified K-Nearest Neighbor Algorithm for Classification of Groundwater Quality Based on Image Processing and pH, TDS, and Temperature Sensors
CN116561591B (en) Training method for semantic feature extraction model of scientific and technological literature, feature extraction method and device
Zhang et al. Underwater target recognition method based on domain adaptation
CN114093445B (en) Patient screening marking method based on partial multi-marking learning
Ramazan Classification of Historical Anatolian Coins with Machine Learning Algorithms
US20240161930A1 (en) Prediction method using static and dynamic data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination