Domain Adaptation
By initializing the weights in the target encoder and synchronizing the weights of the discriminator, the domain offset problem is solved, and the performance and robustness of the encoder in the target domain is improved.
Patent Information
- Application Number
- CN202010681658.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-09-25
- Filing Date
- 2020-07-15
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-07-15
AI Technical Summary
In actual systems, the data distribution of the training dataset and deployment dataset is not always the same, resulting in a degradation of the encoder's performance during the training and deployment phases, called domain offset.
By initializing the weight of the target encoder based on the source encoder, and using the synchronization mechanism of the target discriminator and the source discriminator, the data distribution of the target domain is adapted to the target domain, thereby reducing domain offset.
This achieves improved encoder performance in the target domain, reduces dependence on labeled data, and improves the robustness and adaptability of the model.
Smart Images

Figure CN112561052B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to domain adaptation. Background Art
[0002] Encoders can be trained using labeled training data (e.g., using the principles of machine learning). If the data applied to such encoders during the training phase has similar properties to the data applied during the deployment phase, then high-performance encoders can be provided. This is not always the case in real systems. Further development is still needed in this area. Summary of the invention
[0003] In a first aspect, the specification provides an apparatus comprising: a component for initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; a component for initializing weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; a component for applying some target data in a target data set (e.g., including unlabeled or partially labeled data) to the target encoder to generate a target encoder output; a component for applying the target encoder output to the target discriminator to generate a first local loss function output; a component for training the target encoder to attempt to increase the first local loss function output; a component for training the target discriminator to attempt to reduce the first local loss function output; and a component for synchronizing the weights of the target discriminator and the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator. The training of the source discriminator can be in response to applying the source data to the source encoder to generate a source encoder output, which is applied to the source discriminator to generate a second local loss function, which is used to train the source discriminator (e.g., to attempt to reduce the second local loss function). The first algorithm can be trained based on labeled data. The target encoder may attempt to implement a variation of this first algorithm.
[0004] The source encoder can be fixed (eg, not updated during the training process described herein).
[0005] In some example embodiments, the means for synchronizing the weights of the target discriminator and the weights of the source discriminator synchronizes the weights after a plurality of instances (e.g., a predefined number of instances) of training of the target discriminator and the corresponding training of the source discriminator.
[0006] The means for training the target encoder may comprise means for updating the weights (eg, at each iteration / each application of the target data). The means for training the target discriminator may comprise means for updating the weights of the target discriminator.
[0007] In some example embodiments, the means for synchronizing the weights of the target discriminator and the source discriminator includes means for averaging the weights of the target discriminator and the source discriminator (e.g., using a moving average). Alternatively or in addition, the means for synchronizing the weights of the target discriminator and the source discriminator may include means for averaging changes in the weights of the target discriminator and changes in the weights of the source discriminator (e.g., using a moving average).
[0008] The means for training the target encoder comprises means for updating the weights of the target encoder (e.g., at each iteration / each application of the target data). Furthermore, the means for training the target discriminator may comprise means for accumulating expected changes in the weights of the target discriminator. The means for synchronizing the weights of the target discriminator with the weights of the source discriminator may comprise means for averaging (e.g., using a moving average) the set expected transformation of the weights of the target discriminator and the accumulated expected changes in the weights of the source discriminator.
[0009] In some example embodiments, the means for initializing the weights of the target discriminator initializes the weights of the target discriminator randomly, pseudo-randomly or arbitrarily.Similarly, the source discriminator may be initialized.
[0010] The means for initializing the weights of the target encoder may set the weights of the target encoder to be the same as the corresponding weights of the source encoder.
[0011] In some example embodiments, a target encoder is implemented using a neural network, wherein the weights of the target encoder are weights of the neural network. Further, the means for initializing the target encoder may include means for receiving weights of a source encoder neural network at the target encoder.
[0012] In some example embodiments, the target discriminator is implemented using a neural network, wherein the weights of the target discriminator are weights of the neural network. The source discriminator may also be implemented using a neural network. Initializing the target discriminator may include providing the weights of the source discriminator to the target discriminator (or vice versa).
[0013] Some example embodiments further include means for selecting an initial instance of a source encoder from a plurality of candidate encoders. The means for selecting the initial instance of a source encoder may select the best source encoder from the plurality of candidate encoders based on some metric. The metric may be related to the difference between the domains (e.g., the computational domain difference). Thus, the source encoder may be selected based on the candidate encoder that shows the minimum difference between the domains based on the selected metric (i.e., the minimum difference between the candidate domain and the source domain).
[0014] The means may include: at least one processor; and at least one memory including computer program code, the at least one memory and the computer program being configured to, together with the at least one processor, enable execution of the apparatus.
[0015] In a second aspect, the specification provides a system comprising: a component for initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; a component for initializing weights of a target discriminator associated with the target encoder and weights of a source discriminator associated with the source encoder so that the target discriminator matches the source discriminator; a component for applying some target data in a target data set to the target encoder to generate a target encoder output; a component for applying some source data in a source data set to the source encoder to generate a source encoder output; a component for applying the target encoder output to the target discriminator to generate a first local loss function; a component for applying the source encoder output to the source discriminator to generate a second local loss function; a component for training the target encoder to attempt to increase the first local loss function output; a component for training the target discriminator to attempt to reduce the first local loss function output; a component for training the source discriminator to attempt to reduce the second local loss function output; and a component for synchronizing the weights of the target discriminator and the weights of the source discriminator after the training of the target discriminator and the source discriminator. The source encoder can be fixed (e.g., not updated during the training process described herein).
[0016] The system of the second aspect may further comprise one or more features described above with reference to the apparatus of the first aspect.
[0017] In a third aspect, the present specification describes a method comprising: initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; initializing weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; applying some target data in a target data set to the target encoder to generate a target encoder output; applying the target encoder output to the target discriminator to generate a first local loss function output; training the target encoder to attempt to increase the first local loss function output; training the target discriminator to attempt to reduce the first local loss function output; and synchronizing the weights of the target discriminator and the weights of the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator.
[0018] The training of the source discriminator can be responsive to applying the source data to the source encoder to generate a source encoder output, which is applied to the source discriminator to generate a second local loss function, which is used to train the source discriminator (e.g., to attempt to reduce the second local loss function). The first algorithm can be trained based on the labeled data. The target encoder can attempt to implement a variation of the first algorithm.
[0019] The source encoder can be fixed (eg, not updated during the training process described herein).
[0020] In some example embodiments, synchronizing the weights of the target discriminator and the weights of the source discriminator synchronizes the weights after a plurality of instances of training the target discriminator and the corresponding training of the source discriminator (e.g., a predefined number of instances).
[0021] Training a target encoder may include updating the weights (eg, at each iteration / each application of target data). Training a target discriminator may include updating the weights of the target discriminator.
[0022] In some example embodiments, synchronizing the weights of the target discriminator and the source discriminator includes averaging the weights of the target discriminator and the source discriminator (e.g., using a moving average). Alternatively or in addition, synchronizing the weights of the target discriminator and the source discriminator may include averaging changes in the weights of the target discriminator and the source discriminator (e.g., using a moving average).
[0023] Training the target encoder may include updating the weights of the target encoder (e.g., at each iteration / each application of target data). Furthermore, training the target discriminator may include accumulating expected changes in the weights of the target discriminator. Synchronizing the weights of the target discriminator with the weights of the source discriminator may include averaging the accumulated expected changes in the weights of the target discriminator and the source discriminator (e.g., using a moving average).
[0024] Some example embodiments further include selecting an initial instance of a source encoder from the plurality of candidate encoders.Selecting the initial instance of the source encoder may select the best source encoder from the plurality of candidate encoders based on some metric.
[0025] In a fourth aspect, the specification provides a method, the method comprising: initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; initializing weights of a target discriminator associated with the target encoder and weights of a source discriminator associated with the source encoder so that the target discriminator matches the source discriminator; applying some target data in a target data set to the target encoder to generate a target encoder output; applying some source data in a source data set to the source encoder to generate a source encoder output; applying the target encoder output to the target discriminator to generate a first local loss function; applying the source encoder output to the source discriminator to generate a second local loss function; training the target encoder to attempt to increase the first local loss function output; training the target discriminator to attempt to reduce the first local loss function output; training the source discriminator to attempt to reduce the second local loss function output; and synchronizing the weights of the target discriminator and the source discriminator after the training of the target discriminator and the source discriminator. The source encoder can be fixed (e.g., not updated during the training process described herein).
[0026] The method of the fourth aspect may further comprise one or more of the features described above with reference to the method of the third aspect.
[0027] In a fifth aspect, the specification describes an apparatus configured to perform any method described with reference to the third or fourth aspect.
[0028] In a sixth aspect, the present specification describes computer readable instructions which, when executed by a computing device, cause the computing device to perform any of the methods described with reference to the third or fourth aspects.
[0029] In a seventh aspect, the present specification describes a computer program comprising instructions for causing an apparatus to perform at least the following operations: initialize weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; initialize weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; apply some target data in a target data set to the target encoder to generate a target encoder output; apply the target encoder output to the target discriminator to generate a first local loss function output; train the target encoder to attempt to increase the first local loss function output; train the target discriminator to attempt to reduce the first local loss function output; and synchronize the weights of the target discriminator with the weights of the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator.
[0030] In an eighth aspect, the present specification describes a computer-readable medium (such as, a non-transitory computer-readable medium) comprising program instructions stored thereon for performing at least the following operations: initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; initializing weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; applying some target data in a target data set to the target encoder to generate a target encoder output; applying the target encoder output to the target discriminator to generate a first local loss function output; training the target encoder to attempt to increase the first local loss function output; training the target discriminator to attempt to reduce the first local loss function output; and synchronizing the weights of the target discriminator and the weights of the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator.
[0031] In a ninth aspect, the present specification describes an apparatus comprising: at least one processor; and at least one memory comprising computer program code, which, when executed by the at least one processor, causes the apparatus to: initialize weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; initialize weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; apply some target data in a target data set to the target encoder to generate a target encoder output; apply the target encoder output to the target discriminator to generate a first local loss function output; train the target encoder to attempt to increase the first local loss function output; train the target discriminator to attempt to reduce the first local loss function output; and synchronize the weights of the target discriminator and the weights of the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator.
[0032] In a tenth aspect, the present specification describes an apparatus comprising: a first initialization module for initializing weights of a target encoder based on a source encoder, wherein the source encoder implements a first algorithm; a second initialization module for initializing weights of a target discriminator associated with the target encoder so that the target discriminator is initialized to match a source discriminator associated with the source encoder; a first input for applying some target data in a target data set (e.g., including unlabeled or partially labeled data) to a target encoder to generate a target encoder output, wherein the target discriminator generates a first local loss function output based on the generated target encoder output; a first training module for training the target encoder in an attempt to increase the first local loss function output (e.g., using machine learning principles); a second training module for training the target discriminator in an attempt to reduce the first local loss function output (e.g., using machine learning principles); and a control module for synchronizing the weights of the target discriminator and the weights of the source discriminator after the training of the target discriminator and the corresponding training of the source discriminator. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Example embodiments will now be described by way of non-limiting example with reference to the following schematic diagrams:
[0034] in:
[0035] Figure 1A is a block diagram of an example system;
[0036] Figure 1B is a block diagram of an example system;
[0037] Figure 2 is a flow chart illustrating an algorithm according to an example embodiment;
[0038] Figure 3 is a block diagram of a system according to an example embodiment;
[0039] Figures 4 to 8 is a flow chart illustrating an algorithm according to an example embodiment;
[0040] Fig. 9 is a block diagram of a system according to an example embodiment;
[0041] Fig.10 is a block diagram of a neural network system according to an example embodiment;
[0042] Fig.11 is a block diagram of system components according to an example embodiment; and
[0043] Fig. 12A and Fig. 12BTangible media are shown, respectively, a removable nonvolatile memory unit and a compact disc (CD) storing computer readable codes that, when executed by a computer, perform operations according to example embodiments. DETAILED DESCRIPTION
[0044] The intended scope of protection for various exemplary embodiments of the present invention is set out by the independent claims. Exemplary embodiments and features described in this specification that do not fall within the scope of the independent claims, if any, are to be interpreted as useful examples for understanding the various exemplary embodiments of the present invention.
[0045] Like reference numerals refer to like elements throughout the description and drawings.
[0046] Figure 1A 1 is a block diagram of an example system, which is generally indicated by reference numeral 10A. System 10A includes an encoder 12A having an input, which receives labeled data. The labeled data is used to train encoder 12A using machine learning principles, as discussed further below.
[0047] Figure 1B 1 is a block diagram of an example system, which is generally indicated by reference numeral 10B. System 10B includes encoder 12B, which is a trained version of encoder 12A (e.g., using Figure 1A Encoder 12B receives input and generates output based on the encoder's training function.
[0048] Machine learning (ML) algorithms, as data-driven computing methods, typically attempt to fit complex functions to labeled data sets (e.g., training data sets), with the expectation that comparable performance will be achieved when unseen data sets (e.g., test data or operational data) are applied to the training algorithm. Such training algorithms can be referred to as supervised learning algorithms, in which a labeled training set is used to learn the mapping between input data and class labels.
[0049] In theory and practice, machine learning and supervised learning methods typically assume that the data distribution of the training dataset and the deployment (e.g., test) dataset is the same. Therefore, in the example systems 10A and 10B, it can be assumed that the distribution of the input data of system 10B matches the distribution of the labeled data in system 10A.
[0050] Following this assumption, labeled training sets can be provided for each of the multiple data distributions, even though many of these data distributions may be similar. Example datasets for which separate labeled training data can be generated include images of the same object from different angles, different styles of painting, human activity sensors in different body positions, processing of the same language with different accents, etc.
[0051] In real systems, the assumption that the data distributions of the training dataset and the deployment (e.g., test) dataset are identical is not always valid. Many real-world factors may cause variability between the training and operational (or test) data distributions. These factors may include, for example, variability caused by the sensor processing pipeline, environmental factors (e.g., lighting conditions), or user-related issues (e.g., different people wear their smart devices in different ways, resulting in a shift in the distribution of the generated data). This shift in the data distribution between the training domain and the test / deployment domain is sometimes called "domain shift."
[0052] As discussed further below, "domain adaptation" attempts to address the problem of domain shift. Typically, domain adaptation provides two similar (but different) domains, referred to herein as the source domain and the target domain. Data instances in the source domain are typically labeled (providing labeled training data for the source model), while data instances in the target domain are partially labeled (semi-supervised domain adaptation) or not labeled at all (unsupervised domain adaptation). The goal of domain adaptation is to attempt to train the target model by leveraging aspects of the source model.
[0053] So, instead of training each data distribution (or “domain”) from scratch, domain adaptation attempts to develop a target model by adapting the source model. This can result in reduced labeling effort and, in some cases, the development of a more robust model.
[0054] Figure 2 is a flow chart illustrating an algorithm generally indicated by reference numeral 20 according to an example embodiment. Algorithm 20 illustrates an example domain adaptation algorithm.
[0055] Algorithm 20 begins at operation 22, where a source encoder is trained. For example, the source encoder may be trained using labeled training data (as described above with reference to Figure 1A described) to train the source encoder.
[0056] At operation 24, the target encoder is initialized. For example, the target encoder may be initialized to be the same as the trained source encoder, although this is not necessary for all example embodiments. In some implementations, the entity managing the trained source encoder may transmit a copy of the trained source encoder to the target domain.
[0057] At operation 26, the initialized target encoder is adapted to the new domain (thereby completing the domain adaptation process). For example, an adversarial domain adaptation technique may be used. An example arrangement for adapting the target encoder to the new domain is described in detail below.
[0058] Figure 3 3 is a block diagram of a system generally indicated by reference numeral 30 according to an example embodiment. System 30 includes a source encoder 32, a target encoder 34, a source discriminator 36, and a target discriminator 38. Source encoder 32 and source discriminator 36 form part of a source node or domain 31a. Target encoder 34 and target discriminator 38 form part of a target node or domain 31b. A first communication link 33a may be provided between source encoder 32 and target encoder 34. A second communication link 33b may be provided between source discriminator 36 and target discriminator 38.
[0059] Assume that the source dataset X S (or a portion thereof) is provided to the source encoder 32, and the target data set X T (or a portion thereof) is provided to the target encoder 34. These data sets can reside on different nodes (such as machines, devices, equipment, servers, etc.) and do not need to be shared with each other, thereby addressing challenges associated with user privacy. In this way, the system 30 can provide an adversarial domain adaptation system, in which the source domain (including the source encoder 32 and the source discriminator 36) can be physically or logically separated from the target domain (including the target encoder 34 and the target discriminator 36), for example, at the source node 31a and the target node 31b, respectively. Therefore, the system 30 supports providing a distributed system.
[0060] Figure 4 4 is a flow chart illustrating an algorithm generally indicated by reference numeral 40 according to an example embodiment. As discussed below, algorithm 40 may be used for training of target encoder 34.
[0061] Algorithm 40 begins at operation 41, where the elements of system 30 are initialized. The source domain utilizes a function E S The pre-trained source encoder 32 and the function D S The target domain is a randomly initialized source discriminator 36 with function E T The target encoder 34 and the function D T The target identifier 38 starts.
[0062] The target encoder 34 and the target discriminator 38 are initialized by the source node (in operation 41). Thus, for example, the target encoder 34 may be initialized to be the same as the pre-trained source encoder 32, and the target discriminator 38 may be initialized to be the same as the initialized (e.g., randomly initialized) source discriminator 36. In some implementations, the target node 31b may request initialization and / or information of the target encoder 34 and the target discriminator 38 from the source node 31a (e.g., using one or more of the communication links 33a and 33b).
[0063] In operation 42 of algorithm 40, data is applied to source encoder 32 and target encoder 34. More specifically, source encoder 32 processes a batch of source data sets X. S Sampling to obtain feature representation R S , and the target encoder 34 performs a batch of target data sets X T Sampling to obtain feature representation R T . Feature representation R S is provided to the source discriminator 36, which may be a source discriminator having weights W S (d) Similarly, the feature representation R T is provided to the target discriminator 38, which may be a target discriminator with weights W T (d) Neural network. (W S (d) and W T (d) Can be expressed with D S and D T The corresponding neural network weights).
[0064] Based on a predefined loss function (e.g., mutual entropy loss), the gradient of the loss with respect to the neural network parameters can be determined. Thus, the gradients G of the source discriminator 36, the target discriminator 38, and the target encoder 34 can be determined respectively. S (d) , G T (d) and G T (e) .
[0065] At operation 43, the relevant weight W S (d) and W T (d) As described further below, the source and target discriminators 36 and 38 are trained to minimize the respective loss functions L of those discriminators according to the adversarial training principle. d , and train the target encoder 34 to maximize the loss function L d The pre-trained source encoder 32 is not further trained. S , D T and E T will be updated during the adaptation process, and E S is pre-trained and fixed.
[0066] At operation 44, discriminator 36 and discriminator 38 are synchronized, as discussed further below.
[0067] Operations 42 to 44 are repeated with the relevant weights updated and synchronized. When the algorithm is complete (e.g., after a defined number of iterations or data batches, or when a defined performance level is achieved), E is generated. T The final value (e.g., optimal value) of , which can be used as the encoder model for the target domain.
[0068] Figures 5 to 7 is a flowchart showing three algorithms that provide the above reference Figure 4 An example implementation of Algorithm 40 is described.
[0069] Figure 5 is a flow chart illustrating an algorithm generally indicated by reference numeral 50 according to an example embodiment.
[0070] Algorithm 50 begins at operation 51, where the elements of system 30 are initialized as described above. Thus, as with operation 41 of algorithm 40, target encoder 34 is initialized to be the same as pre-trained source encoder 32, and target discriminator 38 is initialized to be the same as initialized (e.g., randomly initialized) source discriminator 36.
[0071] In operation 52 of algorithm 50, the data is applied to source encoder 32 and target encoder 34. As in operation 42 of algorithm 40, source encoder 32 processes a batch of source data sets X. S Sampling to obtain feature representation R S , and the target encoder 34 performs a batch of target data sets X T Sampling to obtain feature representation R T .
[0072] In operation 53, the relevant weights are updated. As described above with reference to algorithm 40, the source discriminator 36 and the target discriminator 38 are trained to minimize the respective loss functions L of those discriminators. d , and train the target encoder 34 to maximize the loss function L d The source discriminator function D may be updated based on an average (e.g., a moving average) of recent weights at the corresponding discriminator. S and the target discriminator function D T (They are updated separately).
[0073] At operation 54, it is determined whether the current iteration of algorithm 50 is a synchronization step. If so, algorithm 50 moves to operation 55; otherwise, algorithm 50 moves to operation 57. As discussed further below, since the source and target discriminators can be provided in separate domains, data transmission costs can be reduced by enabling the discriminators to be updated locally in multiple iterations before being synchronized.
[0074] The trigger for the synchronization operation may be a user defined parameter (e.g., a user defined number of iterations of operations 52 and 53 may be achieved before the algorithm moves from operation 54 to operation 55). As mentioned above, there are many considerations that are relevant when considering such parameters, including data transfer costs.
[0075] At operation 55, the discriminator D S and D T The weight (i.e., weight W S (d) and W T (d) ) are averaged so that the average change in those weights in the iterations since the last synchronization step is determined. Then, in operation 56, the source and target discriminators are updated based on the averaging of the weights in operation 55. In this way, the discriminator weights W S (d) and W T (d) (which may diverge after multiple iterations of the algorithm 50 without synchronization) is equalized.
[0076] The synchronization of the discriminators may be symmetrical so that in principle data exchange can take place in either direction, with the "receiving domain" performing an averaging operation 55 and sending the averaged value back to the sending domain so that the discriminator can be updated in operation 56.
[0077] After operation 56 , algorithm 50 moves to operation 57 .
[0078] At operation 57, it is determined whether the algorithm 50 is complete (e.g., after a defined number of batch iterations, or when a defined performance level is achieved). If so, the algorithm 50 terminates at operation 58; otherwise, the algorithm 50 returns to operation 52 and further applies the data so that the source and target discriminators and the target encoder can be further updated. As mentioned above, when the algorithm terminates (at operation 58), E is generated. T The final value (e.g., optimal value) of , which can be used as the encoder model for the target domain.
[0079] Figure 6 is a flow chart illustrating an algorithm according to an example embodiment, generally indicated by reference numeral 60. Algorithm 60 is a variation of algorithm 50 described above.
[0080] Algorithm 60 begins at operation 61 where the elements of system 30 are initialized as described above (e.g., by initializing target encoder 34 to be the same as pre-trained source encoder 32 and initializing target discriminator 38 to be the same as initialized source discriminator 36).
[0081] In operation 62 of algorithm 60, the data is applied to the source encoder 32 and the target encoder 34. As with operations 42 and 52 described above, the source encoder 32 processes a batch of source data sets X. S Sampling to obtain feature representation R S , and the target encoder 34 performs a batch of target data sets X T Sampling to obtain feature representation R T .
[0082] At operation 63, the relevant weights are updated. As described above, the source discriminator 36 and the target discriminator 38 are trained to minimize the respective loss functions L of those discriminators. d , and train the target encoder 34 to maximize the loss function L d The source discriminator function D may be updated based on an average (e.g., a moving average) of recent weights at the corresponding discriminator. S and the target discriminator function D T (They are updated separately).
[0083] At operation 64, it is determined whether the current iteration of algorithm 60 is a synchronization step (e.g., based on the user-defined parameters described above). If so, algorithm 60 moves to operation 65; otherwise, algorithm 60 moves to operation 67. Since the source and target discriminators can be provided in separate domains, data transmission costs can be reduced by having the discriminators be updated locally in multiple iterations before being synchronized.
[0084] At operation 65, the discriminator D S and D T The gradients of are averaged so that the average change in the iterations since the last synchronization step is determined. Thus, operation 65 differs from operation 55 in that the gradients (rather than the weights themselves) are considered. Moreover, operation 65 may consider a moving average of the gradients. Then, in operation 66, the source and target discriminators are updated based on the moving average of the gradients in operation 65. In this way, the discriminator weights W S (d) and W T (d) After operation 66 , the algorithm 60 moves to operation 67 .
[0085] In the synchronization of the source and target discriminators, the moving average function used in operations 65 and 66 acts as a filter so that changes to the source and / or target discriminators during synchronization are generally less severe. In some cases, this can improve performance. For example, the moving average function can prevent the source and target discriminators from differing too much from each other.
[0086] At operation 67, it is determined whether the algorithm 60 is completed (e.g., after a defined number of batch iterations, or when a defined performance level is achieved). If so, the algorithm 60 terminates at operation 68; otherwise, the algorithm returns to operation 62 and further applies the data so that the source and target discriminators and the target encoder can be further updated. As mentioned above, when the algorithm terminates (in operation 68), E is generated. T The final value (e.g., optimal value) of , which can be used as the encoder model for the target domain.
[0087] Figure 7 is a flow chart illustrating an algorithm according to an example embodiment, generally indicated by reference numeral 70. Algorithm 70 is a variation of algorithms 50 and 60 described above.
[0088] Algorithm 70 begins at operation 71 where the elements of system 30 are initialized as described above (e.g., by initializing target encoder 34 to be the same as pre-trained source encoder 32 and initializing target discriminator 38 to be the same as initialized source discriminator 36).
[0089] At operation 72 of algorithm 70, the data is applied to the source encoder 32 and the target encoder 34. As with operations 42, 52, and 62 described above, the source encoder 32 processes a batch of source data sets X. S Sampling to obtain feature representation R S , and the target encoder 34 performs a batch of target data sets X T Sampling to obtain feature representation R T .
[0090] At operation 73, the weights of the target encoder 34 are updated. The weights of the source discriminator 36 and the target discriminator 38 are not updated at this stage. Instead, at operation 74, the locally generated gradients used to update the discriminators are accumulated for use later in the algorithm.
[0091] At operation 75, it is determined whether the current iteration of algorithm 70 is a synchronization step (e.g., based on the user-defined parameters described above). If so, algorithm 70 moves to operation 76; otherwise, algorithm 70 moves to operation 78. Since the source and target discriminators can be provided in separate domains, data transfer costs can be reduced by having the discriminator gradients accumulated locally over multiple iterations before synchronization occurs.
[0092] At operation 76, the gradients accumulated over multiple iterations of operation 74 are averaged so that the discriminator function D in the iteration since the last synchronization step is S and D TThe average change of is determined. Then, in operation 77, both the source discriminator and the target discriminator are updated based on averaging the gradients accumulated in operation 77. In the final synchronization operation, the discriminator weights W S (d) and W T (d) is updated based on the average of the accumulated gradients, thereby being updated and balanced. After operation 77 , the algorithm 70 moves to operation 78 .
[0093] Operations 76 and 77 differ from the similar operations described above in that the accumulated gradients are used in the synchronization of the source and target discriminators. This process keeps the source and target discriminators synchronized because they are updated using the same average gradient and accumulated over multiple steps.
[0094] At operation 78, it is determined whether the algorithm 70 is complete (e.g., after a defined number of batch iterations, or when a defined performance level is achieved). If so, the algorithm 70 terminates at operation 79; otherwise, the algorithm returns to operation 72 and further applies the data so that the source and target discriminators and the target encoder can be further updated. As mentioned above, when the algorithm terminates (in operation 79), E is generated. T The final value (e.g., optimal value) of , which can be used as the encoder model for the target domain.
[0095] Three possible implementations of Algorithm 40 have been described above (i.e., Algorithms 50, 60, and 70). Other variations of Algorithms 50, 60, and 70 are feasible, making other implementations of Algorithm 40 possible. For example, other empirical measures of gradient averages or model averages can be developed. For example, one option could be to send the output of the source encoder to the target domain (or vice versa), and then update the discriminator using both the source encoder and target encoder results. Since information would be exchanged at the encoder level, this would avoid the need for discriminator synchronization.
[0096] In general, information exchange between nodes can occur at the discriminator level (like the embodiment described in detail above), or at the encoder level, or even at the raw data level (where, for example, all raw data is sent from a source to a target).
[0097] As discussed in detail above, D S and D T is updated to minimize L d , while E T is updated to maximize L d . Due to E T The gradient of D is only related to the target data, so no data exchange with the source domain is required. S and DT , each can only get data from one domain, so gradients or weights are shared across domains so that the discriminator can be properly trained with data from both the source and target domains. In this way, the amount of communication from the entire dataset can be reduced to only the size of the discriminator, which may be only a few neural network layers.
[0098] Moreover, by adopting this approach, raw data exchange between nodes / domains can be avoided (thus, enhancing user privacy and minimizing storage requirements on each node), and the overall communication cost is reduced.
[0099] The above algorithm can be used in various scenarios, such as image recognition. Figure 3 In an example system of, consider the following scenario, where a developer of a source domain 31a in a first country is training an artificial intelligence (AI) model that analyzes ultrasound images from an ultrasound machine and locates the position of a fetus in the image. Assume that the AI model is trained with hundreds of ultrasound images obtained from a hospital in the first country and has an accuracy of 90% in locating the fetus in the image. Now, the source domain includes the first country images of the fetus (i.e., source domain 1) and / or ultrasound machine A (i.e., source domain 2).
[0100] Now, consider a scenario where the developer wants to deploy the AI model in the target domain 31b to a hospital in a second country. Due to differences in the accuracy of ultrasound machines and the methods used by ultrasound examiners, the ultrasound images in the target domain 31b in the second country may look different from the ultrasound images recorded in the source domain 31a in the first country. Now, the target domain includes second-country-specific images of the fetus (i.e., target domain 1) and / or ultrasound equipment B (i.e., target domain 2). This is an example of domain shift, which may result in reduced accuracy of the pre-trained AI model. To address this issue, domain adaptation can be used to modify the first model (e.g., source encoder 32) to develop a second model (e.g., target encoder 34) that is suitable for data obtained in the second country.
[0101] Using system 30, a sonogram of a first country may reside in a source domain 31a (and may be saved in the first country), and a sonogram of a second country may reside in a target domain 31b (and may be saved in the second country). Domain adaptation may be performed by exchanging the gradients and weights of a source discriminator 36 with the gradients and / or weights of a target discriminator 38, thereby addressing privacy concerns (since the sonogram data does not need to be shared) and saving on communication costs (since the required data transfer is small).
[0102] The above algorithm can be used in many other scenarios, such as natural language processing (NLP) and / or speech recognition. Now consider a second scenario, where the developer of the source domain 31a is training a model, e.g., a source encoder 32, which analyzes human speech to infer the speaker's emotions. Assume that the model is trained with thousands of speech samples obtained from smartphone users in a single country (e.g., the source country), and the accuracy of emotion detection reaches 85%.
[0103] Now, when the model is shipped to other geographic areas, the model may not perform well, for example due to variations in accents across population groups. Therefore, the model may need to be adapted for each population group in each target county. The principles described herein can be used to adapt a trained model to one or more new domains.
[0104] The above domain adaptation techniques usually work well when there are only two domains in the system. However, scaling is still required as the number of available domains increases.
[0105] By way of example, consider the above example of a model for identifying a speaker's emotion from a given speech segment (e.g., source encoder 32). Assume that the model is developed by a machine learning developer in the United States. The developer has likely collected most of the training data from English speakers in the United States and has performed well on speech tasks. Now, when deploying this model to other geographic regions (e.g., China, Germany, Switzerland, India, etc.), the variability in user accents can introduce domain shift, which can reduce model accuracy. Therefore, the developer can try to adapt the model to these target user groups (e.g., using unsupervised domain adaptation techniques).
[0106] One approach is to adapt from a labeled source domain 31a (i.e., speakers in the United States) for each target domain 31b. However, adapting from the original source domain may not always be optimal, especially if there is another domain in the system that is closer to the target domain. For example, imagine that the original model (for speakers in the United States, e.g., source encoder 32) has been adapted to speakers in Germany (e.g., target encoder 34). Now imagine that we want to adapt the model to speakers in Switzerland (i.e., the new target encoder). It may be better to adapt the model to speakers in German (rather than adapting the "original" model to speakers in the United States) because the similarity between speakers in Switzerland and Germany may be greater than the similarity between speakers in Switzerland and the United States. In this case, although the speakers in the United States represent the original source domain, adapting through them may be suboptimal.
[0107] Moreover, adapting each target domain from the original source domain may impose a large computational and communication load on the source machine (especially if we expect hundreds of new target domains to appear in the system, for example).
[0108] Figure 8 is a flow chart illustrating an algorithm according to an example embodiment, generally indicated by reference numeral 80. Algorithm 80 enables a target encoder to be initialized based on a source encoder, and then trained.
[0109] Algorithm 80 begins at operation 82, where one or more candidate source encoders are identified. Then, at operation 84, a source encoder is selected from the plurality of candidate encoders. A target encoder may then be initialized based on the selected encoder and an encoder adaptation algorithm for adapting the selected encoder to the target domain (e.g., using one of the algorithms described above).
[0110] Thus, in the context of the above example for identifying a speaker's emotion from a given speech segment, the multiple candidate source encoders may include encoders of the original algorithm (e.g., trained on speakers in the United States) and other source encoders (e.g., based on speakers in China, Germany, Switzerland, and India), at least some of which (but not necessarily all) may have been modified from the original U.S. algorithm.
[0111] Fig. 9 is a block diagram of a system, generally indicated by the reference number 90, according to an example embodiment.
[0112] System 90 includes one or more candidate source encoders, including a first source encoder 91, a second source encoder 92, a third source encoder 93, and an nth source encoder 94. First source encoder 91 may be, for example, an initial source encoder (such as, the US training algorithm in the above example), from which one or more other source encoders have been modified. As discussed above with reference to operation 82, source encoders 91 to 94 represent candidate encoders. Obviously, system 90 may include more or fewer source encoders.
[0113] The system 90 also includes a control module 96 that receives domain inputs and information from each of the source encoders 91 to 94 (such as features extracted from the associated source encoder or the output of the associated source encoder when input data from the source domain is passed to the encoder). The control module determines which source encoder is closest to the domain as indicated by the domain input and provides this information to a target encoder 98 (thereby implementing operation 84 of algorithm 80). As discussed further below, the target encoder 98 can be initialized based on the selected source encoder and then adapted based on the new domain.
[0114] The control module 96 may select the best source encoder from one or more candidate encoders based on some metric. As discussed further below, the metric may determine the minimum difference between domains (eg, computing domain divergence).
[0115] Therefore, a collaborative multi-step domain adaptation method can be provided, where the best collaborator is selected for each new target domain. This method of performing domain adaptation may result in higher accuracy in the target domain.
[0116] At a general level, the system 90 can be used as follows. Assume that we have a labeled source domain S in the system and a classifier (M S ). Further, assume that we have 4 unlabeled target domains (T1, T2, T3, T4) in the system, and the goal is to train a classifier for each of these target domains. Since we do not have labeled data from the target domain, we will need to perform domain adaptation.
[0117] Assume that T1 is introduced into the system. Currently, we only have S (e.g., the initial source encoder 91) and its pre-trained inference model M in the system. S Therefore, we perform a domain adaptation step between S and T1, which produces a model M for domain T1 T1 (For example, according to Figure 5 , 6 or one or more processes 50, 60 or 70 in 7).
[0118] Now suppose that T2 is introduced into the system, which already has S, T1 and its associated model M S and M T1 Although T1 itself is the adapted domain, we can now treat it as the source domain and consider it equivalent to our original labeled source domain S. Therefore, for T2, it now has the option of adapting from either S or T1.
[0119] In an example embodiment, the control module 96 uses a selection technique based on calculating the domain divergence, i.e., how far two domains are from each other. Specifically, the control module 96 may determine the pairwise divergence (T2, S) or (T2, T1) between the target domain (i.e., T2) and the candidate domains (S and T1), and identify the pair with the smallest divergence.
[0120] Computing domain divergence from unlabeled data alone is non-trivial. We propose to use the loss of a binary classifier trained to separate the two domains as a proxy for domain divergence. More details on this technique are provided below.
[0121] In the above example, assume that T1 is considered the closest collaborator of T2. Now, we perform a domain adaptation step between T1 and T2, where we adapt M T1 The weights are used to output the model of T2, that is, M T2 Now, if T3 is introduced into the system, the above steps can be repeated to select appropriate candidate encoders for the new domain and finally train the model MT3 .
[0122] We now discuss several ways to implement the above collaborator selection techniques and domain adaptation algorithms.
[0123] The candidate selection technique may be based on computing the divergence or distance between different domains. In an example implementation, Wasserstein distance is used as a metric to compute the distance between two distributions. The working intuition of Wasserstein distance (also known as bulldozer distance) is that if each domain is viewed as a unit amount of "dirt" piled on a given metric space M, then the Wasserstein distance is the minimum "cost" of transforming one pile into another, which is assumed to be the amount of dirt that needs to be moved multiplied by the average distance that must be moved.
[0124] To compute the Wasserstein distance, a binary classifier or domain discriminator can be trained where all samples from the source domain are labeled as 0 and all samples from the target domain are labeled as 1. The loss of this binary classifier is used as a proxy for the Wasserstein distance in our implementation – the larger the loss, the larger the Wasserstein distance and the farther the two domains are from each other. In this way, we can train a pairwise discriminator between the target domain and each of the multiple candidate collaborators and find the collaborator with the minimum Wasserstein distance to the target domain. This candidate is used as the best collaborator for adaptation.
[0125] It is noted that in other example embodiments, other distance metrics (such as MMD (maximum mean discrepancy), KL divergence or logistic loss) may be used. The skilled person will be aware of alternative metrics not discussed herein that may be used.
[0126] The candidate selection algorithm described herein may be used independent of the underlying domain adaptation technique used. In one example embodiment, Adversarial Discriminative Domain Adaptation (ADDA) is used to perform domain adaptation, but this is not necessary for all embodiments.
[0127] ADDA in the source domain (M S ) and use a set of unlabeled datasets X from the source and target domains. S and X T ADDA adopts an adversarial training method, which involves using adversarial training to train the discriminator D and feature encoder M T The discriminator aims to distinguish between the two domains, while the encoder aims to fool the discriminator by generating features that are indistinguishable across domains. Both the encoder and the discriminator participate in this game, trying to fool each other, and in the process both become better at their respective tasks. More importantly, our encoder MT It can learn to map the target domain data into the same feature space as the source encoder, thereby improving the inference accuracy in the target domain.
[0128] By way of example, the principles described above in the example embodiments can be used and combined with a human activity recognition model (e.g., to detect walking, running, etc.). Assume that the model is trained on accelerometer and gyroscope data collected from a smartphone placed in a user's thigh pocket. Now, when the model is deployed, the model can be used with wearable devices placed on parts of the body other than the thigh. For example, the model can be adapted and used for applications on a watch or in an ear-worn device.
[0129] Applying the model trained on the thigh to these new body positions is an example of domain shift.
[0130] According to Algorithm 80, when a user uses the model with a new body position, we will first find the best collaborator (e.g., the most similar body position for which we already have a trained model), and then perform a domain adaptation step to adapt the existing model to this new body position. It does not matter whether the best collaborator is the original thigh training model or a different model adapted from the thigh training model. Effectively, the original activity recognition model can now work on the new body position and achieve the best possible accuracy without the need for labeled data, with only adaptation on unlabeled data. In a similar manner, the above principles can be used for health-related recognition models (such as heart rate collection and detection models between different heart rate sensors and / or heart rate sensors placed on different parts of the human or animal body) and combined together.
[0131] Additionally, the principles described above in the example embodiments can be used for models adapted and implemented in one or more industrial processes between different devices and / or sensors, and combined together. In general, the above algorithms can be used and combined in domain offsets between any domains, such as sensors, hardware (HW) components (such as microphones, antennas, transmitters, receivers, modems) and / or software (SW) applications (such as codecs) or any combination thereof.
[0132] Many of the above elements can be implemented using neural network techniques. By way of example, Fig.10 1 is a block diagram of a neural network system, generally indicated by reference numeral 100, according to an example embodiment. The example neural network system 100 is used, by way of example, to implement the target encoder 34 described above. Similar neural network systems may be used to implement other modules described herein (such as the source encoder 32, the source discriminator 36, and the target discriminator 38).
[0133] The system 100 includes an input layer 101, one or more hidden layers 102, and an output layer 103. At the input layer 101, input data (such as a portion of a target data set) may be received as input. The hidden layer 102 may include multiple hidden nodes that may be connected in many different ways. At the output layer 103, output data (e.g., a target encoder output) is generated.
[0134] The neural network of system 100 includes a plurality of nodes and a plurality of connections between those nodes. The neural network is trained by modifying the nodes, including modifying the connections between the nodes and the weights applied to such connections.
[0135] For the sake of completeness, Fig.11 3 is an example schematic diagram of components of one or more modules for implementing the algorithms in the target and / or source domains described above, which is generally referred to below as a processing system 300. The processing system 300 may have a processor 302, a memory 304 coupled to the processor and including a RAM 314 and a ROM 312, and optionally a user input 310 and a display 318. The processing system 300 may include one or more network interfaces 308 to connect to a network, for example, a modem that may be wired or wireless.
[0136] The processor 302 is connected to each of the other components in order to control the operation thereof.
[0137] The memory 304 may include non-volatile memory, a hard disk drive (HDD), or a solid state drive (SSD). The ROM 312 of the memory 304 also stores an operating system 315 and may store software applications 316. The processor 304 uses the RAM 314 of the memory 304 for temporary storage of data. The operating system 315 may contain code that, when executed by the processor, implements various aspects of algorithms 20, 40, 50, 60, 70, and 80.
[0138] Processor 302 may take any suitable form. For example, it may be a microcontroller, multiple microcontrollers, a processor, or multiple processors. Processor 302 may include processor circuitry.
[0139] The processing system 300 may be a stand-alone computer, a server, a console, an appliance, a user device, a mobile communication device, a vehicle, an IoT device, a sensor, a software application, a communication network, or any combination thereof.
[0140] In some example embodiments, the processing system 300 may also be associated with external software applications. These may be applications stored on remote server devices and may run partially or exclusively on remote server devices. These applications may be referred to as cloud-hosted applications. The processing system 300 may communicate with remote server devices to utilize software applications stored therein.
[0141] Fig. 12A and Fig. 12B Tangible media are shown, respectively a removable memory unit 365 and a compact disk (CD) 368 storing computer readable code, which when run by a computer can perform a method according to the above-described example embodiments. The removable memory unit 365 can be a memory stick, such as a USB memory stick, having an internal memory 366 storing computer readable code. The memory 366 can be accessed by the computer system via a connector 367. The CD 368 can be a CD-ROM or a DVD or the like. Other forms of tangible storage media can be used.
[0142] Some example embodiments of the present invention may be implemented in software, hardware, application logic, or a combination of software, hardware, and application logic. The software, application logic, and / or hardware may reside in a memory or on any computer medium. In an example embodiment, the application logic, software, or instruction set is maintained on any of a variety of conventional computer-readable media. In the context of this document, a "memory" or "computer-readable medium" may be any non-transitory medium or device that can contain, store, communicate, propagate, or transmit instructions used by or in conjunction with an instruction execution system, device, or apparatus (such as a computer).
[0143] Where relevant, references to "computer-readable storage medium", "computer program product", "tangibly embodied computer program", etc. or "processor" or "processing circuit system", etc. should be understood to include not only computers with different architectures (such as single / multi-processor architectures and sequential / parallel architectures), but also special-purpose circuits, such as field-programmable gate arrays FPGAs, special-purpose circuits ASICs, signal processing devices and other devices. References to computer programs, instructions, codes, etc. should be understood to mean software for programmable processor firmware, such as the programmable content of hardware devices, whether instructions for a processor or configuration settings for a fixed-function device, gate array, programmable logic device, etc.
[0144] As used in this application, the term "circuitry" refers to all of: (a) hardware circuit implementations only, (such as, implementations in analog and / or digital circuitry only), and (b) combinations of circuitry and software (and / or firmware), such as, as applicable: (i) a combination of (multiple) processors, or (ii) portions of (multiple) processors / software (including (multiple) digital signal processors, software, and (multiple) memories that work together to enable a device such as a server to perform various functions), and (c) circuitry that requires software or firmware to operate even if the software or firmware is not physically present, such as, (multiple) microprocessors or portions of (multiple) microprocessors.
[0145] If desired, the different functions discussed herein may be performed in a different order and / or concurrently with each other. Furthermore, if desired, one or more of the above functions may be optional or may be combined. Likewise, it is also to be understood that Figure 2 and 4 The flowcharts of FIGS. 1 to 8 are merely examples, and the various operations depicted therein may be omitted, reordered, and / or combined.
[0146] It is to be understood that the above exemplary embodiments are illustrative only and do not limit the scope of the present invention. Other variations and modifications will be apparent to those skilled in the art upon reading this specification.
[0147] Furthermore, it should be understood that the disclosure of the present application includes any novel feature or any novel combination of features disclosed herein explicitly or implicitly, or any generalization thereof, and that new claims may be formulated during the prosecution of the present application or any application derived therefrom to cover any such feature and / or combination of such features.
[0148] Although various aspects of the invention are set out in the independent claims, further aspects of the invention comprise other combinations of features from the described example embodiments and / or the dependent claims with features of the independent claims than just the combinations explicitly set out in the claims.
[0149] It is also noted herein that although various examples are described above, these descriptions should not be viewed in a limiting sense. Rather, there are several variations and modifications that may be made without departing from the scope of the present invention as defined in the appended claims.
Claims
1. A first device for communication, comprising: means for initializing weights of a target encoder at the first device based on a source encoder at a second device, wherein the source encoder implements a first algorithm; means for initializing weights of a target discriminator associated with the target encoder at the first device such that the target discriminator is initialized to match a source discriminator associated with the source encoder and at the second device; means for applying some target data in the target data set to the target encoder to generate a target encoder output; means for applying the target encoder output to the target discriminator to generate a first local loss function output; means for training the target encoder to attempt to increase a first local loss function output, wherein the means for training the target encoder comprises means for updating the weights of the target encoder; means for training the object discriminator to attempt to reduce the output of the first local loss function; as well as Means for synchronizing weights of the target discriminator and the source discriminator after said training of the target discriminator based on a source encoder output generated by applying some data of a source dataset to the source encoder and corresponding training of the source discriminator, wherein the discriminator seeks to distinguish between source encoder output and target encoder output, and wherein the first device and the second device are physically separated.
2. The first apparatus of claim 1 , wherein the means for synchronizing the weights of the target discriminator and the source discriminator synchronizes the weights after a plurality of instances of training of the target discriminator and the corresponding training of the source discriminator.
3. The first device according to claim 1, wherein: The means for training the target discriminator comprises means for updating the weights of the target discriminator.
4. The first apparatus of claim 1, wherein the means for synchronizing the weights of the target discriminator and the weights of the source discriminator comprises means for averaging the weights of the target discriminator and the weights of the source discriminator.
5. The first apparatus of claim 1, wherein the means for synchronizing the weights of the target discriminator and the weights of the source discriminator comprises means for averaging changes in the weights of the target discriminator and changes in the weights of the source discriminator.
6. The first device according to claim 1, wherein: The means for training the target discriminator comprises means for accumulating desired changes in the weights of the target discriminator.
7. The first device of claim 6, wherein the means for synchronizing the weights of the target discriminator and the weights of the source discriminator comprises means for averaging the accumulated expected changes of the weights of the target discriminator and the accumulated expected changes of the weights of the source discriminator.
8. The first apparatus according to claim 1, wherein the means for initializing the weights of the target discriminator initializes the weights of the target discriminator randomly, pseudo-randomly or arbitrarily.
9. The first apparatus of claim 1, wherein the means for initializing weights of the target encoder sets the weights of the target encoder to be the same as corresponding weights of the source encoder.
10. The first apparatus of claim 1, wherein the target encoder is implemented using a neural network, wherein the weights of the target encoder are weights of the neural network.
11. The first apparatus of claim 10, wherein the means for initializing the target encoder comprises means for receiving weights of a source encoder neural network at the target encoder.
12. The first device of claim 1, wherein the target discriminator is implemented using a neural network, wherein the weights of the target discriminator are weights of the neural network.
13. The first device according to claim 1, further comprising: Means for selecting an initial instance of said source encoder from a plurality of candidate encoders.
14. The first apparatus of claim 13, wherein the means for selecting the initial instance of the source encoder selects the best source encoder from the plurality of candidate encoders based on some metric. The first apparatus of claim 14 , wherein the metric is related to differences between domains.
16. A first device according to any one of the preceding claims, wherein the device comprises: at least one processor; as well as At least one memory including computer program code, the at least one memory and the computer program being configured to, together with the at least one processor, cause execution of the apparatus.
17. The first apparatus according to any one of claims 1 to 15, wherein the source encoder is fixed.
18. A system for communication, comprising: means for initializing weights of a target encoder at a first device based on a source encoder at a second device, wherein the source encoder has implemented a first algorithm; means for initializing, at the first device, weights of a target discriminator associated with the target encoder and weights of a source discriminator associated with the source encoder and at the second device so that the target discriminator and the source discriminator match; means for applying some target data in the target data set to the target encoder to generate a target encoder output; means for applying some source data of a source data set to said source encoder to generate a source encoder output; means for applying the target encoder output to the target discriminator to generate a first local loss function; means for applying the source encoder output to the source discriminator to generate a second local loss function; means for training the target encoder to attempt to increase the output of the first local loss function, wherein the means for training the target encoder comprises means for updating the weights of the target encoder; means for training the object discriminator to attempt to reduce the output of the first local loss function; means for training the source discriminator to attempt to reduce the output of the second local loss function; as well as Means for synchronizing weights of the target discriminator and the source discriminator after said training of the target discriminator and the source discriminator based on a source encoder output generated by applying some data of a source data set to the source encoder, wherein the discriminator seeks to distinguish between source encoder output and target encoder output, and wherein the first device and the second device are physically separated.
19. The system of claim 18, wherein the source encoder is fixed.
20. A method for communication, comprising: Initializing weights of a target encoder at a first device based on a source encoder at a second device, wherein the source encoder implements a first algorithm; Initializing weights of a target discriminator associated with the target encoder at the first device such that the target discriminator is initialized to match a source discriminator associated with the source encoder and at the second device; applying some target data in the target dataset to the target encoder to generate a target encoder output; applying the target encoder output to the target discriminator to generate a first local loss function output; Training the target encoder to attempt to increase the first local loss function output, wherein training the target encoder comprises updating the weights of the target encoder; Training the target discriminator to attempt to reduce the first local loss function output; as well as The weights of the target discriminator and the source discriminator are synchronized after the training of the target discriminator based on a source encoder output generated by applying some data in a source data set to the source encoder and corresponding training of the source discriminator, wherein the discriminator seeks to distinguish between the source encoder output and the target encoder output, and wherein the first device and the second device are physically separated.
21. A computer program, comprising instructions for causing a device to perform at least the following operations: Initializing, at a first device, weights of a target encoder at a second device based on a source encoder, wherein the source encoder implements a first algorithm; Initializing weights of a target discriminator associated with the target encoder at the first device such that the target discriminator is initialized to match a source discriminator associated with the source encoder and at the second device; applying some target data in the target dataset to the target encoder to generate a target encoder output; applying the target encoder output to the target discriminator to generate a first local loss function output; Training the target encoder to attempt to increase the first local loss function output, wherein training the target encoder comprises updating the weights of the target encoder; Training the target discriminator to attempt to reduce the first local loss function output; as well as Synchronizing weights of the target discriminator and the source discriminator after the training of the target discriminator based on source encoder outputs generated by applying some data in a source dataset to the source encoder and corresponding training of the source discriminator, wherein the discriminator seeks to distinguish between source encoder outputs and target encoder outputs, and wherein the first device and the second device are physically separated.